OSDN Git Service

1e862025c94b40e2b17145cdbf71eabda377d204
[linuxjm/LDP_man-pages.git] / draft / man3 / fpurge.3
1 .\" Copyright (C) 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved.
24 .\" Translated Sat 12 Jan 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
25 .\"
26 .TH FPURGE 3  2001-12-15 "" "Linux Programmer's Manual"
27 .\"O .SH NAME
28 .\"O fpurge, __fpurge \- purge a stream
29 .SH 名前
30 fpurge, __fpurge \- ストリームを一掃 (purge) する
31 .\"O .SH SYNOPSIS
32 .SH 書式
33 .nf
34 /* unsupported */
35 .B #include <stdio.h>
36 .sp
37 .BI "int fpurge(FILE *" stream );
38 .sp
39 /* supported */
40 .B #include <stdio.h>
41 .br
42 .B #include <stdio_ext.h>
43 .sp
44 .BI "void  __fpurge(FILE *" stream );
45 .fi
46 .\"O .SH DESCRIPTION
47 .SH 説明
48 .\"O The function
49 .\"O .BR fpurge ()
50 .\"O clears the buffers of the given stream.
51 .\"O For output streams this discards any unwritten output.
52 .\"O For input streams this discards any input read from the underlying object
53 .\"O but not yet obtained via
54 .\"O .BR getc (3);
55 .\"O this includes any text pushed back via
56 .\"O .BR ungetc (3).
57 .\"O See also
58 .\"O .BR fflush (3).
59 .BR fpurge ()
60 関数は、与えられたストリームのバッファをクリアする。
61 出力ストリームでこれを行うと、書き出されていない出力は捨てられる。
62 入力ストリームでこれを行うと、
63 下層にあるオブジェクトから読み込まれ
64 .BR getc (3)
65 による取得を待っている入力が、すべて捨てられる。
66 これには
67 .BR ungetc (3)
68 によって戻されたテキストも含まれる。
69 .BR fflush (3)
70 も参照のこと。
71 .LP
72 .\"O The function
73 .\"O .BR __fpurge ()
74 .\"O does precisely the same, but without returning a value.
75 .BR __fpurge ()
76 関数も全く同じことを行うが、ただし返り値を返さない。
77 .\"O .SH "RETURN VALUE"
78 .SH 返り値
79 .\"O Upon successful completion
80 .\"O .BR fpurge ()
81 .\"O returns 0.
82 .\"O On error, it returns \-1 and sets
83 .\"O .I errno
84 .\"O appropriately.
85 成功すると
86 .BR fpurge ()
87 は 0 を返す。
88 エラーが起こると \-1 を返し、
89 .I errno
90 を適切な値に設定する。
91 .\"O .SH ERRORS
92 .SH エラー
93 .TP
94 .B EBADF
95 .\"O .I stream
96 .\"O is not an open stream.
97 .I stream
98 がオープンされていない。
99 .\"O .SH "CONFORMING TO"
100 .SH 準拠
101 .\"O These functions are nonstandard and not portable.
102 .\"O The function
103 .\"O .BR fpurge ()
104 .\"O was introduced in 4.4BSD and is not available under Linux.
105 .\"O The function
106 .\"O .BR __fpurge ()
107 .\"O was introduced in Solaris, and is present in glibc 2.1.95 and later.
108 これらの関数は標準ではなく、よって移植性もない。
109 .BR fpurge ()
110 関数は 4.4BSD で導入されたが、Linux では利用できない。
111 .BR __fpurge ()
112 関数は Solaris で導入され、glibc 2.1.95 以降には存在している。
113 .\"O .SH NOTES
114 .SH 注意
115 .\"O Usually it is a mistake to want to discard input buffers.
116 通常は入力バッファを捨てようとするのは間違っている。
117 .\"O .SH "SEE ALSO"
118 .SH 関連項目
119 .\" .BR fclean (3),
120 .BR fflush (3),
121 .BR setbuf (3),
122 .BR stdio_ext (3)