diff options
author | wm4 <wm4@nowhere> | 2016-09-17 18:07:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-17 18:07:40 +0200 |
commit | dc48893630d11829121a45137460afb45e24ef2d (patch) | |
tree | e9209740429c15bfa768d3f9c5086cf8ef760df9 /options/m_option.h | |
parent | d1d5e9dda430b2aa7172308ad7c6639913680af5 (diff) | |
download | mpv-dc48893630d11829121a45137460afb45e24ef2d.tar.bz2 mpv-dc48893630d11829121a45137460afb45e24ef2d.tar.xz |
options: simplify M_OPT_EXIT
There were multiple values under M_OPT_EXIT (M_OPT_EXIT-n for n>=0).
Somehow M_OPT_EXIT-n either meant error code n (with n==0 no error?), or
the number of option valus consumed (0 or 1). The latter is MPlayer
legacy, which left it to the option type parsers to determine whether an
option took a value or not. All of this was changed in mpv, by requiring
the user to use explicit syntax ("--opt=val" instead of "-opt val").
In any case, the n value wasn't even used (anymore), so rip this all
out. Now M_OPT_EXIT-1 doesn't mean anything, and could be used by a new
error code.
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/options/m_option.h b/options/m_option.h index a4019f411a..6435584716 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -417,8 +417,7 @@ struct m_option { // On success parsers return a number >= 0. // // To indicate that MPlayer should exit without playing anything, -// parsers return M_OPT_EXIT minus the number of parameters they -// consumed: \ref M_OPT_EXIT or \ref M_OPT_EXIT-1. +// parsers return M_OPT_EXIT. // // On error one of the following (negative) error codes is returned: @@ -442,8 +441,6 @@ struct m_option { #define M_OPT_PARSER_ERR -6 // Returned when MPlayer should exit. Used by various help stuff. -/** M_OPT_EXIT must be the lowest number on this list. - */ #define M_OPT_EXIT -7 char *m_option_strerror(int code); |