Current File : //usr/man/man3c/ferror.3c
'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved
.TH ferror 3C "17 Feb 2005" "SunOS 5.11" "Standard C Library Functions"
.SH NAME
ferror, feof, clearerr, fileno \- stream status inquiries
.SH SYNOPSIS
.LP
.nf
#include <stdio.h>

\fBint\fR \fBferror\fR(\fBFILE *\fR\fIstream\fR);
.fi

.LP
.nf
\fBint\fR \fBfeof\fR(\fBFILE *\fR\fIstream\fR);
.fi

.LP
.nf
\fBvoid\fR \fBclearerr\fR(\fBFILE *\fR\fIstream\fR);
.fi

.LP
.nf
\fBint\fR \fBfileno\fR(\fBFILE *\fR\fIstream\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBferror()\fR function returns a non-zero value when an error has previously occurred reading from or writing to the named \fIstream\fR (see \fBIntro\fR(3)). It returns \fB0\fR otherwise.
.sp
.LP
The \fBfeof()\fR function returns a non-zero value when \fBEOF\fR has previously been detected reading the named input \fIstream\fR. It returns \fB0\fR otherwise.
.sp
.LP
The \fBclearerr()\fR function resets the error indicator and \fBEOF\fR indicator to 0 on the named \fIstream\fR.
.sp
.LP
The \fBfileno()\fR function returns the integer file descriptor associated with the named \fIstream\fR; see \fBopen\fR(2).
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
MT-LevelMT-Safe
_
StandardSee \fBstandards\fR(5).
.TE

.SH SEE ALSO
.sp
.LP
\fBopen\fR(2), \fBIntro\fR(3), \fBfopen\fR(3C), \fBstdio\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)