Hrvoje Niksic <[EMAIL PROTECTED]> writes:
> Paul Eggert <[EMAIL PROTECTED]> writes:

>> That would work for now, but it won't work if wget got properly
>> internationalized.  That is because isdigit(x) succeeds for non-ASCII
>> digits in some locales.  Some locales have multiple ways to represent
>> the decimal digits, and some locales even have non-decimal digits.

> It will still work, because Wget doesn't call setlocale() with LC_CTYPE.
> Therefore it is, as far as is* macros are concerned, in C locale.

However...

> That's why Wget 1.7 incorporates its own implementation of IS* macros
> (from Gcc) and uses them consistently.  Except in snprintf.c, which is
> not part of Wget proper.  *sigh*

...since snprintf.c isn't part of wget proper, it *might* be called in a
situation where there are non-ASCII digits, and I bet what it really wants
to know is whether something is between 0 and 9 inclusive.  So I think a
valid argument could be made that this is a bug in the upstream snprintf.c
that the author would probably take a patch for (it should probably use
Paul's recommended explicit test), which would get rid of the warning.  :)

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to