From: Richard Russon Date: Sat, 4 Aug 2018 21:23:41 +0000 (+0100) Subject: doxy: validators X-Git-Tag: 2019-10-25~712^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9970f17e03daf1deee9dc0ce11870039d6e9bac7;p=neomutt doxy: validators --- diff --git a/config/set.h b/config/set.h index 04b7589d7..5b48195ba 100644 --- a/config/set.h +++ b/config/set.h @@ -69,7 +69,24 @@ enum CsListenerAction CSLA_STOP, /**< Stop notifying listeners */ }; +/** + * cs_listener - Listen for config changes + * @param cs Config items + * @param he HashElem representing config item + * @param name Name of the config item + * @param ev Event type, e.g. #CE_SET + * @retval true Continue notifying + */ typedef bool (*cs_listener) (const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev); +/** + * cs_validator - Validate the "charset" config variable + * @param cs Config items + * @param cdef Config definition + * @param value Native value + * @param err Message for the user + * @retval CSR_SUCCESS Success + * @retval CSR_ERR_INVALID Failure + */ typedef int (*cs_validator) (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err); typedef int (*cst_string_set)(const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err); diff --git a/curs_main.c b/curs_main.c index 6595c87f5..9a56ce8c8 100644 --- a/curs_main.c +++ b/curs_main.c @@ -3446,12 +3446,7 @@ void mutt_set_header_color(struct Context *ctx, struct Header *curhdr) } /** - * mutt_reply_listener - Listen for config changes to "reply_regex" - * @param cs Config items - * @param he HashElem representing config item - * @param name Name of the config item - * @param ev Event type, e.g. #CE_SET - * @retval true Continue notifying + * mutt_reply_listener - Listen for config changes to "reply_regex" - Implements ::cs_listener */ bool mutt_reply_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) diff --git a/init.c b/init.c index 1e0f4dfe7..69abc6022 100644 --- a/init.c +++ b/init.c @@ -4024,14 +4024,9 @@ struct ConfigSet *init_config(size_t size) return cs; } + /** - * charset_validator - Validate the "charset" config variable - * @param cs Config items - * @param cdef Config definition - * @param value Native value - * @param err Message for the user - * @retval CSR_SUCCESS Success - * @retval CSR_ERR_INVALID Failure + * charset_validator - Validate the "charset" config variable - Implements ::cs_validator */ int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) @@ -4064,13 +4059,7 @@ int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, #ifdef USE_HCACHE /** - * hcache_validator - Validate the "header_cache_backend" config variable - * @param cs Config items - * @param cdef Config definition - * @param value Native value - * @param err Message for the user - * @retval CSR_SUCCESS Success - * @retval CSR_ERR_INVALID Failure + * hcache_validator - Validate the "header_cache_backend" config variable - Implements ::cs_validator */ int hcache_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) @@ -4089,13 +4078,7 @@ int hcache_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, #endif /** - * pager_validator - Check for config variables that can't be set from the pager - * @param cs Config items - * @param cdef Config definition - * @param value Native value - * @param err Message for the user - * @retval CSR_SUCCESS Success - * @retval CSR_ERR_INVALID Failure + * pager_validator - Check for config variables that can't be set from the pager - Implements ::cs_validator */ int pager_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) @@ -4111,13 +4094,7 @@ int pager_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, } /** - * multipart_validator - Validate the "show_multipart_alternative" config variable - * @param cs Config items - * @param cdef Config definition - * @param value Native value - * @param err Message for the user - * @retval CSR_SUCCESS Success - * @retval CSR_ERR_INVALID Failure + * multipart_validator - Validate the "show_multipart_alternative" config variable - Implements ::cs_validator */ int multipart_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) @@ -4135,13 +4112,7 @@ int multipart_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef } /** - * reply_validator - Validate the "reply_regex" config variable - * @param cs Config items - * @param cdef Config definition - * @param value Native value - * @param err Message for the user - * @retval CSR_SUCCESS Success - * @retval CSR_ERR_INVALID Failure + * reply_validator - Validate the "reply_regex" config variable - Implements ::cs_validator */ int reply_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) diff --git a/menu.c b/menu.c index b310b4a82..1697b07ea 100644 --- a/menu.c +++ b/menu.c @@ -1573,12 +1573,7 @@ int mutt_menu_loop(struct Menu *menu) } /** - * mutt_menu_listener - Listen for config changes affecting the menu - * @param cs Config items - * @param he HashElem representing config item - * @param name Name of the config item - * @param ev Event type, e.g. #CE_SET - * @retval true Continue notifying + * mutt_menu_listener - Listen for config changes affecting the menu - Implements ::cs_listener */ bool mutt_menu_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) diff --git a/mutt_history.c b/mutt_history.c index 8b1d97206..2b6502203 100644 --- a/mutt_history.c +++ b/mutt_history.c @@ -142,12 +142,7 @@ void mutt_hist_complete(char *buf, size_t buflen, enum HistoryClass hclass) } /** - * mutt_hist_listener - Listen for config changes affecting the history - * @param cs Config items - * @param he HashElem representing config item - * @param name Name of the config item - * @param ev Event type, e.g. #CE_SET - * @retval true Continue notifying + * mutt_hist_listener - Listen for config changes affecting the history - Implements ::cs_listener */ bool mutt_hist_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev) diff --git a/mutt_logging.c b/mutt_logging.c index 251632412..a0fc9ed5e 100644 --- a/mutt_logging.c +++ b/mutt_logging.c @@ -342,12 +342,7 @@ int level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, } /** - * mutt_log_listener - Listen for config changes affecting the log file - * @param cs Config items - * @param he HashElem representing config item - * @param name Name of the config item - * @param ev Event type, e.g. #CE_SET - * @retval true Continue notifying + * mutt_log_listener - Listen for config changes affecting the log file - Implements ::cs_listener */ bool mutt_log_listener(const struct ConfigSet *cs, struct HashElem *he, const char *name, enum ConfigEvent ev)