]> granicus.if.org Git - neomutt/commitdiff
refactor parse functions
authorRichard Russon <rich@flatcap.org>
Fri, 17 Aug 2018 19:59:35 +0000 (20:59 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 17 Aug 2018 19:59:35 +0000 (20:59 +0100)
14 files changed:
bcache.h
color.c
config/set.h
email/rfc2047.c
format_flags.h
handler.c
hcache/hcache.h
init.c
mutt/hash.h
mutt/list.h
mutt/logging.h
mutt/signal2.h
mutt_commands.h
sort.h

index 80b5ada7bbd07cde1831478c85983fa94fcb7e28..a716a063e2c915887fb1ae627cc5f54e12df82ac 100644 (file)
--- a/bcache.h
+++ b/bcache.h
@@ -33,7 +33,7 @@ struct BodyCache;
 extern char *MessageCachedir;
 
 /**
- * bcache_list_t - Prototype for mutt_bcache_list() callback
+ * typedef bcache_list_t - Prototype for mutt_bcache_list() callback
  * @param bcache  Body Cache from mutt_bcache_open()
  * @param want_id Callback function called for each match
  * @param data    Data to pass to the callback function
diff --git a/color.c b/color.c
index e5d057ac7caf5749878cfc808f2d93bed9bc9620..aba956ec038a7257cecc37f25a906cf9a4af4ca0 100644 (file)
--- a/color.c
+++ b/color.c
@@ -868,7 +868,7 @@ static int parse_object(struct Buffer *buf, struct Buffer *s, int *o, int *ql,
 }
 
 /**
- * parser_callback_t - Prototype for a function to parse color config
+ * typedef parser_callback_t - Prototype for a function to parse color config
  * @param[in]  buf Temporary Buffer space
  * @param[in]  s    Buffer containing string to be parsed
  * @param[out] fg   Foreground colour (set to -1)
index 039d7f8c026d7e9aa3872af40f9efc12c094b45e..8deca05bf601cecc003466ef4824d21d30e3d542 100644 (file)
@@ -70,7 +70,7 @@ enum CsListenerAction
 };
 
 /**
- * cs_listener - Listen for config changes
+ * typedef cs_listener - Listen for config changes
  * @param cs   Config items
  * @param he   HashElem representing config item
  * @param name Name of the config item
@@ -79,7 +79,7 @@ enum CsListenerAction
  */
 typedef bool    (*cs_listener)   (const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev);
 /**
- * cs_validator - Validate the "charset" config variable
+ * typedef cs_validator - Validate the "charset" config variable
  * @param cs    Config items
  * @param cdef  Config definition
  * @param value Native value
@@ -88,9 +88,8 @@ typedef bool    (*cs_listener)   (const struct ConfigSet *cs, struct HashElem *h
  * @retval CSR_ERR_INVALID Failure
  */
 typedef int     (*cs_validator)  (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
-
 /**
- * cst_string_set - Set a config item by string
+ * typedef cst_string_set - Set a config item by string
  * @param cs    Config items
  * @param var   Variable to set
  * @param cdef  Variable definition
@@ -102,7 +101,7 @@ typedef int     (*cs_validator)  (const struct ConfigSet *cs, const struct Confi
  */
 typedef int     (*cst_string_set)(const struct ConfigSet *cs, void *var,       struct ConfigDef *cdef, const char *value, struct Buffer *err);
 /**
- * cst_string_get - Get a config item as a string
+ * typedef cst_string_get - Get a config item as a string
  * @param cs     Config items
  * @param var    Variable to get
  * @param cdef   Variable definition
@@ -113,7 +112,7 @@ typedef int     (*cst_string_set)(const struct ConfigSet *cs, void *var,       s
  */
 typedef int     (*cst_string_get)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef,                    struct Buffer *result);
 /**
- * cst_native_set - Set a config item by string
+ * typedef cst_native_set - Set a config item by string
  * @param cs    Config items
  * @param var   Variable to set
  * @param cdef  Variable definition
@@ -123,7 +122,7 @@ typedef int     (*cst_string_get)(const struct ConfigSet *cs, void *var, const s
  */
 typedef int     (*cst_native_set)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value,    struct Buffer *err);
 /**
- * cst_native_get - Get a string from a config item
+ * typedef cst_native_get - Get a string from a config item
  * @param cs   Config items
  * @param var  Variable to get
  * @param cdef Variable definition
@@ -133,7 +132,7 @@ typedef int     (*cst_native_set)(const struct ConfigSet *cs, void *var, const s
 typedef intptr_t(*cst_native_get)(const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef,                    struct Buffer *err);
 
 /**
- * cst_reset - Reset a config item to its initial value
+ * typedef cst_reset - Reset a config item to its initial value
  * @param cs   Config items
  * @param var  Variable to reset
  * @param cdef Variable definition
@@ -142,7 +141,7 @@ typedef intptr_t(*cst_native_get)(const struct ConfigSet *cs, void *var, const s
  */
 typedef int     (*cst_reset)     (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err);
 /**
- * cst_destroy - Destroy a config item
+ * typedef cst_destroy - Destroy a config item
  * @param cs   Config items
  * @param var  Variable to destroy
  * @param cdef Variable definition
index 3bd77db78248d0e0287c39cc2662bc986edf7c9d..db87493a8edb12f795d1755c499de87ec0e58908 100644 (file)
@@ -49,7 +49,7 @@
 #define CONTINUATION_BYTE(c) (((c) &0xc0) == 0x80)
 
 /**
- * encoder_t - Prototype for an encoding function
+ * typedef encoder_t - Prototype for an encoding function
  * @param str    String to encode
  * @param buf    Buffer for result
  * @param buflen Length of buffer
index dee94f5da2c02de6020099dd06955bc0916737ec..27c8da5f4d86560fa97e563f5dee1c8d50396bd5 100644 (file)
@@ -41,7 +41,7 @@ enum FormatFlag
 };
 
 /**
- * format_t - Prototype for a mutt_expando_format() callback function
+ * typedef format_t - Prototype for a mutt_expando_format() callback function
  * @param[out] buf      Buffer in which to save string
  * @param[in]  buflen   Buffer length
  * @param[in]  col      Starting column
index 7e42393cef697087d746717aff44e39d9937b6f7..0e4aaafb6cc155f6ec6de006edad7075e03d0b4c 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -70,7 +70,7 @@ char *ShowMultipartAlternative; ///< Config: How to display 'multipart/alternati
 #define TXTENRICHED 3
 
 /**
- * handler_t - Manage a PGP or S/MIME encrypted MIME part
+ * typedef handler_t - Manage a PGP or S/MIME encrypted MIME part
  * @param m Body of the email
  * @param s State of text being processed
  * @retval 0 Success
index ff583aa8c2d1d95d786036f469cc97983c79aad1..a6be30aee6026ffae309f850577233d63f536dac 100644 (file)
@@ -72,7 +72,7 @@ struct HeaderCache
 typedef struct HeaderCache header_cache_t;
 
 /**
- * hcache_namer_t - Prototype for function to compose hcache file names
+ * typedef hcache_namer_t - Prototype for function to compose hcache file names
  * @param path    Path of message
  * @param dest    Buffer for filename
  * @param destlen Length of buffer
diff --git a/init.c b/init.c
index 3b8f56a42cadae349115a52b981422d60be93925..94d53e1115be162306694e3711d4bb11ff9bad8e 100644 (file)
--- a/init.c
+++ b/init.c
@@ -599,13 +599,7 @@ bail:
 }
 
 /**
- * parse_replace_list - Parse a string replacement rule
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_replace_list - Parse a string replacement rule - Implements ::command_t
  */
 static int parse_replace_list(struct Buffer *buf, struct Buffer *s,
                               unsigned long data, struct Buffer *err)
@@ -703,13 +697,7 @@ static int parse_unattach_list(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unreplace_list - Remove a string replacement rule
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unreplace_list - Remove a string replacement rule - Implements ::command_t
  */
 static int parse_unreplace_list(struct Buffer *buf, struct Buffer *s,
                                 unsigned long data, struct Buffer *err)
@@ -926,13 +914,7 @@ static int source_rc(const char *rcfile_path, struct Buffer *err)
 }
 
 /**
- * parse_alias - Parse the 'alias' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_alias - Parse the 'alias' command - Implements ::command_t
  */
 static int parse_alias(struct Buffer *buf, struct Buffer *s, unsigned long data,
                        struct Buffer *err)
@@ -1013,13 +995,7 @@ bail:
 }
 
 /**
- * parse_alternates - Parse the 'alternates' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_alternates - Parse the 'alternates' command - Implements ::command_t
  */
 static int parse_alternates(struct Buffer *buf, struct Buffer *s,
                             unsigned long data, struct Buffer *err)
@@ -1053,13 +1029,7 @@ bail:
 }
 
 /**
- * parse_attachments - Parse the 'attachments' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_attachments - Parse the 'attachments' command - Implements ::command_t
  */
 static int parse_attachments(struct Buffer *buf, struct Buffer *s,
                              unsigned long data, struct Buffer *err)
@@ -1119,12 +1089,7 @@ static int parse_attachments(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_echo - Parse the 'echo' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_echo - Parse the 'echo' command - Implements ::command_t
  */
 static int parse_echo(struct Buffer *buf, struct Buffer *s, unsigned long data,
                       struct Buffer *err)
@@ -1144,11 +1109,7 @@ static int parse_echo(struct Buffer *buf, struct Buffer *s, unsigned long data,
 }
 
 /**
- * parse_finish - Parse the 'finish' command
- * @param buf  Temporary space shared by all command handlers
- * @param s    Current line of the config file
- * @param data data field from init.h:struct Command
- * @param err  Buffer for any error message
+ * parse_finish - Parse the 'finish' command - Implements ::command_t
  * @retval  1 Stop processing the current file
  * @retval -1 Failed
  *
@@ -1167,13 +1128,7 @@ static int parse_finish(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_group - Parse the 'group' and 'ungroup' commands
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_group - Parse the 'group' and 'ungroup' commands - Implements ::command_t
  */
 static int parse_group(struct Buffer *buf, struct Buffer *s, unsigned long data,
                        struct Buffer *err)
@@ -1254,13 +1209,7 @@ bail:
 }
 
 /**
- * parse_ifdef - Parse the 'ifdef' and 'ifndef' commands
- * @param buf  Temporary space shared by all command handlers
- * @param s    Current line of the config file
- * @param data data field from init.h:struct Command
- * @param err  Buffer for any error message
- * @retval  0 Success
- * @retval -1 Failed
+ * parse_ifdef - Parse the 'ifdef' and 'ifndef' commands - Implements ::command_t
  *
  * The 'ifdef' command allows conditional elements in the config file.
  * If a given variable, function, command or compile-time symbol exists, then
@@ -1352,12 +1301,7 @@ static int parse_ifdef(struct Buffer *buf, struct Buffer *s, unsigned long data,
 }
 
 /**
- * parse_ignore - Parse the 'ignore' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_ignore - Parse the 'ignore' command - Implements ::command_t
  */
 static int parse_ignore(struct Buffer *buf, struct Buffer *s,
                         unsigned long data, struct Buffer *err)
@@ -1373,13 +1317,7 @@ static int parse_ignore(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_lists - Parse the 'lists' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_lists - Parse the 'lists' command - Implements ::command_t
  */
 static int parse_lists(struct Buffer *buf, struct Buffer *s, unsigned long data,
                        struct Buffer *err)
@@ -1411,13 +1349,7 @@ bail:
 }
 
 /**
- * parse_my_hdr - Parse the 'my_hdr' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_my_hdr - Parse the 'my_hdr' command - Implements ::command_t
  */
 static int parse_my_hdr(struct Buffer *buf, struct Buffer *s,
                         unsigned long data, struct Buffer *err)
@@ -1462,12 +1394,7 @@ static int parse_my_hdr(struct Buffer *buf, struct Buffer *s,
 
 #ifdef USE_SIDEBAR
 /**
- * parse_path_list - Parse the 'sidebar_whitelist' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_path_list - Parse the 'sidebar_whitelist' command - Implements ::command_t
  */
 static int parse_path_list(struct Buffer *buf, struct Buffer *s,
                            unsigned long data, struct Buffer *err)
@@ -1488,12 +1415,7 @@ static int parse_path_list(struct Buffer *buf, struct Buffer *s,
 
 #ifdef USE_SIDEBAR
 /**
- * parse_path_unlist - Parse the 'unsidebar_whitelist' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_path_unlist - Parse the 'unsidebar_whitelist' command - Implements ::command_t
  */
 static int parse_path_unlist(struct Buffer *buf, struct Buffer *s,
                              unsigned long data, struct Buffer *err)
@@ -1519,13 +1441,7 @@ static int parse_path_unlist(struct Buffer *buf, struct Buffer *s,
 #endif
 
 /**
- * parse_set - Parse the 'set' family of commands
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_set - Parse the 'set' family of commands - Implements ::command_t
  *
  * This is used by 'reset', 'set', 'toggle' and 'unset'.
  */
@@ -1857,13 +1773,7 @@ static int parse_set(struct Buffer *buf, struct Buffer *s, unsigned long data,
 }
 
 /**
- * parse_setenv - Parse the 'setenv' and 'unsetenv' commands
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_setenv - Parse the 'setenv' and 'unsetenv' commands - Implements ::command_t
  */
 static int parse_setenv(struct Buffer *buf, struct Buffer *s,
                         unsigned long data, struct Buffer *err)
@@ -1947,13 +1857,7 @@ static int parse_setenv(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_source - Parse the 'source' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_source - Parse the 'source' command - Implements ::command_t
  */
 static int parse_source(struct Buffer *buf, struct Buffer *s,
                         unsigned long data, struct Buffer *err)
@@ -1982,13 +1886,7 @@ static int parse_source(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_spam_list - Parse the 'spam' and 'nospam' commands
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_spam_list - Parse the 'spam' and 'nospam' commands - Implements ::command_t
  */
 static int parse_spam_list(struct Buffer *buf, struct Buffer *s,
                            unsigned long data, struct Buffer *err)
@@ -2066,12 +1964,7 @@ static int parse_spam_list(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_stailq - Parse a list command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_stailq - Parse a list command - Implements ::command_t
  *
  * This is used by 'alternative_order', 'auto_view' and several others.
  */
@@ -2088,13 +1981,7 @@ static int parse_stailq(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_subjectrx_list - Parse the 'subjectrx' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_subjectrx_list - Parse the 'subjectrx' command - Implements ::command_t
  */
 static int parse_subjectrx_list(struct Buffer *buf, struct Buffer *s,
                                 unsigned long data, struct Buffer *err)
@@ -2108,13 +1995,7 @@ static int parse_subjectrx_list(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_subscribe - Parse the 'subscribe' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_subscribe - Parse the 'subscribe' command - Implements ::command_t
  */
 static int parse_subscribe(struct Buffer *buf, struct Buffer *s,
                            unsigned long data, struct Buffer *err)
@@ -2149,13 +2030,7 @@ bail:
 
 #ifdef USE_IMAP
 /**
- * parse_subscribe_to - Parse the 'subscribe-to' command
- * @param buf  Buffer space shared by all command handlers
- * @param s    Current line of the config file
- * @param data Data field from init.h:struct Command
- * @param err  Buffer for any error message
- * @retval  0 Success
- * @retval -1 Failed
+ * parse_subscribe_to - Parse the 'subscribe-to' command - Implements ::command_t
  *
  * The 'subscribe-to' command allows to subscribe to an IMAP-Mailbox.
  * Patterns are not supported.
@@ -2206,13 +2081,7 @@ static int parse_subscribe_to(struct Buffer *buf, struct Buffer *s,
 #endif
 
 /**
- * parse_tag_formats - Parse the 'tag-formats' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_tag_formats - Parse the 'tag-formats' command - Implements ::command_t
  */
 static int parse_tag_formats(struct Buffer *buf, struct Buffer *s,
                              unsigned long data, struct Buffer *err)
@@ -2251,13 +2120,7 @@ static int parse_tag_formats(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_tag_transforms - Parse the 'tag-transforms' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_tag_transforms - Parse the 'tag-transforms' command - Implements ::command_t
  */
 static int parse_tag_transforms(struct Buffer *buf, struct Buffer *s,
                                 unsigned long data, struct Buffer *err)
@@ -2296,12 +2159,7 @@ static int parse_tag_transforms(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unalias - Parse the 'unalias' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_unalias - Parse the 'unalias' command - Implements ::command_t
  */
 static int parse_unalias(struct Buffer *buf, struct Buffer *s,
                          unsigned long data, struct Buffer *err)
@@ -2351,13 +2209,7 @@ static int parse_unalias(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unalternates - Parse the 'unalternates' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unalternates - Parse the 'unalternates' command - Implements ::command_t
  */
 static int parse_unalternates(struct Buffer *buf, struct Buffer *s,
                               unsigned long data, struct Buffer *err)
@@ -2380,13 +2232,7 @@ static int parse_unalternates(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unattachments - Parse the 'unattachments' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unattachments - Parse the 'unattachments' command - Implements ::command_t
  */
 static int parse_unattachments(struct Buffer *buf, struct Buffer *s,
                                unsigned long data, struct Buffer *err)
@@ -2432,12 +2278,7 @@ static int parse_unattachments(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unignore - Parse the 'unignore' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_unignore - Parse the 'unignore' command - Implements ::command_t
  */
 static int parse_unignore(struct Buffer *buf, struct Buffer *s,
                           unsigned long data, struct Buffer *err)
@@ -2457,13 +2298,7 @@ static int parse_unignore(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unlists - Parse the 'unlists' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unlists - Parse the 'unlists' command - Implements ::command_t
  */
 static int parse_unlists(struct Buffer *buf, struct Buffer *s,
                          unsigned long data, struct Buffer *err)
@@ -2485,12 +2320,7 @@ static int parse_unlists(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unmy_hdr - Parse the 'unmy_hdr' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_unmy_hdr - Parse the 'unmy_hdr' command - Implements ::command_t
  */
 static int parse_unmy_hdr(struct Buffer *buf, struct Buffer *s,
                           unsigned long data, struct Buffer *err)
@@ -2525,12 +2355,7 @@ static int parse_unmy_hdr(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unstailq - Parse an unlist command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval 0 Always
+ * parse_unstailq - Parse an unlist command - Implements ::command_t
  *
  * This is used by 'unalternative_order', 'unauto_view' and several others.
  */
@@ -2553,13 +2378,7 @@ static int parse_unstailq(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unsubjectrx_list - Parse the 'unsubjectrx' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unsubjectrx_list - Parse the 'unsubjectrx' command - Implements ::command_t
  */
 static int parse_unsubjectrx_list(struct Buffer *buf, struct Buffer *s,
                                   unsigned long data, struct Buffer *err)
@@ -2573,13 +2392,7 @@ static int parse_unsubjectrx_list(struct Buffer *buf, struct Buffer *s,
 }
 
 /**
- * parse_unsubscribe - Parse the 'unsubscribe' command
- * @param buf  Temporary Buffer space
- * @param s    Buffer containing string to be parsed
- * @param data Flags associated with the command
- * @param err  Buffer for error messages
- * @retval  0 Success
- * @retval -1 Error
+ * parse_unsubscribe - Parse the 'unsubscribe' command - Implements ::command_t
  */
 static int parse_unsubscribe(struct Buffer *buf, struct Buffer *s,
                              unsigned long data, struct Buffer *err)
@@ -2601,13 +2414,7 @@ static int parse_unsubscribe(struct Buffer *buf, struct Buffer *s,
 
 #ifdef USE_IMAP
 /**
- * parse_unsubscribe_from - Parse the 'unsubscribe-from' command
- * @param buf  Buffer space shared by all command handlers
- * @param s    Current line of the config file
- * @param data Data field from init.h:struct Command
- * @param err  Buffer for any error message
- * @retval  0 Success
- * @retval -1 Failed
+ * parse_unsubscribe_from - Parse the 'unsubscribe-from' command - Implements ::command_t
  *
  * The 'unsubscribe-from' command allows to unsubscribe from an IMAP-Mailbox.
  * Patterns are not supported.
index c96d642dd02f08ecaa14bad3d5d0f7ccd35283b2..6e2247f0581384424fa26835f9d9966db28d775b 100644 (file)
@@ -48,7 +48,7 @@ struct HashElem
 };
 
 /**
- * hash_destructor_t - Prototype for Hash Destructor callback function
+ * typedef hash_destructor_t - Prototype for Hash Destructor callback function
  * @param type Hash Type
  * @param obj  Object to free
  * @param data Data associated with the Hash
index d6ed7f396b69b82dae67f3daa9c485f5accd76af..800f3fdf671df275fd2dd612cad54e2c0a5bef2e 100644 (file)
@@ -45,7 +45,7 @@ struct ListNode
 STAILQ_HEAD(ListHead, ListNode);
 
 /**
- * list_free_t - Prototype for a function to free List data
+ * typedef list_free_t - Prototype for a function to free List data
  * @param ptr Data to free
  */
 typedef void (*list_free_t)(void **ptr);
index c8b0f4da50122864e70d51563823c033473b9f41..ab5a8c38de2d6283e69a732828fbf23b0bd0a661 100644 (file)
@@ -29,7 +29,7 @@
 #include "queue.h"
 
 /**
- * log_dispatcher_t - Prototype for a logging function
+ * typedef log_dispatcher_t - Prototype for a logging function
  * @param stamp    Unix time (optional)
  * @param file     Source file
  * @param line     Source line
index e5288364b21c5494f73d137589bd7f0b0ed7d63c..38aff8c3b40a3152456dec156554e075f086be41 100644 (file)
 #ifndef _MUTT_SIGNAL_H
 #define _MUTT_SIGNAL_H
 
+/**
+ * typedef sig_handler_t - Handler for signals
+ * @param sig Signal number, e.g. SIGINT
+ */
 typedef void (*sig_handler_t)(int sig);
 
 void mutt_sig_allow_interrupt(int disposition);
index 55397e78836e4b972c56fec9ab842bcd9a1c05c8..a29bd9faccd109611b70cef4b9e249a894b22ab5 100644 (file)
 
 struct Buffer;
 
+/**
+ * typedef command_t - Prototype for a function to parse a command
+ * @param buf  Temporary Buffer space
+ * @param s    Buffer containing string to be parsed
+ * @param data Flags associated with the command
+ * @param err  Buffer for error messages
+ * @retval  0 Success
+ * @retval -1 Error
+ * @retval -2 Warning
+ */
+typedef int (*command_t)(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
+
 /**
  * struct Command - A user-callable command
  */
 struct Command
 {
-  char *name;
-  int (*func)(struct Buffer *, struct Buffer *, unsigned long, struct Buffer *);
-  unsigned long data;
+  char *name;         /**< Name of the command */
+  command_t func;     /**< Function to parse the command */
+  unsigned long data; /**< Data or flags to pass to the command */
 };
 
 const struct Command *mutt_command_get(const char *s);
diff --git a/sort.h b/sort.h
index 7d6bff08f3afa79814cf4bcb3bed3bb6ac6114f5..a59797d7446e0acdd058d84fcd90f07813a2dad0 100644 (file)
--- a/sort.h
+++ b/sort.h
@@ -37,7 +37,7 @@ extern bool ReverseAlias;
 #define SORTCODE(x) (Sort & SORT_REVERSE) ? -(x) : x
 
 /**
- * sort_t - Prototype for a function to compare two emails
+ * typedef sort_t - Prototype for a function to compare two emails
  * @param a First email
  * @param b Second email
  * @retval -1 a precedes b