diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2006-10-06 10:33:27 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2006-10-06 10:33:27 +0000 |
commit | e19882660677baf8ba01c3006cf1a8ae5bee83ef (patch) | |
tree | 998b69d48f4db57d4e3d0540ae808f1722612528 /src/buffer2array.h | |
parent | e3222d807a6178e0a4a5254b8443c3432b663efb (diff) | |
download | mpd-e19882660677baf8ba01c3006cf1a8ae5bee83ef.tar.gz mpd-e19882660677baf8ba01c3006cf1a8ae5bee83ef.tar.xz mpd-e19882660677baf8ba01c3006cf1a8ae5bee83ef.zip |
put back np's supperrior buffer2array, and fix my bug fix from change 4872
git-svn-id: https://svn.musicpd.org/mpd/trunk@4875 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/buffer2array.h')
-rw-r--r-- | src/buffer2array.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/buffer2array.h b/src/buffer2array.h index fa6882fd9..e12f0ceed 100644 --- a/src/buffer2array.h +++ b/src/buffer2array.h @@ -21,8 +21,12 @@ #include "../config.h" -int buffer2array(char *buffer, char ***array); - -void freeArgArray(char **array, int argArrayLength); +/* tokenizes up to max elements in buffer (a null-terminated string) and + * stores the result in array (which must be capable of holding up to + * max elements). Tokenization is based on C string quoting rules. + * The arguments buffer and array are modified. + * Returns the number of elements tokenized. + */ +int buffer2array(char *buffer, char *array[], const int max); #endif |