diff options
Diffstat (limited to 'src/hash.h')
-rwxr-xr-x | src/hash.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h new file mode 100755 index 0000000..4ea7731 --- /dev/null +++ b/src/hash.h @@ -0,0 +1,29 @@ +/************************************************************************ + hash.h + ************************************************************************/ +#ifndef HASH_H +#define HASH_H + + +typedef unsigned int HASHKEYTYPE; +typedef struct HASHTABLE_T *HASHTABLE; +typedef int BOOL; + +#define FALSE 0 +#define TRUE 1 + +extern void hash_usage (void); +extern BOOL hash_test (void); +extern HASHTABLE hash_create (unsigned long InitialSize, BOOL KeyIsString); +extern HASHTABLE hash_destroy (HASHTABLE table); +extern BOOL hash_add (HASHTABLE table, HASHKEYTYPE Key, const void *Data); +extern BOOL hash_addstring (HASHTABLE table, char * Key, const void * Data); +extern void * hash_remove (HASHTABLE table, HASHKEYTYPE Key); +extern void * hash_lookup (HASHTABLE table, HASHKEYTYPE Key); +extern size_t hash_count (HASHTABLE table); +extern void * hash_search (HASHTABLE table, BOOL (*Search)(HASHKEYTYPE key, void *, va_list), ...); +extern void * hash_searchwithvalist(HASHTABLE table, BOOL (*Search)(HASHKEYTYPE key, void *, va_list), va_list args); +extern BOOL hash_exists (HASHTABLE table, HASHKEYTYPE Key); + + +#endif |