OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / fgetwc.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 .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
16 .\"O
17 .\" About this Japanese page, please contact to JM Project <JM@linux.or.jp>
18 .\" Translated Sun Aug 29 15:03:27 JST 1999
19 .\"           by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
20 .\" Updated Sun Dec 26 JST 1999 by Kentaro Shirakata <argrath@ub32.org>
21 .\" Updated Fri Nov  2 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
22 .\"
23 .TH FGETWC 3 1999-07-25 "GNU" "Linux Programmer's Manual"
24 .\") .SH NAME
25 .SH Ì¾Á°
26 .\"O fgetwc, getwc \- read a wide character from a FILE stream
27 fgetwc, getwc \- ¥ï¥¤¥Éʸ»ú¤ò FILE ¥¹¥È¥ê¡¼¥à¤«¤éÆɤ߹þ¤à
28 .\"O .SH SYNOPSIS
29 .SH ½ñ¼°
30 .nf
31 .B #include <stdio.h>
32 .br
33 .B #include <wchar.h>
34 .sp
35 .BI "wint_t fgetwc(FILE *" stream );
36 .BI "wint_t getwc(FILE *" stream );
37 .fi
38 .\"O .SH DESCRIPTION
39 .SH ÀâÌÀ
40 .\"O The
41 .\"O .BR fgetwc ()
42 .\"O function is the wide-character equivalent
43 .\"O of the
44 .\"O .BR fgetc (3)
45 .\"O function.
46 .\"O It reads a wide character from \fIstream\fP and returns it.
47 .\"O If the end of stream is reached, or if \fIferror(stream)\fP becomes true,
48 .\"O it returns
49 .\"O .BR WEOF .
50 .\"O If a wide character conversion error occurs, it sets
51 .\"O \fIerrno\fP to \fBEILSEQ\fP and returns
52 .\"O .BR WEOF .
53 .BR fgetwc ()
54 ´Ø¿ô¤Ï¡¢
55 .BR fgetc (3)
56 ¤ËÂбþ¤¹¤ë¥ï¥¤¥Éʸ»ú´Ø¿ô¤Ç¤¢¤ë¡£
57 ¤³¤Î´Ø¿ô¤Ï \fIstream\fP ¤«¤é¥ï¥¤¥Éʸ»ú¤ò 1 Ê¸»úÆɤ߹þ¤ß¡¢¤³¤ì¤òÊÖ¤¹¡£
58 ¥¹¥È¥ê¡¼¥à¤Î½ªÃ¼¤Ë㤹¤ë¤«¡¢\fIferror(stream)\fP ¤¬¿¿¤Ë¤Ê¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
59 ¤³¤Î´Ø¿ô¤Ï
60 .B WEOF
61 ¤òÊÖ¤¹¡£
62 ¥ï¥¤¥Éʸ»úÊÑ´¹¤Ç¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ï¡¢
63 \fIerrno\fP ¤Ë \fBEILSEQ\fP ¤ò¥»¥Ã¥È¤·¡¢
64 .B WEOF
65 ¤òÊÖ¤¹¡£
66 .PP
67 .\"O The
68 .\"O .BR getwc ()
69 .\"O function or macro functions identically to
70 .\"O .BR fgetwc ().
71 .BR getwc ()
72 ´Ø¿ô¤¢¤ë¤¤¤Ï¥Þ¥¯¥í¤Ï¡¢
73 .BR fgetwc ()
74 ¤ÈÁ´¤¯Æ±¤¸Æ°ºî¤ò¤¹¤ë¡£
75 .\"O It may be implemented as a macro, and may evaluate its argument
76 .\"O more than once.
77 .\"O There is no reason ever to use it.
78 ¤³¤Î´Ø¿ô¤Ï¥Þ¥¯¥í¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç¡¢°ú¤­¿ô¤¬Ê£¿ô²óɾ²Á¤µ
79 ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£¤³¤Î´Ø¿ô¤ò»È¤¦Íýͳ¤Ï¤â¤Ï¤ä¸ºß¤·¤Ê¤¤¡£
80 .PP
81 .\"O For nonlocking counterparts, see
82 .\"O .BR unlocked_stdio (3).
83 ¤³¤ì¤é¤Î½èÍý¤ò¥í¥Ã¥¯¤»¤º¤Ë¹Ô¤¤¤¿¤¤¤È¤­¤Ï¡¢
84 .BR unlocked_stdio (3)
85 ¤ò»²¾È¤Î¤³¤È¡£
86 .\"O .SH "RETURN VALUE"
87 .SH ÊÖ¤êÃÍ
88 .\"O The
89 .\"O .BR fgetwc ()
90 .\"O function returns the next wide-character
91 .\"O from the stream, or
92 .\"O .BR WEOF .
93 .BR fgetwc ()
94 ´Ø¿ô¤Ï¥¹¥È¥ê¡¼¥à¤Î¼¡¤Î¥ï¥¤¥Éʸ»ú¤«¡¢¤¢¤ë¤¤¤Ï
95 .B WEOF
96 ¤òÊÖ¤¹¡£
97 .\"O .SH ERRORS
98 .SH ¥¨¥é¡¼
99 .\"O Apart from the usual ones, there is
100 Ä̾ï¤Î¥¨¥é¡¼¤Ë²Ã¤¨¤Æ¡¢°Ê²¼¤Î¥¨¥é¡¼¤¬¤¢¤ë:
101 .TP
102 .B EILSEQ
103 .\"O The data obtained from the input stream does not
104 .\"O form a valid character.
105 ÆþÎÏ¥¹¥È¥ê¡¼¥à¤«¤é¼èÆÀ¤·¤¿¥Ç¡¼¥¿¤¬¡¢Àµ¤·¤¤Ê¸»ú¤Ç¤Ê¤¤¡£
106 .\"O .SH "CONFORMING TO"
107 .SH ½àµò
108 C99, POSIX.1-2001.
109 .\"O .SH NOTES
110 .SH Ãí°Õ
111 .\"O The behavior of
112 .\"O .BR fgetwc ()
113 .\"O depends on the
114 .\"O .B LC_CTYPE
115 .\"O category of the
116 .\"O current locale.
117 .BR fgetwc ()
118 ¤ÎÆ°ºî¤Ï¡¢¸½ºß¤Î¥í¥±¡¼¥ë¤Î
119 .B LC_CTYPE
120 ¥«¥Æ¥´¥ê¤Ë°Í¸¤¹¤ë¡£
121 .PP
122 .\"O In the absence of additional information passed to the
123 .\"O .BR fopen (3)
124 .\"O call, it is
125 .\"O reasonable to expect that
126 .\"O .BR fgetwc ()
127 .\"O will actually read a multibyte sequence
128 .\"O from the stream and then convert it to a wide character.
129 .BR fopen (3)
130 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÅϤ¹ÄɲþðÊ󤬤ʤ¤¾ì¹ç¤Ë¤Ï¡¢
131 .BR fgetwc ()
132 ¤¬¼ÂºÝ
133 ¤Ë¤Ï¥Þ¥ë¥Á¥Ð¥¤¥È¥·¡¼¥±¥ó¥¹¤ò¥¹¥È¥ê¡¼¥à¤«¤éÆɤ߹þ¤ß¡¢¤³¤ì¤ò¥ï¥¤¥Éʸ»ú¤Ë
134 ÊÑ´¹¤¹¤ë¤È´üÂÔ¤¹¤ë¤³¤È¤ÏŬÀڤǤ¢¤ë¡£
135 .\"O .SH "SEE ALSO"
136 .SH ´ØÏ¢¹àÌÜ
137 .BR fgetws (3),
138 .BR fputwc (3),
139 .BR ungetwc (3),
140 .BR unlocked_stdio (3)