clrerr -- Clear Error Flag and Return Status

SYNOPSIS
#include <lcio.h>
int clrerr(FILE *f);
DESCRIPTION
clrerr
clears the error flag and end-of-file flag for the FILE
object addressed by f
.
RETURN VALUE
clrerr
returns 0 if the error flag has been cleared or EOF
if it
could not be cleared. (The flag is not cleared if the operating system does
not permit further use of the file or if the file is closed.)
EXAMPLE
#include <lcio.h>
/* Clear the error flag for a file. */
int fixerr(FILE *f)
{
/* Show error flag cleared. */
if (clrerr(f) != 0){
printf("Error on %s is permanent. Program aborted.n", fnm(f));
abort();
}
return 0;
}
RELATED FUNCTIONS
clearerr
, ferror
SEE ALSO