delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/12/07:38:21

Message-Id: <m10BHqt-000S5eC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Date: Fri, 12 Feb 1999 09:40:53 +0000
MIME-Version: 1.0
Subject: Re: ctype functions
In-reply-to: <199902112120.QAA20563@envy.delorie.com>
References: <199902112029 DOT PAA12141 AT delorie DOT com> (message from Robert Hoehne on Thu, 11 Feb 1999 21:29:47 +0100)
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp-workers AT delorie DOT com

DJ Delorie <dj AT delorie DOT com> wrote:
 
> > My question is now: Are the ctype functions buggy or
> > my calls to them?
> 
> Your calls to them.  The ANSI spec very clearly states that the
> programmer must pass integer (not char!)  values in the range 0..255
> or the constant EOF to these functions.  Passing other values is
> illegal and the results are undefined.

I agree with DJ, lamentably the standard was designed for things like 
tolower(getch()) where the parameters match 100%.
But Robert pointed a problem in stricmp that I can't check right now, but I 
think is a real problem. So the bug is in libc functions that pass *(char *) 
to ctype functions and it should be fixed.

BTW: Robert, use the ucNNNN functions I added to TVision. Also, if the 
stricmp problem affects some code perhaps we can add a fixed version in 
nonansi.cc or in the "extras".

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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