home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / IO.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  7KB  |  212 lines

  1. /*  io.h
  2.  
  3.     Definitions for low level I/O functions.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 8.0
  9.  *
  10.  *      Copyright (c) 1987, 1997 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14. /* $Revision:   8.11  $ */
  15.  
  16. #ifndef __IO_H
  17. #define __IO_H
  18.  
  19. #if !defined(___DEFS_H)
  20. #include <_defs.h>
  21. #endif
  22.  
  23. #if !defined(___NFILE_H)
  24. #include <_nfile.h>
  25. #endif
  26.  
  27.  
  28. #if !defined(RC_INVOKED)
  29.  
  30. #if defined(__STDC__)
  31. #pragma warn -nak
  32. #endif
  33.  
  34. #pragma pack(push, 1)
  35.  
  36. #endif  /* !RC_INVOKED */
  37.  
  38.  
  39. #ifndef __cplusplus
  40. #if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED)
  41. #define _WCHAR_T
  42. #define _WCHAR_T_DEFINED  /* For WINDOWS.H */
  43. typedef unsigned short wchar_t;
  44. #endif
  45. #endif
  46.  
  47. extern  unsigned    _RTLENTRY _EXPDATA _nfile;
  48.  
  49. #define HANDLE_MAX   (_NFILE_)
  50. struct  ftime   {
  51.     unsigned    ft_tsec  : 5;   /* Two second interval */
  52.     unsigned    ft_min   : 6;   /* Minutes */
  53.     unsigned    ft_hour  : 5;   /* Hours */
  54.     unsigned    ft_day   : 5;   /* Days */
  55.     unsigned    ft_month : 4;   /* Months */
  56.     unsigned    ft_year  : 7;   /* Year */
  57. };
  58.  
  59. #define SEEK_CUR    1
  60. #define SEEK_END    2
  61. #define SEEK_SET    0
  62.  
  63. #ifdef __cplusplus
  64. extern "C" {
  65. #endif
  66. int  _RTLENTRYF _EXPFUNC access  (const char _FAR *path, int amode);
  67. #ifdef __IN_CHMOD
  68. int  _RTLENTRY  _EXPFUNC _rtl_chmod  ();
  69. int  _RTLENTRY  _EXPFUNC _chmod  ();
  70. #else
  71. int  _RTLENTRY  _EXPFUNC _rtl_chmod (const char _FAR *__pathname, int __func, ... );
  72. int  _RTLENTRY  _EXPFUNC _chmod     (const char _FAR *__pathname, int __func, ... );
  73. #endif
  74. int  _RTLENTRY  _EXPFUNC chmod   (const char _FAR *__path, int __amode);
  75. int  _RTLENTRY  _EXPFUNC chsize  (int __handle, long __size);
  76. int  _RTLENTRYF _EXPFUNC _rtl_close  (int __handle);
  77. int  _RTLENTRYF _EXPFUNC _close  (int __handle);
  78. int  _RTLENTRYF _EXPFUNC close   (int __handle);
  79. int  _RTLENTRYF _EXPFUNC _rtl_creat  (const char _FAR *__path, int __attribute);
  80. int  _RTLENTRYF _EXPFUNC _creat  (const char _FAR *__path, int __attribute);
  81. int  _RTLENTRYF _EXPFUNC creat   (const char _FAR *__path, int __amode);
  82. int  _RTLENTRY  _EXPFUNC creatnew(const char _FAR *__path, int __mode); /* DOS 3.0 or later */
  83. int  _RTLENTRY  _EXPFUNC creattemp(char _FAR *__path, int __amode); /* DOS 3.0 or later */
  84. int  _RTLENTRY  _EXPFUNC32 dup   (int __handle);
  85. int  _RTLENTRY  _EXPFUNC32 dup2  (int __oldhandle, int __newhandle);
  86. int  _RTLENTRYF _EXPFUNC eof     (int __handle);
  87. long _RTLENTRYF _EXPFUNC filelength(int __handle);
  88. int  _RTLENTRY  _EXPFUNC32 getftime(int __handle, struct ftime _FAR *__ftimep);
  89.  
  90. #if defined(__FLAT__)
  91. int  _RTLENTRY _EXPFUNC _waccess   (const wchar_t *__path, int __amode);
  92. int  _RTLENTRY _EXPFUNC _wchmod    (const wchar_t *__path, int __amode);
  93. int  _RTLENTRY _EXPFUNC _wrtl_chmod(const wchar_t *__pathname, int __func, ... );
  94. int  _RTLENTRY _EXPFUNC _wcreat    (const wchar_t *__path, int __amode);
  95. int  _RTLENTRY _EXPFUNC _wrtl_creat(const wchar_t *__path, int __attribute);
  96. int  _RTLENTRY _EXPFUNC _wunlink   (const wchar_t *__path);
  97. int  _RTLENTRY _EXPFUNC _wremove   (const wchar_t * __path);
  98. int  _RTLENTRY _EXPFUNC _wrename   (const wchar_t *__oldname,const wchar_t *__newname);
  99. int  _RTLENTRY _EXPFUNC _wrtl_open (const wchar_t *__path, int __oflags);
  100. wchar_t   * _RTLENTRY  _EXPFUNC     _wmktemp(wchar_t *__template);
  101. #endif
  102.  
  103. #if defined(__OS2__)
  104. int  _RTLENTRY  _EXPFUNC _truncate(const char *__path, long __size);
  105. int  _RTLENTRYF _EXPFUNC _ftruncate(int __handle, long __size);
  106. #endif  /* __OS2__ */
  107.  
  108. #if defined(__WIN32__)
  109. long _RTLENTRY  _EXPFUNC _get_osfhandle(int __handle);
  110. int  _RTLENTRY  _EXPFUNC _open_osfhandle(long __osfhandle, int __oflag);
  111. #endif  /* __FLAT__ */
  112.  
  113. #ifdef __IN_IOCTL
  114. int  _RTLENTRY           ioctl   ();
  115. #else
  116. int  _RTLENTRY  _EXPFUNC ioctl   (int __handle, int __func, ...);
  117.         /* optional 3rd and 4th args are: void _FAR * __argdx, int argcx */
  118. #endif
  119.  
  120. int  _RTLENTRY  _EXPFUNC   isatty (int __handle);
  121. int  _RTLENTRY  _EXPFUNC   lock   (int __handle, long __offset, long __length);
  122. int  _RTLENTRY  _EXPFUNC   locking(int __handle, int __mode, long __length);
  123. long _RTLENTRY  _EXPFUNC   lseek  (int __handle, long __offset, int __fromwhere);
  124. char * _RTLENTRY  _EXPFUNC   _mktemp(char *__template );
  125.  
  126. #ifdef __IN_OPEN
  127. int  _RTLENTRY  _EXPFUNC   open  ();
  128. #ifdef __FLAT__
  129. int  _RTLENTRY  _EXPFUNC   _wopen  ();
  130. #endif
  131. #else
  132. int  _RTLENTRY  _EXPFUNC   open  (const char _FAR *__path, int __access,... /*unsigned mode*/);
  133. #endif
  134. #ifdef __FLAT__
  135. int  _RTLENTRY  _EXPFUNC   _wopen(const wchar_t *__path, int __access,... /*unsigned mode*/);
  136. #endif
  137. int  _RTLENTRYF _EXPFUNC   _rtl_open (const char _FAR *__path, int __oflags);
  138. int  _RTLENTRYF _EXPFUNC   _open (const char _FAR *__path, int __oflags);
  139. int  _RTLENTRYF _EXPFUNC   read  (int __handle, void _FAR *__buf, unsigned __len);
  140. int  _RTLENTRYF _EXPFUNC32 _rtl_read (int __handle, void _FAR *__buf, unsigned __len);
  141. int  _RTLENTRYF _EXPFUNC32 _read (int __handle, void _FAR *__buf, unsigned __len);
  142. int  _RTLENTRYF _EXPFUNC32 remove(const char _FAR *__path);
  143. int  _RTLENTRYF _EXPFUNC   rename(const char _FAR *__oldname,const char _FAR *__newname);
  144. int  _RTLENTRY  _EXPFUNC32 setftime(int __handle, struct ftime _FAR *__ftimep);
  145. int  _RTLENTRY  _EXPFUNC   setmode(int __handle, int __amode);
  146.  
  147. #ifdef __IN_SOPEN
  148. int  _RTLENTRY  _EXPFUNC32 _sopen ();
  149. int  _RTLENTRY  _EXPFUNC32 _wsopen ();
  150. #else
  151. int  _RTLENTRY  _EXPFUNC _sopen (const char *__path, int __access, int __shflag,
  152.                       ... /* unsigned mode */);
  153. #if defined(__FLAT__)
  154. int  _RTLENTRY  _EXPFUNC32 _wsopen (const wchar_t *__path, int __access, int __shflag,
  155.                       ... /* unsigned mode */);
  156. #endif
  157. #endif
  158. long _RTLENTRY  _EXPFUNC32 tell  (int __handle);
  159. unsigned _RTLENTRY         umask (unsigned __cmask);
  160. int  _RTLENTRYF _EXPFUNC32 unlink(const char _FAR *__path);
  161. int  _RTLENTRY  _EXPFUNC   unlock(int __handle, long __offset, long __length);
  162. int  _RTLENTRYF _EXPFUNC   _rtl_write(int __handle, const void _FAR *__buf, unsigned __len);
  163. int  _RTLENTRYF _EXPFUNC   _write(int __handle, const void _FAR *__buf, unsigned __len);
  164. int  _RTLENTRYF _EXPFUNC   write (int __handle, const void _FAR *__buf, unsigned __len);
  165. #if !defined(__STDC__)
  166. char  * _RTLENTRY _EXPFUNC mktemp( char *__template );
  167. #ifdef __IN_SOPEN
  168. int  _RTLENTRY  _EXPFUNC sopen ();
  169. #else
  170. int  _RTLENTRY _EXPFUNC sopen (const char *__path, int __access, int __shflag,
  171.                       ... /* unsigned mode */);
  172. #endif
  173. #endif
  174.  
  175. #if !defined(__FLAT__)
  176.  /* Initialization call for Easy Windows */
  177. void _RTLENTRY             _InitEasyWin(void);
  178. #endif
  179.  
  180. #if defined(__MSC)
  181. #define _lseek(__handle, __offset, __fromwhere) lseek(__handle, __offset, __fromwhere)
  182. #define _dup(h) dup(h)
  183. #endif
  184.  
  185. #ifdef __cplusplus
  186. }
  187. #endif
  188.  
  189.  
  190. #if !defined(RC_INVOKED)
  191.  
  192. /* Obsolete functions */
  193. #pragma obsolete _chmod
  194. #pragma obsolete _close
  195. #pragma obsolete _creat
  196. #pragma obsolete _open
  197. #pragma obsolete _read
  198. #pragma obsolete _write
  199.  
  200. /* restore default packing */
  201. #pragma pack(pop)
  202.  
  203. #if defined(__STDC__)
  204. #pragma warn .nak
  205. #endif
  206.  
  207. #endif  /* !RC_INVOKED */
  208.  
  209.  
  210. #endif  /* __IO_H */
  211.  
  212.