170 if (S_ISDIR(pa->
mode) != S_ISDIR(pb->
mode))
171 return S_ISDIR(pa->
mode) ? -1 : 1;
173 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.
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.
Convenience wrapper for the core headers.
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_count_new(const void *a, const void *b, void *sdata)
Compare two browser entries by their new count - Implements sort_t -.
static int browser_sort_order(const void *a, const void *b, void *sdata)
Compare two browser entries by their order - 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_subject(const void *a, const void *b, void *sdata)
Compare two browser entries by their subject - 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)
#define SORT_MASK
Mask for the sort id.
SortType
Methods for sorting.
@ SORT_SUBJECT
Sort by the email's subject.
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
@ SORT_SIZE
Sort by the size of the email.
@ SORT_DESC
Sort by the folder's description.
@ SORT_DATE
Sort by the date the email was sent.
@ SORT_COUNT
Sort by number of emails in a folder.
@ SORT_UNREAD
Sort by the number of unread emails.
#define SORT_REVERSE
Reverse the order of the sort.
Assorted sorting methods.
#define mutt_numeric_cmp(a, b)
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.