From 0729bee415880fd076d68f2eae9bd646dd28f474 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 23 Jun 2017 20:51:12 +0200 Subject: options: simplify and rename m_option_type_store This was an annoying option type. And still is. But at least it's on the same level as m_option_type_print_fn now, and can probably cleaned up further like it. Both types are for options that are only on the command line, always have special handling (i.e. do something with them in parse_commandline.c before passing them to the generic m_config.c/m_option.c layers), and are m_options only for --list-options and (oddly) the split_opt_silent() function. --- options/options.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index 03ab7c89bc..86b734396b 100644 --- a/options/options.c +++ b/options/options.c @@ -229,19 +229,22 @@ const struct m_sub_options dvd_conf = { const m_option_t mp_opts[] = { // handled in command line pre-parser (parse_commandline.c) - {"v", CONF_TYPE_STORE, M_OPT_FIXED | CONF_NOCFG | M_OPT_NOPROP, .offset = -1}, + {"v", &m_option_type_dummy_flag, M_OPT_FIXED | CONF_NOCFG | M_OPT_NOPROP, + .offset = -1}, {"playlist", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_MIN | M_OPT_FIXED | M_OPT_FILE, .min = 1, .offset = -1}, - {"{", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, .offset = -1}, - {"}", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, .offset = -1}, + {"{", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, + .offset = -1}, + {"}", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, + .offset = -1}, // handled in m_config.c { "include", CONF_TYPE_STRING, M_OPT_FILE, .offset = -1}, { "profile", CONF_TYPE_STRING_LIST, 0, .offset = -1}, { "show-profile", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, .offset = -1}, - { "list-options", CONF_TYPE_STORE, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP, - .offset = -1}, + { "list-options", &m_option_type_dummy_flag, CONF_NOCFG | M_OPT_FIXED | + M_OPT_NOPROP, .offset = -1}, OPT_FLAG("list-properties", property_print_help, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP), { "help", CONF_TYPE_STRING, CONF_NOCFG | M_OPT_FIXED | M_OPT_NOPROP | -- cgit v1.2.3