]> granicus.if.org Git - neomutt/commitdiff
drop mutt_dump_variables()
authorRichard Russon <rich@flatcap.org>
Sat, 15 Jun 2019 14:28:44 +0000 (15:28 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 15 Jun 2019 14:42:06 +0000 (15:42 +0100)
This function has been replaced by dump_config().

init.c
mutt.h

diff --git a/init.c b/init.c
index 9de0c77d1a6df4559eedf897d50a1aa0b57ea9c9..fc9cda3118f3b21ab70a6e94a0906179bb3d847a 100644 (file)
--- 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 f2c833634cc4be63cc09a707c1a71c82cf771ff5..c264f4fac260ba6b0bb5e63c3dab717a73aade3f 100644 (file)
--- 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);