#include <lcio.h> int clrerr(FILE *f);
clrerr
clears the error flag and end-of-file flag for the FILE
object addressed by f
.
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.)
#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; }
clearerr
, ferror
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.