shithub: riscv

ref: d0ae2e369e0221e796f4b58255b21ce3592d80dc
dir: /sys/src/libstdio/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;
	}
}