From 0844bb64b543d9bf90085d8af01be3a9f2585a72 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sat, 13 Jul 2019 19:36:14 +0100 Subject: [PATCH] doxygen: Email struct members --- config/enum.h | 2 +- email/attach.h | 50 +++++++-------- email/body.h | 105 +++++++++++++------------------ email/content.h | 22 +++---- email/email.h | 142 ++++++++++++++++++++---------------------- email/email_globals.h | 12 ++-- email/envelope.h | 75 +++++++++++----------- email/parameter.h | 18 +++--- email/parse.h | 28 ++++----- email/rfc2231.h | 4 +- email/tags.h | 18 +++--- email/thread.h | 43 ++++++------- email/url.h | 34 +++++----- 13 files changed, 267 insertions(+), 286 deletions(-) diff --git a/config/enum.h b/config/enum.h index 2467ebd36..eb0ef7fc3 100644 --- a/config/enum.h +++ b/config/enum.h @@ -26,7 +26,7 @@ struct ConfigSet; /** - * struct EnumDef - XXX + * struct EnumDef - An enumeration */ struct EnumDef { diff --git a/email/attach.h b/email/attach.h index 9389c0cd7..dd407dab5 100644 --- a/email/attach.h +++ b/email/attach.h @@ -33,14 +33,14 @@ struct Body; */ struct AttachPtr { - struct Body *content; - FILE *fp; /**< used in the recvattach menu. */ - int parent_type; - char *tree; - int level; - int num; - bool unowned : 1; /**< don't unlink on detach */ - bool decrypted : 1; /**< not part of message as stored in the email->content. */ + struct Body *content; ///< Attachment + FILE *fp; ///< Used in the recvattach menu + int parent_type; ///< Type of parent attachment, e.g. #TYPE_MULTIPART + char *tree; ///< Tree characters to display + int level; ///< Nesting depth of attachment + int num; ///< Attachment index number + bool unowned : 1; ///< Don't unlink on detach + bool decrypted : 1; ///< Not part of message as stored in the email->content }; /** @@ -48,29 +48,29 @@ struct AttachPtr */ struct AttachCtx { - struct Email *email; /**< used by recvattach for updating */ - FILE *fp_root; /**< used by recvattach for updating */ + struct Email *email; ///< Used by recvattach for updating + FILE *fp_root; ///< Used by recvattach for updating - struct AttachPtr **idx; - short idxlen; - short idxmax; + struct AttachPtr **idx; ///< Array of attachments + short idxlen; ///< Number of attachmentes + short idxmax; ///< Size of attachment array - short *v2r; /**< mapping from virtual to real attachment */ - short vcount; /**< the number of virtual attachments */ + short *v2r; ///< Mapping from virtual to real attachment + short vcount; ///< The number of virtual attachments - FILE **fp_idx; /**< Extra FILE* used for decryption */ - short fp_len; - short fp_max; + FILE **fp_idx; ///< Extra FILE* used for decryption + short fp_len; ///< Number of FILE handles + short fp_max; ///< Size of FILE array - struct Body **body_idx; /**< Extra struct Body* used for decryption */ - short body_len; - short body_max; + struct Body **body_idx; ///< Extra struct Body* used for decryption + short body_len; ///< Number of Body parts + short body_max; ///< Size of Body array }; -void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach); -void mutt_actx_add_body(struct AttachCtx *actx, struct Body *new_body); -void mutt_actx_add_fp(struct AttachCtx *actx, FILE *fp_new); -void mutt_actx_free(struct AttachCtx **pactx); +void mutt_actx_add_attach (struct AttachCtx *actx, struct AttachPtr *attach); +void mutt_actx_add_body (struct AttachCtx *actx, struct Body *new_body); +void mutt_actx_add_fp (struct AttachCtx *actx, FILE *fp_new); +void mutt_actx_free (struct AttachCtx **pactx); void mutt_actx_free_entries(struct AttachCtx *actx); #endif /* MUTT_EMAIL_ATTACH_H */ diff --git a/email/body.h b/email/body.h index 99d87c0be..6dfb1b717 100644 --- a/email/body.h +++ b/email/body.h @@ -33,76 +33,61 @@ */ struct Body { - char *xtype; /**< content-type if x-unknown */ - char *subtype; /**< content-type subtype */ - char *language; /**< content-language (RFC8255) */ - struct ParameterList parameter; /**< parameters of the content-type */ - char *description; /**< content-description */ - char *form_name; /**< Content-Disposition form-data name param */ - long hdr_offset; /**< offset in stream where the headers begin. - * this info is used when invoking metamail, - * where we need to send the headers of the - * attachment */ - LOFF_T offset; /**< offset where the actual data begins */ - LOFF_T length; /**< length (in bytes) of attachment */ - char *filename; /**< when sending a message, this is the file - * to which this structure refers */ - char *d_filename; /**< filename to be used for the - content-disposition header. - * If NULL, filename is used instead. */ - char *charset; /**< send mode: charset of attached file as stored - * on disk. the charset used in the generated - * message is stored in parameter. */ - struct Content *content; /**< structure used to store detailed info about - * the content of the attachment. this is used - * to determine what content-transfer-encoding - * is required when sending mail. */ - struct Body *next; /**< next attachment in the list */ - struct Body *parts; /**< parts of a multipart or message/rfc822 */ - struct Email *email; /**< header information for message/rfc822 */ + char *xtype; ///< content-type if x-unknown + char *subtype; ///< content-type subtype + char *language; ///< content-language (RFC8255) + struct ParameterList parameter; ///< parameters of the content-type + char *description; ///< content-description + char *form_name; ///< Content-Disposition form-data name param + long hdr_offset; ///< Offset in stream where the headers begin. + ///< This info is used when invoking metamail, where we need to send the headers of the attachment + LOFF_T offset; ///< offset where the actual data begins + LOFF_T length; ///< length (in bytes) of attachment + char *filename; ///< when sending a message, this is the file to which this structure refers + char *d_filename; ///< filename to be used for the content-disposition header. + ///< If NULL, filename is used instead. + char *charset; ///< Send mode: charset of attached file as stored on disk. + ///< The charset used in the generated message is stored in parameter. + struct Content *content; ///< Detailed info about the content of the attachment. + ///< Used to determine what content-transfer-encoding is required when sending mail. + struct Body *next; ///< next attachment in the list + struct Body *parts; ///< parts of a multipart or message/rfc822 + struct Email *email; ///< header information for message/rfc822 - struct AttachPtr *aptr; /**< Menu information, used in recvattach.c */ + struct AttachPtr *aptr; ///< Menu information, used in recvattach.c - signed short attach_count; + signed short attach_count; ///< Number of attachments - time_t stamp; /**< time stamp of last encoding update. */ + time_t stamp; ///< Time stamp of last encoding update - struct Envelope *mime_headers; /**< memory hole protected headers */ + struct Envelope *mime_headers; ///< Memory hole protected headers - unsigned int type : 4; /**< content-type primary type */ - unsigned int encoding : 3; /**< content-transfer-encoding */ - unsigned int disposition : 2; /**< content-disposition */ - bool use_disp : 1; /**< Content-Disposition uses filename= ? */ - bool unlink : 1; /**< flag to indicate the file named by - * "filename" should be unlink()ed before - * free()ing this structure */ - bool tagged : 1; - bool deleted : 1; /**< attachment marked for deletion */ + unsigned int type : 4; ///< content-type primary type + unsigned int encoding : 3; ///< content-transfer-encoding + unsigned int disposition : 2; ///< content-disposition + bool use_disp : 1; ///< Content-Disposition uses filename= ? + bool unlink : 1; ///< If true, `filename` should be unlink()ed before free()ing this structure + bool tagged : 1; ///< This attachment is tagged + bool deleted : 1; ///< Attachment marked for deletion - bool noconv : 1; /**< don't do character set conversion */ - bool force_charset : 1; - /**< send mode: don't adjust the character - * set when in send-mode. */ - bool is_signed_data : 1; /**< A lot of MUAs don't indicate S/MIME - * signed-data correctly, e.g. they use foo.p7m - * even for the name of signed data. This flag - * is used to keep track of the actual message - * type. It gets set during the verification - * (which is done if the encryption try failed) - * and check by the function to figure the type - * of the message. */ + bool noconv : 1; ///< Don't do character set conversion + bool force_charset : 1; ///< Send mode: don't adjust the character set when in send-mode. + bool is_signed_data : 1; ///< A lot of MUAs don't indicate S/MIME signed-data correctly, + ///< e.g. they use foo.p7m even for the name of signed data. + ///< This flag is used to keep track of the actual message type. + ///< It gets set during the verification (which is done if the encryption try failed) + ///< and check by the function to figure the type of the message. - bool goodsig : 1; /**< good cryptographic signature */ - bool warnsig : 1; /**< maybe good signature */ - bool badsig : 1; /**< bad cryptographic signature (needed to - * check encrypted s/mime-signatures) */ + bool goodsig : 1; ///< Good cryptographic signature + bool warnsig : 1; ///< Maybe good signature + bool badsig : 1; ///< Bad cryptographic signature (needed to check encrypted s/mime-signatures) - bool collapsed : 1; /**< used by recvattach */ - bool attach_qualifies : 1; + bool collapsed : 1; ///< Used by recvattach + bool attach_qualifies : 1; ///< This attachment should be counted }; bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2); -void mutt_body_free(struct Body **p); -struct Body *mutt_body_new(void); +void mutt_body_free (struct Body **p); +struct Body *mutt_body_new (void); #endif /* MUTT_EMAIL_BODY_H */ diff --git a/email/content.h b/email/content.h index 461755e98..60ee86e88 100644 --- a/email/content.h +++ b/email/content.h @@ -32,17 +32,17 @@ */ struct Content { - long hibin; /**< 8-bit characters */ - long lobin; /**< unprintable 7-bit chars (eg., control chars) */ - long nulbin; /**< null characters (0x0) */ - long crlf; /**< `\r` and `\n` characters */ - long ascii; /**< number of ascii chars */ - long linemax; /**< length of the longest line in the file */ - bool space : 1; /**< whitespace at the end of lines? */ - bool binary : 1; /**< long lines, or CR not in CRLF pair */ - bool from : 1; /**< has a line beginning with "From "? */ - bool dot : 1; /**< has a line consisting of a single dot? */ - bool cr : 1; /**< has CR, even when in a CRLF pair */ + long hibin; ///< 8-bit characters + long lobin; ///< Unprintable 7-bit chars (eg., control chars) + long nulbin; ///< Null characters (0x0) + long crlf; ///< `\r` and `\n` characters + long ascii; ///< Number of ascii chars + long linemax; ///< Length of the longest line in the file + bool space : 1; ///< Whitespace at the end of lines? + bool binary : 1; ///< Long lines, or CR not in CRLF pair + bool from : 1; ///< Has a line beginning with "From "? + bool dot : 1; ///< Has a line consisting of a single dot? + bool cr : 1; ///< Has CR, even when in a CRLF pair }; #endif /* MUTT_EMAIL_CONTENT_H */ diff --git a/email/email.h b/email/email.h index cce4cb50d..2bdf60914 100644 --- a/email/email.h +++ b/email/email.h @@ -36,83 +36,79 @@ */ struct Email { - SecurityFlags security; /**< bit 0-8: flags, bit 9,10: application. - see: ncrypt/ncrypt.h pgplib.h, smime.h */ - - bool mime : 1; /**< has a MIME-Version header? */ - bool flagged : 1; /**< marked important? */ - bool tagged : 1; - bool deleted : 1; - bool purge : 1; /**< skip trash folder when deleting */ - bool quasi_deleted : 1; /**< deleted from neomutt, but not modified on disk */ - bool changed : 1; - bool attach_del : 1; /**< has an attachment marked for deletion */ - bool old : 1; - bool read : 1; - bool expired : 1; /**< already expired? */ - bool superseded : 1; /**< got superseded? */ - bool replied : 1; - bool subject_changed : 1; /**< used for threading */ - bool threaded : 1; /**< used for threading */ - bool display_subject : 1; /**< used for threading */ - bool recip_valid : 1; /**< is_recipient is valid */ - bool active : 1; /**< message is not to be removed */ - bool trash : 1; /**< message is marked as trashed on disk. - * This flag is used by the maildir_trash option. */ - - /* timezone of the sender of this message */ - unsigned int zhours : 5; - unsigned int zminutes : 6; - bool zoccident : 1; - - /* bits used for caching when searching */ - bool searched : 1; - bool matched : 1; - - /* tells whether the attachment count is valid */ - bool attach_valid : 1; - - /* the following are used to support collapsing threads */ - bool collapsed : 1; /**< is this message part of a collapsed thread? */ - bool limited : 1; /**< is this message in a limited view? */ - size_t num_hidden; /**< number of hidden messages in this view */ - - short recipient; /**< user_is_recipient()'s return value, cached */ - - int pair; /**< color-pair to use when displaying in the index */ - - time_t date_sent; /**< time when the message was sent (UTC) */ - time_t received; /**< time when the message was placed in the mailbox */ - LOFF_T offset; /**< where in the stream does this message begin? */ - int lines; /**< how many lines in the body of this message? */ - int index; /**< the absolute (unsorted) message number */ - int msgno; /**< number displayed to the user */ - int vnum; /**< virtual message number */ - int score; - struct Envelope *env; /**< envelope information */ - struct Body *content; /**< list of MIME parts */ - char *path; - - char *tree; /**< character string to print thread tree */ - struct MuttThread *thread; - - /* Number of qualifying attachments in message, if attach_valid */ - short attach_total; + SecurityFlags security; ///< bit 0-8: flags, bit 9,10: application. + ///< See: ncrypt/ncrypt.h pgplib.h, smime.h + + bool mime : 1; ///< Has a MIME-Version header? + bool flagged : 1; ///< Marked important? + bool tagged : 1; ///< Email is tagged + bool deleted : 1; ///< Email is deleted + bool purge : 1; ///< Skip trash folder when deleting + bool quasi_deleted : 1; ///< Deleted from neomutt, but not modified on disk + bool changed : 1; ///< Email has been edited + bool attach_del : 1; ///< Has an attachment marked for deletion + bool old : 1; ///< Email is seen, but unread + bool read : 1; ///< Email is read + bool expired : 1; ///< Already expired? + bool superseded : 1; ///< Got superseded? + bool replied : 1; ///< Email has been replied to + bool subject_changed : 1; ///< Used for threading + bool threaded : 1; ///< Used for threading + bool display_subject : 1; ///< Used for threading + bool recip_valid : 1; ///< Is_recipient is valid + bool active : 1; ///< Message is not to be removed + bool trash : 1; ///< Message is marked as trashed on disk (used by the maildir_trash option) + + // timezone of the sender of this message + unsigned int zhours : 5; ///< Hours away from UTC + unsigned int zminutes : 6; ///< Minutes away from UTC + bool zoccident : 1; ///< True, if west of UTC, False if east + + bool searched : 1; ///< Email has been searched + bool matched : 1; ///< Search matches this Email + + bool attach_valid : 1; ///< true when the attachment count is valid + + // the following are used to support collapsing threads + bool collapsed : 1; ///< Is this message part of a collapsed thread? + bool limited : 1; ///< Is this message in a limited view? + size_t num_hidden; ///< Number of hidden messages in this view + + short recipient; ///< User_is_recipient()'s return value, cached + + int pair; ///< Color-pair to use when displaying in the index + + time_t date_sent; ///< Time when the message was sent (UTC) + time_t received; ///< Time when the message was placed in the mailbox + LOFF_T offset; ///< Where in the stream does this message begin? + int lines; ///< How many lines in the body of this message? + int index; ///< The absolute (unsorted) message number + int msgno; ///< Number displayed to the user + int vnum; ///< Virtual message number + int score; ///< Message score + struct Envelope *env; ///< Envelope information + struct Body *content; ///< List of MIME parts + char *path; ///< Path of Email (for local Mailboxes) + + char *tree; ///< Character string to print thread tree + struct MuttThread *thread; ///< Thread of Emails + + short attach_total; ///< Number of qualifying attachments in message, if attach_valid #ifdef MIXMASTER - struct ListHead chain; + struct ListHead chain; ///< Mixmaster chain #endif #ifdef USE_POP - int refno; /**< message number on server */ + int refno; ///< Message number on server #endif - struct TagHead tags; /**< for drivers that support server tagging */ + struct TagHead tags; ///< For drivers that support server tagging - char *maildir_flags; /**< unknown maildir flags */ + char *maildir_flags; ///< Unknown maildir flags - void *edata; /**< driver-specific data */ - void (*free_edata)(void **); /**< driver-specific data free function */ + void *edata; ///< Driver-specific data + void (*free_edata)(void **); ///< Driver-specific data free function }; /** @@ -120,15 +116,15 @@ struct Email */ struct EmailNode { - struct Email *email; - STAILQ_ENTRY(EmailNode) entries; + struct Email *email; ///< Email in the list + STAILQ_ENTRY(EmailNode) entries; ///< Linked list }; STAILQ_HEAD(EmailList, EmailNode); bool mutt_email_cmp_strict(const struct Email *e1, const struct Email *e2); -void mutt_email_free(struct Email **e); -struct Email *mutt_email_new(void); -size_t mutt_email_size(const struct Email *e); +void mutt_email_free (struct Email **e); +struct Email *mutt_email_new (void); +size_t mutt_email_size (const struct Email *e); void mutt_emaillist_free(struct EmailList *el); diff --git a/email/email_globals.h b/email/email_globals.h index 8aa49df22..31fe562f6 100644 --- a/email/email_globals.h +++ b/email/email_globals.h @@ -27,12 +27,12 @@ #include "mutt/mutt.h" /* Config items */ -extern bool C_AutoSubscribe; -extern bool C_MarkOld; -extern struct Regex * C_ReplyRegex; -extern char * C_SendCharset; -extern char * C_SpamSeparator; -extern bool C_Weed; +extern bool C_AutoSubscribe; +extern bool C_MarkOld; +extern struct Regex *C_ReplyRegex; +extern char * C_SendCharset; +extern char * C_SpamSeparator; +extern bool C_Weed; /* Global variables */ extern struct ListHead Ignore; ///< List of header patterns to ignore diff --git a/email/envelope.h b/email/envelope.h index e2d652d6e..60331ca0f 100644 --- a/email/envelope.h +++ b/email/envelope.h @@ -29,54 +29,53 @@ #include "mutt/mutt.h" #include "address/lib.h" -#define MUTT_ENV_CHANGED_IRT (1<<0) ///< In-Reply-To changed to link/break threads -#define MUTT_ENV_CHANGED_REFS (1<<1) ///< References changed to break thread -#define MUTT_ENV_CHANGED_XLABEL (1<<2) ///< X-Label edited -#define MUTT_ENV_CHANGED_SUBJECT (1<<3) ///< Protected header update +#define MUTT_ENV_CHANGED_IRT (1 << 0) ///< In-Reply-To changed to link/break threads +#define MUTT_ENV_CHANGED_REFS (1 << 1) ///< References changed to break thread +#define MUTT_ENV_CHANGED_XLABEL (1 << 2) ///< X-Label edited +#define MUTT_ENV_CHANGED_SUBJECT (1 << 3) ///< Protected header update /** - * struct Envelope - The header of an email + * struct Envelope - The header of an Email */ struct Envelope { - struct AddressList return_path; - struct AddressList from; - struct AddressList to; - struct AddressList cc; - struct AddressList bcc; - struct AddressList sender; - struct AddressList reply_to; - struct AddressList mail_followup_to; - struct AddressList x_original_to; - char *list_post; /**< this stores a mailto URL, or nothing */ - char *subject; - char *real_subj; /**< offset of the real subject */ - char *disp_subj; /**< display subject (modified copy of subject) */ - char *message_id; - char *supersedes; - char *date; - char *x_label; - char *organization; + struct AddressList return_path; ///< Return path for the Email + struct AddressList from; ///< Email's 'From' list + struct AddressList to; ///< Email's 'To' list + struct AddressList cc; ///< Email's 'Cc' list + struct AddressList bcc; ///< Email's 'Bcc' list + struct AddressList sender; ///< Email's sender + struct AddressList reply_to; ///< Email's 'reply-to' + struct AddressList mail_followup_to; ///< Email's 'mail-followup-to' + struct AddressList x_original_to; ///< Email's 'X-Orig-to' + char *list_post; ///< This stores a mailto URL, or nothing + char *subject; ///< Email's subject + char *real_subj; ///< Offset of the real subject + char *disp_subj; ///< Display subject (modified copy of subject) + char *message_id; ///< Message ID + char *supersedes; ///< Supersedes header + char *date; ///< Sent date + char *x_label; ///< X-Label + char *organization; ///< Organisation header #ifdef USE_NNTP - char *newsgroups; - char *xref; - char *followup_to; - char *x_comment_to; + char *newsgroups; ///< List of newsgroups + char *xref; ///< List of cross-references + char *followup_to; ///< List of 'followup-to' fields + char *x_comment_to; ///< List of 'X-comment-to' fields #endif - struct Buffer *spam; - struct ListHead references; /**< message references (in reverse order) */ - struct ListHead in_reply_to; /**< in-reply-to header content */ - struct ListHead userhdrs; /**< user defined headers */ + struct Buffer *spam; ///< Spam header + struct ListHead references; ///< message references (in reverse order) + struct ListHead in_reply_to; ///< in-reply-to header content + struct ListHead userhdrs; ///< user defined headers - unsigned char changed; /* The MUTT_ENV_CHANGED_* flags specify which - * fields are modified */ + unsigned char changed; ///< Changed fields, e.g. #MUTT_ENV_CHANGED_SUBJECT }; bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2); -void mutt_env_free(struct Envelope **p); -void mutt_env_merge(struct Envelope *base, struct Envelope **extra); -struct Envelope *mutt_env_new(void); -int mutt_env_to_intl(struct Envelope *env, const char **tag, char **err); -void mutt_env_to_local(struct Envelope *e); +void mutt_env_free (struct Envelope **p); +void mutt_env_merge (struct Envelope *base, struct Envelope **extra); +struct Envelope *mutt_env_new (void); +int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err); +void mutt_env_to_local (struct Envelope *e); #endif /* MUTT_EMAIL_ENVELOPE_H */ diff --git a/email/parameter.h b/email/parameter.h index 8c0d8087f..569ba1062 100644 --- a/email/parameter.h +++ b/email/parameter.h @@ -31,18 +31,18 @@ */ struct Parameter { - char *attribute; - char *value; - TAILQ_ENTRY(Parameter) entries; + char *attribute; ///< Parameter name + char *value; ///< Parameter value + TAILQ_ENTRY(Parameter) entries; ///< Linked list }; TAILQ_HEAD(ParameterList, Parameter); bool mutt_param_cmp_strict(const struct ParameterList *p1, const struct ParameterList *p2); -void mutt_param_delete(struct ParameterList *p, const char *attribute); -void mutt_param_free(struct ParameterList *p); -void mutt_param_free_one(struct Parameter **p); -char * mutt_param_get(const struct ParameterList *p, const char *s); -struct Parameter *mutt_param_new(void); -void mutt_param_set(struct ParameterList *p, const char *attribute, const char *value); +void mutt_param_delete (struct ParameterList *p, const char *attribute); +void mutt_param_free (struct ParameterList *p); +void mutt_param_free_one (struct Parameter **p); +char * mutt_param_get (const struct ParameterList *p, const char *s); +struct Parameter *mutt_param_new (void); +void mutt_param_set (struct ParameterList *p, const char *attribute, const char *value); #endif /* MUTT_EMAIL_PARAMETER_H */ diff --git a/email/parse.h b/email/parse.h index c6ddd4ab1..7bffbf917 100644 --- a/email/parse.h +++ b/email/parse.h @@ -32,20 +32,20 @@ struct Body; struct Envelope; struct Email; -void mutt_auto_subscribe(const char *mailto); -int mutt_check_encoding(const char *c); -enum ContentType mutt_check_mime_type(const char *s); -char * mutt_extract_message_id(const char *s, const char **saveptr); -bool mutt_is_message_type(int type, const char *subtype); -bool mutt_matches_ignore(const char *s); -void mutt_parse_content_type(const char *s, struct Body *ct); -int mutt_parse_mailto(struct Envelope *e, char **body, const char *src); -struct Body * mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off, bool digest); -void mutt_parse_part(FILE *fp, struct Body *b); -struct Body * mutt_read_mime_header(FILE *fp, bool digest); -int mutt_rfc822_parse_line(struct Envelope *env, struct Email *e, char *line, char *p, bool user_hdrs, bool weed, bool do_2047); +void mutt_auto_subscribe (const char *mailto); +int mutt_check_encoding (const char *c); +enum ContentType mutt_check_mime_type (const char *s); +char * mutt_extract_message_id (const char *s, const char **saveptr); +bool mutt_is_message_type (int type, const char *subtype); +bool mutt_matches_ignore (const char *s); +void mutt_parse_content_type (const char *s, struct Body *ct); +int mutt_parse_mailto (struct Envelope *e, char **body, const char *src); +struct Body * mutt_parse_multipart (FILE *fp, const char *boundary, LOFF_T end_off, bool digest); +void mutt_parse_part (FILE *fp, struct Body *b); +struct Body * mutt_read_mime_header (FILE *fp, bool digest); +int mutt_rfc822_parse_line (struct Envelope *env, struct Email *e, char *line, char *p, bool user_hdrs, bool weed, bool do_2047); struct Body * mutt_rfc822_parse_message(FILE *fp, struct Body *parent); -struct Envelope *mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed); -char * mutt_rfc822_read_line(FILE *fp, char *line, size_t *linelen); +struct Envelope *mutt_rfc822_read_header (FILE *fp, struct Email *e, bool user_hdrs, bool weed); +char * mutt_rfc822_read_line (FILE *fp, char *line, size_t *linelen); #endif /* MUTT_EMAIL_PARSE_H */ diff --git a/email/rfc2231.h b/email/rfc2231.h index 750d89c36..281a8e730 100644 --- a/email/rfc2231.h +++ b/email/rfc2231.h @@ -30,7 +30,7 @@ struct ParameterList; /* These Config Variables are only used in rfc2231.c */ extern bool C_Rfc2047Parameters; -void rfc2231_decode_parameters(struct ParameterList *p); -struct ParameterList rfc2231_encode_string(const char *attribute, char *value); +void rfc2231_decode_parameters(struct ParameterList *p); +struct ParameterList rfc2231_encode_string (const char *attribute, char *value); #endif /* MUTT_EMAIL_RFC2231_H */ diff --git a/email/tags.h b/email/tags.h index 13ae44c80..1c5481751 100644 --- a/email/tags.h +++ b/email/tags.h @@ -39,18 +39,18 @@ extern struct Hash *TagTransforms; */ struct TagNode { - char *name; - char *transformed; - bool hidden; - STAILQ_ENTRY(TagNode) entries; + char *name; ///< Tag name + char *transformed; ///< Transformed name + bool hidden; ///< Tag should be hidden + STAILQ_ENTRY(TagNode) entries; ///< Linked list }; STAILQ_HEAD(TagHead, TagNode); -void driver_tags_free(struct TagHead *head); -char *driver_tags_get(struct TagHead *head); -char *driver_tags_get_transformed(struct TagHead *head); +void driver_tags_free (struct TagHead *head); +char *driver_tags_get (struct TagHead *head); +char *driver_tags_get_transformed (struct TagHead *head); char *driver_tags_get_transformed_for(const char *name, struct TagHead *head); -char *driver_tags_get_with_hidden(struct TagHead *head); -bool driver_tags_replace(struct TagHead *head, char *tags); +char *driver_tags_get_with_hidden (struct TagHead *head); +bool driver_tags_replace (struct TagHead *head, char *tags); #endif /* MUTT_EMAIL_TAGS_H */ diff --git a/email/thread.h b/email/thread.h index a432d9cad..f9d3708ed 100644 --- a/email/thread.h +++ b/email/thread.h @@ -33,28 +33,29 @@ struct Email; */ struct MuttThread { - bool fake_thread : 1; - bool duplicate_thread : 1; - bool sort_children : 1; - bool check_subject : 1; - bool visible : 1; - bool deep : 1; - unsigned int subtree_visible : 2; - bool next_subtree_visible : 1; - struct MuttThread *parent; - struct MuttThread *child; - struct MuttThread *next; - struct MuttThread *prev; - struct Email *message; - struct Email *sort_key; + bool fake_thread : 1; ///< Emails grouped by Subject + bool duplicate_thread : 1; ///< Duplicated Email in Thread + bool sort_children : 1; ///< Sort the children + bool check_subject : 1; ///< Should the Subject be checked? + bool visible : 1; ///< Is this Thread visible? + bool deep : 1; ///< Is the Thread deeply nested? + unsigned int subtree_visible : 2; ///< Is this Thread subtree visible? + bool next_subtree_visible : 1; ///< Is the next Thread subtree visible? + + struct MuttThread *parent; ///< Parent of this Thread + struct MuttThread *child; ///< Child of this Thread + struct MuttThread *next; ///< Next sibling Thread + struct MuttThread *prev; ///< Previous sibling Thread + struct Email *message; ///< Email this Thread refers to + struct Email *sort_key; ///< Email that this Thread is sorted against }; -void clean_references(struct MuttThread *brk, struct MuttThread *cur); -struct Email * find_virtual(struct MuttThread *cur, int reverse); -void insert_message(struct MuttThread **add, struct MuttThread *parent, struct MuttThread *cur); -bool is_descendant(struct MuttThread *a, struct MuttThread *b); -void mutt_break_thread(struct Email *e); -void thread_hash_destructor(int type, void *obj, intptr_t data); -void unlink_message(struct MuttThread **old, struct MuttThread *cur); +void clean_references (struct MuttThread *brk, struct MuttThread *cur); +struct Email *find_virtual (struct MuttThread *cur, int reverse); +void insert_message (struct MuttThread **add, struct MuttThread *parent, struct MuttThread *cur); +bool is_descendant (struct MuttThread *a, struct MuttThread *b); +void mutt_break_thread (struct Email *e); +void thread_hash_destructor(int type, void *obj, intptr_t data); +void unlink_message (struct MuttThread **old, struct MuttThread *cur); #endif /* MUTT_EMAIL_THREAD_H */ diff --git a/email/url.h b/email/url.h index 74f1db108..7c8ecbb1c 100644 --- a/email/url.h +++ b/email/url.h @@ -54,9 +54,9 @@ enum UrlScheme */ struct UrlQueryString { - char *name; - char *value; - STAILQ_ENTRY(UrlQueryString) entries; + char *name; ///< Query name + char *value; ///< Query value + STAILQ_ENTRY(UrlQueryString) entries; ///< Linked list }; STAILQ_HEAD(UrlQueryStringHead, UrlQueryString); @@ -65,22 +65,22 @@ STAILQ_HEAD(UrlQueryStringHead, UrlQueryString); */ struct Url { - enum UrlScheme scheme; - char *user; - char *pass; - char *host; - unsigned short port; - char *path; - struct UrlQueryStringHead query_strings; - char *src; + enum UrlScheme scheme; ///< Scheme, e.g. #U_SMTPS + char *user; ///< Username + char *pass; ///< Password + char *host; ///< Host + unsigned short port; ///< Port + char *path; ///< Path + struct UrlQueryStringHead query_strings; ///< List of query strings + char *src; ///< Raw URL string }; enum UrlScheme url_check_scheme(const char *s); -void url_free(struct Url **u); -struct Url *url_parse(const char *src); -int url_pct_decode(char *s); -void url_pct_encode(char *buf, size_t buflen, const char *src); -int url_tobuffer(struct Url *u, struct Buffer *dest, int flags); -int url_tostring(struct Url *u, char *buf, size_t buflen, int flags); +void url_free (struct Url **u); +struct Url *url_parse (const char *src); +int url_pct_decode (char *s); +void url_pct_encode (char *buf, size_t buflen, const char *src); +int url_tobuffer (struct Url *u, struct Buffer *dest, int flags); +int url_tostring (struct Url *u, char *buf, size_t buflen, int flags); #endif /* MUTT_EMAIL_URL_H */ -- 2.40.0