cvs commit: src/lib/libc/string strcasecmp.c
Joerg Sonnenberger
joerg at britannica.bec.de
Fri Apr 29 12:13:23 PDT 2005
On Fri, Apr 29, 2005 at 09:12:52AM -0700, Matthew Dillon wrote:
> The CTYPE API is expected to properly fold signed chars when making
> conversions but if a call does not do a conversion, e.g. tolower() on a
> character which is not upper case, the original contents (negative or
> positive) may be returned.
This part is wrong. SUS explicitly states that the char MUST have
the meaning of unsigned.
The c argument is an int, the value of which the application shall
ensure is representable as an unsigned char or equal to the value of
the macro EOF. If the argument has any other value, the behavior is
undefined.
Joerg
More information about the Commits
mailing list