ungetwcのヘルプ・マニュアル
日本語 英語
ungetwc --help
man ungetwc
UNGETWC(3) Linux Programmer’s Manual UNGETWC(3)
名前
ungetwc - ワイド文字を FILE ストリームへ戻す
書式
#include
wint_t ungetwc(wint_t wc, FILE *stream);
説明
ungetwc() 関数は ungetc(3) 関数のワイド文字版である。この関数はワイド文
字を stream へ戻して、それを返す。
wc が WEOF の場合、 WEOF を返す。 wc が不正なワイド文字の場合 、 errno
に EILSEQ を設定して WEOF を返す。
wc が有効なワイド文字の場合、それをストリームへと戻して後のワイド文字読
み込み操作で取得できるようにする。ファイル位置(file-position) 指示子は1
以上戻される。ファイル終端(end-of-file)指示子はクリアされる。そのファイ
ルの背後にある記憶媒体は影響を受けない。
注意: wc はストリームから読み込んだ最後のワイド文字である必要はない。有
効なワイド文字ならば何でも良い。
続 けて複数のワイド文字を戻すことをサポートしている実装の場合は、戻した
ワイド文字は、戻したのとは逆の順番で読み込まれる。しかしこの場合でも 一
段階の戻ししか保証されていない。
返り値
ungetwc() 関数は成功した場合には wc を返す。失敗した場合には WEOF を返
す。
準拠
C99.
注意
ungetwc() 関数の動作は現在のロケールの LC_CTYPE カテゴリに依存してい る
。
関連項目
fgetwc(3)
GNU 1999-09-19 UNGETWC(3)
UNGETWC(3) Linux Programmer’s Manual UNGETWC(3)
NAME
ungetwc - push back a wide character onto a FILE stream
SYNOPSIS
#include
wint_t ungetwc(wint_t wc, FILE *stream);
DESCRIPTION
The ungetwc() function is the wide-character equivalent of the
ungetc(3) function. It pushes back a wide character onto stream and
returns it.
If wc is WEOF, it returns WEOF. If wc is an invalid wide character, it
sets errno to EILSEQ and returns WEOF.
If wc is a valid wide character, it is pushed back onto the stream and
thus becomes available for future wide-character read operations. The
file-position indicator is decremented by one or more. The end-of-file
indicator is cleared. The backing storage of the file is not affected.
Note: wc need not be the last wide-character read from the stream; it
can be any other valid wide character.
If the implementation supports multiple push-back operations in a row,
the pushed-back wide characters will be read in reverse order; however,
only one level of push-back is guaranteed.
RETURN VALUE
The ungetwc() function returns wc when successful, or WEOF upon fail-
ure.
CONFORMING TO
C99.
NOTES
The behavior of ungetwc() depends on the LC_CTYPE category of the cur-
rent locale.
SEE ALSO
fgetwc(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-09-19 UNGETWC(3)