author | Sebastian Harl <sh@tokkee.org> | |
Sun, 5 Jun 2016 13:23:41 +0000 (15:23 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 25 Sep 2016 10:42:45 +0000 (12:42 +0200) | ||
commit | 1aa4295ba6875ceb02a7383237bc2485ffab9c1e | |
tree | bbf998f5f8ee156f546e86bb58086874d4b7a632 | tree | snapshot |
parent | 3090a8852788aaca0d8063fdf9ac4ba66f048cd8 | commit | diff |
command parser: Add a vector-based interface.
The new interface expects a parsed list of fields. Parsing of input buffers
is now done centrally in the generic code and the existing parser is a
wrapper around this and the new vector-based parser. The actual command
parsers (PUTVAL for now) receive the parsed list of fields.
As a side-effect, this changes the parser behavior a little:
- "foo=a string with spaces or \\ special characters" is now valid syntax
for specifying options in addition to foo="value with spaces, etc.".
- foo= is now a valid option even without quotes around the empty value.
The new interface expects a parsed list of fields. Parsing of input buffers
is now done centrally in the generic code and the existing parser is a
wrapper around this and the new vector-based parser. The actual command
parsers (PUTVAL for now) receive the parsed list of fields.
As a side-effect, this changes the parser behavior a little:
- "foo=a string with spaces or \\ special characters" is now valid syntax
for specifying options in addition to foo="value with spaces, etc.".
- foo= is now a valid option even without quotes around the empty value.
src/utils_cmd_putval.c | diff | blob | history | |
src/utils_cmd_putval.h | diff | blob | history | |
src/utils_cmds.c | diff | blob | history | |
src/utils_cmds.h | diff | blob | history |