diff options
author | fcolin | 2005-07-27 14:40:22 +0000 |
---|---|---|
committer | fcolin | 2005-07-27 14:40:22 +0000 |
commit | 39c586807a09f9c7cfe2ca59ffcf7aae016b5859 (patch) | |
tree | 7532ccf375257f03b93f8515941733a363c3dc3a /src/hash.h | |
parent | 618a3bf2be10a356bb103805ae3a535e016d90fc (diff) | |
download | ivy-c-39c586807a09f9c7cfe2ca59ffcf7aae016b5859.zip ivy-c-39c586807a09f9c7cfe2ca59ffcf7aae016b5859.tar.gz ivy-c-39c586807a09f9c7cfe2ca59ffcf7aae016b5859.tar.bz2 ivy-c-39c586807a09f9c7cfe2ca59ffcf7aae016b5859.tar.xz |
hash table to store regexp
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 |