NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
sort.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_SORT_H
25 #define MUTT_SORT_H
26 
27 #include <stdbool.h>
28 #include "config/lib.h"
29 #include "options.h"
30 #include "where.h"
31 
32 struct Address;
33 struct Context;
34 
35 /* These Config Variables are only used in sort.c */
36 extern bool C_ReverseAlias;
37 
38 #define SORT_CODE(x) ((OptAuxSort ? C_SortAux : C_Sort) & SORT_REVERSE) ? -(x) : x
39 
48 typedef int sort_t(const void *a, const void *b);
49 
50 sort_t *mutt_get_sort_func(enum SortType method);
51 
52 void mutt_sort_headers(struct Context *ctx, bool init);
53 int perform_auxsort(int retval, const void *a, const void *b);
54 
55 const char *mutt_get_name(const struct Address *a);
56 
57 /* These variables are backing for config items */
58 WHERE short C_Sort;
60 
61 /* FIXME: This one does not belong to here */
63 
64 #endif /* MUTT_SORT_H */
bool C_ReverseAlias
Config: Display the alias in the index, rather than the message&#39;s sender.
Definition: sort.c:51
The "current" mailbox.
Definition: context.h:36
int sort_t(const void *a, const void *b)
typedef sort_t - Prototype for a function to compare two emails
Definition: sort.h:48
An email address.
Definition: address.h:34
#define WHERE
Definition: where.h:30
Convenience wrapper for the config headers.
WHERE short C_Sort
Config: Sort method for the index.
Definition: sort.h:58
sort_t * mutt_get_sort_func(enum SortType method)
Get the sort function for a given sort id.
Definition: sort.c:322
void mutt_sort_headers(struct Context *ctx, bool init)
Sort emails by their headers.
Definition: sort.c:362
WHERE short C_PgpSortKeys
Config: Sort order for PGP keys.
Definition: sort.h:62
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:155
WHERE short C_SortAux
Config: Secondary sort method for the index.
Definition: sort.h:59
int perform_auxsort(int retval, const void *a, const void *b)
Compare two emails using the auxiliary sort method.
Definition: sort.c:65
An evil macro.
SortType
Methods for sorting.
Definition: sort.h:48
Handling of global boolean variables.