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)
23 write(htmlfd, txt, strlen(txt));
26 void htmlf(const char *format, ...)
28 static char buf[65536];
31 va_start(args, format);
32 vsnprintf(buf, sizeof(buf), format, args);
37 void html_txt(char *txt)
42 if (c=='<' || c=='>' || c=='&') {
61 void html_attr(char *txt)
66 if (c=='<' || c=='>' || c=='\'') {
84 void html_link_open(char *url, char *title, char *class)
99 void html_link_close(void)