1*cef0afe9Swiz.\" $NetBSD: btowc.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 BTOWC 3 2925563583Stshiozak.Os 3025563583Stshiozak.\" ---------------------------------------------------------------------- 3125563583Stshiozak.Sh NAME 3225563583Stshiozak.Nm btowc 3325563583Stshiozak.Nd convert a single byte character to a wide character 3425563583Stshiozak.\" ---------------------------------------------------------------------- 3525563583Stshiozak.Sh LIBRARY 3625563583Stshiozak.Lb libc 3725563583Stshiozak.\" ---------------------------------------------------------------------- 3825563583Stshiozak.Sh SYNOPSIS 39472351e1Swiz.In wchar.h 4025563583Stshiozak.Ft wint_t 4125563583Stshiozak.Fn btowc "int c" 4225563583Stshiozak.\" ---------------------------------------------------------------------- 4325563583Stshiozak.Sh DESCRIPTION 4425563583StshiozakThe 4525563583Stshiozak.Fn btowc 4625563583Stshiozakfunction converts a single byte character 4725563583Stshiozak.Fa c 4825563583Stshiozakin the initial shift state of the current locale to a corresponding 4925563583Stshiozakwide character. 5025563583Stshiozak.Pp 51*cef0afe9SwizThe behaviour of 5225563583Stshiozak.Fn btowc 530d4f93acSwizis affected by the 540d4f93acSwiz.Dv LC_CTYPE 550d4f93acSwizcategory of the current locale. 5625563583Stshiozak.\" ---------------------------------------------------------------------- 5725563583Stshiozak.Sh RETURN VALUES 5825563583StshiozakThe 5925563583Stshiozak.Fn btowc 60*cef0afe9Swizfunction returns: 6125563583Stshiozak.Bl -tag -width 012345678901 620d4f93acSwiz.It Dv WEOF 63*cef0afe9SwizIf 6425563583Stshiozak.Fa c 650d4f93acSwizis 660d4f93acSwiz.Dv EOF 670d4f93acSwizor if (unsigned char) 6825563583Stshiozak.Fa c 6925563583Stshiozakdoes not correspond to a valid single byte character representation. 7025563583Stshiozak.It (otherwise) 71*cef0afe9SwizA wide character corresponding to 7225563583Stshiozak.Fa c . 7325563583Stshiozak.El 7425563583Stshiozak.\" ---------------------------------------------------------------------- 7525563583Stshiozak.Sh ERRORS 7625563583StshiozakNo errors are defined. 7725563583Stshiozak.\" ---------------------------------------------------------------------- 7825563583Stshiozak.Sh SEE ALSO 7925563583Stshiozak.Xr mbrtowc 3 , 800d4f93acSwiz.Xr setlocale 3 , 810d4f93acSwiz.Xr wctob 3 8225563583Stshiozak.\" ---------------------------------------------------------------------- 8325563583Stshiozak.Sh STANDARDS 8425563583StshiozakThe 8525563583Stshiozak.Fn btowc 8625563583Stshiozakfunction conforms to 8725563583Stshiozak.St -isoC-amd1 . 88