OSDN Git Service

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