* please see the file GPL in the top level source directory.
*/
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/str.h>
+#include <lib-ui/lib-ui.h>
#include "mutt.h"
+#include "alias.h"
#include "sort.h"
#include "thread.h"
+#include "score.h"
#include "mutt_idna.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-
#define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x
/* function to use as discriminator when normal sort method is equal */
if (!code) \
code = (*((HEADER **)a))->index - (*((HEADER **)b))->index;
-int compare_score (const void *a, const void *b)
+static int compare_score (const void *a, const void *b)
{
HEADER **pa = (HEADER **) a;
HEADER **pb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_size (const void *a, const void *b)
+static int compare_size (const void *a, const void *b)
{
HEADER **pa = (HEADER **) a;
HEADER **pb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_date_sent (const void *a, const void *b)
+static int compare_date_sent (const void *a, const void *b)
{
HEADER **pa = (HEADER **) a;
HEADER **pb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_subject (const void *a, const void *b)
+static int compare_subject (const void *a, const void *b)
{
HEADER **pa = (HEADER **) a;
HEADER **pb = (HEADER **) b;
const char *mutt_get_name (address_t * a)
{
- address_t *ali;
+ const address_t *ali;
const char *name = "";
if (a) {
return name;
}
-int compare_to (const void *a, const void *b)
+static int compare_to (const void *a, const void *b)
{
HEADER **ppa = (HEADER **) a;
HEADER **ppb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_from (const void *a, const void *b)
+static int compare_from (const void *a, const void *b)
{
HEADER **ppa = (HEADER **) a;
HEADER **ppb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_date_received (const void *a, const void *b)
+static int compare_date_received (const void *a, const void *b)
{
HEADER **pa = (HEADER **) a;
HEADER **pb = (HEADER **) b;
return (SORTCODE (result));
}
-int compare_order (const void *a, const void *b)
+static int compare_order (const void *a, const void *b)
{
HEADER **ha = (HEADER **) a;
HEADER **hb = (HEADER **) b;
return (SORTCODE ((*ha)->index - (*hb)->index));
}
-int compare_spam (const void *a, const void *b)
+static int compare_spam (const void *a, const void *b)
{
HEADER **ppa = (HEADER **) a;
HEADER **ppb = (HEADER **) b;
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);
}