Lines Matching refs:hash

37  * based on hash and has table. If the need arises in the future,
51 * This structure defines an instance of the hash entry
77 nscd_hash_t *hash; /* the current hash entry */
84 * Calculate a hash for a string based on the elf_hash
85 * algorithm, hash is case insensitive. Uses tolower
112 * Scan a hash table for a matching hash entry. Assume 'str' is
168 unsigned long hash;
174 hash = calc_hash(str);
175 idx_p = db->hash_tbl_p[hash % db->array_size];
197 unsigned long hash;
203 hash = calc_hash(str);
204 i = hash % db->array_size;
295 unsigned long hash;
300 hash = calc_hash(str);
301 i = hash % db->array_size;
383 nscd_hash_t *hash;
386 /* first part: hash data structure and name string */
387 size = sizeof (*hash) + strlen(name) + 1;
399 hash = (nscd_hash_t *)calloc(1, size);
401 if (hash == NULL)
405 hash->db_entry.num_data = num_data;
406 hash->db_entry.num_array = num_array;
407 hash->db_entry.type = type;
408 hash->db_entry.name = (char *)hash + sizeof (*hash);
409 p = (char *)hash + array_o;
410 hash->db_entry.data_array = (void **)p;
411 *(hash->db_entry.data_array) = (char *)hash + data_o;
412 (void) strcpy(hash->db_entry.name, name);
414 return (&hash->db_entry);
437 if (db != c->db || c->hash == NULL ||
441 /* retrieve the hash entry from the cookie */
442 hp = c->hash;
446 * Need to update c->hash as well, in case
450 * find the (updated) next hash entry in line.
458 c->hash = NULL;
463 c->hash = hp->prev_p;
585 if (c->hash != NULL)
586 c->hash = c->hash->next_p;
589 if (c->hash != NULL) {
590 return (&c->hash->db_entry);
597 c->hash = NULL;
603 c->hash = db->hash_tbl_p[c->idx];
604 if (c->hash != NULL)
609 if (c->hash == NULL) {
616 return (&c->hash->db_entry);