curl-library
Re: curl --libcurl option
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 26 Jan 2007 16:35:10 +0100 (CET)
Date: Fri, 26 Jan 2007 16:35:10 +0100 (CET)
On Fri, 26 Jan 2007, Gisle Vanem wrote:
> curl_easy_setopt(hnd, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t)64d);
>
> I cannot see why it shouldn't print "(curl_off_t)0" since the code expands
> to:
Oops.
I think happens because CURL_FORMAT_OFF_T is designed for an _external_ printf
and not for the curlx_printf version curl uses. The lib/mprintf.c code doesn't
understand %I64...
What's interesting here is that we use CURL_FORMAT_OFF_T in several other
places in src/main.c already and all those occurrances are equally wrong!
If I'm not mistaking, we can just always use "%Od" (that's the letter O, not
zero) since the big O is used in the code for the "curl_off_t" type.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-01-26