home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / FCNTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  1.6 KB  |  72 lines

  1. /*  fcntl.h
  2.  
  3.     Define flag values accessible to open.
  4.  
  5.     Copyright (c) Borland International 1987,1988,1990,1991
  6.     All Rights Reserved.
  7. */
  8.  
  9. #if !defined( __FCNTL_H )
  10. #define __FCNTL_H
  11.  
  12. #ifdef __DLL__
  13. #define _FAR far
  14. #else
  15. #define _FAR
  16. #endif
  17.  
  18. #if __STDC__
  19. #define _Cdecl
  20. #else
  21. #define _Cdecl  cdecl
  22. #endif
  23.  
  24. #ifndef __PAS__
  25. #define _CType _Cdecl
  26. #else
  27. #define _CType pascal
  28. #endif
  29.  
  30. extern int _Cdecl _fmode;
  31.  
  32. /* The first three can only be set by open */
  33.  
  34. #define O_RDONLY         1
  35. #define O_WRONLY         2
  36. #define O_RDWR           4
  37.  
  38. /* Flag values for open only */
  39.  
  40. #define O_CREAT     0x0100  /* create and open file */
  41. #define O_TRUNC     0x0200  /* open with truncation */
  42. #define O_EXCL      0x0400  /* exclusive open */
  43.  
  44. /* The "open flags" defined above are not needed after open, hence they
  45.    are re-used for other purposes when the file is running.  Sorry, its
  46.    getting crowded !
  47. */
  48. #define _O_RUNFLAGS 0x0700
  49. #define _O_EOF      0x0200 /* set when text file hits ^Z   */
  50.  
  51. /* a file in append mode may be written to only at its end.
  52. */
  53. #define O_APPEND    0x0800  /* to end of file */
  54.  
  55. /* MSDOS special bits */
  56.  
  57. #define O_CHANGED   0x1000  /* user may read these bits, but    */
  58. #define O_DEVICE    0x2000  /*   only RTL\io functions may touch.   */
  59. #define O_TEXT      0x4000  /* CR-LF translation    */
  60. #define O_BINARY    0x8000  /* no translation   */
  61.  
  62. /* DOS 3.x options */
  63.  
  64. #define O_NOINHERIT 0x80
  65. #define O_DENYALL   0x10
  66. #define O_DENYWRITE 0x20
  67. #define O_DENYREAD  0x30
  68. #define O_DENYNONE  0x40
  69.  
  70. #endif  /* __FCNTL_H */
  71.  
  72.