summaryrefslogtreecommitdiff
path: root/src/htshash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/htshash.c')
-rw-r--r--src/htshash.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/htshash.c b/src/htshash.c
index 1ac20ee..daf987c 100644
--- a/src/htshash.c
+++ b/src/htshash.c
@@ -57,7 +57,6 @@ Please visit our Website: http://www.httrack.com
// GESTION DES TABLES DE HACHAGE
// Méthode à 2 clés (adr+fil), 2e cle facultative
// hash[no_enregistrement][pos]->hash est un index dans le tableau général liens
-// #define HTS_HASH_SIZE 8191 (premier si possible!)
// type: numero enregistrement - 0 est case insensitive (sav) 1 (adr+fil) 2 (former_adr+former_fil)
// recherche dans la table selon nom1,nom2 et le no d'enregistrement
@@ -67,6 +66,14 @@ void hash_init(hash_struct * hash) {
hash->former_adrfil = inthash_new(0);
}
+void hash_free(hash_struct *hash) {
+ if (hash != NULL) {
+ inthash_delete(&hash->sav);
+ inthash_delete(&hash->adrfil);
+ inthash_delete(&hash->former_adrfil);
+ }
+}
+
static char * normalize_key(const char *nom1, const char *nom2,
hash_struct_type type, int normalized,
char *normfil_, char *catbuff) {