musl/src/stdio/__uflow.c

12 lines
237 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "stdio_impl.h"
/* This function assumes it will never be called if there is already
* data buffered for reading. */
2011-02-12 00:22:29 -05:00
int __uflow(FILE *f)
{
unsigned char c;
if (!__toread(f) && f->read(f, &c, 1)==1) return c;
return EOF;
2011-02-12 00:22:29 -05:00
}