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