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