scanf(3) patch for C99-conformant FP parsing
Andrey Chernov
ache at nagual.pp.ru
Tue Jun 24 11:57:07 PDT 2003
On Tue, Jun 24, 2003 at 14:49:22 -0400, Garance A Drosihn wrote:
> #define isdigitch(Anychar) isdigit(((int) Anychar) & 255)
> #define isupperch(Anychar) isupper(((int) Anychar) & 255)
> #define isxdigitch(Anychar) isdigit(((int) Anychar) & 255)
> #define tolowerch(Anychar) tolower(((int) Anychar) & 255)
Just (unsigned char) cast produce better code and more readable.
In any case & 255 alone will be enough without needs to convert to (int)
first.
More information about the freebsd-standards
mailing list