xref: /netbsd/lib/libc/stdio/putwc.3 (revision bf9ec67e)
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. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"	This product includes software developed by the University of
21.\"	California, Berkeley and its contributors.
22.\" 4. Neither the name of the University nor the names of its contributors
23.\"    may be used to endorse or promote products derived from this software
24.\"    without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36.\" SUCH DAMAGE.
37.\"
38.\"     @(#)putc.3	8.1 (Berkeley) 6/4/93
39.\"
40.Dd October 20, 2001
41.Dt PUTWC 3
42.Os
43.Sh NAME
44.Nm fputwc ,
45.Nm putwc ,
46.Nm putwchar ,
47.Nd output a wide-character to a stream
48.Sh LIBRARY
49.Lb libc
50.Sh SYNOPSIS
51.Fd #include \*[Lt]stdio.h\*[Gt]
52.Fd #include \*[Lt]wchar.h\*[Gt]
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.Sh DESCRIPTION
60The
61.Fn fputwc
62function
63writes the wide-character
64.Fa wc
65to the output stream pointed to by
66.Fa stream .
67.Pp
68.Fn putwc
69acts essentially identically to
70.Fn fputwc ,
71but is a macro that expands in-line. It may evaluate
72.Fa stream
73more than once, so arguments given to
74.Fn putwc
75should not be expressions with potential side effects.
76.Pp
77.Fn putwchar
78is identical to
79.Fn putwc
80with an output stream of
81.Em stdout .
82.Sh RETURN VALUES
83The functions,
84.Fn fputwc ,
85.Fn putwc
86and
87.Fn putwchar
88return the wide-character written.
89If an error occurs, the value
90.Dv WEOF
91is returned.
92.Sh SEE ALSO
93.Xr ferror 3 ,
94.Xr fopen 3 ,
95.Xr getwc 3 ,
96.Xr stdio 3
97.Sh STANDARDS
98The functions
99.Fn fputwc ,
100.Fn putwc ,
101and
102.Fn putwchar ,
103conform to
104.St -isoC99 .
105