NeoMutt  2021-02-05-89-gabe350
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 */
ThreadsContext
The "current" threading state.
Definition: mutt_thread.c:61
Mailbox
A mailbox.
Definition: mailbox.h:81
perform_auxsort
int perform_auxsort(int retval, const void *a, const void *b)
Compare two emails using the auxiliary sort method.
Definition: sort.c:66
SortType
SortType
Methods for sorting.
Definition: sort2.h:43
options.h
sort_t
int(* sort_t)(const void *a, const void *b)
Prototype for a function to compare two emails.
Definition: sort.h:50
lib.h
WHERE
#define WHERE
Definition: where.h:30
mutt_get_name
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:158
C_Sort
WHERE short C_Sort
Config: Sort method for the index.
Definition: sort.h:60
C_ReverseAlias
bool C_ReverseAlias
Config: Display the alias in the index, rather than the message's sender.
Definition: sort.c:52
where.h
mutt_sort_headers
void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize)
Sort emails by their headers.
Definition: sort.c:367
C_SortAux
WHERE short C_SortAux
Config: Secondary sort method for the index.
Definition: sort.h:61
mutt_get_sort_func
sort_t mutt_get_sort_func(enum SortType method)
Get the sort function for a given sort id.
Definition: sort.c:325
Address
An email address.
Definition: address.h:34