Fix ethMD5 build. May need more work to be correct on 64 bit builds.

This commit is contained in:
David Brown 2016-09-20 16:43:34 +01:00
parent 9971e56451
commit 1a83167d5a
200 changed files with 407 additions and 372 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void)
static void OPB_SetIntType (OPT_Node node) static void OPB_SetIntType (OPT_Node node)
{ {
int16 b; node->typ = OPT_IntType(OPT_IntSize(node->conval->intval));
int64 n;
if (node->conval->intval >= 0) {
n = node->conval->intval;
} else {
n = -(node->conval->intval + 1);
}
b = 1;
while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) {
b += 1;
}
node->typ = OPT_IntType(b);
} }
OPT_Node OPB_NewIntConst (int64 intval) OPT_Node OPB_NewIntConst (int64 intval)

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -139,6 +139,7 @@ export void OPT_Init (OPS_Name name, SET opt);
static void OPT_InitStruct (OPT_Struct *typ, int8 form); static void OPT_InitStruct (OPT_Struct *typ, int8 form);
export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_Insert (OPS_Name name, OPT_Object *obj);
export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
export int16 OPT_IntSize (int64 n);
export OPT_Struct OPT_IntType (int32 size); export OPT_Struct OPT_IntType (int32 size);
export OPT_Const OPT_NewConst (void); export OPT_Const OPT_NewConst (void);
export OPT_ConstExt OPT_NewExt (void); export OPT_ConstExt OPT_NewExt (void);
@ -164,6 +165,21 @@ static void OPT_err (int16 n)
OPM_err(n); OPM_err(n);
} }
int16 OPT_IntSize (int64 n)
{
int16 _o_result;
int16 bytes;
if (n < 0) {
n = -(n + 1);
}
bytes = 1;
while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) {
bytes += 1;
}
_o_result = bytes;
return _o_result;
}
OPT_Struct OPT_IntType (int32 size) OPT_Struct OPT_IntType (int32 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -94,6 +94,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done);
import void OPT_Init (OPS_Name name, SET opt); import void OPT_Init (OPS_Name name, SET opt);
import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_Insert (OPS_Name name, OPT_Object *obj);
import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
import int16 OPT_IntSize (int64 n);
import OPT_Struct OPT_IntType (int32 size); import OPT_Struct OPT_IntType (int32 size);
import OPT_Const OPT_NewConst (void); import OPT_Const OPT_NewConst (void);
import OPT_ConstExt OPT_NewExt (void); import OPT_ConstExt OPT_NewExt (void);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -221,7 +221,7 @@ export void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch);
export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d);
export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e);
export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x);
export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n);
export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ);
export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n);
export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x);
@ -1050,15 +1050,15 @@ void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGINT s__le
__DEL(s); __DEL(s);
} }
void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n)
{ {
int16 i; int16 i;
int32 x0; int64 x0;
CHAR a[22]; CHAR a[24];
i = 0; i = 0;
if (x < 0) { if (x < 0) {
if (x == (-2147483647-1)) { if (x == (-9223372036854775807-1)) {
Texts_WriteString(&*W, W__typ, (CHAR*)" -2147483648", 13); Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22);
return; return;
} else { } else {
n -= 1; n -= 1;
@ -1068,11 +1068,11 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n)
x0 = x; x0 = x;
} }
do { do {
a[__X(i, 22)] = (CHAR)((int)__MOD(x0, 10) + 48); a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48);
x0 = __DIV(x0, 10); x0 = __DIV(x0, 10);
i += 1; i += 1;
} while (!(x0 == 0)); } while (!(x0 == 0));
while (n > i) { while (n > (int64)i) {
Texts_Write(&*W, W__typ, ' '); Texts_Write(&*W, W__typ, ' ');
n -= 1; n -= 1;
} }
@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n)
} }
do { do {
i -= 1; i -= 1;
Texts_Write(&*W, W__typ, a[__X(i, 22)]); Texts_Write(&*W, W__typ, a[__X(i, 24)]);
} while (!(i == 0)); } while (!(i == 0));
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h
@ -158,7 +158,7 @@ import void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch);
import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d);
import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e);
import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x);
import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n);
import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ);
import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n);
import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkamSf */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef vt100__h #ifndef vt100__h
#define vt100__h #define vt100__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void)
static void OPB_SetIntType (OPT_Node node) static void OPB_SetIntType (OPT_Node node)
{ {
int16 b; node->typ = OPT_IntType(OPT_IntSize(node->conval->intval));
int64 n;
if (node->conval->intval >= 0) {
n = node->conval->intval;
} else {
n = -(node->conval->intval + 1);
}
b = 1;
while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) {
b += 1;
}
node->typ = OPT_IntType(b);
} }
OPT_Node OPB_NewIntConst (int64 intval) OPT_Node OPB_NewIntConst (int64 intval)

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -139,6 +139,7 @@ export void OPT_Init (OPS_Name name, SET opt);
static void OPT_InitStruct (OPT_Struct *typ, int8 form); static void OPT_InitStruct (OPT_Struct *typ, int8 form);
export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_Insert (OPS_Name name, OPT_Object *obj);
export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
export int16 OPT_IntSize (int64 n);
export OPT_Struct OPT_IntType (int32 size); export OPT_Struct OPT_IntType (int32 size);
export OPT_Const OPT_NewConst (void); export OPT_Const OPT_NewConst (void);
export OPT_ConstExt OPT_NewExt (void); export OPT_ConstExt OPT_NewExt (void);
@ -164,6 +165,21 @@ static void OPT_err (int16 n)
OPM_err(n); OPM_err(n);
} }
int16 OPT_IntSize (int64 n)
{
int16 _o_result;
int16 bytes;
if (n < 0) {
n = -(n + 1);
}
bytes = 1;
while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) {
bytes += 1;
}
_o_result = bytes;
return _o_result;
}
OPT_Struct OPT_IntType (int32 size) OPT_Struct OPT_IntType (int32 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -94,6 +94,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done);
import void OPT_Init (OPS_Name name, SET opt); import void OPT_Init (OPS_Name name, SET opt);
import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_Insert (OPS_Name name, OPT_Object *obj);
import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
import int16 OPT_IntSize (int64 n);
import OPT_Struct OPT_IntType (int32 size); import OPT_Struct OPT_IntType (int32 size);
import OPT_Const OPT_NewConst (void); import OPT_Const OPT_NewConst (void);
import OPT_ConstExt OPT_NewExt (void); import OPT_ConstExt OPT_NewExt (void);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32
@ -221,7 +221,7 @@ export void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch);
export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d);
export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e);
export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x);
export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n);
export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ);
export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n);
export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x);
@ -1050,15 +1050,15 @@ void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGINT s__le
__DEL(s); __DEL(s);
} }
void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n)
{ {
int16 i; int16 i;
int32 x0; int64 x0;
CHAR a[22]; CHAR a[24];
i = 0; i = 0;
if (x < 0) { if (x < 0) {
if (x == (-2147483647-1)) { if (x == (-9223372036854775807-1)) {
Texts_WriteString(&*W, W__typ, (CHAR*)" -2147483648", 13); Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22);
return; return;
} else { } else {
n -= 1; n -= 1;
@ -1068,11 +1068,11 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n)
x0 = x; x0 = x;
} }
do { do {
a[__X(i, 22)] = (CHAR)((int)__MOD(x0, 10) + 48); a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48);
x0 = __DIV(x0, 10); x0 = __DIV(x0, 10);
i += 1; i += 1;
} while (!(x0 == 0)); } while (!(x0 == 0));
while (n > i) { while (n > (int64)i) {
Texts_Write(&*W, W__typ, ' '); Texts_Write(&*W, W__typ, ' ');
n -= 1; n -= 1;
} }
@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n)
} }
do { do {
i -= 1; i -= 1;
Texts_Write(&*W, W__typ, a[__X(i, 22)]); Texts_Write(&*W, W__typ, a[__X(i, 24)]);
} while (!(i == 0)); } while (!(i == 0));
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h
@ -159,7 +159,7 @@ import void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch);
import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d);
import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e);
import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x);
import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n);
import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ);
import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n);
import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkamSf */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef errors__h #ifndef errors__h
#define errors__h #define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int16 #define INTEGER int16
#define LONGINT int32 #define LONGINT int32

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef vt100__h #ifndef vt100__h
#define vt100__h #define vt100__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64
@ -18,6 +18,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("1.95 [2016/09/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h #ifndef Console__h
#define Console__h #define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64
@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void)
static void OPB_SetIntType (OPT_Node node) static void OPB_SetIntType (OPT_Node node)
{ {
int32 b; node->typ = OPT_IntType(OPT_IntSize(node->conval->intval));
int64 n;
if (node->conval->intval >= 0) {
n = node->conval->intval;
} else {
n = -(node->conval->intval + 1);
}
b = 1;
while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) {
b += 1;
}
node->typ = OPT_IntType(b);
} }
OPT_Node OPB_NewIntConst (int64 intval) OPT_Node OPB_NewIntConst (int64 intval)

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#define INTEGER int32 #define INTEGER int32
#define LONGINT int64 #define LONGINT int64
@ -138,6 +138,7 @@ export void OPT_Init (OPS_Name name, SET opt);
static void OPT_InitStruct (OPT_Struct *typ, int8 form); static void OPT_InitStruct (OPT_Struct *typ, int8 form);
export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_Insert (OPS_Name name, OPT_Object *obj);
export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
export int32 OPT_IntSize (int64 n);
export OPT_Struct OPT_IntType (int64 size); export OPT_Struct OPT_IntType (int64 size);
export OPT_Const OPT_NewConst (void); export OPT_Const OPT_NewConst (void);
export OPT_ConstExt OPT_NewExt (void); export OPT_ConstExt OPT_NewExt (void);
@ -163,6 +164,21 @@ static void OPT_err (int32 n)
OPM_err(n); OPM_err(n);
} }
int32 OPT_IntSize (int64 n)
{
int32 _o_result;
int32 bytes;
if (n < 0) {
n = -(n + 1);
}
bytes = 1;
while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) {
bytes += 1;
}
_o_result = bytes;
return _o_result;
}
OPT_Struct OPT_IntType (int64 size) OPT_Struct OPT_IntType (int64 size)
{ {
OPT_Struct _o_result; OPT_Struct _o_result;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ /* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h
@ -93,6 +93,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done);
import void OPT_Init (OPS_Name name, SET opt); import void OPT_Init (OPS_Name name, SET opt);
import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_Insert (OPS_Name name, OPT_Object *obj);
import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old);
import int32 OPT_IntSize (int64 n);
import OPT_Struct OPT_IntType (int64 size); import OPT_Struct OPT_IntType (int64 size);
import OPT_Const OPT_NewConst (void); import OPT_Const OPT_NewConst (void);
import OPT_ConstExt OPT_NewExt (void); import OPT_ConstExt OPT_NewExt (void);

Some files were not shown because too many files have changed in this diff Show more