1: /*	indent_globs.h	4.2	83/08/11	*/
   2: 
   3: /*
   4: 
   5: 			  Copyright (C) 1976
   6: 				by the
   7: 			  Board of Trustees
   8: 				of the
   9: 			University of Illinois
  10: 
  11: 			 All rights reserved
  12: 
  13: FILE NAME:
  14: 	indent_globs.h
  15: 
  16: PURPOSE:
  17: 	This include file contains the declarations for all global variables
  18: 	used in indent.
  19: 
  20: GLOBALS:
  21: 	The names of all of the variables will not be repeated here.  The
  22: 	declarations start on the next page.
  23: 
  24: FUNCTIONS:
  25: 	None
  26: */
  27: #define bufsize 600/* size of internal buffers */
  28: #define inp_bufs 512
  29:            /* size of input buffer */
  30: #define sc_size 5000
  31:            /* size of save_com buffer */
  32: #define label_offset 2
  33:            /* number of levels a label is placed to left of code
  34: 		   */
  35: 
  36: #define d_ljust 0  /* default for ljust_decl */
  37: #define d_max_col 75
  38:            /* default for max_col */
  39: #define d_com_ind 33
  40:            /* default com_ind */
  41: #define d_ind_size 4
  42:            /* default ind_size */
  43: #define d_verbose 0/* default verbose */
  44: #define d_unindent 1
  45:            /* default value for unindent_displace */
  46: #define d_leave_comma 0
  47:            /* default value for leave_comma */
  48: #define d_btype_2 1/* default value for btype_2 */
  49: 
  50: #define tabsize 8  /* the size of a tab */
  51: #define tabmask 0177770
  52:            /* mask used when figuring length of lines with tabs */
  53: 
  54: 
  55: #define false 0
  56: #define true  1
  57: 
  58: 
  59: int     input;     /* the fid for the input file */
  60: int     output;    /* the fid for the output file */
  61: 
  62: char    labbuf[bufsize];
  63:            /* buffer for label */
  64: char   *s_lab;     /* start ... */
  65: char   *e_lab;     /* .. and end of stored label */
  66: 
  67: char    codebuf[bufsize];
  68:            /* buffer for code section */
  69: char   *s_code;    /* start ... */
  70: char   *e_code;    /* .. and end of stored code */
  71: 
  72: char    combuf[bufsize];
  73:            /* buffer for comments */
  74: char   *s_com;     /* start ... */
  75: char   *e_com;     /* ... and end of stored comments */
  76: 
  77: char    in_buffer[inp_bufs];
  78:            /* input buffer */
  79: char   *buf_ptr;   /* ptr to next character to be taken from in_buffer */
  80: char   *buf_end;   /* ptr to first after last char in in_buffer */
  81: 
  82: char    save_com[sc_size];
  83:            /* input text is saved here when looking for the brace
  84: 		      after an if, while, etc */
  85: char   *sc_end;    /* pointer into save_com buffer */
  86: 
  87: char   *bp_save;   /* saved value of buf_ptr when taking input from
  88: 		      save_com */
  89: char   *be_save;   /* similarly saved value of buf_end */
  90: 
  91: char    token[bufsize];
  92:            /* the last token scanned */
  93: 
  94: 
  95: 
  96: 
  97: int     bl_line;   /* set to 1 by dump_line if the line is blank */
  98: int     break_comma;
  99:            /* when true and not in parens, break after a comma */
 100: int     btype_2;   /* when true, brace should be on same line as if,
 101: 		      while, etc */
 102: int     case_ind;  /* indentation level to be used for a "case n:" */
 103: int     code_lines;/* count of lines with code */
 104: int     col_1;     /* set to true if the last token started in column 1 */
 105: int     com_col;   /* this is the column in which the current coment
 106: 		      should start */
 107: int     com_ind;   /* the column in which comments to the right of code
 108: 		      should start */
 109: int     com_lines; /* the number of lines with comments, set by dump_line
 110: 		   */
 111: int     dec_nest;  /* current nesting level for structure or init */
 112: int     decl_com_ind;
 113:            /* the column in which comments after declarations
 114: 		      should be put */
 115: int     decl_on_line;
 116:            /* set to true if this line of code has part of a
 117: 		      declaration on it */
 118: int     had_eof;   /* set to true when input is exhausted */
 119: int     i_l_follow;/* the level to which ind_level should be set after the
 120: 		      current line is printed */
 121: int     in_decl;   /* set to true when we are in a declaration stmt.  The
 122: 		      processing of braces is then slightly different */
 123: int     in_stmt;   /* set to 1 while in a stmt */
 124: int     ind_level; /* the current indentation level */
 125: int     ind_size;  /* the size of one indentation level */
 126: int     ind_stmt;  /* set to 1 if next line should have an extra
 127: 		      indentation level because we are in the middle of a
 128: 		      stmt */
 129: int     last_u_d;  /* set to true after scanning a token which forces a
 130: 		      following operator to be unary */
 131: int     leave_comma;
 132:            /* if true, never break declarations after commas */
 133: int     line_no;   /* the current line number. */
 134: int     ljust_decl;/* true if declarations should be left justified */
 135: int     max_col;   /* the maximum allowable line length */
 136: int     out_coms;  /* the number of comments processed, set by pr_comment
 137: 		   */
 138: int     out_lines; /* the number of lines written, set by dump_line */
 139: int     p_l_follow;/* used to remember how to indent following statement
 140: 		   */
 141: int     paren_level;
 142:            /* parenthesization level. used to indent within stmts
 143: 		   */
 144: int     pcase;     /* set to 1 if the current line label is a case.  It is
 145: 		      printed differently from  a regular label */
 146: int     search_brace;
 147:            /* set to true by parse when it is necessary to buffer
 148: 		      up all info up to the start of a stmt after an if,
 149: 		      while, etc */
 150: int     unindent_displace;
 151:            /* comments not to the right of code will be placed
 152: 		      this many indentation levels to the left of code */
 153: int     use_ff;    /* set to one if the current line should be terminated
 154: 		      with a form feed */
 155: int     verbose;   /* when true, non-essential error messages are printed
 156: 		   */

Defined variables

be_save defined in line 89; used 4 times
bl_line defined in line 97; used 5 times
bp_save defined in line 87; used 5 times
break_comma defined in line 98; used 5 times
btype_2 defined in line 100; used 13 times
buf_ptr defined in line 79; used 76 times
case_ind defined in line 102; used 4 times
code_lines defined in line 103; used 3 times
codebuf defined in line 67; used 3 times
com_col defined in line 105; used 15 times
com_ind defined in line 107; used 9 times
com_lines defined in line 109; used 3 times
combuf defined in line 72; used 3 times
dec_nest defined in line 111; used 5 times
e_code defined in line 70; used 58 times
e_com defined in line 75; used 48 times
e_lab defined in line 65; used 21 times
i_l_follow defined in line 119; used 22 times
in_buffer defined in line 77; used 4 times
in_decl defined in line 121; used 12 times
in_stmt defined in line 123; used 10 times
ind_stmt defined in line 126; used 6 times
input defined in line 59; used 13 times
labbuf defined in line 62; used 3 times
last_u_d defined in line 129; used 15 times
leave_comma defined in line 131; used 5 times
ljust_decl defined in line 134; used 6 times
out_coms defined in line 136; used 3 times
out_lines defined in line 138; used 4 times
output defined in line 60; used 19 times
p_l_follow defined in line 139; used 16 times
paren_level defined in line 141; used 3 times
pcase defined in line 144; used 5 times
s_com defined in line 74; used 14 times
s_lab defined in line 64; used 11 times
save_com defined in line 82; used 6 times
sc_end defined in line 85; used 19 times
search_brace defined in line 146; used 10 times
token defined in line 91; used 26 times
verbose defined in line 155; used 11 times

Defined macros

bufsize defined in line 27; used 5 times
d_btype_2 defined in line 48; used 1 times
d_com_ind defined in line 39; used 1 times
d_ind_size defined in line 41; used 1 times
d_leave_comma defined in line 46; used 1 times
d_ljust defined in line 36; used 1 times
d_max_col defined in line 37; used 1 times
d_unindent defined in line 44; used 1 times
d_verbose defined in line 43; used 1 times
inp_bufs defined in line 28; used 2 times
label_offset defined in line 32; used 1 times
sc_size defined in line 30; used 2 times
tabmask defined in line 51; used 3 times
tabsize defined in line 50; used 3 times

Usage of this include

Last modified: 1983-09-04
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1346
Valid CSS Valid XHTML 1.0 Strict