_tolower and _toupper macros

John Vanderpool vander at nssdcb.gsfc.nasa.gov
Wed Jul 25 05:49:02 AEST 1990


its  amazing that _toupper and _tolower "misbehave" on the SUN's
it seems like they do the masking without doing the checking

from VAXC v3.0 ctype.h

#define _toupper(c)	((c) >= 'a' && (c) <= 'z' ? (c) & 0x5F:(c))
#define _tolower(c)	((c) >= 'A' && (c) <= 'Z' ? (c) | 0x20:(c))

work good-to-go

--
John R. Vanderpool				vander at nssdca.gsfc.nasa.gov
NASA / Goddard Space Flight Center (634)
Greenbelt, MD  20771



More information about the Comp.lang.c mailing list