summaryrefslogtreecommitdiffstats
path: root/input/cmd_parse.c
Commit message (Collapse)AuthorAgeFilesLines
* input: fix off by one error in command parserwm42014-08-071-1/+1
| | | | Should fix #989.
* input: remove pausing command prefixeswm42014-05-111-2/+0
| | | | | | These are now equivalent to combining commands with the "cycle pause" or "set pause" commands, and thus are not needed anymore. They were also obscure and undocumented.
* command: fix loadfile commandwm42014-02-241-2/+3
| | | | | | | | | | | | | | | This was broken by commit bb6b543812a724. Note that the original pull request was fine, but it was broken by my own stupidity when I was "improving" it. The problem is that the new loadfile argument was not considered optional anymore after my changes. The original pull request did handle this by setting .defval to a dummy value, but I removed that part. Fix it again by introducing a flag that designates that the parameter is optional. (I didn't want to add it to m_option.h, because technically, all options are optional, and it's not possible to have non-optional options.)
* command: remove special casing for strings in input commandswm42014-02-231-5/+13
| | | | | | Until now, strings were the only allowed dynamically allocated argument type in input commands. Extend it so that it works for any type. (The string expansion in command.c is of course still string specific.)
* common: simplify and optimize string escape parsingwm42013-12-301-26/+1
| | | | | | | | | | | This code is shared between input.conf parser and option parser. Until now, the performance didn't really matter. But I want to use this code for JSON parsing too, and since JSON will have to be parsed a lot, it should probably try to avoid realloc'ing too much. This commit moves parsing of C-style escaped strings into a common function, and allows using it in a way realloc can be completely avoided, if the already allocated buffer is large enough.
* input: split off some code from input.c to separate fileswm42013-12-261-0/+410
This is mostly just moving code around.