xref: /openbsd-src/lib/libc/locale/towctrans.3 (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1.\" $OpenBSD: towctrans.3,v 1.2 2007/05/31 19:19:29 jmc Exp $
2.\"
3.\" $NetBSD: towctrans.3,v 1.5 2004/01/24 16:58:54 wiz Exp $
4.\"
5.\" Copyright (c)2003 Citrus Project,
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.Dd $Mdocdate: May 31 2007 $
30.Dt TOWCTRANS 3
31.Os
32.\" ----------------------------------------------------------------------
33.Sh NAME
34.Nm towctrans
35.Nd convert a wide character with a specified map
36.\" ----------------------------------------------------------------------
37.Sh SYNOPSIS
38.In wctype.h
39.Ft wint_t
40.Fn towctrans "wint_t wc" "wctrans_t charmap"
41.\" ----------------------------------------------------------------------
42.Sh DESCRIPTION
43The
44.Fn towctrans
45function converts a wide character
46.Fa wc
47with a character mapping
48.Fa charmap .
49.Pp
50The behaviour of
51.Fn towctrans
52is undefined if the
53.Fn towctrans
54function is called with an invalid
55.Fa charmap
56(changes of
57.Dv LC_CTYPE
58category invalidate
59.Fa charmap )
60or invalid wide character
61.Fa wc .
62.Pp
63The behaviour of
64.Fn towctrans
65is affected by the
66.Dv LC_CTYPE
67category of the current locale.
68.\" ----------------------------------------------------------------------
69.Sh RETURN VALUES
70.Fn towctrans
71returns the resulting character of the conversion.
72.\" ----------------------------------------------------------------------
73.Sh ERRORS
74No errors are defined.
75.\" ----------------------------------------------------------------------
76.Sh SEE ALSO
77.Xr iswctype 3 ,
78.Xr setlocale 3 ,
79.Xr wctrans 3 ,
80.Xr wctype 3
81.\" ----------------------------------------------------------------------
82.Sh STANDARDS
83The
84.Fn towctrans
85function conforms to
86.St -isoC-amd1 .
87