]>
Commit | Line | Data |
---|---|---|
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 |
19 | getwchar \- 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 |
27 | The |
28 | .BR getwchar () | |
29 | function is the wide-character equivalent of the | |
30 | .BR getchar (3) | |
31 | function. | |
35cfd378 MK |
32 | It reads a wide character from |
33 | .I stdin | |
34 | and returns | |
c13182ef | 35 | it. |
35cfd378 MK |
36 | If the end of stream is reached, or if |
37 | .I ferror(stdin) | |
38 | becomes true, it returns | |
cab87712 | 39 | .BR WEOF . |
d0f17b57 | 40 | If a wide-character conversion error occurs, it sets |
35cfd378 MK |
41 | .I errno |
42 | to | |
43 | .B EILSEQ | |
44 | and returns | |
cab87712 | 45 | .BR WEOF . |
fea681da | 46 | .PP |
24b74457 | 47 | For a nonlocking counterpart, see |
fea681da | 48 | .BR unlocked_stdio (3). |
47297adb | 49 | .SH RETURN VALUE |
60a90ecd MK |
50 | The |
51 | .BR getwchar () | |
52 | function returns the next wide-character from | |
cab87712 MK |
53 | standard input, or |
54 | .BR WEOF . | |
9da4cd7d MS |
55 | .SH ATTRIBUTES |
56 | For an explanation of the terms used in this section, see | |
57 | .BR attributes (7). | |
58 | .TS | |
59 | allbox; | |
60 | lb lb lb | |
61 | l l l. | |
62 | Interface Attribute Value | |
63 | T{ | |
64 | .BR getwchar () | |
65 | T} Thread safety MT-Safe | |
66 | .TE | |
847e0d88 | 67 | .sp 1 |
47297adb | 68 | .SH CONFORMING TO |
d2ea9a7d | 69 | POSIX.1-2001, POSIX.1-2008, C99. |
fea681da | 70 | .SH NOTES |
d9bfdb9c | 71 | The behavior of |
60a90ecd | 72 | .BR getwchar () |
1274071a MK |
73 | depends on the |
74 | .B LC_CTYPE | |
75 | category of the | |
fea681da MK |
76 | current locale. |
77 | .PP | |
60a90ecd MK |
78 | It is reasonable to expect that |
79 | .BR getwchar () | |
80 | will actually | |
fb186734 MK |
81 | read a multibyte sequence from standard input and then |
82 | convert it to a wide character. | |
47297adb | 83 | .SH SEE ALSO |
fea681da MK |
84 | .BR fgetwc (3), |
85 | .BR unlocked_stdio (3) |