summaryrefslogtreecommitdiffstats
path: root/input/cmd_parse.c
Commit message (Collapse)AuthorAgeFilesLines
* input: add a prefix to make any binding act on key repeatwm42014-11-201-1/+2
| | | | | | The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way.
* command: don't require whitespace before ';' or '#'wm42014-10-311-4/+1
| | | | | | | This change is probably too simplistic, but most things appear to work, so I don't care about that now. Fixes #1232.
* command: fix debug outputwm42014-10-241-2/+2
| | | | It was a bit ugly/annoying.
* command: print executed commands with -vwm42014-10-231-0/+21
|
* input: remove some unneeded codewm42014-10-101-59/+25
|
* input: cosmetics: move codewm42014-10-101-68/+69
|
* input: use mpv_node parser for char** command parserswm42014-10-101-43/+27
| | | | Minor simplification, also drops some useless stuff.
* input: add a function to parse mpv_node as commandwm42014-10-101-62/+160
| | | | For future client API enhancements.
* input: fix use after free with legacy commandswm42014-09-081-7/+11
| | | | | | | | To handle legacy commands, string replacement is used; the modified string is returned by parse_cmd_str(), but it also frees all temporary memory, which includes the replaced string. Closes #1075.
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-1/+1
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* 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.