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

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