OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[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)