home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / IO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  5.2 KB  |  155 lines

  1. /*  io.h
  2.  
  3.     Definitions for low level I/O functions.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __IO_H
  16. #define __IO_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22. #if !defined(___NFILE_H)
  23. #include <_nfile.h>
  24. #endif
  25.  
  26. #ifdef __FLAT__
  27. #if !defined(RC_INVOKED)
  28. #pragma option -a-
  29. #endif
  30. #endif
  31.  
  32. extern  unsigned    _RTLENTRY _EXPDATA _nfile;
  33.  
  34. #define HANDLE_MAX   (_NFILE_)
  35. struct  ftime   {
  36.     unsigned    ft_tsec  : 5;   /* Two second interval */
  37.     unsigned    ft_min   : 6;   /* Minutes */
  38.     unsigned    ft_hour  : 5;   /* Hours */
  39.     unsigned    ft_day   : 5;   /* Days */
  40.     unsigned    ft_month : 4;   /* Months */
  41.     unsigned    ft_year  : 7;   /* Year */
  42. };
  43.  
  44. #define SEEK_CUR    1
  45. #define SEEK_END    2
  46. #define SEEK_SET    0
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51. int  _RTLENTRYF _EXPFUNC access  (const char _FAR *path, int amode);
  52. #ifdef __IN_CHMOD
  53. int  _RTLENTRY  _EXPFUNC _rtl_chmod  ();
  54. int  _RTLENTRY  _EXPFUNC _chmod  ();
  55. #else
  56. int  _RTLENTRY  _EXPFUNC _rtl_chmod  (const char _FAR *__pathname, int __func, ... );
  57. int  _RTLENTRY  _EXPFUNC _chmod  (const char _FAR *__pathname, int __func, ... );
  58. #endif
  59. int  _RTLENTRY  _EXPFUNC chmod   (const char _FAR *__path, int __amode);
  60. int  _RTLENTRY  _EXPFUNC chsize  (int __handle, long __size);
  61. int  _RTLENTRYF _EXPFUNC _rtl_close  (int __handle);
  62. int  _RTLENTRYF _EXPFUNC _close  (int __handle);
  63. int  _RTLENTRYF _EXPFUNC close   (int __handle);
  64. int  _RTLENTRYF _EXPFUNC _rtl_creat  (const char _FAR *__path, int __attribute);
  65. int  _RTLENTRYF _EXPFUNC _creat  (const char _FAR *__path, int __attribute);
  66. int  _RTLENTRYF _EXPFUNC creat   (const char _FAR *__path, int __amode);
  67. int  _RTLENTRY  _EXPFUNC creatnew(const char _FAR *__path, int __mode); /* DOS 3.0 or later */
  68. int  _RTLENTRY  _EXPFUNC creattemp(char _FAR *__path, int __amode); /* DOS 3.0 or later */
  69. int  _RTLENTRY  _EXPFUNC32 dup   (int __handle);
  70. int  _RTLENTRY  _EXPFUNC32 dup2  (int __oldhandle, int __newhandle);
  71. int  _RTLENTRYF _EXPFUNC eof     (int __handle);
  72. long _RTLENTRYF _EXPFUNC filelength(int __handle);
  73. int  _RTLENTRY  _EXPFUNC32 getftime(int __handle, struct ftime _FAR *__ftimep);
  74.  
  75. #if defined(__FLAT__)
  76. long _RTLENTRY  _EXPFUNC _get_osfhandle(int __handle);
  77. int  _RTLENTRY  _EXPFUNC _open_osfhandle(long __osfhandle, int __oflag);
  78. #endif /* __FLAT__ */
  79.  
  80. #ifdef __IN_IOCTL
  81. int  _RTLENTRY           ioctl   ();
  82. #else
  83. int  _RTLENTRY  _EXPFUNC ioctl   (int __handle, int __func, ...);
  84.         /* optional 3rd and 4th args are: void _FAR * __argdx, int argcx */
  85. #endif
  86.  
  87. int  _RTLENTRY  _EXPFUNC32 isatty(int __handle);
  88. int  _RTLENTRY  _EXPFUNC   lock  (int __handle, long __offset, long __length);
  89. int  _RTLENTRY  _EXPFUNC   locking(int __handle, int __mode, long __length);
  90. long _RTLENTRYF _EXPFUNC32 lseek (int __handle, long __offset, int __fromwhere);
  91. char _FAR * _RTLENTRYF _EXPFUNC mktemp( char _FAR *__template );
  92. #ifdef __IN_OPEN
  93. int  _RTLENTRY  _EXPFUNC   open  ();
  94. #else
  95. int  _RTLENTRY  _EXPFUNC   open  (const char _FAR *__path, int __access,... /*unsigned mode*/);
  96. #endif
  97. int  _RTLENTRYF _EXPFUNC   _rtl_open (const char _FAR *__path, int __oflags);
  98. int  _RTLENTRYF _EXPFUNC   _open (const char _FAR *__path, int __oflags);
  99. int  _RTLENTRYF _EXPFUNC   read  (int __handle, void _FAR *__buf, unsigned __len);
  100. int  _RTLENTRYF _EXPFUNC32 _rtl_read (int __handle, void _FAR *__buf, unsigned __len);
  101. int  _RTLENTRYF _EXPFUNC32 _read (int __handle, void _FAR *__buf, unsigned __len);
  102. int  _RTLENTRYF _EXPFUNC32 remove(const char _FAR *__path);
  103. int  _RTLENTRYF _EXPFUNC   rename(const char _FAR *__oldname,const char _FAR *__newname);
  104. int  _RTLENTRY  _EXPFUNC32 setftime(int __handle, struct ftime _FAR *__ftimep);
  105. int  _RTLENTRY  _EXPFUNC   setmode(int __handle, int __amode);
  106.  
  107. #ifdef __IN_SOPEN
  108. int  _RTLENTRY  _EXPFUNC32 sopen ();
  109. #else
  110. int  _RTLENTRY  _EXPFUNC32 sopen (const char _FAR *__path, int __access, int __shflag,
  111.                       ... /* unsigned mode */);
  112. #endif
  113. long _RTLENTRY  _EXPFUNC32 tell  (int __handle);
  114. unsigned _RTLENTRY         umask (unsigned __cmask);
  115. int  _RTLENTRYF _EXPFUNC32 unlink(const char _FAR *__path);
  116. int  _RTLENTRY  _EXPFUNC   unlock(int __handle, long __offset, long __length);
  117. int  _RTLENTRYF _EXPFUNC   _rtl_write(int __handle, const void _FAR *__buf, unsigned __len);
  118. int  _RTLENTRYF _EXPFUNC   _write(int __handle, const void _FAR *__buf, unsigned __len);
  119. int  _RTLENTRYF _EXPFUNC   write (int __handle, const void _FAR *__buf, unsigned __len);
  120.  
  121. #if !defined(__FLAT__)
  122. void _RTLENTRY           InitEasyWin(void);  /* Initialization call for Easy Windows */
  123. #endif
  124.  
  125. #if defined(__MSC)
  126.  
  127. #define _lseek(__handle, __offset, __fromwhere) lseek(__handle, __offset, __fromwhere)
  128.  
  129. #endif
  130.  
  131. #ifdef __cplusplus
  132. }
  133. #endif
  134.  
  135. #if !defined(RC_INVOKED)
  136.  
  137. /* Obsolete functions */
  138. #pragma obsolete _chmod
  139. #pragma obsolete _close
  140. #pragma obsolete _creat
  141. #pragma obsolete _open
  142. #pragma obsolete _read
  143. #pragma obsolete _write
  144.  
  145. #endif
  146.  
  147. #ifdef __FLAT__
  148. #if !defined(RC_INVOKED)
  149. #pragma option -a. /*restore default packing */
  150. #endif
  151. #endif
  152.  
  153. #endif  /* __IO_H */
  154.  
  155.