diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-12 13:42:55 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-12 13:42:55 +0000 |
commit | 4e903579b22f3698934294370f076119576041ab (patch) | |
tree | b2007c09c0994a8a3c2d1aba4c8c04ae540daf9a /src/htscore.c | |
parent | e77141ceaefb55f427edcfb777f5f1a96b885583 (diff) |
Big cleanup in core heap hashtable code, rewritten using new fancy hashtables.
Diffstat (limited to 'src/htscore.c')
-rw-r--r-- | src/htscore.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/htscore.c b/src/htscore.c index fd4e9ff..8c86914 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -229,7 +229,7 @@ strcpybuff(liens[lien_tot]->adr,A); \ strcpybuff(liens[lien_tot]->fil,F); \ strcpybuff(liens[lien_tot]->sav,S); \ liens_record_sav_len(liens[lien_tot]); \ -hash_write(hashptr,lien_tot,NORM); \ +hash_write(hashptr,lien_tot); \ } \ } @@ -449,7 +449,7 @@ int httpmirror(char *url1, httrackp * opt) { lien_tot = 0; // initialiser hachage - hash_init(&hash); + hash_init(&hash, opt->urlhack); // note: we need a cast because of the const hash.liens = (const lien_url **) liens; @@ -3224,12 +3224,12 @@ int back_fill(struct_back * sback, httrackp * opt, cache_back * cache, // Why in hell did I do that ? //if (ok && liens[p]->sav != NULL && liens[p]->sav[0] != '\0' - // && hash_read(opt->hash,liens[p]->sav,"",0,opt->urlhack) >= 0) // lookup in liens_record + // && hash_read(opt->hash,liens[p]->sav,NULL,HASH_STRUCT_FILENAME ) >= 0) // lookup in liens_record //{ // ok = 0; //} if (liens[p]->sav == NULL || liens[p]->sav[0] == '\0' - || hash_read(opt->hash, liens[p]->sav, "", 0, opt->urlhack) < 0) { + || hash_read(opt->hash, liens[p]->sav, NULL, HASH_STRUCT_FILENAME ) < 0) { ok = 0; } // note: si un backing est fini, il reste en mémoire jusqu'à ce que @@ -3766,7 +3766,7 @@ int htsAddLink(htsmoduleStruct * str, char *link) { // // On part de la fin et on essaye de se presser (économise temps machine) { - int i = hash_read(hashptr, save, "", 0, opt->urlhack); // lecture type 0 (sav) + int i = hash_read(hashptr, save, NULL, HASH_STRUCT_FILENAME ); // lecture type 0 (sav) if (i >= 0) { liens[i]->depth = maximum(liens[i]->depth, prio_fix); |