From ad5bc380e2605108398d3815ad10adcbebf3913b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Oct 2012 21:09:42 +0200 Subject: 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. --- input/input.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'input/input.h') 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 -- cgit v1.2.3