104 static char padded[8];
105 static const char *long_prefixes[
DISP_MAX] = {
112 if (!c_from_chars || !c_from_chars->
chars || (c_from_chars->
len == 0))
113 return long_prefixes[disp];
119 snprintf(padded,
sizeof(padded),
"%s ", pchar);
145 struct AddressList *name = NULL;
338 struct Buffer *buf,
const char *format)
340 struct tm tm = { 0 };
346 const time_t now = e->
date_sent + offset;
348 tm.tm_gmtoff = offset;
365 const bool use_c_locale = (*fmt ==
'!');
370 for (
char *bigz = fmt; (bigz = strstr(bigz,
"%Z")); bigz += 2)
376 char out[128] = { 0 };
383 strftime(out,
sizeof(out), fmt, &tm);
494 const char *s = NULL;
518 if (reply_to && reply_to->
mailbox)
527 index_a(node, data, flags, buf);
575 char tmp[128] = { 0 };
584 index_b(node, data, flags, buf);
611 char tmp[128] = { 0 };
631 char tmp[128] = { 0 };
681 const char *cp =
NONULL(c_date_format);
698 const char *cp =
NONULL(c_date_format);
765 char tmp[128] = { 0 };
786 char tmp[128] = { 0 };
874 char tmp[128] = { 0 };
885 index_a(node, data, flags, buf);
899 bool have_tags =
true;
928 const char *s = have_tags ?
buf_string(tags) :
"";
945 char tmp[128] = { 0 };
981 char tmp[128] = { 0 };
1025 else if (is_index && threads)
1029 const char *s =
" ";
1101 char tmp[128] = { 0 };
1106 if (!c_save_address && (p = strpbrk(tmp,
"%@")))
1208 const char *wch = NULL;
1219 else if (e->
read && (msg_in_pager != e->
msgno))
1246 char tmp[128] = { 0 };
1279 c_to_chars->
chars[i] :
1319 char tmp[128] = { 0 };
1323 p = strpbrk(tmp,
"%@");
1347 char tmp[128] = { 0 };
1368 p = strpbrk(tmp,
" %@");
1460 struct Email *e_tmp = NULL;
1505 const char *ch = NULL;
1547 const char *ch = NULL;
1564 else if (e->
read && (msg_in_pager != e->
msgno))
1606 const char *ch = NULL;
1643 const char *first = NULL;
1652 else if (e->
read && (msg_in_pager != e->
msgno))
1676 const char *second = NULL;
1693 const char *third = NULL;
1704 buf_printf(buf,
"%s%s%s", first, second, third);
1795 { -1, -1, NULL, NULL },
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
const char * mutt_addr_for_display(const struct Address *a)
Convert an Address for display purposes.
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
GUI display the mailboxes in a side panel.
int mutt_count_body_parts(const struct Mailbox *m, struct Email *e, FILE *fp)
Count the MIME Body parts.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
bool buf_istr_equal(const struct Buffer *a, const struct Buffer *b)
Return if two buffers are equal, case insensitive.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Color and attribute parsing.
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
@ MT_COLOR_INDEX_SIZE
Index: size field.
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
@ MT_COLOR_INDEX_SUBJECT
Index: subject field.
@ MT_COLOR_INDEX_DATE
Index: date field.
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
@ MT_COLOR_TREE
Index: tree-drawing characters.
@ MT_COLOR_INDEX_LABEL
Index: label field.
@ MT_COLOR_INDEX_NUMBER
Index: index number.
@ MT_COLOR_INDEX_FLAGS
Index: flags field.
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
struct MbTable * cs_subset_mbtable(const struct ConfigSubset *sub, const char *name)
Get a Multibyte table config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
@ ED_MBX_MESSAGE_COUNT
Mailbox.msg_count.
@ ED_MBX_PERCENTAGE
HdrFormatInfo.pager_progress.
@ ED_MBX_MAILBOX_NAME
Mailbox, mailbox_path()
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ ED_ENVELOPE
Envelope ED_ENV_ ExpandoDataEnvelope.
@ ED_EMAIL
Email ED_EMA_ ExpandoDataEmail.
@ ED_MAILBOX
Mailbox ED_MBX_ ExpandoDataMailbox.
size_t email_size(const struct Email *e)
Compute the size of an email.
Structs that make up an email.
@ ED_EMA_ATTACHMENT_COUNT
Email, mutt_count_body_parts()
@ ED_EMA_DATE_FORMAT_LOCAL
Email.date_sent.
@ ED_EMA_TAGS_TRANSFORMED
Email.tags, driver_tags_get_transformed()
@ ED_EMA_THREAD_HIDDEN_COUNT
Email.collapsed, Email.num_hidden, ...
@ ED_EMA_DATE_FORMAT
Email.date_sent.
@ ED_EMA_THREAD_TAGS
Email.tags.
@ ED_EMA_SIZE
Body.length.
@ ED_EMA_FLAG_CHARS
Email.deleted, Email.attach_del, ...
@ ED_EMA_THREAD_NUMBER
Email, mutt_messages_in_thread()
@ ED_EMA_TO_CHARS
Email, User_is_recipient()
@ ED_EMA_BODY_CHARACTERS
Body.length.
@ ED_EMA_STRF
Email.date_sent, Email.zhours, Email.zminutes, Email.zoccident.
@ ED_EMA_COMBINED_FLAGS
Email.read, Email.old, thread_is_new(), ...
@ ED_EMA_THREAD_COUNT
Email, mutt_messages_in_thread()
@ ED_EMA_STATUS_FLAGS
Email.deleted, Email.attach_del, ...
@ ED_EMA_NUMBER
Email.msgno.
@ ED_EMA_FROM_LIST
Envelope.to, Envelope.cc.
@ ED_EMA_SCORE
Email.score.
@ ED_EMA_CRYPTO_FLAGS
Email.security, SecurityFlags.
@ ED_EMA_STRF_RECV_LOCAL
Email.received.
@ ED_EMA_STRF_LOCAL
Email.date_sent.
@ ED_EMA_LIST_OR_SAVE_FOLDER
Envelope.to, Envelope.cc, check_for_mailing_list()
@ ED_EMA_INDEX_HOOK
Mailbox, Email, mutt_idxfmt_hook()
@ ED_EMA_LINES
Email.lines.
@ ED_EMA_MESSAGE_FLAGS
Email.tagged, Email.flagged.
@ ED_ENV_SUBJECT
Envelope.subject, Envelope.disp_subj.
@ ED_ENV_NEWSGROUP
Envelope.newsgroups.
@ ED_ENV_INITIALS
Envelope.from (first)
@ ED_ENV_FROM_FULL
Envelope.from (all)
@ ED_ENV_X_COMMENT_TO
Envelope.x_comment_to.
@ ED_ENV_FROM
Envelope.from (first)
@ ED_ENV_LIST_ADDRESS
Envelope.to, Envelope.cc.
@ ED_ENV_SPAM
Envelope.spam.
@ ED_ENV_SENDER
Envelope, make_from()
@ ED_ENV_TO_ALL
Envelope.to (all)
@ ED_ENV_X_LABEL
Envelope.x_label.
@ ED_ENV_NAME
Envelope.from (first)
@ ED_ENV_CC_ALL
Envelope.cc.
@ ED_ENV_ORGANIZATION
Envelope.organization.
@ ED_ENV_REPLY_TO
Envelope.reply_to.
@ ED_ENV_LIST_EMPTY
Envelope.to, Envelope.cc.
@ ED_ENV_THREAD_X_LABEL
Envelope.x_label.
@ ED_ENV_MESSAGE_ID
Envelope.message_id.
@ ED_ENV_SENDER_PLAIN
Envelope, make_from()
@ ED_ENV_USERNAME
Envelope.from.
@ ED_ENV_THREAD_TREE
Email.tree.
@ ED_ENV_TO
Envelope.to, Envelope.cc (first)
@ ED_ENV_FIRST_NAME
Envelope.from, Envelope.to, Envelope.cc.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
long index_date_recv_local_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Local received date and time - Implements ExpandoRenderData::get_number() -.
long index_M_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Number of hidden messages - Implements ExpandoRenderData::get_number() -.
long index_C_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Index number - Implements ExpandoRenderData::get_number() -.
long index_m_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Total number of message - Implements ExpandoRenderData::get_number() -.
long index_date_local_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Local date and time - Implements ExpandoRenderData::get_number() -.
long index_D_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Local Date and time - Implements ExpandoRenderData::get_number() -.
long index_c_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Number of bytes - Implements ExpandoRenderData::get_number() -.
long index_d_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Senders Date and time - Implements ExpandoRenderData::get_number() -.
long index_X_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Number of MIME attachments - Implements ExpandoRenderData::get_number() -.
long index_l_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Number of lines - Implements ExpandoRenderData::get_number() -.
long index_E_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Number of messages thread - Implements ExpandoRenderData::get_number() -.
long index_date_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Sender's date and time - Implements ExpandoRenderData::get_number() -.
long index_e_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Thread index number - Implements ExpandoRenderData::get_number() -.
long index_N_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Index: Message score - Implements ExpandoRenderData::get_number() -.
void index_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Sent date and time - Implements ExpandoRenderData::get_string() -.
void index_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Sent local date and time - Implements ExpandoRenderData::get_string() -.
void index_n(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Author's real name - Implements ExpandoRenderData::get_string() -.
void index_format_hook(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: index-format-hook - Implements ExpandoRenderData::get_string() -.
void index_A(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Reply-to address - Implements ExpandoRenderData::get_string() -.
void index_a(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Author Address - Implements ExpandoRenderData::get_string() -.
void index_Fp(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Plain author name - Implements ExpandoRenderData::get_string() -.
void index_cr(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Number of raw bytes - Implements ExpandoRenderData::get_string() -.
void index_H(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Spam attributes - Implements ExpandoRenderData::get_string() -.
void index_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: $to_chars flag - Implements ExpandoRenderData::get_string() -.
void index_c(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Number of bytes - Implements ExpandoRenderData::get_string() -.
void index_r(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: To recipients - Implements ExpandoRenderData::get_string() -.
void index_O(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: List Name or Save folder - Implements ExpandoRenderData::get_string() -.
void index_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Subject - Implements ExpandoRenderData::get_string() -.
void index_v(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: First name - Implements ExpandoRenderData::get_string() -.
void index_u(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: User name - Implements ExpandoRenderData::get_string() -.
void index_zt(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Message tag flags - Implements ExpandoRenderData::get_string() -.
void index_g(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Message tags - Implements ExpandoRenderData::get_string() -.
void index_S(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Status flag - Implements ExpandoRenderData::get_string() -.
void index_x(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: X-Comment-To - Implements ExpandoRenderData::get_string() -.
void index_G(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Individual tag - Implements ExpandoRenderData::get_string() -.
void index_i(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Message-id - Implements ExpandoRenderData::get_string() -.
void index_P(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Progress indicator - Implements ExpandoRenderData::get_string() -.
void index_zc(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Message crypto flags - Implements ExpandoRenderData::get_string() -.
void index_date_recv_local(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Received local date and time - Implements ExpandoRenderData::get_string() -.
void index_date_local(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Sent local date and time - Implements ExpandoRenderData::get_string() -.
void index_L(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: List address - Implements ExpandoRenderData::get_string() -.
void index_q(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Newsgroup name - Implements ExpandoRenderData::get_string() -.
void index_F(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Author name - Implements ExpandoRenderData::get_string() -.
void index_Y(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: X-Label (if different) - Implements ExpandoRenderData::get_string() -.
void index_y(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: X-Label - Implements ExpandoRenderData::get_string() -.
void index_J(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Tags - Implements ExpandoRenderData::get_string() -.
void index_b(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Filename - Implements ExpandoRenderData::get_string() -.
void index_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Sender - Implements ExpandoRenderData::get_string() -.
void index_Z(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Status flags - Implements ExpandoRenderData::get_string() -.
void index_zs(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Message status flags - Implements ExpandoRenderData::get_string() -.
void index_R(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Cc recipients - Implements ExpandoRenderData::get_string() -.
void index_W(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Organization - Implements ExpandoRenderData::get_string() -.
void index_B(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Email list - Implements ExpandoRenderData::get_string() -.
void index_date(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Sent date and time - Implements ExpandoRenderData::get_string() -.
void index_I(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Initials of author - Implements ExpandoRenderData::get_string() -.
void index_M(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Number of hidden messages - Implements ExpandoRenderData::get_string() -.
void index_K(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Mailing list - Implements ExpandoRenderData::get_string() -.
void index_tree(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Thread tree - Implements ExpandoRenderData::get_string() -.
void index_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: To field - Implements ExpandoRenderData::get_string() -.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
static const char * make_from_prefix(enum FieldType disp)
Create a prefix for an author field.
static void make_from_addr(struct Envelope *env, char *buf, size_t buflen, bool do_lists)
Create a 'from' address for a reply email.
static void index_email_date(const struct ExpandoNode *node, const struct Email *e, enum IndexDateChoice which, MuttFormatFlags flags, struct Buffer *buf, const char *format)
Index: Sent/Received Local/Sender date and time.
@ DISP_PLAIN
Empty string.
static bool thread_is_old(struct Email *e)
Does the email thread contain any unread emails?
static enum ToChars user_is_recipient(struct Email *e)
Is the user a recipient of the message.
IndexDateChoice
Which email date to display in the Index.
@ SENT_LOCAL
Date sent in the local timezone.
@ RECV_LOCAL
Date received in the local timezone.
@ SENT_SENDER
Date sent in the sender's timezone.
static void make_from(struct Envelope *env, char *buf, size_t buflen, bool do_lists, MuttFormatFlags flags)
Generate a From: field (with optional prefix)
int mutt_make_string(struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
static bool thread_is_new(struct Email *e)
Does the email thread contain any new emails?
static bool user_in_addr(struct AddressList *al)
Do any of the addresses refer to the user?
const struct ExpandoRenderData IndexRenderData[]
Callbacks for Index Expandos.
String processing routines to generate the mail index.
ToChars
Index into the $to_chars config variable.
@ FLAG_CHAR_TO_ORIGINATOR
Character denoting that the user is originator.
@ FLAG_CHAR_TO_UNIQUE
Character denoting that the user is unique recipient.
@ FLAG_CHAR_TO_NOT_IN_THE_LIST
Character denoting that the user is not in list.
@ FLAG_CHAR_TO_TO
Character denoting that the user is in the TO list.
@ FLAG_CHAR_TO_CC
Character denoting that the user is in the CC list.
@ FLAG_CHAR_TO_REPLY_TO
Character denoting that the user is in the Reply-To list.
@ FLAG_CHAR_TO_SUBSCRIBED_LIST
Character denoting that the message is sent to a subscribed mailing list.
@ FLAG_CHAR_CRYPT_CONTAINS_KEY
Character denoting a message contains a PGP key.
@ FLAG_CHAR_CRYPT_SIGNED
Character denoting a message is signed.
@ FLAG_CHAR_CRYPT_NO_CRYPTO
Character denoting a message has no cryptography information.
@ FLAG_CHAR_CRYPT_GOOD_SIGN
Character denoting a message signed with a verified key.
@ FLAG_CHAR_CRYPT_ENCRYPTED
Character denoting a message is PGP-encrypted.
@ FLAG_CHAR_OLD
Character denoting an email that has been read.
@ FLAG_CHAR_REPLIED
Character denoting an email that has been replied to.
@ FLAG_CHAR_OLD_THREAD
Character denoting a thread of emails that has been read.
@ FLAG_CHAR_ZEMPTY
Character denoting a read email, $index_format Z expando.
@ FLAG_CHAR_TAGGED
Character denoting a tagged email.
@ FLAG_CHAR_NEW
Character denoting an unread email.
@ FLAG_CHAR_DELETED
Character denoting a deleted email.
@ FLAG_CHAR_NEW_THREAD
Character denoting a thread containing at least one new email.
@ FLAG_CHAR_DELETED_ATTACH
Character denoting a deleted attachment.
@ FLAG_CHAR_SEMPTY
Character denoting a read email, $index_format S expando.
@ FLAG_CHAR_IMPORTANT
Character denoting a important (flagged) email.
const struct Expando * mutt_idxfmt_hook(const char *name, struct Mailbox *m, struct Email *e)
Get index-format-hook format string.
Parse and execute user-defined hooks.
bool check_for_mailing_list(struct AddressList *al, const char *pfx, char *buf, int buflen)
Search list of addresses for a mailing list.
bool check_for_mailing_list_addr(struct AddressList *al, char *buf, int buflen)
Check an address list for a mailing list.
bool first_mailing_list(char *buf, size_t buflen, struct AddressList *al)
Get the first mailing list in the list of addresses.
const char * mbtable_get_nth_wchar(const struct MbTable *table, int index)
Extract one char from a multi-byte table.
bool mutt_mb_get_initials(const char *name, char *buf, size_t buflen)
Turn a name into initials.
struct tm mutt_date_localtime(time_t t)
Converts calendar time to a broken-down time structure expressed in user timezone.
struct tm mutt_date_gmtime(time_t t)
Converts calendar time to a broken-down time structure expressed in UTC timezone.
Convenience wrapper for the library headers.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, enum MessageInThread mit)
Count the messages in a thread.
Create/manipulate threading in emails.
#define mutt_using_threads()
@ MIT_NUM_MESSAGES
How many messages are in the thread.
@ MIT_POSITION
Our position in the thread.
#define mutt_thread_contains_unread(e)
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Some miscellaneous functions.
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
API for encryption/signing of emails.
#define SEC_GOODSIGN
Email has a valid signature.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
#define SEC_ENCRYPT
Email is encrypted.
#define SEC_SIGN
Email is signed.
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
void node_expando_set_has_tree(const struct ExpandoNode *node, bool has_tree)
Set the has_tree flag for an Expando.
Notmuch virtual mailbox type.
char * nm_email_get_folder_rel_db(struct Mailbox *m, struct Email *e)
Get the folder for a Email from the same level as the notmuch database.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_FIRST(head)
#define TAILQ_NEXT(elm, field)
#define TAILQ_EMPTY(head)
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
#define MUTT_FORMAT_INDEX
This is a main index entry.
#define MUTT_FORMAT_TREE
Draw the thread tree.
#define MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Assorted sorting methods.
struct Buffer * mailbox
Mailbox and host address.
LOFF_T length
length (in bytes) of attachment
String manipulation buffer.
size_t dsize
Length of data.
char * data
Pointer to data.
The envelope/body of an email.
unsigned int zminutes
Minutes away from UTC.
bool recip_valid
Is_recipient is valid.
struct Envelope * env
Envelope information.
bool collapsed
Is this message part of a collapsed thread?
int lines
How many lines in the body of this message?
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
struct Body * body
List of MIME parts.
char * tree
Character string to print thread tree.
bool old
Email is seen, but unread.
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
bool zoccident
True, if west of UTC, False if east.
bool attach_del
Has an attachment marked for deletion.
bool flagged
Marked important?
unsigned int zhours
Hours away from UTC.
time_t date_sent
Time when the message was sent (UTC)
bool replied
Email has been replied to.
struct TagList tags
For drivers that support server tagging.
int msgno
Number displayed to the user.
bool deleted
Email is deleted.
short recipient
User_is_recipient()'s return value, cached.
bool tagged
Email is tagged.
time_t received
Time when the message was placed in the mailbox.
struct MuttThread * thread
Thread of Emails.
char *const subject
Email's subject.
struct AddressList to
Email's 'To' list.
struct AddressList reply_to
Email's 'reply-to'.
char * message_id
Message ID.
char * x_comment_to
List of 'X-comment-to' fields.
char * newsgroups
List of newsgroups.
struct AddressList cc
Email's 'Cc' list.
struct Buffer spam
Spam header.
struct AddressList bcc
Email's 'Bcc' list.
char * organization
Organisation header.
char * disp_subj
Display subject (modified copy of subject)
struct AddressList from
Email's 'From' list.
const char * text
Node-specific text.
struct ExpandoNode * node
Parsed tree.
int msg_count
Total number of messages.
enum MailboxType type
Mailbox type.
Multibyte character table.
int len
Number of characters.
char ** chars
The array of multibyte character strings.
A local copy of an email.
FILE * fp
pointer to the message data
struct Message::@0 flags
Flags for the Message.
struct MuttThread * parent
Parent of this Thread.
struct MuttThread * prev
Previous sibling Thread.
struct Email * message
Email this Thread refers to.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
locale_t time_c_locale
Current locale but LC_TIME=C.
bool subjrx_apply_mods(struct Envelope *env)
Apply regex modifications to the subject.