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

#include <stdio.h>

/** specify file stream buffer **/

void setbuf(FILE * restrict stream, char * restrict buf)
{
	if (buf) {
		setvbuf(stream, buf, _IOFBF, BUFSIZ);
	} else {
		setvbuf(stream, NULL, _IONBF, 0);
	}
}

/***
sets the buffer for ARGUMENT(stream) to ARGUMENT(buf). The buffer must hold
at least CONSTANT(BUFSIZ) characters. It is the equivalent of:
	LITERAL(setvbuf(stream, buf, _IOFBF, BUFSIZ);)

If ARGUMENT(buf) is CONSTANT(NULL), ARGUMENT(stream) will become unbuffered. It is the
equivalent of:
	LITERAL(setvbuf(stream, NULL, _IONBF, 0);)
***/

/*
STDC(1)
*/


#endif