.\" Copyright (C) 2001 Andries Brouwer . .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. .\" Translated Sat 12 Jan 2002 by NAKANO Takeo .\" .TH FPURGE 3 2001\-12\-15 "" "Linux Programmer's Manual" .SH 名前 fpurge, __fpurge \- ストリームを一掃 (purge) する .SH 書式 .nf /* unsupported */ \fB#include \fP .sp \fBint fpurge(FILE *\fP\fIstream\fP\fB);\fP .sp /* supported */ \fB#include \fP .br \fB#include \fP .sp \fBvoid __fpurge(FILE *\fP\fIstream\fP\fB);\fP .fi .SH 説明 \fBfpurge\fP() 関数は、与えられたストリームのバッファーをクリアする。 出力ストリームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこれを行うと、 下層にあるオブジェクトから読み込まれ \fBgetc\fP(3) による取得を待っている入力が、すべて捨てられる。 これには \fBungetc\fP(3) によって戻されたテキストも含まれる。 \fBfflush\fP(3) も参照のこと。 .LP \fB__fpurge\fP() 関数も全く同じことを行うが、ただし返り値を返さない。 .SH 返り値 成功すると \fBfpurge\fP() は 0 を返す。 エラーが起こると \-1 を返し、 \fIerrno\fP を適切な値に設定する。 .SH エラー .TP \fBEBADF\fP \fIstream\fP がオープンされていない。 .SH 準拠 これらの関数は標準ではなく、よって移植性もない。 \fBfpurge\fP() 関数は 4.4BSD で導入されたが、Linux では利用できない。 \fB__fpurge\fP() 関数は Solaris で導入され、glibc 2.1.95 以降には存在している。 .SH 注意 通常は入力バッファーを捨てようとするのは間違っている。 .SH 関連項目 .\" .BR fclean (3), \fBfflush\fP(3), \fBsetbuf\fP(3), \fBstdio_ext\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。