ref: a0da5b973ffa098e428c574104e270b600770f9a
dir: /sys/src/libstdio/clearerr.c/
/* * pANS stdio -- clearerr */ #include "iolib.h" void clearerr(FILE *f){ switch(f->state){ case ERR: f->state=f->buf?RDWR:OPEN; break; case END: f->state=RDWR; break; } }