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