.\" Copyright (c) Bruno Haible .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification .\" http://www.UNIX-systems.org/online.html .\" ISO/IEC 9899:1999 .\" .\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon .\"O .\" About this Japanese page, please contact to JM Project .\" Translated Sun Aug 29 15:03:27 JST 1999 .\" by FUJIWARA Teruyoshi .\" Updated Sun Dec 26 JST 1999 by Kentaro Shirakata .\" Updated Fri Nov 2 JST 2001 by Kentaro Shirakata .\" .TH FGETWC 3 1999-07-25 "GNU" "Linux Programmer's Manual" .\") .SH NAME .SH 名前 .\"O fgetwc, getwc \- read a wide character from a FILE stream fgetwc, getwc \- ワイド文字を FILE ストリームから読み込む .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .br .B #include .sp .BI "wint_t fgetwc(FILE *" stream ); .BI "wint_t getwc(FILE *" stream ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR fgetwc () .\"O function is the wide-character equivalent .\"O of the .\"O .BR fgetc (3) .\"O function. .\"O It reads a wide character from \fIstream\fP and returns it. .\"O If the end of stream is reached, or if \fIferror(stream)\fP becomes true, .\"O it returns .\"O .BR WEOF . .\"O If a wide character conversion error occurs, it sets .\"O \fIerrno\fP to \fBEILSEQ\fP and returns .\"O .BR WEOF . .BR fgetwc () 関数は、 .BR fgetc (3) に対応するワイド文字関数である。 この関数は \fIstream\fP からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に達するか、\fIferror(stream)\fP が真になった場合には、 この関数は .B WEOF を返す。 ワイド文字変換でエラーが発生した場合は、 \fIerrno\fP に \fBEILSEQ\fP をセットし、 .B WEOF を返す。 .PP .\"O The .\"O .BR getwc () .\"O function or macro functions identically to .\"O .BR fgetwc (). .BR getwc () 関数あるいはマクロは、 .BR fgetwc () と全く同じ動作をする。 .\"O It may be implemented as a macro, and may evaluate its argument .\"O more than once. .\"O There is no reason ever to use it. この関数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれない。この関数を使う理由はもはや存在しない。 .PP .\"O For nonlocking counterparts, see .\"O .BR unlocked_stdio (3). これらの処理をロックせずに行いたいときは、 .BR unlocked_stdio (3) を参照のこと。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR fgetwc () .\"O function returns the next wide-character .\"O from the stream, or .\"O .BR WEOF . .BR fgetwc () 関数はストリームの次のワイド文字か、あるいは .B WEOF を返す。 .\"O .SH ERRORS .SH エラー .\"O Apart from the usual ones, there is 通常のエラーに加えて、以下のエラーがある: .TP .B EILSEQ .\"O The data obtained from the input stream does not .\"O form a valid character. 入力ストリームから取得したデータが、正しい文字でない。 .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\"O .SH NOTES .SH 注意 .\"O The behavior of .\"O .BR fgetwc () .\"O depends on the .\"O .B LC_CTYPE .\"O category of the .\"O current locale. .BR fgetwc () の動作は、現在のロケールの .B LC_CTYPE カテゴリに依存する。 .PP .\"O In the absence of additional information passed to the .\"O .BR fopen (3) .\"O call, it is .\"O reasonable to expect that .\"O .BR fgetwc () .\"O will actually read a multibyte sequence .\"O from the stream and then convert it to a wide character. .BR fopen (3) システムコールに渡す追加情報がない場合には、 .BR fgetwc () が実際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変換すると期待することは適切である。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR fgetws (3), .BR fputwc (3), .BR ungetwc (3), .BR unlocked_stdio (3)