ack/lang/cem/libcc.ansi/sys/stdio/data.c
David Given 9109d7af7f First stage in modularising FILE*. Refactor so that printf/scanf don't rely on
FILE* innards; allow plats to replace the entire emulated FILE* system.
2019-06-15 13:07:10 +02:00

33 lines
524 B
C

/*
* data.c - this is the initialization for the standard streams
*/
/* $Id$ */
#include <stdio.h>
#if ACKCONF_WANT_STDIO && ACKCONF_WANT_EMULATED_FILE
struct FILE __stdin = {
0, 0, _IOREAD, 0,
(unsigned char*)NULL, (unsigned char*)NULL,
};
struct FILE __stdout = {
0, 1, _IOWRITE, 0,
(unsigned char*)NULL, (unsigned char*)NULL,
};
struct FILE __stderr = {
0, 2, _IOWRITE | _IOLBF, 0,
(unsigned char*)NULL, (unsigned char*)NULL,
};
FILE* __iotab[FOPEN_MAX] = {
&__stdin,
&__stdout,
&__stderr,
0
};
#endif