home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c021 / 7.img / INCLUDE.ZIP / IO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-04  |  2.9 KB  |  99 lines

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