NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
sort.h
Go to the documentation of this file.
1
25#ifndef MUTT_SORT_H
26#define MUTT_SORT_H
27
28#include <stdbool.h>
29#include "core/lib.h"
30
31struct Address;
32struct Email;
33struct MailboxView;
34
35#define mutt_numeric_cmp(a,b) ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0))
36
49typedef int (*sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse);
50
51int mutt_compare_emails(const struct Email *a, const struct Email *b,
52 enum MailboxType type, short sort, short sort_aux);
53
54void mutt_sort_headers(struct MailboxView *mv, bool init);
55void mutt_sort_order(struct Mailbox *m);
56
57const char *mutt_get_name(const struct Address *a);
58
59#endif /* MUTT_SORT_H */
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
Definition: mailbox.h:41
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:324
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:134
int(* sort_mail_t)(const struct Email *a, const struct Email *b, bool reverse)
Definition: sort.h:49
void mutt_sort_order(struct Mailbox *m)
Sort emails by their disk order.
Definition: sort.c:444
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
Definition: sort.c:350
An email address.
Definition: address.h:36
The envelope/body of an email.
Definition: email.h:39
View of a Mailbox.
Definition: mview.h:40
A mailbox.
Definition: mailbox.h:79