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 >
Text File  |  1991-11-18  |  626b  |  27 lines

  1. Listing 3 -- the file xfiles.c
  2.  
  3.  
  4. /* _Files data object */
  5. #include "xstdio.h"
  6.  
  7. /* standard error buffer */
  8. static unsigned char ebuf[80];
  9.  
  10. /* the standard streams */
  11. static FILE sin = {    /* standard input */
  12.     _MOPENR, 0,
  13.     NULL, NULL, &sin._Cbuf,
  14.     &sin._Cbuf, NULL, &sin._Cbuf, };
  15. static FILE sout = {    /* standard output */
  16.     _MOPENW, 1,
  17.     NULL, NULL, &sout._Cbuf,
  18.     &sout._Cbuf, NULL, &sout._Cbuf, };
  19. static FILE serr = {    /* standard error */
  20.     _MOPENW|_MNBF, 2,
  21.     ebuf, ebuf + sizeof (ebuf), ebuf,
  22.     ebuf, NULL, ebuf, };
  23.  
  24. /* the array of stream pointers */
  25. FILE *_Files[FOPEN_MAX] = {&sin, &sout, &serr};
  26.  
  27.