Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ clearerr(3S) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(2)

fopen(3S)

FERROR(3S)  —  UNIX 3.0

NAME

ferror, feof, clearerr, fileno − stream status inquiries

SYNOPSIS

#include <stdio.h>

int feof (stream)
FILE ∗stream;

int ferror (stream)
FILE ∗stream

clearerr (stream)
FILE ∗stream

fileno(stream)
FILE ∗stream;

DESCRIPTION

Feof returns non-zero when end of file is read on the named input stream, otherwise zero.

Ferror returns non-zero when 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 indication on the named stream.

Fileno returns the integer file descriptor associated with the stream, see open(2).

Feof, ferror, and fileno are implemented as macros; they cannot be re-declared. 

SEE ALSO

open(2), fopen(3S). 

May 16, 1980

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