diff options
author | wm4 <wm4@nowhere> | 2012-10-13 21:09:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-14 22:28:51 +0200 |
commit | ad5bc380e2605108398d3815ad10adcbebf3913b (patch) | |
tree | 1960f9297ceb01f2bf016d43a88cd6b800e8619f /input/input.h | |
parent | 0ff7dd992fb06fa8a5cba0a895717787a615e7bb (diff) | |
download | mpv-ad5bc380e2605108398d3815ad10adcbebf3913b.tar.bz2 mpv-ad5bc380e2605108398d3815ad10adcbebf3913b.tar.xz |
input: track location info for input commands
If parsing a command fails, its location is printed. The location is
the path to the input.conf, and the line number of the key binding and
the associated input command.
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/input/input.h b/input/input.h index 988565cb40..4bd68cca48 100644 --- a/input/input.h +++ b/input/input.h @@ -180,8 +180,9 @@ int mp_input_queue_cmd(struct input_ctx *ictx, struct mp_cmd *cmd); struct mp_cmd *mp_input_get_cmd(struct input_ctx *ictx, int time, int peek_only); -/* Parse text and return corresponding struct mp_cmd. */ -struct mp_cmd *mp_input_parse_cmd(bstr str); +// Parse text and return corresponding struct mp_cmd. +// The location parameter is for error messages. +struct mp_cmd *mp_input_parse_cmd(bstr str, const char *location); // After getting a command from mp_input_get_cmd you need to free it using this // function |