Remove all use of forms SInt and LInt and remove intSet using just Int instead.

This commit is contained in:
David Brown 2016-08-31 18:33:53 +01:00
parent 0508097ffe
commit a1fd798f6d
62 changed files with 828 additions and 861 deletions

View file

@ -58,7 +58,7 @@ static void OPP_err (INTEGER n)
static void OPP_CheckSym (INTEGER s)
{
if (OPP_sym == s) {
if ((SYSTEM_INT16)OPP_sym == s) {
OPS_Get(&OPP_sym);
} else {
OPM_err(s);
@ -136,7 +136,7 @@ static void OPP_CheckSysFlag (INTEGER *sysflag, INTEGER default_)
OPP_err(135);
}
OPP_ConstExpression(&x);
if (__IN(x->typ->form, 0x70)) {
if (x->typ->form == 5) {
sf = x->conval->intval;
if (sf < 0 || sf > 1) {
OPP_err(220);
@ -146,7 +146,7 @@ static void OPP_CheckSysFlag (INTEGER *sysflag, INTEGER default_)
OPP_err(51);
sf = 0;
}
*sysflag = sf;
*sysflag = (SYSTEM_INT16)sf;
OPP_CheckSym(23);
} else {
*sysflag = default_;
@ -268,7 +268,7 @@ static void OPP_ArrayType (OPT_Struct *typ, OPT_Struct *banned)
*typ = OPT_NewStr(15, 2);
(*typ)->sysflag = sysflag;
OPP_ConstExpression(&x);
if (__IN(x->typ->form, 0x70)) {
if (x->typ->form == 5) {
n = x->conval->intval;
if (n <= 0 || n > OPM_MaxIndex) {
OPP_err(63);
@ -625,7 +625,7 @@ static void OPP_StandProcCall (OPT_Node *x)
OPT_Node y = NIL;
SHORTINT m;
INTEGER n;
m = (*x)->obj->adr;
m = (SYSTEM_INT8)((SYSTEM_INT16)(*x)->obj->adr);
n = 0;
if (OPP_sym == 30) {
OPS_Get(&OPP_sym);
@ -1173,24 +1173,24 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, INTEGER *n, O
for (;;) {
OPP_ConstExpression(&x);
f = x->typ->form;
if (__IN(f, 0x78)) {
if (__IN(f, 0x28)) {
xval = x->conval->intval;
} else {
OPP_err(61);
xval = 1;
}
if (__IN(f, 0x70)) {
if (!__IN(LabelTyp->form, 0x70) || LabelTyp->size < x->typ->size) {
if (f == 5) {
if (!(LabelTyp->form == 5) || LabelTyp->size < x->typ->size) {
OPP_err(60);
}
} else if (LabelTyp->form != f) {
} else if ((SYSTEM_INT16)LabelTyp->form != f) {
OPP_err(60);
}
if (OPP_sym == 21) {
OPS_Get(&OPP_sym);
OPP_ConstExpression(&y);
yval = y->conval->intval;
if ((y->typ->form != f && !((__IN(f, 0x70) && __IN(y->typ->form, 0x70))))) {
if (((SYSTEM_INT16)y->typ->form != f && !((f == 5 && y->typ->form == 5)))) {
OPP_err(60);
}
if (yval < xval) {
@ -1253,7 +1253,7 @@ static void CasePart__31 (OPT_Node *x)
*StatSeq__30_s->pos = OPM_errpos;
if ((*x)->class == 8 || (*x)->class == 9) {
OPP_err(126);
} else if (!__IN((*x)->typ->form, 0x78)) {
} else if (!__IN((*x)->typ->form, 0x38)) {
OPP_err(125);
}
OPP_CheckSym(25);
@ -1439,7 +1439,7 @@ static void OPP_StatSeq (OPT_Node *stat)
OPS_Get(&OPP_sym);
if (OPP_sym == 38) {
OPP_qualident(&id);
if (!__IN(id->typ->form, 0x70)) {
if (!(id->typ->form == 5)) {
OPP_err(68);
}
OPP_CheckSym(34);
@ -1471,7 +1471,7 @@ static void OPP_StatSeq (OPT_Node *stat)
SetPos__35(z);
OPB_Link(&*stat, &last, z);
y = OPB_NewLeaf(t);
} else if (!__IN(y->typ->form, 0x70) || y->typ->size > x->left->typ->size) {
} else if (!(y->typ->form == 5) || y->typ->size > x->left->typ->size) {
OPP_err(113);
}
OPB_Link(&*stat, &last, x);