home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / LBR / BOOZ4CPM.ARK / OOZIO.H < prev    next >
Text File  |  1988-09-05  |  2KB  |  70 lines

  1. /* oozio.h */
  2.  
  3. /*
  4.     Minor changes for compilation with Aztec C 1.06D for CP/M
  5.     9/4/88
  6.     Bob Presswood
  7. */
  8.  
  9. /* Definitions for portable I/O.
  10.  
  11. Definitions are:
  12.  
  13. OPEN(x)     open file x for read
  14. CREATE(x)   create file x for read/write
  15.  
  16. Note that files opened by OPEN() and CREATE() must be opened in
  17. binary mode (not involving any LF <-> CR/LF translation).
  18.  
  19. The contents of this file are hereby released to the public domain.
  20.                                    -- Rahul Dhesi 1987/02/08
  21. */
  22.  
  23. #define AZTECCPM
  24.  
  25.  
  26. /* MIX C compiler for CP/M. */
  27. #ifdef   MIXC
  28. #define  CREATE(x)      (iofilter(0,0), creat (x, 0))
  29. #define  OPEN(x)        (iofilter (0,0), open (x, 0))
  30. #endif
  31.  
  32. /* Aztec C 1.06D for CP/M */
  33. #ifdef AZTECCPM
  34. #include <fcntl.h>
  35. #define CREATE(x) open(x,O_CREAT+O_WRONLY+O_TRUNC)
  36. #define OPEN(x) open(x,O_RDONLY)
  37. #endif
  38.  
  39. /* Microsoft C 3.0 under MS-DOS */
  40. #ifdef   MSC
  41. #include <fcntl.h>
  42. #include <sys/types.h>
  43. #include <sys/stat.h>
  44. #include <io.h>
  45. #define  CREATE(x) \
  46.    open (x, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, S_IREAD|S_IWRITE)
  47. #define  OPEN(x)     open (x, O_RDONLY|O_BINARY)
  48. #endif
  49.  
  50. /* Turbo C 1.0 under MS-DOS */
  51. #ifdef   TURBOC
  52. #include <fcntl.h>
  53. #include <sys/types.h>
  54. #include <sys/stat.h>
  55. #include <io.h>
  56. #define  CREATE(x) \
  57.    open (x, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, S_IREAD|S_IWRITE)
  58. #define  OPEN(x)     open (x, O_RDONLY|O_BINARY)
  59. #endif
  60.  
  61. /* **IX family I/O */
  62. #ifdef   NIX_IO
  63. #include <fcntl.h>
  64. #include <sys/types.h>
  65. #include <sys/stat.h>
  66. #define  CREATE(x) \
  67.    open (x, O_CREAT|O_WRONLY|O_TRUNC, S_IREAD|S_IWRITE)
  68. #define  OPEN(x)     open (x, O_RDONLY)
  69. #endif
  70.