xref: /netbsd-src/lib/libc/stdio/putwc.3 (revision 3d3c5d42cb3aa0851ce2ca1303fdf134c850987c)
1*3d3c5d42Swiz.\"	$NetBSD: putwc.3,v 1.9 2010/12/16 17:42:27 wiz Exp $
217f3654aSyamt.\"
317f3654aSyamt.\" Copyright (c) 1990, 1991, 1993
417f3654aSyamt.\"	The Regents of the University of California.  All rights reserved.
517f3654aSyamt.\"
617f3654aSyamt.\" This code is derived from software contributed to Berkeley by
717f3654aSyamt.\" Chris Torek and the American National Standards Committee X3,
817f3654aSyamt.\" on Information Processing Systems.
917f3654aSyamt.\"
1017f3654aSyamt.\" Redistribution and use in source and binary forms, with or without
1117f3654aSyamt.\" modification, are permitted provided that the following conditions
1217f3654aSyamt.\" are met:
1317f3654aSyamt.\" 1. Redistributions of source code must retain the above copyright
1417f3654aSyamt.\"    notice, this list of conditions and the following disclaimer.
1517f3654aSyamt.\" 2. Redistributions in binary form must reproduce the above copyright
1617f3654aSyamt.\"    notice, this list of conditions and the following disclaimer in the
1717f3654aSyamt.\"    documentation and/or other materials provided with the distribution.
18eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors
1917f3654aSyamt.\"    may be used to endorse or promote products derived from this software
2017f3654aSyamt.\"    without specific prior written permission.
2117f3654aSyamt.\"
2217f3654aSyamt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2317f3654aSyamt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2417f3654aSyamt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2517f3654aSyamt.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2617f3654aSyamt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2717f3654aSyamt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2817f3654aSyamt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2917f3654aSyamt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3017f3654aSyamt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3117f3654aSyamt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3217f3654aSyamt.\" SUCH DAMAGE.
3317f3654aSyamt.\"
3417f3654aSyamt.\"     @(#)putc.3	8.1 (Berkeley) 6/4/93
3517f3654aSyamt.\"
3617f3654aSyamt.Dd October 20, 2001
3717f3654aSyamt.Dt PUTWC 3
3817f3654aSyamt.Os
3917f3654aSyamt.Sh NAME
4017f3654aSyamt.Nm fputwc ,
4117f3654aSyamt.Nm putwc ,
4217f3654aSyamt.Nm putwchar ,
43*3d3c5d42Swiz.Nd output a wide character to a stream
4417f3654aSyamt.Sh LIBRARY
4517f3654aSyamt.Lb libc
4617f3654aSyamt.Sh SYNOPSIS
47472351e1Swiz.In stdio.h
48472351e1Swiz.In wchar.h
4917f3654aSyamt.Ft wint_t
5017f3654aSyamt.Fn fputwc "wchar_t wc" "FILE *stream"
5117f3654aSyamt.Ft wint_t
5217f3654aSyamt.Fn putwc "wchar_t wc" "FILE *stream"
5317f3654aSyamt.Ft wint_t
5417f3654aSyamt.Fn putwchar "wchar_t wc"
5517f3654aSyamt.Sh DESCRIPTION
5617f3654aSyamtThe
5717f3654aSyamt.Fn fputwc
5817f3654aSyamtfunction
59*3d3c5d42Swizwrites the wide character
6017f3654aSyamt.Fa wc
6117f3654aSyamtto the output stream pointed to by
6217f3654aSyamt.Fa stream .
6317f3654aSyamt.Pp
6417f3654aSyamt.Fn putwc
6517f3654aSyamtacts essentially identically to
6617f3654aSyamt.Fn fputwc ,
676569c5c5Swizbut is a macro that expands in-line.
686569c5c5SwizIt may evaluate
6917f3654aSyamt.Fa stream
7017f3654aSyamtmore than once, so arguments given to
7117f3654aSyamt.Fn putwc
7217f3654aSyamtshould not be expressions with potential side effects.
7317f3654aSyamt.Pp
7417f3654aSyamt.Fn putwchar
7517f3654aSyamtis identical to
7617f3654aSyamt.Fn putwc
7717f3654aSyamtwith an output stream of
7817f3654aSyamt.Em stdout .
7917f3654aSyamt.Sh RETURN VALUES
80cef0afe9SwizThe functions
8117f3654aSyamt.Fn fputwc ,
82cef0afe9Swiz.Fn putwc ,
8317f3654aSyamtand
8417f3654aSyamt.Fn putwchar
85*3d3c5d42Swizreturn the wide character written.
8617f3654aSyamtIf an error occurs, the value
8717f3654aSyamt.Dv WEOF
8817f3654aSyamtis returned.
8917f3654aSyamt.Sh SEE ALSO
9017f3654aSyamt.Xr ferror 3 ,
9117f3654aSyamt.Xr fopen 3 ,
9217f3654aSyamt.Xr getwc 3 ,
9317f3654aSyamt.Xr stdio 3
9417f3654aSyamt.Sh STANDARDS
9517f3654aSyamtThe functions
9617f3654aSyamt.Fn fputwc ,
9717f3654aSyamt.Fn putwc ,
9817f3654aSyamtand
9917f3654aSyamt.Fn putwchar ,
10017f3654aSyamtconform to
101dca9ccd3Swiz.St -isoC-99 .
102