summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 19:45:42 +0100
committerwm4 <wm4@nowhere>2013-12-21 21:05:02 +0100
commitd8d42b44fc717c695af59c14213d54885088ea37 (patch)
tree9dbfd597e3352249cb5d1fda996d2c0ce1602fe9 /input/input.c
parenta2d144fc8f146f96e4fe97b1b2c15828e24f8494 (diff)
downloadmpv-d8d42b44fc717c695af59c14213d54885088ea37.tar.bz2
mpv-d8d42b44fc717c695af59c14213d54885088ea37.tar.xz
m_option, m_config: mp_msg conversions
Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/input/input.c b/input/input.c
index d0eac2529c..8dd8e76bd8 100644
--- a/input/input.c
+++ b/input/input.c
@@ -105,8 +105,8 @@ struct key_name {
#define OARG_INT(def) OPT_INT(ARG(i), 0, OPTDEF_INT(def))
#define OARG_CHOICE(def, c) OPT_CHOICE(ARG(i), 0, c, OPTDEF_INT(def))
-static int parse_cycle_dir(const struct m_option *opt, struct bstr name,
- struct bstr param, void *dst);
+static int parse_cycle_dir(struct mp_log *log, const struct m_option *opt,
+ struct bstr name, struct bstr param, void *dst);
static const struct m_option_type m_option_type_cycle_dir = {
.name = "up|down",
.parse = parse_cycle_dir,
@@ -813,8 +813,8 @@ void mp_input_rm_key_fd(struct input_ctx *ictx, int fd)
input_unlock(ictx);
}
-static int parse_cycle_dir(const struct m_option *opt, struct bstr name,
- struct bstr param, void *dst)
+static int parse_cycle_dir(struct mp_log *log, const struct m_option *opt,
+ struct bstr name, struct bstr param, void *dst)
{
double val;
if (bstrcmp0(param, "up") == 0) {
@@ -822,7 +822,7 @@ static int parse_cycle_dir(const struct m_option *opt, struct bstr name,
} else if (bstrcmp0(param, "down") == 0) {
val = -1;
} else {
- return m_option_type_double.parse(opt, name, param, dst);
+ return m_option_type_double.parse(log, opt, name, param, dst);
}
*(double *)dst = val;
return 1;
@@ -1041,7 +1041,7 @@ static struct mp_cmd *parse_cmd(struct parse_ctx *ctx, int def_flags)
struct mp_cmd_arg *cmdarg = &cmd->args[cmd->nargs];
cmdarg->type = opt;
cmd->nargs++;
- r = m_option_parse(opt, bstr0(cmd->name), cur_token, &cmdarg->v);
+ r = m_option_parse(ctx->log, opt, bstr0(cmd->name), cur_token, &cmdarg->v);
if (r < 0) {
MP_ERR(ctx, "Command %s: argument %d can't be parsed: %s.\n",
cmd->name, i + 1, m_option_strerror(r));