NeoMutt  2020-09-25
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 <sys/types.h>
29 #include "config/lib.h"
30 #include "options.h" // IWYU pragma: keep
31 #include "where.h"
32 
33 struct Address;
34 struct Mailbox;
35 struct ThreadsContext;
36 
37 /* These Config Variables are only used in sort.c */
38 extern bool C_ReverseAlias;
39 
40 #define SORT_CODE(x) ((OptAuxSort ? C_SortAux : C_Sort) & SORT_REVERSE) ? -(x) : x
41 
50 typedef int (*sort_t)(const void *a, const void *b);
51 
53 
54 void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize);
55 int perform_auxsort(int retval, const void *a, const void *b);
56 
57 const char *mutt_get_name(const struct Address *a);
58 
59 /* These variables are backing for config items */
60 WHERE short C_Sort;
62 
63 #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
SortType
Methods for sorting.
Definition: sort2.h:44
The "current" threading state.
Definition: mutt_thread.c:61
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:60
int(* sort_t)(const void *a, const void *b)
Prototype for a function to compare two emails.
Definition: sort.h:50
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:157
WHERE short C_SortAux
Config: Secondary sort method for the index.
Definition: sort.h:61
int perform_auxsort(int retval, const void *a, const void *b)
Compare two emails using the auxiliary sort method.
Definition: sort.c:65
A mailbox.
Definition: mailbox.h:81
sort_t mutt_get_sort_func(enum SortType method)
Get the sort function for a given sort id.
Definition: sort.c:324
void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize)
Sort emails by their headers.
Definition: sort.c:366
An evil macro.
Handling of global boolean variables.