summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-07-02 16:26:41 +0200
committerwm4 <wm4@nowhere>2017-07-02 16:29:45 +0200
commite4bc563fd2dcff1059624efb7b948b2886a382ab (patch)
tree272d96d980aca685e92083f3097c7eed418e4860 /options/m_option.h
parentd24f4587a7cb85e559b06d7a191bb28bbdbf52ad (diff)
downloadmpv-e4bc563fd2dcff1059624efb7b948b2886a382ab.tar.bz2
mpv-e4bc563fd2dcff1059624efb7b948b2886a382ab.tar.xz
options: change everything again
Fucking bullshit.
Diffstat (limited to 'options/m_option.h')
-rw-r--r--options/m_option.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/options/m_option.h b/options/m_option.h
index dea3956f7f..6935c93594 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -65,6 +65,7 @@ extern const m_option_type_t m_option_type_node;
// Used internally by m_config.c
extern const m_option_type_t m_option_type_alias;
+extern const m_option_type_t m_option_type_cli_alias;
extern const m_option_type_t m_option_type_removed;
extern const m_option_type_t m_option_type_subconfig;
@@ -579,8 +580,8 @@ extern const char m_option_path_separator;
#define OPT_KEYVALUELIST(...) \
OPT_GENERAL(char**, __VA_ARGS__, .type = &m_option_type_keyvalue_list)
-#define OPT_PATHLIST(...) \
- OPT_GENERAL(char**, __VA_ARGS__, .type = &m_option_type_string_append_list, \
+#define OPT_PATHLIST(...) \
+ OPT_GENERAL(char**, __VA_ARGS__, .type = &m_option_type_string_list,\
.priv = (void *)&m_option_path_separator)
#define OPT_INT(...) \
@@ -713,6 +714,11 @@ extern const char m_option_path_separator;
// Same, with a generic deprecation message.
#define OPT_REPLACED(optname, newname) OPT_REPLACED_MSG(optname, newname, "")
+// Alias, resolved on the CLI/config file/profile parser level only.
+#define OPT_CLI_ALIAS(optname, newname) \
+ {.name = optname, .type = &m_option_type_cli_alias, .priv = newname, \
+ .flags = M_OPT_NOPROP, .offset = -1}
+
// "--optname" doesn't exist, but inform the user about a replacement with msg.
#define OPT_REMOVED(optname, msg) \
{.name = optname, .type = &m_option_type_removed, .priv = msg, \