summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:58 +0900
commit92fa724cc7692a0d4b64f0214250b29ba86221b5 (patch)
treef58f2c1d4ea8f2fe2214c821693a26460f707b78
parent50f53e01f0f276c8cc9187813b7c4220e1669839 (diff)
downloadtellico-92fa724cc7692a0d4b64f0214250b29ba86221b5.tar.gz
tellico-92fa724cc7692a0d4b64f0214250b29ba86221b5.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/translators/btparse/ast.c2
-rw-r--r--src/translators/btparse/dlgauto.h6
-rw-r--r--src/translators/btparse/err.h20
-rw-r--r--src/translators/btparse/sym.c30
4 files changed, 29 insertions, 29 deletions
diff --git a/src/translators/btparse/ast.c b/src/translators/btparse/ast.c
index d433f79..cec919a 100644
--- a/src/translators/btparse/ast.c
+++ b/src/translators/btparse/ast.c
@@ -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);
diff --git a/src/translators/btparse/dlgauto.h b/src/translators/btparse/dlgauto.h
index efcc3b2..fb6d9a6 100644
--- a/src/translators/btparse/dlgauto.h
+++ b/src/translators/btparse/dlgauto.h
@@ -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' */
diff --git a/src/translators/btparse/err.h b/src/translators/btparse/err.h
index d16615d..0717b9c 100644
--- a/src/translators/btparse/err.h
+++ b/src/translators/btparse/err.h
@@ -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]));
diff --git a/src/translators/btparse/sym.c b/src/translators/btparse/sym.c
index 2426dea..610bd2f 100644
--- a/src/translators/btparse/sym.c
+++ b/src/translators/btparse/sym.c
@@ -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' )
{