]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/fputwc.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / fputwc.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
e4a74ca8 3.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
4.\"
5.\" References consulted:
6.\" GNU glibc-2 source code and manual
7.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 8.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da
MK
9.\" ISO/IEC 9899:1999
10.\"
45186a5d 11.TH FPUTWC 3 2021-03-22 "Linux man-pages (unreleased)"
fea681da 12.SH NAME
a4c0544d 13fputwc, putwc \- write a wide character to a FILE stream
cfba38f4
AC
14.SH LIBRARY
15Standard C library
16.RI ( libc ", " \-lc )
fea681da
MK
17.SH SYNOPSIS
18.nf
19.B #include <stdio.h>
fea681da 20.B #include <wchar.h>
68e4db0a 21.PP
fea681da
MK
22.BI "wint_t fputwc(wchar_t " wc ", FILE *" stream );
23.BI "wint_t putwc(wchar_t " wc ", FILE *" stream );
24.fi
25.SH DESCRIPTION
60a90ecd
MK
26The
27.BR fputwc ()
28function is the wide-character
29equivalent of the
a4c0544d 30.BR fputc (3)
60a90ecd 31function.
c13182ef
MK
32It writes the wide character \fIwc\fP to \fIstream\fP.
33If
cab87712
MK
34\fIferror(stream)\fP becomes true, it returns
35.BR WEOF .
d0f17b57 36If a wide-character conversion error occurs,
cab87712
MK
37it sets \fIerrno\fP to \fBEILSEQ\fP and returns
38.BR WEOF .
2b9b829d 39Otherwise, it returns \fIwc\fP.
fea681da 40.PP
60a90ecd
MK
41The
42.BR putwc ()
43function or macro functions identically to
44.BR fputwc ().
fea681da 45It may be implemented as a macro, and may evaluate its argument
c13182ef
MK
46more than once.
47There is no reason ever to use it.
fea681da 48.PP
24b74457 49For nonlocking counterparts, see
fea681da 50.BR unlocked_stdio (3).
47297adb 51.SH RETURN VALUE
cb6a894e 52On success,
60a90ecd 53.BR fputwc ()
cb6a894e
MK
54function returns
55.IR wc .
56Otherwise,
cab87712 57.B WEOF
cb6a894e 58is returned, and
1726c2f9 59.I errno
cb6a894e 60is set to indicate the error.
fea681da
MK
61.SH ERRORS
62Apart from the usual ones, there is
63.TP
64.B EILSEQ
65Conversion of \fIwc\fP to the stream's encoding fails.
83613756
MS
66.SH ATTRIBUTES
67For an explanation of the terms used in this section, see
68.BR attributes (7).
c466875e
MK
69.ad l
70.nh
83613756
MS
71.TS
72allbox;
c466875e 73lbx lb lb
83613756
MS
74l l l.
75Interface Attribute Value
76T{
77.BR fputwc (),
78.BR putwc ()
79T} Thread safety MT-Safe
80.TE
c466875e
MK
81.hy
82.ad
847e0d88 83.sp 1
3113c7f3 84.SH STANDARDS
5de8b616 85POSIX.1-2001, POSIX.1-2008, C99.
fea681da 86.SH NOTES
d9bfdb9c 87The behavior of
60a90ecd 88.BR fputwc ()
1274071a
MK
89depends on the
90.B LC_CTYPE
91category of the
fea681da
MK
92current locale.
93.PP
c13182ef 94In the absence of additional information passed to the
fb186734 95.BR fopen (3)
1e321034 96call, it is
60a90ecd
MK
97reasonable to expect that
98.BR fputwc ()
99will actually write the multibyte
fea681da 100sequence corresponding to the wide character \fIwc\fP.
47297adb 101.SH SEE ALSO
fea681da
MK
102.BR fgetwc (3),
103.BR fputws (3),
104.BR unlocked_stdio (3)