summaryrefslogtreecommitdiffstats
path: root/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-07-30 01:58:41 +0200
committerwm4 <wm4@nowhere>2012-07-30 02:02:23 +0200
commitd83211722e9ba6543bec65745f371423c3da9b9b (patch)
treee1a6a447cee96f19c1efa183435c1fec34ec618e /m_option.h
parent128c5839ed154aeadb4bdcbcf1b32e0ea788cbf6 (diff)
downloadmpv-d83211722e9ba6543bec65745f371423c3da9b9b.tar.bz2
mpv-d83211722e9ba6543bec65745f371423c3da9b9b.tar.xz
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
Diffstat (limited to 'm_option.h')
-rw-r--r--m_option.h2
1 files changed, 1 insertions, 1 deletions
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)