summaryrefslogtreecommitdiff
path: root/src/htshash.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-10 19:08:05 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-10 19:08:05 +0000
commit917d6bd3c44476d032f40b61b6e49ce2ea76494e (patch)
tree419ba75e9d21462bed0324ad877a068f38de96bf /src/htshash.c
parenta085b2b2fa78158c9c60debb9c2f8d813ea528ae (diff)
Better logging for hashtables
Diffstat (limited to 'src/htshash.c')
-rw-r--r--src/htshash.c12
1 files changed, 10 insertions, 2 deletions
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,