00001
00002
00003
00004
00005
00006
00007
00008 #ifndef HASH_TABLE_H
00009 #define HASH_TABLE_H
00010
00011 typedef unsigned (*hash_func_t) ( const char *key );
00012
00013 struct hash_table * hash_table_create( int buckets, hash_func_t func );
00014 void hash_table_delete( struct hash_table *h );
00015
00016 int hash_table_size ( struct hash_table *h );
00017 int hash_table_insert( struct hash_table *h, const char *key, const void *value );
00018 void * hash_table_lookup( struct hash_table *h, const char *key );
00019 void * hash_table_remove( struct hash_table *h, const char *key );
00020
00021 void hash_table_firstkey( struct hash_table *h );
00022 int hash_table_nextkey( struct hash_table *h, char **key, void **value );
00023
00024 unsigned hash_string( const char *s );
00025
00026 #endif