home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / FILES2.C < prev    next >
C/C++ Source or Header  |  1997-01-16  |  2KB  |  76 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - files2.c
  3.  *
  4.  * variables:
  5.  *      _openfd  - array of access modes for file/devices
  6.  *      _pidtab  - array of process IDs for _popen and _pclose
  7.  *      _handles - array of OS file handles
  8.  *----------------------------------------------------------------------*/
  9.  
  10. /* $Copyright: 1987$ */
  11. /* $Revision:   8.2  $        */
  12.  
  13. #include <io.h>
  14. #include <fcntl.h>
  15. #include <_nfile.h>
  16.  
  17. unsigned _RTLENTRY _EXPDATA _nfile = _NFILE_;
  18.  
  19. /*----------------------------------------------------------------------
  20.  * The following external reference forces _init_handles (in handles.c)
  21.  * to be called at startup.
  22.  */
  23. extern void _RTLENTRY _init_handles(void);
  24. #pragma startup       _init_handles 4
  25.  
  26. /*---------------------------------------------------------------------*
  27.  
  28. Name            _openfd
  29.  
  30. Usage           unsigned int _openfd[];
  31.  
  32. Declaration in  _io.h
  33.  
  34. Description     array of access modes for file/devices
  35.  
  36. *---------------------------------------------------------------------*/
  37.  
  38. unsigned int _RTLENTRY _openfd[_NFILE_] =
  39. {
  40.         O_RDONLY | O_TEXT | O_DEVICE,
  41.         O_WRONLY | O_TEXT | O_DEVICE,
  42.         O_WRONLY | O_TEXT | O_DEVICE
  43. };
  44.  
  45. /*---------------------------------------------------------------------*
  46.  
  47. Name            _pidtab
  48.  
  49. Usage           unsigned int _pidtab[];
  50.  
  51. Declaration in  _io.h
  52.  
  53. Description     array of process IDs for _popen and _pclose.
  54.  
  55. *---------------------------------------------------------------------*/
  56.  
  57. unsigned int _RTLENTRY _pidtab[_NFILE_];
  58.  
  59. /*---------------------------------------------------------------------*
  60.  
  61. Name            _handles
  62.  
  63. Usage           unsigned long _handles[];
  64.  
  65. Declaration in  _io.h
  66.  
  67. Description     array of file handles.  Given a low-level UNIX-type
  68.                 file handle, this table gives the OS file handle.
  69.                 Used on Win32, but not on OS/2.
  70.  
  71. *---------------------------------------------------------------------*/
  72.  
  73. #ifdef __WIN32__
  74. unsigned long _RTLENTRY _handles[_NFILE_];
  75. #endif
  76.