isspace() & i18n

Christopher Faylor
Fri Jun 1 08:00:00 GMT 2001

On Fri, Jun 01, 2001 at 10:16:58AM +0400, egor duda wrote:
>Thursday, 31 May, 2001 Christopher Faylor wrote:
>CF> This has been checked in.  It doesn't solve the larger issue of
>CF> if this is a newlib bug or not but I think that this is a correct
>CF> fix nonetheless.
>unfortunately, no. first, as isspace() wants int, this is equivalent
>to (int)(unsigned int)(char)(-33) == -33
>correct solution would be 'isspace ((unsigned char) *s), but i've
>found out that it doesn't work, too! newlib's defining _ctype_ as
>char[257], but of those 257 chars only 129 are initialized.
>i'm still failing to produce a "full" patch to implement [-128,256]
>range, and if i can't find a reason why it's not working, i'd post an
>"intermediate" one.
>i'm trying to define
>(dllexport) _ctype_=_ctype_b + 127;
>but, for some reason it doesn't work. i suspect it has somthing to do
>with relocation of data exported from dll, but to be sure, i have to
>put my hands a bit deeper into assembled code.

Aren't you changing _ctype from an array reference to a pointer reference
above?  That won't work with code that uses _ctype currently.


More information about the Cygwin-developers mailing list