X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=sort.c;h=3e60387f4ba457479701ff3454869c88ac54f6be;hb=45528548fd2dddcbef9396b0589ec88d722766ee;hp=38e9d871ef0cd394741ff5d72fd3a924f5af7eb5;hpb=d4321859bb9ce5b43fbd8303394cf98ae7720a38;p=apps%2Fmadmutt.git diff --git a/sort.c b/sort.c index 38e9d87..3e60387 100644 --- a/sort.c +++ b/sort.c @@ -7,24 +7,16 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include +#include #include "mutt.h" +#include "alias.h" #include "sort.h" #include "thread.h" #include "mutt_idna.h" - -#include -#include -#include -#include - #define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x /* function to use as discriminator when normal sort method is equal */ @@ -90,11 +82,11 @@ int compare_subject (const void *a, const void *b) const char *mutt_get_name (address_t * a) { - address_t *ali; + const address_t *ali; const char *name = ""; if (a) { - if (option (OPTREVALIAS) && (ali = alias_reverse_lookup(Aliases, a)) + if (option (OPTREVALIAS) && (ali = alias_reverse_lookup(a)) && ali->personal) name = ali->personal; else if (a->personal)