/*
 *	Q/C V3.2 Standard I/O Definitions
 *		05/19/83
 */

#define ERROR	-1
#define EOF	-1
#define NULL	0
#define TRUE	1
#define FALSE	0

/* define the "type" file pointer */

#define FILE	struct _iob

/* define the file I/0 control block */

struct _iob {
	char	_flag;
	char	*_pch;
	int	_cnt;
	char	*_buf;
	int	_bufsize;
	char	_fd;
	};

/* standard I/O device names for redirection */

extern FILE *stdin,
	    *stdout,
	    *stderr;

/* I/O flag masks */

/*
#define READ	01
#define WRITE	02
#define APPEND	04
#define BINARY	010
#define BUF	020
#define USERBUF 040
*/

#define FEOF	0100
#define FERR	0200


#define feof(fp) (fp->_flag & FEOF)
#define ferror(fp) (fp->_flag & FERR)
#define clearerr(fp) (fp->_flag &= ~FERR)
#define fileno(fp) (fp->_fd)
