From 402b90d4114bfe64eaf5f47d28decef100bf4932 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sat, 15 Jun 2019 15:28:44 +0100 Subject: [PATCH] drop mutt_dump_variables() This function has been replaced by dump_config(). --- init.c | 40 ---------------------------------------- mutt.h | 1 - 2 files changed, 41 deletions(-) diff --git a/init.c b/init.c index 9de0c77d1..fc9cda311 100644 --- a/init.c +++ b/init.c @@ -2612,46 +2612,6 @@ void mutt_commands_apply(void *data, void (*application)(void *, const struct Co } #endif -/** - * mutt_dump_variables - Print a list of all variables with their values - * @param hide_sensitive Don't display the values of private config items - * @retval 0 Success - * @retval 1 Error - */ -int mutt_dump_variables(bool hide_sensitive) -{ - char cmd[256]; - struct Buffer *err = mutt_buffer_pool_get(); - struct Buffer *token = mutt_buffer_pool_get(); - - for (int i = 0; MuttVars[i].name; i++) - { - if (MuttVars[i].type == DT_SYNONYM) - continue; - - if (hide_sensitive && IS_SENSITIVE(MuttVars[i])) - { - mutt_message("%s='***'", MuttVars[i].name); - continue; - } - snprintf(cmd, sizeof(cmd), "set ?%s\n", MuttVars[i].name); - if (mutt_parse_rc_line(cmd, token, err) == MUTT_CMD_ERROR) - { - mutt_message("%s", mutt_b2s(err)); - mutt_buffer_pool_release(&token); - mutt_buffer_pool_release(&err); - - return 1; // TEST17: can't test - } - mutt_message("%s", mutt_b2s(err)); - } - - mutt_buffer_pool_release(&token); - mutt_buffer_pool_release(&err); - - return 0; -} - /** * mutt_extract_token - Extract one token from a string * @param dest Buffer for the result diff --git a/mutt.h b/mutt.h index f2c833634..c264f4fac 100644 --- a/mutt.h +++ b/mutt.h @@ -147,7 +147,6 @@ int mutt_var_value_complete(char *buf, size_t buflen, int pos); void myvar_set(const char *var, const char *val); bool mutt_nm_query_complete(char *buf, size_t buflen, int pos, int numtabs); bool mutt_nm_tag_complete(char *buf, size_t buflen, int numtabs); -int mutt_dump_variables(bool hide_sensitive); HookFlags mutt_get_hook_type(const char *name); enum CommandResult mutt_parse_rc_line(/* const */ char *line, struct Buffer *token, struct Buffer *err); int mutt_query_variables(struct ListHead *queries); -- 2.49.0