about summary refs log tree commit diff
path: root/src/stdio/fgetc.c
blob: 3a7f1e304850f46c5076577750126eb8fe20354d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "stdio_impl.h"

int fgetc(FILE *f)
{
	int c;
	FLOCK(f);
	c = f->rpos < f->rstop ? *f->rpos++ : __uflow(f);
	FUNLOCK(f);
	return c;
}