1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
/* @(#) portable.h 2.3 87/12/26 12:25:49 */
/* @(#) portable.h 2.4 88/08/24 00:56:43 */
/* Definitions for portable I/O
The contents of this file are hereby released to the public domain.
-- Rahul Dhesi 1986/11/14
DEFINITIONS IN THIS FILE
Symbols:
Z_WRITE, Z_READ, and Z_RDWR are the parameters to supply to zooopen()
and to open an existing file for write, read, and read-write
respectively. Z_NEW is the parameter to supply to zoocreate() to
open an existing file or create a new file for write and read. The
file must be opened in binary format, with no newline translation of
any kind.
Macros or functions:
zgetc(x) reads a character from ZOOFILE x.
zputc(c, f) writes a character to a ZOOFILE x.
zputchar(c) writes a character c to standard output.
MKDIR(x) creates a directory x.
*/
/* Borland's Turbo C. */
#ifdef TURBOC
/* options for zooopen(), zoocreate() */
#define Z_WRITE "r+b"
#define Z_READ "rb"
#define Z_RDWR "r+b"
#define Z_NEW "w+b"
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
#define MKDIR(x) mkdir(x)
int mkdir PARMS((char *));
#endif
/* Microsoft C 3.0 */
#ifdef MSC
/* options for zooopen(), zoocreate() */
#define Z_WRITE "r+b"
#define Z_READ "rb"
#define Z_RDWR "r+b"
#define Z_NEW "w+b"
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
#define MKDIR(x) mkdir(x)
int mkdir (char *);
#endif
#ifdef VMS
#define Z_WRITE "r+"
#define Z_READ "r"
#define Z_RDWR "r+"
#define Z_NEW "w+b"
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
#define MKDIR(x) vmsmkdir (x, 0)
#endif
#ifdef GENERIC
/* **IX I/O, but MKDIR() is a no-operation */
#define NIX_IO /* standard **IX I/O */
#define MKDIR(x)
#endif
/* **IX System V release 2.1 */
#ifdef SYS_V
#define NIX_IO /* standard **IX I/O */
#define MKDIR(x) mkdir(x) /* define this in sysv.c */
#endif
/* Xenix */
#ifdef XENIX
#define NIX_IO /* standard **IX I/O */
#endif
/* 4.3BSD */
#ifdef BSD4_3
#define NIX_IO /* standard **IX I/O */
#define MKDIR(x) mkdir(x, 0777)
#endif
/* Amiga */
#ifdef MCH_AMIGA
# include "MCH_AMIGA NEEDS REVISION"
#endif
/* Standard **IX I/O definitions */
#ifdef NIX_IO
/* options for zooopen(), zoocreate() */
#define Z_WRITE "r+"
#define Z_READ "r"
#define Z_RDWR "r+"
#define Z_NEW "w+"
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
#endif /* NIX_IO */
|