mirror of
https://git.zx2c4.com/cgit
synced 2025-07-23 04:04:42 +02:00
html.c: add various strbuf and varadic helpers
This adds the fmtalloc helper, html_txtf, html_vtxtf, and html_attrf. These takes a printf style format string like htmlf but escapes the resulting string. The html_vtxtf variant takes a va_list whereas html_txtf is variadic. Signed-off-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
57d09bf448
commit
fd00d2f9d6
3 changed files with 63 additions and 4 deletions
3
cgit.h
3
cgit.h
|
@ -327,6 +327,9 @@ extern void cgit_diff_commit(struct commit *commit, filepair_fn fn,
|
|||
__attribute__((format (printf,1,2)))
|
||||
extern char *fmt(const char *format,...);
|
||||
|
||||
__attribute__((format (printf,1,2)))
|
||||
extern char *fmtalloc(const char *format,...);
|
||||
|
||||
extern struct commitinfo *cgit_parse_commit(struct commit *commit);
|
||||
extern struct taginfo *cgit_parse_tag(struct tag *tag);
|
||||
extern void cgit_parse_url(const char *url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue