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