NeoMutt  2021-02-05-666-ge300cd
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 "core/lib.h"
30 #include "options.h" // IWYU pragma: keep
31 
32 struct Address;
33 struct Email;
34 struct ThreadsContext;
35 
44 typedef int (*sort_t)(const void *a, const void *b);
45 
55 typedef int (*sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse);
56 
57 int mutt_compare_emails(const struct Email *a, const struct Email *b,
58  enum MailboxType type, short sort, short sort_aux);
59 
60 void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize);
61 
62 const char *mutt_get_name(const struct Address *a);
63 
64 #endif /* MUTT_SORT_H */
The envelope/body of an email.
Definition: email.h:37
The "current" threading state.
Definition: mutt_thread.c:49
An email address.
Definition: address.h:35
int(* sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse)
Prototype for comparing two emails.
Definition: sort.h:55
Convenience wrapper for the core headers.
int(* sort_t)(const void *a, const void *b)
Prototype for generic comparison function, compatible with qsort.
Definition: sort.h:44
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:136
A mailbox.
Definition: mailbox.h:81
void mutt_sort_headers(struct Mailbox *m, struct ThreadsContext *threads, bool init, off_t *vsize)
Sort emails by their headers.
Definition: sort.c:356
MailboxType
Supported mailbox formats.
Definition: mailbox.h:43
int mutt_compare_emails(const struct Email *a, const struct Email *b, enum MailboxType type, short sort, short sort_aux)
Compare two emails using up to two sort methods.
Definition: sort.c:328
Handling of global boolean variables.