De-register declarations.

This commit is contained in:
David Malone 2008-06-04 19:50:34 +00:00
parent 69d39da3c0
commit 48f6b9b8b1
9 changed files with 86 additions and 86 deletions

View File

@ -122,7 +122,7 @@ void list_character_set( file, cset )
FILE *file;
int cset[];
{
register int i;
int i;
putc( '[', file );
@ -130,7 +130,7 @@ int cset[];
{
if ( cset[i] )
{
register int start_char = i;
int start_char = i;
putc( ' ', file );

View File

@ -105,13 +105,13 @@ int *nfa_states, num_states;
int *accset;
int nacc;
{
register int i, j;
int i, j;
for ( i = 1; i <= num_states; ++i )
{
int ns = nfa_states[i];
register int type = state_type[ns];
register int ar = assoc_rule[ns];
int type = state_type[ns];
int ar = assoc_rule[ns];
if ( type == STATE_NORMAL || rule_type[ar] != RULE_VARIABLE )
{ /* do nothing */
@ -149,15 +149,15 @@ void dump_associated_rules( file, ds )
FILE *file;
int ds;
{
register int i, j;
register int num_associated_rules = 0;
int i, j;
int num_associated_rules = 0;
int rule_set[MAX_ASSOC_RULES + 1];
int *dset = dss[ds];
int size = dfasiz[ds];
for ( i = 1; i <= size; ++i )
{
register int rule_num = rule_linenum[assoc_rule[dset[i]]];
int rule_num = rule_linenum[assoc_rule[dset[i]]];
for ( j = 1; j <= num_associated_rules; ++j )
if ( rule_num == rule_set[j] )
@ -201,7 +201,7 @@ void dump_transitions( file, state )
FILE *file;
int state[];
{
register int i, ec;
int i, ec;
int out_char_set[CSIZE];
for ( i = 0; i < csize; ++i )
@ -249,7 +249,7 @@ int state[];
int *epsclosure( t, ns_addr, accset, nacc_addr, hv_addr )
int *t, *ns_addr, accset[], *nacc_addr, *hv_addr;
{
register int stkpos, ns, tsp;
int stkpos, ns, tsp;
int numstates = *ns_addr, nacc, hashval, transsym, nfaccnum;
int stkend, nstate;
static int did_stk_init = false, *stk;
@ -681,7 +681,7 @@ void ntod()
if ( caseins && ! useecs )
{
register int j;
int j;
for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j )
{
@ -796,7 +796,7 @@ int snstods( sns, numstates, accset, nacc, hashval, newds_addr )
int sns[], numstates, accset[], nacc, hashval, *newds_addr;
{
int didsort = 0;
register int i, j;
int i, j;
int newds, *oldsns;
for ( i = 1; i <= lastdfa; ++i )

View File

@ -144,7 +144,7 @@ int lenccl, fwd[], bck[], llsiz, NUL_mapping;
{ /* look for the symbol in the character class */
for ( ; j < lenccl; ++j )
{
register int ccl_char;
int ccl_char;
if ( NUL_mapping && ccls[j] == 0 )
ccl_char = NUL_mapping;

View File

@ -63,7 +63,7 @@ static char C_state_decl[] =
void do_indent()
{
register int i = indent_level * 8;
int i = indent_level * 8;
while ( i >= 8 )
{
@ -133,7 +133,7 @@ void gen_bu_action()
void genctbl()
{
register int i;
int i;
int end_of_buffer_action = num_rules + 1;
/* Table of verify for transition and offset to next state. */
@ -229,7 +229,7 @@ void genctbl()
void genecs()
{
register int i, j;
int i, j;
int numrows;
out_str_dec( C_int_decl, "yy_ec", csize );
@ -412,7 +412,7 @@ void gen_find_action()
void genftbl()
{
register int i;
int i;
int end_of_buffer_action = num_rules + 1;
out_str_dec( long_align ? C_long_decl : C_short_decl,
@ -422,7 +422,7 @@ void genftbl()
for ( i = 1; i <= lastdfa; ++i )
{
register int anum = dfaacc[i].dfaacc_state;
int anum = dfaacc[i].dfaacc_state;
mkdata( anum );
@ -447,7 +447,7 @@ void genftbl()
void gen_next_compressed_state( char_map )
char *char_map;
{
indent_put2s( "register YY_CHAR yy_c = %s;", char_map );
indent_put2s( "YY_CHAR yy_c = %s;", char_map );
/* Save the backing-up info \before/ computing the next state
* because we always compute one more state than needed - we
@ -534,8 +534,8 @@ void gen_next_match()
{
indent_puts( "{" ); /* } for vi */
indent_puts(
"register yyconst struct yy_trans_info *yy_trans_info;\n" );
indent_puts( "register YY_CHAR yy_c;\n" );
"yyconst struct yy_trans_info *yy_trans_info;\n" );
indent_puts( "YY_CHAR yy_c;\n" );
indent_put2s( "for ( yy_c = %s;", char_map );
indent_puts(
" (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->" );
@ -676,7 +676,7 @@ void gen_NUL_trans()
/* We're going to need yy_cp lying around for the call
* below to gen_backing_up().
*/
indent_puts( "register char *yy_cp = yy_c_buf_p;" );
indent_puts( "char *yy_cp = yy_c_buf_p;" );
outc( '\n' );
@ -698,10 +698,10 @@ void gen_NUL_trans()
else if ( fullspd )
{
do_indent();
out_dec( "register int yy_c = %d;\n", NUL_ec );
out_dec( "int yy_c = %d;\n", NUL_ec );
indent_puts(
"register yyconst struct yy_trans_info *yy_trans_info;\n" );
"yyconst struct yy_trans_info *yy_trans_info;\n" );
indent_puts(
"yy_trans_info = &yy_current_state[(unsigned int) yy_c];" );
indent_puts( "yy_current_state += yy_trans_info->yy_nxt;" );
@ -959,7 +959,7 @@ void gentabs()
for ( i = 1; i <= lastdfa; ++i )
{
register int d = def[i];
int d = def[i];
if ( base[i] == JAMSTATE )
base[i] = jambase;
@ -1060,7 +1060,7 @@ char str[];
void make_tables()
{
register int i;
int i;
int did_eof_rule = false;
skelout();

View File

@ -1486,9 +1486,9 @@ YY_MALLOC_DECL
YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
#line 94 "scan.l"
@ -1544,7 +1544,7 @@ YY_DECL
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@ -2297,7 +2297,7 @@ case 106:
YY_RULE_SETUP
#line 435 "scan.l"
{
register Char *nmdefptr;
Char *nmdefptr;
Char *ndlookup();
strcpy( nmstr, yytext + 1 );
@ -2896,9 +2896,9 @@ case YY_STATE_EOF(LINEDIR):
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
char *dest = yy_current_buffer->yy_ch_buf;
char *source = yytext_ptr;
int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@ -3028,15 +3028,15 @@ static int yy_get_next_buffer()
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_state_type yy_current_state;
char *yy_cp;
yy_current_state = yy_start;
yy_current_state += YY_AT_BOL();
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@ -3068,10 +3068,10 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
int yy_is_jam;
char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
@ -3092,14 +3092,14 @@ yy_state_type yy_current_state;
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
static void yyunput( int c, char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
char *yy_bp;
#endif
{
register char *yy_cp = yy_c_buf_p;
char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
@ -3107,10 +3107,10 @@ register char *yy_bp;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
int number_to_move = yy_n_chars + 2;
char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
@ -3572,7 +3572,7 @@ yyconst char *s2;
int n;
#endif
{
register int i;
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@ -3586,7 +3586,7 @@ static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
int n;
for ( n = 0; s[n]; ++n )
;

View File

@ -84,7 +84,7 @@ void *allocate_array( size, element_size )
int size;
size_t element_size;
{
register void *mem;
void *mem;
size_t num_bytes = element_size * size;
mem = flex_alloc( num_bytes );
@ -99,7 +99,7 @@ size_t element_size;
/* all_lower - true if a string is all lower-case */
int all_lower( str )
register char *str;
char *str;
{
while ( *str )
{
@ -115,7 +115,7 @@ register char *str;
/* all_upper - true if a string is all upper-case */
int all_upper( str )
register char *str;
char *str;
{
while ( *str )
{
@ -146,7 +146,7 @@ register char *str;
void bubble( v, n )
int v[], n;
{
register int i, j, k;
int i, j, k;
for ( i = n; i > 1; --i )
for ( j = 1; j < i; ++j )
@ -182,7 +182,7 @@ int c;
/* clower - replace upper-case letter to lower-case */
Char clower( c )
register int c;
int c;
{
return (Char) ((isascii( c ) && isupper( c )) ? tolower( c ) : c);
}
@ -191,10 +191,10 @@ register int c;
/* copy_string - returns a dynamically allocated copy of a string */
char *copy_string( str )
register const char *str;
const char *str;
{
register const char *c1;
register char *c2;
const char *c1;
char *c2;
char *copy;
unsigned int size;
@ -220,9 +220,9 @@ register const char *str;
*/
Char *copy_unsigned_string( str )
register Char *str;
Char *str;
{
register Char *c;
Char *c;
Char *copy;
/* find length */
@ -655,7 +655,7 @@ unsigned int x;
void out_line_count( str )
const char str[];
{
register int i;
int i;
for ( i = 0; str[i]; ++i )
if ( str[i] == '\n' )
@ -713,7 +713,7 @@ const char str[];
*/
char *readable_form( c )
register int c;
int c;
{
static char rform[10];
@ -759,7 +759,7 @@ void *array;
int size;
size_t element_size;
{
register void *new_array;
void *new_array;
size_t num_bytes = element_size * size;
new_array = flex_realloc( array, num_bytes );
@ -878,7 +878,7 @@ void zero_out( region_ptr, size_in_bytes )
char *region_ptr;
size_t size_in_bytes;
{
register char *rp, *rp_end;
char *rp, *rp_end;
rp = region_ptr;
rp_end = region_ptr + size_in_bytes;

View File

@ -321,7 +321,7 @@ int first, last;
*/
void mark_beginning_as_normal( mach )
register int mach;
int mach;
{
switch ( state_type[mach] )
{

View File

@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
/* declare functions that have forward references */
int hashfunct PROTO((register char[], int));
int hashfunct PROTO((char[], int));
struct hash_entry *ndtbl[NAME_TABLE_HASH_SIZE];
@ -51,16 +51,16 @@ struct hash_entry *findsym();
*/
int addsym( sym, str_def, int_def, table, table_size )
register char sym[];
char sym[];
char *str_def;
int int_def;
hash_table table;
int table_size;
{
int hash_val = hashfunct( sym, table_size );
register struct hash_entry *sym_entry = table[hash_val];
register struct hash_entry *new_entry;
register struct hash_entry *successor;
struct hash_entry *sym_entry = table[hash_val];
struct hash_entry *new_entry;
struct hash_entry *successor;
while ( sym_entry )
{
@ -130,7 +130,7 @@ Char ccltxt[];
/* findsym - find symbol in symbol table */
struct hash_entry *findsym( sym, table, table_size )
register char sym[];
char sym[];
hash_table table;
int table_size;
{
@ -139,7 +139,7 @@ int table_size;
(struct hash_entry *) 0, (struct hash_entry *) 0,
(char *) 0, (char *) 0, 0,
} ;
register struct hash_entry *sym_entry =
struct hash_entry *sym_entry =
table[hashfunct( sym, table_size )];
while ( sym_entry )
@ -156,11 +156,11 @@ int table_size;
/* hashfunct - compute the hash value for "str" and hash size "hash_size" */
int hashfunct( str, hash_size )
register char str[];
char str[];
int hash_size;
{
register int hashval;
register int locstr;
int hashval;
int locstr;
hashval = 0;
locstr = 0;

View File

@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
/* 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 mktemplate PROTO((int[], int, int));
void mv2front PROTO((int));
@ -230,7 +230,7 @@ int state[], statenum, totaltrans, comstate, comfreq;
void cmptmps()
{
int tmpstorage[CSIZE + 1];
register int *tmp = tmpstorage, i, j;
int *tmp = tmpstorage, i, j;
int totaltrans, trans;
peakpairs = numtemps * numecs + tblend;
@ -302,7 +302,7 @@ void cmptmps()
void expand_nxt_chk()
{
register int old_max = current_max_xpairs;
int old_max = current_max_xpairs;
current_max_xpairs += MAX_XPAIRS_INCREMENT;
@ -341,9 +341,9 @@ int *state, numtrans;
/* Firstfree is the position of the first possible occurrence of two
* consecutive unused records in the chk and nxt arrays.
*/
register int i;
register int *state_ptr, *chk_ptr;
register int *ptr_to_last_entry_in_state;
int i;
int *state_ptr, *chk_ptr;
int *ptr_to_last_entry_in_state;
/* If there are too many out-transitions, put the state at the end of
* nxt and chk.
@ -436,7 +436,7 @@ int *state, numtrans;
*/
void inittbl()
{
register int i;
int i;
zero_out( (char *) chk, (size_t) (current_max_xpairs * sizeof( int )) );
@ -517,10 +517,10 @@ void mkdeftbl()
*/
void mkentry( state, numchars, statenum, deflink, totaltrans )
register int *state;
int *state;
int numchars, statenum, deflink, totaltrans;
{
register int minec, maxec, i, baseaddr;
int minec, maxec, i, baseaddr;
int tblbase, tbllast;
if ( totaltrans == 0 )
@ -794,8 +794,8 @@ int qelm;
void place_state( state, statenum, transnum )
int *state, statenum, transnum;
{
register int i;
register int *state_ptr;
int i;
int *state_ptr;
int position = find_table_space( state, transnum );
/* "base" is the table of start positions. */
@ -869,8 +869,8 @@ int statenum, sym, nextstate, deflink;
int tbldiff( state, pr, ext )
int state[], pr, ext[];
{
register int i, *sp = state, *ep = ext, *protp;
register int numdiff = 0;
int i, *sp = state, *ep = ext, *protp;
int numdiff = 0;
protp = &protsave[numecs * (pr - 1)];