xref: /titanic_51/usr/src/man/man3c/ferror.3c (revision 8682d1ef2a0960ed5a9f05b9448eaa3e68ac931f)
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]
ferror 3C "17 Feb 2005" "SunOS 5.11" "Standard C Library Functions"
NAME
ferror, feof, clearerr, fileno - stream status inquiries
SYNOPSIS

#include <stdio.h>

int ferror(FILE *stream);

int feof(FILE *stream);

void clearerr(FILE *stream);

int fileno(FILE *stream);
DESCRIPTION

The ferror() function returns a non-zero value when an error has previously occurred reading from or writing to the named stream (see Intro(3)). It returns 0 otherwise.

The feof() function returns a non-zero value when EOF has previously been detected reading the named input stream. It returns 0 otherwise.

The clearerr() function resets the error indicator and EOF indicator to 0 on the named stream.

The fileno() function returns the integer file descriptor associated with the named stream; see open(2).

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStandard
MT-LevelMT-Safe
SEE ALSO

open(2), Intro(3), fopen(3C), stdio(3C), attributes(5), standards(5)