summaryrefslogtreecommitdiff
path: root/src/stdio/fgetc.c
blob: b3dde1bd40acc10ea92f5b78cb49a82376534faa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#if 0

#include <stdio.h>
#include "_stdio.h"

#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199506L
#undef getc_unlocked
#define getc_unlocked fgetc
#include "getc_unlocked.c"
#else

/** read a character from a file stream **/

int fgetc(FILE *stream)
{
	flockfile(stream);
	char c = getc_unlocked(stream);
	funlockfile(stream);
	/*
	RETURN_SUCCESS(the next character);
	RETURN_FAILURE(CONSTANT(EOF));
	*/
	return c;
}

#endif

/***
reads the next character from ARGUMENT(stream) as an
TYPE(unsigned char) converted to an TYPE(int). The file position indicator
of ARGUMENT(stream) is advanced.
***/

/*
STDC(1)
*/


#endif