]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getwchar.3
ffix
[thirdparty/man-pages.git] / man3 / getwchar.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single Unix specification
12 .\" http://www.UNIX-systems.org/online.html
13 .\" ISO/IEC 9899:1999
14 .\"
15 .TH GETWCHAR 3 1999-07-25 "GNU" "Linux Programmer's Manual"
16 .SH NAME
17 getwchar \- read a wide character from standard input
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
21 .sp
22 .BI "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 \fIstdin\fP and returns
31 it.
32 If the end of stream is reached, or if \fIferror(stdin)\fP becomes
33 true, it returns WEOF.
34 If a wide-character conversion error occurs, it sets
35 \fIerrno\fP to \fBEILSEQ\fP and returns WEOF.
36 .PP
37 For a non-locking counterpart, see
38 .BR unlocked_stdio (3).
39 .SH "RETURN VALUE"
40 The
41 .BR getwchar ()
42 function returns the next wide-character from
43 standard input, or WEOF.
44 .SH "CONFORMING TO"
45 C99
46 .SH NOTES
47 The behavior of
48 .BR getwchar ()
49 depends on the
50 .B LC_CTYPE
51 category of the
52 current locale.
53 .PP
54 It is reasonable to expect that
55 .BR getwchar ()
56 will actually
57 read a multibyte sequence from standard input and then
58 convert it to a wide character.
59 .SH "SEE ALSO"
60 .BR fgetwc (3),
61 .BR unlocked_stdio (3)