Changed identifier name to make it acceptable for our ANSI C compiler

This commit is contained in:
ceriel 1991-12-03 10:52:03 +00:00
parent 40e580cae6
commit 4bb6c5c4e8
5 changed files with 25 additions and 25 deletions

View file

@ -131,7 +131,7 @@ void code_val(e) register struct expr *e;
}
}break;
case E_CONST:
Loc(e->u.const);
Loc(e->u.cst);
break;
case E_NOW:
cal("now");
@ -172,7 +172,7 @@ static void subscript(e, av) register struct expr *e; enum addr_val av;
lsiz-=(e->arr_siz -1);
if (constant(index)) {
if (index->u.const<0 || index->u.const>=lsiz) {
if (index->u.cst<0 || index->u.cst>=lsiz) {
warning("constant index outside vector");
lin();
loc(0);
@ -189,7 +189,7 @@ static void subscript(e, av) register struct expr *e; enum addr_val av;
}
}
if (constant(index)) {
register offset=index->u.const;
register offset=index->u.cst;
if ((left->type&T_TYPE)==T_CHAN)
offset*=(wz+vz);
@ -518,9 +518,9 @@ void rep_init(v, e1, e2, r_info)
Stl(v->s_info.vc.offset);
if (!constant(e1) || !constant(e2)) {
if (constant(e2) && word_constant(e2->u.const)) {
if (constant(e2) && word_constant(e2->u.cst)) {
r_info->counter=memory(wz);
loc((int) e2->u.const);
loc((int) e2->u.cst);
stl(r_info->counter);
} else {
r_info->counter=memory(vz);
@ -528,7 +528,7 @@ void rep_init(v, e1, e2, r_info)
Stl(r_info->counter);
}
}
if (!constant(e2) || e2->u.const<=0L)
if (!constant(e2) || e2->u.cst<=0L)
branch(&r_info->END);
Label(new_label(&r_info->BEGIN));
}
@ -544,7 +544,7 @@ void rep_test(v, e1, e2, r_info)
if (constant(e1) && constant(e2)) {
Lol(v->s_info.vc.offset);
Loc(e1->u.const+e2->u.const);
Loc(e1->u.cst+e2->u.cst);
if (vz>wz) {
cmi();
zlt(r_info->BEGIN);
@ -552,7 +552,7 @@ void rep_test(v, e1, e2, r_info)
blt(r_info->BEGIN);
Label(r_info->END);
} else {
if (constant(e2) && word_constant(e2->u.const)) {
if (constant(e2) && word_constant(e2->u.cst)) {
del(r_info->counter);
Label(r_info->END);
lol(r_info->counter);

View file

@ -121,9 +121,9 @@ void cvw()
}
}
void Loc(const) long const;
void Loc(cst) long cst;
{
if (vz>wz) C_ldc((arith) const); else C_loc((arith) const);
if (vz>wz) C_ldc((arith) cst); else C_loc((arith) cst);
}
void Lol(offset) int offset;

View file

@ -27,8 +27,8 @@ struct expr *new_node(op, left, right, byte)
if (op!=FOR && constant(left) && (right==nil || constant(right))) {
register long lc, rc;
lc=left->u.const;
if (right) rc=right->u.const; else rc = 0;
lc=left->u.cst;
if (right) rc=right->u.cst; else rc = 0;
switch (op) {
case '+': lc+=rc; break;
@ -61,7 +61,7 @@ struct expr *new_node(op, left, right, byte)
}
destroy(right);
left->u.const=lc;
left->u.cst=lc;
return left;
} else {
register struct expr *pe;
@ -128,8 +128,8 @@ struct expr *new_var(var)
return pe;
}
struct expr *new_const(const)
long const;
struct expr *new_const(cst)
long cst;
/* Make a constant, which is a VALUE, of course. */
{
register struct expr *pe;
@ -138,7 +138,7 @@ struct expr *new_const(const)
pe->kind=E_CONST;
pe->type=T_VALUE;
pe->u.const=const;
pe->u.cst=cst;
return pe;
}
@ -389,7 +389,7 @@ static void subscriptable(l, r, byte, atype, arr_siz)
if (r->u.node.right->kind!=E_CONST)
report("slice must be of constant size");
else
*arr_siz=r->u.node.right->u.const;
*arr_siz=r->u.node.right->u.cst;
used(r->u.node.left);
} else
used(r);

View file

@ -36,7 +36,7 @@ struct expr {
struct symbol *var;
long const;
long cst;
int tab;

View file

@ -281,7 +281,7 @@ subscript(register *byte; register struct expr **e; )
destroy(e1);
e1=new_const(0L);
} else
if (e1->u.const<=0)
if (e1->u.cst<=0)
nonpositive(siz);
*e=new_node(FOR, *e, e1, *byte);
slice=1;
@ -304,10 +304,10 @@ chan { register type, arr_siz=1; register char *name; struct expr *e; }:
if (!constant(e))
nonconst(siz);
else
if (e->u.const<0)
if (e->u.cst<0)
nonpositive(siz);
else
arr_siz=e->u.const;
arr_siz=e->u.cst;
destroy(e);
type|=T_ARR;
}
@ -331,10 +331,10 @@ var { register type, byte=0, arr_siz=1;
if (!constant(e))
nonconst(siz);
else
if (e->u.const<=0)
if (e->u.cst<=0)
nonpositive(siz);
else
arr_siz=e->u.const;
arr_siz=e->u.cst;
destroy(e);
type|=T_ARR|byte;
}
@ -550,14 +550,14 @@ table(register struct expr **e;)
expression(&e1) { if (!constant(e1))
nonconst("table element");
else
table_add(&apt, e1->u.const);
table_add(&apt, e1->u.cst);
destroy(e1);
}
[ ',' expression(&e1)
{ if (!constant(e1))
nonconst("table element");
else
table_add(&apt, e1->u.const);
table_add(&apt, e1->u.cst);
destroy(e1);
}
]*