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

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