home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / SOURCE / STARTUP / _FILE.C_ / _FILE.C
Encoding:
C/C++ Source or Header  |  1993-02-08  |  1.3 KB  |  71 lines

  1. /***
  2. *_file.c - perprocess file and buffer data declarations
  3. *
  4. *   Copyright (c) 1985-1992, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   file and buffer data declarations
  8. *
  9. *******************************************************************************/
  10.  
  11. /* Validate some assumptions */
  12. #ifdef _WINDOWS
  13. #error Not for use with _WINDOWS
  14. #endif
  15.  
  16. #include <stdio.h>
  17. #include <file2.h>
  18.  
  19. #define _NEAR_ near
  20.  
  21. /* Number of files */
  22.  
  23. #define _NFILE_ 20
  24.  
  25.  
  26. /*
  27.  * FILE and FILE2 descriptors; preset for standard i/o files.
  28.  */
  29.  
  30. FILE _NEAR_ _cdecl _iob[ _NFILE_ ] = {
  31.     /* ptr, cnt,    base,   flag,   file */
  32.     {
  33.     NULL,   0,  NULL,   _IOREAD,    0   }
  34.     ,
  35.     {
  36.     NULL,   0,  NULL,   _IOWRT, 1   }
  37.     ,
  38.     {
  39.     NULL,   0,  NULL,   _IOWRT, 2   }
  40.     ,
  41.     {
  42.     &(_iob2[3]._charbuf), 0, &(_iob2[3]._charbuf), (char)_IORW|_IONBF, 3 }
  43.     ,
  44.     {
  45.     NULL,   0,  NULL,   _IOWRT, 4   }
  46.     ,
  47. };
  48.  
  49.  
  50. FILE2 _NEAR_ _iob2[ _NFILE_ ] = {
  51.     /* flag2,  charbuf,  bufsiz */
  52.     {
  53.     0,  '\0', 0     }
  54.     ,
  55.     {
  56.     0,  '\0', 0     }
  57.     ,
  58.     {
  59.     0,  '\0', 0     }
  60.     ,
  61.     {
  62.     0,  '\0', 1     }
  63.     ,
  64.     {
  65.     0,  '\0', 0     }
  66.     ,
  67. };
  68.  
  69. /* pointer to end of descriptors */
  70. FILE * _NEAR_ _lastiob = &_iob[ _NFILE_ -1];
  71.