Subject: isxxx() and toupper() usage changes
To: None <>
From: Jason Thorpe <>
List: tech-userlevel
Date: 10/27/2004 13:31:47
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On Oct 27, 2004, at 12:59 PM, David Laight wrote:

> Fix a load of international alphabet problems with isxxx() and 
> toupper()
> Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the 
> correct
> piece of memory is looked at for the bit mask.
> gcc optimises out the '& 0xff' (on i386 at least).
> Fixes problems found by gcc when the splurious (int) cast is removed
> from the #defines in ctype.h

Uh... the right piece of memory would be looked at anyway because of 
the promotion rules, right?

I just don't see how this change is even remotely "correct".  Is this 
actually recommended usage of these functions??

         -- Jason R. Thorpe <>

content-type: application/pgp-signature; x-mac-type=70674453;
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

Version: GnuPG v1.2.3 (Darwin)