DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦50f2aa8a0⟧ TextFile

    Length: 2176 (0x880)
    Types: TextFile
    Names: »LIBC.H«

Derivation

└─⟦b6190e06c⟧ Bits:30003304 Mix C version 2.1 til RC703
└─⟦b6190e06c⟧ Bits:30005327 Mix C version 2.1 til RC703
    └─ ⟦this⟧ »LIBC.H« 

TextFile

/* Copyright (C) 1981, 1982 by Manx Software Systems */

int errno;
#define FLT_FAULT	0		/* vector for floating-point faults */
#define	MAXVEC		4		/* reserve 4 vectors for now */
int (*SysvecÆMAXVECÅ)();

#define NULL 0
#define EOF -1
#define BUFSIZ 1024

#define _BUSY	0x01
#define _ALLBUF	0x02
#define _DIRTY	0x04
#define _EOF	0x08
#define _IOERR	0x10

typedef struct æ
	char *_bp;			/* current position in buffer */
	char *_bend;		/* last character in buffer + 1 */
	char *_buff;		/* address of buffer */
	char _flags;		/* open mode, etc. */
	char _unit;			/* token returned by open */
	char _bytbuf;		/* single byte buffer for unbuffer streams */
	int	_buflen;		/* length of buffer */
å FILE;

#define MAXSTREAM 11
FILE CbuffsÆMAXSTREAMÅ;
char *Stdbufs;			/* free list of buffers */
long ftell();

#define stdin (&CbuffsÆ0Å)
#define stdout (&CbuffsÆ1Å)
#define stderr (&CbuffsÆ2Å)
#define getchar() agetc(stdin)
#define putchar(c) aputc(c, stdout)
#define feof(fp) (((fp)->_flags&_EOF)!=0)
#define ferror(fp) (((fp)->_flags&_IOERR)!=0)
#define clearerr(fp) ((fp)->_flags &= ü(_IOERRø_EOF))
#define fileno(fp) ((fp)->_unit)

#define O_RDONLY	0
#define O_WRONLY	1
#define O_RDWR		2
#define O_CREAT		0x0100
#define O_TRUNC		0x0200
#define O_EXCL		0x0400



/*
 * device control structure and blocks
 */
struct device æ
	char d_read;
	char d_write;
	char d_ioctl;	/* used by character special devices (eg CON:) */
	char d_seek;	/* used by random I/O devices (eg: a file) */
	int (*d_open)();	/* for special open handling */
å;
struct device condev,bdosout,bdosin,filedev;
/*
 * device table, contains names and pointers to device entries
 */
typedef char *arg;
struct devtabl æ
	char *d_name;
	struct device *d_dev;
	arg d_arg;
å;
#define DVTBLLEN 11 
struct devtabl devtablÆDVTBLLENÅ;

/*
 * channel table: relates fd's to devices
 */
struct channel æ
	char c_read;
	char c_write;
	char c_ioctl;
	char c_seek;
	int (*c_close)();
	arg c_arg;
å ;
#define MAXCHAN	11	/* maximum number of I/O channels */
struct channel chantabÆMAXCHANÅ;

«eof»