From 2dc6b27ee7715cc7d50944a5bbde0a4d3e97771a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 23 Nov 2019 01:09:09 +0100 Subject: input: export input.conf comments ot input-bindings property This is supposed to turn input.conf comments into inline documentation. Whether this will be useful depends on whether there'll be a script using this field. This changes a small aspect of input.conf parsing fundamentally: this attempts to strip comments/whitespace from the command string, which will later be used to generate the command when a key binding is executed. This should not have any negative effects, but there could be unknown bugs. (For some reason, every command is parsed when input.conf is parsed, but it still only stores the string for the command. I guess that saves some minor amount of memory.) --- input/cmd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'input/cmd.h') diff --git a/input/cmd.h b/input/cmd.h index 72824dffc8..c63e0bdd6c 100644 --- a/input/cmd.h +++ b/input/cmd.h @@ -100,6 +100,7 @@ typedef struct mp_cmd { int nargs; int flags; // mp_cmd_flags bitfield char *original; + char *desc; // (usually NULL since stripped away later) char *input_section; bool is_up_down : 1; bool is_up : 1; -- cgit v1.2.3