X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/0d169ada2ba81210ab1191a5f2212662e90db77e..7c849d94ec1cfecdec5a88d49f5af5c98f96ebca:/html.c diff --git a/html.c b/html.c index 5780dc1..fab67bd 100644 --- a/html.c +++ b/html.c @@ -1,3 +1,11 @@ +/* html.c: helper functions for html output + * + * Copyright (C) 2006 Lars Hjemli + * + * Licensed under GNU General Public License v2 + * (see COPYING for full license text) + */ + #include "cgit.h" char *fmt(const char *format, ...) @@ -20,16 +28,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)