| 369 | } |
| 370 | |
| 371 | bm_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 | } |
| 385 | bm_Node *bm_insertNode(bm_T data) { |
| 386 | bm_Node *p, *p0; |
| 387 | bm_hashTableIndex bucket; |
no outgoing calls
no test coverage detected