aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer2array.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-10-06 08:54:43 +0000
committerEric Wong <normalperson@yhbt.net>2006-10-06 08:54:43 +0000
commite3222d807a6178e0a4a5254b8443c3432b663efb (patch)
tree9e404aedec15a6154b5f7ed891b7465181c91f9e /src/buffer2array.h
parent1a51bfb84a9d3eb6c1ae891403ab237ee24a3b12 (diff)
downloadmpd-e3222d807a6178e0a4a5254b8443c3432b663efb.tar.gz
mpd-e3222d807a6178e0a4a5254b8443c3432b663efb.tar.xz
mpd-e3222d807a6178e0a4a5254b8443c3432b663efb.zip
Revert buffer2array() behavior back to tried and true 0.11.x version
Warren's fix in r4872 made phpMp work again, but also broke the unit tests completely (they work in this version). The version in 0.12.0 is far too buggy (it was from mpd-ke, what do you expect?). This one passes all the unit tests that the mpd-ke one passed, and should also work with phpMp when used with PHP magic quotes. This also means we can search on 100 (or more) tags at once, so no more arbitrary limits other than system memory. To run the unit tests, just do this: gcc -o t -DUNIT_TEST=1 src/buffer2array.c && ./t && echo OK git-svn-id: https://svn.musicpd.org/mpd/trunk@4874 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/buffer2array.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/buffer2array.h b/src/buffer2array.h
index e12f0ceed..fa6882fd9 100644
--- a/src/buffer2array.h
+++ b/src/buffer2array.h
@@ -21,12 +21,8 @@
#include "../config.h"
-/* 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);
+int buffer2array(char *buffer, char ***array);
+
+void freeArgArray(char **array, int argArrayLength);
#endif