171 if (S_ISDIR(pa->
mode) != S_ISDIR(pb->
mode))
172 return S_ISDIR(pa->
mode) ? -1 : 1;
174 int rc = cd->
sort_fn(a, b, NULL);
#define ARRAY_SORT(head, fn, sdata)
Sort an array.
void browser_sort(struct BrowserState *state)
Sort the entries in the browser.
@ BROWSER_SORT_ALPHA
Sort alphabetically by name.
@ BROWSER_SORT_UNSORTED
Sort into the raw order.
@ BROWSER_SORT_COUNT
Sort by total message count.
@ BROWSER_SORT_DATE
Sort by date.
@ BROWSER_SORT_NEW
Sort by count of new messages.
@ BROWSER_SORT_SIZE
Sort by size.
@ BROWSER_SORT_DESC
Sort by description.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Convenience wrapper for the config headers.
#define SORT_MASK
Mask for the sort id.
#define mutt_numeric_cmp(a, b)
#define SORT_REVERSE
Reverse the order of the sort.
Convenience wrapper for the core headers.
Structs that make up an email.
EmailSortType
Methods for sorting Emails.
bool OptNews
(pseudo) used to change reader mode
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 -.
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 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_size(const void *a, const void *b, void *sdata)
Compare two browser entries by their size - 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 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_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 -.
Convenience wrapper for the library headers.
int mutt_str_coll(const char *a, const char *b)
Collate two strings (compare using locale), safely.
int(* sort_t)(const void *a, const void *b, void *sdata)
State of the file/mailbox browser.
struct BrowserEntryArray entry
Array of files / dirs / mailboxes.
Private data for browser_sort_helper()
bool sort_dirs_first
$browser_sort_dirs_first = yes
sort_t sort_fn
Function to perform $browser_sort.
bool sort_reverse
$browser_sort contains 'reverse-'
Browser entry representing a folder/dir.
bool has_mailbox
This is a mailbox.
char * name
Name of file/dir/mailbox.
char * desc
Description of mailbox.
int gen
Unique id, used for (un)sorting.
time_t mtime
Modification time.
int msg_count
total number of messages
mode_t mode
File permissions.
int msg_unread
number of unread messages
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.