From 917d6bd3c44476d032f40b61b6e49ce2ea76494e Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sat, 10 May 2014 19:08:05 +0000 Subject: Better logging for hashtables --- src/htshash.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/htshash.c') diff --git a/src/htshash.c b/src/htshash.c index 15af190..7bdf782 100644 --- a/src/htshash.c +++ b/src/htshash.c @@ -34,11 +34,11 @@ Please visit our Website: http://www.httrack.com /* Internal engine bytecode */ #define HTS_INTERNAL_BYTECODE +#include "htsopt.h" #include "htshash.h" /* specific definitions */ #include "htsbase.h" -#include "htsopt.h" #include "htsglobal.h" #include "htsmd5.h" #include "htscore.h" @@ -171,12 +171,20 @@ static int key_former_adrfil_equals(void *arg, const char *a, const char *b) { return key_adrfil_equals_generic(arg, a, b, 1); } -void hash_init(hash_struct * hash, int normalized) { +void hash_init(httrackp *opt, hash_struct * hash, int normalized) { hash->sav = inthash_new(0); hash->adrfil = inthash_new(0); hash->former_adrfil = inthash_new(0); hash->normalized = normalized; + hts_set_hash_handler(hash->sav, opt); + hts_set_hash_handler(hash->adrfil, opt); + hts_set_hash_handler(hash->former_adrfil, opt); + + inthash_set_name(hash->sav, "hash->sav"); + inthash_set_name(hash->adrfil, "hash->adrfil"); + inthash_set_name(hash->former_adrfil, "hash->former_adrfil"); + /* Case-insensitive comparison ; keys are direct char* filenames */ inthash_value_set_key_handler(hash->sav, key_duphandler, -- cgit v1.2.3