X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fresp.c;h=bae24bf2c0e85638ba1e26399c209d4fcdf25d5b;hb=5de3363121322e0f307885499786ecdb451a8ec1;hp=2c0fa835daaf8a969f88cd36d509952a47d9f842;hpb=51a4b1ad5f25ea29b94384e21c48152cce252b8b;p=ashd.git diff --git a/lib/resp.c b/lib/resp.c index 2c0fa83..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,17 +104,36 @@ void simpleerror(int fd, int code, char *msg, char *fmt, ...) bprintf(&buf, "
%s
\r\n", htmlquote(tmp)); bufcatstr(buf, "