Add basic SYSTEM.ADRINT type.

This commit is contained in:
David Brown 2016-08-26 16:28:07 +01:00
parent da88496c5f
commit b6385f8b8c
214 changed files with 680 additions and 649 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/08/23] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/08/26] 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)(SYSTEM_ADDRESS)buf->data, buf->size);
error = Platform_Write(f->fd, (LONGINT)(SYSTEM_ADRINT)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)(SYSTEM_ADDRESS)buf->data + offset, (LONGINT)(SYSTEM_ADDRESS)x + xpos, min);
__MOVE((LONGINT)(SYSTEM_ADRINT)buf->data + offset, (LONGINT)(SYSTEM_ADRINT)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)(SYSTEM_ADDRESS)x + xpos, (LONGINT)(SYSTEM_ADDRESS)buf->data + offset, min);
__MOVE((LONGINT)(SYSTEM_ADRINT)x + xpos, (LONGINT)(SYSTEM_ADRINT)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)(SYSTEM_ADDRESS)buf, ((LONGINT)(4096)), &n);
error = Platform_Read(fdold, (LONGINT)(SYSTEM_ADRINT)buf, ((LONGINT)(4096)), &n);
while (n > 0) {
error = Platform_Write(fdnew, (LONGINT)(SYSTEM_ADDRESS)buf, n);
error = Platform_Write(fdnew, (LONGINT)(SYSTEM_ADRINT)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)(SYSTEM_ADDRESS)buf, ((LONGINT)(4096)), &n);
error = Platform_Read(fdold, (LONGINT)(SYSTEM_ADRINT)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)(SYSTEM_ADDRESS)src, (LONGINT)(SYSTEM_ADDRESS)dest, src__len);
__MOVE((LONGINT)(SYSTEM_ADRINT)src, (LONGINT)(SYSTEM_ADRINT)dest, src__len);
}
}
@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o)
{
Files_File f = NIL;
LONGINT res;
f = (Files_File)(SYSTEM_ADDRESS)o;
f = (Files_File)(SYSTEM_ADRINT)o;
if (f->fd >= 0) {
Files_CloseOSFile(f);
if (f->tempFile) {