Subject: isxxx() and toupper() usage changes
To: None <dsl@netbsd.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-userlevel
Date: 10/27/2004 13:31:47
--Apple-Mail-9-342822836
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 <thorpej@shagadelic.org>
--Apple-Mail-9-342822836
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFBgAW3OpVKkaBm8XkRAvufAJ9D6oHd9T7nYi6PHyNVcKftCoRwIgCbBwUY
RILTbgMCVg5WDH9BCwhjKPM=
=tbTh
-----END PGP SIGNATURE-----
--Apple-Mail-9-342822836--