mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 06:22:25 +00:00
Fix generalised ReadNum and use for Sym reading.
This commit is contained in:
parent
3dc5049d5a
commit
1fa182c7ce
24 changed files with 59 additions and 163 deletions
|
|
@ -88,8 +88,7 @@ export void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
export void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
export void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
@ -915,15 +914,15 @@ void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len)
|
||||||
} while (!b);
|
} while (!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
||||||
{
|
{
|
||||||
int8 s, b;
|
int8 s, b;
|
||||||
int64 q;
|
int64 q;
|
||||||
s = 0;
|
s = 0;
|
||||||
q = 0;
|
q = 0;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
while ((int16)b >= 128) {
|
while (b < 0) {
|
||||||
q += (int64)__ASH(((int16)b - 128), s);
|
q += (int64)__ASH(((int16)b + 128), s);
|
||||||
s += 7;
|
s += 7;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
}
|
}
|
||||||
|
|
@ -932,23 +931,6 @@ void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x
|
||||||
__MOVE((address)&q, (address)x, x__len);
|
__MOVE((address)&q, (address)x, x__len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x)
|
|
||||||
{
|
|
||||||
int8 s;
|
|
||||||
CHAR ch;
|
|
||||||
int32 n;
|
|
||||||
s = 0;
|
|
||||||
n = 0;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
while ((int16)ch >= 128) {
|
|
||||||
n += __ASH(((int16)ch - 128), s);
|
|
||||||
s += 7;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
}
|
|
||||||
n += __ASH((__MASK((int16)ch, -64) - __ASHL(__ASHR((int16)ch, 6), 6)), s);
|
|
||||||
*x = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
||||||
{
|
{
|
||||||
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,7 @@ import void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
import void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
import void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ int32 OPM_SymRInt (void)
|
||||||
{
|
{
|
||||||
int32 _o_result;
|
int32 _o_result;
|
||||||
int32 k;
|
int32 k;
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, &k);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 4);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
@ -754,19 +754,19 @@ int64 OPM_SymRInt64 (void)
|
||||||
{
|
{
|
||||||
int64 _o_result;
|
int64 _o_result;
|
||||||
int64 k;
|
int64 k;
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet64 (uint64 *s)
|
void OPM_SymRSet64 (uint64 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet (uint32 *s)
|
void OPM_SymRSet (uint32 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (int32*)&*s);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRReal (REAL *r)
|
void OPM_SymRReal (REAL *r)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN
|
||||||
|
|
||||||
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
||||||
{
|
{
|
||||||
__COPY("gcc -g -O1", s, s__len);
|
__COPY("gcc -g", s, s__len);
|
||||||
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
||||||
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
||||||
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,7 @@ export void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
export void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
export void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
@ -915,15 +914,15 @@ void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len)
|
||||||
} while (!b);
|
} while (!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
||||||
{
|
{
|
||||||
int8 s, b;
|
int8 s, b;
|
||||||
int64 q;
|
int64 q;
|
||||||
s = 0;
|
s = 0;
|
||||||
q = 0;
|
q = 0;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
while ((int16)b >= 128) {
|
while (b < 0) {
|
||||||
q += (int64)__ASH(((int16)b - 128), s);
|
q += (int64)__ASH(((int16)b + 128), s);
|
||||||
s += 7;
|
s += 7;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
}
|
}
|
||||||
|
|
@ -932,23 +931,6 @@ void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x
|
||||||
__MOVE((address)&q, (address)x, x__len);
|
__MOVE((address)&q, (address)x, x__len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x)
|
|
||||||
{
|
|
||||||
int8 s;
|
|
||||||
CHAR ch;
|
|
||||||
int32 n;
|
|
||||||
s = 0;
|
|
||||||
n = 0;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
while ((int16)ch >= 128) {
|
|
||||||
n += __ASH(((int16)ch - 128), s);
|
|
||||||
s += 7;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
}
|
|
||||||
n += __ASH((__MASK((int16)ch, -64) - __ASHL(__ASHR((int16)ch, 6), 6)), s);
|
|
||||||
*x = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
||||||
{
|
{
|
||||||
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,7 @@ import void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
import void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
import void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ int32 OPM_SymRInt (void)
|
||||||
{
|
{
|
||||||
int32 _o_result;
|
int32 _o_result;
|
||||||
int32 k;
|
int32 k;
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, &k);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 4);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
@ -754,19 +754,19 @@ int64 OPM_SymRInt64 (void)
|
||||||
{
|
{
|
||||||
int64 _o_result;
|
int64 _o_result;
|
||||||
int64 k;
|
int64 k;
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet64 (uint64 *s)
|
void OPM_SymRSet64 (uint64 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet (uint32 *s)
|
void OPM_SymRSet (uint32 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (int32*)&*s);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRReal (REAL *r)
|
void OPM_SymRReal (REAL *r)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN
|
||||||
|
|
||||||
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
||||||
{
|
{
|
||||||
__COPY("gcc -g -O1", s, s__len);
|
__COPY("gcc -g", s, s__len);
|
||||||
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
||||||
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
||||||
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,7 @@ export void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
export void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
export void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
@ -915,15 +914,15 @@ void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len)
|
||||||
} while (!b);
|
} while (!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
||||||
{
|
{
|
||||||
int8 s, b;
|
int8 s, b;
|
||||||
int64 q;
|
int64 q;
|
||||||
s = 0;
|
s = 0;
|
||||||
q = 0;
|
q = 0;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
while ((int16)b >= 128) {
|
while (b < 0) {
|
||||||
q += (int64)__ASH(((int16)b - 128), s);
|
q += (int64)__ASH(((int16)b + 128), s);
|
||||||
s += 7;
|
s += 7;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
}
|
}
|
||||||
|
|
@ -932,23 +931,6 @@ void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x
|
||||||
__MOVE((address)&q, (address)x, x__len);
|
__MOVE((address)&q, (address)x, x__len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x)
|
|
||||||
{
|
|
||||||
int8 s;
|
|
||||||
CHAR ch;
|
|
||||||
int32 n;
|
|
||||||
s = 0;
|
|
||||||
n = 0;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
while ((int16)ch >= 128) {
|
|
||||||
n += __ASH(((int16)ch - 128), s);
|
|
||||||
s += 7;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
}
|
|
||||||
n += __ASH((__MASK((int16)ch, -64) - __ASHL(__ASHR((int16)ch, 6), 6)), s);
|
|
||||||
*x = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
||||||
{
|
{
|
||||||
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,7 @@ import void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
import void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
import void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ int32 OPM_SymRInt (void)
|
||||||
{
|
{
|
||||||
int32 _o_result;
|
int32 _o_result;
|
||||||
int32 k;
|
int32 k;
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, &k);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 4);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
@ -754,19 +754,19 @@ int64 OPM_SymRInt64 (void)
|
||||||
{
|
{
|
||||||
int64 _o_result;
|
int64 _o_result;
|
||||||
int64 k;
|
int64 k;
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet64 (uint64 *s)
|
void OPM_SymRSet64 (uint64 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet (uint32 *s)
|
void OPM_SymRSet (uint32 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (int32*)&*s);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRReal (REAL *r)
|
void OPM_SymRReal (REAL *r)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN
|
||||||
|
|
||||||
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
||||||
{
|
{
|
||||||
__COPY("gcc -g -O1", s, s__len);
|
__COPY("gcc -g", s, s__len);
|
||||||
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
||||||
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
||||||
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,7 @@ export void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
export void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
export void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
@ -915,15 +914,15 @@ void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len)
|
||||||
} while (!b);
|
} while (!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
||||||
{
|
{
|
||||||
int8 s, b;
|
int8 s, b;
|
||||||
int64 q;
|
int64 q;
|
||||||
s = 0;
|
s = 0;
|
||||||
q = 0;
|
q = 0;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
while ((int16)b >= 128) {
|
while (b < 0) {
|
||||||
q += (int64)__ASH(((int16)b - 128), s);
|
q += (int64)__ASH(((int16)b + 128), s);
|
||||||
s += 7;
|
s += 7;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
}
|
}
|
||||||
|
|
@ -932,23 +931,6 @@ void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x
|
||||||
__MOVE((address)&q, (address)x, x__len);
|
__MOVE((address)&q, (address)x, x__len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x)
|
|
||||||
{
|
|
||||||
int8 s;
|
|
||||||
CHAR ch;
|
|
||||||
int32 n;
|
|
||||||
s = 0;
|
|
||||||
n = 0;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
while ((int16)ch >= 128) {
|
|
||||||
n += __ASH(((int16)ch - 128), s);
|
|
||||||
s += 7;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
}
|
|
||||||
n += __ASH((__MASK((int16)ch, -64) - __ASHL(__ASHR((int16)ch, 6), 6)), s);
|
|
||||||
*x = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
||||||
{
|
{
|
||||||
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,7 @@ import void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
import void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
import void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ int32 OPM_SymRInt (void)
|
||||||
{
|
{
|
||||||
int32 _o_result;
|
int32 _o_result;
|
||||||
int32 k;
|
int32 k;
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, &k);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 4);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
@ -754,19 +754,19 @@ int64 OPM_SymRInt64 (void)
|
||||||
{
|
{
|
||||||
int64 _o_result;
|
int64 _o_result;
|
||||||
int64 k;
|
int64 k;
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet64 (uint64 *s)
|
void OPM_SymRSet64 (uint64 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet (uint32 *s)
|
void OPM_SymRSet (uint32 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (int32*)&*s);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRReal (REAL *r)
|
void OPM_SymRReal (REAL *r)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN
|
||||||
|
|
||||||
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
||||||
{
|
{
|
||||||
__COPY("gcc -g -O1", s, s__len);
|
__COPY("gcc -g", s, s__len);
|
||||||
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
||||||
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
||||||
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,7 @@ export void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
export void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
export void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
export void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
export void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
export void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
export void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
export void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
@ -915,15 +914,15 @@ void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len)
|
||||||
} while (!b);
|
} while (!b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len)
|
||||||
{
|
{
|
||||||
int8 s, b;
|
int8 s, b;
|
||||||
int64 q;
|
int64 q;
|
||||||
s = 0;
|
s = 0;
|
||||||
q = 0;
|
q = 0;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
while ((int16)b >= 128) {
|
while (b < 0) {
|
||||||
q += (int64)__ASH(((int16)b - 128), s);
|
q += (int64)__ASH(((int16)b + 128), s);
|
||||||
s += 7;
|
s += 7;
|
||||||
Files_Read(&*R, R__typ, (void*)&b);
|
Files_Read(&*R, R__typ, (void*)&b);
|
||||||
}
|
}
|
||||||
|
|
@ -932,23 +931,6 @@ void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x
|
||||||
__MOVE((address)&q, (address)x, x__len);
|
__MOVE((address)&q, (address)x, x__len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x)
|
|
||||||
{
|
|
||||||
int8 s;
|
|
||||||
CHAR ch;
|
|
||||||
int32 n;
|
|
||||||
s = 0;
|
|
||||||
n = 0;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
while ((int16)ch >= 128) {
|
|
||||||
n += __ASH(((int16)ch - 128), s);
|
|
||||||
s += 7;
|
|
||||||
Files_Read(&*R, R__typ, (void*)&ch);
|
|
||||||
}
|
|
||||||
n += __ASH((__MASK((int16)ch, -64) - __ASHL(__ASHR((int16)ch, 6), 6)), s);
|
|
||||||
*x = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
void Files_WriteBool (Files_Rider *R, address *R__typ, BOOLEAN x)
|
||||||
{
|
{
|
||||||
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
Files_Write(&*R, R__typ, __VAL(CHAR, x));
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,7 @@ import void Files_ReadInt (Files_Rider *R, address *R__typ, int16 *x);
|
||||||
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadLInt (Files_Rider *R, address *R__typ, int32 *x);
|
||||||
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
import void Files_ReadLReal (Files_Rider *R, address *R__typ, LONGREAL *x);
|
||||||
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadLine (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
import void Files_ReadNum (Files_Rider *R, address *R__typ, int32 *x);
|
import void Files_ReadNum (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
||||||
import void Files_ReadNum64 (Files_Rider *R, address *R__typ, SYSTEM_BYTE *x, LONGINT x__len);
|
|
||||||
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
import void Files_ReadReal (Files_Rider *R, address *R__typ, REAL *x);
|
||||||
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
import void Files_ReadSet (Files_Rider *R, address *R__typ, uint32 *x);
|
||||||
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
import void Files_ReadString (Files_Rider *R, address *R__typ, CHAR *x, LONGINT x__len);
|
||||||
|
|
|
||||||
|
|
@ -745,7 +745,7 @@ int32 OPM_SymRInt (void)
|
||||||
{
|
{
|
||||||
int32 _o_result;
|
int32 _o_result;
|
||||||
int32 k;
|
int32 k;
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, &k);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 4);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
@ -754,19 +754,19 @@ int64 OPM_SymRInt64 (void)
|
||||||
{
|
{
|
||||||
int64 _o_result;
|
int64 _o_result;
|
||||||
int64 k;
|
int64 k;
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&k, 8);
|
||||||
_o_result = k;
|
_o_result = k;
|
||||||
return _o_result;
|
return _o_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet64 (uint64 *s)
|
void OPM_SymRSet64 (uint64 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum64(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRSet (uint32 *s)
|
void OPM_SymRSet (uint32 *s)
|
||||||
{
|
{
|
||||||
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (int32*)&*s);
|
Files_ReadNum(&OPM_oldSF, Files_Rider__typ, (void*)&*s, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPM_SymRReal (REAL *r)
|
void OPM_SymRReal (REAL *r)
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN
|
||||||
|
|
||||||
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len)
|
||||||
{
|
{
|
||||||
__COPY("gcc -g -O1", s, s__len);
|
__COPY("gcc -g", s, s__len);
|
||||||
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len);
|
||||||
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len);
|
||||||
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len);
|
||||||
|
|
|
||||||
|
|
@ -600,16 +600,16 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
||||||
|
|
||||||
PROCEDURE SymRInt64*(): SYSTEM.INT64;
|
PROCEDURE SymRInt64*(): SYSTEM.INT64;
|
||||||
VAR k: SYSTEM.INT64;
|
VAR k: SYSTEM.INT64;
|
||||||
BEGIN Files.ReadNum64(oldSF, k); RETURN k
|
BEGIN Files.ReadNum(oldSF, k); RETURN k
|
||||||
END SymRInt64;
|
END SymRInt64;
|
||||||
|
|
||||||
(* todo - combine RSet64 and RSet *)
|
(* todo - combine RSet64 and RSet *)
|
||||||
PROCEDURE SymRSet64*(VAR s: SYSTEM.SET64);
|
PROCEDURE SymRSet64*(VAR s: SYSTEM.SET64);
|
||||||
BEGIN Files.ReadNum64(oldSF, s)
|
BEGIN Files.ReadNum(oldSF, s)
|
||||||
END SymRSet64;
|
END SymRSet64;
|
||||||
|
|
||||||
PROCEDURE SymRSet*(VAR s: SET);
|
PROCEDURE SymRSet*(VAR s: SET);
|
||||||
BEGIN Files.ReadNum(oldSF, SYSTEM.VAL(LONGINT, s))
|
BEGIN Files.ReadNum(oldSF, s)
|
||||||
END SymRSet;
|
END SymRSet;
|
||||||
|
|
||||||
PROCEDURE SymRReal*(VAR r: REAL);
|
PROCEDURE SymRReal*(VAR r: REAL);
|
||||||
|
|
|
||||||
|
|
@ -657,7 +657,7 @@ Especially Length would become fairly complex.
|
||||||
PROCEDURE ReadNum*(VAR R: Rider; VAR x: ARRAY OF SYSTEM.BYTE);
|
PROCEDURE ReadNum*(VAR R: Rider; VAR x: ARRAY OF SYSTEM.BYTE);
|
||||||
VAR s, b: SYSTEM.INT8; q: SYSTEM.INT64;
|
VAR s, b: SYSTEM.INT8; q: SYSTEM.INT64;
|
||||||
BEGIN s := 0; q := 0; Read(R, b);
|
BEGIN s := 0; q := 0; Read(R, b);
|
||||||
WHILE b >= 128 DO INC(q, ASH(b-128, s)); INC(s, 7); Read(R, b) END;
|
WHILE b < 0 DO INC(q, ASH(b+128, s)); INC(s, 7); Read(R, b) END;
|
||||||
INC(q, ASH(b MOD 64 - b DIV 64 * 64, s));
|
INC(q, ASH(b MOD 64 - b DIV 64 * 64, s));
|
||||||
ASSERT(LEN(x) <= 8);
|
ASSERT(LEN(x) <= 8);
|
||||||
SYSTEM.MOVE(SYSTEM.ADR(q), SYSTEM.ADR(x), LEN(x)) (* Assumes little endian representation of q and x. *)
|
SYSTEM.MOVE(SYSTEM.ADR(q), SYSTEM.ADR(x), LEN(x)) (* Assumes little endian representation of q and x. *)
|
||||||
|
|
|
||||||
|
|
@ -654,23 +654,14 @@ Especially Length would become fairly complex.
|
||||||
UNTIL b
|
UNTIL b
|
||||||
END ReadLine;
|
END ReadLine;
|
||||||
|
|
||||||
(* todo combine ReadNum and ReadNum64 *)
|
PROCEDURE ReadNum*(VAR R: Rider; VAR x: ARRAY OF SYSTEM.BYTE);
|
||||||
PROCEDURE ReadNum64*(VAR R: Rider; VAR x: ARRAY OF SYSTEM.BYTE);
|
|
||||||
VAR s, b: SYSTEM.INT8; q: SYSTEM.INT64;
|
VAR s, b: SYSTEM.INT8; q: SYSTEM.INT64;
|
||||||
BEGIN s := 0; q := 0; Read(R, b);
|
BEGIN
|
||||||
WHILE b >= 128 DO INC(q, ASH(b-128, s)); INC(s, 7); Read(R, b) END;
|
s := 0; q := 0; Read(R, b);
|
||||||
|
WHILE b < 0 DO INC(q, ASH(b+128, s)); INC(s, 7); Read(R, b) END;
|
||||||
INC(q, ASH(b MOD 64 - b DIV 64 * 64, s));
|
INC(q, ASH(b MOD 64 - b DIV 64 * 64, s));
|
||||||
ASSERT(LEN(x) <= 8);
|
ASSERT(LEN(x) <= 8);
|
||||||
SYSTEM.MOVE(SYSTEM.ADR(q), SYSTEM.ADR(x), LEN(x)) (* Assumes little endian representation of q and x. *)
|
SYSTEM.MOVE(SYSTEM.ADR(q), SYSTEM.ADR(x), LEN(x)) (* Assumes little endian representation of q and x. *)
|
||||||
END ReadNum64;
|
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE ReadNum* (VAR R: Rider; VAR x: LONGINT);
|
|
||||||
VAR s: SHORTINT; ch: CHAR; n: LONGINT;
|
|
||||||
BEGIN s := 0; n := 0; Read(R, ch);
|
|
||||||
WHILE ORD(ch) >= 128 DO INC(n, ASH(ORD(ch) - 128, s) ); INC(s, 7); Read(R, ch) END;
|
|
||||||
INC(n, ASH(ORD(ch) MOD 64 - ORD(ch) DIV 64 * 64, s) );
|
|
||||||
x := n
|
|
||||||
END ReadNum;
|
END ReadNum;
|
||||||
|
|
||||||
PROCEDURE WriteBool* (VAR R: Rider; x: BOOLEAN);
|
PROCEDURE WriteBool* (VAR R: Rider; x: BOOLEAN);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ void determineOS() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define optimize " -O1"
|
#define optimize "" // " -O1"
|
||||||
|
|
||||||
void determineCCompiler() {
|
void determineCCompiler() {
|
||||||
snprintf(libspec, sizeof(libspec), " -l %s", oname);
|
snprintf(libspec, sizeof(libspec), " -l %s", oname);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue