summaryrefslogtreecommitdiff
path: root/src/htscore.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-06-23 19:40:47 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-06-23 19:40:47 +0000
commit0817df2fb67e3a2be95b311c4c2d42d2a1e1bc41 (patch)
tree25123b396b822a7c2219eb3456eef3dfd9a6462a /src/htscore.c
parentf42a5fa5dd4b5b8b91b66e7b47602be12aa298b2 (diff)
Trashed historical link heap hashtable, and replaced it by cleaner code using new cuckoo hashtables
I can not believe I kept such a terible and frightening code for such a long time, geez.
Diffstat (limited to 'src/htscore.c')
-rw-r--r--src/htscore.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/htscore.c b/src/htscore.c
index 9aaf285..5170148 100644
--- a/src/htscore.c
+++ b/src/htscore.c
@@ -449,15 +449,13 @@ int httpmirror(char *url1, httrackp * opt) {
// initialiser ptr et lien_tot
ptr = 0;
lien_tot = 0;
+
// initialiser hachage
- {
- int i;
+ hash_init(&hash);
+ hash.liens = liens;
- for(i = 0; i < HTS_HASH_SIZE; i++)
- hash.hash[0][i] = hash.hash[1][i] = hash.hash[2][i] = -1; // pas d'entrées
- hash.liens = liens;
- hash.max_lien = 0;
- }
+ // we need it
+ opt->liens = liens;
// copier adresse(s) dans liste des adresses
{