X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sort.c;h=d97535ffe0de6cfad8d0a9d11f87cb1e2d3b70c3;hp=dc1ab61fe04fb7ace7d636b2964bcdb9934d2da6;hb=16be8d10413bbcf822577afd4019d65aba7459e0;hpb=a3279f2d891e671cdc7dde36a48572b5572058f2 diff --git a/sort.c b/sort.c index dc1ab61..d97535f 100644 --- a/sort.c +++ b/sort.c @@ -9,12 +9,13 @@ #include -#include +#include #include "mutt.h" #include "alias.h" #include "sort.h" #include "thread.h" +#include "score.h" #include "mutt_idna.h" #define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x @@ -152,18 +153,8 @@ static int compare_order (const void *a, const void *b) { HEADER **ha = (HEADER **) a; HEADER **hb = (HEADER **) b; - -#ifdef USE_NNTP - if ((*ha)->article_num && (*hb)->article_num) { - int result = (*ha)->article_num - (*hb)->article_num; - - AUXSORT (result, a, b); - return (SORTCODE (result)); - } - else -#endif - /* no need to auxsort because you will never have equality here */ - return (SORTCODE ((*ha)->index - (*hb)->index)); + /* no need to auxsort because you will never have equality here */ + return (SORTCODE ((*ha)->index - (*hb)->index)); } static int compare_spam (const void *a, const void *b) @@ -267,7 +258,7 @@ void mutt_sort_headers (CONTEXT * ctx, int init) if (!ctx->quiet) mutt_message _("Sorting mailbox..."); - if (option (OPTNEEDRESCORE) && option (OPTSCORE)) { + if (option (OPTNEEDRESCORE) && mod_score.enable) { for (i = 0; i < ctx->msgcount; i++) mutt_score_message (ctx, ctx->hdrs[i], 1); }