From 491f95419ac76ba30968baf481ab739c4003e29b Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 12 Jul 2017 12:28:47 +0100 Subject: [PATCH] doxygen: add struct/enum/union templates --- account.h | 7 ++++++- address.h | 3 +++ alias.h | 3 +++ attach.h | 3 +++ bcache.c | 3 +++ bcache.h | 2 +- body.h | 3 +++ browser.c | 3 +++ browser.h | 6 ++++++ buffer.h | 3 +++ buffy.h | 3 +++ charset.c | 6 ++++++ color.c | 3 +++ compose.c | 7 ++++++- content.h | 6 +++++- context.h | 7 ++++++- doc/makedoc.c | 11 ++++++++++- enter.c | 4 +++- enter_state.h | 3 +++ envelope.h | 3 +++ format_flags.h | 4 +++- group.h | 6 ++++++ handler.c | 6 ++++++ hash.h | 12 ++++++++++++ hcache/backend.h | 3 +++ hcache/bdb.c | 3 +++ hcache/hcache.c | 3 +++ hcache/hcache.h | 2 +- hcache/lmdb.c | 6 ++++++ hdrline.c | 7 ++++++- header.h | 3 +++ history.c | 4 ++++ history.h | 3 +++ hook.c | 3 +++ imap/auth.h | 6 ++++++ imap/command.c | 4 ++++ imap/imap.h | 4 +++- imap/imap_private.h | 37 ++++++++++++++++++++++++++++++++----- imap/message.h | 13 ++++++++----- init.c | 10 ++++++---- keymap.c | 4 ++++ keymap.h | 13 +++++++++++-- lib.c | 3 +++ list.h | 3 +++ mailbox.h | 7 ++++++- mapping.h | 3 +++ mbox.c | 4 +++- mbyte_table.h | 7 +++++-- md5.h | 6 +++++- mh.c | 9 +++++++++ mime.h | 12 +++++++++--- mutt.h | 17 ++++++++++++++--- mutt_commands.h | 3 +++ mutt_curses.h | 18 +++++++++++++++++- mutt_menu.h | 3 +++ mutt_notmuch.c | 2 +- mutt_options.h | 11 +++++++---- mutt_regex.h | 9 +++++++++ mutt_sasl.h | 3 +++ mutt_socket.h | 6 ++++-- mutt_ssl.c | 3 +++ mutt_ssl_gnutls.c | 6 ++++-- mutt_tunnel.c | 4 +++- mx.h | 7 +++++-- ncrypt/crypt_gpgme.c | 20 +++++++++++++++++--- ncrypt/crypt_mod.c | 6 +++++- ncrypt/crypt_mod.h | 12 ++++++++---- ncrypt/pgpinvoke.c | 5 +++-- ncrypt/pgpkey.c | 6 ++++++ ncrypt/pgpkey.h | 6 +++++- ncrypt/pgplib.h | 9 +++++++++ ncrypt/pgppacket.h | 3 +++ ncrypt/smime.c | 3 +++ ncrypt/smime.h | 3 +++ nntp.c | 6 ++++++ nntp.h | 18 ++++++++++++++++++ options.h | 4 +++- pager.c | 18 ++++++++++++++++++ pager.h | 3 +++ parameter.h | 3 +++ parse.c | 3 +++ pattern.c | 17 +++++++++++++++-- pattern.h | 11 ++++++++++- pop.h | 15 +++++++++++++++ protos.h | 6 ++++++ query.c | 6 ++++++ remailer.c | 6 +++++- remailer.h | 6 ++++++ rfc1524.h | 3 +++ rfc2231.c | 3 +++ rfc3676.c | 3 +++ rfc822.h | 4 +++- score.c | 3 +++ sendlib.c | 6 ++++++ sha1.h | 3 +++ sidebar.c | 7 ++++++- smtp.c | 3 +++ state.h | 3 +++ thread.h | 3 +++ url.h | 6 ++++++ version.c | 3 +++ 101 files changed, 567 insertions(+), 69 deletions(-) diff --git a/account.h b/account.h index be781a52da3..baf758eab57 100644 --- a/account.h +++ b/account.h @@ -27,7 +27,9 @@ struct CissUrl; -/* account types */ +/** + * enum AccountType - account types + */ enum AccountType { MUTT_ACCT_TYPE_NONE = 0, @@ -44,6 +46,9 @@ enum AccountType #define MUTT_ACCT_PASS (1 << 3) #define MUTT_ACCT_SSL (1 << 4) +/** + * struct Account - Login details for a remote server + */ struct Account { char user[64]; diff --git a/address.h b/address.h index 5a3afb5d4f0..a39649eba18 100644 --- a/address.h +++ b/address.h @@ -25,6 +25,9 @@ #include +/** + * struct Address - An email address + */ struct Address { char *personal; /**< real name of address */ diff --git a/alias.h b/alias.h index 51739403cb8..25801cb6aee 100644 --- a/alias.h +++ b/alias.h @@ -28,6 +28,9 @@ struct Envelope; struct Address; +/** + * struct Alias - A shortcut for an email address + */ struct Alias { struct Alias *self; /* XXX - ugly hack */ diff --git a/attach.h b/attach.h index 254e52a8af5..140a0ce3b27 100644 --- a/attach.h +++ b/attach.h @@ -32,6 +32,9 @@ struct Menu; struct Header; struct Body; +/** + * struct AttachPtr - An email to which things will be attached + */ struct AttachPtr { struct Body *content; diff --git a/bcache.c b/bcache.c index 6d08cc5fe23..3faced148cc 100644 --- a/bcache.c +++ b/bcache.c @@ -38,6 +38,9 @@ static int mutt_bcache_move(struct BodyCache *bcache, const char *id, const char *newid); +/** + * struct BodyCache - Local cache of email bodies + */ struct BodyCache { char path[_POSIX_PATH_MAX]; diff --git a/bcache.h b/bcache.h index ef305d4d62c..861cc823cd0 100644 --- a/bcache.h +++ b/bcache.h @@ -61,7 +61,7 @@ FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id); * mutt_bcache_put - Create a file in the Body Cache * @param bcache Body Cache from mutt_bcache_open() * @param id Per-mailbox unique identifier for the message - * @param tmp Returned FILE* is in a temporary location. + * @param tmp Returned FILE* is in a temporary location * If set, use mutt_bcache_commit to put it into place * @return FILE* on success, NULL on failure */ diff --git a/body.h b/body.h index affa384e098..767762d3880 100644 --- a/body.h +++ b/body.h @@ -27,6 +27,9 @@ #include #include +/** + * struct Body - The body of an email + */ struct Body { char *xtype; /**< content-type if x-unknown */ diff --git a/browser.c b/browser.c index cda97db454a..ac9d3af8727 100644 --- a/browser.c +++ b/browser.c @@ -93,6 +93,9 @@ static struct Mapping FolderNewsHelp[] = { }; #endif +/** + * struct Folder - A folder/dir in the browser + */ struct Folder { struct FolderFile *ff; diff --git a/browser.h b/browser.h index a51f0af88b8..d84af292f1b 100644 --- a/browser.h +++ b/browser.h @@ -27,6 +27,9 @@ #include #include +/** + * struct FolderFile - Browser entry representing a folder/dir + */ struct FolderFile { mode_t mode; @@ -58,6 +61,9 @@ struct FolderFile bool tagged : 1; }; +/** + * struct BrowserState - State of the file/mailbox browser + */ struct BrowserState { struct FolderFile *entry; diff --git a/buffer.h b/buffer.h index 38bd3e762eb..9480374b290 100644 --- a/buffer.h +++ b/buffer.h @@ -23,6 +23,9 @@ #include +/** + * struct Buffer - String manipulation buffer + */ struct Buffer { char *data; /**< pointer to data */ diff --git a/buffy.h b/buffy.h index 4a36231cabb..a768e954bf5 100644 --- a/buffy.h +++ b/buffy.h @@ -35,6 +35,9 @@ struct stat; #define MUTT_NAMED 1 #define MUTT_VIRTUAL 2 +/** + * struct Buffy - A mailbox + */ struct Buffy { char path[_POSIX_PATH_MAX]; diff --git a/charset.c b/charset.c index e8b09da29f3..071809f7c9c 100644 --- a/charset.c +++ b/charset.c @@ -478,6 +478,9 @@ int mutt_convert_string(char **ps, const char *from, const char *to, int flags) * Used in sendlib.c for converting from mutt's Charset */ +/** + * struct FgetConv - Cursor for converting a file's encoding + */ struct FgetConv { FILE *file; @@ -491,6 +494,9 @@ struct FgetConv ICONV_CONST char **inrepls; }; +/** + * struct FgetConvNot - A dummy converter + */ struct FgetConvNot { FILE *file; diff --git a/color.c b/color.c index 5fc852bc022..e6cd6c9bd55 100644 --- a/color.c +++ b/color.c @@ -65,6 +65,9 @@ static int ColorQuoteSize; #define COLOR_DEFAULT (-2) +/** + * struct ColorList - A set of colors + */ struct ColorList { short fg; diff --git a/compose.c b/compose.c index 3554542e6e9..7f81c5d93b9 100644 --- a/compose.c +++ b/compose.c @@ -76,7 +76,9 @@ static const char *There_are_no_attachments = N_("There are no attachments."); break; \ } - +/** + * enum HeaderField - Ordered list of headers for the compose screen + */ enum HeaderField { HDR_FROM = 0, @@ -526,6 +528,9 @@ static void update_idx(struct Menu *menu, struct AttachPtr **idx, short idxlen) return; } +/** + * struct ComposeRedrawData - Keep track when the compose screen needs redrawing + */ struct ComposeRedrawData { struct Header *msg; diff --git a/content.h b/content.h index 82bed56d291..d8a938ffb90 100644 --- a/content.h +++ b/content.h @@ -25,7 +25,11 @@ #include -/* Information that helps in determining the Content-* of an attachment */ +/** + * struct Content - Info about an attachment + * + * Information that helps in determining the Content-* of an attachment + */ struct Content { long hibin; /**< 8-bit characters */ diff --git a/context.h b/context.h index 0d624248508..1c90f85683e 100644 --- a/context.h +++ b/context.h @@ -28,7 +28,9 @@ #include #include -/* ACL Rights */ +/** + * enum AclRights - ACL Rights + */ enum AclRights { MUTT_ACL_LOOKUP = 0, @@ -46,6 +48,9 @@ enum AclRights RIGHTSMAX }; +/** + * struct Context - The "current" mailbox + */ struct Context { char *path; diff --git a/doc/makedoc.c b/doc/makedoc.c index 7b481e89291..e6f4e4dd3f4 100644 --- a/doc/makedoc.c +++ b/doc/makedoc.c @@ -45,6 +45,9 @@ extern int optind; #define BUFFSIZE 2048 +/** + * enum OutputFormats - Documentation output formats + */ enum OutputFormats { F_CONF, @@ -66,6 +69,9 @@ enum OutputFormats #define D_IL (1 << 10) #define D_TT (1 << 11) +/** + * enum SpecialChars - All specially-treated characters + */ enum SpecialChars { SP_START_EM, @@ -935,6 +941,9 @@ static int handle_docline(char *l, FILE *out, int docstat) * following string definitions! */ +/** + * enum DataType - User-variable types + */ enum DataType { DT_NONE = 0, @@ -951,7 +960,7 @@ enum DataType DT_MBCHARTBL }; -struct +struct VariableTypes { char *machine; char *human; diff --git a/enter.c b/enter.c index c71fe669762..bf8a817fe88 100644 --- a/enter.c +++ b/enter.c @@ -39,7 +39,9 @@ #include "options.h" #include "protos.h" -/* redraw flags for mutt_enter_string() */ +/** + * enum RedrawFlags - redraw flags for mutt_enter_string() + */ enum RedrawFlags { MUTT_REDRAW_INIT = 1, /**< go to end of line and redraw */ diff --git a/enter_state.h b/enter_state.h index 1218905bbbf..f19782042e6 100644 --- a/enter_state.h +++ b/enter_state.h @@ -26,6 +26,9 @@ #include #include "lib.h" +/** + * struct EnterState - Keep our place when entering a string + */ struct EnterState { wchar_t *wbuf; diff --git a/envelope.h b/envelope.h index 47c3f7c8d75..d8a6d3e3116 100644 --- a/envelope.h +++ b/envelope.h @@ -26,6 +26,9 @@ #include #include "lib.h" +/** + * struct Envelope - The header of an email + */ struct Envelope { struct Address *return_path; diff --git a/format_flags.h b/format_flags.h index f6c3702c4dc..286616a08b8 100644 --- a/format_flags.h +++ b/format_flags.h @@ -25,7 +25,9 @@ #include -/* flags for mutt_FormatString() */ +/** + * enum FormatFlag - Control the behaviour of mutt_FormatString() + */ enum FormatFlag { MUTT_FORMAT_FORCESUBJ = (1 << 0), /**< print the subject even if unchanged */ diff --git a/group.h b/group.h index 4ff4a43ef81..30569d1bf16 100644 --- a/group.h +++ b/group.h @@ -32,6 +32,9 @@ struct Buffer; #define MUTT_GROUP 0 #define MUTT_UNGROUP 1 +/** + * struct Group - A set of email addresses + */ struct Group { struct Address *as; @@ -39,6 +42,9 @@ struct Group char *name; }; +/** + * struct GroupContext - A set of Groups + */ struct GroupContext { struct Group *g; diff --git a/handler.c b/handler.c index e215f925068..2fef1700601 100644 --- a/handler.c +++ b/handler.c @@ -474,6 +474,9 @@ static void decode_uuencoded(struct State *s, long len, int istext, iconv_t cd) #define IndentSize (4) +/** + * enum RichAttribs - Rich text attributes + */ enum RichAttribs { RICH_PARAM = 0, @@ -513,6 +516,9 @@ static const struct { NULL, -1 }, }; +/** + * struct EnrichedState - State of enriched-text parser + */ struct EnrichedState { wchar_t *buffer; diff --git a/hash.h b/hash.h index 775741e8f55..d57d4747c15 100644 --- a/hash.h +++ b/hash.h @@ -25,11 +25,17 @@ #include +/** + * union HashKey - The data item stored in a HashElem + */ union HashKey { const char *strkey; unsigned int intkey; }; +/** + * struct HashElem - The item stored in a Hash Table + */ struct HashElem { union HashKey key; @@ -37,6 +43,9 @@ struct HashElem struct HashElem *next; }; +/** + * struct Hash - A Hash Table + */ struct Hash { int nelem; @@ -71,6 +80,9 @@ void int_hash_delete(struct Hash *table, unsigned int intkey, const void *data, void hash_destroy(struct Hash **ptr, void (*destroy)(void *)); +/** + * struct HashWalkState - Cursor to iterate through a Hash Table + */ struct HashWalkState { int index; diff --git a/hcache/backend.h b/hcache/backend.h index 362cec54386..63698681188 100644 --- a/hcache/backend.h +++ b/hcache/backend.h @@ -95,6 +95,9 @@ typedef void (*hcache_close_t)(void **ctx); */ typedef const char *(*hcache_backend_t)(void); +/** + * struct HcacheOps - Header Cache API + */ struct HcacheOps { const char *name; diff --git a/hcache/bdb.c b/hcache/bdb.c index b8c88fb5e98..c02cfb76eeb 100644 --- a/hcache/bdb.c +++ b/hcache/bdb.c @@ -37,6 +37,9 @@ #include "lib.h" #include "mx.h" +/** + * struct HcacheDbCtx - Berkeley DB context + */ struct HcacheDbCtx { DB_ENV *env; diff --git a/hcache/hcache.c b/hcache/hcache.c index 745f57cce64..1d7c230c90b 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -75,6 +75,9 @@ struct HeaderCache void *ctx; }; +/** + * union Validate - Header cache validity + */ union Validate { struct timeval timeval; unsigned int uidvalidity; diff --git a/hcache/hcache.h b/hcache/hcache.h index 315c7fbb08c..2ffeec165f4 100644 --- a/hcache/hcache.h +++ b/hcache/hcache.h @@ -98,7 +98,7 @@ struct Header *mutt_hcache_restore(const unsigned char *d); * @param key Message identification string * @param keylen Length of the string pointed to by key * @param header Message header to store - * @param uidvalidity IMAP-specific UIDVALIDITY value, or 0 to use the current time. + * @param uidvalidity IMAP-specific UIDVALIDITY value, or 0 to use the current time * @return 0 on success, -1 otherwise */ int mutt_hcache_store(header_cache_t *h, const char *key, size_t keylen, diff --git a/hcache/lmdb.c b/hcache/lmdb.c index 8aadb179b62..12461f99b09 100644 --- a/hcache/lmdb.c +++ b/hcache/lmdb.c @@ -33,6 +33,9 @@ * The file is mmap(2)'d into memory. */ const size_t LMDB_DB_SIZE = 2147483648; +/** + * enum MdbTxnMode - LMDB transaction state + */ enum MdbTxnMode { TXN_UNINITIALIZED, @@ -40,6 +43,9 @@ enum MdbTxnMode TXN_WRITE }; +/** + * struct HcacheLmdbCtx - LMDB context + */ struct HcacheLmdbCtx { MDB_env *env; diff --git a/hdrline.c b/hdrline.c index bcb9c66de05..08a7f2ad015 100644 --- a/hdrline.c +++ b/hdrline.c @@ -54,9 +54,11 @@ #include "mutt_notmuch.h" #endif +/** + * enum FlagChars - Index into the FlagChars variable ($flag_chars) + */ enum FlagChars { - /* Indexing into the Flagchars variable ($flag_chars) */ FlagCharTagged, FlagCharImportant, FlagCharDeleted, @@ -181,6 +183,9 @@ static size_t add_index_color(char *buf, size_t buflen, enum FormatFlag flags, c return 2; } +/** + * enum FieldType - Header types + */ enum FieldType { DISP_TO, diff --git a/header.h b/header.h index e683402392c..61340a8d87a 100644 --- a/header.h +++ b/header.h @@ -28,6 +28,9 @@ #include #include "lib.h" +/** + * struct Header - The header/envelope of an email + */ struct Header { unsigned int security : 12; /**< bit 0-8: flags, bit 9,10: application. diff --git a/history.c b/history.c index 147e4824ab6..d12fce8c01e 100644 --- a/history.c +++ b/history.c @@ -71,6 +71,10 @@ * next oldest entry * HistSize entry */ + +/** + * struct History - Saved list of user-entered commands/searches + */ struct History { char **hist; diff --git a/history.h b/history.h index 746bcd30b8c..7fcd45e190e 100644 --- a/history.h +++ b/history.h @@ -23,6 +23,9 @@ #ifndef _MUTT_HISTORY_H #define _MUTT_HISTORY_H +/** + * enum HistoryClass - Type to differentiate different histories + */ enum HistoryClass { HC_CMD, diff --git a/hook.c b/hook.c index 57bb7064a79..033d74092ad 100644 --- a/hook.c +++ b/hook.c @@ -47,6 +47,9 @@ #include "compress.h" #endif +/** + * struct Hook - A list of user hooks + */ struct Hook { int type; /**< hook type */ diff --git a/imap/auth.h b/imap/auth.h index e7c8604cf2b..c20eec8fe6f 100644 --- a/imap/auth.h +++ b/imap/auth.h @@ -28,6 +28,9 @@ struct ImapData; +/** + * enum ImapAuthRes - Results of IMAP Authentication + */ enum ImapAuthRes { IMAP_AUTH_SUCCESS = 0, @@ -35,6 +38,9 @@ enum ImapAuthRes IMAP_AUTH_UNAVAIL }; +/** + * struct ImapAuth - IMAP authentication multiplexor + */ struct ImapAuth { /* do authentication, using named method or any available if method is NULL */ diff --git a/imap/command.c b/imap/command.c index 7a7b9e05ff0..791b4d7d8fb 100644 --- a/imap/command.c +++ b/imap/command.c @@ -61,6 +61,10 @@ static const char *const Capabilities[] = { }; /* Gmail document one string but use another. Support both. */ + +/** + * struct CapabilityAlias - Alternative names for capabilities + */ struct CapabilityAlias { char *name; diff --git a/imap/imap.h b/imap/imap.h index 9ead5cd9546..f9c660fa464 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -34,7 +34,9 @@ struct Context; struct Message; struct BrowserState; -/* -- data structures -- */ +/** + * struct ImapMbox - An IMAP mailbox + */ struct ImapMbox { struct Account account; diff --git a/imap/imap_private.h b/imap/imap_private.h index 9fbf3ce072e..9956ecda981 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -86,12 +86,18 @@ struct Progress; /* length of "DD-MMM-YYYY HH:MM:SS +ZZzz" (null-terminated) */ #define IMAP_DATELEN 27 +/** + * enum ImapFlags - IMAP server responses + */ enum ImapFlags { IMAP_FATAL = 1, IMAP_BYE }; +/** + * enum ImapState - IMAP connection state + */ enum ImapState { /* States */ @@ -104,15 +110,19 @@ enum ImapState IMAP_IDLE }; +/** + * enum ImapNamespace - IMAP namespace types + */ enum ImapNamespace { - /* Namespace types */ IMAP_NS_PERSONAL = 0, IMAP_NS_OTHER, IMAP_NS_SHARED }; -/* Capabilities we are interested in */ +/** + * enum ImapCaps - Capabilities we are interested in + */ enum ImapCaps { IMAP4 = 0, @@ -137,13 +147,18 @@ enum ImapCaps #define MUTT_IMAP_CONN_NONEW (1 << 0) #define MUTT_IMAP_CONN_NOSELECT (1 << 1) -/* -- data structures -- */ +/** + * struct ImapCache - IMAP-specific message cache + */ struct ImapCache { unsigned int uid; char *path; }; +/** + * struct ImapStatus - Status of an IMAP mailbox + */ struct ImapStatus { char *name; @@ -155,6 +170,9 @@ struct ImapStatus unsigned int unseen; }; +/** + * struct ImapList - Items in an IMAP browser + */ struct ImapList { char *name; @@ -163,13 +181,18 @@ struct ImapList bool noinferiors; }; -/* IMAP command structure */ +/** + * struct ImapCommand - IMAP command structure + */ struct ImapCommand { char seq[SEQLEN + 1]; int state; }; +/** + * enum ImapCommandType - IMAP command type + */ enum ImapCommandType { IMAP_CT_NONE = 0, @@ -177,9 +200,13 @@ enum ImapCommandType IMAP_CT_STATUS }; +/** + * struct ImapData - IMAP-specific server data + * + * This data is specific to a Connection to an IMAP server + */ struct ImapData { - /* This data is specific to a Connection to an IMAP server */ struct Connection *conn; bool recovering; unsigned char state; diff --git a/imap/message.h b/imap/message.h index e480de9a9de..6f05eed4556 100644 --- a/imap/message.h +++ b/imap/message.h @@ -21,16 +21,17 @@ * this program. If not, see . */ -/* message.c data structures */ - #ifndef _MUTT_IMAP_MESSAGE_H #define _MUTT_IMAP_MESSAGE_H #include #include -/* -- data structures -- */ -/* IMAP-specific header data, stored as Header->data */ +/** + * struct ImapHeaderData - IMAP-specific header data + * + * IMAP-specific header data, stored as Header->data + */ struct ImapHeaderData { /* server-side flags */ @@ -48,6 +49,9 @@ struct ImapHeaderData struct List *keywords; }; +/** + * struct ImapHeader - IMAP-specific header + */ struct ImapHeader { struct ImapHeaderData *data; @@ -56,7 +60,6 @@ struct ImapHeader long content_length; }; -/* -- macros -- */ #define HEADER_DATA(ph) ((struct ImapHeaderData *) ((ph)->data)) #endif /* _MUTT_IMAP_MESSAGE_H */ diff --git a/init.c b/init.c index ac48e6ee3a6..8d088f8bfb3 100644 --- a/init.c +++ b/init.c @@ -82,6 +82,9 @@ return -1; \ } +/** + * struct MyVar - A user-set variable + */ struct MyVar { char *name; @@ -1271,6 +1274,9 @@ static int parse_lists(struct Buffer *buf, struct Buffer *s, unsigned long data, return -1; } +/** + * enum GroupState - Type of email address group + */ enum GroupState { GS_NONE, @@ -2179,8 +2185,6 @@ char **mutt_envlist(void) /** * start_debug - prepare the debugging file * - * @return nothing - * * This method prepares and opens a new debug file for mutt_debug. */ static void start_debug(void) @@ -2212,8 +2216,6 @@ static void start_debug(void) /** * restart_debug - reload the debugging configuration * - * @return nothing - * * This method closes the old debug file is debug was enabled, * then reconfigure the debugging system from the configuration options * and start a new debug file if debug is enabled diff --git a/keymap.c b/keymap.c index 8b12d7e4cbc..92e8f08f627 100644 --- a/keymap.c +++ b/keymap.c @@ -671,6 +671,10 @@ struct Keymap *km_find_func(int menu, int func) } #ifdef NCURSES_VERSION + +/** + * struct Extkey - Map key names from NeoMutt's style to Curses style + */ struct Extkey { const char *name; diff --git a/keymap.h b/keymap.h index 78498735f92..b6b701ad717 100644 --- a/keymap.h +++ b/keymap.h @@ -37,7 +37,11 @@ int km_dokey(int menu); void init_extended_keys(void); -/* entry in the keymap tree */ +/** + * struct Keymap - A keyboard mapping + * + * entry in the keymap tree + */ struct Keymap { char *macro; /**< macro expansion (op == OP_MACRO) */ @@ -55,6 +59,9 @@ void km_init(void); void km_error_key(int menu); void mutt_what_key(void); +/** + * enum MenuTypes - Types of GUI selections + */ enum MenuTypes { MENU_ALIAS, @@ -68,7 +75,6 @@ enum MenuTypes MENU_POST, MENU_QUERY, - MENU_PGP, MENU_SMIME, @@ -92,6 +98,9 @@ extern int LastKey; extern const struct Mapping Menus[]; +/** + * struct Binding - Mapping between a user key and a function + */ struct Binding { char *name; /**< name of the function */ diff --git a/lib.c b/lib.c index d723170c679..5c73a98e91a 100644 --- a/lib.c +++ b/lib.c @@ -49,6 +49,9 @@ #define EX_OK 0 #endif +/** + * struct SysExits - Lookup table of error messages + */ static const struct SysExits { int v; diff --git a/list.h b/list.h index 5c6679290dc..ed48213f1ab 100644 --- a/list.h +++ b/list.h @@ -25,6 +25,9 @@ #include "lib.h" +/** + * struct List - Singly-linked List type + */ struct List { char *data; diff --git a/mailbox.h b/mailbox.h index 6b01b394acc..dce45fba9e7 100644 --- a/mailbox.h +++ b/mailbox.h @@ -46,7 +46,9 @@ struct Context; #define MUTT_ADD_FROM (1 << 0) /**< add a From_ line */ #define MUTT_SET_DRAFT (1 << 1) /**< set the message draft flag */ -/* return values from mx_check_mailbox() */ +/** + * enum MxCheckReturns - Return values from mx_check_mailbox() + */ enum MxCheckReturns { MUTT_NEW_MAIL = 1, /**< new mail received in mailbox */ @@ -55,6 +57,9 @@ enum MxCheckReturns MUTT_FLAGS /**< nondestructive flags change (IMAP) */ }; +/** + * struct Message - A local copy of an email + */ struct Message { FILE *fp; /**< pointer to the message data */ diff --git a/mapping.h b/mapping.h index d9183784b17..755627d9108 100644 --- a/mapping.h +++ b/mapping.h @@ -25,6 +25,9 @@ #include +/** + * struct Mapping - Mapping between user-readable string and a constant + */ struct Mapping { const char *name; diff --git a/mbox.c b/mbox.c index 5ee78cc54e2..98e92a64f25 100644 --- a/mbox.c +++ b/mbox.c @@ -54,7 +54,9 @@ #include "sort.h" #include "thread.h" -/* struct used by mutt_sync_mailbox() to store new offsets */ +/** + * struct MUpdate - Store of new offsets, used by mutt_sync_mailbox() + */ struct MUpdate { short valid; diff --git a/mbyte_table.h b/mbyte_table.h index 96b7268cb2b..702ffdacd55 100644 --- a/mbyte_table.h +++ b/mbyte_table.h @@ -23,10 +23,13 @@ #ifndef _MUTT_MBYTE_TABLE_H #define _MUTT_MBYTE_TABLE_H -/* multibyte character table. +/** + * struct MbCharTable - multibyte character table + * * Allows for direct access to the individual multibyte characters in a * string. This is used for the Flagchars, Fromchars, StChars and Tochars - * option types. */ + * option types. + */ struct MbCharTable { int len; /**< number of characters */ diff --git a/md5.h b/md5.h index 7a78cf01915..774726d61c1 100644 --- a/md5.h +++ b/md5.h @@ -35,7 +35,11 @@ typedef uint32_t md5_uint32; -/* Structure to save state of computation between the single steps. */ +/** + * struct Md5Ctx - Cursor for the MD5 hashing + * + * Structure to save state of computation between the single steps. + */ struct Md5Ctx { md5_uint32 A; diff --git a/mh.c b/mh.c index 1e87f85bd7c..e248c2c6028 100644 --- a/mh.c +++ b/mh.c @@ -69,6 +69,9 @@ #define INS_SORT_THRESHOLD 6 +/** + * struct Maildir - A Maildir mailbox + */ struct Maildir { struct Header *h; @@ -78,12 +81,18 @@ struct Maildir struct Maildir *next; }; +/** + * struct MhSequences - Set of MH sequence numbers + */ struct MhSequences { int max; short *flags; }; +/** + * struct MhData - MH-specific mailbox data + */ struct MhData { time_t mtime_cur; diff --git a/mime.h b/mime.h index 3c503be3dda..0d059f6b265 100644 --- a/mime.h +++ b/mime.h @@ -23,7 +23,9 @@ #ifndef _MUTT_MIME_H #define _MUTT_MIME_H -/* Content-Type */ +/** + * enum ContentType - Content-Type + */ enum ContentType { TYPEOTHER, @@ -38,7 +40,9 @@ enum ContentType TYPEANY }; -/* Content-Transfer-Encoding */ +/** + * enum ContentEncoding - Content-Transfer-Encoding + */ enum ContentEncoding { ENCOTHER, @@ -50,7 +54,9 @@ enum ContentEncoding ENCUUENCODED }; -/* Content-Disposition values */ +/** + * enum ContentDisposition - Content-Disposition values + */ enum ContentDisposition { DISPINLINE, diff --git a/mutt.h b/mutt.h index 3c3f89a80b9..e9c71c03de6 100644 --- a/mutt.h +++ b/mutt.h @@ -128,6 +128,9 @@ struct State; #define MUTT_THREAD_NEXT_UNREAD (1 << 4) #define MUTT_THREAD_FLAGGED (1 << 5) +/** + * enum MuttMisc - Unsorted flags + */ enum MuttMisc { /* modes for mutt_view_attachment() */ @@ -218,7 +221,9 @@ enum MuttMisc MUTT_SAVE_OVERWRITE }; -/* possible arguments to set_quadoption() */ +/** + * enum QuadOptionResponse - Possible values of a QuadOption + */ enum QuadOptionResponse { MUTT_ABORT = -1, @@ -228,7 +233,9 @@ enum QuadOptionResponse MUTT_ASKYES }; -/* quad-option vars */ +/** + * enum QuadOptionVars - Index of all QuadOptions + */ enum QuadOptionVars { OPT_ABORT, @@ -347,7 +354,11 @@ void state_prefix_putc(char c, struct State *s); int state_printf(struct State *s, const char *fmt, ...); int state_putws(const wchar_t *ws, struct State *s); -/* for attachment counter */ +/** + * struct AttachMatch - An attachment matching a regex + * + * for attachment counter + */ struct AttachMatch { char *major; diff --git a/mutt_commands.h b/mutt_commands.h index 1e9a0f145b5..55397e78836 100644 --- a/mutt_commands.h +++ b/mutt_commands.h @@ -25,6 +25,9 @@ struct Buffer; +/** + * struct Command - A user-callable command + */ struct Command { char *name; diff --git a/mutt_curses.h b/mutt_curses.h index 73f68928f9b..c31ddce4239 100644 --- a/mutt_curses.h +++ b/mutt_curses.h @@ -102,6 +102,9 @@ void mutt_curs_set(int cursor); #define CI_is_return(c) ((c) == '\r' || (c) == '\n') #endif +/** + * struct Event - An event such as a keypress + */ struct Event { int ch; /**< raw key pressed */ @@ -126,6 +129,9 @@ void mutt_need_hard_redraw(void); * Support for color */ +/** + * enum ColorId - List of all colored objects + */ enum ColorId { MT_COLOR_HDEFAULT = 0, @@ -182,6 +188,9 @@ enum ColorId MT_COLOR_MAX }; +/** + * struct ColorLine - A regular expression and a color to highlight a line + */ struct ColorLine { regex_t rx; @@ -198,6 +207,9 @@ struct ColorLine #define MUTT_PROGRESS_SIZE (1 << 0) /**< traffic-based progress */ #define MUTT_PROGRESS_MSG (1 << 1) /**< message-based progress */ +/** + * struct Progress - A progress bar + */ struct Progress { unsigned short inc; @@ -216,7 +228,11 @@ void mutt_progress_init(struct Progress *progress, const char *msg, * was initialized with positive size, otherwise no percentage is shown */ void mutt_progress_update(struct Progress *progress, long pos, int percent); -/* Windows for different parts of the screen */ +/** + * struct MuttWindow - A division of the screen + * + * Windows for different parts of the screen + */ struct MuttWindow { int rows; diff --git a/mutt_menu.h b/mutt_menu.h index 39cdf87faa6..6c8a52d255a 100644 --- a/mutt_menu.h +++ b/mutt_menu.h @@ -45,6 +45,9 @@ #define MUTT_MODEFMT "-- Mutt: %s" +/** + * struct Menu - GUI selectable list of items + */ struct Menu { char *title; /**< the title of this menu */ diff --git a/mutt_notmuch.c b/mutt_notmuch.c index d8a4143e072..0f0b8510b9f 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -75,7 +75,7 @@ LIBNOTMUCH_MICRO_VERSION >= (_micro))) /** - * enum NmQueryType - Query Types + * enum NmQueryType - NotMuch Query Types * * Read whole-thread or matching messages only? */ diff --git a/mutt_options.h b/mutt_options.h index 26056a2338e..bbbb6f54db6 100644 --- a/mutt_options.h +++ b/mutt_options.h @@ -51,12 +51,15 @@ struct Buffer; #define DT_SORT_AUX 0x80 #define DT_SORT_SIDEBAR 0x100 +/** + * struct Option - Definition of a user-variable + */ struct Option { - const char *option; - short type; - short flags; - unsigned long data; + const char *option; /**< user-visible name */ + short type; /**< varible type, e.g. *DT_STR */ + short flags; /**< notification flags, e.g. R_PAGER */ + unsigned long data; /**< pointer to the global variable */ unsigned long init; /**< initial value */ }; diff --git a/mutt_regex.h b/mutt_regex.h index ff1c0be69fb..32d1fe96470 100644 --- a/mutt_regex.h +++ b/mutt_regex.h @@ -40,6 +40,9 @@ #define REGCOMP(X, Y, Z) regcomp(X, Y, REG_WORDS | REG_EXTENDED | (Z)) #define REGEXEC(X, Y) regexec(&X, Y, (size_t) 0, (regmatch_t *) 0, (int) 0) +/** + * struct Regex - Cached regular expression + */ struct Regex { char *pattern; /**< printable version */ @@ -47,12 +50,18 @@ struct Regex int not; /**< do not match */ }; +/** + * struct RxList - List of regular expressions + */ struct RxList { struct Regex *rx; struct RxList *next; }; +/** + * struct ReplaceList - List of regular expressions + */ struct ReplaceList { struct Regex *rx; diff --git a/mutt_sasl.h b/mutt_sasl.h index 349be5f504a..42d5130a013 100644 --- a/mutt_sasl.h +++ b/mutt_sasl.h @@ -35,6 +35,9 @@ int mutt_sasl_interact(sasl_interact_t *interaction); void mutt_sasl_setup_conn(struct Connection *conn, sasl_conn_t *saslconn); void mutt_sasl_done(void); +/** + * struct SaslData - SASL authentication API + */ struct SaslData { sasl_conn_t *saslconn; diff --git a/mutt_socket.h b/mutt_socket.h index aa58f0c8c7a..cc07cb54151 100644 --- a/mutt_socket.h +++ b/mutt_socket.h @@ -33,11 +33,13 @@ #define MUTT_SOCK_LOG_HDR 3 #define MUTT_SOCK_LOG_FULL 4 +/** + * struct Connection - An open network connection (socket) + */ struct Connection { struct Account account; - /* security strength factor, in bits */ - unsigned int ssf; + unsigned int ssf; /**< security strength factor, in bits */ void *data; char inbuf[LONG_STRING]; diff --git a/mutt_ssl.c b/mutt_ssl.c index d05cfc08699..5c44a0cc216 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -83,6 +83,9 @@ static int SkipModeExDataIndex = -1; * open up another connection to the same server in this session */ static STACK_OF(X509) *SslSessionCerts = NULL; +/** + * struct SslSockData - SSL socket data + */ struct SslSockData { SSL_CTX *ctx; diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c index c3f8ecaac6f..ec869ac5015 100644 --- a/mutt_ssl_gnutls.c +++ b/mutt_ssl_gnutls.c @@ -84,7 +84,9 @@ typedef gnutls_transport_ptr gnutls_transport_ptr_t; typedef gnutls_x509_crt gnutls_x509_crt_t; #endif - +/** + * struct TlsSockData - TLS socket data + */ typedef struct TlsSockData { gnutls_session_t state; @@ -514,7 +516,7 @@ static char *tls_make_date(time_t t, char *s, size_t len) } /** - * tls_check_one_certificate - + * tls_check_one_certificate - Check a GnuTLS certificate * @param certdata List of GnuTLS certificates * @param certstat GnuTLS certificate status * @param hostname Hostname diff --git a/mutt_tunnel.c b/mutt_tunnel.c index 4f1afb5a5dc..7437fccc411 100644 --- a/mutt_tunnel.c +++ b/mutt_tunnel.c @@ -38,7 +38,9 @@ #include "mutt_socket.h" #include "protos.h" -/* -- data types -- */ +/** + * struct TunnelData - A network tunnel (pair of sockets) + */ struct TunnelData { pid_t pid; diff --git a/mx.h b/mx.h index 8c95a73f3b9..2086bdf5d9f 100644 --- a/mx.h +++ b/mx.h @@ -41,8 +41,9 @@ struct Context; struct Message; struct stat; -/* +/** * struct MxOps - a structure to store operations on a mailbox + * * The following operations are mandatory: * - open * - close @@ -64,7 +65,9 @@ struct MxOps int (*open_new_msg)(struct Message *msg, struct Context *ctx, struct Header *hdr); }; -/* supported mailbox formats */ +/** + * enum MailboxFormat - Supported mailbox formats + */ enum MailboxFormat { MUTT_MBOX = 1, diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 99dd58bafd2..5a9769b4765 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -80,10 +80,9 @@ #define CRYPT_KV_STRONGID 8 #define CRYPT_KV_MATCH (CRYPT_KV_ADDR | CRYPT_KV_STRING) -/* - * Type definitions. +/** + * struct CryptCache - Internal cache for GPGME */ - struct CryptCache { char *what; @@ -91,6 +90,9 @@ struct CryptCache struct CryptCache *next; }; +/** + * struct DnArray - An X500 Distinguished Name + */ struct DnArray { char *key; @@ -99,6 +101,9 @@ struct DnArray /* We work based on user IDs, getting from a user ID to the key is check and does not need any memory (gpgme uses reference counting). */ +/** + * struct CryptKeyInfo - A stored PGP key + */ struct CryptKeyInfo { struct CryptKeyInfo *next; @@ -109,6 +114,9 @@ struct CryptKeyInfo gpgme_validity_t validity; /**< uid validity (cached for convenience) */ }; +/** + * struct CryptEntry - An entry in the Select-Key menu + */ struct CryptEntry { size_t num; @@ -3297,6 +3305,9 @@ static void parse_and_print_user_id(FILE *fp, const char *userid) } } +/** + * enum KeyCap - PGP/SMIME Key Capabilities + */ enum KeyCap { KEY_CAP_CAN_ENCRYPT, @@ -3334,6 +3345,9 @@ static unsigned int key_check_cap(gpgme_key_t key, enum KeyCap cap) return ret; } +/** + * enum KeyInfo - PGP Key info + */ enum KeyInfo { KIP_NAME = 0, diff --git a/ncrypt/crypt_mod.c b/ncrypt/crypt_mod.c index af6514e667c..43dbdc3f641 100644 --- a/ncrypt/crypt_mod.c +++ b/ncrypt/crypt_mod.c @@ -24,7 +24,11 @@ #include "crypt_mod.h" #include "lib.h" -/* A type of a variable to keep track of registered crypto modules. */ +/** + * struct CryptModule - A crypto plugin module + * + * A type of a variable to keep track of registered crypto modules. + */ struct CryptModule { crypt_module_specs_t specs; diff --git a/ncrypt/crypt_mod.h b/ncrypt/crypt_mod.h index 3157d08a5ea..dd406df1bd4 100644 --- a/ncrypt/crypt_mod.h +++ b/ncrypt/crypt_mod.h @@ -69,8 +69,10 @@ typedef void (*crypt_func_init_t)(void); typedef void (*crypt_func_set_sender_t)(const char *sender); -/* - A structure to keep all crypto module functions together. +/** + * struct CryptModuleFunctions - Crypto API for signing/verifying/encrypting + * + * A structure to keep all crypto module functions together. */ typedef struct CryptModuleFunctions { @@ -103,8 +105,10 @@ typedef struct CryptModuleFunctions crypt_func_smime_invoke_import_t smime_invoke_import; } crypt_module_functions_t; -/* - A structure to describe a crypto module. +/** + * struct CryptModuleSpecs - Crypto API + * + * A structure to describe a crypto module. */ typedef struct CryptModuleSpecs { diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index b95a738c912..6968f186c21 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -44,10 +44,11 @@ #include "protos.h" #include "rfc822.h" -/* +/** + * struct PgpCommandContext - Data for a PGP command + * * The actual command line formatter. */ - struct PgpCommandContext { short need_passphrase; /**< %p */ diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 710f85848c5..13a0e5a2130 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -59,6 +59,9 @@ struct List; +/** + * struct PgpCache - List of cached PGP keys + */ struct PgpCache { char *what; @@ -129,6 +132,9 @@ static struct PgpKeyInfo *pgp_principal_key(struct PgpKeyInfo *key) * %[...] date of key using strftime(3) */ +/** + * struct PgpEntry - An entry in a PGP key menu + */ struct PgpEntry { size_t num; diff --git a/ncrypt/pgpkey.h b/ncrypt/pgpkey.h index fc85657adfa..15d6297fe6c 100644 --- a/ncrypt/pgpkey.h +++ b/ncrypt/pgpkey.h @@ -27,7 +27,11 @@ struct Address; struct Body; struct PgpKeyInfo; -enum PgpRing { +/** + * enum PgpRing - PGP ring type + */ +enum PgpRing +{ PGP_PUBRING, PGP_SECRING, }; diff --git a/ncrypt/pgplib.h b/ncrypt/pgplib.h index 57caf5746b2..d16847b71eb 100644 --- a/ncrypt/pgplib.h +++ b/ncrypt/pgplib.h @@ -30,6 +30,9 @@ #include #include "lib.h" +/** + * struct PgpSignature - PGP Signature + */ struct PgpSignature { struct PgpSignature *next; @@ -38,6 +41,9 @@ struct PgpSignature unsigned long sid2; }; +/** + * struct PgpUid - PGP User ID + */ struct PgpUid { char *addr; @@ -48,6 +54,9 @@ struct PgpUid struct PgpSignature *sigs; }; +/** + * struct PgpKeyInfo - Information about a PGP key + */ struct PgpKeyInfo { char *keyid; diff --git a/ncrypt/pgppacket.h b/ncrypt/pgppacket.h index e7807709de7..cc27bf5ad5c 100644 --- a/ncrypt/pgppacket.h +++ b/ncrypt/pgppacket.h @@ -30,6 +30,9 @@ #include +/** + * enum PacketTags - PGP packet types + */ enum PacketTags { PT_RES0 = 0, /**< reserved */ diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 25ba222c149..6a70ecd9b98 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -56,6 +56,9 @@ #include "rfc822.h" #include "state.h" +/** + * struct SmimeCommandContext - Data for a SIME command + */ struct SmimeCommandContext { const char *key; /**< %k */ diff --git a/ncrypt/smime.h b/ncrypt/smime.h index bc51c189b10..94ea252fcfb 100644 --- a/ncrypt/smime.h +++ b/ncrypt/smime.h @@ -34,6 +34,9 @@ struct Envelope; struct Header; struct State; +/** + * struct SmimeKey - An SIME key + */ struct SmimeKey { char *email; diff --git a/nntp.c b/nntp.c index 9895f7197aa..4d6a021a179 100644 --- a/nntp.c +++ b/nntp.c @@ -996,6 +996,9 @@ static int fetch_tempfile(char *line, void *data) return 0; } +/** + * struct FetchCtx - Keep track when getting data from a server + */ struct FetchCtx { struct Context *ctx; @@ -2367,6 +2370,9 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid) return 0; } +/** + * struct ChildCtx - Keep track of the children of an article + */ struct ChildCtx { struct Context *ctx; diff --git a/nntp.h b/nntp.h index a29fa5feb44..d37c041fa66 100644 --- a/nntp.h +++ b/nntp.h @@ -51,6 +51,9 @@ struct Context; #define anum_t uint32_t #define ANUM "%u" +/** + * enum NntpStatus - NNTP server return values + */ enum NntpStatus { NNTP_NONE = 0, @@ -58,6 +61,9 @@ enum NntpStatus NNTP_BYE }; +/** + * struct NntpServer - NNTP-specific server data + */ struct NntpServer { bool hasCAPABILITIES : 1; @@ -88,18 +94,27 @@ struct NntpServer struct Connection *conn; }; +/** + * struct NewsrcEntry - An entry in a .newsrc (subscribed newsgroups) + */ struct NewsrcEntry { anum_t first; anum_t last; }; +/** + * struct NntpAcache - NNTP article cache + */ struct NntpAcache { unsigned int index; char *path; }; +/** + * struct NntpData - NNTP-specific server data + */ struct NntpData { char *group; @@ -120,6 +135,9 @@ struct NntpData struct BodyCache *bcache; }; +/** + * struct NntpHeaderData - NNTP-specific header data + */ struct NntpHeaderData { anum_t article_num; diff --git a/options.h b/options.h index 5cdd16e4c4f..b47a48f04ef 100644 --- a/options.h +++ b/options.h @@ -23,7 +23,9 @@ #ifndef _MUTT_OPTIONS_H_ #define _MUTT_OPTIONS_H_ -/* boolean vars */ +/** + * enum GlobalBool - boolean vars + */ enum GlobalBool { OPTALLOW8BIT, diff --git a/pager.c b/pager.c index f1445468bb1..2ac24f2a566 100644 --- a/pager.c +++ b/pager.c @@ -114,6 +114,9 @@ static struct Header *OldHdr = NULL; break; \ } +/** + * struct QClass - Style of quoted text + */ struct QClass { int length; @@ -124,6 +127,9 @@ struct QClass struct QClass *down, *up; }; +/** + * struct Syntax - Highlighting for a line of text + */ struct Syntax { int color; @@ -131,6 +137,9 @@ struct Syntax int last; }; +/** + * struct Line - A line of text in the pager + */ struct Line { LOFF_T offset; @@ -151,6 +160,9 @@ struct Line #define ANSI_REVERSE (1 << 4) #define ANSI_COLOR (1 << 5) +/** + * struct AnsiAttr - An ANSI escape sequence + */ struct AnsiAttr { int attr; @@ -162,6 +174,9 @@ struct AnsiAttr static short InHelp = 0; #if defined(USE_SLANG_CURSES) || defined(HAVE_RESIZETERM) +/** + * struct Resize - Keep track of screen resizing + */ static struct Resize { int line; @@ -1672,6 +1687,9 @@ void mutt_clear_pager_position(void) OldHdr = NULL; } +/** + * struct PagerRedrawData - Keep track when the pager needs redrawing + */ struct PagerRedrawData { int flags; diff --git a/pager.h b/pager.h index 9631a2c4032..4d9b5873da6 100644 --- a/pager.h +++ b/pager.h @@ -46,6 +46,9 @@ struct Menu; #define MUTT_DISPLAYFLAGS (MUTT_SHOW | MUTT_PAGER_NSKIP | MUTT_PAGER_MARKER) +/** + * struct Pager - An email being displayed + */ struct Pager { struct Context *ctx; /**< current mailbox */ diff --git a/parameter.h b/parameter.h index 7d88c0a6a58..e6ad993aef3 100644 --- a/parameter.h +++ b/parameter.h @@ -25,6 +25,9 @@ #include "lib.h" +/** + * struct Parameter - Attribute associated with a MIME part + */ struct Parameter { char *attribute; diff --git a/parse.c b/parse.c index 0e3d4b205dd..9bd1023c6e1 100644 --- a/parse.c +++ b/parse.c @@ -699,6 +699,9 @@ static const char *uncomment_timezone(char *buf, size_t buflen, const char *tz) return buf; } +/** + * struct Tz - Lookup table of Time Zones + */ static const struct Tz { char tzname[5]; diff --git a/pattern.c b/pattern.c index e0603593d1e..6e9045799f2 100644 --- a/pattern.c +++ b/pattern.c @@ -68,7 +68,9 @@ #include "mutt_notmuch.h" #endif -/* Error codes for eat_range_by_regexp */ +/** + * enum EatRangeError - Error codes for eat_range_by_regexp() + */ enum EatRangeError { RANGE_E_OK, @@ -219,6 +221,9 @@ static const char *get_date(const char *s, struct tm *t, struct Buffer *err) #define RANGE_RX_GROUPS 5 +/** + * struct RangeRegex - Regular expression representing a range + */ struct RangeRegex { const char *raw; /**< regexp as string */ @@ -228,6 +233,9 @@ struct RangeRegex regex_t cooked; /**< compiled form */ }; +/** + * enum RangeType - Type of range + */ enum RangeType { RANGE_K_REL, @@ -270,7 +278,9 @@ static struct RangeRegex range_regexps[] = { #define RANGE_LT '<' #define RANGE_GT '>' -/* range sides: left or right */ +/** + * enum RangeSide - Which side of the range + */ enum RangeSide { RANGE_S_LEFT, @@ -804,6 +814,9 @@ static bool eat_message_range(struct Pattern *pat, struct Buffer *s, struct Buff return false; } +/** + * struct PatternFlags - Mapping between user character and internal constant + */ static const struct PatternFlags { int tag; /**< character used to represent this op */ diff --git a/pattern.h b/pattern.h index 0a5041ddae5..f290f87f665 100644 --- a/pattern.h +++ b/pattern.h @@ -33,6 +33,9 @@ struct Buffer; struct Header; struct Context; +/** + * struct Pattern - A simple (non-regex) pattern + */ struct Pattern { short op; @@ -53,12 +56,18 @@ struct Pattern } p; }; +/** + * enum PatternExecFlag - Flags for mutt_pattern_exec() + */ enum PatternExecFlag { MUTT_MATCH_FULL_ADDRESS = 1 }; -/* This is used when a message is repeatedly pattern matched against. +/** + * struct PatternCache - Cache commonly-used patterns + * + * This is used when a message is repeatedly pattern matched against. * e.g. for color, scoring, hooks. It caches a few of the potentially slow * operations. * Each entry has a value of 0 = unset, 1 = false, 2 = true diff --git a/pop.h b/pop.h index 1c838ed65a8..ead4cf62138 100644 --- a/pop.h +++ b/pop.h @@ -40,6 +40,9 @@ struct Progress; /* maximal length of the server response (RFC1939) */ #define POP_CMD_RESPONSE 512 +/** + * enum PopStatus - POP server responses + */ enum PopStatus { /* Status */ @@ -49,6 +52,9 @@ enum PopStatus POP_BYE }; +/** + * enum PopAuthRes - POP authentication responses + */ enum PopAuthRes { POP_A_SUCCESS = 0, @@ -57,12 +63,18 @@ enum PopAuthRes POP_A_UNAVAIL }; +/** + * struct PopCache - POP-specific email cache + */ struct PopCache { unsigned int index; char *path; }; +/** + * struct PopData - POP-specific server data + */ struct PopData { struct Connection *conn; @@ -87,6 +99,9 @@ struct PopData struct PopCache cache[POP_CACHE_LEN]; }; +/** + * struct PopAuth - POP authentication multiplexor + */ struct PopAuth { /* do authentication, using named method or any available if method is NULL */ diff --git a/protos.h b/protos.h index 7128dd8ae0e..66d4540bb13 100644 --- a/protos.h +++ b/protos.h @@ -59,6 +59,9 @@ struct passwd; void _mutt_make_string(char *dest, size_t destlen, const char *s, struct Context *ctx, struct Header *hdr, enum FormatFlag flags); +/** + * struct HdrFormatInfo - Data passed to hdr_format_str() + */ struct HdrFormatInfo { struct Context *ctx; @@ -66,6 +69,9 @@ struct HdrFormatInfo const char *pager_progress; }; +/** + * enum XdgType - XDG variable types + */ enum XdgType { XDG_CONFIG_HOME, diff --git a/query.c b/query.c index 4e9075f80de..6a56d6469e3 100644 --- a/query.c +++ b/query.c @@ -46,6 +46,9 @@ #include "protos.h" #include "rfc822.h" +/** + * struct Query - An entry from an external address-book + */ struct Query { int num; @@ -55,6 +58,9 @@ struct Query struct Query *next; }; +/** + * struct Entry - An entry in a selectable list of Query's + */ struct Entry { bool tagged; diff --git a/remailer.c b/remailer.c index 5f80ccac321..1de3488434c 100644 --- a/remailer.c +++ b/remailer.c @@ -50,9 +50,13 @@ #include "protos.h" #include "rfc822.h" +/** + * struct Coord - Screen coordindates + */ struct Coord { - short r, c; + short r; /**< row */ + short c; /**< column */ }; static int mix_get_caps(const char *capstr) diff --git a/remailer.h b/remailer.h index bfcd2311365..6e3433d03f8 100644 --- a/remailer.h +++ b/remailer.h @@ -43,6 +43,9 @@ struct Header; #define MAXMIXES 19 +/** + * struct Remailer - A Mixmaster remailer + */ struct Remailer { int num; @@ -52,6 +55,9 @@ struct Remailer int caps; }; +/** + * struct MixChain - A Mixmaster chain + */ struct MixChain { size_t cl; diff --git a/rfc1524.h b/rfc1524.h index 85e8d672033..ae88d8a8f55 100644 --- a/rfc1524.h +++ b/rfc1524.h @@ -28,6 +28,9 @@ struct Body; +/** + * struct Rfc1524MailcapEntry - A mailcap entry + */ struct Rfc1524MailcapEntry { char *command; diff --git a/rfc2231.c b/rfc2231.c index 40c62158e2c..91c35028372 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -45,6 +45,9 @@ #include "protos.h" #include "rfc2047.h" +/** + * struct Rfc2231Parameter - MIME section parameter + */ struct Rfc2231Parameter { char *attribute; diff --git a/rfc3676.c b/rfc3676.c index 728e2a4abbd..66f5b07a00d 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -44,6 +44,9 @@ #define FLOWED_MAX 72 +/** + * struct FlowedState - State of a Format-Flowed line of text + */ struct FlowedState { size_t width; diff --git a/rfc822.h b/rfc822.h index 579ceec1e04..45957541e6f 100644 --- a/rfc822.h +++ b/rfc822.h @@ -29,7 +29,9 @@ #include "address.h" #include "lib.h" -/* possible values for RFC822Error */ +/** + * enum AddressError - possible values for RFC822Error + */ enum AddressError { ERR_MEMORY = 1, diff --git a/score.c b/score.c index c7d25b8d4e6..1808c8d178b 100644 --- a/score.c +++ b/score.c @@ -36,6 +36,9 @@ #include "protos.h" #include "sort.h" +/** + * struct Score - Scoring rule for email + */ struct Score { char *str; diff --git a/sendlib.c b/sendlib.c index b4821900ea2..320dd1bdbeb 100644 --- a/sendlib.c +++ b/sendlib.c @@ -222,6 +222,9 @@ static void encode_quoted(FGETCONV *fc, FILE *fout, int istext) } } +/** + * struct B64Context - Cursor for the Base64 conversion + */ struct B64Context { char buffer[3]; @@ -514,6 +517,9 @@ void mutt_generate_boundary(struct Parameter **parm) mutt_set_parameter("boundary", rs, parm); } +/** + * struct ContentState - Info about the body of an email + */ struct ContentState { int from; diff --git a/sha1.h b/sha1.h index ea988ea232a..108416dca43 100644 --- a/sha1.h +++ b/sha1.h @@ -13,6 +13,9 @@ #include +/** + * struct Sha1Ctx - Cursor for the SHA1 hashing + */ struct Sha1Ctx { uint32_t state[5]; diff --git a/sidebar.c b/sidebar.c index 78d2e06093f..67b3c79c51f 100644 --- a/sidebar.c +++ b/sidebar.c @@ -68,7 +68,9 @@ static int OpnIndex = -1; /* Current (open) mailbox */ static int HilIndex = -1; /* Highlighted mailbox */ static int BotIndex = -1; /* Last mailbox visible in sidebar */ -/* The source of the sidebar divider character. */ +/** + * enum DivType - Source of the sidebar divider character + */ enum DivType { SB_DIV_USER, @@ -76,6 +78,9 @@ enum DivType SB_DIV_UTF8 }; +/** + * enum SidebarSrc - Display real or virtual mailboxes in the sidebar + */ enum SidebarSrc { SB_SRC_INCOMING, diff --git a/smtp.c b/smtp.c index 3d8876c46e9..42894685820 100644 --- a/smtp.c +++ b/smtp.c @@ -68,6 +68,9 @@ #define SMTP_AUTH_UNAVAIL 1 #define SMTP_AUTH_FAIL -1 +/** + * enum SmtpCapability - SMTP server capabilities + */ enum SmtpCapability { STARTTLS, diff --git a/state.h b/state.h index 4be12317433..d10d6d55835 100644 --- a/state.h +++ b/state.h @@ -25,6 +25,9 @@ #include +/** + * struct State - Keep track when processing files + */ struct State { FILE *fpin; diff --git a/thread.h b/thread.h index 262ee7baef3..29931abd659 100644 --- a/thread.h +++ b/thread.h @@ -28,6 +28,9 @@ struct Context; struct Header; +/** + * struct MuttThread - An email conversation + */ struct MuttThread { bool fake_thread : 1; diff --git a/url.h b/url.h index 0cd49fea63c..d7332a770a4 100644 --- a/url.h +++ b/url.h @@ -25,6 +25,9 @@ struct Envelope; +/** + * enum UrlScheme - All recognised Url types + */ enum UrlScheme { U_FILE, @@ -46,6 +49,9 @@ enum UrlScheme #define U_DECODE_PASSWD (1) #define U_PATH (1 << 1) +/** + * struct CissUrl - A parsed URL `proto://user:password@host/path` + */ struct CissUrl { enum UrlScheme scheme; diff --git a/version.c b/version.c index 8f2ec7c9533..e4daa1bcf67 100644 --- a/version.c +++ b/version.c @@ -93,6 +93,9 @@ static const char *Notice = "Mutt is free software, and you are welcome to redistribute it\n" "under certain conditions; type `mutt -vv' for details.\n"); +/** + * struct CompileOptions - List of built-in capabilities + */ struct CompileOptions { const char *name;