diff options
author | wm4 <wm4@nowhere> | 2017-06-23 20:51:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-06-23 20:51:12 +0200 |
commit | 0729bee415880fd076d68f2eae9bd646dd28f474 (patch) | |
tree | d040f13872e2d7f66160567e76aec49ed467a8e0 /options/options.c | |
parent | 633152e55a6f851c58267793081dea3162acfb48 (diff) | |
download | mpv-0729bee415880fd076d68f2eae9bd646dd28f474.tar.bz2 mpv-0729bee415880fd076d68f2eae9bd646dd28f474.tar.xz |
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.
Diffstat (limited to 'options/options.c')
-rw-r--r-- | options/options.c | 13 |
1 files changed, 8 insertions, 5 deletions
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 | |