delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/05/30/10:20:51

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
X-Apparently-From: <earnie?boyd AT yahoo DOT com>
Message-ID: <3B150120.973EC13C@yahoo.com>
Date: Wed, 30 May 2001 10:18:08 -0400
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: Cygwin Developers <cygwin-developers AT cygwin DOT com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin-developers AT cygwin DOT com
Subject: Re: isspace() & i18n
References: <13254193676 DOT 20010530145756 AT logos-m DOT ru> <20010530095254 DOT B17603 AT redhat DOT com>

Christopher Faylor wrote:
> 
> On Wed, May 30, 2001 at 02:57:56PM +0400, egor duda wrote:
> >Hi!
> >
> >  cygwin calls newlib's isspace() passing it a signed char. this works
> >ok for ascii symbols 0x00-0x7f, but fails with, say, cyrillic symbols
> > with codes > 0x80. As a result `cd dir-with-last-cyrillic-letter'
> >fails as chdir strips last symbols, thinking they're spaces --
> >isspace() is called with negative parameter.
> >
> >Any thoughts as of how we should handle this?
> 
> Maybe we just need a cygwin_isspace which checks for just tabs and spaces?
> 

Shouldn't this be fixed in the newlib's ctype library?  In particular in
the ctype_.c file?  Hmm...  Why is isspace() being called with a
negative parameter? The ctype.h header declares both a function and a
macro which is being used?  The macro declares the passed character as
unsigned, the functions parameter is a signed integer.  So, it appears
the function is being used and the chdir needs to ensure that an
unsigned value is passed.

-- 
Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


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