MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / bm_hash

Function bm_hash

bitmap/bitmain.cpp:371–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371bm_hashTableIndex bm_hash(bm_T data) {
372 /***********************************
373 * hash function applied to data *
374 ***********************************/
375 char *p = data->name;
376 uint32_t hval = strlen(p);
377
378 while (*p) {
379 hval += tolower(*p);
380 p++;
381 }
382
383 return (hval % (MAX_BITMAPS / 2));
384}
385bm_Node *bm_insertNode(bm_T data) {
386 bm_Node *p, *p0;
387 bm_hashTableIndex bucket;

Callers 3

bm_insertNodeFunction · 0.85
bm_deleteNodeFunction · 0.85
bm_findNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected