X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=thread.c;h=f66afba0a7aefa1b36687be0b886c4408e05f3c6;hb=51239e43fd4a3c2440b4574379e8525d75646b3e;hp=09bd9159da9845c3c9f5405195b3f61352339b19;hpb=1ee89902de184a640c171ae3285bff6882a791bd;p=apps%2Fmadmutt.git diff --git a/thread.c b/thread.c index 09bd915..f66afba 100644 --- a/thread.c +++ b/thread.c @@ -689,7 +689,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init) init = 1; if (init) - ctx->thread_hash = hash_create (ctx->msgcount * 2); + ctx->thread_hash = hash_create (ctx->msgcount * 2, 1); /* we want a quick way to see if things are actually attached to the top of the * thread tree or if they're just dangling, so we attach everything to a top @@ -754,7 +754,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init) cur->thread = thread; hash_insert (ctx->thread_hash, cur->env->message_id ? cur->env->message_id : "", - thread, 1); + thread); if (new) { if (new->duplicate_thread) @@ -830,7 +830,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init) if ((new = hash_find (ctx->thread_hash, ref->data)) == NULL) { new = p_new(THREAD, 1); - hash_insert (ctx->thread_hash, ref->data, new, 1); + hash_insert (ctx->thread_hash, ref->data, new); } else { if (new->duplicate_thread) @@ -1196,12 +1196,12 @@ HASH *mutt_make_id_hash (CONTEXT * ctx) HEADER *hdr; HASH *hash; - hash = hash_create (ctx->msgcount * 2); + hash = hash_create (ctx->msgcount * 2, 0); for (i = 0; i < ctx->msgcount; i++) { hdr = ctx->hdrs[i]; if (hdr->env->message_id) - hash_insert (hash, hdr->env->message_id, hdr, 0); + hash_insert (hash, hdr->env->message_id, hdr); } return hash; @@ -1213,18 +1213,18 @@ HASH *mutt_make_subj_hash (CONTEXT * ctx) HEADER *hdr; HASH *hash; - hash = hash_create (ctx->msgcount * 2); + hash = hash_create (ctx->msgcount * 2, 1); for (i = 0; i < ctx->msgcount; i++) { hdr = ctx->hdrs[i]; if (hdr->env->real_subj) - hash_insert (hash, hdr->env->real_subj, hdr, 1); + hash_insert(hash, hdr->env->real_subj, hdr); } return hash; } -static void clean_references (THREAD * brk, THREAD * cur) +static void clean_references (THREAD * tbrk, THREAD * cur) { THREAD *p; string_list_t *ref = NULL; @@ -1232,7 +1232,7 @@ static void clean_references (THREAD * brk, THREAD * cur) for (; cur; cur = cur->next, done = 0) { /* parse subthread recursively */ - clean_references (brk, cur->child); + clean_references (tbrk, cur->child); if (!cur->message) break; /* skip pseudo-message */ @@ -1240,7 +1240,7 @@ static void clean_references (THREAD * brk, THREAD * cur) /* Looking for the first bad reference according to the new threading. * Optimal since Mutt stores the references in reverse order, and the * first loop should match immediatly for mails respecting RFC2822. */ - for (p = brk; !done && p; p = p->parent) + for (p = tbrk; !done && p; p = p->parent) for (ref = cur->message->env->references; p->message && ref; ref = ref->next) if (!m_strcasecmp(ref->data, p->message->env->message_id)) {