]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getwchar.3
MB_CUR_MAX.3, MB_LEN_MAX.3, btowc.3, fgetwc.3, fgetws.3, fputwc.3, fputws.3, fwide...
[thirdparty/man-pages.git] / man3 / getwchar.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_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 1999-07-25 "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 .sp
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 \fIstdin\fP and returns
33 it.
34 If the end of stream is reached, or if \fIferror(stdin)\fP becomes
35 true, it returns
36 .BR WEOF .
37 If a wide-character conversion error occurs, it sets
38 \fIerrno\fP to \fBEILSEQ\fP and returns
39 .BR WEOF .
40 .PP
41 For a nonlocking counterpart, see
42 .BR unlocked_stdio (3).
43 .SH RETURN VALUE
44 The
45 .BR getwchar ()
46 function returns the next wide-character from
47 standard input, or
48 .BR WEOF .
49 .SH CONFORMING TO
50 C99.
51 .SH NOTES
52 The behavior of
53 .BR getwchar ()
54 depends on the
55 .B LC_CTYPE
56 category of the
57 current locale.
58 .PP
59 It is reasonable to expect that
60 .BR getwchar ()
61 will actually
62 read a multibyte sequence from standard input and then
63 convert it to a wide character.
64 .SH SEE ALSO
65 .BR fgetwc (3),
66 .BR unlocked_stdio (3)