From fd00d2f9d6088223f57006949dc6ce7c36316a79 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sun, 7 Apr 2013 14:40:50 +0100 Subject: 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 --- cgit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index 7581cc1..7619cbb 100644 --- a/cgit.h +++ b/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); -- cgit v1.2.1