1.\" $NetBSD: putwc.3,v 1.8 2004/01/24 16:59:30 wiz Exp $ 2.\" $DragonFly: src/lib/libc/stdio/putwc.3,v 1.1 2005/07/25 00:37:41 joerg Exp $ 3.\" 4.\" Copyright (c) 1990, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" This code is derived from software contributed to Berkeley by 8.\" Chris Torek and the American National Standards Committee X3, 9.\" on Information Processing Systems. 10.\" 11.\" Redistribution and use in source and binary forms, with or without 12.\" modification, are permitted provided that the following conditions 13.\" are met: 14.\" 1. Redistributions of source code must retain the above copyright 15.\" notice, this list of conditions and the following disclaimer. 16.\" 2. Redistributions in binary form must reproduce the above copyright 17.\" notice, this list of conditions and the following disclaimer in the 18.\" documentation and/or other materials provided with the distribution. 19.\" 3. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)putc.3 8.1 (Berkeley) 6/4/93 36.\" 37.Dd October 20, 2001 38.Dt PUTWC 3 39.Os 40.Sh NAME 41.Nm fputwc , 42.Nm putwc , 43.Nm putwchar , 44.Nd output a wide-character to a stream 45.Sh LIBRARY 46.Lb libc 47.Sh SYNOPSIS 48.In stdio.h 49.In wchar.h 50.Ft wint_t 51.Fn fputwc "wchar_t wc" "FILE *stream" 52.Ft wint_t 53.Fn putwc "wchar_t wc" "FILE *stream" 54.Ft wint_t 55.Fn putwchar "wchar_t wc" 56.Sh DESCRIPTION 57The 58.Fn fputwc 59function 60writes the wide-character 61.Fa wc 62to the output stream pointed to by 63.Fa stream . 64.Pp 65.Fn putwc 66acts essentially identically to 67.Fn fputwc , 68but is a macro that expands in-line. 69It may evaluate 70.Fa stream 71more than once, so arguments given to 72.Fn putwc 73should not be expressions with potential side effects. 74.Pp 75.Fn putwchar 76is identical to 77.Fn putwc 78with an output stream of 79.Em stdout . 80.Sh RETURN VALUES 81The functions 82.Fn fputwc , 83.Fn putwc , 84and 85.Fn putwchar 86return the wide-character written. 87If an error occurs, the value 88.Dv WEOF 89is returned. 90.Sh SEE ALSO 91.Xr ferror 3 , 92.Xr fopen 3 , 93.Xr getwc 3 , 94.Xr stdio 3 95.Sh STANDARDS 96The functions 97.Fn fputwc , 98.Fn putwc , 99and 100.Fn putwchar , 101conform to 102.St -isoC-99 . 103