home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / FCNTL.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  2KB  |  95 lines

  1. /*  fcntl.h
  2.  
  3.     Define flag values accessible to open.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 1.5
  9.  *
  10.  *      Copyright (c) 1987, 1994 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #if !defined(__FCNTL_H)
  16. #define __FCNTL_H
  17.  
  18. #if !defined(___DEFS_H)
  19. #include <_defs.h>
  20. #endif
  21.  
  22.  
  23. #if !defined(RC_INVOKED)
  24.  
  25. #if defined(__STDC__)
  26. #pragma warn -nak
  27. #endif
  28.  
  29. #endif  /* !RC_INVOKED */
  30.  
  31.  
  32.  
  33. #if defined(__cplusplus)
  34. extern "C" {
  35. #endif
  36. int _RTLENTRY _EXPFUNC _pipe(int *phandles, unsigned int psize, int textmode);
  37. #if defined(__cplusplus)
  38. }
  39. #endif
  40.  
  41. extern int _RTLENTRY _fmode;
  42.  
  43. /* The first three can only be set by open */
  44.  
  45. #define O_RDONLY    0
  46. #define O_WRONLY    1
  47. #define O_RDWR      2
  48. #define O_ACCMODE   3       /* mask for file access modes */
  49.  
  50. /* Flag values for open only */
  51.  
  52. #define O_CREAT     0x0100  /* create and open file */
  53. #define O_TRUNC     0x0200  /* open with truncation */
  54. #define O_EXCL      0x0400  /* exclusive open */
  55.  
  56. /* The "open flags" defined above are not needed after open, hence they
  57.    are re-used for other purposes when the file is running.  Sorry, it's
  58.    getting crowded !
  59. */
  60. #define _O_RUNFLAGS 0x0700
  61. #define _O_WRITABLE 0x0100 /* file is not read-only */
  62. #define _O_EOF      0x0200 /* set when text file hits ^Z   */
  63.  
  64. /* a file in append mode may be written to only at its end.
  65. */
  66. #define O_APPEND    0x0800  /* to end of file */
  67.  
  68. /* MSDOS special bits */
  69.  
  70. #define O_CHANGED   0x1000  /* user may read these bits, but    */
  71. #define O_DEVICE    0x2000  /*   only RTL\io functions may touch.   */
  72. #define O_TEXT      0x4000  /* CR-LF translation    */
  73. #define O_BINARY    0x8000  /* no translation   */
  74.  
  75. /* DOS 3.x options */
  76.  
  77. #define O_NOINHERIT 0x80
  78. #define O_DENYALL   0x10
  79. #define O_DENYWRITE 0x20
  80. #define O_DENYREAD  0x30
  81. #define O_DENYNONE  0x40
  82.  
  83.  
  84. #if !defined(RC_INVOKED)
  85.  
  86. #if defined(__STDC__)
  87. #pragma warn .nak
  88. #endif
  89.  
  90. #endif  /* !RC_INVOKED */
  91.  
  92.  
  93. #endif  /* __FCNTL_H */
  94.  
  95.