HPUX conv[3c]

conv(3C) conv(3C)
NAME
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 domain the range of getc(3S): the
integers from -1 through 255. If the argument of toupper() represents
a lowercase letter, the result is the corresponding uppercase letter.
If the argument of tolower() represents an uppercase letter, the
result is the corresponding lowercase letter. All other arguments in
the domain are returned unchanged. Arguments outside the domain cause
undefined results.
The macros _toupper() and _tolower() perform the same translations as
toupper() and tolower(), but have restricted domains and are faster.
The domains of _toupper() and _tolower() are the integers from 0
through 255. Arguments outside of 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.
WARNING
toascii() is supplied both as a library function and as a macro
defined in the <ctype.h> header. Normally, the macro version is used.
To obtain the library function, either use a #undef to remove the
macro definition or, if compiling in ANSI C mode, enclose the function
name in parenthesis or take its address. The following examples use
the library function for toascii():
#include <ctype.h>
#undef toascii
...
main()
{
...
c1 = toascii(c);
...
Hewlett-Packard Company - 1 - HP-UX Release 9.0: August 1992
conv(3C) conv(3C)
}
or
#include <ctype.h>
...
main()
{
int (*conv_func)();
...
c1 = (toascii)(c);
...
conv_func = toascii;
...
}
EXTERNAL INFLUENCES
Locale
The LC_CTYPE category determines the translations to be done.
International Code Set Support
Single-byte character code sets are supported.
AUTHOR
conv() was developed by AT&T and HP.
SEE ALSO
ctype(3C), getc(3S), setlocale(3C), lang(5).
STANDARDS CONFORMANCE
_tolower(): AES, SVID2, XPG2, XPG3, XPG4
_toupper(): AES, SVID2, XPG2, XPG3, XPG4
toascii(): AES, SVID2, XPG2, XPG3, XPG4
tolower(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
toupper(): AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, ANSI C
Hewlett-Packard Company - 2 - HP-UX Release 9.0: August 1992