aboutsummaryrefslogtreecommitdiff
path: root/src/stdio/__uflow.c
blob: 3cbc6b01d1aab6aa6b94ac2d59df6c4fd5a33f2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "stdio_impl.h"

/* This function assumes it will never be called if there is already
 * data buffered for reading. */

int __uflow(FILE *f)
{
	unsigned char c;
	if (!__toread(f) && f->read(f, &c, 1)==1) return c;
	return EOF;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif