[an error occurred while processing this directive]
|
Вот пример stdio.h компилятора Aztec, в которм определены потоки ВВ.
/* Copyright (C) 1982 by Manx Software Systems and Thomas Fenwick */
#define fgetc getc
#define fputc putc
#define NULL 0
#define EOF -1
#define BUFSIZ 1024
/*
* Note: If you are using Macro-80 and change MAXSTREAM, the initialization
* of Cbuffs in getbuff.c should be updated accordingly.
* Also update libc.h
*/
#define MAXSTREAM 11#define _BUSY 0X01
#define _ALLBUF 0X02
#define _DIRTY 0X04
#define _EOF 0X08
#define _IOERR 0X10
#define _TXT 0X20typedef struct {
char *_bp; /* current position in buffer */
char *_bend; /* last character in buffer + 1 */
char *_buff; /* address of buffer */
unsigned char _flags; /* open mode, etc. */
unsigned char _unit; /* token returned by open */
char _bytbuf; /* single byte buffer for unbuffer streams */
int _buflen; /* length of buffer */
} FILE;extern FILE Cbuffs[MAXSTREAM];
extern char *Stdbufs; /* free list of buffers */
extern long ftell();
extern char agetc();#define stdin (&Cbuffs[0])
#define stdout (&Cbuffs[1])
#define stderr (&Cbuffs[2])
#define getchar() agetc(stdin)
#define putchar(c) aputc(c, stdout)
extern char feof(),
ferror(),
fileno(),
clearerr(),
isatty();
E-mail: info@telesys.ru