Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(2)

fopen(3S)

FERROR(3S)  —  UNIX Programmer’s Manual

NAME

ferror, feof, clearerr, fileno − stream status inquiries

SYNOPSIS

#include <stdio.h>

int feof(FILE ∗stream);

int ferror(FILE ∗stream);

void clearerr(FILE ∗stream);

int fileno(FILE ∗stream);

DESCRIPTION

Feof returns non-zero when end of file is read on the named input stream, otherwise zero. Unless cleared by clearerr, the end-of-file indication lasts until the stream is closed.

Ferror returns non-zero when an error has occurred reading or writing the named stream, otherwise zero. Unless cleared by clearerr, the error indication lasts until the stream is closed.

Clearerr resets the error and end-of-file indicators on the named stream.

Fileno (which is not an ANSI C function) returns the integer file descriptor associated with the stream, see open(2).

SEE ALSO

open(2), fopen(3S)

ANSI C  —  August 1, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026