summaryrefslogtreecommitdiff
path: root/src/stdio/fputc.c
blob: b551541d5294be423e9851d7b0a2a1b0bba0fc78 (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
40
#if 0

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

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

/** write a character to a file stream **/

int fputc(int c, FILE *stream)
{
	int ret = EOF;
	flockfile(stream);
	ret = putc_unlocked(c, stream);
	funlockfile(stream);
	return ret;
}

#endif

/***
writes the character ARGUMENT(c) (converted to an TYPE(unsigned char)) to
ARGUMENT(stream). The character is written at the current
file position indicator, which is advanced. If ARGUMENT(stream) does not support
seeking or was opened in append mode, the character is written to the end of
the stream.
***/

/*
RETURN_SUCCESS(ARGUMENT(c))
RETURN_FAILURE(CONSTANT(EOF))
STDC(1)
*/


#endif