home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 12.ddi / WILD32.PAK / FILES2.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  2.1 KB  |  75 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.  
  12. #include <io.h>
  13. #include <fcntl.h>
  14. #include <_nfile.h>
  15.  
  16. unsigned _RTLENTRY _EXPDATA _nfile = _NFILE_;
  17.  
  18. /*----------------------------------------------------------------------
  19.  * The following external reference forces _init_handles (in handles.c)
  20.  * to be called at startup.
  21.  */
  22. extern void _RTLENTRY _init_handles(void);
  23. #pragma startup       _init_handles 4
  24.  
  25. /*---------------------------------------------------------------------*
  26.  
  27. Name            _openfd
  28.  
  29. Usage           unsigned int _openfd[];
  30.  
  31. Declaration in  _io.h
  32.  
  33. Description     array of access modes for file/devices
  34.  
  35. *---------------------------------------------------------------------*/
  36.  
  37. unsigned int _RTLENTRY _openfd[_NFILE_] =
  38. {
  39.         O_RDONLY | O_TEXT | O_DEVICE,
  40.         O_WRONLY | O_TEXT | O_DEVICE,
  41.         O_WRONLY | O_TEXT | O_DEVICE
  42. };
  43.  
  44. /*---------------------------------------------------------------------*
  45.  
  46. Name            _pidtab
  47.  
  48. Usage           unsigned int _pidtab[];
  49.  
  50. Declaration in  _io.h
  51.  
  52. Description     array of process IDs for _popen and _pclose.
  53.  
  54. *---------------------------------------------------------------------*/
  55.  
  56. unsigned int _RTLENTRY _pidtab[_NFILE_];
  57.  
  58. /*---------------------------------------------------------------------*
  59.  
  60. Name            _handles
  61.  
  62. Usage           unsigned long _handles[];
  63.  
  64. Declaration in  _io.h
  65.  
  66. Description     array of file handles.  Given a low-level UNIX-type
  67.                 file handle, this table gives the OS file handle.
  68.                 Used on Win32, but not on OS/2.
  69.  
  70. *---------------------------------------------------------------------*/
  71.  
  72. #ifdef __WIN32__
  73. unsigned long _RTLENTRY _handles[_NFILE_];
  74. #endif
  75.