aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/html.c b/html.c
index 5780dc1..bf1490f 100644
--- a/html.c
+++ b/html.c
@@ -20,16 +20,18 @@ char *fmt(const char *format, ...)
void html(const char *txt)
{
- fputs(txt, stdout);
+ write(htmlfd, txt, strlen(txt));
}
void htmlf(const char *format, ...)
{
+ static char buf[65536];
va_list args;
va_start(args, format);
- vprintf(format, args);
+ vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
+ html(buf);
}
void html_txt(char *txt)