OSDN Git Service

7a60832785e9857c048e850779bb1a15d0cd3209
[linuxjm/LDP_man-pages.git] / 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)