home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / famapi.zip / INCLUDE.ZIP / _OMODE.H < prev    next >
Text File  |  1993-06-13  |  3KB  |  62 lines

  1. //
  2. //      **************************************************************
  3. //       JdeBP C++ Library Routines      General Public Licence v1.00
  4. //          Copyright (c) 1991,1992  Jonathan de Boyne Pollard
  5. //      **************************************************************
  6. //
  7.  
  8. #if !defined(___OMODE_H_INCLUDED)
  9.  
  10. //
  11. //  OS/2 and DOS Open mode flags.  Used in <fcntl.h>, <share.h>
  12. //  and <stdio.h>.
  13. //
  14. //  The visible versions of these flags are the O_... flags.
  15. //
  16.  
  17. //
  18. // Required by POSIX
  19. //
  20. #define _O_RDONLY       0x0000  /* open for reading only            */
  21. #define _O_WRONLY       0x0001  /* open for writing only            */
  22. #define _O_RDWR         0x0002  /* open for reading and writing     */
  23. #define _O_ACCMODE      0x0003  /* Because the above need not be bitmasks */
  24. #define _O_CREAT        0x0100  /* create and open file             */
  25. #define _O_TRUNC        0x0200  /* open and truncate                */
  26. #define _O_EXCL         0x0400  /* open only if file doesn't already exist  */
  27.  
  28. //
  29. // Required by POSIX, but meaningless under MS-DOS
  30. //
  31. #define _O_APPEND       0x0008  /* writes done at eof               */
  32. #define _O_NOCTTY       0x0000  /* Do not assign ctty               */
  33. #define _O_NONBLOCK     0x0000  /* Non-blocking I/O                 */
  34.  
  35. //
  36. // Required by MS-DOS and OS/2
  37. //
  38. // Note that sharing flags are properly part of the POSIX.1 O_... set of
  39. // flags, because they may be passed in the oflag parameter to open() .
  40. //
  41. #define _O_COMPAT       0x0000  /* Compatibility sharing mode       */
  42. #define _O_DENYALL      0x0010  /* Deny reads and writes            */
  43. #define _O_DENYWRITE    0x0020  /* Deny writes                      */
  44. #define _O_DENYREAD     0x0030  /* Deny reads                       */
  45. #define _O_DENYNONE     0x0040  /* Deny nothing                     */
  46. #define _O_NOINHERIT    0x0080  /* child process doesn't inherit file   */
  47. #define _O_FAILONERR    0x2000  /* AutoFail on hard error           */
  48. #define _O_WRITETHRU    0x4000  /* Auto-commit every write          */
  49. #define _O_DASD         0x8000  /* DASD access (OS/2 only)          */
  50.  
  51. // Names used internally by the library
  52. #define _O_ANYSHARE     0x0070  /* Mask for sharing mode            */
  53. #define _O_EXTENDED     0xE0F0  /* Mask for all extended flags      */
  54. #define _O_RUNFLAGS     0x0F00  /* Flags that change when file is open */
  55.  
  56. // Names inherited from UNIX version 3, which are not in POSIX.
  57. #define _O_TEXT         0x0400  /* text mode (CRLF <--> LF translated)  */
  58. #define _O_BINARY       0x0800  /* binary mode (untranslated)           */
  59.  
  60. #define ___OMODE_H_INCLUDED
  61. #endif
  62.