]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) Bruno Haible <haible@clisp.cons.org> |
2 | .\" | |
e4a74ca8 | 3 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da MK |
4 | .\" |
5 | .\" References consulted: | |
6 | .\" GNU glibc-2 source code and manual | |
7 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 8 | .\" OpenGroup's Single UNIX specification |
fea681da MK |
9 | .\" http://www.UNIX-systems.org/online.html |
10 | .\" ISO/IEC 9899:1999 | |
11 | .\" | |
1d767b55 | 12 | .TH PUTWCHAR 3 2021-03-22 "GNU" "Linux Programmer's Manual" |
fea681da MK |
13 | .SH NAME |
14 | putwchar \- write a wide character to standard output | |
9f4d1e00 AC |
15 | .SH LIBRARY |
16 | Standard C library | |
8fc3b2cf | 17 | .RI ( libc ", " \-lc ) |
fea681da MK |
18 | .SH SYNOPSIS |
19 | .nf | |
20 | .B #include <wchar.h> | |
68e4db0a | 21 | .PP |
fea681da MK |
22 | .BI "wint_t putwchar(wchar_t " wc ); |
23 | .fi | |
24 | .SH DESCRIPTION | |
60a90ecd MK |
25 | The |
26 | .BR putwchar () | |
27 | function is the wide-character equivalent of the | |
28 | .BR putchar (3) | |
29 | function. | |
35cfd378 MK |
30 | It writes the wide character |
31 | .I wc | |
32 | to | |
33 | .IR stdout . | |
34 | If | |
35 | .I ferror(stdout) | |
36 | becomes true, it returns | |
cab87712 | 37 | .BR WEOF . |
c13182ef | 38 | If a wide character |
35cfd378 | 39 | conversion error occurs, it sets |
1ae6b2c7 | 40 | .I errno |
35cfd378 MK |
41 | to |
42 | .B EILSEQ | |
43 | and returns | |
cab87712 | 44 | .BR WEOF . |
2b9b829d | 45 | Otherwise, it returns |
35cfd378 | 46 | .IR wc . |
fea681da | 47 | .PP |
24b74457 | 48 | For a nonlocking counterpart, see |
fea681da | 49 | .BR unlocked_stdio (3). |
47297adb | 50 | .SH RETURN VALUE |
60a90ecd MK |
51 | The |
52 | .BR putwchar () | |
35cfd378 MK |
53 | function returns |
54 | .I wc | |
55 | if no error occurred, or | |
cab87712 MK |
56 | .B WEOF |
57 | to indicate an error. | |
55c039aa MS |
58 | .SH ATTRIBUTES |
59 | For an explanation of the terms used in this section, see | |
60 | .BR attributes (7). | |
c466875e MK |
61 | .ad l |
62 | .nh | |
55c039aa MS |
63 | .TS |
64 | allbox; | |
c466875e | 65 | lbx lb lb |
55c039aa MS |
66 | l l l. |
67 | Interface Attribute Value | |
68 | T{ | |
69 | .BR putwchar () | |
70 | T} Thread safety MT-Safe | |
71 | .TE | |
c466875e MK |
72 | .hy |
73 | .ad | |
74 | .sp 1 | |
47297adb | 75 | .SH CONFORMING TO |
7cd89de3 | 76 | POSIX.1-2001, POSIX.1-2008, C99. |
fea681da | 77 | .SH NOTES |
d9bfdb9c | 78 | The behavior of |
60a90ecd | 79 | .BR putwchar () |
1274071a MK |
80 | depends on the |
81 | .B LC_CTYPE | |
82 | category of the | |
fea681da MK |
83 | current locale. |
84 | .PP | |
60a90ecd MK |
85 | It is reasonable to expect that |
86 | .BR putwchar () | |
87 | will actually write | |
35cfd378 MK |
88 | the multibyte sequence corresponding to the wide character |
89 | .IR wc . | |
47297adb | 90 | .SH SEE ALSO |
fea681da MK |
91 | .BR fputwc (3), |
92 | .BR unlocked_stdio (3) |