delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/06/01/02:19:33

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Fri, 1 Jun 2001 10:16:58 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.45) Personal
Reply-To: egor duda <cygwin-developers AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <199210132945.20010601101658@logos-m.ru>
To: Christopher Faylor <cygwin-developers AT cygwin DOT com>
Subject: Re: isspace() & i18n
In-reply-To: <20010531140313.C23914@redhat.com>
References: <13254193676 DOT 20010530145756 AT logos-m DOT ru>
<20010530095254 DOT B17603 AT redhat DOT com> <9265832872 DOT 20010530181156 AT logos-m DOT ru>
<20010530101516 DOT E17603 AT redhat DOT com> <3066562491 DOT 20010530182405 AT logos-m DOT ru>
<3B151688 DOT B6ABA6FD AT yahoo DOT com> <20010531140313 DOT C23914 AT redhat DOT com>
Mime-Version: 1.0

Hi!

Thursday, 31 May, 2001 Christopher Faylor cgf AT redhat DOT com 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
_ctype_b[128+256]={...};
(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.

>>Index: path.cc
>>===================================================================
>>RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
>>retrieving revision 1.139
>>diff -u -p -r1.139 path.cc
>>--- path.cc    2001/05/14 02:52:12     1.139
>>+++ path.cc    2001/05/30 15:45:49
>>@@ -2929,7 +2929,7 @@ chdir (const char *dir)
>>      whitespace to SetCurrentDirectory.  This doesn't work too well
>>      with other parts of the API, though, apparently.  So nuke trailing
>>      white space. */
>>-  for (s = strchr (dir, '\0'); --s >= dir && isspace (*s); )
>>+  for (s = strchr (dir, '\0'); --s >= dir && isspace ((unsigned int)*s); )
>>     *s = '\0';
>> 
>>   if (path.error)

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019