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