src/runtime/Files.Mod: Now using SYSTEM.MAXPATHLEN + 1 as size for the array-

type 'FileName' ...
bootstrap/*/*.[ch]: Committing the bootstrapping files after the modifications
    on the compiler and the runtime ...
This commit is contained in:
runkharr 2018-04-13 03:44:48 +02:00
parent 60df39cb6b
commit 8675fbf5f4
186 changed files with 531 additions and 446 deletions

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -26,7 +26,7 @@ typedef
Files_BufDesc *Files_Buffer; Files_BufDesc *Files_Buffer;
typedef typedef
CHAR Files_FileName[256]; CHAR Files_FileName[4096];
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
@ -129,9 +129,9 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
Out_String((CHAR*)": ", 3); Out_String((CHAR*)": ", 3);
if (f != NIL) { if (f != NIL) {
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Out_String(f->registerName, 256); Out_String(f->registerName, 4096);
} else { } else {
Out_String(f->workName, 256); Out_String(f->workName, 4096);
} }
if (f->fd != 0) { if (f->fd != 0) {
Out_String((CHAR*)"f.fd = ", 8); Out_String((CHAR*)"f.fd = ", 8);
@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
if (osfile != NIL) { if (osfile != NIL) {
__ASSERT(!osfile->tempFile, 0); __ASSERT(!osfile->tempFile, 0);
__ASSERT(osfile->fd >= 0, 0); __ASSERT(osfile->fd >= 0, 0);
__MOVE(osfile->workName, osfile->registerName, 256); __MOVE(osfile->workName, osfile->registerName, 4096);
Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); Files_GetTempName(osfile->registerName, 4096, (void*)osfile->workName, 4096);
osfile->tempFile = 1; osfile->tempFile = 1;
osfile->state = 0; osfile->state = 0;
error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); error = Platform_Rename((void*)osfile->registerName, 4096, (void*)osfile->workName, 4096);
if (error != 0) { if (error != 0) {
Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
} }
@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
CHAR err[32]; CHAR err[32];
if (f->fd == -1) { if (f->fd == -1) {
if (f->state == 1) { if (f->state == 1) {
Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); Files_GetTempName(f->registerName, 4096, (void*)f->workName, 4096);
f->tempFile = 1; f->tempFile = 1;
} else { } else {
__ASSERT(f->state == 2, 0); __ASSERT(f->state == 2, 0);
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
error = Platform_Unlink((void*)f->workName, 256); error = Platform_Unlink((void*)f->workName, 4096);
error = Platform_New((void*)f->workName, 256, &f->fd); error = Platform_New((void*)f->workName, 4096, &f->fd);
done = error == 0; done = error == 0;
if (done) { if (done) {
f->next = Files_files; f->next = Files_files;
@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
__DUP(name, name__len, CHAR); __DUP(name, name__len, CHAR);
__NEW(f, Files_FileDesc); __NEW(f, Files_FileDesc);
f->workName[0] = 0x00; f->workName[0] = 0x00;
__COPY(name, f->registerName, 256); __COPY(name, f->registerName, 4096);
f->fd = -1; f->fd = -1;
f->state = 1; f->state = 1;
f->len = 0; f->len = 0;
@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
f->pos = 0; f->pos = 0;
f->swapper = -1; f->swapper = -1;
error = Platform_Size(fd, &f->len); error = Platform_Size(fd, &f->len);
__COPY(name, f->workName, 256); __COPY(name, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
f->identity = identity; f->identity = identity;
@ -817,12 +817,12 @@ void Files_Register (Files_File f)
} }
Files_Close(f); Files_Close(f);
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
Files_Rename(f->workName, 256, f->registerName, 256, &errcode); Files_Rename(f->workName, 4096, f->registerName, 4096, &errcode);
if (errcode != 0) { if (errcode != 0) {
Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
} }
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
if (f->fd >= 0) { if (f->fd >= 0) {
Files_CloseOSFile(f); Files_CloseOSFile(f);
if (f->tempFile) { if (f->tempFile) {
res = Platform_Unlink((void*)f->workName, 256); res = Platform_Unlink((void*)f->workName, 4096);
} }
} }
} }
@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
P(Files_SearchPath); P(Files_SearchPath);
} }
__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}}; __TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 8244), {8220, 8224, 8228, 8232, -20}};
__TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}};
__TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}};

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h
@ -11,7 +11,7 @@ typedef
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
INT32 _prvt0; INT32 _prvt0;
char _prvt1[560]; char _prvt1[8240];
} Files_FileDesc; } Files_FileDesc;
typedef typedef

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -6,6 +6,7 @@
#define SET UINT32 #define SET UINT32
#include "SYSTEM.h" #include "SYSTEM.h"
#include "Configuration.h"
#include "OPM.h" #include "OPM.h"
#include "OPS.h" #include "OPS.h"
@ -126,6 +127,7 @@ export void OPT_Close (void);
export void OPT_CloseScope (void); export void OPT_CloseScope (void);
static void OPT_DebugStruct (OPT_Struct btyp); static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, INT32 value); static void OPT_EnterBoolConst (OPS_Name name, INT32 value);
static void OPT_EnterIntConst (OPS_Name name, INT32 value);
static void OPT_EnterProc (OPS_Name name, INT16 num); static void OPT_EnterProc (OPS_Name name, INT16 num);
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
@ -684,21 +686,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__15 { static struct FPrintStr__16 {
INT32 *pbfp, *pvfp; INT32 *pbfp, *pvfp;
struct FPrintStr__15 *lnk; struct FPrintStr__16 *lnk;
} *FPrintStr__15_s; } *FPrintStr__16_s;
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible); static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr); static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr);
static void FPrintTProcs__20 (OPT_Object obj); static void FPrintTProcs__21 (OPT_Object obj);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr) static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr)
{ {
INT32 i, j, n; INT32 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__16(typ->link, adr, 0); FPrintFlds__17(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -708,53 +710,53 @@ static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__15_s->pvfp, 11); OPM_FPrint(&*FPrintStr__16_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__15_s->pvfp, adr); OPM_FPrint(&*FPrintStr__16_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible) static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__15_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__16_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__18(fld->typ, fld, fld->adr + adr); FPrintHdFld__19(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__20 (OPT_Object obj) static void FPrintTProcs__21 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__20(obj->left); FPrintTProcs__21(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, 13); OPM_FPrint(&*FPrintStr__16_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__15_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__16_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__15_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__16_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__20(obj->right); FPrintTProcs__21(obj->right);
} }
} }
@ -764,11 +766,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
INT32 pbfp, pvfp; INT32 pbfp, pvfp;
struct FPrintStr__15 _s; struct FPrintStr__16 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__15_s; _s.lnk = FPrintStr__16_s;
FPrintStr__15_s = &_s; FPrintStr__16_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -805,11 +807,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__16(typ->link, 0, 1); FPrintFlds__17(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__20(typ->link); FPrintTProcs__21(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -819,7 +821,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__15_s = _s.lnk; FPrintStr__16_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1939,6 +1941,18 @@ static void OPT_EnterBoolConst (OPS_Name name, INT32 value)
obj->conval->intval = value; obj->conval->intval = value;
} }
static void OPT_EnterIntConst (OPS_Name name, INT32 value)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->conval = OPT_NewConst();
obj->mode = 3;
obj->typ = OPT_int32typ;
obj->conval->intval = value;
}
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -2067,6 +2081,7 @@ __TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 260), {256, -8}};
export void *OPT__init(void) export void *OPT__init(void)
{ {
__DEFMOD; __DEFMOD;
__MODULE_IMPORT(Configuration);
__MODULE_IMPORT(OPM); __MODULE_IMPORT(OPM);
__MODULE_IMPORT(OPS); __MODULE_IMPORT(OPS);
__REGMOD("OPT", EnumPtrs); __REGMOD("OPT", EnumPtrs);
@ -2110,6 +2125,8 @@ export void *OPT__init(void)
OPT_EnterProc((CHAR*)"VAL", 29); OPT_EnterProc((CHAR*)"VAL", 29);
OPT_EnterProc((CHAR*)"NEW", 30); OPT_EnterProc((CHAR*)"NEW", 30);
OPT_EnterProc((CHAR*)"MOVE", 31); OPT_EnterProc((CHAR*)"MOVE", 31);
OPT_EnterIntConst((CHAR*)"MAXPATHLEN", 4095);
OPT_EnterIntConst((CHAR*)"MAXFILENAMELEN", 255);
OPT_syslink = OPT_topScope->right; OPT_syslink = OPT_topScope->right;
OPT_universe = OPT_topScope; OPT_universe = OPT_topScope;
OPT_topScope->right = NIL; OPT_topScope->right = NIL;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -26,7 +26,7 @@ typedef
Files_BufDesc *Files_Buffer; Files_BufDesc *Files_Buffer;
typedef typedef
CHAR Files_FileName[256]; CHAR Files_FileName[4096];
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
@ -129,9 +129,9 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
Out_String((CHAR*)": ", 3); Out_String((CHAR*)": ", 3);
if (f != NIL) { if (f != NIL) {
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Out_String(f->registerName, 256); Out_String(f->registerName, 4096);
} else { } else {
Out_String(f->workName, 256); Out_String(f->workName, 4096);
} }
if (f->fd != 0) { if (f->fd != 0) {
Out_String((CHAR*)"f.fd = ", 8); Out_String((CHAR*)"f.fd = ", 8);
@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
if (osfile != NIL) { if (osfile != NIL) {
__ASSERT(!osfile->tempFile, 0); __ASSERT(!osfile->tempFile, 0);
__ASSERT(osfile->fd >= 0, 0); __ASSERT(osfile->fd >= 0, 0);
__MOVE(osfile->workName, osfile->registerName, 256); __MOVE(osfile->workName, osfile->registerName, 4096);
Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); Files_GetTempName(osfile->registerName, 4096, (void*)osfile->workName, 4096);
osfile->tempFile = 1; osfile->tempFile = 1;
osfile->state = 0; osfile->state = 0;
error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); error = Platform_Rename((void*)osfile->registerName, 4096, (void*)osfile->workName, 4096);
if (error != 0) { if (error != 0) {
Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
} }
@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
CHAR err[32]; CHAR err[32];
if (f->fd == -1) { if (f->fd == -1) {
if (f->state == 1) { if (f->state == 1) {
Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); Files_GetTempName(f->registerName, 4096, (void*)f->workName, 4096);
f->tempFile = 1; f->tempFile = 1;
} else { } else {
__ASSERT(f->state == 2, 0); __ASSERT(f->state == 2, 0);
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
error = Platform_Unlink((void*)f->workName, 256); error = Platform_Unlink((void*)f->workName, 4096);
error = Platform_New((void*)f->workName, 256, &f->fd); error = Platform_New((void*)f->workName, 4096, &f->fd);
done = error == 0; done = error == 0;
if (done) { if (done) {
f->next = Files_files; f->next = Files_files;
@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
__DUP(name, name__len, CHAR); __DUP(name, name__len, CHAR);
__NEW(f, Files_FileDesc); __NEW(f, Files_FileDesc);
f->workName[0] = 0x00; f->workName[0] = 0x00;
__COPY(name, f->registerName, 256); __COPY(name, f->registerName, 4096);
f->fd = -1; f->fd = -1;
f->state = 1; f->state = 1;
f->len = 0; f->len = 0;
@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
f->pos = 0; f->pos = 0;
f->swapper = -1; f->swapper = -1;
error = Platform_Size(fd, &f->len); error = Platform_Size(fd, &f->len);
__COPY(name, f->workName, 256); __COPY(name, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
f->identity = identity; f->identity = identity;
@ -817,12 +817,12 @@ void Files_Register (Files_File f)
} }
Files_Close(f); Files_Close(f);
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
Files_Rename(f->workName, 256, f->registerName, 256, &errcode); Files_Rename(f->workName, 4096, f->registerName, 4096, &errcode);
if (errcode != 0) { if (errcode != 0) {
Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
} }
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
if (f->fd >= 0) { if (f->fd >= 0) {
Files_CloseOSFile(f); Files_CloseOSFile(f);
if (f->tempFile) { if (f->tempFile) {
res = Platform_Unlink((void*)f->workName, 256); res = Platform_Unlink((void*)f->workName, 4096);
} }
} }
} }
@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
P(Files_SearchPath); P(Files_SearchPath);
} }
__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}}; __TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 8244), {8220, 8224, 8228, 8232, -20}};
__TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}};
__TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}};

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h
@ -11,7 +11,7 @@ typedef
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
INT32 _prvt0; INT32 _prvt0;
char _prvt1[560]; char _prvt1[8240];
} Files_FileDesc; } Files_FileDesc;
typedef typedef

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -6,6 +6,7 @@
#define SET UINT32 #define SET UINT32
#include "SYSTEM.h" #include "SYSTEM.h"
#include "Configuration.h"
#include "OPM.h" #include "OPM.h"
#include "OPS.h" #include "OPS.h"
@ -126,6 +127,7 @@ export void OPT_Close (void);
export void OPT_CloseScope (void); export void OPT_CloseScope (void);
static void OPT_DebugStruct (OPT_Struct btyp); static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, INT32 value); static void OPT_EnterBoolConst (OPS_Name name, INT32 value);
static void OPT_EnterIntConst (OPS_Name name, INT32 value);
static void OPT_EnterProc (OPS_Name name, INT16 num); static void OPT_EnterProc (OPS_Name name, INT16 num);
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
@ -684,21 +686,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__15 { static struct FPrintStr__16 {
INT32 *pbfp, *pvfp; INT32 *pbfp, *pvfp;
struct FPrintStr__15 *lnk; struct FPrintStr__16 *lnk;
} *FPrintStr__15_s; } *FPrintStr__16_s;
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible); static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr); static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr);
static void FPrintTProcs__20 (OPT_Object obj); static void FPrintTProcs__21 (OPT_Object obj);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr) static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr)
{ {
INT32 i, j, n; INT32 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__16(typ->link, adr, 0); FPrintFlds__17(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -708,53 +710,53 @@ static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__15_s->pvfp, 11); OPM_FPrint(&*FPrintStr__16_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__15_s->pvfp, adr); OPM_FPrint(&*FPrintStr__16_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible) static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__15_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__16_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__18(fld->typ, fld, fld->adr + adr); FPrintHdFld__19(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__20 (OPT_Object obj) static void FPrintTProcs__21 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__20(obj->left); FPrintTProcs__21(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, 13); OPM_FPrint(&*FPrintStr__16_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__15_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__16_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__15_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__16_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__20(obj->right); FPrintTProcs__21(obj->right);
} }
} }
@ -764,11 +766,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
INT32 pbfp, pvfp; INT32 pbfp, pvfp;
struct FPrintStr__15 _s; struct FPrintStr__16 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__15_s; _s.lnk = FPrintStr__16_s;
FPrintStr__15_s = &_s; FPrintStr__16_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -805,11 +807,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__16(typ->link, 0, 1); FPrintFlds__17(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__20(typ->link); FPrintTProcs__21(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -819,7 +821,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__15_s = _s.lnk; FPrintStr__16_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1939,6 +1941,18 @@ static void OPT_EnterBoolConst (OPS_Name name, INT32 value)
obj->conval->intval = value; obj->conval->intval = value;
} }
static void OPT_EnterIntConst (OPS_Name name, INT32 value)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->conval = OPT_NewConst();
obj->mode = 3;
obj->typ = OPT_int32typ;
obj->conval->intval = value;
}
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -2067,6 +2081,7 @@ __TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 260), {256, -8}};
export void *OPT__init(void) export void *OPT__init(void)
{ {
__DEFMOD; __DEFMOD;
__MODULE_IMPORT(Configuration);
__MODULE_IMPORT(OPM); __MODULE_IMPORT(OPM);
__MODULE_IMPORT(OPS); __MODULE_IMPORT(OPS);
__REGMOD("OPT", EnumPtrs); __REGMOD("OPT", EnumPtrs);
@ -2110,6 +2125,8 @@ export void *OPT__init(void)
OPT_EnterProc((CHAR*)"VAL", 29); OPT_EnterProc((CHAR*)"VAL", 29);
OPT_EnterProc((CHAR*)"NEW", 30); OPT_EnterProc((CHAR*)"NEW", 30);
OPT_EnterProc((CHAR*)"MOVE", 31); OPT_EnterProc((CHAR*)"MOVE", 31);
OPT_EnterIntConst((CHAR*)"MAXPATHLEN", 4095);
OPT_EnterIntConst((CHAR*)"MAXFILENAMELEN", 255);
OPT_syslink = OPT_topScope->right; OPT_syslink = OPT_topScope->right;
OPT_universe = OPT_topScope; OPT_universe = OPT_topScope;
OPT_topScope->right = NIL; OPT_topScope->right = NIL;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Platform__h #ifndef Platform__h
#define Platform__h #define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Reals__h #ifndef Reals__h
#define Reals__h #define Reals__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Strings__h #ifndef Strings__h
#define Strings__h #define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Texts__h #ifndef Texts__h
#define Texts__h #define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef VT100__h #ifndef VT100__h
#define VT100__h #define VT100__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef extTools__h #ifndef extTools__h
#define extTools__h #define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -19,6 +19,6 @@ export void *Configuration__init(void)
__DEFMOD; __DEFMOD;
__REGMOD("Configuration", 0); __REGMOD("Configuration", 0);
/* BEGIN */ /* BEGIN */
__MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __MOVE("2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76);
__ENDMOD; __ENDMOD;
} }

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Configuration__h #ifndef Configuration__h
#define Configuration__h #define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -26,7 +26,7 @@ typedef
Files_BufDesc *Files_Buffer; Files_BufDesc *Files_Buffer;
typedef typedef
CHAR Files_FileName[256]; CHAR Files_FileName[4096];
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
@ -129,9 +129,9 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
Out_String((CHAR*)": ", 3); Out_String((CHAR*)": ", 3);
if (f != NIL) { if (f != NIL) {
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Out_String(f->registerName, 256); Out_String(f->registerName, 4096);
} else { } else {
Out_String(f->workName, 256); Out_String(f->workName, 4096);
} }
if (f->fd != 0) { if (f->fd != 0) {
Out_String((CHAR*)"f.fd = ", 8); Out_String((CHAR*)"f.fd = ", 8);
@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
if (osfile != NIL) { if (osfile != NIL) {
__ASSERT(!osfile->tempFile, 0); __ASSERT(!osfile->tempFile, 0);
__ASSERT(osfile->fd >= 0, 0); __ASSERT(osfile->fd >= 0, 0);
__MOVE(osfile->workName, osfile->registerName, 256); __MOVE(osfile->workName, osfile->registerName, 4096);
Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); Files_GetTempName(osfile->registerName, 4096, (void*)osfile->workName, 4096);
osfile->tempFile = 1; osfile->tempFile = 1;
osfile->state = 0; osfile->state = 0;
error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); error = Platform_Rename((void*)osfile->registerName, 4096, (void*)osfile->workName, 4096);
if (error != 0) { if (error != 0) {
Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
} }
@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
CHAR err[32]; CHAR err[32];
if (f->fd == -1) { if (f->fd == -1) {
if (f->state == 1) { if (f->state == 1) {
Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); Files_GetTempName(f->registerName, 4096, (void*)f->workName, 4096);
f->tempFile = 1; f->tempFile = 1;
} else { } else {
__ASSERT(f->state == 2, 0); __ASSERT(f->state == 2, 0);
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
error = Platform_Unlink((void*)f->workName, 256); error = Platform_Unlink((void*)f->workName, 4096);
error = Platform_New((void*)f->workName, 256, &f->fd); error = Platform_New((void*)f->workName, 4096, &f->fd);
done = error == 0; done = error == 0;
if (done) { if (done) {
f->next = Files_files; f->next = Files_files;
@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
__DUP(name, name__len, CHAR); __DUP(name, name__len, CHAR);
__NEW(f, Files_FileDesc); __NEW(f, Files_FileDesc);
f->workName[0] = 0x00; f->workName[0] = 0x00;
__COPY(name, f->registerName, 256); __COPY(name, f->registerName, 4096);
f->fd = -1; f->fd = -1;
f->state = 1; f->state = 1;
f->len = 0; f->len = 0;
@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
f->pos = 0; f->pos = 0;
f->swapper = -1; f->swapper = -1;
error = Platform_Size(fd, &f->len); error = Platform_Size(fd, &f->len);
__COPY(name, f->workName, 256); __COPY(name, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
f->identity = identity; f->identity = identity;
@ -817,12 +817,12 @@ void Files_Register (Files_File f)
} }
Files_Close(f); Files_Close(f);
if (f->registerName[0] != 0x00) { if (f->registerName[0] != 0x00) {
Files_Deregister(f->registerName, 256); Files_Deregister(f->registerName, 4096);
Files_Rename(f->workName, 256, f->registerName, 256, &errcode); Files_Rename(f->workName, 4096, f->registerName, 4096, &errcode);
if (errcode != 0) { if (errcode != 0) {
Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
} }
__MOVE(f->registerName, f->workName, 256); __MOVE(f->registerName, f->workName, 4096);
f->registerName[0] = 0x00; f->registerName[0] = 0x00;
f->tempFile = 0; f->tempFile = 0;
} }
@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
if (f->fd >= 0) { if (f->fd >= 0) {
Files_CloseOSFile(f); Files_CloseOSFile(f);
if (f->tempFile) { if (f->tempFile) {
res = Platform_Unlink((void*)f->workName, 256); res = Platform_Unlink((void*)f->workName, 4096);
} }
} }
} }
@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
P(Files_SearchPath); P(Files_SearchPath);
} }
__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 592), {544, 552, 560, 568, -40}}; __TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 8272), {8224, 8232, 8240, 8248, -40}};
__TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}};
__TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}};

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef Files__h #ifndef Files__h
#define Files__h #define Files__h
@ -11,7 +11,7 @@ typedef
typedef typedef
struct Files_FileDesc { struct Files_FileDesc {
INT64 _prvt0; INT64 _prvt0;
char _prvt1[584]; char _prvt1[8264];
} Files_FileDesc; } Files_FileDesc;
typedef typedef

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
#ifndef Heap__h #ifndef Heap__h
#define Heap__h #define Heap__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Modules__h #ifndef Modules__h
#define Modules__h #define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPB__h #ifndef OPB__h
#define OPB__h #define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPC__h #ifndef OPC__h
#define OPC__h #define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPM__h #ifndef OPM__h
#define OPM__h #define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPP__h #ifndef OPP__h
#define OPP__h #define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
#ifndef OPS__h #ifndef OPS__h
#define OPS__h #define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16
@ -6,6 +6,7 @@
#define SET UINT32 #define SET UINT32
#include "SYSTEM.h" #include "SYSTEM.h"
#include "Configuration.h"
#include "OPM.h" #include "OPM.h"
#include "OPS.h" #include "OPS.h"
@ -126,6 +127,7 @@ export void OPT_Close (void);
export void OPT_CloseScope (void); export void OPT_CloseScope (void);
static void OPT_DebugStruct (OPT_Struct btyp); static void OPT_DebugStruct (OPT_Struct btyp);
static void OPT_EnterBoolConst (OPS_Name name, INT32 value); static void OPT_EnterBoolConst (OPS_Name name, INT32 value);
static void OPT_EnterIntConst (OPS_Name name, INT32 value);
static void OPT_EnterProc (OPS_Name name, INT16 num); static void OPT_EnterProc (OPS_Name name, INT16 num);
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res); static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res);
static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res);
@ -684,21 +686,21 @@ void OPT_IdFPrint (OPT_Struct typ)
} }
} }
static struct FPrintStr__15 { static struct FPrintStr__16 {
INT32 *pbfp, *pvfp; INT32 *pbfp, *pvfp;
struct FPrintStr__15 *lnk; struct FPrintStr__16 *lnk;
} *FPrintStr__15_s; } *FPrintStr__16_s;
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible); static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr); static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr);
static void FPrintTProcs__20 (OPT_Object obj); static void FPrintTProcs__21 (OPT_Object obj);
static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr) static void FPrintHdFld__19 (OPT_Struct typ, OPT_Object fld, INT32 adr)
{ {
INT32 i, j, n; INT32 i, j, n;
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
if (typ->comp == 4) { if (typ->comp == 4) {
FPrintFlds__16(typ->link, adr, 0); FPrintFlds__17(typ->link, adr, 0);
} else if (typ->comp == 2) { } else if (typ->comp == 2) {
btyp = typ->BaseTyp; btyp = typ->BaseTyp;
n = typ->n; n = typ->n;
@ -708,53 +710,53 @@ static void FPrintHdFld__18 (OPT_Struct typ, OPT_Object fld, INT32 adr)
} }
if (btyp->form == 11 || btyp->comp == 4) { if (btyp->form == 11 || btyp->comp == 4) {
j = OPT_nofhdfld; j = OPT_nofhdfld;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
if (j != OPT_nofhdfld) { if (j != OPT_nofhdfld) {
i = 1; i = 1;
while ((i < n && OPT_nofhdfld <= 2048)) { while ((i < n && OPT_nofhdfld <= 2048)) {
adr += btyp->size; adr += btyp->size;
FPrintHdFld__18(btyp, fld, adr); FPrintHdFld__19(btyp, fld, adr);
i += 1; i += 1;
} }
} }
} }
} else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) { } else if (typ->form == 11 || __STRCMP(fld->name, "@ptr") == 0) {
OPM_FPrint(&*FPrintStr__15_s->pvfp, 11); OPM_FPrint(&*FPrintStr__16_s->pvfp, 11);
OPM_FPrint(&*FPrintStr__15_s->pvfp, adr); OPM_FPrint(&*FPrintStr__16_s->pvfp, adr);
OPT_nofhdfld += 1; OPT_nofhdfld += 1;
} }
} }
static void FPrintFlds__16 (OPT_Object fld, INT32 adr, BOOLEAN visible) static void FPrintFlds__17 (OPT_Object fld, INT32 adr, BOOLEAN visible)
{ {
while ((fld != NIL && fld->mode == 4)) { while ((fld != NIL && fld->mode == 4)) {
if ((fld->vis != 0 && visible)) { if ((fld->vis != 0 && visible)) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->vis); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->vis);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)fld->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)fld->name, 256);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->adr); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->adr);
OPT_FPrintStr(fld->typ); OPT_FPrintStr(fld->typ);
OPM_FPrint(&*FPrintStr__15_s->pbfp, fld->typ->pbfp); OPM_FPrint(&*FPrintStr__16_s->pbfp, fld->typ->pbfp);
OPM_FPrint(&*FPrintStr__15_s->pvfp, fld->typ->pvfp); OPM_FPrint(&*FPrintStr__16_s->pvfp, fld->typ->pvfp);
} else { } else {
FPrintHdFld__18(fld->typ, fld, fld->adr + adr); FPrintHdFld__19(fld->typ, fld, fld->adr + adr);
} }
fld = fld->link; fld = fld->link;
} }
} }
static void FPrintTProcs__20 (OPT_Object obj) static void FPrintTProcs__21 (OPT_Object obj)
{ {
if (obj != NIL) { if (obj != NIL) {
FPrintTProcs__20(obj->left); FPrintTProcs__21(obj->left);
if (obj->mode == 13) { if (obj->mode == 13) {
if (obj->vis != 0) { if (obj->vis != 0) {
OPM_FPrint(&*FPrintStr__15_s->pbfp, 13); OPM_FPrint(&*FPrintStr__16_s->pbfp, 13);
OPM_FPrint(&*FPrintStr__15_s->pbfp, __ASHR(obj->adr, 16)); OPM_FPrint(&*FPrintStr__16_s->pbfp, __ASHR(obj->adr, 16));
OPT_FPrintSign(&*FPrintStr__15_s->pbfp, obj->typ, obj->link); OPT_FPrintSign(&*FPrintStr__16_s->pbfp, obj->typ, obj->link);
OPT_FPrintName(&*FPrintStr__15_s->pbfp, (void*)obj->name, 256); OPT_FPrintName(&*FPrintStr__16_s->pbfp, (void*)obj->name, 256);
} }
} }
FPrintTProcs__20(obj->right); FPrintTProcs__21(obj->right);
} }
} }
@ -764,11 +766,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPT_Struct btyp = NIL; OPT_Struct btyp = NIL;
OPT_Object strobj = NIL, bstrobj = NIL; OPT_Object strobj = NIL, bstrobj = NIL;
INT32 pbfp, pvfp; INT32 pbfp, pvfp;
struct FPrintStr__15 _s; struct FPrintStr__16 _s;
_s.pbfp = &pbfp; _s.pbfp = &pbfp;
_s.pvfp = &pvfp; _s.pvfp = &pvfp;
_s.lnk = FPrintStr__15_s; _s.lnk = FPrintStr__16_s;
FPrintStr__15_s = &_s; FPrintStr__16_s = &_s;
if (!typ->fpdone) { if (!typ->fpdone) {
OPT_IdFPrint(typ); OPT_IdFPrint(typ);
pbfp = typ->idfp; pbfp = typ->idfp;
@ -805,11 +807,11 @@ void OPT_FPrintStr (OPT_Struct typ)
OPM_FPrint(&pvfp, typ->align); OPM_FPrint(&pvfp, typ->align);
OPM_FPrint(&pvfp, typ->n); OPM_FPrint(&pvfp, typ->n);
OPT_nofhdfld = 0; OPT_nofhdfld = 0;
FPrintFlds__16(typ->link, 0, 1); FPrintFlds__17(typ->link, 0, 1);
if (OPT_nofhdfld > 2048) { if (OPT_nofhdfld > 2048) {
OPM_Mark(225, typ->txtpos); OPM_Mark(225, typ->txtpos);
} }
FPrintTProcs__20(typ->link); FPrintTProcs__21(typ->link);
OPM_FPrint(&pvfp, pbfp); OPM_FPrint(&pvfp, pbfp);
strobj = typ->strobj; strobj = typ->strobj;
if (strobj == NIL || strobj->name[0] == 0x00) { if (strobj == NIL || strobj->name[0] == 0x00) {
@ -819,7 +821,7 @@ void OPT_FPrintStr (OPT_Struct typ)
typ->pbfp = pbfp; typ->pbfp = pbfp;
typ->pvfp = pvfp; typ->pvfp = pvfp;
} }
FPrintStr__15_s = _s.lnk; FPrintStr__16_s = _s.lnk;
} }
void OPT_FPrintObj (OPT_Object obj) void OPT_FPrintObj (OPT_Object obj)
@ -1939,6 +1941,18 @@ static void OPT_EnterBoolConst (OPS_Name name, INT32 value)
obj->conval->intval = value; obj->conval->intval = value;
} }
static void OPT_EnterIntConst (OPS_Name name, INT32 value)
{
OPT_Object obj = NIL;
OPS_Name name__copy;
__DUPARR(name, OPS_Name);
OPT_Insert(name, &obj);
obj->conval = OPT_NewConst();
obj->mode = 3;
obj->typ = OPT_int32typ;
obj->conval->intval = value;
}
static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res)
{ {
OPT_Object obj = NIL; OPT_Object obj = NIL;
@ -2067,6 +2081,7 @@ __TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 264), {256, -16}};
export void *OPT__init(void) export void *OPT__init(void)
{ {
__DEFMOD; __DEFMOD;
__MODULE_IMPORT(Configuration);
__MODULE_IMPORT(OPM); __MODULE_IMPORT(OPM);
__MODULE_IMPORT(OPS); __MODULE_IMPORT(OPS);
__REGMOD("OPT", EnumPtrs); __REGMOD("OPT", EnumPtrs);
@ -2110,6 +2125,8 @@ export void *OPT__init(void)
OPT_EnterProc((CHAR*)"VAL", 29); OPT_EnterProc((CHAR*)"VAL", 29);
OPT_EnterProc((CHAR*)"NEW", 30); OPT_EnterProc((CHAR*)"NEW", 30);
OPT_EnterProc((CHAR*)"MOVE", 31); OPT_EnterProc((CHAR*)"MOVE", 31);
OPT_EnterIntConst((CHAR*)"MAXPATHLEN", 4095);
OPT_EnterIntConst((CHAR*)"MAXFILENAMELEN", 255);
OPT_syslink = OPT_topScope->right; OPT_syslink = OPT_topScope->right;
OPT_universe = OPT_topScope; OPT_universe = OPT_topScope;
OPT_topScope->right = NIL; OPT_topScope->right = NIL;

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPT__h #ifndef OPT__h
#define OPT__h #define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef OPV__h #ifndef OPV__h
#define OPV__h #define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#ifndef Out__h #ifndef Out__h
#define Out__h #define Out__h

View file

@ -1,4 +1,4 @@
/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ /* voc 2.1.0 [2018/04/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
#define SHORTINT INT8 #define SHORTINT INT8
#define INTEGER INT16 #define INTEGER INT16

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