X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=quote.h;h=133155a48b4baa56cd70c07af8a477771f373105;hb=afb6b561e3dad13df5d9df9731751a3d310c0854;hp=252b0df4b289d4955eaad42d61af33a07c814fd9;hpb=7878b07c0d86d05fa505f2464557c69addcc2c05;p=git.git diff --git a/quote.h b/quote.h index 252b0df4b..133155a48 100644 --- a/quote.h +++ b/quote.h @@ -45,6 +45,14 @@ extern char *sq_dequote(char *); */ extern int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc); +/* + * Same as above, but store the unquoted strings in an argv_array. We will + * still modify arg in place, but unlike sq_dequote_to_argv, the argv_array + * will duplicate and take ownership of the strings. + */ +struct argv_array; +extern int sq_dequote_to_argv_array(char *arg, struct argv_array *); + extern int unquote_c_style(struct strbuf *, const char *quoted, const char **endp); extern size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq); extern void quote_two_c_style(struct strbuf *, const char *, const char *, int);