1.\" $NetBSD: src/lib/libc/locale/btowc.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ 2.\" $DragonFly: src/lib/libc/locale/btowc.3,v 1.1 2005/03/12 00:18:01 joerg Exp $ 3.\" 4.\" Copyright (c)2003 Citrus Project, 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.Dd March 3, 2003 29.Dt BTOWC 3 30.Os 31.\" ---------------------------------------------------------------------- 32.Sh NAME 33.Nm btowc 34.Nd convert a single byte character to a wide character 35.\" ---------------------------------------------------------------------- 36.Sh LIBRARY 37.Lb libc 38.\" ---------------------------------------------------------------------- 39.Sh SYNOPSIS 40.In wchar.h 41.Ft wint_t 42.Fn btowc "int c" 43.\" ---------------------------------------------------------------------- 44.Sh DESCRIPTION 45The 46.Fn btowc 47function converts a single byte character 48.Fa c 49in the initial shift state of the current locale to a corresponding 50wide character. 51.Pp 52The behaviour of 53.Fn btowc 54is affected by the 55.Dv LC_CTYPE 56category of the current locale. 57.\" ---------------------------------------------------------------------- 58.Sh RETURN VALUES 59The 60.Fn btowc 61function returns: 62.Bl -tag -width 012345678901 63.It Dv WEOF 64If 65.Fa c 66is 67.Dv EOF 68or if (unsigned char) 69.Fa c 70does not correspond to a valid single byte character representation. 71.It (otherwise) 72A wide character corresponding to 73.Fa c . 74.El 75.\" ---------------------------------------------------------------------- 76.Sh ERRORS 77No errors are defined. 78.\" ---------------------------------------------------------------------- 79.Sh SEE ALSO 80.Xr mbrtowc 3 , 81.Xr setlocale 3 , 82.Xr wctob 3 83.\" ---------------------------------------------------------------------- 84.Sh STANDARDS 85The 86.Fn btowc 87function conforms to 88.St -isoC-amd1 . 89