_tolower and _toupper macros

Karl Heuer karl at haddock.ima.isc.com
Fri Jul 27 16:20:52 AEST 1990


In article <1990Jul26.100721.14628 at warwick.ac.uk> cuuee at warwick.ac.uk (Sean Legassick) writes:
>I'm not sure what the ANSI position on these macros is (are they mentioned at
>all?)

No.  Since the Standard allows for non-English alphabets, for which it's not
necessarily true that toupper() does a conversion iff islower() is true%, the
implementation has to do just as much work for _toupper() as for toupper().
POSIX doesn't have them either, but X/Open does.

>[quote from man page] would seem to imply that in fact it is VAXC v3.0 which
>has the mistake in ctype.h.

Historically, implementations have disagreed on the definitions of toupper()
and _toupper().  Unless a compiler claims ANSI conformance, it isn't a bug.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
________
% E.g. the German sharp s (0xdf in ISO Latin-1), which has no uppercase form.



More information about the Comp.lang.c mailing list