diff options
author | John Keeping <john@keeping.me.uk> | 2013-04-07 22:03:47 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-04-08 23:10:11 (JST) |
commit | d2e20e38141c882e46eaa77f172fc2ae37a19d3b (patch) | |
tree | 1a1b7ee0bc3c0d6eb9c82f083866d6cfc56af491 /cgit.h | |
parent | fd00d2f9d6088223f57006949dc6ce7c36316a79 (diff) | |
download | cgit-d2e20e38141c882e46eaa77f172fc2ae37a19d3b.zip cgit-d2e20e38141c882e46eaa77f172fc2ae37a19d3b.tar.gz |
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 <john@keeping.me.uk>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -304,6 +304,8 @@ extern char *ensure_end(const char *str, char c); | |||
304 | extern char *strlpart(char *txt, int maxlen); | 304 | extern char *strlpart(char *txt, int maxlen); |
305 | extern char *strrpart(char *txt, int maxlen); | 305 | extern char *strrpart(char *txt, int maxlen); |
306 | 306 | ||
307 | extern void strbuf_ensure_end(struct strbuf *sb, char c); | ||
308 | |||
307 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); | 309 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
308 | extern void cgit_free_reflist_inner(struct reflist *list); | 310 | extern void cgit_free_reflist_inner(struct reflist *list); |
309 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, | 311 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, |