Base expression casting on C int size, remove dependencies on form=LInt.

This commit is contained in:
David Brown 2016-08-31 17:15:44 +01:00
parent b3c71fb2f0
commit 0508097ffe
199 changed files with 6800 additions and 6540 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/08/30] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/08/31] for gcc LP64 on cygwin tspkaSfF */
#include "SYSTEM.h"
#include "OPM.h"
@ -59,7 +59,7 @@ static void OPS_Str (SHORTINT *sym)
if (OPS_intval == 2) {
*sym = 35;
OPS_numtyp = 1;
OPS_intval = (int)OPS_str[0];
OPS_intval = OPS_str[0];
} else {
*sym = 37;
}
@ -112,10 +112,10 @@ static INTEGER Ord__7 (CHAR ch, BOOLEAN hex)
{
INTEGER _o_result;
if (ch <= '9') {
_o_result = (int)ch - 48;
_o_result = ch - 48;
return _o_result;
} else if (hex) {
_o_result = ((int)ch - 65) + 10;
_o_result = (ch - 65) + 10;
return _o_result;
} else {
OPS_err(2);
@ -173,7 +173,7 @@ static void OPS_Number (void)
OPS_numtyp = 1;
if (n <= 2) {
while (i < n) {
OPS_intval = __ASHL(OPS_intval, 4) + (int)Ord__7(dig[i], 1);
OPS_intval = __ASHL(OPS_intval, 4) + Ord__7(dig[i], 1);
i += 1;
}
} else {
@ -188,7 +188,7 @@ static void OPS_Number (void)
OPS_intval = -1;
}
while (i < n) {
OPS_intval = __ASHL(OPS_intval, 4) + (int)Ord__7(dig[i], 1);
OPS_intval = __ASHL(OPS_intval, 4) + Ord__7(dig[i], 1);
i += 1;
}
} else {
@ -199,8 +199,8 @@ static void OPS_Number (void)
while (i < n) {
d = Ord__7(dig[i], 0);
i += 1;
if (OPS_intval <= __DIV(2147483647 - (int)d, 10)) {
OPS_intval = OPS_intval * 10 + (int)d;
if (OPS_intval <= __DIV(2147483647 - d, 10)) {
OPS_intval = OPS_intval * 10 + d;
} else {
OPS_err(203);
}