Lines Matching +defs:hash +defs:table +defs:c
1 /* $NetBSD: symtab.c,v 1.9 2025/01/26 16:25:44 christos Exp $ */
61 eltlist_t *table;
82 symtab->table = calloc(size, sizeof(eltlist_t));
83 if (symtab->table == NULL) {
88 ISC_LIST_INIT(symtab->table[i]);
103 ISC_LIST_UNLINK(symtab->table[bucket], elt, link);
123 for (elt = ISC_LIST_HEAD(symtab->table[i]); elt != NULL;
130 free(symtab->table);
136 hash(const char *key, bool case_sensitive) {
142 * P. J. Weinberger's hash function, adapted from p. 436 of
169 b = hash((k), (s)->case_sensitive) % (s)->size; \
171 for (e = ISC_LIST_HEAD((s)->table[b]); e != NULL; \
179 for (e = ISC_LIST_HEAD((s)->table[b]); e != NULL; \
225 ISC_LIST_UNLINK(symtab->table[bucket], elt, link);
246 ISC_LIST_PREPEND(symtab->table[bucket], elt, link);
281 for (elt = ISC_LIST_HEAD(symtab->table[i]); elt != NULL;