Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 92fa724cc7)
r14.0.x
Michele Calgaro 5 years ago
parent 332d9d97b7
commit 926c0fb6d1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -157,7 +157,7 @@ zzfree_ast(AST *tree)
AST *zztmake(AST *rt, ...)
{
va_list ap;
register AST *child, *sibling=NULL, *tail, *w;
AST *child, *sibling=NULL, *tail, *w;
AST *root;
va_start(ap, rt);

@ -240,9 +240,9 @@ zzreplchar(zzchar_t c)
/* replace the string s for the reg. expr last matched and in the buffer */
void
zzreplstr(register zzchar_t *s)
zzreplstr(zzchar_t *s)
{
register zzchar_t *l= &zzlextext[zzbufsize -1];
zzchar_t *l= &zzlextext[zzbufsize -1];
zznextpos = zzbegexpr;
if (s){
@ -264,7 +264,7 @@ zzreplstr(register zzchar_t *s)
void
zzgettok()
{
register int state, newstate;
int state, newstate;
/* last space reserved for the null char */
zzchar_t *lastpos; /* GPW 1997/09/05 (removed 'register' */

@ -230,14 +230,14 @@ zzrestore_antlr_state(zzantlr_state *buf)
void
zzedecode(SetWordType *a)
{
register SetWordType *p = a;
register SetWordType *endp = &(p[zzSET_SIZE]);
register unsigned e = 0;
SetWordType *p = a;
SetWordType *endp = &(p[zzSET_SIZE]);
unsigned e = 0;
if ( zzset_deg(a)>1 ) fprintf(stderr, " {");
do {
register SetWordType t = *p;
register SetWordType *b = &(bitmask[0]);
SetWordType t = *p;
SetWordType *b = &(bitmask[0]);
do {
if ( t & *b ) fprintf(stderr, " %s", zztokens[e]);
e++;
@ -281,15 +281,15 @@ zzset_deg(SetWordType *a)
of elements present in the set. Assumes
that all word bits are used in the set
*/
register SetWordType *p = a;
register SetWordType *endp = &(a[zzSET_SIZE]);
register int degree = 0;
SetWordType *p = a;
SetWordType *endp = &(a[zzSET_SIZE]);
int degree = 0;
if ( a == NULL ) return 0;
while ( p < endp )
{
register SetWordType t = *p;
register SetWordType *b = &(bitmask[0]);
SetWordType t = *p;
SetWordType *b = &(bitmask[0]);
do {
if (t & *b) ++degree;
} while (++b < &(bitmask[sizeof(SetWordType)*8]));

@ -175,10 +175,10 @@ zzs_done(void)
}
void
zzs_add(char *key, register Sym *rec)
zzs_add(char *key, Sym *rec)
{
register unsigned int h=0;
register char *p=key;
unsigned int h=0;
char *p=key;
HASH_FUN(p, h);
rec->hash = h; /* save hash code for fast comp later */
@ -195,9 +195,9 @@ zzs_add(char *key, register Sym *rec)
Sym *
zzs_get(char *key)
{
register unsigned int h=0;
register char *p=key;
register Sym *q;
unsigned int h=0;
char *p=key;
Sym *q;
HASH_FUN(p, h);
@ -219,12 +219,12 @@ zzs_get(char *key)
* Will do nothing if all list pointers are NULL
*/
void
zzs_del(register Sym *p)
zzs_del(Sym *p)
{
if ( p == NULL ) {fprintf(stderr, "zzs_del(NULL)\n"); exit(1);}
if ( p->prev == NULL ) /* Head of list */
{
register Sym **t = p->head;
Sym **t = p->head;
if ( t == NULL ) return; /* not part of symbol table */
(*t) = p->next;
@ -260,9 +260,9 @@ zzs_scope(Sym **scope)
/* Remove a scope described by 'scope'. Return pointer to 1st element in scope */
Sym *
zzs_rmscope(register Sym **scope)
zzs_rmscope(Sym **scope)
{
register Sym *p;
Sym *p;
Sym *start;
if ( scope == NULL ) return(NULL);
@ -277,13 +277,13 @@ zzs_stat(void)
{
static unsigned short count[20];
unsigned int i,n=0,low=0, hi=0;
register Sym **p;
Sym **p;
float avg=0.0;
for (i=0; i<20; i++) count[i] = 0;
for (p=table; p<&(table[size]); p++)
{
register Sym *q = *p;
Sym *q = *p;
unsigned int len;
if ( q != NULL && low==0 ) low = p-table;
@ -328,7 +328,7 @@ Sym *
zzs_new(char *text)
{
Sym *p;
char *zzs_strdup(register char *s);
char *zzs_strdup(char *s);
if ( (p = (Sym *) calloc(1,sizeof(Sym))) == 0 )
{
@ -353,9 +353,9 @@ zzs_newadd(char *text)
* Bump the pointer into the string table to next avail position.
*/
char *
zzs_strdup(register char *s)
zzs_strdup(char *s)
{
register char *start=strp;
char *start=strp;
while ( *s != '\0' )
{

Loading…
Cancel
Save