home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / yapp / part01 / files.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-29  |  1.0 KB  |  23 lines

  1. /* MOPEN.H: @(#)files.h 1.2 93/05/11 Copyright (c)1993 thalerd */
  2.  
  3. /* mopen() flags */
  4. #include <fcntl.h>
  5. #define O_PASSTHRU 0x00000FFF  /* actual flags to open() */
  6. #define O_PRIVATE  0x00001000  /* mode 0600 (vs. 0644)         */
  7. #define O_NOCREATE 0x00002000  /* don't create (must exist)    */
  8. #define O_LOCK     0x00004000  /* need to lock it?             */
  9. #define O_PIPE     0x00008000  /* is this a pipe?              */
  10. #define O_SILENT   0x00010000  /* is this a pipe?              */
  11. #define O_NOBLOCK  0x00020000  /* don't block, fail on no lock */
  12. #define O_R        (O_RDONLY|O_NOCREATE)              /* "r"  */
  13. #define O_W        (O_WRONLY|O_CREAT|O_TRUNC |O_LOCK) /* "w"  */
  14. #define O_A        (O_WRONLY|O_CREAT|O_APPEND|O_LOCK) /* "a"  */
  15. #define O_RPLUS    (O_RDWR  |O_NOCREATE      |O_LOCK) /* "r+" */
  16. #define O_WPLUS    (O_RDWR  |O_CREAT|O_TRUNC |O_LOCK) /* "w+" */
  17. #define O_APLUS    (O_RDWR  |O_CREAT|O_APPEND|O_LOCK) /* "a+" */
  18.  
  19. FILE *mopen  PROTO((char *file,long fl));
  20. int   mclose PROTO((FILE *fp));
  21. void  mcheck PROTO(());
  22. void  mdump  PROTO(());
  23.