home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_01
/
1001014b
< prev
next >
Wrap
Text File
|
1991-11-18
|
626b
|
27 lines
Listing 3 -- the file xfiles.c
/* _Files data object */
#include "xstdio.h"
/* standard error buffer */
static unsigned char ebuf[80];
/* the standard streams */
static FILE sin = { /* standard input */
_MOPENR, 0,
NULL, NULL, &sin._Cbuf,
&sin._Cbuf, NULL, &sin._Cbuf, };
static FILE sout = { /* standard output */
_MOPENW, 1,
NULL, NULL, &sout._Cbuf,
&sout._Cbuf, NULL, &sout._Cbuf, };
static FILE serr = { /* standard error */
_MOPENW|_MNBF, 2,
ebuf, ebuf + sizeof (ebuf), ebuf,
ebuf, NULL, ebuf, };
/* the array of stream pointers */
FILE *_Files[FOPEN_MAX] = {&sin, &sout, &serr};