Annotation of coherent/a/usr/bob/korn/stdio.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Standard I/O library
                      3:  */
                      4: 
                      5: #ifndef        STDIO_H
                      6: #define        STDIO_H STDIO_H
                      7: 
                      8: typedef struct FILE {
                      9:        unsigned char   *_cp,           /* current character ptr */
                     10:                        *_dp,           /* ptr to start of data in buffer */
                     11:                        *_bp;           /* buffer pointer */
                     12:        int     _cc;                    /* character count */
                     13:        int     (*_gt)(),               /* getc function */
                     14:                (*_pt)();               /* putc function */
                     15:        char    _ff;                    /* flags; see below */
                     16:        char    _fd;                    /* file descriptor (reqd by reopen) */
                     17:        int     _uc;                    /* ungot char */
                     18: }      FILE;
                     19: #endif
                     20: 
                     21: #ifndef NULL
                     22: #define        NULL    ((char *)0)
                     23: #endif
                     24: #define        EOF     (-1)
                     25: #define        BUFSIZ  (1<<9)
                     26: #define        _NFILE  20
                     27: 
                     28: extern FILE    _stdin, _stdout, _stderr, *_fp[_NFILE];
                     29: 
                     30: /* Flags in _ff */
                     31: #define        _FINUSE 01
                     32: #define        _FSTBUF 02              /* setbuf was called */
                     33: #define        _FUNGOT 04              /* ungotten char present */
                     34: #define        _FEOF   0100
                     35: #define        _FERR   0200
                     36: 
                     37: #define        _ep(fp)         ((fp)->_bp+BUFSIZ)
                     38: 
                     39: char   *gets();
                     40: char   *fgets();
                     41: FILE   *fopen();
                     42: FILE   *freopen();
                     43: FILE   *fdopen();
                     44: FILE   *popen();
                     45: FILE   *_stropen();
                     46: long   ftell();
                     47: void   puts();
                     48: void   fputs();
                     49: void   setbuf();
                     50: char   *malloc();
                     51: char   *sbrk();
                     52: 
                     53: #define        getchar()       getc(stdin)
                     54: #define getc(f)                fgetc(f)
                     55: #define        putchar(c)      putc(c, stdout)
                     56: #define putc(c, fp)    fputc(c, fp)
                     57: #define        feof(fp)        ((fp)->_ff&(_FEOF|_FERR))
                     58: #define        ferror(fp)      ((fp)->_ff&_FERR)
                     59: #define        clearerr(fp)    ((fp)->_ff &= ~(_FERR|_FEOF))
                     60: #define        fileno(fp)      ((fp)->_fd)
                     61: #define        wdleng()        (16)
                     62: 
                     63: #define        stdin   (&_stdin)
                     64: #define        stdout  (&_stdout)
                     65: #define        stderr  (&_stderr)
                     66: 
                     67: /*
                     68:  * Temporary file directory manifests for System V compatibility
                     69:  */
                     70: #define P_tmpdir       "/tmp"          /* Default temporary directory */
                     71: #define L_tmpnam       64              /* Maximum length of temp file name */
                     72: 
                     73: /* end of stdio.h */

unix.superglobalmegacorp.com

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