Debian Codegraph @

upstream/debian-trixie/man3/putwchar.3

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