2 * Copyright notice from original mutt:
3 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
5 * This file is part of mutt-ng, see http://www.muttng.org/.
6 * It's licensed under the GNU General Public License,
7 * please see the file GPL in the top level source directory.
16 struct hash_elem *next;
21 struct hash_elem **table;
24 #define hash_find(table, key) \
25 hash_find_hash(table, hash_string((unsigned char *)key, table->nelem), key)
27 #define hash_delete(table,key,data,destroy) \
28 hash_delete_hash(table, hash_string((unsigned char *)key, table->nelem), key, data, destroy)
30 HASH *hash_create(int nelem);
31 int hash_string(const unsigned char *s, int n);
32 int hash_insert(HASH * table, const char *key, void *data, int allow_dup);
33 HASH *hash_resize(HASH * table, int nelem);
34 void *hash_find_hash(const HASH *table, int hash, const char *key);
35 void hash_delete_hash(HASH * table, int hash, const char *key,
36 const void *data, void (*destroy) (void *));
37 void hash_destroy(HASH ** hash, void (*destroy) (void *));
39 void hash_map(HASH* table,
40 void (*mapfunc) (const char* key, void* data, unsigned long more),