summaryrefslogtreecommitdiff
path: root/src/htshash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/htshash.h')
-rw-r--r--src/htshash.h57
1 files changed, 2 insertions, 55 deletions
diff --git a/src/htshash.h b/src/htshash.h
index 9a54710..c4acff1 100644
--- a/src/htshash.h
+++ b/src/htshash.h
@@ -43,62 +43,9 @@ Please visit our Website: http://www.httrack.com
#include "htscore.h"
// tables de hashage
-int hash_read(hash_struct* hash,char* nom1,char* nom2,int type);
-void hash_write(hash_struct* hash,int lpos);
+int hash_read(hash_struct* hash,char* nom1,char* nom2,int type,int normalized);
+void hash_write(hash_struct* hash,int lpos,int normalized);
int* hash_calc_chaine(hash_struct* hash,int type,int pos);
unsigned long int hash_cle(char* nom1,char* nom2);
-
-
-
-// inthash -- simple hash table, using a key (char[]) and a value (ulong int)
-
-// simple hash table for other routines
-typedef struct inthash_chain {
- char* name; /* key (name) */
- union {
- unsigned long int intg; /* integer value */
- void* ptr; /* ptr value */
- } value;
- struct inthash_chain* next; /* next element */
-} inthash_chain;
-
-// structure behind inthash
-typedef void (* t_inthash_freehandler)(void* value);
-typedef struct {
- inthash_chain** hash;
- t_inthash_freehandler free_handler;
- unsigned int hash_size;
- unsigned short flag_valueismalloc;
-} struct_inthash;
-
-// main inthash type
-typedef struct_inthash* inthash;
-
-// subfunctions
-unsigned long int inthash_key(char* value);
-void inthash_init(inthash hashtable);
-void inthash_delchain(inthash_chain* hash,t_inthash_freehandler free_handler);
-void inthash_default_free_handler(void* value);
-
-// main functions:
-
-
-/* Hash functions: */
-inthash inthash_new(int size); /* Create a new hash table */
-int inthash_created(inthash hashtable); /* Test if the hash table was successfully created */
-void inthash_delete(inthash* hashtable); /* Delete an hash table */
-void inthash_value_is_malloc(inthash hashtable,int flag); /* Is the 'value' member a value that needs to be free()'ed ? */
-void inthash_value_set_free_handler(inthash hashtable, /* value free() handler (default one is 'free') */
- t_inthash_freehandler free_handler);
-/* */
-int inthash_read(inthash hashtable,char* name,long int* value); /* Read entry from the hash table */
-/* */
-void inthash_add(inthash hashtable,char* name,long int value); /* Add entry in the hash table */
-void* inthash_addblk(inthash hashtable,char* name,int blksize); /* Add entry in the hash table and set value to a new memory block */
-int inthash_write(inthash hashtable,char* name,long int value); /* Overwrite/add entry in the hash table */
-int inthash_inc(inthash hashtable,char* name); /* Increment entry in the hash table */
-/* End of hash functions: */
-
-
#endif