Lines Matching refs:table

52   struct hash_entry **table;  member
93 ret->table = (struct hash_entry **) obstack_alloc (&ret->memory, alloc); in hash_new_sized()
94 memset (ret->table, 0, alloc); in hash_new_sized()
118 hash_die (struct hash_control *table) in hash_die() argument
120 obstack_free (&table->memory, 0); in hash_die()
121 free (table); in hash_die()
134 hash_lookup (struct hash_control *table, const char *key, size_t len, in hash_lookup() argument
146 ++table->lookups; in hash_lookup()
162 hindex = hash % table->size; in hash_lookup()
163 list = table->table + hindex; in hash_lookup()
172 ++table->hash_compares; in hash_lookup()
178 ++table->string_compares; in hash_lookup()
206 hash_insert (struct hash_control *table, const char *key, void *val) in hash_insert() argument
212 p = hash_lookup (table, key, strlen (key), &list, &hash); in hash_insert()
217 ++table->insertions; in hash_insert()
220 p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); in hash_insert()
236 hash_jam (struct hash_control *table, const char *key, void *val) in hash_jam() argument
242 p = hash_lookup (table, key, strlen (key), &list, &hash); in hash_jam()
246 ++table->replacements; in hash_jam()
254 ++table->insertions; in hash_jam()
257 p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); in hash_jam()
274 hash_replace (struct hash_control *table, const char *key, void *value) in hash_replace() argument
279 p = hash_lookup (table, key, strlen (key), NULL, NULL); in hash_replace()
284 ++table->replacements; in hash_replace()
298 hash_find (struct hash_control *table, const char *key) in hash_find() argument
302 p = hash_lookup (table, key, strlen (key), NULL, NULL); in hash_find()
313 hash_find_n (struct hash_control *table, const char *key, size_t len) in hash_find_n() argument
317 p = hash_lookup (table, key, len, NULL, NULL); in hash_find_n()
328 hash_delete (struct hash_control *table, const char *key, int freeme) in hash_delete() argument
333 p = hash_lookup (table, key, strlen (key), &list, NULL); in hash_delete()
341 ++table->deletions; in hash_delete()
347 obstack_free (&table->memory, p); in hash_delete()
356 hash_traverse (struct hash_control *table, in hash_traverse() argument
361 for (i = 0; i < table->size; ++i) in hash_traverse()
365 for (p = table->table[i]; p != NULL; p = p->next) in hash_traverse()
376 struct hash_control *table ATTRIBUTE_UNUSED) in hash_print_statistics()
384 fprintf (f, "\t%lu lookups\n", table->lookups); in hash_print_statistics()
385 fprintf (f, "\t%lu hash comparisons\n", table->hash_compares); in hash_print_statistics()
386 fprintf (f, "\t%lu string comparisons\n", table->string_compares); in hash_print_statistics()
387 fprintf (f, "\t%lu insertions\n", table->insertions); in hash_print_statistics()
388 fprintf (f, "\t%lu replacements\n", table->replacements); in hash_print_statistics()
389 fprintf (f, "\t%lu deletions\n", table->deletions); in hash_print_statistics()
393 for (i = 0; i < table->size; ++i) in hash_print_statistics()
397 if (table->table[i] == NULL) in hash_print_statistics()
401 for (p = table->table[i]; p != NULL; p = p->next) in hash_print_statistics()
406 fprintf (f, "\t%g average chain length\n", (double) total / table->size); in hash_print_statistics()