]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getwchar.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / getwchar.3
1 '\" t
2 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .\" References consulted:
7 .\" GNU glibc-2 source code and manual
8 .\" Dinkumware C library reference http://www.dinkumware.com/
9 .\" OpenGroup's Single UNIX specification
10 .\" http://www.UNIX-systems.org/online.html
11 .\" ISO/IEC 9899:1999
12 .\"
13 .TH getwchar 3 (date) "Linux man-pages (unreleased)"
14 .SH NAME
15 getwchar \- read a wide character from standard input
16 .SH LIBRARY
17 Standard C library
18 .RI ( libc ", " \-lc )
19 .SH SYNOPSIS
20 .nf
21 .B #include <wchar.h>
22 .PP
23 .B "wint_t getwchar(void);"
24 .fi
25 .SH DESCRIPTION
26 The
27 .BR getwchar ()
28 function is the wide-character equivalent of the
29 .BR getchar (3)
30 function.
31 It reads a wide character from
32 .I stdin
33 and returns
34 it.
35 If the end of stream is reached, or if
36 .I ferror(stdin)
37 becomes true, it returns
38 .BR WEOF .
39 If a wide-character conversion error occurs, it sets
40 .I errno
41 to
42 .B EILSEQ
43 and returns
44 .BR WEOF .
45 .PP
46 For a nonlocking counterpart, see
47 .BR unlocked_stdio (3).
48 .SH RETURN VALUE
49 The
50 .BR getwchar ()
51 function returns the next wide-character from
52 standard input, or
53 .BR WEOF .
54 .SH ATTRIBUTES
55 For an explanation of the terms used in this section, see
56 .BR attributes (7).
57 .TS
58 allbox;
59 lbx lb lb
60 l l l.
61 Interface Attribute Value
62 T{
63 .na
64 .nh
65 .BR getwchar ()
66 T} Thread safety MT-Safe
67 .TE
68 .sp 1
69 .SH STANDARDS
70 C11, POSIX.1-2008.
71 .SH HISTORY
72 C99, POSIX.1-2001.
73 .SH NOTES
74 The behavior of
75 .BR getwchar ()
76 depends on the
77 .B LC_CTYPE
78 category of the
79 current locale.
80 .PP
81 It is reasonable to expect that
82 .BR getwchar ()
83 will actually
84 read a multibyte sequence from standard input and then
85 convert it to a wide character.
86 .SH SEE ALSO
87 .BR fgetwc (3),
88 .BR unlocked_stdio (3)