home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / Turbo C v3.0 / FCNTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-17  |  1.5 KB  |  60 lines

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