From 6dea8fceda981481798f6f492db54c6fd8708c3b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 10 Apr 2017 21:19:13 +0200 Subject: options: deprecate --loop Also "announce" the plans to undeprecate it with changed semantics later. The deprecation period is needed to warn script authors and client API users (etc.) of the change. This is done because everyone seems to expect --loop to loop the current file, not the playlist. Even in cases when only 1 file is on the playlist, the --loop-file semantics seem to be preferred. --- options/m_option.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'options/m_option.h') diff --git a/options/m_option.h b/options/m_option.h index f3a4e7bc1e..064b7f83b1 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -715,9 +715,12 @@ extern const char m_option_path_separator; // If "--optname" was removed, but "--newname" has the same semantics. // It will be redirected, and a warning will be printed on first use. -#define OPT_REPLACED(optname, newname) \ +#define OPT_REPLACED_MSG(optname, newname, msg) \ {.name = optname, .type = &m_option_type_alias, .priv = newname, \ - .deprecation_message = "", .offset = -1} + .deprecation_message = (msg), .offset = -1} + +// Same, with a generic deprecation message. +#define OPT_REPLACED(optname, newname) OPT_REPLACED_MSG(optname, newname, "") // "--optname" doesn't exist, but inform the user about a replacement with msg. #define OPT_REMOVED(optname, msg) \ -- cgit v1.2.3