From c505116b91d3c92f0c3066cb9806773d2df11088 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sat, 10 Dec 2011 05:34:20 -0500 Subject: strbuf: add strbuf_add*_urlencode This just follows the rfc3986 rules for percent-encoding url data into a strbuf. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- strbuf.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'strbuf.h') diff --git a/strbuf.h b/strbuf.h index 46a33f8c46..cecd48c45a 100644 --- a/strbuf.h +++ b/strbuf.h @@ -115,4 +115,9 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *co extern int strbuf_branchname(struct strbuf *sb, const char *name); extern int strbuf_check_branch_ref(struct strbuf *sb, const char *name); +extern void strbuf_add_urlencode(struct strbuf *, const char *, size_t, + int reserved); +extern void strbuf_addstr_urlencode(struct strbuf *, const char *, + int reserved); + #endif /* STRBUF_H */ -- cgit v1.2.3