Annotation of coherent/b/lib/libc/XSTDIO/test/stdio.h.unix, revision 1.1.1.1

1.1       root        1: #define        i386    1
                      2: /*     Copyright (c) 1984 AT&T */
                      3: /*       All Rights Reserved   */
                      4: 
                      5: /*     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T     */
                      6: /*     The copyright notice above does not evidence any        */
                      7: /*     actual or intended publication of such source code.     */
                      8: 
                      9: #ident "@(#)stdio.h    2.3 - 88/05/27"
                     10: #ifndef _NFILE
                     11: #define _NFILE 60
                     12: 
                     13: #if u370
                     14: #define BUFSIZ 4096
                     15: #endif
                     16: #if vax || u3b || M32 || u3b15 || u3b5 || u3b2 || i286 || i386
                     17: #define BUFSIZ 1024
                     18: #endif
                     19: #if pdp11
                     20: #define BUFSIZ 512
                     21: #endif
                     22: 
                     23: /* buffer size for multi-character output to unbuffered files */
                     24: #define _SBFSIZ 8
                     25: 
                     26: typedef struct {
                     27: #if vax || u3b || M32 || u3b15 || u3b5 || u3b2 || i286 || i386
                     28:        int     _cnt;
                     29:        unsigned char   *_ptr;
                     30: #else
                     31:        unsigned char   *_ptr;
                     32:        int     _cnt;
                     33: #endif
                     34:        unsigned char   *_base;
                     35:        char    _flag;
                     36:        char    _file;
                     37: } FILE;
                     38: 
                     39: /*
                     40:  * _IOLBF means that a file's output will be buffered line by line
                     41:  * In addition to being flags, _IONBF, _IOLBF and _IOFBF are possible
                     42:  * values for "type" in setvbuf.
                     43:  */
                     44: #define _IOFBF         0000
                     45: #define _IOREAD                0001
                     46: #define _IOWRT         0002
                     47: #define _IONBF         0004
                     48: #define _IOMYBUF       0010
                     49: #define _IOEOF         0020
                     50: #define _IOERR         0040
                     51: #define _IOLBF         0100
                     52: #define _IORW          0200
                     53: 
                     54: #ifndef NULL
                     55: #if !i286 || SMALL_M || MIDDLE_M
                     56: #define NULL           0
                     57: #else
                     58: #define NULL           0L
                     59: #endif
                     60: #endif
                     61: 
                     62: #ifndef EOF
                     63: #define EOF            (-1)
                     64: #endif
                     65: 
                     66: #define stdin          (&_iob[0])
                     67: #define stdout         (&_iob[1])
                     68: #define stderr         (&_iob[2])
                     69: 
                     70: #define _bufend(p)     _bufendtab[(p)->_file]
                     71: #define _bufsiz(p)     (_bufend(p) - (p)->_base)
                     72: 
                     73: #ifndef lint
                     74: #define getc(p)                (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)
                     75: #define putc(x, p)     (--(p)->_cnt < 0 ? \
                     76:                        _flsbuf((unsigned char) (x), (p)) : \
                     77:                        (int) (*(p)->_ptr++ = (unsigned char) (x)))
                     78: #define getchar()      getc(stdin)
                     79: #define putchar(x)     putc((x), stdout)
                     80: #define clearerr(p)    ((void) ((p)->_flag &= ~(_IOERR | _IOEOF)))
                     81: #define feof(p)                ((p)->_flag & _IOEOF)
                     82: #define ferror(p)      ((p)->_flag & _IOERR)
                     83: #define fileno(p)      (p)->_file
                     84: #endif
                     85: 
                     86: extern FILE    _iob[_NFILE];
                     87: extern FILE    *fopen(), *fdopen(), *freopen(), *popen(), *tmpfile();
                     88: extern long    ftell();
                     89: extern void    rewind(), setbuf();
                     90: extern char    *ctermid(), *cuserid(), *fgets(), *gets(), *tempnam(), *tmpnam();
                     91: extern int     fclose(), fflush(), fread(), fwrite(), fseek(), fgetc(),
                     92:                getw(), pclose(), printf(), fprintf(), sprintf(),
                     93:                vprintf(), vfprintf(), vsprintf(), fputc(), putw(),
                     94:                puts(), fputs(), scanf(), fscanf(), sscanf(),
                     95:                setvbuf(), system(), ungetc();
                     96: extern unsigned char *_bufendtab[];
                     97: 
                     98: #define L_ctermid      9
                     99: #define L_cuserid      9
                    100: #define P_tmpdir       "/usr/tmp/"
                    101: #define L_tmpnam       (sizeof(P_tmpdir) + 15)
                    102: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.