OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / 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  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
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 CONFORMING TO
56 C99.
57 .SH NOTES
58 The behavior of
59 .BR getwchar ()
60 depends on the
61 .B LC_CTYPE
62 category of the
63 current locale.
64 .PP
65 It is reasonable to expect that
66 .BR getwchar ()
67 will actually
68 read a multibyte sequence from standard input and then
69 convert it to a wide character.
70 .SH SEE ALSO
71 .BR fgetwc (3),
72 .BR unlocked_stdio (3)
73 .SH COLOPHON
74 This page is part of release 3.79 of the Linux
75 .I man-pages
76 project.
77 A description of the project,
78 information about reporting bugs,
79 and the latest version of this page,
80 can be found at
81 \%http://www.kernel.org/doc/man\-pages/.