Lines Matching refs:key

114     POINTER key;
175 new->key = malloc((unsigned) strlen(line) + 1);
176 if(new->key == NULL) {
180 strcpy(new->key, line);
194 printf("Key = %s, Value = %d\n", res->key, *res->data);
257 i = HASH(item.key); /* Primary hash on key */
264 if(table[i].key == NULL) /* Empty slot? */
266 else if(COMPARE(table[i].key, item.key) == 0) /* Match? */
270 c = HASH2(item.key); /* No match => compute secondary hash */
281 if(table[i].key == NULL) /* Empty slot? */
283 else if(COMPARE(table[i].key, item.key) == 0) /* Match? */
300 { unsigned int p0 = HASH(item.key); /* First probe index */
301 unsigned int c0 = HASH2(item.key); /* Main branch increment */
314 cj = HASH2(table[pj].key); /* Secondary branch incr. */
317 if(table[pjk].key == NULL) { /* Improvement found */
325 table[curpos] = table[curj]; /* Old key to new site */
380 i = HASH(item.key); /* Table[i] contains list head */
391 while(p != NULL && (res = STRCMP(item.key, p->item.key))) {
437 * key: Key to be hashed
440 hashd(POINTER key)
442 return (crunch(key) % length);
456 * key: Key to be hashed
459 hashm(POINTER key)
472 return ((int) (((unsigned) (crunch(key) * FACTOR)) >> SHIFT));
483 * key: String to be hashed
486 hash2m(POINTER key)
488 return ((int) (((unsigned) ((crunch(key) * FACTOR) << m) >> SHIFT) | 1));
493 /* Convert multicharacter key to unsigned int */
495 crunch(POINTER key)
498 int s; /* Length of the key */
500 for(s = 0; *key; s++) /* Simply add up the bytes */
501 sum += *key++;
508 hdump() /* Dumps loc, data, probe count, key */
521 if(table[i].key == NULL)
528 *table[i].data, prcnt, table[i].key);
540 *a->item.data, a, a->item.key);