Bruno Haible <[EMAIL PROTECTED]> wrote:
> Jim Meyering wrote:
>> To have any hope of sanity/reproducibility in different locales,
>> this function must return the same result, regardless of the current
>> locale settings.
>
> Yes. In the opposite case, if the function was to handle non-ASCII letters
> like ASCII letters, it should also have a codepath for multibyte locales.
>
>> I suggest using this macro in place of ISDIGIT:
>>
>>     #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
>
> This is equivalent to the c_isdigit macro from "c-ctype.h", assuming the
> normal compiler optimizations. gcc yields identical code for ISDIGIT as for
> c_isdigit.

Good to know.
In that case, of course, it's better to use c_isdigit.


Reply via email to