CONTENTS | INDEX | PREV | NEXT

 ferror

 NAME
  ferror - return ERROR condition for file pointer

 SYNOPSIS
  #include <stdio.h>

  int r = ferror(fp);                 (MACRO)
  FILE *fp;

 FUNCTION
  ferror returns the ERROR status of a file pointer.  The status is
  not changed by this macro.  0 is returned if no ERROR condition
  exists, non-zero if an ERROR condition exists (NOT necessarily 1 or
  -1, just non-zero).

 NOTE
  refer to the file_pointer manual page for general information

 INPUTS
  FILE *fp;   file pointer

 RESULTS
  int r;      0 if no ERROR condition exists, != 0 if an ERROR
          condition exists (not necessarily 1 or -1).

 SEE ALSO
  fopen, fclose, fread, fwrite, fgets, fputs