X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=quote.h;h=4b72a583cfdadd05d2892e1e4c712cd00a52bd31;hb=d627bf6039ac3db5600cb76c738c13bb6e8204d0;hp=fa09309cf6890fa82b4034dcdf957a59e0339d14;hpb=3f02c0ad360d96e8dbba92f97b42ebbaa4319db1;p=thirdparty%2Fgit.git diff --git a/quote.h b/quote.h index fa09309cf6..4b72a583cf 100644 --- a/quote.h +++ b/quote.h @@ -64,16 +64,19 @@ struct strvec; int sq_dequote_to_strvec(char *arg, struct strvec *); int unquote_c_style(struct strbuf *, const char *quoted, const char **endp); -size_t quote_c_style(const char *name, struct strbuf *, FILE *, int no_dq); -void quote_two_c_style(struct strbuf *, const char *, const char *, int); + +/* Bits in the flags parameter to quote_c_style() */ +#define CQUOTE_NODQ 01 +size_t quote_c_style(const char *name, struct strbuf *, FILE *, unsigned); +void quote_two_c_style(struct strbuf *, const char *, const char *, unsigned); void write_name_quoted(const char *name, FILE *, int terminator); void write_name_quoted_relative(const char *name, const char *prefix, FILE *fp, int terminator); /* quote path as relative to the given prefix */ -char *quote_path_relative(const char *in, const char *prefix, - struct strbuf *out); +char *quote_path(const char *in, const char *prefix, struct strbuf *out, unsigned flags); +#define QUOTE_PATH_QUOTE_SP 01 /* quoting as a string literal for other languages */ void perl_quote_buf(struct strbuf *sb, const char *src);