Lines Matching +defs:hash +defs:table
1 /* $NetBSD: hash.c,v 1.30 2025/05/24 07:38:59 rillig Exp $ */
40 __RCSID("$NetBSD: hash.c,v 1.30 2025/05/24 07:38:59 rillig Exp $");
61 hash(const char *s)
75 * Look for a hash table entry. If no hash table entry for the
79 hash_search(hte_t **table, const char *s, bool mknew)
84 if (table == NULL)
85 table = htab;
87 h = hash(s);
88 for (hte = table[h]; hte != NULL; hte = hte->h_link) {
108 hte->h_link = table[h];
110 table[h] = hte;
148 * Call the action for each name in the hash table.
155 hte_t **table = htab;
158 for (hte = table[i]; hte != NULL; hte = hte->h_link)
163 /* Run the action for each name in the symbol table, in alphabetic order. */
170 hte_t **table = htab;
173 for (hte = table[i]; hte != NULL; hte = hte->h_link)
185 * Free all contents of the hash table that this module allocated.
188 hash_free(hte_t **table)
194 for (hte = table[i]; hte != NULL; hte = nexthte) {
200 free(table);