OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / ferror.3
1 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Chris Torek and the American National Standards Committee X3,
6 .\" on Information Processing Systems.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\"    must display the following acknowledgement:
18 .\"     This product includes software developed by the University of
19 .\"     California, Berkeley and its contributors.
20 .\" 4. Neither the name of the University nor the names of its contributors
21 .\"    may be used to endorse or promote products derived from this software
22 .\"    without specific prior written permission.
23 .\"
24 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" SUCH DAMAGE.
35 .\"
36 .\"     @(#)ferror.3    6.8 (Berkeley) 6/29/91
37 .\"
38 .\"
39 .\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu
40 .\" Added remark on EBADF for fileno, aeb, 2001-03-22
41 .\"
42 .\"*******************************************************************
43 .\"
44 .\" This file was generated with po4a. Translate the source file.
45 .\"
46 .\"*******************************************************************
47 .TH FERROR 3 2008\-08\-29 "" "Linux Programmer's Manual"
48 .SH 名前
49 clearerr, feof, ferror, fileno \- ストリームステータスのチェックとリセット
50 .SH 書式
51 \fB#include <stdio.h>\fP
52 .sp
53 \fBvoid clearerr(FILE *\fP\fIstream\fP\fB);\fP
54
55 \fBint feof(FILE *\fP\fIstream\fP\fB);\fP
56
57 \fBint ferror(FILE *\fP\fIstream\fP\fB);\fP
58
59 \fBint fileno(FILE *\fP\fIstream\fP\fB);\fP
60 .sp
61 .in -4n
62 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
63 .in
64 .sp
65 \fBfileno\fP(): _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
66 .SH 説明
67 関数 \fBclearerr\fP()  は \fIstream\fP で示されるストリームの EOF(end\-of\-file) 指示子とエラー指示子をクリアする。
68 .PP
69 関数 \fBfeof\fP()  は \fIstream\fP で示されるストリームの EOF 指示子をテストし、 セットされていれば 0 以外の数を返す。 EOF
70 指示子は、関数 \fBclearerr\fP()  によってのみクリアすることができる。
71 .PP
72 関数 \fBferror\fP()  は \fIstream\fP で示されるストリームのエラー指示子をテストし、 セットされていれば 0 以外の数を返す。
73 エラー指示子は、関数 \fBclearerr\fP()  によってのみリセットすることができる。
74 .PP
75 関数 \fBfileno\fP()  は、引数 \fIstream\fP を調べ、その整数のディスクリプターを返す。
76 .PP
77 これらの処理を停止せずに行いたいときは、 \fBunlocked_stdio\fP(3)  を参照のこと。
78 .SH エラー
79 これらの関数は失敗すべきではなく、また、外部変数 \fIerrno\fP に値をセットしない。 (しかし、 \fBfileno\fP()
80 関数の場合で、引数が有効なストリームでなかった場合、 関数は \-1 を返し、 \fIerrno\fP に \fBEBADF\fP を設定しなければならない。)
81 .SH 準拠
82 関数 \fBclearerr\fP(), \fBfeof\fP(), \fBferror\fP()  は C89 と C99 に準拠している。
83 .SH 関連項目
84 \fBopen\fP(2), \fBfdopen\fP(3), \fBstdio\fP(3), \fBunlocked_stdio\fP(3)