NeoMutt  2023-11-03-107-g582dc1
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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 "core/lib.h"
29
30struct Address;
31struct Email;
32struct MailboxView;
33
34#define mutt_numeric_cmp(a,b) ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0))
35
48typedef int (*sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse);
49
50int mutt_compare_emails(const struct Email *a, const struct Email *b,
51 enum MailboxType type, short sort, short sort_aux);
52
53void mutt_sort_headers(struct MailboxView *mv, bool init);
54
55const char *mutt_get_name(const struct Address *a);
56
57#endif /* MUTT_SORT_H */
Convenience wrapper for the core headers.
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:322
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:132
int(* sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse)
Definition: sort.h:48
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
Definition: sort.c:348
An email address.
Definition: address.h:36
The envelope/body of an email.
Definition: email.h:37
View of a Mailbox.
Definition: mview.h:39