xref: /netbsd-src/lib/libc/locale/wctob.3 (revision cef0afe940dedba57f5f0eb8f805f4f56ffe126b)
1*cef0afe9Swiz.\" $NetBSD: wctob.3,v 1.4 2004/01/24 16:58:54 wiz Exp $
225563583Stshiozak.\"
325563583Stshiozak.\" Copyright (c)2003 Citrus Project,
425563583Stshiozak.\" All rights reserved.
525563583Stshiozak.\"
625563583Stshiozak.\" Redistribution and use in source and binary forms, with or without
725563583Stshiozak.\" modification, are permitted provided that the following conditions
825563583Stshiozak.\" are met:
925563583Stshiozak.\" 1. Redistributions of source code must retain the above copyright
1025563583Stshiozak.\"    notice, this list of conditions and the following disclaimer.
1125563583Stshiozak.\" 2. Redistributions in binary form must reproduce the above copyright
1225563583Stshiozak.\"    notice, this list of conditions and the following disclaimer in the
1325563583Stshiozak.\"    documentation and/or other materials provided with the distribution.
1425563583Stshiozak.\"
1525563583Stshiozak.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1625563583Stshiozak.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1725563583Stshiozak.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1825563583Stshiozak.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1925563583Stshiozak.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2025563583Stshiozak.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2125563583Stshiozak.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2225563583Stshiozak.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2325563583Stshiozak.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2425563583Stshiozak.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2525563583Stshiozak.\" SUCH DAMAGE.
2625563583Stshiozak.\"
2725563583Stshiozak.Dd March 3, 2003
2825563583Stshiozak.Dt WCTOB 3
2925563583Stshiozak.Os
3025563583Stshiozak.\" ----------------------------------------------------------------------
3125563583Stshiozak.Sh NAME
3225563583Stshiozak.Nm wctob
3325563583Stshiozak.Nd convert a wide character to a single byte character
3425563583Stshiozak.\" ----------------------------------------------------------------------
3525563583Stshiozak.Sh LIBRARY
3625563583Stshiozak.Lb libc
3725563583Stshiozak.\" ----------------------------------------------------------------------
3825563583Stshiozak.Sh SYNOPSIS
39472351e1Swiz.In wchar.h
4025563583Stshiozak.Ft int
4125563583Stshiozak.Fn wctob "wint_t wc"
4225563583Stshiozak.\" ----------------------------------------------------------------------
4325563583Stshiozak.Sh DESCRIPTION
4425563583StshiozakThe
4525563583Stshiozak.Fn wctob
4625563583Stshiozakfunction converts a wide character
4725563583Stshiozak.Fa wc
4825563583Stshiozakto a corresponding single byte character in the initial shift state of
4925563583Stshiozakthe current locale.
5025563583Stshiozak.Pp
51*cef0afe9SwizThe behaviour of
5225563583Stshiozak.Fn wctob
53aae77672Swizis affected by the
54aae77672Swiz.Dv LC_CTYPE
55aae77672Swizcategory of the current locale.
5625563583Stshiozak.\" ----------------------------------------------------------------------
5725563583Stshiozak.Sh RETURN VALUES
5825563583StshiozakThe
5925563583Stshiozak.Fn wctob
60aae77672Swizfunction returns:
6125563583Stshiozak.Bl -tag -width 012345678901
62aae77672Swiz.It Dv EOF
63*cef0afe9SwizIf
6425563583Stshiozak.Fa wc
65aae77672Swizis
66aae77672Swiz.Dv WEOF
67aae77672Swizor if
6825563583Stshiozak.Fa wc
6925563583Stshiozakdoes not correspond to a valid single byte character representation.
7025563583Stshiozak.It (otherwise)
71*cef0afe9SwizA single byte character corresponding to
7225563583Stshiozak.Fa wc .
7325563583Stshiozak.El
7425563583Stshiozak.\" ----------------------------------------------------------------------
7525563583Stshiozak.Sh ERRORS
7625563583StshiozakNo errors are defined.
7725563583Stshiozak.\" ----------------------------------------------------------------------
7825563583Stshiozak.Sh SEE ALSO
7925563583Stshiozak.Xr btowc 3 ,
80aae77672Swiz.Xr setlocale 3 ,
81aae77672Swiz.Xr wcrtomb 3
8225563583Stshiozak.\" ----------------------------------------------------------------------
8325563583Stshiozak.Sh STANDARDS
8425563583StshiozakThe
8525563583Stshiozak.Fn wctob
8625563583Stshiozakfunction conforms to
8725563583Stshiozak.St -isoC-amd1 .
88