Annotation of cci/usr/src/usr.bin/f77/f77pass2/pass1.h, revision 1.1

1.1     ! root        1: /*     pass1.h 4.1     85/03/19        */
        !             2: 
        !             3: #ifndef _PASS1_
        !             4: #define        _PASS1_
        !             5: 
        !             6: #include "macdefs.h"
        !             7: #include "manifest.h"
        !             8: 
        !             9: /*
        !            10:  * Symbol table definition.
        !            11:  */
        !            12: struct symtab {
        !            13: #ifndef FLEXNAMES
        !            14:        char    sname[NCHNAM];
        !            15: #else
        !            16:        char    *sname;
        !            17: #endif
        !            18:        TWORD   stype;          /* type word */
        !            19:        char    sclass;         /* storage class */
        !            20:        char    slevel;         /* scope level */
        !            21:        char    sflags;         /* flags, see below */
        !            22:        int     offset;         /* offset or value */
        !            23:        short   dimoff;         /* offset into the dimension table */
        !            24:        short   sizoff;         /* offset into the size table */
        !            25:        short   suse;           /* line number of last use of the variable */
        !            26: };
        !            27: 
        !            28: /*
        !            29:  * Storage classes
        !            30:  */
        !            31: #define SNULL          0               /* initial value */
        !            32: #define AUTO           1               /* automatic (on stack) */
        !            33: #define EXTERN         2               /* external reference */
        !            34: #define STATIC         3               /* static scope */
        !            35: #define REGISTER       4               /* register requested */
        !            36: #define EXTDEF         5               /* external definition */
        !            37: #define LABEL          6               /* label definition */
        !            38: #define ULABEL         7               /* undefined label reference */
        !            39: #define MOS            8               /* member of structure */
        !            40: #define PARAM          9               /* parameter */
        !            41: #define STNAME         10              /* structure name */
        !            42: #define MOU            11              /* member of union */
        !            43: #define UNAME          12              /* union name */
        !            44: #define TYPEDEF                13              /* typedef name */
        !            45: #define FORTRAN                14              /* fortran function */
        !            46: #define ENAME          15              /* enumeration name */
        !            47: #define MOE            16              /* member of enumeration */
        !            48: #define UFORTRAN       17              /* undefined fortran reference */
        !            49: #define USTATIC                18              /* undefined static reference */
        !            50: 
        !            51: /* field size is ORed in */
        !            52: #define FIELD          0100
        !            53: #define FLDSIZ         077
        !            54: #ifndef BUG1
        !            55: extern char *scnames();
        !            56: #endif
        !            57: 
        !            58: /*
        !            59:  * Symbol table flags
        !            60:  */
        !            61: #define SMOS           01              /* member of structure */
        !            62: #define SHIDDEN                02              /* hidden in current scope */
        !            63: #define SHIDES         04              /* hides symbol in outer scope */
        !            64: #define SSET           010             /* symbol assigned to */
        !            65: #define SREF           020             /* symbol referenced */
        !            66: #define SNONUNIQ       040             /* non-unique structure member */
        !            67: #define STAG           0100            /* structure tag name */
        !            68: 
        !            69: /*
        !            70:  * Location counters
        !            71:  */
        !            72: #define PROG           0               /* program segment */
        !            73: #define DATA           1               /* data segment */
        !            74: #define ADATA          2               /* array data segment */
        !            75: #define STRNG          3               /* string data segment */
        !            76: #define ISTRNG         4               /* initialized string segment */
        !            77: #define STAB           5               /* symbol table segment */
        !            78: 
        !            79: 
        !            80: #ifndef ONEPASS
        !            81: #include "ndu.h"
        !            82: #endif
        !            83: 
        !            84: 
        !            85: #ifndef FIXDEF
        !            86: #define FIXDEF(p)
        !            87: #endif
        !            88: #ifndef FIXARG
        !            89: #define FIXARG(p)
        !            90: #endif
        !            91: #ifndef FIXSTRUCT
        !            92: #define FIXSTRUCT(a,b)
        !            93: #endif
        !            94: 
        !            95:        /* alignment of initialized quantities */
        !            96: #ifndef AL_INIT
        !            97: #define        AL_INIT ALINT
        !            98: #endif
        !            99: 
        !           100: /*
        !           101:  * External definitions
        !           102:  */
        !           103: struct sw {            /* switch table */
        !           104:        CONSZ   sval;   /* case value */
        !           105:        int     slab;   /* associated label */
        !           106: };
        !           107: extern struct sw swtab[];
        !           108: extern struct sw *swp;
        !           109: extern int swx;
        !           110: 
        !           111: extern int ftnno;
        !           112: extern int blevel;
        !           113: extern int instruct, stwart;
        !           114: 
        !           115: extern int lineno, nerrors;
        !           116: 
        !           117: extern CONSZ lastcon;
        !           118: extern float fcon;
        !           119: extern double dcon;
        !           120: 
        !           121: extern char ftitle[];
        !           122: extern char ititle[];
        !           123: extern struct symtab stab[];
        !           124: extern int curftn;
        !           125: extern int curclass;
        !           126: extern int curdim;
        !           127: extern int dimtab[];
        !           128: extern int paramstk[];
        !           129: extern int paramno;
        !           130: extern int autooff, argoff, strucoff;
        !           131: extern int regvar;
        !           132: extern int minrvar;
        !           133: extern int brkflag;
        !           134: typedef union {
        !           135:        int intval;
        !           136:        NODE * nodep;
        !           137:        } YYSTYPE;
        !           138: extern YYSTYPE yylval;
        !           139: extern char yytext[];
        !           140: 
        !           141: extern int strflg;
        !           142: 
        !           143: extern OFFSZ inoff;
        !           144: 
        !           145: extern int reached;
        !           146: 
        !           147: /* tunnel to buildtree for name id's */
        !           148: extern int idname;
        !           149: 
        !           150: extern NODE node[];
        !           151: extern NODE *lastfree;
        !           152: 
        !           153: extern int cflag, hflag, pflag;
        !           154: 
        !           155: /* various labels */
        !           156: extern int brklab;
        !           157: extern int contlab;
        !           158: extern int flostat;
        !           159: extern int retlab;
        !           160: extern int retstat;
        !           161: extern int asavbc[], *psavbc;
        !           162: 
        !           163: /* declarations of various functions */
        !           164: extern NODE
        !           165:        *buildtree(),
        !           166:        *bdty(),
        !           167:        *mkty(),
        !           168:        *rstruct(),
        !           169:        *dclstruct(),
        !           170:        *getstr(),
        !           171:        *tymerge(),
        !           172:        *stref(),
        !           173:        *offcon(),
        !           174:        *bcon(),
        !           175:        *bpsize(),
        !           176:        *convert(),
        !           177:        *pconvert(),
        !           178:        *oconvert(),
        !           179:        *ptmatch(),
        !           180:        *tymatch(),
        !           181:        *makety(),
        !           182:        *block(),
        !           183:        *doszof(),
        !           184:        *talloc(),
        !           185:        *optim(),
        !           186:        *fixargs(),
        !           187:        *clocal();
        !           188: OFFSZ  tsize(),
        !           189:        psize();
        !           190: TWORD  types();
        !           191: double atof();
        !           192: char   *exname(), *exdcon();
        !           193: 
        !           194: #define checkst(x)
        !           195: 
        !           196: #ifndef CHARCAST
        !           197: /* to make character constants into character connstants */
        !           198: /* this is a macro to defend against cross-compilers, etc. */
        !           199: #define CHARCAST(x) (char)(x)
        !           200: #endif
        !           201: #endif
        !           202: 
        !           203: /*
        !           204:  * Flags used in structures/unions
        !           205:  */
        !           206: #define SEENAME                01
        !           207: #define INSTRUCT       02
        !           208: #define INUNION                04
        !           209: #define FUNNYNAME      010
        !           210: #define TAGNAME                020
        !           211: 
        !           212: /*
        !           213:  * Flags used in the (elementary) flow analysis ...
        !           214:  */
        !           215: #define FBRK           02
        !           216: #define FCONT          04
        !           217: #define FDEF           010
        !           218: #define FLOOP          020
        !           219: 
        !           220: /*
        !           221:  * Flags used for return status
        !           222:  */
        !           223: #define RETVAL         1
        !           224: #define NRETVAL                2
        !           225: 
        !           226: #define NONAME         040000          /* marks constant w/o name field */
        !           227: #define NOOFFSET       (-10201)        /* mark an offset which is undefined */
        !           228: 

unix.superglobalmegacorp.com

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