Category : C Source Code
Archive   : Z201SRC.ZIP
Filename : PORTABLE.H

 
Output of file : PORTABLE.H contained in archive : Z201SRC.ZIP
/* @(#) 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.
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 zputchar(c) putchar(c)
#define MKDIR(x) mkdir(x)
int mkdir (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 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 zputchar(c) putchar(c)
#define MKDIR(x) vmsmkdir (x, 0)
#endif

/* Datalight C. */
#ifdef DLC
#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
#define MKDIR(x) /* something is needed here */
#define NIX_IO
#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 zputchar(c) putchar(c)
#endif /* NIX_IO */


  3 Responses to “Category : C Source Code
Archive   : Z201SRC.ZIP
Filename : PORTABLE.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/