-typedef struct HT HT;
-
-unsigned int
- hash_get_n_slots_used PARAMS((const HT *ht));
-
-unsigned int
- hash_get_max_chain_length PARAMS((HT *ht));
-
-int
- hash_rehash PARAMS((HT *ht, unsigned int new_table_size));
-
-unsigned int
- hash_get_table_size PARAMS((const HT *ht));
-
-HT *
- hash_initialize PARAMS((unsigned int table_size,
- void (*key_freer) PARAMS((void *key)),
- unsigned int (*hash) PARAMS((const void *,
- unsigned int)),
- int (*equality_tester) PARAMS((const void *,
- const void *))));
-
-unsigned int
- hash_get_n_keys PARAMS((const HT *ht));
-
-int
- hash_query_in_table PARAMS((const HT *ht, const void *e));
-
-void *
- hash_lookup PARAMS((const HT *ht, const void *e));
-
-void *
- hash_insert_if_absent PARAMS((HT *ht,
- const void *e,
- int *failed));
-
-void *
- hash_delete_if_present PARAMS((HT *ht, const void *e));
-
-void
- hash_print_statistics PARAMS((const HT *ht, FILE *stream));
-
-int
- hash_get_statistics PARAMS((const HT *ht, unsigned int *n_slots_used,
- unsigned int *n_keys,
- unsigned int *max_chain_length));
-
-int
- hash_table_ok PARAMS((HT *ht));
-
-void
- hash_do_for_each PARAMS((HT *ht,
- void (*f) PARAMS((void *e, void *aux)),
- void *aux));
-
-int
- hash_do_for_each_2 PARAMS((HT *ht,
- int (*f) PARAMS((void *e, void *aux)),
- void *aux));
-
-int
- hash_do_for_each_in_selected_bucket PARAMS((HT *ht,
- const void *key,
- int (*f) PARAMS((const void *bucket_key,
- void *e,
- void *aux)),
- void *aux));
-
-void
- hash_clear PARAMS((HT *ht));
-
-void
- hash_free PARAMS((HT *ht));
-
-void
- hash_get_key_list PARAMS((const HT *ht,
- unsigned int bufsize,
- void **buf));
-
-void *
- hash_get_first PARAMS((const HT *ht));
-
-void *
- hash_get_next PARAMS((const HT *ht, const void *e));
-
-/* This interface to hash_insert_if_absent is used frequently enough to
- merit a macro here. */
-
-# define HASH_INSERT_NEW_ITEM(Ht, Item, Failp) \
- do \
- { \
- void *_already; \
- _already = hash_insert_if_absent ((Ht), (Item), Failp); \
- assert (_already == NULL); \
- } \
- while (0)
-
-#endif /* HASH_H */
+typedef struct hash_tuning Hash_tuning;
+
+struct hash_table;
+
+typedef struct hash_table Hash_table;
+
+/* Information and lookup. */
+size_t hash_get_n_buckets (const Hash_table *);
+size_t hash_get_n_buckets_used (const Hash_table *);
+size_t hash_get_n_entries (const Hash_table *);
+size_t hash_get_max_bucket_length (const Hash_table *);
+bool hash_table_ok (const Hash_table *);
+void hash_print_statistics (const Hash_table *, FILE *);
+void *hash_lookup (const Hash_table *, const void *);
+
+/* Walking. */
+void *hash_get_first (const Hash_table *);
+void *hash_get_next (const Hash_table *, const void *);
+size_t hash_get_entries (const Hash_table *, void **, size_t);
+size_t hash_do_for_each (const Hash_table *, Hash_processor, void *);
+
+/* Allocation and clean-up. */
+size_t hash_string (const char *, size_t);
+void hash_reset_tuning (Hash_tuning *);
+Hash_table *hash_initialize (size_t, const Hash_tuning *,
+ Hash_hasher, Hash_comparator,
+ Hash_data_freer);
+void hash_clear (Hash_table *);
+void hash_free (Hash_table *);
+
+/* Insertion and deletion. */
+bool hash_rehash (Hash_table *, size_t);
+void *hash_insert (Hash_table *, const void *);
+void *hash_delete (Hash_table *, const void *);
+
+#endif