3 char *fmt(const char *format, ...)
5 static char buf[8][1024];
13 va_start(args, format);
14 len = vsnprintf(buf[bufidx], sizeof(buf[bufidx]), format, args);
16 if (len>sizeof(buf[bufidx]))
17 die("[html.c] string truncated: %s", format);
21 void html(const char *txt)
26 void htmlf(const char *format, ...)
30 va_start(args, format);
31 vprintf(format, args);
35 void html_txt(char *txt)
40 if (c=='<' || c=='>' || c=='&') {
59 void html_attr(char *txt)
64 if (c=='<' || c=='>' || c=='\'') {
82 void html_link_open(char *url, char *title, char *class)
97 void html_link_close(void)