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