DragonFly BSD
DragonFly commits List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/lib/libc/string strcasecmp.c

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Fri, 29 Apr 2005 21:12:18 +0200
Mail-followup-to: commits@crater.dragonflybsd.org

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


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]