1.\" $NetBSD: putwc.3,v 1.2 2002/02/07 07:00:26 ross Exp $ 2.\" 3.\" Copyright (c) 1990, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" Chris Torek and the American National Standards Committee X3, 8.\" on Information Processing Systems. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 3. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)putc.3 8.1 (Berkeley) 6/4/93 35.\" $FreeBSD: src/lib/libc/stdio/putwc.3,v 1.8 2007/01/09 00:28:07 imp Exp $ 36.\" 37.Dd December 25, 2013 38.Dt PUTWC 3 39.Os 40.Sh NAME 41.Nm fputwc , 42.Nm fputwc_l , 43.Nm putwc , 44.Nm putwc_l , 45.Nm putwchar , 46.Nm putwchar_l 47.Nd output a wide character to a stream 48.Sh LIBRARY 49.Lb libc 50.Sh SYNOPSIS 51.In stdio.h 52.In wchar.h 53.Ft wint_t 54.Fn fputwc "wchar_t wc" "FILE *stream" 55.Ft wint_t 56.Fn putwc "wchar_t wc" "FILE *stream" 57.Ft wint_t 58.Fn putwchar "wchar_t wc" 59.In xlocale.h 60.Ft wint_t 61.Fn fputwc_l "wchar_t wc" "FILE *stream" "locale_t locale" 62.Ft wint_t 63.Fn putwc_l "wchar_t wc" "FILE *stream" "locale_t locale" 64.Ft wint_t 65.Fn putwchar_l "wchar_t wc" "locale_t locale" 66.Sh DESCRIPTION 67The 68.Fn fputwc 69and 70.Fn fputwc_l 71functions write the wide character 72.Fa wc 73to the output stream pointed to by 74.Fa stream . 75.Pp 76The 77.Fn putwc 78and 79.Fn putwc_l 80functions act essentially identically to 81.Fn fputwc 82and 83.Fn fputwc_l . 84.Pp 85The 86.Fn putwchar 87and 88.Fn putwchar_l 89functions are identical to 90.Fn putwc 91and 92.Fn putwc_l 93with an output stream of 94.Dv stdout . 95.Pp 96The 97.Fn fputwc_l , 98.Fn putwc_l , 99and 100.Fn putwchar_l 101functions take an explicit 102.Fa locale 103argument, whereas the 104.Fn fputwc , 105.Fn putwc , 106and 107.Fn putwchar 108functions use the current global or per-thread locale. 109.Sh RETURN VALUES 110The 111.Fn fputwc , 112.Fn fputwc_l , 113.Fn putwc , 114.Fn putwc_l , 115.Fn putwchar , 116and 117.Fn putwchar_l 118functions 119return the wide character written. 120If an error occurs, the value 121.Dv WEOF 122is returned. 123.Sh SEE ALSO 124.Xr ferror 3 , 125.Xr fopen 3 , 126.Xr getwc 3 , 127.Xr putc 3 , 128.Xr stdio 3 , 129.Xr xlocale 3 130.Sh STANDARDS 131The 132.Fn fputwc , 133.Fn putwc , 134and 135.Fn putwchar 136functions 137conform to 138.St -isoC-99 . 139