'\" te .\" Copyright 1989 AT&T Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH FERROR 3C "Feb 17, 2005" .SH NAME ferror, feof, clearerr, fileno \- stream status inquiries .SH SYNOPSIS .LP .nf #include \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 box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Standard _ MT-Level MT-Safe .TE .SH SEE ALSO .sp .LP \fBopen\fR(2), \fBIntro\fR(3), \fBfopen\fR(3C), \fBstdio\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)