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/m_option.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'options/m_option.h') diff --git a/options/m_option.h b/options/m_option.h index 8b5f477f0d..20021c2122 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -37,7 +37,7 @@ struct mpv_node; // Simple types extern const m_option_type_t m_option_type_flag; -extern const m_option_type_t m_option_type_store; +extern const m_option_type_t m_option_type_dummy_flag; extern const m_option_type_t m_option_type_int; extern const m_option_type_t m_option_type_int64; extern const m_option_type_t m_option_type_intpair; @@ -201,7 +201,6 @@ struct m_sub_options { }; #define CONF_TYPE_FLAG (&m_option_type_flag) -#define CONF_TYPE_STORE (&m_option_type_store) #define CONF_TYPE_INT (&m_option_type_int) #define CONF_TYPE_INT64 (&m_option_type_int64) #define CONF_TYPE_FLOAT (&m_option_type_float) @@ -222,7 +221,6 @@ struct m_sub_options { // size/alignment requirements for option values in general. union m_option_value { int flag; // not the C type "bool"! - int store; int int_; int64_t int64; int intpair[2]; @@ -579,10 +577,6 @@ extern const char m_option_path_separator; #define OPT_FLAG(...) \ OPT_GENERAL(int, __VA_ARGS__, .type = &m_option_type_flag) -#define OPT_FLAG_STORE(optname, varname, flags, value) \ - OPT_GENERAL(int, optname, varname, flags, .max = value, \ - .type = &m_option_type_store) - #define OPT_STRINGLIST(...) \ OPT_GENERAL(char**, __VA_ARGS__, .type = &m_option_type_string_list) -- cgit v1.2.3