+static bool
+parse_settings_value_show (struct lexer *lexer, const char *name,
+ enum settings_value_show *show)
+{
+ if (lex_match_id (lexer, name))
+ {
+ if (!lex_force_match (lexer, T_EQUALS))
+ exit (1);
+
+ if (lex_match_id (lexer, "DEFAULT"))
+ *show = SETTINGS_VALUE_SHOW_DEFAULT;
+ else if (lex_match_id (lexer, "VALUE"))
+ *show = SETTINGS_VALUE_SHOW_VALUE;
+ else if (lex_match_id (lexer, "LABEL"))
+ *show = SETTINGS_VALUE_SHOW_LABEL;
+ else if (lex_match_id (lexer, "BOTH"))
+ *show = SETTINGS_VALUE_SHOW_BOTH;
+ else
+ {
+ lex_error_expecting (lexer, "DEFAULT", "VALUE", "LABEL", "BOTH");
+ exit (1);
+ }
+
+ return true;
+ }
+ else
+ return false;
+}
+
+static bool
+parse_string_setting (struct lexer *lexer, const char *name, char **stringp)
+{
+ if (lex_match_id (lexer, name))
+ {
+ lex_match (lexer, T_EQUALS);
+ if (!lex_force_string (lexer))
+ exit (1);
+
+ free (*stringp);
+ *stringp = xstrdup (lex_tokcstr (lexer));
+
+ lex_get (lexer);
+ return true;
+ }
+ else
+ return false;
+}
+