aboutsummaryrefslogtreecommitdiffhomepage
path: root/input/cmd_parse.c
Commit message (Collapse)AuthorAge
* input: allow - as separator between commands, instead of _Gravatar wm42015-05-25
| | | | | | | | | | Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
* Update license headersGravatar Marcin Kurczewski2015-04-13
| | | | Signed-off-by: wm4 <wm4@nowhere>
* input: fix dangling pointerGravatar wm42015-01-25
| | | | Removes undefined behavior that showed up as crap when running with -v.
* input: simplifyGravatar wm42014-11-24
|
* input: add a prefix to make any binding act on key repeatGravatar wm42014-11-20
| | | | | | 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 '#'Gravatar wm42014-10-31
| | | | | | | 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 outputGravatar wm42014-10-24
| | | | It was a bit ugly/annoying.
* command: print executed commands with -vGravatar wm42014-10-23
|
* input: remove some unneeded codeGravatar wm42014-10-10
|
* input: cosmetics: move codeGravatar wm42014-10-10
|
* input: use mpv_node parser for char** command parsersGravatar wm42014-10-10
| | | | Minor simplification, also drops some useless stuff.
* input: add a function to parse mpv_node as commandGravatar wm42014-10-10
| | | | For future client API enhancements.
* input: fix use after free with legacy commandsGravatar wm42014-09-08
| | | | | | | | 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 elseGravatar wm42014-08-29
| | | | | | | | | 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 parserGravatar wm42014-08-07
| | | | Should fix #989.
* input: remove pausing command prefixesGravatar wm42014-05-11
| | | | | | 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 commandGravatar wm42014-02-24
| | | | | | | | | | | | | | | 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 commandsGravatar wm42014-02-23
| | | | | | 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 parsingGravatar wm42013-12-30
| | | | | | | | | | | 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 filesGravatar wm42013-12-26
This is mostly just moving code around.