# 2.11BSD#431 - /usr/ingres/source/equel/globals.h

##### Variables

    Arg_error         X
    Block_level       X
    C_code_flg        X
    C_globals         X
    C_locals          X
    Charcnt           X
    Chardebug         X
    Cmap              X
    Cv_display        X
    Cvarp             X
    Displays          X
    F_globals         X
    F_locals          X
    Field_indir       X
    Fieldp            X
    Fillcnt           X
    Fillmode          X
    In_quote          X
    In_string         X
    Inc_files         X
    Indir_level       X
    Input_file_name   X
    Kwrdnum           X
    Kwrdtab           X
    Lastc             X
    Lex_debug         X
    Line_buf          X
    Line_pos          X
    Lineout           X
    Newline           X
    Opcode            X
    Opflag            X
    Optab             X
    Peekc             X
    Pre_proc_flg      X
    Ret_list          X
    Rtdb              X
    Struct_flag       X
    Symsp             X
    Tokens            X
    Type_spec         X

##### struct's

    cvar              X
    disp_node         X
    display           X
    inc_file          X
    optab             X
    ret_list          X
    ret_var           X
    special           X

       1: #
       2: /*
       3: **  GLOBALS.H -- Equel declarations
       4: **
       5: **	Defines:
       6: **		Structures and variables
       7: **		used in Equel.
       8: **
       9: **	Required By:
      10: **		most of the routines in the precompiler.
      11: **
      12: **	Compilation Flags:
      13: **		xDEBUG -- for Chardebug, to provide compatability
      14: **			with older Equels' "-c" flag, and for
      15: **			Lex_debug for the "-v" flag.
      16: **
      17: **	Files:
      18: **		constants.h -- for manifest constants
      19: **
      20: **	History:
      21: **		5/26/78 -- (marc) written
      22: **		8/24/78 -- (marc) modified for including structures to equel.
      23: **			The variables F_locals, F_globals, and Field_indir
      24: **			were added, and the special sructure was extended.
      25: */
      26:
      27:
      28:
      29: /*
      30: **	Structure declarations
      31: */
      32:
      33:
      34:     /* parser keyword and operator table node */
      35:
      36: struct optab
      37: {
      38:     char    *op_term;   /* pointer to terminal */
      39:     int     op_token;   /* lexical token */
      40:     int     op_code;    /* code to distinguish different op_terms
      41: 				 * with the same .op_token
      42: 				 */
      43: };
      44:
      45:
      46:     /* C variable tree node */
      47:
      48: struct cvar
      49: {
      50:     char        *c_id;      /* identifier */
      51:     char        c_type;     /* type */
      52:     char        c_indir;    /* indirection level (- 1 for strings) */
      53:     struct cvar *c_left;    /* < sub-tree */
      54:     struct cvar *c_right;   /* > sub-tree */
      55: };
      56:
      57:     /* Display structures (linked list of strings) */
      58:
      59: struct disp_node
      60: {
      61:     char            *d_elm;     /* display element */
      62:     struct disp_node    *d_next;    /* next node */
      63:     int         d_line; /* for Symsp nodes, line
      64: 					 * where lexeme was seen
      65: 					 */
      66: };
      67:
      68: struct display
      69: {
      70:     struct disp_node    *disp_first;    /* first node in display */
      71:     struct disp_node    *disp_last; /* last node in display */
      72: };
      73:
      74:     /* Retrieval list */
      75:
      76: struct ret_var
      77: {
      78:     char        *r_elm;     /* string invoking variable
      79: 					 * e.g. "*intpa [2]"
      80: 					 */
      81:     struct ret_var  *r_next;    /* next variable used in "tupret" */
      82:     char        r_type;     /* type of variable */
      83: };
      84:
      85: struct ret_list
      86: {
      87:     struct ret_var  *ret_first; /* first node in ret_var chain */
      88:     struct ret_var  *ret_last;  /* last node in chain */
      89: };
      90:
      91:
      92:     /* "# include" file processing stack (list) */
      93:
      94: struct inc_file
      95: {
      96:     int     inc_yyline; /* old file's yyline */
      97:     int     inc_lineout;    /*  "    "     Lineout */
      98:     char        *inc_fid;   /* name */
      99:     FILE        *inc_infile;    /* In_file */
     100:     FILE        *inc_outfile;   /* Out_file */
     101:     struct inc_file *inc_next;
     102: };
     103:
     104:
     105: /*
     106: ** Structure for yacc generated terminal codes
     107: **	This avoids having to include functions in
     108: **	[grammar.y] for the function to know the
     109: **	parser generated token numbers.
     110: */
     111:
     112: struct special
     113: {
     114:     int sp_name;        /* NAME */
     115:     int sp_sconst;      /* SCONST */
     116:     int sp_i2const;     /* I2CONST */
     117:     int sp_i4const;     /* I4CONST */
     118:     int sp_f8const;     /* F8CONST */
     119:     int sp_quote;       /* QUOTE */
     120:     int sp_bgncmnt;     /* BGNCMNT */
     121:     int sp_endcmnt;     /* ENDCMNT */
     122:     int sp_c_code;      /* C_CODE */
     123:     int sp_struct_var;
     124: };
     125:
     126:
     127: /*
     128: **	Global definitions
     129: */
     130:
     131: int     Opcode;         /* operator code to distinguis tokens */
     132: extern int  yychar;         /* yacc input token */
     133: extern int  yyline;         /* yacc external line counter */
     134: extern int  yylval;         /* yacc external stack variable */
     135: extern int  yydebug;        /* set by "-y" command line arg,
     136: 					 * has yacc parser give details
     137: 					 * of parse
     138: 					 */
     139: int     Newline;        /* less than one token has been
     140: 					 * read from the input line, and
     141: 					 *  yylex isn't sure yet whether it is
     142: 					 * C_CODE or not
     143: 					 */
     144: int     Lineout;        /* output line count */
     145: int     In_quote;       /* set if inside an IIwrite("... */
     146: char        *Input_file_name;   /* input file name */
     147: int     Type_spec;      /* used in parser, in C-declarations */
     148: int         C_code_flg;     /* set to indicate C-code in scanner */
     149: int         Pre_proc_flg;       /* set to indicate a
     150: 					 * pre-processor line
     151: 					 */
     152: int     Block_level;        /* > 0 local, 0 global */
     153: int     Indir_level;        /* holds indirection level
     154: 					 * of a reference to a C-var
     155: 					 */
     156: int     Field_indir;        /* indirection on a field of
     157: 					 * a structure variable
     158: 					 */
     159: int     Opflag;         /* mode in which to interpret syntax */
     160: int     In_string;      /* set if output is in a string */
     161: int     Fillmode;       /* set if output line is being filled */
     162: int     Fillcnt;        /* count to fill a line to */
     163: int     Charcnt;        /* # chars written onto output line */
     164: int     Lastc;          /* type of last char read (OPCHAR or
     165: 					 * KEYCHAR)
     166: 					 */
     167: int     Arg_error;      /* set in argproc() [main.c] on
     168: 					 * error in prcessing command line
     169: 					 * arguments.
     170: 					 */
     171: int     Rtdb;           /* set by "-d" command line arg,
     172: 					 * supplies equel runtime support
     173: 					 * with info to report file name
     174: 					 * and line number in case of an
     175: 					 * error
     176: 					 */
     177: int     Kwrdnum;        /* # of entries in Kwrdtab [tokens.y] */
     178: char        Line_buf [MAXSTRING + 1];   /* buffer for input line */
     179: char        *Line_pos;      /* position in input line */
     180: int     Peekc [2];      /* holds backup character */
     181: int     Struct_flag;        /* while processing a structure
     182: 					 * variable declaration, is set
     183: 					 */
     184: struct cvar *Cvarp, *Fieldp;        /* to process C variables */
     185:
     186:
     187:
     188: struct optab        Kwrdtab []; /* table of key words [tokens.y] */
     189: struct optab        Optab [];   /* table of operators [tokens.y] */
     190: struct special      Tokens;     /* holds yacc generated lex codes
     191: 					 * [tokens.y]
     192: 					 */
     193: char            Cmap [];    /* a type for each character [cmap.c] */
     194: struct cvar     *C_globals; /* Global C-variable tree */
     195: struct cvar     *C_locals;  /* Local C-variable tree */
     196: struct cvar     *F_locals;  /* Local structure fields */
     197: struct cvar     *F_globals; /* Global structure fields */
     198: struct display      Displays [1];   /* Cv_display is set to point at this
     199: 					 * so that Cv_display may be passed
     200: 					 * as a parameter instead of &Cv_display
     201: 					 */
     202: struct display      *Cv_display;    /* display into which "cvarx"'s
     203: 					 * get put
     204: 					 */
     205: struct display      Symsp;      /* storage for symbols read by
     206: 					 * yylex()
     207: 					 */
     208: struct ret_list     Ret_list;   /* list of variables in a "ctlelm" */
     209: struct inc_file     *Inc_files; /* stack of files pushed by #includes */
     210:
     211:
     212:
     213:
     214: /*
     215: **	I/O manipulation data structures
     216: */
     217:
     218: FILE    *In_file;       /* input file */
     219: FILE    *Out_file;      /* output file */
     220:
     221: # ifdef xDEBUG
     222: char    Lex_debug;      /* debugging info for lexemes in yylex()
     223: 				 * [yylex.c]
     224: 				 */
     225: char    Chardebug;      /* print debugging info for routine
     226: 				 * in getch.c
     227: 				 */
     228: # endif

#### Defined variables

Arg_error defined in line 167; used 3 times

- in /usr/ingres/source/equel/main.c line 93, 149, 212

Block_level defined in line 152; used 7 times

- in /usr/ingres/source/equel/grammar.y line 160-165(3), 585-588(2)
- in /usr/ingres/source/equel/main.c line 147, 284

C_code_flg defined in line 148; used 5 times

- in /usr/ingres/source/equel/main.c line 145
- in /usr/ingres/source/equel/yylex.c line 47, 67-75(3)

C_globals defined in line 194; used 3 times

- in /usr/ingres/source/equel/cvar.c line 79, 316
- in /usr/ingres/source/equel/main.c line 154

C_locals defined in line 195; used 4 times

- in /usr/ingres/source/equel/cvar.c line 79, 316
- in /usr/ingres/source/equel/grammar.y line 167
- in /usr/ingres/source/equel/main.c line 152

Charcnt defined in line 163; used 9 times

- in /usr/ingres/source/equel/include.c line 187
- in /usr/ingres/source/equel/main.c line 148
- in /usr/ingres/source/equel/prtout.c line 388, 394, 403, 410-415(2), 421
- in /usr/ingres/source/equel/yylex.c line 137

Chardebug defined in line 225; used 6 times

- in /usr/ingres/source/equel/getch.c line 114, 146, 167, 210
- in /usr/ingres/source/equel/main.c line 170, 199

Cmap defined in line 193; used 12 times

- in /usr/ingres/source/equel/display.c line 268
- in /usr/ingres/source/equel/name.c line 81, 100
- in /usr/ingres/source/equel/number.c line 42, 72, 87, 101, 110
- in /usr/ingres/source/equel/operator.c line 72, 78
- in /usr/ingres/source/equel/string.c line 78
- in /usr/ingres/source/equel/yylex.c line 86

Cv_display defined in line 202; used 26 times

- in /usr/ingres/source/equel/grammar.y line 295-298(2), 305, 394-398(2), 589, 606, 612, 652, 662, 668-671(2), 695-702(3), 713, 738, 746, 764-768(3), 778, 796, 803, 840, 846

Cvarp defined in line 184; used 29 times

- in /usr/ingres/source/equel/grammar.y line 291-297(3), 306, 387-390(2), 399, 591, 597(2), 607, 613, 629-632(2), 651, 681, 694-703(4), 712, 758-761(2), 779, 793-795(2), 830-833(2), 847

Displays defined in line 198; used 1 times

- in /usr/ingres/source/equel/display.c line 44

F_globals defined in line 197; used 3 times

- in /usr/ingres/source/equel/cvar.c line 108, 333
- in /usr/ingres/source/equel/main.c line 155

F_locals defined in line 196; used 4 times

- in /usr/ingres/source/equel/cvar.c line 108, 333
- in /usr/ingres/source/equel/grammar.y line 168
- in /usr/ingres/source/equel/main.c line 153

Field_indir defined in line 156; used 9 times

- in /usr/ingres/source/equel/grammar.y line 590, 602, 623, 635, 641-646(3), 683, 704

Fieldp defined in line 184; used 32 times

- in /usr/ingres/source/equel/grammar.y line 293-296(4), 306, 389-390(3), 399, 591, 607, 613-623(3), 663, 681, 694-703(7), 760-761(3), 779, 794(2), 832(2), 847

Fillcnt defined in line 162; used 6 times

- in /usr/ingres/source/equel/main.c line 183-190(3), 197
- in /usr/ingres/source/equel/prtout.c line 388, 403

Fillmode defined in line 161; used 5 times

- in /usr/ingres/source/equel/main.c line 147
- in /usr/ingres/source/equel/prtout.c line 197, 228, 387, 403

In_quote defined in line 145; used 8 times

- in /usr/ingres/source/equel/include.c line 133
- in /usr/ingres/source/equel/main.c line 148
- in /usr/ingres/source/equel/prtout.c line 96, 196, 210-212(2), 300, 407

In_string defined in line 160; used 7 times

- in /usr/ingres/source/equel/main.c line 147
- in /usr/ingres/source/equel/prtout.c line 195, 209, 305, 343, 389, 405

Inc_files defined in line 209; used 5 times

- in /usr/ingres/source/equel/include.c line 205, 233, 240, 247
- in /usr/ingres/source/equel/yyerror.c line 131

Indir_level defined in line 153; used 16 times

- in /usr/ingres/source/equel/grammar.y line 582-590(4), 597-602(2), 629, 635, 657, 672, 683, 704, 719-725(3)
- in /usr/ingres/source/equel/main.c line 147

Input_file_name defined in line 146; used 15 times

- in /usr/ingres/source/equel/include.c line 159, 165-175(5), 237, 243
- in /usr/ingres/source/equel/main.c line 96-97(2), 208, 260, 283
- in /usr/ingres/source/equel/prtout.c line 273
- in /usr/ingres/source/equel/yyerror.c line 132

Kwrdnum defined in line 177; used 2 times

- in /usr/ingres/source/equel/getkey.c line 42-46(2)

Kwrdtab defined in line 188; used 1 times

- in /usr/ingres/source/equel/getkey.c line 44

Lastc defined in line 164; used 5 times

- in /usr/ingres/source/equel/main.c line 148
- in /usr/ingres/source/equel/prtout.c line 76, 168-171(2), 231

Lex_debug defined in line 222; used 6 times

- in /usr/ingres/source/equel/getch.c line 114, 146
- in /usr/ingres/source/equel/main.c line 166, 199
- in /usr/ingres/source/equel/yylex.c line 58, 106

Line_buf defined in line 178; used 6 times

- in /usr/ingres/source/equel/getch.c line 118-121(3), 131, 137
- in /usr/ingres/source/equel/include.c line 51

Line_pos defined in line 179; used 8 times

- in /usr/ingres/source/equel/getch.c line 104, 137, 143, 152-159(3)
- in /usr/ingres/source/equel/include.c line 202, 246

Lineout defined in line 144; used 7 times

- in /usr/ingres/source/equel/include.c line 155, 201, 242
- in /usr/ingres/source/equel/main.c line 146
- in /usr/ingres/source/equel/prtout.c line 229, 392, 423

Newline defined in line 139; used 9 times

- in /usr/ingres/source/equel/display.c line 373, 395
- in /usr/ingres/source/equel/include.c line 201
- in /usr/ingres/source/equel/main.c line 146
- in /usr/ingres/source/equel/yylex.c line 50, 65, 76-78(2), 84

Opcode defined in line 131; used 3 times

- in /usr/ingres/source/equel/grammar.y line 550
- in /usr/ingres/source/equel/name.c line 127
- in /usr/ingres/source/equel/operator.c line 114

Opflag defined in line 159; used 51 times

- in /usr/ingres/source/equel/grammar.y line 408, 448-452(2), 462, 536, 548, 691, 708, 731-735(2), 743, 763-772(4), 815, 911-912(3), 963-968(2), 975, 982, 990-1000(3), 1007, 1014, 1021, 1028, 1035, 1042, 1050, 1056-1057(2), 1063-1064(2), 1072, 1079-1080(2), 1086, 1093, 1101, 1109, 1115, 1122, 1129, 1136, 1145-1151(3)

Optab defined in line 189; used 2 times

- in /usr/ingres/source/equel/comment.c line 65
- in /usr/ingres/source/equel/operator.c line 89

Peekc defined in line 180; used 11 times

- in /usr/ingres/source/equel/getch.c line 90-97(5), 214-219(6)

Pre_proc_flg defined in line 149; used 5 times

- in /usr/ingres/source/equel/include.c line 202
- in /usr/ingres/source/equel/main.c line 145
- in /usr/ingres/source/equel/yylex.c line 52, 135, 181

Ret_list defined in line 208; used 3 times

- in /usr/ingres/source/equel/retrieve.c line 114, 154, 183

Rtdb defined in line 171; used 3 times

- in /usr/ingres/source/equel/main.c line 179, 196
- in /usr/ingres/source/equel/prtout.c line 271

Struct_flag defined in line 181; used 4 times

- in /usr/ingres/source/equel/grammar.y line 525-530(2), 583, 1137

Symsp defined in line 205; used 2 times

- in /usr/ingres/source/equel/display.c line 153, 219

Tokens defined in line 190; used 13 times

- in /usr/ingres/source/equel/comment.c line 66
- in /usr/ingres/source/equel/name.c line 108, 133-134(2)
- in /usr/ingres/source/equel/number.c line 68, 121-124(2), 138
- in /usr/ingres/source/equel/operator.c line 106-110(2)
- in /usr/ingres/source/equel/prtout.c line 59
- in /usr/ingres/source/equel/string.c line 98
- in /usr/ingres/source/equel/yylex.c line 69

Type_spec defined in line 147; used 12 times

- in /usr/ingres/source/equel/grammar.y line 511-516(2), 526-531(2), 542-543(2), 550, 563, 572, 581-587(3)

#### Defined struct's

cvar defined in line 48; used 54 times

- in line 53-54(4), 184(2), 194-197(8)
- in /usr/ingres/source/equel/cvar.c line 32(2), 76(2), 105(2), 130-138(8), 181-185(6), 246-251(6), 313(2), 330(2), 352(2), 359(2)
- in /usr/ingres/source/equel/grammar.y line 107(2), 113(2)
- in /usr/ingres/source/equel/name.c line 75(2)

disp_node defined in line 59; used 236 times

- in line 62(2), 70-71(4)
- in /usr/ingres/source/equel/display.c line 86-94(6), 148-151(4), 181(2), 217(2), 264(2)
- in /usr/ingres/source/equel/grammar.y line 177-180(4), 286(2), 292(2), 319-325(8), 424(2), 449(2), 510-515(4), 537(2), 549(2), 558-562(4), 571(2), 584-587(4), 606(2), 612(2), 640(2), 651-652(4), 662-671(8), 684-687(6), 709-718(8), 730(4), 736-738(4), 771-776(4), 788(2), 865(2), 895-901(8), 919-952(24), 962(2), 970(2), 977(2), 984-994(6), 1002(2), 1009(2), 1016(2), 1023(2), 1030(2), 1037(2), 1044-1045(4), 1058(2), 1068(2), 1074(2), 1081(2), 1088(2), 1095-1096(4), 1103(2), 1110(2), 1117(2), 1124(2), 1131(2), 1138(2), 1144(2), 1152(2), 1161(2), 1170-1176(6), 1184(2), 1198-1210(10), 1218-1221(4), 1228-1231(4)
- in /usr/ingres/source/equel/prtout.c line 93(2)
- in /usr/ingres/source/equel/retrieve.c line 57(2)
- in /usr/ingres/source/equel/yyerror.c line 52(2), 113(2)
- in /usr/ingres/source/equel/yylex.c line 108(2)

display defined in line 68; used 26 times

- in line 198-205(6)
- in /usr/ingres/source/equel/display.c line 44(2), 87-90(4), 178-180(4), 216(2), 262(2), 336(2)
- in /usr/ingres/source/equel/prtout.c line 91(2)
- in /usr/ingres/source/equel/retrieve.c line 49(2)

inc_file defined in line 94; used 10 times

- in line 101(2), 209(2)
- in /usr/ingres/source/equel/include.c line 130(2), 140(2), 231(2)

optab defined in line 36; used 18 times

- in line 188-189(4)
- in /usr/ingres/source/equel/comment.c line 61(2)
- in /usr/ingres/source/equel/getkey.c line 35-39(4)
- in /usr/ingres/source/equel/name.c line 73-74(4)
- in /usr/ingres/source/equel/operator.c line 65(2)
- in /usr/ingres/source/equel/string.c line 31(2)

ret_list defined in line 85; used 6 times

- in line 208(2)
- in /usr/ingres/source/equel/retrieve.c line 105(2), 180(2)

ret_var defined in line 76; used 14 times

- in line 81(2), 87-88(4)
- in /usr/ingres/source/equel/retrieve.c line 106(2), 115(2), 151(2), 181(2)

special defined in line 112; used 2 times

- in line 190(2)

#### Usage of this include

globals.h used 16 times

- in /usr/ingres/source/equel/comment.c line 56
- in /usr/ingres/source/equel/cvar.c line 30
- in /usr/ingres/source/equel/display.c line 37
- in /usr/ingres/source/equel/getch.c line 5
- in /usr/ingres/source/equel/getkey.c line 5
- in /usr/ingres/source/equel/grammar.y line 105
- in /usr/ingres/source/equel/include.c line 22
- in /usr/ingres/source/equel/main.c line 5
- in /usr/ingres/source/equel/name.c line 5
- in /usr/ingres/source/equel/number.c line 5
- in /usr/ingres/source/equel/operator.c line 5
- in /usr/ingres/source/equel/prtout.c line 5
- in /usr/ingres/source/equel/retrieve.c line 5
- in /usr/ingres/source/equel/string.c line 5
- in /usr/ingres/source/equel/yyerror.c line 5
- in /usr/ingres/source/equel/yylex.c line 5

Last modified: 1995-02-05 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1656 |