Various cleanup and de-warning (although HOST_WARN is still NO).
This commit is contained in:
@@ -3,29 +3,20 @@
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
TOP=../../..
|
||||
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
|
||||
HOST_WARN=NO
|
||||
|
||||
|
||||
YACC = $(EYACC)
|
||||
YACCOPT = -l -d
|
||||
|
||||
SKELETON_FILE=include/flex.skel.static
|
||||
SKELETON_FILE = include/flex.skel.static
|
||||
|
||||
# ARCH_CLASS hp700 needs special flags,
|
||||
# everything else uses DEFAULT:
|
||||
#
|
||||
USR_CPPFLAGS_DEFAULT := -DUSG
|
||||
USR_CPPFLAGS_hp700 := -DSCO_UNIX
|
||||
|
||||
# This applies to all arch.classes:
|
||||
#
|
||||
USR_CPPFLAGS = -DDEFAULT_SKELETON_FILE="\"$(SKELETON_FILE)\""
|
||||
|
||||
INC += flex.skel.static
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* ccl - routines for character classes */
|
||||
@@ -145,7 +144,7 @@ void cclnegate(int cclp)
|
||||
|
||||
void list_character_set(FILE *file, int cset[])
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
char *readable_form();
|
||||
|
||||
putc( '[', file );
|
||||
@@ -154,7 +153,7 @@ void list_character_set(FILE *file, int cset[])
|
||||
{
|
||||
if ( cset[i] )
|
||||
{
|
||||
register int start_char = i;
|
||||
int start_char = i;
|
||||
|
||||
putc( ' ', file );
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* dfa - DFA construction routines */
|
||||
@@ -106,15 +105,15 @@ void check_for_backtracking(int ds, int state[])
|
||||
* accset[1 .. nacc] is the list of accepting numbers for the DFA state.
|
||||
*/
|
||||
|
||||
void check_trailing_context(int *nfa_states, int num_states, int *accset, register int nacc)
|
||||
void check_trailing_context(int *nfa_states, int 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 */
|
||||
@@ -154,15 +153,15 @@ void check_trailing_context(int *nfa_states, int num_states, int *accset, regist
|
||||
|
||||
void dump_associated_rules(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 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] )
|
||||
@@ -206,7 +205,7 @@ void dump_associated_rules(FILE *file, int ds)
|
||||
|
||||
void dump_transitions(FILE *file, int state[])
|
||||
{
|
||||
register int i, ec;
|
||||
int i, ec;
|
||||
int out_char_set[CSIZE];
|
||||
|
||||
for ( i = 0; i < csize; ++i )
|
||||
@@ -254,7 +253,7 @@ void dump_transitions(FILE *file, int state[])
|
||||
|
||||
int *epsclosure(int *t, int *ns_addr, int accset[], int *nacc_addr, int *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;
|
||||
@@ -405,7 +404,7 @@ void ntod(void)
|
||||
{
|
||||
int *accset, ds, nacc, newds;
|
||||
int sym, hashval, numstates, dsize;
|
||||
int num_full_table_rows; /* used only for -f */
|
||||
int num_full_table_rows = 0; /* used only for -f */
|
||||
int *nset, *dset;
|
||||
int targptr, totaltrans, i, comstate, comfreq, targ;
|
||||
int *epsclosure(int *t, int *ns_addr, int *accset, int *nacc_addr, int *hv_addr);
|
||||
@@ -673,7 +672,7 @@ void ntod(void)
|
||||
|
||||
if ( caseins && ! useecs )
|
||||
{
|
||||
register int j;
|
||||
int j;
|
||||
|
||||
for ( i = 'A', j = 'a'; i <= 'Z'; ++i, ++j )
|
||||
state[i] = state[j];
|
||||
@@ -769,7 +768,7 @@ void ntod(void)
|
||||
int snstods(int sns[], int numstates, int accset[], int nacc, int hashval, int *newds_addr)
|
||||
{
|
||||
int didsort = 0;
|
||||
register int i, j;
|
||||
int i, j;
|
||||
int newds, *oldsns;
|
||||
|
||||
for ( i = 1; i <= lastdfa; ++i )
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* ecs - equivalence class routines */
|
||||
@@ -263,7 +262,7 @@ void mkeccl(unsigned char ccls[], int lenccl, int fwd[], int bck[], int llsiz, 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;
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* flexdef - definitions file for flex */
|
||||
@@ -37,8 +36,18 @@
|
||||
|
||||
/* @(#) $Header$ (LBL) */
|
||||
|
||||
#ifndef FILE
|
||||
#ifndef INC_flexdef_H
|
||||
#define INC_flexdef_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
|
||||
/* always be prepared to generate an 8-bit scanner */
|
||||
@@ -57,57 +66,6 @@
|
||||
#define DEFAULT_CSIZE 128
|
||||
#endif
|
||||
|
||||
#ifdef USG
|
||||
#define SYS_V
|
||||
#endif
|
||||
|
||||
#ifdef SYS_V
|
||||
#include <string.h>
|
||||
#else
|
||||
|
||||
#include <strings.h>
|
||||
#ifdef lint
|
||||
char *sprintf(); /* keep lint happy */
|
||||
#endif
|
||||
#ifdef SCO_UNIX
|
||||
void *memset();
|
||||
#else
|
||||
#if !defined(ultrix) && !defined(NeXT) && !defined(sgi) && !defined(hppa) && !defined(__osf__)
|
||||
char *memset(void *, int, size_t);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef bzero
|
||||
#ifdef AMIGA
|
||||
#define bzero(s, n) setmem((char *)(s), n, '\0')
|
||||
#ifndef abs
|
||||
#define abs(x) ((x) < 0 ? -(x) : (x))
|
||||
#endif
|
||||
#else
|
||||
#define bzero(s, n) (void) memset((char *)(s), '\0', n)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#define unlink delete
|
||||
#define SHORT_FILE_NAMES
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <stddef.h>
|
||||
void *malloc( size_t );
|
||||
void free( void* );
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#else /* ! __STDC__ */
|
||||
char *malloc(), *realloc();
|
||||
#endif
|
||||
|
||||
|
||||
/* maximum line length we'll have to deal with */
|
||||
#define MAXLINE BUFSIZ
|
||||
@@ -122,13 +80,6 @@ char *malloc(), *realloc();
|
||||
#define max(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifdef MS_DOS
|
||||
#ifndef abs
|
||||
#define abs(x) ((x) < 0 ? -(x) : (x))
|
||||
#endif
|
||||
#define SHORT_FILE_NAMES
|
||||
#endif
|
||||
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
@@ -718,7 +669,7 @@ extern void make_tables (void); /* generate transition tables */
|
||||
|
||||
/* from file main.c */
|
||||
|
||||
extern void flexend (int);
|
||||
extern void flexend (int) NORETURN;
|
||||
|
||||
|
||||
/* from file misc.c */
|
||||
@@ -727,10 +678,10 @@ extern void flexend (int);
|
||||
extern void action_out (void);
|
||||
|
||||
/* true if a string is all lower case */
|
||||
extern int all_lower (register Char *);
|
||||
extern int all_lower (Char *);
|
||||
|
||||
/* true if a string is all upper case */
|
||||
extern int all_upper (register Char *);
|
||||
extern int all_upper (Char *);
|
||||
|
||||
/* bubble sort an integer array */
|
||||
extern void bubble (int [], int);
|
||||
@@ -741,7 +692,7 @@ extern void cshell (Char [], int, int);
|
||||
extern void dataend (void); /* finish up a block of data declarations */
|
||||
|
||||
/* report an error message and terminate */
|
||||
extern void flexerror (char[]);
|
||||
extern void flexerror (char[]) NORETURN;
|
||||
|
||||
/* report a fatal error message and terminate */
|
||||
extern void flexfatal (char[]);
|
||||
@@ -790,7 +741,7 @@ extern int link_machines (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 (register int);
|
||||
extern void mark_beginning_as_normal (int);
|
||||
|
||||
/* make a machine that branches to two machines */
|
||||
extern int mkbranch (int, int);
|
||||
@@ -881,3 +832,7 @@ extern int read (int, char*, int);
|
||||
extern int unlink (char*);
|
||||
#endif
|
||||
extern int write (int, char*, int);
|
||||
|
||||
|
||||
#endif /* INC_flexdef_H */
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* gen - actual generation (writing) of flex scanners */
|
||||
@@ -70,7 +69,7 @@ static char C_state_decl[] =
|
||||
|
||||
void do_indent(void)
|
||||
{
|
||||
register int i = indent_level * 4;
|
||||
int i = indent_level * 4;
|
||||
|
||||
while ( i >= 8 )
|
||||
{
|
||||
@@ -144,7 +143,7 @@ void gen_bt_action(void)
|
||||
|
||||
void genctbl(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
|
||||
/* table of verify for transition and offset to next state */
|
||||
@@ -179,7 +178,7 @@ void genctbl(void)
|
||||
/* make sure every state has a end-of-buffer transition and an action # */
|
||||
for ( i = 0; i <= lastdfa; ++i )
|
||||
{
|
||||
register int anum = dfaacc[i].dfaacc_state;
|
||||
int anum = dfaacc[i].dfaacc_state;
|
||||
|
||||
chk[base[i]] = EOB_POSITION;
|
||||
chk[base[i] - 1] = ACTION_POSITION;
|
||||
@@ -228,7 +227,7 @@ void genctbl(void)
|
||||
|
||||
void genecs(void)
|
||||
{
|
||||
register int i, j;
|
||||
int i, j;
|
||||
static char C_char_decl[] = "static const %s %s[%d] =\n { 0,\n";
|
||||
int numrows;
|
||||
Char clower();
|
||||
@@ -396,7 +395,7 @@ void gen_find_action(void)
|
||||
|
||||
void genftbl(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int end_of_buffer_action = num_rules + 1;
|
||||
|
||||
printf( C_short_decl, "yy_accept", lastdfa + 1 );
|
||||
@@ -406,7 +405,7 @@ void genftbl(void)
|
||||
|
||||
for ( i = 1; i <= lastdfa; ++i )
|
||||
{
|
||||
register int anum = dfaacc[i].dfaacc_state;
|
||||
int anum = dfaacc[i].dfaacc_state;
|
||||
|
||||
mkdata( anum );
|
||||
|
||||
@@ -429,7 +428,7 @@ void genftbl(void)
|
||||
|
||||
void gen_next_compressed_state(char *char_map)
|
||||
{
|
||||
indent_put2s( "register YY_CHAR yy_c = %s;", char_map );
|
||||
indent_put2s( "YY_CHAR yy_c = %s;", char_map );
|
||||
|
||||
/* save the backtracking info \before/ computing the next state
|
||||
* because we always compute one more state than needed - we
|
||||
@@ -508,8 +507,8 @@ void gen_next_match(void)
|
||||
else if ( fullspd )
|
||||
{
|
||||
indent_puts( "{" );
|
||||
indent_puts( "register const struct yy_trans_info *yy_trans_info;\n" );
|
||||
indent_puts( "register YY_CHAR yy_c;\n" );
|
||||
indent_puts( "const 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[yy_c])->yy_verify == yy_c;" );
|
||||
@@ -629,7 +628,7 @@ void gen_NUL_trans(void)
|
||||
|
||||
if ( need_backtracking )
|
||||
/* we'll need yy_cp lying around for the gen_backtracking() */
|
||||
indent_puts( "register YY_CHAR *yy_cp = yy_c_buf_p;" );
|
||||
indent_puts( "YY_CHAR *yy_cp = yy_c_buf_p;" );
|
||||
|
||||
putchar( '\n' );
|
||||
|
||||
@@ -650,10 +649,10 @@ void gen_NUL_trans(void)
|
||||
else if ( fullspd )
|
||||
{
|
||||
do_indent();
|
||||
printf( "register int yy_c = %d;\n", NUL_ec );
|
||||
printf( "int yy_c = %d;\n", NUL_ec );
|
||||
|
||||
indent_puts(
|
||||
"register const struct yy_trans_info *yy_trans_info;\n" );
|
||||
"const struct yy_trans_info *yy_trans_info;\n" );
|
||||
indent_puts( "yy_trans_info = &yy_current_state[yy_c];" );
|
||||
indent_puts( "yy_current_state += yy_trans_info->yy_nxt;" );
|
||||
|
||||
@@ -901,7 +900,7 @@ void gentabs(void)
|
||||
|
||||
for ( i = 1; i <= lastdfa; ++i )
|
||||
{
|
||||
register int d = def[i];
|
||||
int d = def[i];
|
||||
|
||||
if ( base[i] == JAMSTATE )
|
||||
base[i] = jambase;
|
||||
@@ -999,7 +998,7 @@ void indent_puts(char *str)
|
||||
|
||||
void make_tables(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
int did_eof_rule = false;
|
||||
|
||||
skelout();
|
||||
@@ -1304,7 +1303,7 @@ void make_tables(void)
|
||||
skelout();
|
||||
|
||||
if ( bol_needed )
|
||||
indent_puts( "register YY_CHAR *yy_bp = yytext;\n" );
|
||||
indent_puts( "YY_CHAR *yy_bp = yytext;\n" );
|
||||
|
||||
gen_start_state();
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* libmain - flex run-time support library "main" function */
|
||||
@@ -13,10 +12,7 @@
|
||||
|
||||
extern int yylex();
|
||||
|
||||
int main( argc, argv )
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
||||
{
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return yylex();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* flex - tool to generate fast lexical analyzers */
|
||||
@@ -58,8 +57,8 @@ static char flex_version[] = "2.3";
|
||||
/* declare functions that have forward references */
|
||||
|
||||
void flexinit (int, char**);
|
||||
void readin ();
|
||||
void set_up_initial_allocations ();
|
||||
void readin (void);
|
||||
void set_up_initial_allocations (void);
|
||||
|
||||
|
||||
/* these globals are all defined and commented in flexdef.h */
|
||||
@@ -118,11 +117,8 @@ static int use_stdout;
|
||||
static char *skelname = NULL;
|
||||
|
||||
|
||||
int main( argc, argv )
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
{
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
flexinit( argc, argv );
|
||||
|
||||
readin();
|
||||
@@ -182,7 +178,7 @@ char **argv;
|
||||
flexend( 0 );
|
||||
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* flexend - terminate flex
|
||||
@@ -197,10 +193,8 @@ char **argv;
|
||||
* This routine does not return.
|
||||
*/
|
||||
|
||||
void flexend( status )
|
||||
int status;
|
||||
|
||||
{
|
||||
void flexend(int status)
|
||||
{
|
||||
int tblsiz;
|
||||
char *flex_gettime();
|
||||
|
||||
@@ -389,7 +383,7 @@ int status;
|
||||
#else
|
||||
exit( status + 1 );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* flexinit - initialize flex
|
||||
@@ -400,11 +394,8 @@ int status;
|
||||
* flexinit( argc, argv );
|
||||
*/
|
||||
|
||||
void flexinit( argc, argv )
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
{
|
||||
void flexinit(int argc, char **argv)
|
||||
{
|
||||
int i, sawcmpflag;
|
||||
char *arg, *flex_gettime(), *mktemp();
|
||||
|
||||
@@ -657,7 +648,7 @@ get_next_arg: /* used by -C and -S flags in lieu of a "continue 2" control */
|
||||
}
|
||||
|
||||
set_up_initial_allocations();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* readin - read in the rules section of the input file(s)
|
||||
@@ -666,9 +657,8 @@ get_next_arg: /* used by -C and -S flags in lieu of a "continue 2" control */
|
||||
* readin();
|
||||
*/
|
||||
|
||||
void readin()
|
||||
|
||||
{
|
||||
void readin(void)
|
||||
{
|
||||
skelout();
|
||||
|
||||
if ( ddebug )
|
||||
@@ -705,15 +695,14 @@ void readin()
|
||||
|
||||
if ( useecs )
|
||||
ccl2ecl();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* set_up_initial_allocations - allocate memory for internal tables */
|
||||
|
||||
void set_up_initial_allocations()
|
||||
|
||||
{
|
||||
void set_up_initial_allocations(void)
|
||||
{
|
||||
current_mns = INITIAL_MNS;
|
||||
firstst = allocate_integer_array( current_mns );
|
||||
lastst = allocate_integer_array( current_mns );
|
||||
@@ -764,4 +753,4 @@ void set_up_initial_allocations()
|
||||
dfaacc = allocate_dfaacc_union( current_max_dfas );
|
||||
|
||||
nultrans = (int *) 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* misc - miscellaneous flex routines */
|
||||
@@ -81,7 +80,7 @@ void action_out(void)
|
||||
|
||||
void *allocate_array(int size, int element_size)
|
||||
{
|
||||
register void *mem;
|
||||
void *mem;
|
||||
|
||||
/* on 16-bit int machines (e.g., 80286) we might be trying to
|
||||
* allocate more than a signed int can hold, and that won't
|
||||
@@ -107,7 +106,7 @@ void *allocate_array(int size, int element_size)
|
||||
* true/false = all_lower( str );
|
||||
*/
|
||||
|
||||
int all_lower(register Char *str)
|
||||
int all_lower(Char *str)
|
||||
{
|
||||
while ( *str )
|
||||
{
|
||||
@@ -128,7 +127,7 @@ int all_lower(register Char *str)
|
||||
* true/false = all_upper( str );
|
||||
*/
|
||||
|
||||
int all_upper(register Char *str)
|
||||
int all_upper(Char *str)
|
||||
{
|
||||
while ( *str )
|
||||
{
|
||||
@@ -157,7 +156,7 @@ int all_upper(register Char *str)
|
||||
|
||||
void bubble(int v[], int n)
|
||||
{
|
||||
register int i, j, k;
|
||||
int i, j, k;
|
||||
|
||||
for ( i = n; i > 1; --i )
|
||||
for ( j = 1; j < i; ++j )
|
||||
@@ -178,7 +177,7 @@ void bubble(int v[], int n)
|
||||
* c = clower( c );
|
||||
*/
|
||||
|
||||
Char clower(register int c)
|
||||
Char clower(int c)
|
||||
{
|
||||
return ( (isascii( c ) && isupper( c )) ? tolower( c ) : c );
|
||||
}
|
||||
@@ -191,9 +190,9 @@ Char clower(register int c)
|
||||
* copy = copy_string( str );
|
||||
*/
|
||||
|
||||
char *copy_string(register char *str)
|
||||
char *copy_string(char *str)
|
||||
{
|
||||
register char *c;
|
||||
char *c;
|
||||
char *copy;
|
||||
|
||||
/* find length */
|
||||
@@ -220,9 +219,9 @@ char *copy_string(register char *str)
|
||||
* copy = copy_unsigned_string( str );
|
||||
*/
|
||||
|
||||
Char *copy_unsigned_string(register Char *str)
|
||||
Char *copy_unsigned_string(Char *str)
|
||||
{
|
||||
register Char *c;
|
||||
Char *c;
|
||||
Char *copy;
|
||||
|
||||
/* find length */
|
||||
@@ -391,7 +390,7 @@ typedef long time_t;
|
||||
char *flex_gettime(void)
|
||||
{
|
||||
time_t t, time(time_t *);
|
||||
char *result, *ctime(const time_t *), *copy_string(register char *str);
|
||||
char *result, *ctime(const time_t *), *copy_string(char *str);
|
||||
|
||||
t = time( (long *) 0 );
|
||||
|
||||
@@ -582,7 +581,7 @@ int myctoi(Char *array)
|
||||
Char myesc(Char *array)
|
||||
{
|
||||
Char c, esc_char;
|
||||
register int sptr;
|
||||
int sptr;
|
||||
|
||||
switch ( array[1] )
|
||||
{
|
||||
@@ -686,7 +685,7 @@ int otoi(Char *str)
|
||||
* The returned string is in static storage.
|
||||
*/
|
||||
|
||||
char *readable_form(register int c)
|
||||
char *readable_form(int c)
|
||||
{
|
||||
static char rform[10];
|
||||
|
||||
@@ -723,7 +722,7 @@ char *readable_form(register int c)
|
||||
|
||||
void *reallocate_array(void *array, int size, int element_size)
|
||||
{
|
||||
register void *new_array;
|
||||
void *new_array;
|
||||
|
||||
/* same worry as in allocate_array(): */
|
||||
if ( size * element_size <= 0 )
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* nfa - NFA construction routines */
|
||||
@@ -319,7 +318,7 @@ int link_machines(int first, int last)
|
||||
* The "beginning" states are the epsilon closure of the first state
|
||||
*/
|
||||
|
||||
void mark_beginning_as_normal(register int mach)
|
||||
void mark_beginning_as_normal(int mach)
|
||||
{
|
||||
switch ( state_type[mach] )
|
||||
{
|
||||
|
||||
@@ -634,7 +634,7 @@ string : string CHAR
|
||||
void build_eof_action()
|
||||
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for ( i = 1; i <= actvp; ++i )
|
||||
{
|
||||
|
||||
@@ -988,9 +988,9 @@ static int input ( void );
|
||||
|
||||
YY_DECL
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register YY_CHAR *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
yy_state_type yy_current_state;
|
||||
YY_CHAR *yy_cp, *yy_bp;
|
||||
int yy_act;
|
||||
|
||||
|
||||
static int bracelevel, didadef;
|
||||
@@ -1042,7 +1042,7 @@ YY_DECL
|
||||
yy_match:
|
||||
do
|
||||
{
|
||||
register YY_CHAR yy_c = yy_ec[(int)*yy_cp];
|
||||
YY_CHAR yy_c = yy_ec[(int)*yy_cp];
|
||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||
{
|
||||
yy_current_state = yy_def[yy_current_state];
|
||||
@@ -1277,7 +1277,7 @@ case 31:
|
||||
|
||||
for ( i = strlen( (char *) nmdef ) - 1;
|
||||
i >= 0 &&
|
||||
nmdef[i] == ' ' || nmdef[i] == '\t';
|
||||
(nmdef[i] == ' ' || nmdef[i] == '\t');
|
||||
--i )
|
||||
;
|
||||
|
||||
@@ -1517,7 +1517,7 @@ case 64:
|
||||
case 65:
|
||||
# line 333 "scan.l"
|
||||
{
|
||||
register Char *nmdefptr;
|
||||
Char *nmdefptr;
|
||||
Char *ndlookup();
|
||||
|
||||
(void) strcpy( nmstr, (char *) yytext );
|
||||
@@ -1970,9 +1970,9 @@ ECHO;
|
||||
static int yy_get_next_buffer()
|
||||
|
||||
{
|
||||
register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
|
||||
register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
|
||||
register int number_to_move, i;
|
||||
YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
|
||||
YY_CHAR *source = yytext - 1; /* copy prev. char, too */
|
||||
int number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
||||
@@ -2051,10 +2051,10 @@ static int yy_get_next_buffer()
|
||||
static yy_state_type yy_get_previous_state()
|
||||
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register YY_CHAR *yy_cp;
|
||||
yy_state_type yy_current_state;
|
||||
YY_CHAR *yy_cp;
|
||||
|
||||
register YY_CHAR *yy_bp = yytext;
|
||||
YY_CHAR *yy_bp = yytext;
|
||||
|
||||
yy_current_state = yy_start;
|
||||
if ( yy_bp[-1] == '\n' )
|
||||
@@ -2064,7 +2064,7 @@ static yy_state_type yy_get_previous_state()
|
||||
|
||||
for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
||||
{
|
||||
register YY_CHAR yy_c = (*yy_cp ? yy_ec[(int)*yy_cp] : 1);
|
||||
YY_CHAR yy_c = (*yy_cp ? yy_ec[(int)*yy_cp] : 1);
|
||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||
{
|
||||
yy_current_state = yy_def[yy_current_state];
|
||||
@@ -2085,11 +2085,11 @@ static yy_state_type yy_get_previous_state()
|
||||
* next_state = yy_try_NUL_trans( current_state );
|
||||
*/
|
||||
|
||||
static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
|
||||
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
|
||||
{
|
||||
register int yy_is_jam;
|
||||
int yy_is_jam;
|
||||
|
||||
register YY_CHAR yy_c = 1;
|
||||
YY_CHAR yy_c = 1;
|
||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||
{
|
||||
yy_current_state = yy_def[yy_current_state];
|
||||
@@ -2104,19 +2104,19 @@ static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
|
||||
}
|
||||
|
||||
|
||||
static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
|
||||
static void yyunput( YY_CHAR c, YY_CHAR *yy_bp )
|
||||
{
|
||||
register YY_CHAR *yy_cp = yy_c_buf_p;
|
||||
YY_CHAR *yy_cp = yy_c_buf_p;
|
||||
|
||||
/* undo effects of setting up yytext */
|
||||
*yy_cp = yy_hold_char;
|
||||
|
||||
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
|
||||
register YY_CHAR *dest =
|
||||
int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
|
||||
YY_CHAR *dest =
|
||||
&yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
|
||||
register YY_CHAR *source =
|
||||
YY_CHAR *source =
|
||||
&yy_current_buffer->yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > yy_current_buffer->yy_ch_buf )
|
||||
|
||||
@@ -179,7 +179,7 @@ ESCSEQ \\([^\r\n]|[0-9]{1,3}|x[0-9a-f]{1,2})
|
||||
|
||||
for ( i = strlen( (char *) nmdef ) - 1;
|
||||
i >= 0 &&
|
||||
nmdef[i] == ' ' || nmdef[i] == '\t';
|
||||
(nmdef[i] == ' ' || nmdef[i] == '\t');
|
||||
--i )
|
||||
;
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* sym - symbol table routines */
|
||||
@@ -45,14 +44,14 @@ static char rcsid[] =
|
||||
|
||||
/* declare functions that have forward references */
|
||||
|
||||
int hashfunct (register char[], int);
|
||||
int hashfunct (char[], int);
|
||||
|
||||
|
||||
struct hash_entry *ndtbl[NAME_TABLE_HASH_SIZE];
|
||||
struct hash_entry *sctbl[START_COND_HASH_SIZE];
|
||||
struct hash_entry *ccltab[CCL_HASH_SIZE];
|
||||
|
||||
struct hash_entry *findsym(register char *sym, struct hash_entry **table, int table_size);
|
||||
struct hash_entry *findsym(char *sym, struct hash_entry **table, int table_size);
|
||||
|
||||
|
||||
/* addsym - add symbol and definitions to symbol table
|
||||
@@ -67,12 +66,12 @@ struct hash_entry *findsym(register char *sym, struct hash_entry **table, int ta
|
||||
* -1 is returned if the symbol already exists, and the change not made.
|
||||
*/
|
||||
|
||||
int addsym(register char *sym, char *str_def, int int_def, struct hash_entry **table, int table_size)
|
||||
int addsym(char *sym, char *str_def, int int_def, struct hash_entry **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 )
|
||||
{
|
||||
@@ -153,9 +152,9 @@ int ccllookup(Char *ccltxt)
|
||||
* sym_entry = findsym( sym, table, table_size );
|
||||
*/
|
||||
|
||||
struct hash_entry *findsym(register char *sym, struct hash_entry **table, int table_size)
|
||||
struct hash_entry *findsym(char *sym, struct hash_entry **table, int table_size)
|
||||
{
|
||||
register struct hash_entry *sym_entry = table[hashfunct( sym, table_size )];
|
||||
struct hash_entry *sym_entry = table[hashfunct( sym, table_size )];
|
||||
static struct hash_entry empty_entry =
|
||||
{
|
||||
(struct hash_entry *) 0, (struct hash_entry *) 0, NULL, NULL, 0,
|
||||
@@ -180,10 +179,10 @@ struct hash_entry *findsym(register char *sym, struct hash_entry **table, int ta
|
||||
* hash_val = hashfunct( str, hash_size );
|
||||
*/
|
||||
|
||||
int hashfunct(register char *str, int hash_size)
|
||||
int hashfunct(char *str, int hash_size)
|
||||
{
|
||||
register int hashval;
|
||||
register int locstr;
|
||||
int hashval;
|
||||
int locstr;
|
||||
|
||||
hashval = 0;
|
||||
locstr = 0;
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* tblcmp - table compression routines */
|
||||
@@ -45,7 +44,7 @@ static char rcsid[] =
|
||||
|
||||
/* declarations for functions that have forward references */
|
||||
|
||||
void mkentry (register int*, int, int, int, int);
|
||||
void mkentry (int*, int, int, int, int);
|
||||
void mkprot (int[], int, int);
|
||||
void mktemplate (int[], int, int);
|
||||
void mv2front (int);
|
||||
@@ -234,7 +233,7 @@ void bldtbl(int *state, int statenum, int totaltrans, int comstate, int comfreq)
|
||||
void cmptmps(void)
|
||||
{
|
||||
int tmpstorage[CSIZE + 1];
|
||||
register int *tmp = tmpstorage, i, j;
|
||||
int *tmp = tmpstorage, i, j;
|
||||
int totaltrans, trans;
|
||||
|
||||
peakpairs = numtemps * numecs + tblend;
|
||||
@@ -304,7 +303,7 @@ void cmptmps(void)
|
||||
|
||||
void expand_nxt_chk(void)
|
||||
{
|
||||
register int old_max = current_max_xpairs;
|
||||
int old_max = current_max_xpairs;
|
||||
|
||||
current_max_xpairs += MAX_XPAIRS_INCREMENT;
|
||||
|
||||
@@ -342,9 +341,9 @@ int find_table_space(int *state, int 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
|
||||
@@ -435,7 +434,7 @@ int find_table_space(int *state, int numtrans)
|
||||
*/
|
||||
void inittbl(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
bzero( (char *) chk, current_max_xpairs * sizeof( int ) / sizeof( char ) );
|
||||
|
||||
@@ -519,9 +518,9 @@ void mkdeftbl(void)
|
||||
* state array.
|
||||
*/
|
||||
|
||||
void mkentry(register int *state, int numchars, int statenum, int deflink, int totaltrans)
|
||||
void mkentry(int *state, int numchars, int statenum, int deflink, int totaltrans)
|
||||
{
|
||||
register int minec, maxec, i, baseaddr;
|
||||
int minec, maxec, i, baseaddr;
|
||||
int tblbase, tbllast;
|
||||
|
||||
if ( totaltrans == 0 )
|
||||
@@ -811,8 +810,8 @@ void mv2front(int qelm)
|
||||
|
||||
void place_state(int *state, int statenum, int 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 */
|
||||
@@ -889,8 +888,8 @@ void stack1(int statenum, int sym, int nextstate, int deflink)
|
||||
|
||||
int tbldiff(int *state, int pr, int *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)];
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/* yylex - scanner front-end for flex */
|
||||
@@ -36,15 +35,12 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
#ifndef lint
|
||||
static char rcsid[] =
|
||||
"@(#) $Header$ (LBL)";
|
||||
#endif
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "flexdef.h"
|
||||
#include "parse.h"
|
||||
*/
|
||||
|
||||
/* ANSI C does not guarantee that isascii() is defined */
|
||||
#ifndef isascii
|
||||
@@ -61,9 +57,8 @@ static char rcsid[] =
|
||||
* token - return token found
|
||||
*/
|
||||
|
||||
int yylex()
|
||||
|
||||
{
|
||||
int yylex(void)
|
||||
{
|
||||
int toktype;
|
||||
static int beglin = false;
|
||||
|
||||
@@ -221,7 +216,7 @@ int yylex()
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ( toktype );
|
||||
}
|
||||
|
||||
return ( toktype );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user