home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / INCLUDE.ZIP / IO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  3.6 KB  |  107 lines

  1. /*  io.h
  2.  
  3.     Definitions for low level I/O functions.
  4.  
  5.     Copyright (c) 1987, 1992 by Borland International
  6.     All Rights Reserved.
  7. */
  8.  
  9. #ifndef __IO_H
  10. #define __IO_H
  11.  
  12. #if !defined(___DEFS_H)
  13. #include <_defs.h>
  14. #endif
  15.  
  16. #if !defined(___NFILE_H)
  17. #include <_nfile.h>
  18. #endif
  19.  
  20. #define HANDLE_MAX  (_NFILE_)
  21.  
  22. extern  unsigned int    _Cdecl _nfile;
  23.  
  24. struct  ftime   {
  25.     unsigned    ft_tsec  : 5;   /* Two second interval */
  26.     unsigned    ft_min   : 6;   /* Minutes */
  27.     unsigned    ft_hour  : 5;   /* Hours */
  28.     unsigned    ft_day   : 5;   /* Days */
  29.     unsigned    ft_month : 4;   /* Months */
  30.     unsigned    ft_year  : 7;   /* Year */
  31. };
  32.  
  33. #define SEEK_CUR    1
  34. #define SEEK_END    2
  35. #define SEEK_SET    0
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. int  _Cdecl _FARFUNC access   (const char _FAR *path, int amode);
  41. #ifdef __IN_CHMOD
  42. int  _Cdecl _FARFUNC _chmod   ();
  43. #else
  44. int  _Cdecl _FARFUNC _chmod   (const char _FAR *__pathname, int __func, ... );
  45. #endif
  46. int  _Cdecl _FARFUNC chmod    (const char _FAR *__path, int __amode);
  47. int  _Cdecl _FARFUNC chsize   (int __handle, long __size);
  48. int  _CType _FARFUNC _close   (int __handle);
  49. int  _CType _FARFUNC close    (int __handle);
  50. int  _CType _FARFUNC _creat   (const char _FAR *__path, int __attribute);
  51. int  _CType _FARFUNC creat    (const char _FAR *__path, int __amode);
  52. int  _Cdecl _FARFUNC creatnew (const char _FAR *__path, int __mode); /* DOS 3.0 or later */
  53. int  _Cdecl _FARFUNC creattemp(char _FAR *__path, int __amode); /* DOS 3.0 or later */
  54. int  _Cdecl dup      (int __handle);
  55. int  _Cdecl dup2     (int __oldhandle, int __newhandle);
  56. int  _Cdecl _FARFUNC eof      (int __handle);
  57. long _Cdecl _FARFUNC filelength   (int __handle);
  58. int  _Cdecl getftime     (int __handle, struct ftime _FAR *__ftimep);
  59. #ifdef __IN_IOCTL
  60. int  _Cdecl ioctl    ();
  61. #else
  62. int  _Cdecl _FARFUNC ioctl    (int __handle, int __func, ...);
  63.         /* optional 3rd and 4th args are: void _FAR * __argdx, int argcx */
  64. #endif
  65.  
  66. int  _Cdecl isatty   (int __handle);
  67. int  _Cdecl _FARFUNC lock     (int __handle, long __offset, long __length);
  68. int  _Cdecl _FARFUNC locking  (int __handle, int __mode, long __length);
  69. long _CType lseek    (int __handle, long __offset, int __fromwhere);
  70. char _FAR * _FARFUNC _Cdecl mktemp( char _FAR *__template );
  71. #ifdef __IN_OPEN
  72. int  _Cdecl _FARFUNC open();
  73. #else
  74. int _Cdecl _FARFUNC open(const char _FAR *__path, int __access,... /*unsigned mode*/);
  75. #endif
  76. int  _CType _FARFUNC _open    (const char _FAR *__path, int __oflags);
  77. int  _CType _FARFUNC read     (int __handle, void _FAR *__buf, unsigned __len);
  78. int  _CType _read    (int __handle, void _FAR *__buf, unsigned __len);
  79. int  _CType remove   (const char _FAR *__path);
  80. int  _CType _FARFUNC rename   (const char _FAR *__oldname,const char _FAR *__newname);
  81. int  _Cdecl setftime (int __handle, struct ftime _FAR *__ftimep);
  82. int  _Cdecl _FARFUNC setmode  (int __handle, int __amode);
  83.  
  84. #ifdef __IN_SOPEN
  85. int  _Cdecl sopen();
  86. #else
  87. int  _Cdecl sopen    (const char _FAR *__path, int __access, int __shflag,
  88.                       ... /* unsigned mode */);
  89. #endif
  90. long _Cdecl tell     (int __handle);
  91. unsigned _Cdecl umask    (unsigned __cmask);
  92. int  _CType unlink   (const char _FAR *__path);
  93. int  _Cdecl _FARFUNC unlock   (int __handle, long __offset, long __length);
  94. int  _CType _FARFUNC _write   (int __handle, const void _FAR *__buf, unsigned __len);
  95. int  _CType _FARFUNC write    (int __handle, const void _FAR *__buf, unsigned __len);
  96. void _Cdecl _InitEasyWin(void);  /* Initialization call for Easy Windows */
  97.  
  98. #ifdef __MSC
  99. #define _dup(h) dup(h)
  100. #endif
  101.  
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105.  
  106. #endif  /* __IO_H */
  107.