scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <stdio.h>
 2
 3#include "../libc.h"
 4
 5#undef fflush
 6
 7int
 8fflush(FILE *fp)
 9{
10	int err;
11
12	if (fp)
13		return _flsbuf(fp);
14
15	err = 0;
16	for (fp = __iob; fp < &__iob[FOPEN_MAX]; ++fp) {
17		if ((fp->flags & _IOWRITE) != 0 && _flsbuf(fp))
18			err = EOF;
19	}
20	return err;
21}