www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/09/07:38:56

Date: Mon, 9 Feb 1998 13:37:08 +0100 (MET)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>,
djgpp workers list <djgpp-workers AT delorie DOT com>
Subject: Re: char != unsigned char... sometimes, sigh
In-Reply-To: <Pine.SUN.3.91.980208135053.6339O-100000@is>
Message-ID: <Pine.LNX.3.93.980209133008.31635D-100000@acp3bf>
MIME-Version: 1.0

On Sun, 8 Feb 1998, Eli Zaretskii wrote:

> For me, ANSI compliance is the main concern.  Anything else is
> secondary to it.  If the current version is not ANSI-compliant, IMHO
> it should be fixed ASAP.

> However, making untrivial changes with global consequences, such as
> switching to unsigned char by default, just to make buggy code
> magically turn correct is not my idea of a small change in a minor
> release.

As usual, Eli expressed my very thoughts in much clearer words than I did
:-) 

> > > In the 'C' locale: probably no. But who knows: maybe there is some locale
> > > that has actually quenched a printable character into this position? Well,
> > > on looking it up: there is! According to a Linux man page, 0xff is 'LATIN
> > > SMALL LETTER Y WITH DIAERESIS' in ISO-Latin-1. So in that locale,
> > > 'isgraph(0xff)' should return 1, and our implementation can't do that :-(

> The issue with non-C locales doesn't belong to this discussion.
> AFAIK, a non-C locale will need to override the ctype functions
> anyway, if only to deal with non-English capital letters which have
> ASCII codes beyond 127.

It should *always* be enough to just provide a different set of tables and
re-vector a pointer to them on a 'setlocale()' call.  (The current
implementation uses the arrays themselves directly, but that could be
changed easily). For the macros, that's also the only possible
implementation at the same time, as you can't redefine a macros at
run-time.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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