diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-06-24 20:06:12 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-06-24 20:06:12 +0000 |
commit | 9090ee17b364f44a8df75f927b26c6e352ef9fff (patch) | |
tree | 1bcaabe45742f7e3492ed0c7f3e205cd3e7ed849 /src/htshash.h | |
parent | 9e61bc36f3a3d15375b11321893dd27cd7d4b88b (diff) |
Hashtable fixes
MD5 is temporarily back until some better hash function is found (current LCG is too lame and prone to collisions)
Diffstat (limited to 'src/htshash.h')
-rw-r--r-- | src/htshash.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/htshash.h b/src/htshash.h index 2b0d9bd..62ea118 100644 --- a/src/htshash.h +++ b/src/htshash.h @@ -44,12 +44,19 @@ Please visit our Website: http://www.httrack.com typedef struct hash_struct hash_struct; #endif +/** Type of hash. **/ +typedef enum hash_struct_type { + HASH_STRUCT_FILENAME = 0, + HASH_STRUCT_ADR_PATH, + HASH_STRUCT_ORIGINAL_ADR_PATH +} hash_struct_type; + // tables de hachage void hash_init(hash_struct * hash); int hash_read(const hash_struct * hash, const char *nom1, const char *nom2, - int type, int normalized); + hash_struct_type type, int normalized); void hash_write(hash_struct * hash, int lpos, int normalized); -int *hash_calc_chaine(hash_struct * hash, int type, int pos); +int *hash_calc_chaine(hash_struct * hash, hash_struct_type type, int pos); unsigned long int hash_cle(const char *nom1, const char *nom2); #endif |