From d2e20e38141c882e46eaa77f172fc2ae37a19d3b Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sun, 7 Apr 2013 14:03:47 +0100 Subject: shared.c: add strbuf_ensure_end This is a small helper so that we can easily ensure that a strbuf ends with the specified character. Signed-off-by: John Keeping --- cgit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index 7619cbb..3e9d55b 100644 --- a/cgit.h +++ b/cgit.h @@ -304,6 +304,8 @@ extern char *ensure_end(const char *str, char c); extern char *strlpart(char *txt, int maxlen); extern char *strrpart(char *txt, int maxlen); +extern void strbuf_ensure_end(struct strbuf *sb, char c); + extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); extern void cgit_free_reflist_inner(struct reflist *list); extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, -- cgit v1.2.1