mirror of
https://git.zx2c4.com/cgit
synced 2024-12-22 15:11:53 +00:00
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>
This commit is contained in:
parent
fd00d2f9d6
commit
d2e20e3814
2
cgit.h
2
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,
|
||||
|
Loading…
Reference in New Issue
Block a user