again, more consistent naming

This commit is contained in:
ceriel 1987-06-30 18:59:51 +00:00
parent db6c8a8b79
commit 0e4defe032
4 changed files with 39 additions and 39 deletions

View file

@ -38,8 +38,8 @@ checkarg(arg, typset)
register struct e_arg *arg; register struct e_arg *arg;
{ {
if (((!typset) && arg->ems_argtype) || if (((!typset) && arg->ema_argtype) ||
((!arg->ems_argtype) && typset)) { ((!arg->ema_argtype) && typset)) {
/* End of arguments expected, but there are more, or /* End of arguments expected, but there are more, or
an argument expected, but there is none an argument expected, but there is none
*/ */
@ -47,7 +47,7 @@ checkarg(arg, typset)
return; return;
} }
if (!(arg->ems_argtype & typset)) { if (!(arg->ema_argtype & typset)) {
/* Type error */ /* Type error */
EM_error = "Illegal parameter type"; EM_error = "Illegal parameter type";
} }

View file

@ -352,7 +352,7 @@ EM_getinstr(p)
case ps_pro: case ps_pro:
getarg(pro_ptyp, &(p->em_arg)); getarg(pro_ptyp, &(p->em_arg));
getarg(cst_ptyp|ptyp(sp_cend), &dummy); getarg(cst_ptyp|ptyp(sp_cend), &dummy);
if (dummy.ems_argtype == 0) { if (dummy.ema_argtype == 0) {
p->em_nlocals = -1; p->em_nlocals = -1;
} }
else p->em_nlocals = dummy.ema_cst; else p->em_nlocals = dummy.ema_cst;

View file

@ -274,7 +274,7 @@ getnumber(c, ap)
int expsign; int expsign;
long str2long(); long str2long();
ap->ems_argtype = cst_ptyp; ap->ema_argtype = cst_ptyp;
expsign = 0; expsign = 0;
if (c == '+' || c == '-') { if (c == '+' || c == '-') {
@ -328,17 +328,17 @@ getnumber(c, ap)
strcpy(string.str, str); strcpy(string.str, str);
ap->ema_string = string.str; ap->ema_string = string.str;
gettyp(cst_ptyp, &dummy); gettyp(cst_ptyp, &dummy);
ap->ems_szoroff = dummy.ema_cst; ap->ema_szoroff = dummy.ema_cst;
switch(c) { switch(c) {
case 'I': case 'I':
ap->ems_argtype = ico_ptyp; ap->ema_argtype = ico_ptyp;
return sp_icon; return sp_icon;
case 'U': case 'U':
ap->ems_argtype = uco_ptyp; ap->ema_argtype = uco_ptyp;
return sp_ucon; return sp_ucon;
case 'F': case 'F':
ap->ems_argtype = fco_ptyp; ap->ema_argtype = fco_ptyp;
return sp_fcon; return sp_fcon;
} }
assert(0); assert(0);
@ -457,25 +457,25 @@ gettyp(typset, ap)
out("name\n"); out("name\n");
ungetbyte(c); ungetbyte(c);
ap->ema_dnam = getname()->str; ap->ema_dnam = getname()->str;
ap->ems_argtype = sof_ptyp; ap->ema_argtype = sof_ptyp;
argtyp = offsetted(sp_dnam, &(ap->ems_szoroff)); argtyp = offsetted(sp_dnam, &(ap->ema_szoroff));
} }
else if (c == '.') { else if (c == '.') {
out(".label\n"); out(".label\n");
ap->ema_dlb = get15u(); ap->ema_dlb = get15u();
ap->ems_argtype = nof_ptyp; ap->ema_argtype = nof_ptyp;
argtyp = offsetted(sp_dlb2, &(ap->ems_szoroff)); argtyp = offsetted(sp_dlb2, &(ap->ema_szoroff));
} }
else if (c == '*') { else if (c == '*') {
out("*label\n"); out("*label\n");
ap->ema_ilb = get15u(); ap->ema_ilb = get15u();
ap->ems_argtype = ilb_ptyp; ap->ema_argtype = ilb_ptyp;
argtyp = sp_ilb2; argtyp = sp_ilb2;
} }
else if (c == '$') { else if (c == '$') {
out("$name\n"); out("$name\n");
ap->ema_pnam = getname()->str; ap->ema_pnam = getname()->str;
ap->ems_argtype = pro_ptyp; ap->ema_argtype = pro_ptyp;
argtyp = sp_pnam; argtyp = sp_pnam;
} }
else if (c == '"' || c == '\'') { else if (c == '"' || c == '\'') {
@ -485,14 +485,14 @@ gettyp(typset, ap)
ungetbyte(c); ungetbyte(c);
s = getstring(0); s = getstring(0);
ap->ema_string = s->str; ap->ema_string = s->str;
ap->ems_szoroff = s->length; ap->ema_szoroff = s->length;
ap->ems_argtype = str_ptyp; ap->ema_argtype = str_ptyp;
argtyp = sp_scon; argtyp = sp_scon;
} }
else if (c == '?') { else if (c == '?') {
out("?\n"); out("?\n");
argtyp = sp_cend; argtyp = sp_cend;
ap->ems_argtype = 0; ap->ema_argtype = 0;
} }
else { else {
/* c != '\n', so "ungetbyte" not neccesary */ /* c != '\n', so "ungetbyte" not neccesary */
@ -508,7 +508,7 @@ gettyp(typset, ap)
} }
if (argtyp == sp_cend) { if (argtyp == sp_cend) {
ap->ems_argtype = 0; ap->ema_argtype = 0;
} }
return; return;
} }
@ -587,7 +587,7 @@ line_line()
gettyp(ptyp(sp_cst2), &dummy); gettyp(ptyp(sp_cst2), &dummy);
EM_lineno = dummy.ema_cst; EM_lineno = dummy.ema_cst;
gettyp(str_ptyp, &dummy); gettyp(str_ptyp, &dummy);
btscpy(filebuf, dummy.ema_string, (int) dummy.ems_szoroff); btscpy(filebuf, dummy.ema_string, (int) dummy.ema_szoroff);
EM_filename = filebuf; EM_filename = filebuf;
} }

View file

@ -54,21 +54,21 @@ getarg(typset, ap)
default: default:
if (i < sp_fcst0+sp_ncst0 && i >= sp_fcst0) { /* A cst */ if (i < sp_fcst0+sp_ncst0 && i >= sp_fcst0) { /* A cst */
ap->ema_cst = i - sp_zcst0; ap->ema_cst = i - sp_zcst0;
ap->ems_argtype = cst_ptyp; ap->ema_argtype = cst_ptyp;
i = sp_cst2; i = sp_cst2;
} }
break; break;
case sp_dlb1: /* Numeric data label encoded in one byte */ case sp_dlb1: /* Numeric data label encoded in one byte */
ap->ema_dlb = getbyte(); ap->ema_dlb = getbyte();
ap->ems_szoroff = 0; ap->ema_szoroff = 0;
ap->ems_argtype = nof_ptyp; ap->ema_argtype = nof_ptyp;
break; break;
case sp_dlb2: /* Numeric data label encoded in two bytes */ case sp_dlb2: /* Numeric data label encoded in two bytes */
ap->ema_dlb = get16(); ap->ema_dlb = get16();
ap->ems_szoroff = 0; ap->ema_szoroff = 0;
ap->ems_argtype = nof_ptyp; ap->ema_argtype = nof_ptyp;
#ifdef CHECKING #ifdef CHECKING
if (ap->ema_dlb > 32767 && !EM_error) { if (ap->ema_dlb > 32767 && !EM_error) {
EM_error = "Illegal data label"; EM_error = "Illegal data label";
@ -79,12 +79,12 @@ getarg(typset, ap)
case sp_ilb1: /* Instruction label encoded in one byte */ case sp_ilb1: /* Instruction label encoded in one byte */
ap->ema_ilb = getbyte(); ap->ema_ilb = getbyte();
ap->ems_argtype = ilb_ptyp; ap->ema_argtype = ilb_ptyp;
break; break;
case sp_ilb2: /* Instruction label encoded in two bytes */ case sp_ilb2: /* Instruction label encoded in two bytes */
ap->ema_ilb = get16(); ap->ema_ilb = get16();
ap->ems_argtype = ilb_ptyp; ap->ema_argtype = ilb_ptyp;
#ifdef CHECKING #ifdef CHECKING
if (ap->ema_ilb > 32767 && !EM_error) { if (ap->ema_ilb > 32767 && !EM_error) {
EM_error = "Illegal instruction label"; EM_error = "Illegal instruction label";
@ -95,12 +95,12 @@ getarg(typset, ap)
case sp_cst2: /* A cst encoded in two bytes */ case sp_cst2: /* A cst encoded in two bytes */
ap->ema_cst = get16(); ap->ema_cst = get16();
ap->ems_argtype = cst_ptyp; ap->ema_argtype = cst_ptyp;
break; break;
case sp_cst4: /* A cst encoded in four bytes */ case sp_cst4: /* A cst encoded in four bytes */
ap->ema_cst = get32(); ap->ema_cst = get32();
ap->ems_argtype = cst_ptyp; ap->ema_argtype = cst_ptyp;
break; break;
case sp_pnam: /* A procedure name */ case sp_pnam: /* A procedure name */
@ -114,7 +114,7 @@ getarg(typset, ap)
} }
#endif CHECKING #endif CHECKING
ap->ema_pnam = p->str; ap->ema_pnam = p->str;
ap->ems_argtype = pro_ptyp; ap->ema_argtype = pro_ptyp;
break; break;
} }
@ -129,8 +129,8 @@ getarg(typset, ap)
} }
#endif CHECKING #endif CHECKING
ap->ema_dnam = p->str; ap->ema_dnam = p->str;
ap->ems_szoroff = 0; ap->ema_szoroff = 0;
ap->ems_argtype = sof_ptyp; ap->ema_argtype = sof_ptyp;
break; break;
} }
@ -140,7 +140,7 @@ getarg(typset, ap)
getarg(lab_ptyp, ap); getarg(lab_ptyp, ap);
getarg(cst_ptyp, &dummy); getarg(cst_ptyp, &dummy);
ap->ems_szoroff = dummy.ema_cst; ap->ema_szoroff = dummy.ema_cst;
break; break;
} }
@ -151,14 +151,14 @@ getarg(typset, ap)
register struct string *p; register struct string *p;
getarg(cst_ptyp, ap); getarg(cst_ptyp, ap);
ap->ems_szoroff = ap->ema_cst; ap->ema_szoroff = ap->ema_cst;
p = getstring(0); p = getstring(0);
#ifdef CHECKING #ifdef CHECKING
if (state & INSTRING) { if (state & INSTRING) {
xerror("Numeric constant too long"); xerror("Numeric constant too long");
} }
#endif CHECKING #endif CHECKING
ap->ems_argtype = ptyp(i); ap->ema_argtype = ptyp(i);
ap->ema_string = p->str; ap->ema_string = p->str;
break; break;
} }
@ -168,9 +168,9 @@ getarg(typset, ap)
register struct string *p; register struct string *p;
p = getstring(0); p = getstring(0);
ap->ems_argtype = str_ptyp; ap->ema_argtype = str_ptyp;
ap->ema_string = p->str; ap->ema_string = p->str;
ap->ems_szoroff = p->length; ap->ema_szoroff = p->length;
break; break;
} }
} }
@ -192,11 +192,11 @@ getarg(typset, ap)
EM_error = "Bad argument type"; EM_error = "Bad argument type";
} }
if (argtyp == sp_cend) { if (argtyp == sp_cend) {
ap->ems_argtype = 0; ap->ema_argtype = 0;
} }
#else not CHECKING #else not CHECKING
if (i == sp_cend) { if (i == sp_cend) {
ap->ems_argtype = 0; ap->ema_argtype = 0;
} }
#endif CHECKING #endif CHECKING
} }