Lines Matching refs:key
140 void make_hash(const char *key, unsigned int *start, unsigned int *decrement, const int hash_prime)
142 unsigned long int hash_num = key[0];
143 int len = strlen(key);
153 hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24));
159 /* this adds the key to the hash table */
160 int search_name_hashtable(const char *key)
166 make_hash(key, &probe_address, &probe_decrement, NAME_HASH_PRIME);
168 if (strcmp(name_hashtable[probe_address], key) == 0) {
177 name_hashtable[probe_address] = xstrdup(key);
181 /* this DOESNT add the key to the hashtable
184 unsigned int search_status_hashtable(const char *key)
189 make_hash(key, &probe_address, &probe_decrement, STATUS_HASH_PRIME);
191 if (strcmp(key, name_hashtable[package_hashtable[status_hashtable[probe_address]->package]->name]) == 0) {