www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/12/05/13:03:10

Message-Id: <m0xdwNa-000S2DC@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 edu DOT ar>
Organization: INTI
To: Randy Maas <randym AT acm DOT org>, djgpp-workers AT delorie DOT com
Date: Fri, 5 Dec 1997 15:07:21 +0000
MIME-Version: 1.0
Subject: Re: string inline code
In-reply-to: <3.0.1.32.19971204082322.007d82f0@yacker.xiotech.com>

Randy Maas <randym AT acm DOT org> wrote:

> I also noticed that tolower and toupper use an array.  I've used the
> following equations before, although I'm sure if they cover all the cases
> of the array...
> # define my_tolower(c) (isupper(c)?('a'-1+((c)&31)):(c))
> # define my_toupper(c) (islower(c)?(((c)&31)-'a'+1):(c))

The arrays are much better to support internationalization. In fact my editor 
supports a lot of code pages and adjust toupper and tolower according to the 
code page touching the DJGPP arrays.
Think in code pages like 866 (russian) where you have 32 upper and 32 lower 
extra characters ;-)

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - 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