Changes: Ready for 5.13
[man-pages.git] / man3 / wctrans.3
blob77fb9b504bd5c783cb9de6040523981bb037b486
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"   ISO/IEC 9899:1999
15 .\"
16 .TH WCTRANS 3  2021-03-22 "GNU" "Linux Programmer's Manual"
17 .SH NAME
18 wctrans \- wide-character translation mapping
19 .SH SYNOPSIS
20 .nf
21 .B #include <wctype.h>
22 .PP
23 .BI "wctrans_t wctrans(const char *" name );
24 .fi
25 .SH DESCRIPTION
26 The
27 .I wctrans_t
28 type represents a mapping
29 which can map a wide character to
30 another wide character.
31 Its nature is implementation-dependent, but the special
32 value
33 .IR "(wctrans_t)\ 0"
34 denotes an invalid mapping.
35 Nonzero
36 .I wctrans_t
37 values can be passed to the
38 .BR towctrans (3)
39 function to actually perform
40 the wide-character mapping.
41 .PP
42 The
43 .BR wctrans ()
44 function returns a mapping, given by its name.
45 The set of
46 valid names depends on the
47 .B LC_CTYPE
48 category of the current locale, but the
49 following names are valid in all locales.
50 .PP
51 .nf
52     "tolower" \- realizes the \fBtolower\fP(3) mapping
53     "toupper" \- realizes the \fBtoupper\fP(3) mapping
54 .fi
55 .SH RETURN VALUE
56 The
57 .BR wctrans ()
58 function returns a mapping descriptor if the
59 .I name
60 is valid.
61 Otherwise, it returns
62 .IR "(wctrans_t)\ 0" .
63 .SH ATTRIBUTES
64 For an explanation of the terms used in this section, see
65 .BR attributes (7).
66 .ad l
67 .nh
68 .TS
69 allbox;
70 lbx lb lb
71 l l l.
72 Interface       Attribute       Value
74 .BR wctrans ()
75 T}      Thread safety   MT-Safe locale
76 .TE
77 .hy
78 .ad
79 .sp 1
80 .SH CONFORMING TO
81 POSIX.1-2001, POSIX.1-2008, C99.
82 .SH NOTES
83 The behavior of
84 .BR wctrans ()
85 depends on the
86 .B LC_CTYPE
87 category of the
88 current locale.
89 .SH SEE ALSO
90 .BR towctrans (3)