Annotation of 40BSD/lib/libpc/h00vars.h, revision 1.1.1.1

1.1       root        1: /* Copyright (c) 1979 Regents of the University of California */
                      2: 
                      3: /* sccsid[] = "@(#)h00vars.h 1.1 10/29/80"; */
                      4: 
                      5: #include <stdio.h>
                      6: 
                      7: #define PXPFILE                "pmon.out"
                      8: #define        BITSPERBYTE     8
                      9: #define        BITSPERLONG     (BITSPERBYTE * sizeof(long))
                     10: #define HZ             60
                     11: #define        TRUE            1
                     12: #define        FALSE           0
                     13: #define        MAXLVL          20
                     14: #define NAMSIZ         76
                     15: #define MAXFILES       32
                     16: #define PREDEF         2
                     17: #define STDLVL         ((struct iorec *)(0x7ffffff1))
                     18: #define GLVL           ((struct iorec *)(0x7ffffff0))
                     19: #define FILNIL         ((struct iorec *)(0))
                     20: #define INPUT          ((struct iorec *)(&input))
                     21: #define OUTPUT         ((struct iorec *)(&output))
                     22: #define ERR            ((struct iorec *)(&_err))
                     23: 
                     24: /*
                     25:  * runtime display structure
                     26:  */
                     27: struct display {
                     28:        char    *ap;
                     29:        char    *fp;
                     30: };
                     31: 
                     32: /*
                     33:  * formal routine structure
                     34:  */
                     35: struct formalrtn {
                     36:        long            (*entryaddr)();
                     37:        long            cbn;
                     38:        struct display  disp[2*MAXLVL];
                     39: };
                     40: 
                     41: /*
                     42:  * program variables
                     43:  */
                     44: extern struct display  _disply[MAXLVL];/* runtime display */
                     45: extern int             _argc;          /* number of passed args */
                     46: extern char            **_argv;        /* values of passed args */
                     47: extern long            _stlim;         /* statement limit */
                     48: extern long            _stcnt;         /* statement count */
                     49: extern char            *_maxptr;       /* maximum valid pointer */
                     50: extern char            *_minptr;       /* minimum valid pointer */
                     51: extern long            _pcpcount[];    /* pxp buffer */
                     52: 
                     53: /*
                     54:  * file structures
                     55:  */
                     56: struct iorechd {
                     57:        char            *fileptr;       /* ptr to file window */
                     58:        long            lcount;         /* number of lines printed */
                     59:        long            llimit;         /* maximum number of text lines */
                     60:        FILE            *fbuf;          /* FILE ptr */
                     61:        struct iorec    *fchain;        /* chain to next file */
                     62:        struct iorec    *flev;          /* ptr to associated file variable */
                     63:        char            *pfname;        /* ptr to name of file */
                     64:        short           funit;          /* file status flags */
                     65:        short           fblk;           /* index into active file table */
                     66:        long            fsize;          /* size of elements in the file */
                     67:        char            fname[NAMSIZ];  /* name of associated UNIX file */
                     68: };
                     69: 
                     70: struct iorec {
                     71:        char            *fileptr;       /* ptr to file window */
                     72:        long            lcount;         /* number of lines printed */
                     73:        long            llimit;         /* maximum number of text lines */
                     74:        FILE            *fbuf;          /* FILE ptr */
                     75:        struct iorec    *fchain;        /* chain to next file */
                     76:        struct iorec    *flev;          /* ptr to associated file variable */
                     77:        char            *pfname;        /* ptr to name of file */
                     78:        short           funit;          /* file status flags */
                     79:        short           fblk;           /* index into active file table */
                     80:        long            fsize;          /* size of elements in the file */
                     81:        char            fname[NAMSIZ];  /* name of associated UNIX file */
                     82:        char            buf[BUFSIZ];    /* I/O buffer */
                     83:        char            window[1];      /* file window element */
                     84: };
                     85: 
                     86: /*
                     87:  * unit flags
                     88:  */
                     89: #define        FDEF    0x80    /* 1 => reserved file name */
                     90: #define        FTEXT   0x40    /* 1 => text file, process EOLN */
                     91: #define        FWRITE  0x20    /* 1 => open for writing */
                     92: #define        FREAD   0x10    /* 1 => open for reading */
                     93: #define        TEMP    0x08    /* 1 => temporary file */
                     94: #define        SYNC    0x04    /* 1 => window is out of sync */
                     95: #define        EOLN    0x02    /* 1 => at end of line */
                     96: #define        EOFF    0x01    /* 1 => at end of file */
                     97: 
                     98: /*
                     99:  * file routines
                    100:  */
                    101: extern struct iorec    *GETNAME();
                    102: extern char            *MKTEMP();
                    103: extern char            *PALLOC();
                    104: 
                    105: /*
                    106:  * file record variables
                    107:  */
                    108: extern struct iorechd  _fchain;        /* head of active file chain */
                    109: extern struct iorec    *_actfile[];    /* table of active files */
                    110: extern long            _filefre;       /* last used entry in _actfile */
                    111: 
                    112: /*
                    113:  * standard files
                    114:  */
                    115: extern struct iorechd  input;
                    116: extern struct iorechd  output;
                    117: extern struct iorechd  _err;

unix.superglobalmegacorp.com

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