ref: e0e2e9d81b4dbdabb7521dcc68e9f980f26cc3a9
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; } }