Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1exp 11/4/83; site ihuxl.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxl!houxm!ihnp4!ihuxl!dcn From: dcn@ihuxl.UUCP Newsgroups: net.sources Subject: Aztec C source - stdio.h Message-ID: <728@ihuxl.UUCP> Date: Fri, 11-Nov-83 17:26:20 EST Article-I.D.: ihuxl.728 Posted: Fri Nov 11 17:26:20 1983 Date-Received: Sun, 13-Nov-83 07:52:31 EST Organization: AT&T Bell Labs, Naperville, Il Lines: 65 /* This version of stdio.h has extra defines at the end for my tools. * I realize this is probably bad programming practice, but at least * all the tools will share the same constants. */ /* Copyright (c) 1982 by Manx Software Systems */ /* Copyright (c) 1982 by Jim Goodnow II */ #define _NOBUFS 8 #define _IOREAD 0x1 #define _IOWRITE 0x2 #define _IODTY 0x4 #define _IOINUSE 0x8 #define _IOBUFFED 0x10 #define _IOERROR 0x20 #define _IOEOF 0x40 int errno; struct _iobuff { char *cp; char *end; char *base; int fd; int mode; int bufsiz; long pos; }; #define FILE struct _iobuff extern struct _iobuff _iob[]; #define stdin (&_iob[0]) #define stdout (&_iob[1]) #define stderr (&_iob[2]) #define _BUFSIZE 256 #define putchar(c) aputc(c, stdout) #define getchar() agetc(stdin) #define fileno(b) (b->fd) #define fflush(b) (_flsh(-1, (b))) #define ferror(b) (((b)->mode & _IOERROR) != 0) #define feof(b) ((b)->mode & _IOEOF) #define EOF (-1) #define NULL (0) long ftell(); #define E_NOBUFS -50 /* no stdio buffers available */ #define E_BADMODE -51 /* attempted to read/write with bad fopen mode*/ #define E_SKMODE -52 /* invalid seek mode */ #define E_BADSK -53 /* seeked off the beg of file */ /* extra defines for tools */ #define TRUE 1 #define FALSE 0 #define MAXLINE 256 #define BLANK ' ' #define TAB '\t' #define NL '\n' #define EOS '\0'