* Deduplicate common constants into OPM and do some source format tidying.

* Fix postpush buildall script to force checkout of updated buildall.

* Show enlistment branch in makefiles

* Support non-printables in string literals and tidy case alignment and constant literals.

* Common code for MIN and MAX of integer types.

* Common code for SInt/Int/LInt in ConstOp parameter preparation.

* Common code for SInt/Int/LInt in Op parameter preparation.

* Refactor SetIntType to work with byte size directly. Prepare to revert my incorrect VAL changes.

* Original meaning of VAL restored. Many library files disabled until use of VAL in 64 bits fixed.

* Make Reals.Mod independent of INTEGER size and add reals tests.

* Implement fraction, IsInfinity and IsNaN in oocLowReal.Mod.

* OPB little simplifications and ShorterSize/LongerSize functions.

* Add test for alignment computability

* Replace alignment constants with calculated alignment.

* typ.size aware OPV.Convert

* Add SYSTEM_INT64 and make tests name independent.

* Remove SYSTEM.H includes (string.h and stdint.h).

* Replace uses of uintptr_t and size_t with SYSTEM_ADDRESS.

* Sad hack to make FreeBSD and OpenBSD happy with memcpy declaration.

* Detect 64 bit on FreeBSD, and size_t defined on OpenBSD.

* %zd not supportd by mingw, cast strnlen return to int.

* Add debug for intermittent failure only on OpenBSD.

* Add textTexts as a confidence test and tidy up a couple of other tests.

* Update binary test process.
This commit is contained in:
David C W Brown 2016-08-25 14:41:00 +01:00 committed by GitHub
parent 1f41d80b1e
commit da88496c5f
224 changed files with 7494 additions and 8065 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/08/23] for gcc LP64 on cygwin tspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"
@ -258,7 +258,7 @@ static void Files_Flush (Files_Buffer buf)
if (buf->org != f->pos) {
error = Platform_Seek(f->fd, buf->org, Platform_SeekSet);
}
error = Platform_Write(f->fd, (LONGINT)(uintptr_t)buf->data, buf->size);
error = Platform_Write(f->fd, (LONGINT)(SYSTEM_ADDRESS)buf->data, buf->size);
if (error != 0) {
Files_Err((CHAR*)"error writing file", (LONGINT)19, f, error);
}
@ -657,7 +657,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
} else {
min = n;
}
__MOVE((LONGINT)(uintptr_t)buf->data + offset, (LONGINT)(uintptr_t)x + xpos, min);
__MOVE((LONGINT)(SYSTEM_ADDRESS)buf->data + offset, (LONGINT)(SYSTEM_ADDRESS)x + xpos, min);
offset += min;
(*r).offset = offset;
xpos += min;
@ -722,7 +722,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
} else {
min = n;
}
__MOVE((LONGINT)(uintptr_t)x + xpos, (LONGINT)(uintptr_t)buf->data + offset, min);
__MOVE((LONGINT)(SYSTEM_ADDRESS)x + xpos, (LONGINT)(SYSTEM_ADDRESS)buf->data + offset, min);
offset += min;
(*r).offset = offset;
if (offset > buf->size) {
@ -773,15 +773,15 @@ void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT
*res = 3;
return;
}
error = Platform_Read(fdold, (LONGINT)(uintptr_t)buf, ((LONGINT)(4096)), &n);
error = Platform_Read(fdold, (LONGINT)(SYSTEM_ADDRESS)buf, ((LONGINT)(4096)), &n);
while (n > 0) {
error = Platform_Write(fdnew, (LONGINT)(uintptr_t)buf, n);
error = Platform_Write(fdnew, (LONGINT)(SYSTEM_ADDRESS)buf, n);
if (error != 0) {
ignore = Platform_Close(fdold);
ignore = Platform_Close(fdnew);
Files_Err((CHAR*)"cannot move file", (LONGINT)17, NIL, error);
}
error = Platform_Read(fdold, (LONGINT)(uintptr_t)buf, ((LONGINT)(4096)), &n);
error = Platform_Read(fdold, (LONGINT)(SYSTEM_ADDRESS)buf, ((LONGINT)(4096)), &n);
}
ignore = Platform_Close(fdold);
ignore = Platform_Close(fdnew);
@ -839,7 +839,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *de
j += 1;
}
} else {
__MOVE((LONGINT)(uintptr_t)src, (LONGINT)(uintptr_t)dest, src__len);
__MOVE((LONGINT)(SYSTEM_ADDRESS)src, (LONGINT)(SYSTEM_ADDRESS)dest, src__len);
}
}
@ -865,8 +865,10 @@ void Files_ReadLInt (Files_Rider *R, LONGINT *R__typ, LONGINT *x)
void Files_ReadSet (Files_Rider *R, LONGINT *R__typ, SET *x)
{
CHAR b[4];
LONGINT l;
Files_ReadBytes(&*R, R__typ, (void*)b, ((LONGINT)(4)), ((LONGINT)(4)));
*x = (SET)((((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((int)b[2], 16)) + __ASHL((int)b[3], 24));
l = (((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((int)b[2], 16)) + __ASHL((int)b[3], 24);
*x = (SET)l;
}
void Files_ReadReal (Files_Rider *R, LONGINT *R__typ, REAL *x)
@ -922,11 +924,11 @@ void Files_ReadNum (Files_Rider *R, LONGINT *R__typ, LONGINT *x)
n = 0;
Files_Read(&*R, R__typ, (void*)&ch);
while ((int)ch >= 128) {
n += __ASH((LONGINT)((int)ch - 128), s);
n += __ASH((SYSTEM_INT64)((int)ch - 128), s);
s += 7;
Files_Read(&*R, R__typ, (void*)&ch);
}
n += __ASH((LONGINT)(__MASK((int)ch, -64) - __ASHL(__ASHR((int)ch, 6), 6)), s);
n += __ASH((SYSTEM_INT64)(__MASK((int)ch, -64) - __ASHL(__ASHR((int)ch, 6), 6)), s);
*x = n;
}
@ -1007,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o)
{
Files_File f = NIL;
LONGINT res;
f = (Files_File)(uintptr_t)o;
f = (Files_File)(SYSTEM_ADDRESS)o;
if (f->fd >= 0) {
Files_CloseOSFile(f);
if (f->tempFile) {