Prototype for generic comparison function, compatible with qsort_r() More...
Functions | |
static int | alias_sort_alias (const void *a, const void *b, void *sdata) |
Compare two Aliases by their short names - Implements sort_t -. | |
static int | alias_sort_email (const void *a, const void *b, void *sdata) |
Compare two Aliases by their Email Addresses - Implements sort_t -. | |
static int | alias_sort_name (const void *a, const void *b, void *sdata) |
Compare two Aliases by their Names - Implements sort_t -. | |
static int | alias_sort_unsorted (const void *a, const void *b, void *sdata) |
Compare two Aliases by their original configuration position - Implements sort_t -. | |
static int | browser_sort_subject (const void *a, const void *b, void *sdata) |
Compare two browser entries by their subject - Implements sort_t -. | |
static int | browser_sort_unsorted (const void *a, const void *b, void *sdata) |
Compare two browser entries by their order - Implements sort_t -. | |
static int | browser_sort_desc (const void *a, const void *b, void *sdata) |
Compare two browser entries by their descriptions - Implements sort_t -. | |
static int | browser_sort_date (const void *a, const void *b, void *sdata) |
Compare two browser entries by their date - Implements sort_t -. | |
static int | browser_sort_size (const void *a, const void *b, void *sdata) |
Compare two browser entries by their size - Implements sort_t -. | |
static int | browser_sort_count (const void *a, const void *b, void *sdata) |
Compare two browser entries by their message count - Implements sort_t -. | |
static int | browser_sort_new (const void *a, const void *b, void *sdata) |
Compare two browser entries by their new count - Implements sort_t -. | |
static int | browser_sort_helper (const void *a, const void *b, void *sdata) |
Helper to sort the items in the browser - Implements sort_t -. | |
static int | envlist_sort (const void *a, const void *b, void *sdata) |
Compare two environment strings - Implements sort_t -. | |
static int | label_sort (const void *a, const void *b, void *sdata) |
Compare two label strings - Implements sort_t -. | |
int | elem_list_sort (const void *a, const void *b, void *sdata) |
Compare two HashElem pointers to config - Implements sort_t -. | |
static int | commands_sort (const void *a, const void *b, void *sdata) |
Compare two commands by name - Implements sort_t -. | |
static int | email_sort_shim (const void *a, const void *b, void *sdata) |
Helper to sort emails - Implements sort_t -. | |
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 -. | |
static int | imap_sort_email_uid (const void *a, const void *b, void *sdata) |
Compare two Emails by UID - Implements sort_t -. | |
int | imap_sort_uid (const void *a, const void *b, void *sdata) |
Compare two UIDs - Implements sort_t -. | |
static int | maildir_sort_inode (const void *a, const void *b, void *sdata) |
Compare two Maildirs by inode number - Implements sort_t -. | |
static int | maildir_sort_flags (const void *a, const void *b, void *sdata) |
Compare two flag characters - Implements sort_t -. | |
static int | mh_sort_path (const void *a, const void *b, void *sdata) |
Compare two Mh Mailboxes by path - Implements sort_t -. | |
int | mutt_str_inbox_cmp (const char *a, const char *b) |
Do two folders share the same path and one is an inbox -. | |
static int | compare_threads (const void *a, const void *b, void *sdata) |
Helper to sort email threads - Implements sort_t -. | |
static int | crypt_sort_address (const void *a, const void *b, void *sdata) |
Compare two keys by their addresses - Implements sort_t -. | |
static int | crypt_sort_keyid (const void *a, const void *b, void *sdata) |
Compare two keys by their IDs - Implements sort_t -. | |
static int | crypt_sort_date (const void *a, const void *b, void *sdata) |
Compare two keys by their dates - Implements sort_t -. | |
static int | crypt_sort_trust (const void *a, const void *b, void *sdata) |
Compare two keys by their trust levels - Implements sort_t -. | |
static int | pgp_sort_address (const void *a, const void *b, void *sdata) |
Compare two keys by their addresses - Implements sort_t -. | |
static int | pgp_sort_date (const void *a, const void *b, void *sdata) |
Compare two keys by their dates - Implements sort_t -. | |
static int | pgp_sort_keyid (const void *a, const void *b, void *sdata) |
Compare two keys by their IDs - Implements sort_t -. | |
static int | pgp_sort_trust (const void *a, const void *b, void *sdata) |
Compare two keys by their trust levels - Implements sort_t -. | |
static int | sb_sort_count (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by count - Implements sort_t -. | |
static int | sb_sort_desc (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by description - Implements sort_t -. | |
static int | sb_sort_flagged (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by flagged - Implements sort_t -. | |
static int | sb_sort_path (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by path - Implements sort_t -. | |
static int | sb_sort_unread (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by unread - Implements sort_t -. | |
static int | sb_sort_unsorted (const void *a, const void *b, void *sdata) |
Compare two Sidebar entries by order of creation - Implements sort_t -. | |
Prototype for generic comparison function, compatible with qsort_r()
a | First item |
b | Second item |
sdata | Private data |
<0 | a precedes b |
0 | a and b are identical |
>0 | b precedes a |
|
static |
Compare two Aliases by their short names - Implements sort_t -.
Definition at line 46 of file sort.c.
|
static |
Compare two Aliases by their Email Addresses - Implements sort_t -.
Definition at line 67 of file sort.c.
|
static |
Compare two Aliases by their Names - Implements sort_t -.
Definition at line 128 of file sort.c.
|
static |
Compare two Aliases by their original configuration position - Implements sort_t -.
Definition at line 189 of file sort.c.
|
static |
Compare two browser entries by their subject - Implements sort_t -.
Definition at line 55 of file sort.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Helper to sort the items in the browser - Implements sort_t -.
Wild compare function that calls the others. It's useful because it provides a way to tell "../" is always on the top of the list, independently of the sort method. $browser_sort_dirs_first is also handled here.
Definition at line 159 of file sort.c.
|
static |
Compare two environment strings - Implements sort_t -.
Definition at line 910 of file commands.c.
|
static |
int elem_list_sort | ( | const void * | a, |
const void * | b, | ||
void * | sdata | ||
) |
Compare two HashElem pointers to config - Implements sort_t -.
Definition at line 63 of file subset.c.
|
static |
Compare two commands by name - Implements sort_t -.
Definition at line 40 of file command.c.
|
static |
Helper to sort emails - Implements sort_t -.
Definition at line 69 of file sort.c.
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 -.
a | First email |
b | Second email |
type | Mailbox type |
sort | Primary sort to use (generally $sort) |
sort_aux | Secondary sort (generally $sort_aux or EMAIL_SORT_UNSORTED) |
<0 | a precedes b |
0 | a and b are identical (should not happen in practice) |
>0 | b precedes a |
Definition at line 329 of file sort.c.
|
static |
Compare two Emails by UID - Implements sort_t -.
Definition at line 899 of file imap.c.
int imap_sort_uid | ( | const void * | a, |
const void * | b, | ||
void * | sdata | ||
) |
|
static |
|
static |
|
static |
int mutt_str_inbox_cmp | ( | const char * | a, |
const char * | b | ||
) |
Do two folders share the same path and one is an inbox -.
a | First path |
b | Second path |
-1 | a is INBOX of b |
0 | None is INBOX |
1 | b is INBOX for a |
This function compares two folder paths. It first looks for the position of the last common '/' character. If a valid position is found and it's not the last character in any of the two paths, the remaining parts of the paths are compared (case insensitively) with the string "INBOX" followed by a non alpha character, e.g., '.' or '/'. If only one of the two paths matches, it's reported as being less than the other and the function returns -1 (a < b) or 1 (a > b). If both or no paths match the requirements, the two paths are considered equivalent and this function returns 0.
Examples:
Definition at line 887 of file string.c.
|
static |
Helper to sort email threads - Implements sort_t -.
Definition at line 749 of file mutt_thread.c.
|
static |
Compare two keys by their addresses - Implements sort_t -.
Definition at line 43 of file sort_gpgme.c.
|
static |
Compare two keys by their IDs - Implements sort_t -.
Definition at line 62 of file sort_gpgme.c.
|
static |
Compare two keys by their dates - Implements sort_t -.
Definition at line 81 of file sort_gpgme.c.
|
static |
Compare two keys by their trust levels - Implements sort_t -.
Definition at line 117 of file sort_gpgme.c.
|
static |
Compare two keys by their addresses - Implements sort_t -.
Definition at line 43 of file sort_pgp.c.
|
static |
Compare two keys by their dates - Implements sort_t -.
Definition at line 62 of file sort_pgp.c.
|
static |
Compare two keys by their IDs - Implements sort_t -.
Definition at line 81 of file sort_pgp.c.
|
static |
Compare two keys by their trust levels - Implements sort_t -.
Definition at line 100 of file sort_pgp.c.
|
static |
Compare two Sidebar entries by count - Implements sort_t -.
Definition at line 44 of file sort.c.
|
static |
|
static |
Compare two Sidebar entries by flagged - Implements sort_t -.
Definition at line 79 of file sort.c.
|
static |
Compare two Sidebar entries by path - Implements sort_t -.
Definition at line 99 of file sort.c.
|
static |
Compare two Sidebar entries by unread - Implements sort_t -.
Definition at line 118 of file sort.c.
|
static |