[BACK]Return to tblcmp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

Diff for /src/usr.bin/lex/tblcmp.c between version 1.4 and 1.5

version 1.4, 2001/06/17 07:30:42 version 1.5, 2001/11/19 19:02:14
Line 35 
Line 35 
   
 /* declarations for functions that have forward references */  /* declarations for functions that have forward references */
   
 void mkentry PROTO((register int*, int, int, int, int));  void mkentry PROTO((int*, int, int, int, int));
 void mkprot PROTO((int[], int, int));  void mkprot PROTO((int[], int, int));
 void mktemplate PROTO((int[], int, int));  void mktemplate PROTO((int[], int, int));
 void mv2front PROTO((int));  void mv2front PROTO((int));
Line 230 
Line 230 
 void cmptmps()  void cmptmps()
         {          {
         int tmpstorage[CSIZE + 1];          int tmpstorage[CSIZE + 1];
         register int *tmp = tmpstorage, i, j;          int *tmp = tmpstorage, i, j;
         int totaltrans, trans;          int totaltrans, trans;
   
         peakpairs = numtemps * numecs + tblend;          peakpairs = numtemps * numecs + tblend;
Line 302 
Line 302 
   
 void expand_nxt_chk()  void expand_nxt_chk()
         {          {
         register int old_max = current_max_xpairs;          int old_max = current_max_xpairs;
   
         current_max_xpairs += MAX_XPAIRS_INCREMENT;          current_max_xpairs += MAX_XPAIRS_INCREMENT;
   
Line 341 
Line 341 
         /* Firstfree is the position of the first possible occurrence of two          /* Firstfree is the position of the first possible occurrence of two
          * consecutive unused records in the chk and nxt arrays.           * consecutive unused records in the chk and nxt arrays.
          */           */
         register int i;          int i;
         register int *state_ptr, *chk_ptr;          int *state_ptr, *chk_ptr;
         register int *ptr_to_last_entry_in_state;          int *ptr_to_last_entry_in_state;
   
         /* If there are too many out-transitions, put the state at the end of          /* If there are too many out-transitions, put the state at the end of
          * nxt and chk.           * nxt and chk.
Line 436 
Line 436 
  */   */
 void inittbl()  void inittbl()
         {          {
         register int i;          int i;
   
         zero_out( (char *) chk, (size_t) (current_max_xpairs * sizeof( int )) );          zero_out( (char *) chk, (size_t) (current_max_xpairs * sizeof( int )) );
   
Line 517 
Line 517 
  */   */
   
 void mkentry( state, numchars, statenum, deflink, totaltrans )  void mkentry( state, numchars, statenum, deflink, totaltrans )
 register int *state;  int *state;
 int numchars, statenum, deflink, totaltrans;  int numchars, statenum, deflink, totaltrans;
         {          {
         register int minec, maxec, i, baseaddr;          int minec, maxec, i, baseaddr;
         int tblbase, tbllast;          int tblbase, tbllast;
   
         if ( totaltrans == 0 )          if ( totaltrans == 0 )
Line 794 
Line 794 
 void place_state( state, statenum, transnum )  void place_state( state, statenum, transnum )
 int *state, statenum, transnum;  int *state, statenum, transnum;
         {          {
         register int i;          int i;
         register int *state_ptr;          int *state_ptr;
         int position = find_table_space( state, transnum );          int position = find_table_space( state, transnum );
   
         /* "base" is the table of start positions. */          /* "base" is the table of start positions. */
Line 869 
Line 869 
 int tbldiff( state, pr, ext )  int tbldiff( state, pr, ext )
 int state[], pr, ext[];  int state[], pr, ext[];
         {          {
         register int i, *sp = state, *ep = ext, *protp;          int i, *sp = state, *ep = ext, *protp;
         register int numdiff = 0;          int numdiff = 0;
   
         protp = &protsave[numecs * (pr - 1)];          protp = &protsave[numecs * (pr - 1)];
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5