Leonid <[EMAIL PROTECTED]> writes:

> Steven and Hrvoje,
>
> wget-1.9.1 has a function number_to_string which is in fact a
> home-made equivalent to printf () %ld.

Yes, but that function is merely an optimization used to avoid
frequent calls to sprintf(buf, "%ld", num).  Wget does in fact in many
places use %ld, which is revealed when you grep for %ld in the source
code.

We could replace %ld with %s and a call to something like
number_to_string, but which returned a static buffer.  Of course, this
would break format strings that print two numbers, so we'd need a way
to specify a different buffer as well.  The resulting code would be a
bit clunky, but would work well and remain portable, I think.

> In the LFS patch which I submitted I made a sister-routine
> number_to_string_64 which is equivalent to printf() %llu. Thus, wget
> does not rely on %ll or %llu.

Is your LFS patch available on the web?  I was unsubscribed from
wget-patches due to bounces from my address and there is no web
archive (that I know of) of that list.

Reply via email to