1*3a628b46Sschwarze.\" $OpenBSD: wctrans.3,v 1.3 2017/09/05 03:16:13 schwarze Exp $ 238311d31Sespie.\" $NetBSD: wctrans.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ 338311d31Sespie.\" 4*3a628b46Sschwarze.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> 5*3a628b46Sschwarze.\" Copyright (c) 2003 Citrus Project 638311d31Sespie.\" All rights reserved. 738311d31Sespie.\" 838311d31Sespie.\" Redistribution and use in source and binary forms, with or without 938311d31Sespie.\" modification, are permitted provided that the following conditions 1038311d31Sespie.\" are met: 1138311d31Sespie.\" 1. Redistributions of source code must retain the above copyright 1238311d31Sespie.\" notice, this list of conditions and the following disclaimer. 1338311d31Sespie.\" 2. Redistributions in binary form must reproduce the above copyright 1438311d31Sespie.\" notice, this list of conditions and the following disclaimer in the 1538311d31Sespie.\" documentation and/or other materials provided with the distribution. 1638311d31Sespie.\" 1738311d31Sespie.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1838311d31Sespie.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1938311d31Sespie.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2038311d31Sespie.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2138311d31Sespie.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2238311d31Sespie.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2338311d31Sespie.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2438311d31Sespie.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2538311d31Sespie.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2638311d31Sespie.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2738311d31Sespie.\" SUCH DAMAGE. 2838311d31Sespie.\" 29*3a628b46Sschwarze.Dd $Mdocdate: September 5 2017 $ 3038311d31Sespie.Dt WCTRANS 3 3138311d31Sespie.Os 3238311d31Sespie.Sh NAME 33*3a628b46Sschwarze.Nm wctrans , 34*3a628b46Sschwarze.Nm wctrans_l 35*3a628b46Sschwarze.Nd get a character mapping identifier by name 3638311d31Sespie.Sh SYNOPSIS 3738311d31Sespie.In wctype.h 3838311d31Sespie.Ft wctrans_t 3938311d31Sespie.Fn wctrans "const char *charmap" 40*3a628b46Sschwarze.Ft wctrans_t 41*3a628b46Sschwarze.Fn wctrans_l "const char *charmap" "locale_t locale" 4238311d31Sespie.Sh DESCRIPTION 43*3a628b46SschwarzeThese functions return a character mapping identifier 44*3a628b46Sschwarzecorresponding to the locale-specific character mapping name 4538311d31Sespie.Fa charmap . 46*3a628b46SschwarzeThis identifier can be used in the subsequent calls of 47*3a628b46Sschwarze.Fn towctrans 48*3a628b46Sschwarzeor 49*3a628b46Sschwarze.Fn towctrans_l , 50*3a628b46Sschwarzerespectively. 51*3a628b46Sschwarze.Pp 5238311d31SespieThe following names are defined in all locales: 5338311d31Sespie.Bd -literal -offset indent 5438311d31Sespietolower toupper 5538311d31Sespie.Ed 5638311d31Sespie.Pp 57*3a628b46SschwarzeThe function 58*3a628b46Sschwarze.Fn wctrans_l 59*3a628b46Sschwarzeuses the specified 60*3a628b46Sschwarze.Fa locale , 61*3a628b46Sschwarzewhereas 6238311d31Sespie.Fn wctrans 63*3a628b46Sschwarzeuses the thread-specific locale set with 64*3a628b46Sschwarze.Xr uselocale 3 , 65*3a628b46Sschwarzefalling back to the global locale set with 66*3a628b46Sschwarze.Xr setlocale 3 . 6738311d31Sespie.Sh RETURN VALUES 68*3a628b46SschwarzeThese functions return the character mapping identifier, or 69*3a628b46Sschwarze.Po Vt wctrans_t Pc Ns 0 70*3a628b46Sschwarzeif 7138311d31Sespie.Fa charmap 7238311d31Sespiedoes not corresponding to a valid character mapping name. 7338311d31Sespie.Sh SEE ALSO 74*3a628b46Sschwarze.Xr newlocale 3 , 7538311d31Sespie.Xr setlocale 3 , 76*3a628b46Sschwarze.Xr towctrans 3 , 77*3a628b46Sschwarze.Xr towlower 3 , 7838311d31Sespie.Xr wctype 3 7938311d31Sespie.Sh STANDARDS 8038311d31SespieThe 81*3a628b46Sschwarze.Fn wctrans 8238311d31Sespiefunction conforms to 83*3a628b46Sschwarze.St -isoC-amd1 , 84*3a628b46Sschwarzeand 85*3a628b46Sschwarze.Fn wctrans_l 86*3a628b46Sschwarzeto 87*3a628b46Sschwarze.St -p1003.1-2008 . 88*3a628b46Sschwarze.Sh HISTORY 89*3a628b46SschwarzeThe 90*3a628b46Sschwarze.Fn wctrans 91*3a628b46Sschwarzefunction has been available since 92*3a628b46Sschwarze.Ox 3.8 , 93*3a628b46Sschwarzeand 94*3a628b46Sschwarze.Fn wctrans_l 95*3a628b46Sschwarzesince 96*3a628b46Sschwarze.Ox 6.2 . 97