1
0
Files
irix-657m-src/eoe/man/man3c/conv.3c
2022-09-29 17:59:04 +03:00

85 lines
2.3 KiB
Plaintext

'\"macro stdmacro
.if n .pH g3c.conv @(#)conv 41.4 of 5/26/91
.\" Copyright 1991 UNIX System Laboratories, Inc.
.\" Copyright 1989, 1990 AT&T
.nr X
.if \nX=0 .ds x} conv 3C "C Development Set" "\&"
.if \nX=1 .ds x} conv 3C "C Development Set"
.if \nX=2 .ds x} conv 3C "" "\&"
.if \nX=3 .ds x} conv "" "" "\&"
.TH \*(x}
.SH NAME
\f4conv: toupper\f1, \f4tolower\f1, \f4_toupper\f1, \f4_tolower\f1, \f4toascii\f1 \- translate characters
.SH SYNOPSIS
.nf
\f4#include <ctype.h>\f1
.PP
\f4int toupper (int c);\f1
.PP
\f4int tolower (int c);\f1
.PP
\f4int _toupper (int c);\f1
.PP
\f4int _tolower (int c);\f1
.PP
\f4int toascii (int c);\f1
.SH DESCRIPTION
\f4toupper\f1
and
\f4tolower\fP
have as their domain the range of the function
\f4getc\fP:
all values represented in an
\f4unsigned char\f1
and the value of the macro \f4EOF\f1
as defined in \f4stdio.h\f1.
If the argument of
\f4toupper\fP
represents a lowercase letter, the
result is the corresponding uppercase
letter.
If the argument of
\f4tolower\fP
represents an uppercase letter, the
result is the corresponding lowercase
letter.
All other arguments in the domain are
returned unchanged.
.PP
The macros \f4_toupper\fP
and
\f4_tolower\fP
accomplish the same things as
\f4toupper\fP
and
\f4tolower\fP, respectively,
but have restricted domains and are faster.
\f4_toupper\fP
requires a lowercase letter as its argument;
its result is the corresponding uppercase letter.
\f4_tolower\fP
requires an uppercase letter as its argument;
its result is the corresponding lowercase letter.
Arguments outside the domain cause undefined results.
.PP
\f4toascii\fP
yields its argument with all bits turned off that are not
part of a standard 7-bit
.SM ASCII
character; it is intended for compatibility
with other systems.
.PP
\f4toupper\fP, \f4tolower\fP, \f4_toupper\fP, and\f4_tolower\fP are affected by
\f4LC_CTYPE\fP.
In the \f4C\fP locale, or in a locale where shift information
is not defined, these functions determine the case of characters according to
the rules of the \s-1ASCII\s+1-coded character set.
Characters outside the \s-1ASCII\s+1 range
of characters are returned unchanged.
.PP
All the conversion functions and macros use a table lookup.
.SH SEE ALSO
\f4ctype\fP(3C), \f4setlocale\fP(3C), \f4getc\fP(3S), \f4environ\fP(5).
.\" @(#)conv.3c 6.2 of 10/20/83
.Ee