|
|
1.1 root 1: /* @(#)data.c 2.5 */
2: /*LINTLIBRARY*/
3: #include <stdio.h>
4:
5: #if !u370
6:
7: /* some slop is allowed at the end of the buffers in case an upset in
8: * the synchronization of _cnt and _ptr (caused by an interrupt or other
9: * signal) is not immediately detected.
10: */
11: unsigned char _sibuf[BUFSIZ+8], _sobuf[BUFSIZ+8];
12: /*
13: * Ptrs to start of preallocated buffers for stdin, stdout.
14: */
15: unsigned char *_stdbuf[] = { _sibuf, _sobuf };
16: #endif
17:
18: unsigned char _smbuf[_NFILE+1][_SBFSIZ];
19:
20: FILE _iob[_NFILE] = {
21: #if vax || u3b || u3b5
22: { 0, NULL, NULL, _IOREAD, 0},
23: { 0, NULL, NULL, _IOWRT, 1},
24: { 0, _smbuf[2], _smbuf[2], _IOWRT+_IONBF, 2},
25: #endif
26: #if pdp11
27: { NULL, 0, NULL, _IOREAD, 0},
28: { NULL, 0, NULL, _IOWRT, 1},
29: { _smbuf[2], 0, _smbuf[2], _IOWRT+_IONBF, 2},
30: #endif
31: #if u370
32: { NULL, 0, NULL, _IOREAD, 0},
33: { NULL, 0, NULL, _IOWRT, 1},
34: { NULL, 0, NULL, _IOWRT+_IONBF, 2},
35: #endif
36: };
37: /*
38: * Ptr to end of io control blocks
39: */
40: FILE *_lastbuf = { &_iob[_NFILE] };
41:
42: /*
43: * Ptrs to end of read/write buffers for each device
44: * There is an extra bufend pointer which corresponds to the dummy
45: * file number _NFILE, which is used by sscanf and sprintf.
46: */
47: unsigned char *_bufendtab[_NFILE+1] = { NULL, NULL, _smbuf[2]+_SBFSIZ, };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.