shithub: riscv

ref: 3f0f52ab69a8e821fcd1ac66b8d509ee3074c266
dir: /sys/src/ape/lib/ap/stdio/clearerr.c/

View raw version
/*
 * 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;
	}
}