conv(3C) conv(3C)
NAME
toupper, tolower, toupper, tolower, toascii - translate
characters
SYNOPSIS
#include <ctype.h>
int toascii (c)
int c;
int toupper (c)
int c;
int tolower (c)
int c;
SYNOPSIS (SYSV.2)
int toupper (c)
int c;
int tolower (c)
int c;
DESCRIPTION
Toascii yields its argument with all bits turned off that
are not part of a standard ASCII character.
In the att universe, toupper and tolower are functions, and
toupper and tolower are macros. In the ucb universe,
toupper and tolower are macros.
The functions and macros in the att universe have as domain
the range of getc(3S): the integers from -1 through 255.
If the argument of toupper represents a lower-case letter,
the result is the corresponding upper-case letter. If the
argument of tolower represents an upper-case letter, the
result is the corresponding lower-case letter. All other
arguments in the domain are returned unchanged.
The toupper and the tolower macros provide results faster,
but they have restricted domains. The argument to toupper
must be a lower-case letter. The argument to tolower must
be an upper-case letter. Arguments outside the restricted
domains produce undefined results.
The macros in the ucb universe accomplish the same thing as
the functions but they have restricted domains and are fas-
ter. The domain for the toupper macro is the set of lower-
case letters. The domain for the tolower macro is the set
of upper-case letters. Arguments outside the domain cause
undefined results.
Page 1 CX/UX Programmer's Reference Manual
conv(3C) conv(3C)
The tables used by these macros and functions may be loaded
by setlocale(3C) or by setchrclass(3C) to correspond to a
specific locale.
SEE ALSO
ctype(3C), getc(3S), setchrclass(3C), setlocale(3C),
ascii(5), environ(5).
chrtbl(1M) in the CX/UX Administrator's Reference Manual.
Page 2 CX/UX Programmer's Reference Manual