stdout.c 334 字节
Newer Older
R
Rich Felker 已提交
1 2 3 4 5 6 7 8 9
#include "stdio_impl.h"

static unsigned char buf[BUFSIZ+UNGET];
static FILE f = {
	.buf = buf+UNGET,
	.buf_size = sizeof buf-UNGET,
	.fd = 1,
	.flags = F_PERM | F_NORD,
	.lbf = '\n',
10
	.write = __stdout_write,
R
Rich Felker 已提交
11 12
	.seek = __stdio_seek,
	.close = __stdio_close,
13
	.lock = -1,
R
Rich Felker 已提交
14 15
};
FILE *const stdout = &f;
16
FILE *volatile __stdout_used = &f;