X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=string.c;h=8dddd2fdb96d3b0ffedb41861e94e55e3cba9510;hb=b93023b9a3257ca6c4a0bfa37f73bec0a2513699;hp=86e775387a9a7d5b1c0f429a99255ba621024d30;hpb=de9ce9690ac6194e8e7eaacd10baf21d827e42a4;p=paraslash.git diff --git a/string.c b/string.c index 86e77538..8dddd2fd 100644 --- a/string.c +++ b/string.c @@ -10,7 +10,6 @@ #include #include /* uname() */ -#include #include #include #include @@ -803,15 +802,18 @@ err: * Split a buffer into words. * * This parser honors single and double quotes, backslash-escaped characters - * and special characters like \p \\n. The result contains pointers to copies - * of the words contained in \a buf and has to be freed by using \ref - * free_argv(). + * and special characters like \\n. The result contains pointers to copies of + * the words contained in buf and has to be freed by using \ref free_argv(). * * \param buf The buffer to be split. * \param delim Each character in this string is treated as a separator. * \param result The array of words is returned here. * - * \return Number of words in \a buf, negative on errors. + * It's OK to pass NULL as the buffer argument. This is equivalent to passing + * the empty string. + * + * \return Number of words in buf, negative on errors. The array returned + * through the result pointer is NULL terminated. */ int create_argv(const char *buf, const char *delim, char ***result) {