|
|
1.1 root 1: /* stdio.h 1.5 83/08/11 */
2: #define BUFSIZ 1024
3: #define _NFILE 20
4: # ifndef FILE
5: extern struct _iobuf {
6: int _cnt;
7: char *_ptr;
8: char *_base;
9: int _bufsiz;
10: short _flag;
11: char _file;
12: } _iob[_NFILE];
13: # endif
14:
15: #define _IOREAD 01
16: #define _IOWRT 02
17: #define _IONBF 04
18: #define _IOMYBUF 010
19: #define _IOEOF 020
20: #define _IOERR 040
21: #define _IOSTRG 0100
22: #define _IOLBF 0200
23: #define _IORW 0400
24: #define NULL 0
25: #define FILE struct _iobuf
26: #define EOF (-1)
27:
28: #define stdin (&_iob[0])
29: #define stdout (&_iob[1])
30: #define stderr (&_iob[2])
31: #define getc(p) (--(p)->_cnt>=0? *(p)->_ptr++&0377:_filbuf(p))
32: #define getchar() getc(stdin)
33: #define putc(x,p) (--(p)->_cnt>=0? ((int)(*(p)->_ptr++=(unsigned)(x))):_flsbuf((unsigned)(x),p))
34: #define putchar(x) putc(x,stdout)
35: #define feof(p) (((p)->_flag&_IOEOF)!=0)
36: #define ferror(p) (((p)->_flag&_IOERR)!=0)
37: #define fileno(p) ((p)->_file)
38:
39: FILE *fopen();
40: FILE *fdopen();
41: FILE *freopen();
42: long ftell();
43: char *fgets();
44: #ifdef vax
45: char *sprintf(); /* too painful to do right */
46: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.