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