termios.3: wfix
[man-pages.git] / man3 / putwchar.3
blob215fcd8cc1eff57161235f25b2b0eae11773a972
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
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.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification
14 .\"      http://www.UNIX-systems.org/online.html
15 .\"   ISO/IEC 9899:1999
16 .\"
17 .TH PUTWCHAR 3  2021-03-22 "GNU" "Linux Programmer's Manual"
18 .SH NAME
19 putwchar \- write a wide character to standard output
20 .SH SYNOPSIS
21 .nf
22 .B #include <wchar.h>
23 .PP
24 .BI "wint_t putwchar(wchar_t " wc );
25 .fi
26 .SH DESCRIPTION
27 The
28 .BR putwchar ()
29 function is the wide-character equivalent of the
30 .BR putchar (3)
31 function.
32 It writes the wide character
33 .I wc
35 .IR stdout .
37 .I ferror(stdout)
38 becomes true, it returns
39 .BR WEOF .
40 If a wide character
41 conversion error occurs, it sets
42 .IR errno
44 .B EILSEQ
45 and returns
46 .BR WEOF .
47 Otherwise, it returns
48 .IR wc .
49 .PP
50 For a nonlocking counterpart, see
51 .BR unlocked_stdio (3).
52 .SH RETURN VALUE
53 The
54 .BR putwchar ()
55 function returns
56 .I wc
57 if no error occurred, or
58 .B WEOF
59 to indicate an error.
60 .SH ATTRIBUTES
61 For an explanation of the terms used in this section, see
62 .BR attributes (7).
63 .ad l
64 .nh
65 .TS
66 allbox;
67 lbx lb lb
68 l l l.
69 Interface       Attribute       Value
71 .BR putwchar ()
72 T}      Thread safety   MT-Safe
73 .TE
74 .hy
75 .ad
76 .sp 1
77 .SH CONFORMING TO
78 POSIX.1-2001, POSIX.1-2008, C99.
79 .SH NOTES
80 The behavior of
81 .BR putwchar ()
82 depends on the
83 .B LC_CTYPE
84 category of the
85 current locale.
86 .PP
87 It is reasonable to expect that
88 .BR putwchar ()
89 will actually write
90 the multibyte sequence corresponding to the wide character
91 .IR wc .
92 .SH SEE ALSO
93 .BR fputwc (3),
94 .BR unlocked_stdio (3)