home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c060 / 5.ddi / FCNTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-29  |  1.3 KB  |  53 lines

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