summaryrefslogtreecommitdiff
path: root/lib/include/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/include/util.h')
-rw-r--r--lib/include/util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/include/util.h b/lib/include/util.h
index a6e96fa..a9d111b 100644
--- a/lib/include/util.h
+++ b/lib/include/util.h
@@ -73,6 +73,17 @@ char *rdline(int fd, int argc, const char *const *argv);
*/
int unescape(char *src);
+/*
+ Split a space seperated string into a sequence of null-terminated
+ strings. Return a NULL terminated array of strings pointing to the
+ start of each sub string.
+
+ If a double quote is encountered, the entire string up to to the next,
+ unescaped double quite is interpreted as a single sub string and
+ fed through the unescape function.
+
+ The returned array must be freed with free().
+*/
char **split_argv(char *str);
/*