X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=quote.h;h=024e21d80ceaa37ec1f893acc907a62092560d21;hb=d3ee177e5059c81e0e73be091741f60ebfbce520;hp=f83eb233c4b153c4c073b3ccd5bf2f5dd926b739;hpb=a9eb30412942224c1494357f495b8b2a4b3d46b8;p=git.git diff --git a/quote.h b/quote.h index f83eb233c..024e21d80 100644 --- a/quote.h +++ b/quote.h @@ -1,8 +1,7 @@ #ifndef QUOTE_H #define QUOTE_H -#include -#include +struct strbuf; /* Help to copy the thing properly quoted for the shell safety. * any single quote is replaced with '\'', any exclamation point @@ -54,9 +53,12 @@ extern void quote_two_c_style(struct strbuf *, const char *, const char *, int); extern void write_name_quoted(const char *name, FILE *, int terminator); extern void write_name_quotedpfx(const char *pfx, size_t pfxlen, const char *name, FILE *, int terminator); +extern void write_name_quoted_relative(const char *name, size_t len, + const char *prefix, size_t prefix_len, + FILE *fp, int terminator); /* quote path as relative to the given prefix */ -char *quote_path_relative(const char *in, int len, +extern char *quote_path_relative(const char *in, int len, struct strbuf *out, const char *prefix); /* quoting as a string literal for other languages */