xref: /openbsd-src/lib/libc/locale/wctob.3 (revision 9490d37cb6a2f9c8feb8d4b7f9c43b2ac41784aa)
1*9490d37cSjmc.\" $OpenBSD: wctob.3,v 1.3 2007/05/31 19:19:29 jmc Exp $
2561d433dSespie.\" $NetBSD: wctob.3,v 1.3 2003/04/16 13:34:41 wiz Exp $
3561d433dSespie.\"
4561d433dSespie.\" Copyright (c)2003 Citrus Project,
5561d433dSespie.\" All rights reserved.
6561d433dSespie.\"
7561d433dSespie.\" Redistribution and use in source and binary forms, with or without
8561d433dSespie.\" modification, are permitted provided that the following conditions
9561d433dSespie.\" are met:
10561d433dSespie.\" 1. Redistributions of source code must retain the above copyright
11561d433dSespie.\"    notice, this list of conditions and the following disclaimer.
12561d433dSespie.\" 2. Redistributions in binary form must reproduce the above copyright
13561d433dSespie.\"    notice, this list of conditions and the following disclaimer in the
14561d433dSespie.\"    documentation and/or other materials provided with the distribution.
15561d433dSespie.\"
16561d433dSespie.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17561d433dSespie.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18561d433dSespie.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19561d433dSespie.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20561d433dSespie.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21561d433dSespie.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22561d433dSespie.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23561d433dSespie.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24561d433dSespie.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25561d433dSespie.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26561d433dSespie.\" SUCH DAMAGE.
27561d433dSespie.\"
28*9490d37cSjmc.Dd $Mdocdate: May 31 2007 $
29561d433dSespie.Dt WCTOB 3
30561d433dSespie.Os
31561d433dSespie.\" ----------------------------------------------------------------------
32561d433dSespie.Sh NAME
33561d433dSespie.Nm wctob
34561d433dSespie.Nd convert a wide character to a single byte character
35561d433dSespie.\" ----------------------------------------------------------------------
36561d433dSespie.Sh SYNOPSIS
37561d433dSespie.In wchar.h
38561d433dSespie.Ft int
39561d433dSespie.Fn wctob "wint_t wc"
40561d433dSespie.\" ----------------------------------------------------------------------
41561d433dSespie.Sh DESCRIPTION
42561d433dSespieThe
43561d433dSespie.Fn wctob
44561d433dSespiefunction converts a wide character
45561d433dSespie.Fa wc
46561d433dSespieto a corresponding single byte character in the initial shift state of
47561d433dSespiethe current locale.
48561d433dSespie.Pp
49561d433dSespieThe behaviour of the
50561d433dSespie.Fn wctob
51561d433dSespieis affected by the
52561d433dSespie.Dv LC_CTYPE
53561d433dSespiecategory of the current locale.
54561d433dSespie.\" ----------------------------------------------------------------------
55561d433dSespie.Sh RETURN VALUES
56561d433dSespieThe
57561d433dSespie.Fn wctob
58561d433dSespiefunction returns:
59561d433dSespie.Bl -tag -width 012345678901
60561d433dSespie.It Dv EOF
61561d433dSespieif
62561d433dSespie.Fa wc
63561d433dSespieis
64561d433dSespie.Dv WEOF
65561d433dSespieor if
66561d433dSespie.Fa wc
67561d433dSespiedoes not correspond to a valid single byte character representation.
68561d433dSespie.It (otherwise)
69561d433dSespiea single byte character corresponding to
70561d433dSespie.Fa wc .
71561d433dSespie.El
72561d433dSespie.\" ----------------------------------------------------------------------
73561d433dSespie.Sh ERRORS
74561d433dSespieNo errors are defined.
75561d433dSespie.\" ----------------------------------------------------------------------
76561d433dSespie.Sh SEE ALSO
77561d433dSespie.Xr btowc 3 ,
78561d433dSespie.Xr setlocale 3 ,
79561d433dSespie.Xr wcrtomb 3
80561d433dSespie.\" ----------------------------------------------------------------------
81561d433dSespie.Sh STANDARDS
82561d433dSespieThe
83561d433dSespie.Fn wctob
84561d433dSespiefunction conforms to
85561d433dSespie.St -isoC-amd1 .
86