diff options
author | Max Kellermann <max@duempel.org> | 2009-09-25 00:53:15 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-09-25 00:53:15 +0200 |
commit | 7542ec4f2028b5b154dd1f1777a1d07b585e4b52 (patch) | |
tree | 7421963bf02adcda8f46cd9319c2bfbb6121a968 /src/tokenizer.h | |
parent | 89ba540e6d76aae0a594daebb9db8524ea3ed528 (diff) | |
download | mpd-7542ec4f2028b5b154dd1f1777a1d07b585e4b52.tar.gz mpd-7542ec4f2028b5b154dd1f1777a1d07b585e4b52.tar.xz mpd-7542ec4f2028b5b154dd1f1777a1d07b585e4b52.zip |
command: relax requirements for unquoted words
Allow most printable characters in unquoted words. The tokenizer
patch introduced very strict requirements for command parameters -
those were undocumented, and we're reverting the strictness now.
Diffstat (limited to '')
-rw-r--r-- | src/tokenizer.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/tokenizer.h b/src/tokenizer.h index e0238f0af..ce4c37ccd 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -37,6 +37,20 @@ char * tokenizer_next_word(char **input_p, GError **error_r); /** + * Reads the next unquoted word from the input string. This function + * modifies the input string. + * + * @param input_p the input string; this function returns a pointer to + * the first non-whitespace character of the following token + * @param error_r if this function returns NULL and **input_p!=0, it + * optionally provides a GError object in this argument + * @return a pointer to the null-terminated word, or NULL on error or + * end of line + */ +char * +tokenizer_next_unquoted(char **input_p, GError **error_r); + +/** * Reads the next quoted string from the input string. A backslash * escapes the following character. This function modifies the input * string. @@ -52,8 +66,9 @@ char * tokenizer_next_string(char **input_p, GError **error_r); /** - * Reads the next word or quoted string from the input. This is a - * wrapper for tokenizer_next_word() and tokenizer_next_string(). + * Reads the next unquoted word or quoted string from the input. This + * is a wrapper for tokenizer_next_unquoted() and + * tokenizer_next_string(). * * @param input_p the input string; this function returns a pointer to * the first non-whitespace character of the following token @@ -63,6 +78,6 @@ tokenizer_next_string(char **input_p, GError **error_r); * or end of line */ char * -tokenizer_next_word_or_string(char **input_p, GError **error_r); +tokenizer_next_param(char **input_p, GError **error_r); #endif |