/**
* mutt_pipe_message - Pipe a message
- * @param e Header of message to pipe
+ * @param e Email to pipe
*/
void mutt_pipe_message(struct Email *e)
{
/**
* mutt_save_message_ctx - Save a message to a given mailbox
- * @param e Header of message
+ * @param e Email
* @param delete If true, delete the original
* @param decode If true, decode the message
* @param decrypt If true, decrypt the message
}
/**
- * mutt_copy_header - Copy email header
+ * mutt_copy_header - Copy Email header
* @param in FILE pointer to read from
- * @param e Email Header
+ * @param e Email
* @param out FILE pointer to write to
* @param flags Flags, see below
* @param prefix Prefix for quoting headers
* mutt_copy_message_fp - make a copy of a message from a FILE pointer
* @param fpout Where to write output
* @param fpin Where to get input
- * @param e Header of message being copied
+ * @param e Email being copied
* @param flags See below
* @param chflags Flags to mutt_copy_header()
* @retval 0 Success
* mutt_copy_message_ctx - Copy a message from a Context
* @param fpout FILE pointer to write to
* @param src Source mailbox
- * @param e Email Header
+ * @param e Email
* @param flags Flags, see: mutt_copy_message_fp()
* @param chflags Header flags, see: mutt_copy_header()
* @retval 0 Success
* @param dest destination mailbox
* @param fpin where to get input
* @param src source mailbox
- * @param e message being copied
+ * @param e Email being copied
* @param flags mutt_open_copy_message() flags
* @param chflags mutt_copy_header() flags
* @retval 0 Success
* mutt_append_message - Append a message
* @param dest Destination Mailbox
* @param src Source Mailbox
- * @param e Email Header
+ * @param e Email
* @param cmflags mutt_open_copy_message() flags
* @param chflags mutt_copy_header() flags
* @retval 0 Success
/**
* be_edit_header - Edit the message headers
- * @param e Message headers
+ * @param e Email
* @param force override the $ask* vars (used for the ~h command)
*/
static void be_edit_header(struct Envelope *e, bool force)
* edit_or_view_message - Edit an email or view it in an external editor
* @param edit true: Edit the email; false: view the email
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @retval 1 Message not modified
* @retval 0 Message edited successfully
* @retval -1 Error
/**
* mutt_edit_message - Edit a message
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @retval 1 Message not modified
* @retval 0 Message edited successfully
* @retval -1 Error
/**
* mutt_view_message - Edit a message
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @retval 1 Message not modified
* @retval 0 Message edited successfully
* @retval -1 Error
/**
* mutt_env_to_local - Convert an Envelope's Address fields to local format
- * @param e Envelope to modify
+ * @param env Envelope to modify
*
* Run mutt_addrlist_to_local() on each of the Address fields in the Envelope.
*/
-void mutt_env_to_local(struct Envelope *e)
+void mutt_env_to_local(struct Envelope *env)
{
- mutt_addrlist_to_local(e->return_path);
- mutt_addrlist_to_local(e->from);
- mutt_addrlist_to_local(e->to);
- mutt_addrlist_to_local(e->cc);
- mutt_addrlist_to_local(e->bcc);
- mutt_addrlist_to_local(e->reply_to);
- mutt_addrlist_to_local(e->mail_followup_to);
+ mutt_addrlist_to_local(env->return_path);
+ mutt_addrlist_to_local(env->from);
+ mutt_addrlist_to_local(env->to);
+ mutt_addrlist_to_local(env->cc);
+ mutt_addrlist_to_local(env->bcc);
+ mutt_addrlist_to_local(env->reply_to);
+ mutt_addrlist_to_local(env->mail_followup_to);
}
/* Note that `a' in the `env->a' expression is macro argument, not
/**
* mutt_rfc822_read_header - parses an RFC822 header
* @param f Stream to read from
- * @param e Header structure of current message (optional)
+ * @param e Current Email (optional)
* @param user_hdrs If set, store user headers
* Used for recall-message and postpone modes
* @param weed If this parameter is set and the user has activated the
/**
* mutt_break_thread - Break the email Thread
- * @param e Email Header to break at
+ * @param e Email to break at
*/
void mutt_break_thread(struct Email *e)
{
/**
* mutt_set_flag_update - Set a flag on an email
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @param flag Flag to set, e.g. #MUTT_DELETE
* @param bf true: set the flag; false: clear the flag
* @param upd_ctx true: update the Context
/**
* mutt_thread_set_flag - Set a flag on an entire thread
- * @param e Email Header
+ * @param e Email
* @param flag Flag to set, e.g. #MUTT_DELETE
* @param bf true: set the flag; false: clear the flag
* @param subthread If true apply to all of the thread
/**
* mutt_change_flag - Change the flag on a Message
- * @param e Email Header
+ * @param e Email
* @param bf true: set the flag; false: clear the flag
* @retval 0 Success
* @retval -1 Failure
/**
* serial_dump_envelope - Pack an Envelope into a binary blob
- * @param e Envelope to pack
+ * @param env Envelope to pack
* @param d Binary blob to add to
* @param off Offset into the blob
* @param convert If true, the strings will be converted to utf-8
* @retval ptr End of the newly packed binary
*/
-unsigned char *serial_dump_envelope(struct Envelope *e, unsigned char *d, int *off, bool convert)
+unsigned char *serial_dump_envelope(struct Envelope *env, unsigned char *d,
+ int *off, bool convert)
{
- d = serial_dump_address(e->return_path, d, off, convert);
- d = serial_dump_address(e->from, d, off, convert);
- d = serial_dump_address(e->to, d, off, convert);
- d = serial_dump_address(e->cc, d, off, convert);
- d = serial_dump_address(e->bcc, d, off, convert);
- d = serial_dump_address(e->sender, d, off, convert);
- d = serial_dump_address(e->reply_to, d, off, convert);
- d = serial_dump_address(e->mail_followup_to, d, off, convert);
-
- d = serial_dump_char(e->list_post, d, off, convert);
- d = serial_dump_char(e->subject, d, off, convert);
-
- if (e->real_subj)
- d = serial_dump_int(e->real_subj - e->subject, d, off);
+ d = serial_dump_address(env->return_path, d, off, convert);
+ d = serial_dump_address(env->from, d, off, convert);
+ d = serial_dump_address(env->to, d, off, convert);
+ d = serial_dump_address(env->cc, d, off, convert);
+ d = serial_dump_address(env->bcc, d, off, convert);
+ d = serial_dump_address(env->sender, d, off, convert);
+ d = serial_dump_address(env->reply_to, d, off, convert);
+ d = serial_dump_address(env->mail_followup_to, d, off, convert);
+
+ d = serial_dump_char(env->list_post, d, off, convert);
+ d = serial_dump_char(env->subject, d, off, convert);
+
+ if (env->real_subj)
+ d = serial_dump_int(env->real_subj - env->subject, d, off);
else
d = serial_dump_int(-1, d, off);
- d = serial_dump_char(e->message_id, d, off, false);
- d = serial_dump_char(e->supersedes, d, off, false);
- d = serial_dump_char(e->date, d, off, false);
- d = serial_dump_char(e->x_label, d, off, convert);
+ d = serial_dump_char(env->message_id, d, off, false);
+ d = serial_dump_char(env->supersedes, d, off, false);
+ d = serial_dump_char(env->date, d, off, false);
+ d = serial_dump_char(env->x_label, d, off, convert);
- d = serial_dump_buffer(e->spam, d, off, convert);
+ d = serial_dump_buffer(env->spam, d, off, convert);
- d = serial_dump_stailq(&e->references, d, off, false);
- d = serial_dump_stailq(&e->in_reply_to, d, off, false);
- d = serial_dump_stailq(&e->userhdrs, d, off, convert);
+ d = serial_dump_stailq(&env->references, d, off, false);
+ d = serial_dump_stailq(&env->in_reply_to, d, off, false);
+ d = serial_dump_stailq(&env->userhdrs, d, off, convert);
#ifdef USE_NNTP
- d = serial_dump_char(e->xref, d, off, false);
- d = serial_dump_char(e->followup_to, d, off, false);
- d = serial_dump_char(e->x_comment_to, d, off, convert);
+ d = serial_dump_char(env->xref, d, off, false);
+ d = serial_dump_char(env->followup_to, d, off, false);
+ d = serial_dump_char(env->x_comment_to, d, off, convert);
#endif
return d;
/**
* serial_restore_envelope - Unpack an Envelope from a binary blob
- * @param e Store the unpacked Envelope here
+ * @param env Store the unpacked Envelope here
* @param d Binary blob to read from
* @param off Offset into the blob
* @param convert If true, the strings will be converted from utf-8
*/
-void serial_restore_envelope(struct Envelope *e, const unsigned char *d, int *off, bool convert)
+void serial_restore_envelope(struct Envelope *env, const unsigned char *d, int *off, bool convert)
{
int real_subj_off;
- serial_restore_address(&e->return_path, d, off, convert);
- serial_restore_address(&e->from, d, off, convert);
- serial_restore_address(&e->to, d, off, convert);
- serial_restore_address(&e->cc, d, off, convert);
- serial_restore_address(&e->bcc, d, off, convert);
- serial_restore_address(&e->sender, d, off, convert);
- serial_restore_address(&e->reply_to, d, off, convert);
- serial_restore_address(&e->mail_followup_to, d, off, convert);
-
- serial_restore_char(&e->list_post, d, off, convert);
- serial_restore_char(&e->subject, d, off, convert);
+ serial_restore_address(&env->return_path, d, off, convert);
+ serial_restore_address(&env->from, d, off, convert);
+ serial_restore_address(&env->to, d, off, convert);
+ serial_restore_address(&env->cc, d, off, convert);
+ serial_restore_address(&env->bcc, d, off, convert);
+ serial_restore_address(&env->sender, d, off, convert);
+ serial_restore_address(&env->reply_to, d, off, convert);
+ serial_restore_address(&env->mail_followup_to, d, off, convert);
+
+ serial_restore_char(&env->list_post, d, off, convert);
+ serial_restore_char(&env->subject, d, off, convert);
serial_restore_int((unsigned int *) (&real_subj_off), d, off);
if (real_subj_off >= 0)
- e->real_subj = e->subject + real_subj_off;
+ env->real_subj = env->subject + real_subj_off;
else
- e->real_subj = NULL;
+ env->real_subj = NULL;
- serial_restore_char(&e->message_id, d, off, false);
- serial_restore_char(&e->supersedes, d, off, false);
- serial_restore_char(&e->date, d, off, false);
- serial_restore_char(&e->x_label, d, off, convert);
+ serial_restore_char(&env->message_id, d, off, false);
+ serial_restore_char(&env->supersedes, d, off, false);
+ serial_restore_char(&env->date, d, off, false);
+ serial_restore_char(&env->x_label, d, off, convert);
- serial_restore_buffer(&e->spam, d, off, convert);
+ serial_restore_buffer(&env->spam, d, off, convert);
- serial_restore_stailq(&e->references, d, off, false);
- serial_restore_stailq(&e->in_reply_to, d, off, false);
- serial_restore_stailq(&e->userhdrs, d, off, convert);
+ serial_restore_stailq(&env->references, d, off, false);
+ serial_restore_stailq(&env->in_reply_to, d, off, false);
+ serial_restore_stailq(&env->userhdrs, d, off, convert);
#ifdef USE_NNTP
- serial_restore_char(&e->xref, d, off, false);
- serial_restore_char(&e->followup_to, d, off, false);
- serial_restore_char(&e->x_comment_to, d, off, convert);
+ serial_restore_char(&env->xref, d, off, false);
+ serial_restore_char(&env->followup_to, d, off, false);
+ serial_restore_char(&env->x_comment_to, d, off, convert);
#endif
}
/**
* mutt_message_hook - Perform a message hook
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @param type Hook type, e.g. #MUTT_MESSAGE_HOOK
*/
void mutt_message_hook(struct Context *ctx, struct Email *e, int type)
* @param pathlen Length of buffer
* @param type Type e.g. #MUTT_FCC_HOOK
* @param ctx Mailbox Context
- * @param e Email Header
+ * @param e Email
* @retval 0 Success
* @retval -1 Failure
*/
* mutt_default_save - Find the default save path for an email
* @param path Buffer for the path
* @param pathlen Length of buffer
- * @param e Email Header
+ * @param e Email
*/
void mutt_default_save(char *path, size_t pathlen, struct Email *e)
{
* mutt_select_fcc - Select the FCC path for an email
* @param path Buffer for the path
* @param pathlen Length of the buffer
- * @param e Email Header
+ * @param e Email
*/
void mutt_select_fcc(char *path, size_t pathlen, struct Email *e)
{
/**
* msg_cache_get - Get the message cache entry for an email
* @param adata Imap Account data
- * @param e Email header
+ * @param e Email
* @retval ptr Success, handle of cache entry
* @retval NULL Failure
*/
/**
* msg_cache_put - Put an email into the message cache
* @param adata Imap Account data
- * @param e Email header
+ * @param e Email
* @retval ptr Success, handle of cache entry
* @retval NULL Failure
*/
/**
* msg_cache_commit - Add to the message cache
* @param adata Imap Account data
- * @param e Email header
+ * @param e Email
* @retval 0 Success
* @retval -1 Failure
*/
/**
* set_changed_flag - Have the flags of an email changed
* @param[in] ctx Mailbox
- * @param[in] e Email Header
+ * @param[in] e Email
* @param[in] local_changes Has the local mailbox been changed?
* @param[out] server_changes Set to 1 if the flag has changed
* @param[in] flag_name Flag to check, e.g. #MUTT_FLAG
/**
* imap_cache_del - Delete an email from the body cache
* @param adata Imap Account data
- * @param e Email header
+ * @param e Email
* @retval 0 Success
* @retval -1 Failure
*/
/**
* imap_set_flags - fill the message header according to the server flags
* @param[in] adata Imap Account data
- * @param[in] e Email Header
+ * @param[in] e Email
* @param[in] s Command string
* @param[out] server_changes Flags have changed
* @retval ptr The end of flags string
/**
* imap_hcache_put - Add an entry to the header cache
* @param adata Imap Account data
- * @param e Email Header
+ * @param e Email
* @retval 0 Success
* @retval -1 Failure
*/
* mh_commit_msg - Commit a message to an MH folder
* @param m Mailbox
* @param msg Message to commit
- * @param e Email Header
+ * @param e Email
* @param updseq If true, update the sequence number
* @retval 0 Success
* @retval -1 Failure
* @param f Mesage file handle
* @param fname Message filename
* @param is_old true, if the email is old (read)
- * @param e Email Header to populate (OPTIONAL)
- * @retval ptr Populated email Header
+ * @param e Email
+ * @retval ptr Populated Email
*
* Actually parse a maildir message. This may also be used to fill
* out a fake header structure generated by lazy maildir parsing.
* @param magic Mailbox type, e.g. #MUTT_MAILDIR
* @param fname Message filename
* @param is_old true, if the email is old (read)
- * @param e Email Header to populate (OPTIONAL)
- * @retval ptr Populated email Header
+ * @param e Email to populate (OPTIONAL)
+ * @retval ptr Populated Email
*
* This may also be used to fill out a fake header structure generated by lazy
* maildir parsing.
* @param fp Source file stream. Can be NULL
* @param a The message body containing the attachment
* @param flag Option flag for how the attachment should be viewed
- * @param e Message header for the current message. Can be NULL
+ * @param e Current Email. Can be NULL
* @param actx Attachment context
* @retval 0 If the viewer is run and exited successfully
* @retval -1 Error
* @param m Email Body
* @param path Where to save the attachment
* @param flags Flags, e.g. #MUTT_SAVE_APPEND
- * @param e Message header for the current message. Can be NULL
+ * @param e Current Email. Can be NULL
* @retval 0 Success
* @retval -1 Error
*/
/**
* mutt_label_hash_add - Add a message's labels to the Hash Table
* @param m Mailbox
- * @param e Header of message
+ * @param e Email
*/
void mutt_label_hash_add(struct Mailbox *m, struct Email *e)
{
/**
* mutt_label_hash_remove - Rmove a message's labels from the Hash Table
* @param m Mailbox
- * @param e Header of message
+ * @param e Email
*/
void mutt_label_hash_remove(struct Mailbox *m, struct Email *e)
{
/**
* is_visible - Is the message visible?
- * @param e Header of message
+ * @param e Email
* @param ctx Mailbox
* @retval true If the message is not hidden in some way
*/
/**
* mutt_aside_thread - Find the next/previous (sub)thread
- * @param e Search from this message
+ * @param e Search from this Email
* @param forwards Direction to search: 'true' forwards, 'false' backwards
* @param subthreads Search subthreads: 'true' subthread, 'false' not
* @retval num Index into the virtual email table
/**
* mutt_parent_message - Find the parent of a message
* @param ctx Mailbox
- * @param e Header of current message
+ * @param e Current Email
* @param find_root If true, find the root message
* @retval >=0 Virtual index number of parent/root message
* @retval -1 Error
/**
* mx_msg_open_new - Open a new message
* @param ctx Destination mailbox
- * @param e Message being copied (required for maildir support, because the filename depends on the message flags)
+ * @param e Message being copied (required for maildir support, because the filename depends on the message flags)
* @param flags Flags, e.g. #MUTT_SET_DRAFT
* @retval ptr New Message
*/
/**
* mx_tags_commit - save tags to the mailbox
* @param ctx Mailbox
- * @param e Email Header
+ * @param e Email
* @param tags Tags to save
* @retval 0 Success
* @retval -1 Failure
/**
* msg_open_new - Open a new message in a mailbox
* @param ctx Mailbox
- * @param msg Message to open
- * @param e Email header
+ * @param msg Message to open
+ * @param e Email
* @retval 0 Success
* @retval -1 Failure
*/
/**
* tags_commit - Save the tags to a message
* @param ctx Mailbox
- * @param e Email Header
+ * @param e Email
* @param buf Buffer containing tags
* @retval 0 Success
* @retval -1 Failure
/**
* pop_read_header - Read header
* @param adata POP Account data
- * @param e Email header
+ * @param e Email
* @retval 0 Success
* @retval -1 Connection lost
* @retval -2 Invalid command or execution error
* @param fp If not NULL, file containing the template
* @param ctx If fp is NULL, the context containing the header with the template
* @param newhdr The template is read into this Header
- * @param e The message to recall/resend
+ * @param e Email to recall/resend
* @param resend Set if resending (as opposed to recalling a postponed msg)
* Resent messages enable header weeding, and also
* discard any existing Message-ID and Mail-Followup-To
/**
* mutt_attach_forward - Forward an Attachment
- * @param fp Handle to the attachmenT
- * @param e Header of message
+ * @param fp Handle to the attachment
+ * @param e Email
* @param actx Attachment Context
* @param cur Current message
* @param flags Send mode, e.g. #SEND_RESEND
/**
* mutt_attach_reply - Attach a reply
* @param fp File handle to reply
- * @param e Header of message
+ * @param e Email
* @param actx Attachment Context
* @param cur Current message
* @param flags Send mode, e.g. #SEND_RESEND
/**
* mutt_attach_mail_sender - Compose an email to the sender in the email attachment
* @param fp File containing attachment (UNUSED)
- * @param e Email (UNUSED)
+ * @param e Email (UNUSED)
* @param actx Attachment Context
* @param cur Current attachment
*/
/**
* mutt_score_message - Apply scoring to an email
* @param ctx Mailbox
- * @param e Email header
+ * @param e Email
* @param upd_ctx If true, update the Context too
*/
void mutt_score_message(struct Context *ctx, struct Email *e, bool upd_ctx)
/**
* add_references - Add the email's references to a list
* @param head List of references
- * @param e Envelope of message
+ * @param env Envelope of message
*/
-static void add_references(struct ListHead *head, struct Envelope *e)
+static void add_references(struct ListHead *head, struct Envelope *env)
{
struct ListNode *np = NULL;
- struct ListHead *src = !STAILQ_EMPTY(&e->references) ? &e->references : &e->in_reply_to;
+ struct ListHead *src = !STAILQ_EMPTY(&env->references) ? &env->references : &env->in_reply_to;
STAILQ_FOREACH(np, src, entries)
{
mutt_list_insert_tail(head, mutt_str_strdup(np->data));
/**
* add_message_id - Add the email's message ID to a list
* @param head List of message IDs
- * @param e Envelope of message
+ * @param env Envelope of message
*/
-static void add_message_id(struct ListHead *head, struct Envelope *e)
+static void add_message_id(struct ListHead *head, struct Envelope *env)
{
- if (e->message_id)
+ if (env->message_id)
{
- mutt_list_insert_head(head, mutt_str_strdup(e->message_id));
+ mutt_list_insert_head(head, mutt_str_strdup(env->message_id));
}
}
/**
* mutt_set_followup_to - Set followup-to field
- * @param e Envelope to modify
+ * @param env Envelope to modify
*/
-void mutt_set_followup_to(struct Envelope *e)
+void mutt_set_followup_to(struct Envelope *env)
{
struct Address *t = NULL;
struct Address *from = NULL;
#ifdef USE_NNTP
if (OptNewsSend)
{
- if (!e->followup_to && e->newsgroups && (strrchr(e->newsgroups, ',')))
- e->followup_to = mutt_str_strdup(e->newsgroups);
+ if (!env->followup_to && env->newsgroups && (strrchr(env->newsgroups, ',')))
+ env->followup_to = mutt_str_strdup(env->newsgroups);
return;
}
#endif
- if (!e->mail_followup_to)
+ if (!env->mail_followup_to)
{
- if (mutt_is_list_cc(0, e->to, e->cc))
+ if (mutt_is_list_cc(0, env->to, env->cc))
{
/* this message goes to known mailing lists, so create a proper
* mail-followup-to header
*/
- t = mutt_addr_append(&e->mail_followup_to, e->to, false);
- mutt_addr_append(&t, e->cc, true);
+ t = mutt_addr_append(&env->mail_followup_to, env->to, false);
+ mutt_addr_append(&t, env->cc, true);
}
/* remove ourselves from the mail-followup-to header */
- e->mail_followup_to = remove_user(e->mail_followup_to, false);
+ env->mail_followup_to = remove_user(env->mail_followup_to, false);
/* If we are not subscribed to any of the lists in question,
* re-add ourselves to the mail-followup-to header. The
* but makes sure list-reply has the desired effect.
*/
- if (e->mail_followup_to && !mutt_is_list_recipient(false, e->to, e->cc))
+ if (env->mail_followup_to && !mutt_is_list_recipient(false, env->to, env->cc))
{
- if (e->reply_to)
- from = mutt_addr_copy_list(e->reply_to, false);
- else if (e->from)
- from = mutt_addr_copy_list(e->from, false);
+ if (env->reply_to)
+ from = mutt_addr_copy_list(env->reply_to, false);
+ else if (env->from)
+ from = mutt_addr_copy_list(env->from, false);
else
from = mutt_default_from();
for (t = from; t && t->next; t = t->next)
;
- t->next = e->mail_followup_to; /* t cannot be NULL at this point. */
- e->mail_followup_to = from;
+ t->next = env->mail_followup_to; /* t cannot be NULL at this point. */
+ env->mail_followup_to = from;
}
}
- e->mail_followup_to = mutt_addrlist_dedupe(e->mail_followup_to);
+ env->mail_followup_to = mutt_addrlist_dedupe(env->mail_followup_to);
}
}