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