From d83211722e9ba6543bec65745f371423c3da9b9b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 30 Jul 2012 01:58:41 +0200 Subject: options: remove "no" options variants The old option parser required adding two options for each flag option: e.g. "-video" and "-novideo". Later, code was added to handle the "no-" prefix automatically for flag options. Remove the "no" prefixed options entirely (unless they are not flag options, then just rename them), and require the user to use the "no-" prefix instead. You can't use the old prefix anymore. Old: -novideo New: --no-video --- m_option.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'm_option.h') diff --git a/m_option.h b/m_option.h index 7acdb067f0..2584471e7c 100644 --- a/m_option.h +++ b/m_option.h @@ -448,7 +448,7 @@ static inline void m_option_free(const m_option_t *opt, void *dst) */ #define OPT_FLAG_ON(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_flag, .max = 1) #define OPT_FLAG_OFF(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_flag, .min = 1) -#define OPT_MAKE_FLAGS(optname, varname, flags) OPT_FLAG_ON(optname, varname, flags), OPT_FLAG_OFF("no" optname, varname, flags) +#define OPT_MAKE_FLAGS OPT_FLAG_ON #define OPT_FLAG_CONSTANTS(...) OPT_FLAG_CONSTANTS_(__VA_ARGS__, .type = &m_option_type_flag) #define OPT_FLAG_CONSTANTS_(optname, varname, flags, offvalue, value, ...) OPT_GENERAL(optname, varname, flags, .min = offvalue, .max = value, __VA_ARGS__) #define OPT_STRINGLIST(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_string_list) -- cgit v1.2.3