Debian Codegraph @

upstream/debian-unstable/man3/putwchar.3

raw
1 '\" t
2 .\" Copyright, Bruno Haible <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH putwchar 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 putwchar \- write a wide character to standard output
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <wchar.h>
16 .P
17 .BI "wint_t putwchar(wchar_t " wc );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR putwchar ()
22 function is the wide-character equivalent of the
23 .BR putchar (3)
24 function.
25 It writes the wide character
26 .I wc
27 to
28 .IR stdout .
29 If
30 .I ferror(stdout)
31 becomes true, it returns
32 .BR WEOF .
33 If a wide character
34 conversion error occurs, it sets
35 .I errno
36 to
37 .B EILSEQ
38 and returns
39 .BR WEOF .
40 Otherwise, it returns
41 .IR wc .
42 .P
43 For a nonlocking counterpart, see
44 .BR unlocked_stdio (3).
45 .SH RETURN VALUE
46 The
47 .BR putwchar ()
48 function returns
49 .I wc
50 if no error occurred, or
51 .B WEOF
52 to indicate an error.
53 .SH ATTRIBUTES
54 For an explanation of the terms used in this section, see
55 .BR attributes (7).
56 .TS
57 allbox;
58 lbx lb lb
59 l l l.
60 Interface Attribute Value
61 T{
62 .na
63 .nh
64 .BR putwchar ()
65 T} Thread safety MT-Safe
66 .TE
67 .SH STANDARDS
68 C11, POSIX.1-2008.
69 .SH HISTORY
70 POSIX.1-2001, C99.
71 .SH NOTES
72 The behavior of
73 .BR putwchar ()
74 depends on the
75 .B LC_CTYPE
76 category of the
77 current locale.
78 .P
79 It is reasonable to expect that
80 .BR putwchar ()
81 will actually write
82 the multibyte sequence corresponding to the wide character
83 .IR wc .
84 .SH SEE ALSO
85 .BR fputwc (3),
86 .BR unlocked_stdio (3)