X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fresp.c;h=bae24bf2c0e85638ba1e26399c209d4fcdf25d5b;hb=e6fbc5e5b16049336cb7357d387b0f08e91fad59;hp=7de5c90c76150cb3238731a652e9f46a3cc2619c;hpb=c35bb77a938bbabe894da409e72c138a11bd302e;p=ashd.git diff --git a/lib/resp.c b/lib/resp.c index 7de5c90..bae24bf 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, "