X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/fd00d2f9d6088223f57006949dc6ce7c36316a79..ed3497b0de6634350cd17b320538fba918d4084c:/html.c diff --git a/html.c b/html.c index f7772dc..f0ee2d6 100644 --- a/html.c +++ b/html.c @@ -1,6 +1,6 @@ /* html.c: helper functions for html output * - * Copyright (C) 2006 Lars Hjemli + * Copyright (C) 2006-2014 cgit Development Team * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -41,8 +41,6 @@ static const char* url_escape_table[256] = { "%fe", "%ff" }; -static int htmlfd = STDOUT_FILENO; - char *fmt(const char *format, ...) { static char buf[8][1024]; @@ -77,8 +75,8 @@ char *fmtalloc(const char *format, ...) void html_raw(const char *data, size_t size) { - if (write(htmlfd, data, size) != size) - fprintf(stderr, "[html.c] html output truncated.\n"); + if (write(STDOUT_FILENO, data, size) != size) + die_errno("write error on html output"); } void html(const char *txt)