isspace() & i18n

egor duda deo@logos-m.ru
Wed Jun 6 04:49:00 GMT 2001


Hi!

Wednesday, 30 May, 2001 Christopher Faylor cgf@redhat.com wrote:

CF> On Thu, May 31, 2001 at 01:29:28AM +0900, Kazuhiro Fujieda wrote:
>>>>> On Wed, 30 May 2001 18:11:56 +0400
>>>>> egor duda <deo@logos-m.ru> said:
>>
>>> i think we should either conform to standard and explicitly convert
>>> types or define appropriate strings as unsigned char*, (typedef PATH_STR,
>>> perhaps), or define cygwin_is*() as macros that do the conversion, or,
>>> as glibc does, expand _ctype to allow indices in range [-128,256].
>>
>>The last is preferable.
>>
>>The ISO C standard specifies is* facilities operate properly on
>>all values representable as type `char' and type `unsigned char'.
>>It depends on implementation whether char is signed or unsigned. 
>>The is* facilities should operate on range [-128,256] on the
>>implementation where char is singied.

CF> I agree.  I think that this is the preferable solution.

here's the patch that works ok for me. unfortunately, it relies on
nonstandard gccism, but at least it always initializes all _ctype_
array elements. when compiled with gcc, it additionally allows
[-128, -1] range for indices, too.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
newlib-ctype-init.diff
newlib-ctype-init.ChangeLog

-------------- next part --------------
2001-06-06  Egor Duda  <deo@logos-m.ru>

	* libc/ctype/ctype_.c: Initialize all _ctype_ array elements.
	When compiled with gcc, make _ctype_[-128] ... _ctype[-1] refer
	initialized memory region.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib-ctype-init.diff
Type: text/x-diff
Size: 2741 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20010606/87ff5f55/attachment.bin>


More information about the Cygwin-developers mailing list