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