X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fresp.c;h=25fb2cb40b3962132e93f00872d5d5b26f349445;hb=5ff7def2adbff86a0e2d69f8f82f0b07882ca782;hp=2c0fa835daaf8a969f88cd36d509952a47d9f842;hpb=51a4b1ad5f25ea29b94384e21c48152cce252b8b;p=ashd.git diff --git a/lib/resp.c b/lib/resp.c index 2c0fa83..25fb2cb 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, "