X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fresp.c;h=52fbd4b12f8eeab0c25621810c8c6292841d1bf8;hb=ecd4208b888be7f60bc2ae013b799861959b7cb9;hp=7de5c90c76150cb3238731a652e9f46a3cc2619c;hpb=c35bb77a938bbabe894da409e72c138a11bd302e;p=ashd.git diff --git a/lib/resp.c b/lib/resp.c index 7de5c90..52fbd4b 100644 --- a/lib/resp.c +++ b/lib/resp.c @@ -86,16 +86,12 @@ char *htmlquote(char *text) return(ret = buf.b); } -void simpleerror(int fd, int code, char *msg, char *fmt, ...) +static void simpleerror2v(FILE *out, int code, char *msg, char *fmt, va_list args) { struct charbuf buf; char *tmp; - va_list args; - FILE *out; - va_start(args, fmt); tmp = vsprintf2(fmt, args); - va_end(args); bufinit(buf); bufcatstr(buf, "\r\n"); bufcatstr(buf, "\r\n"); @@ -108,14 +104,34 @@ void simpleerror(int fd, int code, char *msg, char *fmt, ...) bprintf(&buf, "
%s
\r\n", htmlquote(tmp)); bufcatstr(buf, "