]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/getwchar.3
getpt.3: tfix
[thirdparty/man-pages.git] / man3 / getwchar.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.\"
4b8c67d9 17.TH GETWCHAR 3 2017-09-15 "GNU" "Linux Programmer's Manual"
fea681da
MK
18.SH NAME
19getwchar \- read a wide character from standard input
20.SH SYNOPSIS
21.nf
22.B #include <wchar.h>
68e4db0a 23.PP
0daa9e92 24.B "wint_t getwchar(void);"
fea681da
MK
25.fi
26.SH DESCRIPTION
60a90ecd
MK
27The
28.BR getwchar ()
29function is the wide-character equivalent of the
30.BR getchar (3)
31function.
35cfd378
MK
32It reads a wide character from
33.I stdin
34and returns
c13182ef 35it.
35cfd378
MK
36If the end of stream is reached, or if
37.I ferror(stdin)
38becomes true, it returns
cab87712 39.BR WEOF .
d0f17b57 40If a wide-character conversion error occurs, it sets
35cfd378
MK
41.I errno
42to
43.B EILSEQ
44and returns
cab87712 45.BR WEOF .
fea681da 46.PP
24b74457 47For a nonlocking counterpart, see
fea681da 48.BR unlocked_stdio (3).
47297adb 49.SH RETURN VALUE
60a90ecd
MK
50The
51.BR getwchar ()
52function returns the next wide-character from
cab87712
MK
53standard input, or
54.BR WEOF .
9da4cd7d
MS
55.SH ATTRIBUTES
56For an explanation of the terms used in this section, see
57.BR attributes (7).
58.TS
59allbox;
60lb lb lb
61l l l.
62Interface Attribute Value
63T{
64.BR getwchar ()
65T} Thread safety MT-Safe
66.TE
847e0d88 67.sp 1
47297adb 68.SH CONFORMING TO
d2ea9a7d 69POSIX.1-2001, POSIX.1-2008, C99.
fea681da 70.SH NOTES
d9bfdb9c 71The behavior of
60a90ecd 72.BR getwchar ()
1274071a
MK
73depends on the
74.B LC_CTYPE
75category of the
fea681da
MK
76current locale.
77.PP
60a90ecd
MK
78It is reasonable to expect that
79.BR getwchar ()
80will actually
fb186734
MK
81read a multibyte sequence from standard input and then
82convert it to a wide character.
47297adb 83.SH SEE ALSO
fea681da
MK
84.BR fgetwc (3),
85.BR unlocked_stdio (3)