aboutsummaryrefslogtreecommitdiff
path: root/tokenize.c (follow)
Commit message (Collapse)AuthorAgeLines
* Fix discarded const qualifiers from string functionsYaakov Selkowitz2025-12-17-1/+1
| | | | | This is a new warning in GCC 15 that is being promoted to an error due to the werror=true in meson.build.
* tokenize: free content of argv on failure, and reset the argv pointerDaniel Eklöf2021-12-25-3/+4
| | | | | This fixes a memory leak when we failed to parse a command line (for example, because it contained an unclosed quote).
* tokenize: strdup() each individual argvDaniel Eklöf2021-06-20-10/+13
| | | | | Instead of referencing the un-tokenized “raw” command string, strdup() each argv. This way, the input string can be ‘const’.
* tokenize: handle escaped quotesDaniel Eklöf2020-07-27-1/+12
| | | | | | | | | | | | | We only support escaping quotes inside a quote, and only of the same type as the enclosing quote. I.e. "double quote \"escaped double quote\"" But not "double quote \'invalid escaped single quote\'"
* tokenize: remove newline from log message (LOG_ERR appends one for us)Daniel Eklöf2020-07-27-1/+1
|
* tokenize: reset *argv = NULL on errorDaniel Eklöf2020-07-27-0/+1
| | | | | | | This allows the caller to call free() without having to worry about whether it has already been free:d or not. Closes #49.
* slave: break out command line tokenizerDaniel Eklöf2019-07-17-0/+87