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;
return ("");
}
-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;
- const char *fa, *fb;
+ char fa[SHORT_STRING];
+ const char *fb;
int result;
- fa = safe_strdup (mutt_get_name ((*ppa)->env->to));
+ strfcpy (fa, mutt_get_name ((*ppa)->env->to), SHORT_STRING);
fb = mutt_get_name ((*ppb)->env->to);
- result = mutt_strcasecmp (fa, fb);
- FREE(&fa);
+ result = mutt_strncasecmp (fa, fb, SHORT_STRING);
AUXSORT(result,a,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;
- const char *fa, *fb;
+ char fa[SHORT_STRING];
+ const char *fb;
int result;
- fa = safe_strdup (mutt_get_name ((*ppa)->env->from));
+ strfcpy (fa, mutt_get_name ((*ppa)->env->from), SHORT_STRING);
fb = mutt_get_name ((*ppb)->env->from);
- result = mutt_strcasecmp (fa, fb);
- FREE(&fa);
+ result = mutt_strncasecmp (fa, fb, SHORT_STRING);
AUXSORT(result,a,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;