summaryrefslogtreecommitdiff
path: root/src/stdio/__uflow.c
blob: 544dda982dbf0abf4ae703825d91e84ffd2bd94a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include "stdio_impl.h"

/* This function will never be called if there is already data
 * buffered for reading. Thus we can get by with very few branches. */

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