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

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