Lines Matching +defs:hash +defs:table +defs:c
1 /* $NetBSD: symtab.c,v 1.7 2025/01/26 16:25:38 christos Exp $ */
46 eltlist_t *table;
67 symtab->table = isc_mem_cget(mctx, size, sizeof(eltlist_t));
69 INIT_LIST(symtab->table[i]);
96 for (elt = HEAD(symtab->table[i]); elt != NULL; elt = nelt) {
106 isc_mem_cput(symtab->mctx, symtab->table, symtab->size,
113 hash(const char *key, bool case_sensitive) {
118 * This hash function is similar to the one Ousterhout
136 b = hash((k), (s)->case_sensitive) % (s)->size; \
138 for (e = HEAD((s)->table[b]); e != NULL; e = NEXT(e, link)) { \
144 for (e = HEAD((s)->table[b]); e != NULL; e = NEXT(e, link)) { \
191 for (elt = HEAD(symtab->table[i]); elt != NULL; elt = nelt) {
196 UNLINK(symtab->table[i], elt, link);
197 hv = hash(elt->key, symtab->case_sensitive);
202 isc_mem_cput(symtab->mctx, symtab->table, symtab->size,
205 symtab->table = newtable;
227 UNLINK(symtab->table[bucket], elt, link);
253 PREPEND(symtab->table[bucket], elt, link);
280 UNLINK(symtab->table[bucket], elt, link);