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