isspace() & i18n

egor duda deo@logos-m.ru
Sat Jun 9 01:32:00 GMT 2001


Hi!

Thursday, 07 June, 2001 J. Johnston jjohnstn@cygnus.com 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.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
newlib-ctype-init-2.diff
newlib-ctype-init-2.ChangeLog

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

	* 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: <http://sourceware.org/pipermail/newlib/attachments/20010609/76db02ad/attachment.bin>


More information about the Newlib mailing list