Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(2)

fopen(3)

stdio(3)



  ferror(3)                           CLIX                           ferror(3)



  NAME

    ferror, feof, clearerr, fileno - Stream status inquiries

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <stdio.h>

    int ferror(
      FILE *stream );

    int feof(
      FILE *stream );

    void clearerr(
      FILE *stream );

    int fileno(
      FILE *stream );

  PARAMETERS

    stream   Points to a stream.

  DESCRIPTION

    The ferror() function returns nonzero when an I/O error has previously
    occurred reading from or writing to the named stream, otherwise zero.

    The feof() function returns nonzero when EOF has previously been detected
    reading the named input stream otherwise zero.

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

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

  EXAMPLES

    FILE *fp,*fopen();
    fp=fopen("scratch","w");
    fprintf(fp,"outputsomething\n");
    return(ferror(fp));


  NOTES



  2/94 - Intergraph Corporation                                              1






  ferror(3)                           CLIX                           ferror(3)



    All these functions are implemented as macros; they cannot be declared or
    redeclared.

  RELATED INFORMATION

    Functions:  open(2), fopen(3), stdio(3)
















































  2                                              Intergraph Corporation - 2/94




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