curl-library
Error and info handlers
Date: Tue, 2 Oct 2001 10:33:15 +0300
Thw
I think it would be better to add a special error handler
to call it from failf()
void Curl_failf(struct UrlData *data, char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
if(data->errorbuffer)
vsnprintf(data->errorbuffer, CURL_ERROR_SIZE, fmt, ap);
va_end(ap);
fail_handler(data->errorbuffer);
}
And do the same thing about info messages
void Curl_infof(struct UrlData *data, char *fmt, ...)
{
va_list ap;
if(data->bits.verbose) {
va_start(ap, fmt);
char buf[1024];
//fputs("* ", data->err);
vsnprintf(buf, sizeof(buf), fmt, ap);
//vfprintf(data->err, fmt, ap);
infof_handler(buf);
vfprintf(data->err, fmt, ap);
va_end(ap);
}
}
My best regards,
Vitaly Lipovetsky
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-08-02