isspace() & i18n

egor duda
Sat Jun 9 01:32:00 GMT 2001


Thursday, 07 June, 2001 J. Johnston wrote:

JJ> My proposal is to change ctype.h now to use a new pointer instead
JJ> of _ctype_.  The pointer will get set in ctype_.c.  In ctype_.c,
JJ> we can use your GNUC code to set up _ctype_ to point to within the
JJ> expanded table.  Additionally, we set the new ctype pointer
JJ> appropriately.

i guess this pointer has to be exported from library as we change
ctype.h, hasn't it? at least for cygwin this means changes to export
definitions file in cygwin sources. i'm not sure about other
platforms, however. won't some of require similar changes?

but what worries me more is that new applications won't link with old
dll (in case of cygwin). as long as almost every nontrivial program
uses <ctype.h> this can be a problem -- "cygwin-1.3.3 or higher
required" may be quite disappointing restriction.

so, i've changed ctype.c to define end export both pointer and array,
but left ctype.h untouched for now. eventually, we can make use of the
pointer, but i think we shouldn't do it right now. patch attached.

Egor.   ICQ 5165414 FidoNet 2:5020/496.19

-------------- next part --------------
2001-06-09  Egor Duda  <>

	* libc/ctype/ctype_.c: When compiled with gcc on platforms
	with signed char, make _ctype_[-128] ... _ctype[-1] to refer
	initialized memory region. Platform can also #define COMPACT_CTYPE
	to avoid allocation of this additional 128 bytes of data.
	Add pointer to _ctype_ array. Always initialize all _ctype_
	array elements.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib-ctype-init-2.diff
Type: text/x-diff
Size: 3072 bytes
Desc: not available
URL: <>

More information about the Newlib mailing list