[Info-vax] C limitations, was: Re: VMS process communication

Arne Vajhøj arne at vajhoej.dk
Mon Apr 24 09:31:00 EDT 2023


On 4/24/2023 8:59 AM, Dan Cross wrote:
> In article <kam0vhFq0fdU11 at mid.individual.net>,
>> Mostly stuff from the comp.sources groups.  Very little of it was
>> portable.  Even with a lot of massaging.  But the charset values
>> was the biggest killer because so many programs assumed 0-127 as
>> ordinal value of the ASCII charset.
> 
> I can believe that, but I'd imagine it was less the use of
> individual code-points as a general assumption that the high-bit
> was clear, and that thus one could use a char to index a table
> with only 128 entries or something: things like that still trip
> up programmers, even in our modern, almost always ASCII or
> UTF-8, world (indeed, this used to be a source of frustration
> for using the `is*` family, as they did table lookups: one had
> to be careful to use `isascii` first before blinding applying
> them).

The is* functions take an int and are required to accept
values that can be stuffed into an unsigned char (plus value
of EOF macro). An is* function using a 128 entry table is broken
on a system with an >7 bit execution char set.

The isascii function is not in the C standard but only in the
POSIX standard (The Open Group Base Specifications).

Arne




More information about the Info-vax mailing list