Lines Matching refs:key

175 		new->key = malloc((unsigned)strlen(line) + 1);
176 if (new->key == NULL) {
180 (void) strcpy(new->key, line);
194 printf("Key = %s, Value = %d\n", res->key, *res->data);
293 i = HASH(item.key); /* Primary hash on key */
300 if (table[i].key == NULL) /* Empty slot? */
302 else if (COMPARE(table[i].key, item.key) == 0) /* Match? */
306 c = HASH2(item.key); /* No match => compute secondary hash */
317 if (table[i].key == NULL) /* Empty slot? */
319 else if (COMPARE(table[i].key, item.key) == 0) /* Match? */
338 unsigned int p0 = HASH(item.key); /* First probe index */
339 unsigned int c0 = HASH2(item.key); /* Main branch increment */
352 cj = HASH2(table[pj].key); /* Secondary branch incr. */
357 if (table[pjk].key == NULL) {
367 table[curpos] = table[curj]; /* Old key to new site */
423 i = HASH(item.key); /* Table[i] contains list head */
433 while (p != NULL && (res = STRCMP(item.key, p->item.key))) {
478 hashd(key) /* Division hashing scheme */
479 POINTER key; /* Key to be hashed */
481 return (crunch(key) % length);
493 hashm(POINTER key) /* Multiplication hashing scheme */
494 /* "key" to be hashed */
496 return ((int)(((unsigned)(crunch(key) * FACTOR)) >> SHIFT));
505 hash2m(POINTER key) /* Secondary hashing routine */
506 /* "key" is the string to be hashed */
508 return (((unsigned int)((crunch(key) * FACTOR) << m) >> SHIFT) | 1);
515 crunch(POINTER key) /* Convert multicharacter key to unsigned int */
519 unsigned char *p = (unsigned char *)key;
534 hdump() /* Dumps loc, data, probe count, key */
547 if (table[i].key == NULL)
556 *table[i].data, prcnt, table[i].key);
568 *a->item.data, a, a->item.key);