]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getwchar.3
user_namespaces.7: Minor rewordings of recently added text
[thirdparty/man-pages.git] / man3 / getwchar.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
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.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\" GNU glibc-2 source code and manual
12 .\" Dinkumware C library reference http://www.dinkumware.com/
13 .\" OpenGroup's Single UNIX specification
14 .\" http://www.UNIX-systems.org/online.html
15 .\" ISO/IEC 9899:1999
16 .\"
17 .TH GETWCHAR 3 2017-09-15 "GNU" "Linux Programmer's Manual"
18 .SH NAME
19 getwchar \- read a wide character from standard input
20 .SH SYNOPSIS
21 .nf
22 .B #include <wchar.h>
23 .PP
24 .B "wint_t getwchar(void);"
25 .fi
26 .SH DESCRIPTION
27 The
28 .BR getwchar ()
29 function is the wide-character equivalent of the
30 .BR getchar (3)
31 function.
32 It reads a wide character from
33 .I stdin
34 and returns
35 it.
36 If the end of stream is reached, or if
37 .I ferror(stdin)
38 becomes true, it returns
39 .BR WEOF .
40 If a wide-character conversion error occurs, it sets
41 .I errno
42 to
43 .B EILSEQ
44 and returns
45 .BR WEOF .
46 .PP
47 For a nonlocking counterpart, see
48 .BR unlocked_stdio (3).
49 .SH RETURN VALUE
50 The
51 .BR getwchar ()
52 function returns the next wide-character from
53 standard input, or
54 .BR WEOF .
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
67 .sp 1
68 .SH CONFORMING TO
69 POSIX.1-2001, POSIX.1-2008, C99.
70 .SH NOTES
71 The behavior of
72 .BR getwchar ()
73 depends on the
74 .B LC_CTYPE
75 category of the
76 current locale.
77 .PP
78 It is reasonable to expect that
79 .BR getwchar ()
80 will actually
81 read a multibyte sequence from standard input and then
82 convert it to a wide character.
83 .SH SEE ALSO
84 .BR fgetwc (3),
85 .BR unlocked_stdio (3)