Apply still relevant local changes.
r124183: Work around a `label defined but not used' warning. r179549: De-register declarations. r179657: De-register declarations in non-dot-c files. r181269: Mark yy_fatal_error() as __dead2. r228992: Spelling fixes. r240518: Correct double "the the".
This commit is contained in:
parent
3e102307b7
commit
e1fc19713a
@ -613,7 +613,7 @@ Changes between release 2.4.3 (03Dec93) and release 2.4.2:
|
||||
sources. One side-effect of this change is that -+ and -CF
|
||||
are now incompatible.
|
||||
|
||||
- libfl.a now supplies private versions of the the <string.h>/
|
||||
- libfl.a now supplies private versions of the <string.h>/
|
||||
<strings.h> string routines needed by flex and the scanners
|
||||
it generates, to enhance portability to some BSD systems.
|
||||
|
||||
@ -944,7 +944,7 @@ User-visible:
|
||||
given. To specify an end-of-file action for just the initial
|
||||
state, use <INITIAL><<EOF>>.
|
||||
|
||||
- -d debug output is now contigent on the global yy_flex_debug
|
||||
- -d debug output is now contingent on the global yy_flex_debug
|
||||
being set to a non-zero value, which it is by default.
|
||||
|
||||
- A new macro, YY_USER_INIT, is provided for the user to specify
|
||||
@ -987,7 +987,7 @@ Things which didn't used to be documented but now are:
|
||||
- yy_switch_to_buffer() can be used in the yywrap() macro/routine.
|
||||
|
||||
- flex scanners do not use stdio for their input, and hence when
|
||||
writing an interactive scanner one must explictly call fflush()
|
||||
writing an interactive scanner one must explicitly call fflush()
|
||||
after writing out a prompt.
|
||||
|
||||
- flex scanner can be made reentrant (after a fashion) by using
|
||||
|
@ -92,13 +92,13 @@ void ccladd (cclp, ch)
|
||||
|
||||
static void dump_cclp (FILE* file, int cclp)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
putc ('[', file);
|
||||
|
||||
for (i = 0; i < csize; ++i) {
|
||||
if (ccl_contains(cclp, i)){
|
||||
register int start_char = i;
|
||||
int start_char = i;
|
||||
|
||||
putc (' ', file);
|
||||
|
||||
@ -244,13 +244,13 @@ void list_character_set (file, cset)
|
||||
FILE *file;
|
||||
int cset[];
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
putc ('[', file);
|
||||
|
||||
for (i = 0; i < csize; ++i) {
|
||||
if (cset[i]) {
|
||||
register int start_char = i;
|
||||
int start_char = i;
|
||||
|
||||
putc (' ', file);
|
||||
|
||||
|
@ -101,12 +101,12 @@ void check_trailing_context (nfa_states, num_states, accset, nacc)
|
||||
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 */
|
||||
}
|
||||
@ -141,14 +141,14 @@ 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])
|
||||
@ -191,7 +191,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) {
|
||||
@ -238,7 +238,7 @@ void dump_transitions (file, 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;
|
||||
@ -824,7 +824,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)
|
||||
|
@ -139,7 +139,7 @@ void mkeccl (ccls, lenccl, fwd, bck, llsiz, NUL_mapping)
|
||||
|
||||
for (i = fwd[cclm]; i != NIL && i <= llsiz; i = fwd[i]) { /* 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;
|
||||
|
@ -195,6 +195,12 @@ m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
|
||||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#define __dead2
|
||||
#endif
|
||||
|
||||
/* begin standard C headers. */
|
||||
%if-c-only
|
||||
#include <stdio.h>
|
||||
@ -739,7 +745,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
|
||||
static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state M4_YY_PROTO_LAST_ARG);
|
||||
static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
|
||||
static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG );
|
||||
static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG ) __dead2;
|
||||
]])
|
||||
|
||||
%endif
|
||||
@ -1260,9 +1266,9 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
*/
|
||||
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;
|
||||
M4_YY_DECL_GUTS_VAR();
|
||||
|
||||
m4_ifdef( [[M4_YY_NOT_REENTRANT]],
|
||||
@ -1610,9 +1616,9 @@ int yyFlexLexer::yy_get_next_buffer()
|
||||
%endif
|
||||
{
|
||||
M4_YY_DECL_GUTS_VAR();
|
||||
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
register char *source = YY_G(yytext_ptr);
|
||||
register int number_to_move, i;
|
||||
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
char *source = YY_G(yytext_ptr);
|
||||
int number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )
|
||||
@ -1758,8 +1764,8 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
|
||||
yy_state_type yyFlexLexer::yy_get_previous_state()
|
||||
%endif
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp;
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp;
|
||||
M4_YY_DECL_GUTS_VAR();
|
||||
|
||||
%% [15.0] code to get the start state into yy_current_state goes here
|
||||
@ -1785,7 +1791,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
|
||||
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
|
||||
%endif
|
||||
{
|
||||
register int yy_is_jam;
|
||||
int yy_is_jam;
|
||||
M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */
|
||||
%% [17.0] code to find the next state, and perhaps do backing up, goes here
|
||||
|
||||
@ -1797,13 +1803,13 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
|
||||
%if-c-only
|
||||
m4_ifdef( [[M4_YY_NO_UNPUT]],,
|
||||
[[
|
||||
static void yyunput YYFARGS2( int,c, register char *,yy_bp)
|
||||
static void yyunput YYFARGS2( int,c, char *,yy_bp)
|
||||
%endif
|
||||
%if-c++-only
|
||||
void yyFlexLexer::yyunput( int c, register char* yy_bp)
|
||||
void yyFlexLexer::yyunput( int c, char* yy_bp)
|
||||
%endif
|
||||
{
|
||||
register char *yy_cp;
|
||||
char *yy_cp;
|
||||
M4_YY_DECL_GUTS_VAR();
|
||||
|
||||
yy_cp = YY_G(yy_c_buf_p);
|
||||
@ -1814,10 +1820,10 @@ m4_ifdef( [[M4_YY_NO_UNPUT]],,
|
||||
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
/* +2 for EOB chars. */
|
||||
register yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
|
||||
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
yy_size_t number_to_move = YY_G(yy_n_chars) + 2;
|
||||
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
||||
register char *source =
|
||||
char *source =
|
||||
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
@ -2951,7 +2957,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
@ -2963,7 +2969,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
#ifdef YY_NEED_STRLEN
|
||||
static int yy_flex_strlen YYFARGS1( yyconst char *,s)
|
||||
{
|
||||
register int n;
|
||||
int n;
|
||||
for ( n = 0; s[n]; ++n )
|
||||
;
|
||||
|
||||
|
@ -380,7 +380,7 @@ char *alloca ();
|
||||
* use_read - if true (-f, -F, or -Cr) then use read() for scanner input;
|
||||
* otherwise, use fread().
|
||||
* yytext_is_array - if true (i.e., %array directive), then declare
|
||||
* yytext as a array instead of a character pointer. Nice and inefficient.
|
||||
* yytext as an array instead of a character pointer. Nice and inefficient.
|
||||
* do_yywrap - do yywrap() processing on EOF. If false, EOF treated as
|
||||
* "no more files".
|
||||
* csize - size of character set for the scanner we're generating;
|
||||
@ -843,10 +843,10 @@ extern void action_define PROTO ((const char *defname, int value));
|
||||
extern void add_action PROTO ((const char *new_text));
|
||||
|
||||
/* True if a string is all lower case. */
|
||||
extern int all_lower PROTO ((register char *));
|
||||
extern int all_lower PROTO ((char *));
|
||||
|
||||
/* True if a string is all upper case. */
|
||||
extern int all_upper PROTO ((register char *));
|
||||
extern int all_upper PROTO ((char *));
|
||||
|
||||
/* Compare two integers for use by qsort. */
|
||||
extern int intcmp PROTO ((const void *, const void *));
|
||||
@ -858,10 +858,10 @@ extern void check_char PROTO ((int c));
|
||||
extern Char clower PROTO ((int));
|
||||
|
||||
/* Returns a dynamically allocated copy of a string. */
|
||||
extern char *copy_string PROTO ((register const char *));
|
||||
extern char *copy_string PROTO ((const char *));
|
||||
|
||||
/* Returns a dynamically allocated copy of a (potentially) unsigned string. */
|
||||
extern Char *copy_unsigned_string PROTO ((register Char *));
|
||||
extern Char *copy_unsigned_string PROTO ((Char *));
|
||||
|
||||
/* Compare two characters for use by qsort with '\0' sorting last. */
|
||||
extern int cclcmp PROTO ((const void *, const void *));
|
||||
@ -922,7 +922,7 @@ extern void mark_defs1 PROTO ((void));
|
||||
/* Mark the current position in the action array as the end of the prolog. */
|
||||
extern void mark_prolog PROTO ((void));
|
||||
|
||||
/* Generate a data statment for a two-dimensional array. */
|
||||
/* Generate a data statement for a two-dimensional array. */
|
||||
extern void mk2data PROTO ((int));
|
||||
|
||||
extern void mkdata PROTO ((int)); /* generate a data statement */
|
||||
@ -987,7 +987,7 @@ extern int link_machines PROTO ((int, int));
|
||||
/* Mark each "beginning" state in a machine as being a "normal" (i.e.,
|
||||
* not trailing context associated) state.
|
||||
*/
|
||||
extern void mark_beginning_as_normal PROTO ((register int));
|
||||
extern void mark_beginning_as_normal PROTO ((int));
|
||||
|
||||
/* Make a machine that branches to two machines. */
|
||||
extern int mkbranch PROTO ((int, int));
|
||||
|
@ -81,7 +81,7 @@ static const char *get_state_decl (void)
|
||||
|
||||
void do_indent ()
|
||||
{
|
||||
register int i = indent_level * 8;
|
||||
int i = indent_level * 8;
|
||||
|
||||
while (i >= 8) {
|
||||
outc ('\t');
|
||||
@ -201,7 +201,7 @@ void gen_bu_action ()
|
||||
|
||||
static struct yytbl_data *mkctbl (void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
struct yytbl_data *tbl = 0;
|
||||
flex_int32_t *tdata = 0, curr = 0;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
@ -332,7 +332,7 @@ static struct yytbl_data *mkssltbl (void)
|
||||
|
||||
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. */
|
||||
@ -433,7 +433,7 @@ void genctbl ()
|
||||
|
||||
struct yytbl_data *mkecstbl (void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
struct yytbl_data *tbl = 0;
|
||||
flex_int32_t *tdata = 0;
|
||||
|
||||
@ -462,7 +462,7 @@ struct yytbl_data *mkecstbl (void)
|
||||
|
||||
void genecs ()
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
int numrows;
|
||||
|
||||
out_str_dec (get_int32_decl (), "yy_ec", csize);
|
||||
@ -507,6 +507,7 @@ void gen_find_action ()
|
||||
indent_puts ("yy_current_state = *--YY_G(yy_state_ptr);");
|
||||
indent_puts ("YY_G(yy_lp) = yy_accept[yy_current_state];");
|
||||
|
||||
outn ("goto find_rule; /* avoid `defined but not used' warning */");
|
||||
outn ("find_rule: /* we branch to this label when backing up */");
|
||||
|
||||
indent_puts
|
||||
@ -637,7 +638,7 @@ void gen_find_action ()
|
||||
|
||||
struct yytbl_data *mkftbl (void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
struct yytbl_data *tbl;
|
||||
flex_int32_t *tdata = 0;
|
||||
@ -654,7 +655,7 @@ struct yytbl_data *mkftbl (void)
|
||||
dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
|
||||
|
||||
for (i = 1; i <= lastdfa; ++i) {
|
||||
register int anum = dfaacc[i].dfaacc_state;
|
||||
int anum = dfaacc[i].dfaacc_state;
|
||||
|
||||
tdata[i] = anum;
|
||||
|
||||
@ -674,7 +675,7 @@ struct yytbl_data *mkftbl (void)
|
||||
|
||||
void genftbl ()
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
|
||||
out_str_dec (long_align ? get_int32_decl () : get_int16_decl (),
|
||||
@ -683,7 +684,7 @@ void genftbl ()
|
||||
dfaacc[end_of_buffer_state].dfaacc_state = end_of_buffer_action;
|
||||
|
||||
for (i = 1; i <= lastdfa; ++i) {
|
||||
register int anum = dfaacc[i].dfaacc_state;
|
||||
int anum = dfaacc[i].dfaacc_state;
|
||||
|
||||
mkdata (anum);
|
||||
|
||||
@ -708,7 +709,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
|
||||
@ -794,8 +795,8 @@ void gen_next_match ()
|
||||
else if (fullspd) {
|
||||
indent_puts ("{");
|
||||
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])->");
|
||||
@ -938,7 +939,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_G(yy_c_buf_p);");
|
||||
indent_puts ("char *yy_cp = YY_G(yy_c_buf_p);");
|
||||
|
||||
outc ('\n');
|
||||
|
||||
@ -959,10 +960,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;");
|
||||
@ -1319,7 +1320,7 @@ void gentabs ()
|
||||
yybase_curr = 1;
|
||||
|
||||
for (i = 1; i <= lastdfa; ++i) {
|
||||
register int d = def[i];
|
||||
int d = def[i];
|
||||
|
||||
if (base[i] == JAMSTATE)
|
||||
base[i] = jambase;
|
||||
@ -1501,7 +1502,7 @@ void indent_puts (str)
|
||||
|
||||
void make_tables ()
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int did_eof_rule = false;
|
||||
struct yytbl_data *yynultrans_tbl;
|
||||
|
||||
|
@ -168,7 +168,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);
|
||||
@ -183,7 +183,7 @@ void *allocate_array (size, element_size)
|
||||
/* all_lower - true if a string is all lower-case */
|
||||
|
||||
int all_lower (str)
|
||||
register char *str;
|
||||
char *str;
|
||||
{
|
||||
while (*str) {
|
||||
if (!isascii ((Char) * str) || !islower ((Char) * str))
|
||||
@ -198,7 +198,7 @@ int all_lower (str)
|
||||
/* all_upper - true if a string is all upper-case */
|
||||
|
||||
int all_upper (str)
|
||||
register char *str;
|
||||
char *str;
|
||||
{
|
||||
while (*str) {
|
||||
if (!isascii ((Char) * str) || !isupper ((Char) * str))
|
||||
@ -241,7 +241,7 @@ void check_char (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);
|
||||
}
|
||||
@ -250,10 +250,10 @@ Char clower (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;
|
||||
|
||||
@ -278,9 +278,9 @@ char *copy_string (str)
|
||||
*/
|
||||
|
||||
Char *copy_unsigned_string (str)
|
||||
register Char *str;
|
||||
Char *str;
|
||||
{
|
||||
register Char *c;
|
||||
Char *c;
|
||||
Char *copy;
|
||||
|
||||
/* find length */
|
||||
@ -740,13 +740,13 @@ void out_m4_define (const char* def, const char* val)
|
||||
}
|
||||
|
||||
|
||||
/* readable_form - return the the human-readable form of a character
|
||||
/* readable_form - return the human-readable form of a character
|
||||
*
|
||||
* The returned string is in static storage.
|
||||
*/
|
||||
|
||||
char *readable_form (c)
|
||||
register int c;
|
||||
int c;
|
||||
{
|
||||
static char rform[10];
|
||||
|
||||
@ -795,7 +795,7 @@ void *reallocate_array (array, size, element_size)
|
||||
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);
|
||||
@ -991,7 +991,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;
|
||||
|
@ -329,7 +329,7 @@ int link_machines (first, last)
|
||||
*/
|
||||
|
||||
void mark_beginning_as_normal (mach)
|
||||
register int mach;
|
||||
int mach;
|
||||
{
|
||||
switch (state_type[mach]) {
|
||||
case STATE_NORMAL:
|
||||
|
@ -953,7 +953,7 @@ string : string CHAR
|
||||
|
||||
void build_eof_action()
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
char action_text[MAXLINE];
|
||||
|
||||
for ( i = 1; i <= scon_stk_ptr; ++i )
|
||||
|
@ -661,7 +661,7 @@ M4QEND "]]"
|
||||
* context.
|
||||
*/
|
||||
"{"{NAME}"}"[[:space:]]? {
|
||||
register Char *nmdefptr;
|
||||
Char *nmdefptr;
|
||||
int end_is_ws, end_ch;
|
||||
|
||||
end_ch = yytext[yyleng-1];
|
||||
|
@ -59,12 +59,12 @@ static struct hash_entry *ccltab[CCL_HASH_SIZE];
|
||||
|
||||
/* declare functions that have forward references */
|
||||
|
||||
static int addsym PROTO ((register char[], char *, int, hash_table, int));
|
||||
static struct hash_entry *findsym PROTO ((register const char *sym,
|
||||
static int addsym PROTO ((char[], char *, int, hash_table, int));
|
||||
static struct hash_entry *findsym PROTO ((const char *sym,
|
||||
hash_table table,
|
||||
|
||||
int table_size));
|
||||
static int hashfunct PROTO ((register const char *, int));
|
||||
static int hashfunct PROTO ((const char *, int));
|
||||
|
||||
|
||||
/* addsym - add symbol and definitions to symbol table
|
||||
@ -73,16 +73,16 @@ static int hashfunct PROTO ((register const char *, int));
|
||||
*/
|
||||
|
||||
static 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) {
|
||||
if (!strcmp (sym, sym_entry->name)) { /* entry already exists */
|
||||
@ -147,7 +147,7 @@ int ccllookup (ccltxt)
|
||||
/* findsym - find symbol in symbol table */
|
||||
|
||||
static struct hash_entry *findsym (sym, table, table_size)
|
||||
register const char *sym;
|
||||
const char *sym;
|
||||
hash_table table;
|
||||
int table_size;
|
||||
{
|
||||
@ -155,7 +155,7 @@ static struct hash_entry *findsym (sym, table, 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)];
|
||||
|
||||
@ -171,11 +171,11 @@ static struct hash_entry *findsym (sym, table, table_size)
|
||||
/* hashfunct - compute the hash value for "str" and hash size "hash_size" */
|
||||
|
||||
static int hashfunct (str, hash_size)
|
||||
register const char *str;
|
||||
const char *str;
|
||||
int hash_size;
|
||||
{
|
||||
register int hashval;
|
||||
register int locstr;
|
||||
int hashval;
|
||||
int locstr;
|
||||
|
||||
hashval = 0;
|
||||
locstr = 0;
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
/* 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));
|
||||
@ -224,7 +224,7 @@ void bldtbl (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;
|
||||
@ -291,7 +291,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;
|
||||
|
||||
@ -330,9 +330,9 @@ int find_table_space (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.
|
||||
@ -421,7 +421,7 @@ int find_table_space (state, numtrans)
|
||||
*/
|
||||
void inittbl ()
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
zero_out ((char *) chk,
|
||||
|
||||
@ -494,17 +494,17 @@ void mkdeftbl ()
|
||||
* (i.e., jam entries) into the table. It is assumed that by linking to
|
||||
* "JAMSTATE" they will be taken care of. In any case, entries in "state"
|
||||
* marking transitions to "SAME_TRANS" are treated as though they will be
|
||||
* taken care of by whereever "deflink" points. "totaltrans" is the total
|
||||
* taken care of by wherever "deflink" points. "totaltrans" is the total
|
||||
* number of transitions out of the state. If it is below a certain threshold,
|
||||
* the tables are searched for an interior spot that will accommodate the
|
||||
* state array.
|
||||
*/
|
||||
|
||||
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) { /* there are no out-transitions */
|
||||
@ -762,8 +762,8 @@ void mv2front (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. */
|
||||
@ -835,8 +835,8 @@ void stack1 (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)];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user