71  const struct Email *ea = *(
struct Email const *
const *) a;
 
   72  const struct Email *eb = *(
struct Email const *
const *) b;
 
 
   83  return reverse ? -result : result;
 
 
   92  return reverse ? -result : result;
 
 
  101  return reverse ? -result : result;
 
 
  126  return reverse ? -rc : rc;
 
 
  162  char fa[128] = { 0 };
 
  167  return reverse ? -result : result;
 
 
  175  char fa[128] = { 0 };
 
  180  return reverse ? -result : result;
 
 
  189  return reverse ? -result : result;
 
 
  198  return reverse ? -result : result;
 
 
  206  char *aptr = NULL, *bptr = NULL;
 
  218    return reverse ? -1 : 1;
 
  220    return reverse ? 1 : -1;
 
  232  result = ((difference < 0.0) ? -1 : (difference > 0.0) ? 1 : 0);
 
  239    return reverse ? -result : result;
 
  247  return reverse ? -result : result;
 
 
  255  int ahas, bhas, result = 0;
 
  265    return reverse ? 1 : -1;
 
  267    return reverse ? -1 : 1;
 
  275  return reverse ? -result : result;
 
 
  312      mutt_error(
_(
"Could not find sorting function [report this bug]"));
 
 
  345    rc = func(a, b, 
false);
 
 
const char * mutt_addr_for_display(const struct Address *a)
Convert an Address for display purposes.
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
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.
MailboxType
Supported mailbox formats.
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Representation of the body of an email.
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
bool OptNeedRescore
(pseudo) set when the 'score' command is used
bool OptResortInit
(pseudo) used to force the next resort to be from scratch
static sort_email_t get_sort_func(enum EmailSortType method, enum MailboxType type)
Get the sort function for a given sort id.
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
bool OptNeedResort
(pseudo) used to force a re-sort
void mutt_sort_unsorted(struct Mailbox *m)
Sort emails by their disk order.
Assorted sorting methods.
int(* sort_email_t)(const struct Email *a, const struct Email *b, bool reverse)
EmailSortType
Methods for sorting Emails.
@ EMAIL_SORT_LABEL
Sort by the emails label.
@ EMAIL_SORT_DATE_RECEIVED
Sort by when the message were delivered locally.
@ EMAIL_SORT_SPAM
Sort by the email's spam score.
@ EMAIL_SORT_SCORE
Sort by the email's score.
@ EMAIL_SORT_DATE
Sort by the date the email was sent.
@ EMAIL_SORT_SUBJECT
Sort by the email's subject.
@ EMAIL_SORT_FROM
Sort by the email's From field.
@ EMAIL_SORT_UNSORTED
Sort by the order the messages appear in the mailbox.
@ EMAIL_SORT_SIZE
Sort by the size of the email.
@ EMAIL_SORT_TO
Sort by the email's To field.
Representation of an email.
Representation of an email header (envelope)
#define mutt_message(...)
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 email_sort_shim(const void *a, const void *b, void *sdata)
Helper to sort emails - Implements sort_t -.
static int email_sort_date(const struct Email *a, const struct Email *b, bool reverse)
Compare the sent date of two emails - Implements sort_email_t -.
int nntp_sort_unsorted(const struct Email *a, const struct Email *b, bool reverse)
Restore the 'unsorted' order of emails - Implements sort_email_t -.
static int email_sort_spam(const struct Email *a, const struct Email *b, bool reverse)
Compare the spam values of two emails - Implements sort_email_t -.
static int email_sort_size(const struct Email *a, const struct Email *b, bool reverse)
Compare the size of two emails - Implements sort_email_t -.
static int email_sort_score(const struct Email *a, const struct Email *b, bool reverse)
Compare two emails using their scores - Implements sort_email_t -.
static int email_sort_to(const struct Email *a, const struct Email *b, bool reverse)
Compare the 'to' fields of two emails - Implements sort_email_t -.
static int email_sort_subject(const struct Email *a, const struct Email *b, bool reverse)
Compare the subject of two emails - Implements sort_email_t -.
static int email_sort_from(const struct Email *a, const struct Email *b, bool reverse)
Compare the 'from' fields of two emails - Implements sort_email_t -.
static int email_sort_label(const struct Email *a, const struct Email *b, bool reverse)
Compare the labels of two emails - Implements sort_email_t -.
static int email_sort_date_received(const struct Email *a, const struct Email *b, bool reverse)
Compare the date received of two emails - Implements sort_email_t -.
static int email_sort_unsorted(const struct Email *a, const struct Email *b, bool reverse)
Restore the 'unsorted' order of emails - Implements sort_email_t -.
Convenience wrapper for the library headers.
int mutt_str_cmp(const char *a, const char *b)
Compare two strings, safely.
int mutt_istrn_cmp(const char *a, const char *b, size_t num)
Compare two strings ignoring case (to a maximum), safely.
int mutt_istr_cmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void mutt_clear_threads(struct ThreadsContext *tctx)
Clear the threading of message in a mailbox.
void mutt_thread_collapse_collapsed(struct ThreadsContext *tctx)
Re-collapse threads marked as collapsed.
void mutt_sort_threads(struct ThreadsContext *tctx, bool init)
Sort email threads.
off_t mutt_set_vnum(struct Mailbox *m)
Set the virtual index number of all the messages in a mailbox.
Create/manipulate threading in emails.
#define mutt_using_threads()
enum MailboxType mx_type(struct Mailbox *m)
Return the type of the Mailbox.
Usenet network mailbox type; talk to an NNTP server.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
#define TAILQ_FIRST(head)
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
Routines for adding user scores to emails.
struct Buffer * personal
Real name of address.
struct Buffer * mailbox
Mailbox and host address.
LOFF_T length
length (in bytes) of attachment
char * data
Pointer to data.
Context for email_sort_shim()
short sort_aux
Secondary sort.
enum MailboxType type
Current mailbox type.
The envelope/body of an email.
bool visible
Is this message part of the view?
struct Envelope * env
Envelope information.
bool collapsed
Is this message part of a collapsed thread?
struct Body * body
List of MIME parts.
bool threaded
Used for threading.
time_t date_sent
Time when the message was sent (UTC)
int vnum
Virtual message number.
int msgno
Number displayed to the user.
int index
The absolute (unsorted) message number.
time_t received
Time when the message was placed in the mailbox.
struct AddressList to
Email's 'To' list.
struct Buffer spam
Spam header.
char *const real_subj
Offset of the real subject.
struct AddressList from
Email's 'From' list.
off_t vsize
Size (in bytes) of the messages shown.
struct ThreadsContext * threads
Threads context.
struct Mailbox * mailbox
Current Mailbox.
int vcount
The number of virtual messages.
int * v2r
Mapping from virtual to real msgno.
int msg_count
Total number of messages.
struct Email ** emails
Array of Emails.
bool verbose
Display status messages?
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.