-rw-r--r-- | html.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -22,3 +22,3 @@ void html(const char *txt) { - fputs(txt, stdout); + write(htmlfd, txt, strlen(txt)); } @@ -27,2 +27,3 @@ void htmlf(const char *format, ...) { + static char buf[65536]; va_list args; @@ -30,4 +31,5 @@ void htmlf(const char *format, ...) va_start(args, format); - vprintf(format, args); + vsnprintf(buf, sizeof(buf), format, args); va_end(args); + html(buf); } |