conv(3C) DG/UX R4.11MU05 conv(3C)
NAME
conv: toupper, tolower, toupper, tolower, toascii - translate
characters
SYNOPSIS
#include <ctype.h>
int toupper (int c);
int tolower (int c);
int toupper (int c);
int tolower (int c);
int toascii (int c);
DESCRIPTION
toupper and tolower have as their domain the range of the function
getc: all values represented in an unsigned char and the value of the
macro EOF as defined in stdio.h. 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 macros toupper and tolower accomplish the same things as
toupper and tolower, respectively, but have restricted domains and
are faster. toupper requires a lower-case letter as its argument;
its result is the corresponding upper-case letter. tolower requires
an upper-case letter as its argument; its result is the corresponding
lower-case letter. Arguments outside the domain cause undefined
results.
toascii yields its argument with all bits turned off that are not
part of a standard 7-bit ASCII character; it is intended for
compatibility with other systems.
toupper, tolower, toupper, andtolower are affected by LCCTYPE. In
the C locale, or in a locale where shift information is not defined,
these functions determine the case of characters according to the
rules of the ASCII-coded character set. Characters outside the ASCII
range of characters are returned unchanged.
Considerations for Threads Programming
+---------+-----------------------------+
| | async- |
|function | reentrant cancel cancel |
| | point safe |
+---------+-----------------------------+
|tolower | Y N N |
|toupper | Y N N |
|toascii | Y N N |
|tolower | Y N N |
|toupper | Y N N |
+---------+-----------------------------+
Although these functions are considered to be reentrant, there are
some limitations on their usage. For a full explanation, see the
setlocale(3C) man page.
SEE ALSO
iconv(1), reentrant(3), ctype(3C), getc(3S), setlocale(3C),
environ(5).
Licensed material--property of copyright holder(s)