getwcharのヘルプ・マニュアル
日本語 英語
getwchar --help
man getwchar
GETWCHAR(3) Linux Programmer’s Manual GETWCHAR(3)
名前
getwchar - 標準入力よりワイド文字を読み込む
書式
#include
wint_t getwchar(void);
説明
getwchar() 関数は getchar(3) 関数のワイド文字版である。 stdin からワイ
ド文字を読み込んでそれを返す。ストリームの最後に達している場合 や fer-
ror(stdin) が真の場合には WEOF を返す。ワイド文字変換でエラーが起こった
場合には errno に EILSEQ を設定して WEOF を返す。
これらの処理をロックせずに行いたいときは、 unlocked_stdio(3) を参照のこ
と。
返り値
getwchar() 関数は標準入力の次のワイド文字を返すか、 WEOF を返す。
準拠
C99.
注意
getwchar() の動作は現在のロケールの LC_CTYPE カテゴリに依存している。
getwchar() が実際には標準入力からマルチバイト列を読み込んでワイド文字に
変換することを期待しても良い。
関連項目
fgetwc(3), unlocked_stdio(3)
GNU 1999-07-25 GETWCHAR(3)
GETWCHAR(3) Linux Programmer’s Manual GETWCHAR(3)
NAME
getwchar - read a wide character from standard input
SYNOPSIS
#include
wint_t getwchar(void);
DESCRIPTION
The getwchar() function is the wide-character equivalent of the
getchar(3) function. It reads a wide character from stdin and returns
it. If the end of stream is reached, or if ferror(stdin) becomes true,
it returns WEOF. If a wide-character conversion error occurs, it sets
errno to EILSEQ and returns WEOF.
For a non-locking counterpart, see unlocked_stdio(3).
RETURN VALUE
The getwchar() function returns the next wide-character from standard
input, or WEOF.
CONFORMING TO
C99.
NOTES
The behavior of getwchar() depends on the LC_CTYPE category of the cur-
rent locale.
It is reasonable to expect that getwchar() will actually read a multi-
byte sequence from standard input and then convert it to a wide charac-
ter.
SEE ALSO
fgetwc(3), unlocked_stdio(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 1999-07-25 GETWCHAR(3)