util: Don't interpret quotes by default in extract_first_word

This adds an EXTRACT_QUOTES option to allow the previous behaviour, of
not interpreting any character inside ' or " quotes as separators.
This commit is contained in:
Richard Maw
2015-08-07 15:50:42 +00:00
parent 6868560773
commit 12ba2c44dd
8 changed files with 80 additions and 34 deletions
+1
View File
@@ -858,6 +858,7 @@ typedef enum ExtractFlags {
EXTRACT_RELAX = 1,
EXTRACT_CUNESCAPE = 2,
EXTRACT_CUNESCAPE_RELAX = 4,
EXTRACT_QUOTES = 8,
} ExtractFlags;
int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags);