From 056a317e542ffb36e1fb4028d382c9e56251c9ba Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 24 Nov 2016 18:10:51 +0000 Subject: [PATCH 001/241] Remove SetHalt documentation - code was already disabled. --- doc/Features.md | 2 -- src/runtime/Modules.Mod | 5 ----- 2 files changed, 7 deletions(-) diff --git a/doc/Features.md b/doc/Features.md index e597732c..ae0bcc43 100644 --- a/doc/Features.md +++ b/doc/Features.md @@ -144,5 +144,3 @@ HALT displays the message 'Terminated by Halt(n)'. For negative values that corr Bear in mind that both Linux and Windows generally treat the return code as a signed 8 bit value, ignoring higher order bits. Therefore it is best to restrict HALT and ASSERT codes to the range -128 .. 127. -A client application may register a halt handler by calling Platform.SetHalt(p) where p: PROCEDURE(n: SYSTEM.INT32). This procedure will be called before Halt displays it's message. The procedure may suppress the Halt message by calling Platform.Exit(code: INTEGER) directly. - diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index d6b8eeeb..12fbcd7a 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -151,9 +151,4 @@ MODULE Modules; (* jt 6.1.96 *) Platform.Exit(code); END AssertFail; - (* - PROCEDURE SetHalt*(p: HaltProcedure); - BEGIN HaltHandler := p; END SetHalt; - *) - END Modules. From 5ae282dc9f73f314c51c870a205d402dcf71ed7d Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 24 Nov 2016 19:00:46 +0000 Subject: [PATCH 002/241] Trigger build (after dragging each build machine past the v2.00 tag.) --- src/compiler/OPP.Mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 329d52b4..826a60e6 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -218,12 +218,10 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) END END ; CheckSym(OPS.colon); Type(typ, OPT.notyp); - IF ((typ.comp = OPT.Array) OR (typ.comp = OPT.Record)) & (typ.strobj = NIL) THEN err(-309) END; - IF mode = OPT.Var THEN typ^.pvused := TRUE END ; (* typ^.pbused is set when parameter type name is parsed *) WHILE first # NIL DO first^.typ := typ; first := first^.link END ; From cbf78cb6f12cf83a929d66664ea9639ba46f774c Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 25 Nov 2016 12:45:33 +0000 Subject: [PATCH 003/241] Fix allocation size for dynarry dope vector - ADDRESS rather than LONGINT. --- src/compiler/OPC.Mod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index a8681e32..1e5ab5a7 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -248,7 +248,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) typ := typ^.BaseTyp^.BaseTyp; nofdims := 1; WHILE typ^.comp = OPT.DynArr DO INC(nofdims); typ := typ^.BaseTyp END ; OPM.WriteString('struct '); BegBlk; - BegStat; Str1("LONGINT len[#]", nofdims); EndStat; + BegStat; Str1("ADDRESS len[#]", nofdims); EndStat; BegStat; NEW(obj); NEW(obj.typ); (* aux. object for easy declaration *) obj.typ.form := OPT.Comp; obj.typ.comp := OPT.Array; obj.typ.n := 1; obj.typ.BaseTyp := typ; obj.mode := OPT.Fld; obj.name := "data"; obj.linkadr := UndefinedType; DeclareBase(obj); OPM.Write(' '); DeclareObj(obj, FALSE); @@ -335,7 +335,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) IF showParamName THEN Ident(par); OPM.WriteString(LenExt) END ; dim := 1; typ := par^.typ^.BaseTyp; WHILE typ^.comp = OPT.DynArr DO - IF ansiDefine THEN OPM.WriteString(", LONGINT ") ELSE OPM.WriteString(', ') END ; + IF ansiDefine THEN OPM.WriteString(", ADDRESS ") ELSE OPM.WriteString(', ') END ; IF showParamName THEN Ident(par); OPM.WriteString(LenExt); OPM.WriteInt(dim) END ; typ := typ^.BaseTyp; INC(dim) END @@ -656,7 +656,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) IF obj^.typ^.comp = OPT.DynArr THEN (* declare len parameter(s) *) EndStat; BegStat; base := OPT.linttyp; - OPM.WriteString("LONGINT "); LenList(obj, FALSE, TRUE) + OPM.WriteString("ADDRESS "); LenList(obj, FALSE, TRUE) ELSIF (obj^.mode = OPT.VarPar) & (obj^.typ^.comp = OPT.Record) THEN EndStat; BegStat; OPM.WriteString("ADDRESS *"); Ident(obj); OPM.WriteString(TagExt); @@ -684,7 +684,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) COPY(obj^.name, name); obj^.name := ""; DeclareObj(obj, FALSE); COPY(name, obj^.name) END ; IF obj^.typ^.comp = OPT.DynArr THEN - OPM.WriteString(", LONGINT "); + OPM.WriteString(", ADDRESS "); LenList(obj, TRUE, showParamNames) ELSIF (obj^.mode = OPT.VarPar) & (obj^.typ^.comp = OPT.Record) THEN OPM.WriteString(", ADDRESS *"); From 7279aa91be82ce5231529345299aa7e89e370520 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 25 Nov 2016 13:03:26 +0000 Subject: [PATCH 004/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 80 ++++++++++++++-------------- bootstrap/unix-44/Files.h | 28 +++++----- bootstrap/unix-44/Heap.c | 18 +++---- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 22 ++++---- bootstrap/unix-44/Modules.h | 8 +-- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 38 ++++++------- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 46 ++++++++-------- bootstrap/unix-44/OPM.h | 18 +++---- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 14 ++--- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 18 +++---- bootstrap/unix-44/Out.h | 4 +- bootstrap/unix-44/Platform.c | 54 +++++++++---------- bootstrap/unix-44/Platform.h | 28 +++++----- bootstrap/unix-44/Reals.c | 22 ++++---- bootstrap/unix-44/Reals.h | 10 ++-- bootstrap/unix-44/Strings.c | 42 +++++++-------- bootstrap/unix-44/Strings.h | 20 +++---- bootstrap/unix-44/Texts.c | 18 +++---- bootstrap/unix-44/Texts.h | 8 +-- bootstrap/unix-44/VT100.c | 30 +++++------ bootstrap/unix-44/VT100.h | 6 +-- bootstrap/unix-44/extTools.c | 18 +++---- bootstrap/unix-44/extTools.h | 6 +-- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 80 ++++++++++++++-------------- bootstrap/unix-48/Files.h | 28 +++++----- bootstrap/unix-48/Heap.c | 18 +++---- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 22 ++++---- bootstrap/unix-48/Modules.h | 8 +-- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 38 ++++++------- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 46 ++++++++-------- bootstrap/unix-48/OPM.h | 18 +++---- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 14 ++--- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 18 +++---- bootstrap/unix-48/Out.h | 4 +- bootstrap/unix-48/Platform.c | 54 +++++++++---------- bootstrap/unix-48/Platform.h | 28 +++++----- bootstrap/unix-48/Reals.c | 22 ++++---- bootstrap/unix-48/Reals.h | 10 ++-- bootstrap/unix-48/Strings.c | 42 +++++++-------- bootstrap/unix-48/Strings.h | 20 +++---- bootstrap/unix-48/Texts.c | 18 +++---- bootstrap/unix-48/Texts.h | 8 +-- bootstrap/unix-48/VT100.c | 30 +++++------ bootstrap/unix-48/VT100.h | 6 +-- bootstrap/unix-48/extTools.c | 18 +++---- bootstrap/unix-48/extTools.h | 6 +-- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 80 ++++++++++++++-------------- bootstrap/unix-88/Files.h | 28 +++++----- bootstrap/unix-88/Heap.c | 18 +++---- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 22 ++++---- bootstrap/unix-88/Modules.h | 8 +-- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 38 ++++++------- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 46 ++++++++-------- bootstrap/unix-88/OPM.h | 18 +++---- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 14 ++--- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 18 +++---- bootstrap/unix-88/Out.h | 4 +- bootstrap/unix-88/Platform.c | 54 +++++++++---------- bootstrap/unix-88/Platform.h | 28 +++++----- bootstrap/unix-88/Reals.c | 22 ++++---- bootstrap/unix-88/Reals.h | 10 ++-- bootstrap/unix-88/Strings.c | 42 +++++++-------- bootstrap/unix-88/Strings.h | 20 +++---- bootstrap/unix-88/Texts.c | 18 +++---- bootstrap/unix-88/Texts.h | 8 +-- bootstrap/unix-88/VT100.c | 30 +++++------ bootstrap/unix-88/VT100.h | 6 +-- bootstrap/unix-88/extTools.c | 18 +++---- bootstrap/unix-88/extTools.h | 6 +-- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 80 ++++++++++++++-------------- bootstrap/windows-48/Files.h | 28 +++++----- bootstrap/windows-48/Heap.c | 18 +++---- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 22 ++++---- bootstrap/windows-48/Modules.h | 8 +-- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 38 ++++++------- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 46 ++++++++-------- bootstrap/windows-48/OPM.h | 18 +++---- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 14 ++--- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 18 +++---- bootstrap/windows-48/Out.h | 4 +- bootstrap/windows-48/Platform.c | 54 +++++++++---------- bootstrap/windows-48/Platform.h | 28 +++++----- bootstrap/windows-48/Reals.c | 22 ++++---- bootstrap/windows-48/Reals.h | 10 ++-- bootstrap/windows-48/Strings.c | 42 +++++++-------- bootstrap/windows-48/Strings.h | 20 +++---- bootstrap/windows-48/Texts.c | 18 +++---- bootstrap/windows-48/Texts.h | 8 +-- bootstrap/windows-48/VT100.c | 30 +++++------ bootstrap/windows-48/VT100.h | 6 +-- bootstrap/windows-48/extTools.c | 18 +++---- bootstrap/windows-48/extTools.h | 6 +-- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 80 ++++++++++++++-------------- bootstrap/windows-88/Files.h | 28 +++++----- bootstrap/windows-88/Heap.c | 18 +++---- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 22 ++++---- bootstrap/windows-88/Modules.h | 8 +-- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 38 ++++++------- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 46 ++++++++-------- bootstrap/windows-88/OPM.h | 18 +++---- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 14 ++--- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 18 +++---- bootstrap/windows-88/Out.h | 4 +- bootstrap/windows-88/Platform.c | 54 +++++++++---------- bootstrap/windows-88/Platform.h | 28 +++++----- bootstrap/windows-88/Reals.c | 22 ++++---- bootstrap/windows-88/Reals.h | 10 ++-- bootstrap/windows-88/Strings.c | 42 +++++++-------- bootstrap/windows-88/Strings.h | 20 +++---- bootstrap/windows-88/Texts.c | 18 +++---- bootstrap/windows-88/Texts.h | 8 +-- bootstrap/windows-88/VT100.c | 30 +++++------ bootstrap/windows-88/VT100.h | 6 +-- bootstrap/windows-88/extTools.c | 18 +++---- bootstrap/windows-88/extTools.h | 6 +-- 185 files changed, 1465 insertions(+), 1465 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index dc4bb660..e900905f 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 2d0061df..071d7b8e 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index b28e0caa..b1942442 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 548774b0..0a3293ab 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -52,7 +52,7 @@ static Files_File Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { - LONGINT len[1]; + ADDRESS len[1]; CHAR data[1]; } *Files_SearchPath; @@ -62,56 +62,56 @@ export ADDRESS *Files_Rider__typ; export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); -export void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); -export void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode); +export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len); +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); static void Files_Flush (Files_Buffer buf); export void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -export void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len); -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len); +export void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len); +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len); export INT32 Files_Length (Files_File f); -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len); -export Files_File Files_New (CHAR *name, LONGINT name__len); -export Files_File Files_Old (CHAR *name, LONGINT name__len); +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len); +export Files_File Files_New (CHAR *name, ADDRESS name__len); +export Files_File Files_Old (CHAR *name, ADDRESS name__len); export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +export void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +export void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); export void Files_Register (Files_File f); -export void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len); +export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -export void Files_SetSearchPath (CHAR *path, LONGINT path__len); +export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); export void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); export void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); export void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); export void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); Out_Ln(); @@ -138,7 +138,7 @@ static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) __DEL(s); } -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len) +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { INT16 i, j; __DUP(dir, dir__len, CHAR); @@ -163,7 +163,7 @@ static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT __DEL(name); } -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len) +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { INT32 n, i, j; __DUP(finalName, finalName__len, CHAR); @@ -316,7 +316,7 @@ INT32 Files_Length (Files_File f) return f->len; } -Files_File Files_New (CHAR *name, LONGINT name__len) +Files_File Files_New (CHAR *name, ADDRESS name__len) { Files_File f = NIL; __DUP(name, name__len, CHAR); @@ -332,7 +332,7 @@ Files_File Files_New (CHAR *name, LONGINT name__len) return f; } -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) { INT16 i; CHAR ch; @@ -375,7 +375,7 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) dir[i] = 0x00; } -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len) +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -415,7 +415,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) return NIL; } -Files_File Files_Old (CHAR *name, LONGINT name__len) +Files_File Files_Old (CHAR *name, ADDRESS name__len) { Files_File f = NIL; INT32 fd; @@ -618,7 +618,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } -void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -683,7 +683,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) (*r).res = 0; } -void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -722,14 +722,14 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT (*r).res = 0; } -void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res) +void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } -void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res) +void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { INT32 fdold, fdnew, n; INT16 error, ignore; @@ -812,14 +812,14 @@ void Files_Register (Files_File f) } } -void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res) +void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res) { __DUP(path, path__len, CHAR); *res = Platform_Chdir((void*)path, path__len); __DEL(path); } -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len) +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len) { INT32 i, j; if (!Platform_LittleEndian) { @@ -877,7 +877,7 @@ void Files_ReadLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL *x) Files_FlipBytes((void*)b, 8, (void*)&*x, 8); } -void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; CHAR ch; @@ -889,7 +889,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) } while (!(ch == 0x00)); } -void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -906,7 +906,7 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) x[i] = 0x00; } -void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len) +void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) { INT8 s, b; INT64 q; @@ -972,7 +972,7 @@ void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); } -void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -991,7 +991,7 @@ void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); } -void Files_GetName (Files_File f, CHAR *name, LONGINT name__len) +void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) { __COPY(f->workName, name, name__len); } @@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o) } } -void Files_SetSearchPath (CHAR *path, LONGINT path__len) +void Files_SetSearchPath (CHAR *path, ADDRESS path__len) { __DUP(path, path__len, CHAR); if (Strings_Length(path, path__len) != 0) { diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 79164af5..1012ec46 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -28,41 +28,41 @@ import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); -import void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); -import void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); +import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -import void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); +import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); -import Files_File Files_New (CHAR *name, LONGINT name__len); -import Files_File Files_Old (CHAR *name, LONGINT name__len); +import Files_File Files_New (CHAR *name, ADDRESS name__len); +import Files_File Files_Old (CHAR *name, ADDRESS name__len); import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +import void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +import void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void Files_Register (Files_File f); -import void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); +import void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); import void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -import void Files_SetSearchPath (CHAR *path, LONGINT path__len); +import void Files_SetSearchPath (CHAR *path, ADDRESS path__len); import void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); import void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); import void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); import void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); import void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); import void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); import void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void *Files__init(void); diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 72677604..ba769b74 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -85,14 +85,14 @@ static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len); +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT32 q); -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT32 size); export SYSTEM_PTR Heap_NEWREC (INT32 tag); static INT32 Heap_NewChunk (INT32 blksz); @@ -101,7 +101,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT32 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len); +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -445,7 +445,7 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { INT32 i, j, x; j = l; @@ -464,7 +464,7 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) a[i] = x; } -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { INT32 l, r, x; l = __ASHR(n, 1); @@ -482,7 +482,7 @@ static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) } } -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; chnk = Heap_heap; @@ -571,7 +571,7 @@ void Heap_FINALL (void) } } -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; INT32 inc, nofcand, sp, p, stack0; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 0aa0a18b..d200254d 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index a5e72ba3..27e4473c 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -47,21 +47,21 @@ export Modules_ModuleName Modules_imported, Modules_importing; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len); +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); -export void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_Halt (INT32 code); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -export Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); -static void Modules_errstring (CHAR *s, LONGINT s__len); +static void Modules_errstring (CHAR *s, ADDRESS s__len); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; __DUP(b, b__len, CHAR); @@ -79,7 +79,7 @@ static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) __DEL(b); } -Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) +Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { Modules_Module m = NIL; CHAR bodyname[64]; @@ -103,7 +103,7 @@ Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len) +Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) { Modules_Cmd c = NIL; __DUP(name, name__len, CHAR); @@ -130,7 +130,7 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT nam __RETCHK; } -void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all) +void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { Modules_Module m = NIL, p = NIL; __DUP(name, name__len, CHAR); @@ -168,7 +168,7 @@ static void Modules_errch (CHAR c) e = Platform_Write(1, (ADDRESS)&c, 1); } -static void Modules_errstring (CHAR *s, LONGINT s__len) +static void Modules_errstring (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 8bb89fe5..b1f2385e 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -44,10 +44,10 @@ import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; import void Modules_AssertFail (INT32 code); -import void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); import void Modules_Halt (INT32 code); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -import Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 3ef8e2f9..bc44b83a 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 0be714e8..eb93787e 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index ef4b429f..72e0feef 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,7 +56,7 @@ static void OPC_GenHeaderMsg (void); export void OPC_Halt (INT32 n); export void OPC_Ident (OPT_Object obj); static void OPC_IdentList (OPT_Object obj, INT16 vis); -static void OPC_Include (CHAR *name, LONGINT name__len); +static void OPC_Include (CHAR *name, ADDRESS name__len); static void OPC_IncludeImports (OPT_Object obj, INT16 vis); export void OPC_Increment (BOOLEAN decrement); export void OPC_Indent (INT16 count); @@ -68,11 +68,11 @@ static void OPC_InitTProcs (OPT_Object typ, OPT_Object obj); export void OPC_IntLiteral (INT64 n, INT32 size); export void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim); static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamName); -static INT16 OPC_Length (CHAR *s, LONGINT s__len); +static INT16 OPC_Length (CHAR *s, ADDRESS s__len); export BOOLEAN OPC_NeedsRetval (OPT_Object proc); export INT32 OPC_NofPtrs (OPT_Struct typ); -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len); -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len); +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len); +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len); static void OPC_ProcHeader (OPT_Object proc, BOOLEAN define); static void OPC_ProcPredefs (OPT_Object obj, INT8 vis); static void OPC_PutBase (OPT_Struct typ); @@ -80,8 +80,8 @@ static void OPC_PutPtrOffsets (OPT_Struct typ, INT32 adr, INT32 *cnt); static void OPC_RegCmds (OPT_Object obj); export void OPC_SetInclude (BOOLEAN exclude); static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause); -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x); -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l); +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x); +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l); export void OPC_TDescDecl (OPT_Struct typ); export void OPC_TypeDefs (OPT_Object obj, INT16 vis); export void OPC_TypeOf (OPT_Object ap); @@ -137,7 +137,7 @@ void OPC_EndBlk0 (void) OPM_Write('}'); } -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x) { CHAR ch; INT16 i; @@ -156,7 +156,7 @@ static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) __DEL(s); } -static INT16 OPC_Length (CHAR *s, LONGINT s__len) +static INT16 OPC_Length (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -166,7 +166,7 @@ static INT16 OPC_Length (CHAR *s, LONGINT s__len) return i; } -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len) +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len) { INT16 i, h; i = 0; @@ -364,7 +364,7 @@ static void OPC_DeclareBase (OPT_Object dcl) OPM_WriteString((CHAR*)"struct ", 8); OPC_BegBlk(); OPC_BegStat(); - OPC_Str1((CHAR*)"LONGINT len[#]", 15, nofdims); + OPC_Str1((CHAR*)"ADDRESS len[#]", 15, nofdims); OPC_EndStat(); OPC_BegStat(); __NEW(obj, OPT_ObjDesc); @@ -511,7 +511,7 @@ static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamNa typ = par->typ->BaseTyp; while (typ->comp == 3) { if (ansiDefine) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); } else { OPM_WriteString((CHAR*)", ", 3); } @@ -720,7 +720,7 @@ static void OPC_DefineType (OPT_Struct str) } } -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len) +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) { INT16 i; __DUP(y, y__len, CHAR); @@ -969,7 +969,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) OPC_EndStat(); OPC_BegStat(); base = OPT_linttyp; - OPM_WriteString((CHAR*)"LONGINT ", 9); + OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPC_EndStat(); @@ -1008,7 +1008,7 @@ static void OPC_AnsiParamList (OPT_Object obj, BOOLEAN showParamNames) __COPY(name, obj->name, 256); } if (obj->typ->comp == 3) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); OPC_LenList(obj, 1, showParamNames); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPM_WriteString((CHAR*)", ADDRESS *", 12); @@ -1062,7 +1062,7 @@ static void OPC_ProcPredefs (OPT_Object obj, INT8 vis) } } -static void OPC_Include (CHAR *name, LONGINT name__len) +static void OPC_Include (CHAR *name, ADDRESS name__len) { __DUP(name, name__len, CHAR); OPM_WriteString((CHAR*)"#include ", 10); @@ -1744,7 +1744,7 @@ static void OPC_CharacterLiteral (INT64 c) } } -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l) +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) { INT32 i; INT16 c; @@ -1912,9 +1912,9 @@ static struct InitKeywords__46 { struct InitKeywords__46 *lnk; } *InitKeywords__46_s; -static void Enter__47 (CHAR *s, LONGINT s__len); +static void Enter__47 (CHAR *s, ADDRESS s__len); -static void Enter__47 (CHAR *s, LONGINT s__len) +static void Enter__47 (CHAR *s, ADDRESS s__len) { INT16 h; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 842e7dec..5624314d 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index e76d763e..632b78e5 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,26 +53,26 @@ export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len); +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static void OPM_LogErrMsg (INT16 n); -export void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); export void OPM_LogWLn (void); export void OPM_LogWNum (INT64 i, INT64 len); -export void OPM_LogWStr (CHAR *s, LONGINT s__len); +export void OPM_LogWStr (CHAR *s, ADDRESS s__len); export INT32 OPM_Longint (INT64 n); -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len); +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len); export void OPM_Mark (INT16 n, INT32 pos); -export void OPM_NewSym (CHAR *modName, LONGINT modName__len); -export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +export void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +export void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +export void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); export BOOLEAN OPM_OpenPar (void); export void OPM_RegisterNewSym (void); -static void OPM_ScanOptions (CHAR *s, LONGINT s__len); +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); @@ -93,8 +93,8 @@ export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); export void OPM_WriteLn (void); export void OPM_WriteReal (LONGREAL r, CHAR suffx); -export void OPM_WriteString (CHAR *s, LONGINT s__len); -export void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +export void OPM_WriteString (CHAR *s, ADDRESS s__len); +export void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); export BOOLEAN OPM_eofSF (void); export void OPM_err (INT16 n); @@ -105,7 +105,7 @@ void OPM_LogW (CHAR ch) Out_Char(ch); } -void OPM_LogWStr (CHAR *s, LONGINT s__len) +void OPM_LogWStr (CHAR *s, ADDRESS s__len) { __DUP(s, s__len, CHAR); Out_String(s, s__len); @@ -122,7 +122,7 @@ void OPM_LogWLn (void) Out_Ln(); } -void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len) +void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) { __DUP(vt100code, vt100code__len, CHAR); if ((Out_IsConsole && !__IN(16, OPM_Options, 32))) { @@ -154,7 +154,7 @@ INT16 OPM_Integer (INT64 n) return __VAL(INT16, n); } -static void OPM_ScanOptions (CHAR *s, LONGINT s__len) +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -465,7 +465,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len) +void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) { Texts_Text T = NIL; INT32 beg, end, time; @@ -514,7 +514,7 @@ void OPM_Get (CHAR *ch) } } -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len) +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len) { INT16 i, j; CHAR ch; @@ -700,7 +700,7 @@ void OPM_err (INT16 n) OPM_Mark(n, OPM_errpos); } -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len) +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len) { INT16 i; INT32 l; @@ -772,7 +772,7 @@ void OPM_CloseOldSym (void) Files_Close(Files_Base(&OPM_oldSF, Files_Rider__typ)); } -void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done) +void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; @@ -832,7 +832,7 @@ void OPM_DeleteNewSym (void) { } -void OPM_NewSym (CHAR *modName, LONGINT modName__len) +void OPM_NewSym (CHAR *modName, ADDRESS modName__len) { OPM_FileName fileName; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); @@ -851,7 +851,7 @@ void OPM_Write (CHAR ch) Files_Write(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, ch); } -void OPM_WriteString (CHAR *s, LONGINT s__len) +void OPM_WriteString (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -861,7 +861,7 @@ void OPM_WriteString (CHAR *s, LONGINT s__len) Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); } -void OPM_WriteStringVar (CHAR *s, LONGINT s__len) +void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -986,7 +986,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) } } -void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len) +void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { CHAR FName[32]; __COPY(moduleName, OPM_modName, 32); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 2d272feb..c310c421 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -28,19 +28,19 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); -import void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); import void OPM_LogWNum (INT64 i, INT64 len); -import void OPM_LogWStr (CHAR *s, LONGINT s__len); +import void OPM_LogWStr (CHAR *s, ADDRESS s__len); import INT32 OPM_Longint (INT64 n); import void OPM_Mark (INT16 n, INT32 pos); -import void OPM_NewSym (CHAR *modName, LONGINT modName__len); -import void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -import void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +import void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +import void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +import void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); @@ -61,8 +61,8 @@ import void OPM_WriteHex (INT64 i); import void OPM_WriteInt (INT64 i); import void OPM_WriteLn (void); import void OPM_WriteReal (LONGREAL r, CHAR suffx); -import void OPM_WriteString (CHAR *s, LONGINT s__len); -import void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +import void OPM_WriteString (CHAR *s, ADDRESS s__len); +import void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); import BOOLEAN OPM_eofSF (void); import void OPM_err (INT16 n); import void *OPM__init(void); diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 3f360d00..02fd6337 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 5a71eb39..acb2df91 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 6ee700e5..7aedbbd6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 1f7a3e58..e49c222b 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index fb007184..58f06737 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -120,7 +120,7 @@ static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_FPrintErr (OPT_Object obj, INT16 errcode); -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len); +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len); export void OPT_FPrintObj (OPT_Object obj); static void OPT_FPrintSign (INT32 *fp, OPT_Struct result, OPT_Object par); export void OPT_FPrintStr (OPT_Struct typ); @@ -132,7 +132,7 @@ export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); static void OPT_InMod (INT8 *mno); -static void OPT_InName (CHAR *name, LONGINT name__len); +static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par); static void OPT_InStruct (OPT_Struct *typ); @@ -155,7 +155,7 @@ static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); static void OPT_OutMod (INT16 mno); -static void OPT_OutName (CHAR *name, LONGINT name__len); +static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); @@ -576,7 +576,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) *obj = ob1; } -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len) +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -957,7 +957,7 @@ void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old) } } -static void OPT_InName (CHAR *name, LONGINT name__len) +static void OPT_InName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -1483,7 +1483,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) } } -static void OPT_OutName (CHAR *name, LONGINT name__len) +static void OPT_OutName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 90fcacf5..9d34cea9 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 5c21cb97..f6d42592 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index c4a61586..0f1980ac 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 39f383cf..82ad945b 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,16 +17,16 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Int (INT64 x, INT64 n); -static INT32 Out_Length (CHAR *s, LONGINT s__len); +static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); export void Out_LongReal (LONGREAL x, INT16 n); export void Out_Open (void); export void Out_Real (REAL x, INT16 n); static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_); -export void Out_String (CHAR *str, LONGINT str__len); +export void Out_String (CHAR *str, ADDRESS str__len); export LONGREAL Out_Ten (INT16 e); -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i); -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i); +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) @@ -55,7 +55,7 @@ void Out_Char (CHAR ch) } } -static INT32 Out_Length (CHAR *s, LONGINT s__len) +static INT32 Out_Length (CHAR *s, ADDRESS s__len) { INT32 l; l = 0; @@ -65,7 +65,7 @@ static INT32 Out_Length (CHAR *s, LONGINT s__len) return l; } -void Out_String (CHAR *str, LONGINT str__len) +void Out_String (CHAR *str, ADDRESS str__len) { INT32 l; INT16 error; @@ -125,13 +125,13 @@ void Out_Ln (void) Out_Flush(); } -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); } -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) { INT16 j; INT32 l; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0e66420d..d58a17d5 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -16,7 +16,7 @@ import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); import void Out_Open (void); import void Out_Real (REAL x, INT16 n); -import void Out_String (CHAR *str, LONGINT str__len); +import void Out_String (CHAR *str, ADDRESS str__len); import LONGREAL Out_Ten (INT16 e); import void *Out__init(void); diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 72c15bf8..459d5079 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -45,35 +45,35 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -export INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); -export void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -export INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -export INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); export void Platform_OSFree (INT32 address); -export INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -export INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +export INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); export INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -export INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +export INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); export INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -83,16 +83,16 @@ export void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t export void Platform_SetQuitHandler (Platform_SignalHandler handler); export INT16 Platform_Size (INT32 h, INT32 *l); export INT16 Platform_Sync (INT32 h); -export INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +export INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); static void Platform_TestLittleEndian (void); export INT32 Platform_Time (void); export BOOLEAN Platform_TimedOut (INT16 e); export BOOLEAN Platform_TooManyFiles (INT16 e); export INT16 Platform_Truncate (INT32 h, INT32 l); -export INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +export INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); export INT16 Platform_Write (INT32 h, INT32 p, INT32 l); static void Platform_YMDHMStoClock (INT32 ye, INT32 mo, INT32 da, INT32 ho, INT32 mi, INT32 se, INT32 *t, INT32 *d); -export BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); #include #include @@ -223,7 +223,7 @@ void Platform_Init (INT32 argc, INT32 argvadr) Platform_HeapInitHeap(); } -BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { Platform_EnvPtr p = NIL; __DUP(var, var__len, CHAR); @@ -235,7 +235,7 @@ BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__le return p != NIL; } -void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { __DUP(var, var__len, CHAR); if (!Platform_getEnv(var, var__len, (void*)val, val__len)) { @@ -244,7 +244,7 @@ void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len) +void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { Platform_ArgVec av = NIL; if (n < Platform_ArgCount) { @@ -279,7 +279,7 @@ void Platform_GetIntArg (INT16 n, INT32 *val) } } -INT16 Platform_ArgPos (CHAR *s, LONGINT s__len) +INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) { INT16 i; CHAR arg[256]; @@ -345,7 +345,7 @@ void Platform_Delay (INT32 ms) Platform_nanosleep(s, ns); } -INT16 Platform_System (CHAR *cmd, LONGINT cmd__len) +INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len) { __DUP(cmd, cmd__len, CHAR); __DEL(cmd); @@ -357,7 +357,7 @@ INT16 Platform_Error (void) return Platform_err(); } -INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openro(n, n__len); @@ -370,7 +370,7 @@ INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openrw(n, n__len); @@ -383,7 +383,7 @@ INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_opennew(n, n__len); @@ -423,7 +423,7 @@ INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *iden return 0; } -INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) +INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) { __DUP(n, n__len, CHAR); Platform_structstats(); @@ -481,7 +481,7 @@ INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n) __RETCHK; } -INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n) +INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n) { *n = Platform_readfile(h, (ADDRESS)b, b__len); if (*n < 0) { @@ -535,7 +535,7 @@ INT16 Platform_Truncate (INT32 h, INT32 l) __RETCHK; } -INT16 Platform_Unlink (CHAR *n, LONGINT n__len) +INT16 Platform_Unlink (CHAR *n, ADDRESS n__len) { if (Platform_unlink(n, n__len) < 0) { return Platform_err(); @@ -545,7 +545,7 @@ INT16 Platform_Unlink (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Chdir (CHAR *n, LONGINT n__len) +INT16 Platform_Chdir (CHAR *n, ADDRESS n__len) { INT16 r; if ((Platform_chdir(n, n__len) >= 0 && Platform_getcwd((void*)Platform_CWD, 256) != NIL)) { @@ -556,7 +556,7 @@ INT16 Platform_Chdir (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len) +INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len) { if (Platform_rename(o, o__len, n, n__len) < 0) { return Platform_err(); diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index b04f552d..34547692 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -27,35 +27,35 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -import INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); -import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -import INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -import INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); import void Platform_OSFree (INT32 address); -import INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -import INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +import INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); import INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -import INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +import INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); import INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -65,14 +65,14 @@ import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t import void Platform_SetQuitHandler (Platform_SignalHandler handler); import INT16 Platform_Size (INT32 h, INT32 *l); import INT16 Platform_Sync (INT32 h); -import INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +import INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); import INT32 Platform_Time (void); import BOOLEAN Platform_TimedOut (INT16 e); import BOOLEAN Platform_TooManyFiles (INT16 e); import INT16 Platform_Truncate (INT32 h, INT32 l); -import INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +import INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); import INT16 Platform_Write (INT32 h, INT32 p, INT32 l); -import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void *Platform__init(void); diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index cd4c3c61..be3ad909 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,11 +10,11 @@ -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); -export void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len); +export void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +export void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); export INT16 Reals_Expo (REAL x); export INT16 Reals_ExpoL (LONGREAL x); export void Reals_SetExpo (REAL *x, INT16 ex); @@ -79,7 +79,7 @@ INT16 Reals_ExpoL (LONGREAL x) return __MASK(__ASHR(i, 4), -2048); } -void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) { INT32 i, j, k; if (x < (LONGREAL)0) { @@ -107,7 +107,7 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) } } -void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) { Reals_ConvertL(x, n, (void*)d, d__len); } @@ -122,7 +122,7 @@ static CHAR Reals_ToHex (INT16 i) __RETCHK; } -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len) { INT16 i; INT32 l; @@ -137,12 +137,12 @@ static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LO } } -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&y, 4, (void*)d, d__len * 1); } -void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&x, 8, (void*)d, d__len * 1); } diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index f0c84ab1..e8d15a2f 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h @@ -8,10 +8,10 @@ -import void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +import void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +import void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); import INT16 Reals_Expo (REAL x); import INT16 Reals_ExpoL (LONGREAL x); import void Reals_SetExpo (REAL *x, INT16 ex); diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index b5707327..fd550df3 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,18 +10,18 @@ -export void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -export void Strings_Cap (CHAR *s, LONGINT s__len); -export void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -export void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -export void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -export INT16 Strings_Length (CHAR *s, LONGINT s__len); -export BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -export INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -export void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +export void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +export void Strings_Cap (CHAR *s, ADDRESS s__len); +export void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +export void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +export void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export INT16 Strings_Length (CHAR *s, ADDRESS s__len); +export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); -INT16 Strings_Length (CHAR *s, LONGINT s__len) +INT16 Strings_Length (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); @@ -39,7 +39,7 @@ INT16 Strings_Length (CHAR *s, LONGINT s__len) __RETCHK; } -void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len) +void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(extra, extra__len, CHAR); @@ -56,7 +56,7 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__ __DEL(extra); } -void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(source, source__len, CHAR); @@ -87,7 +87,7 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, L __DEL(source); } -void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) +void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n) { INT16 len, i; len = Strings_Length(s, s__len); @@ -110,7 +110,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) } } -void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { __DUP(source, source__len, CHAR); Strings_Delete((void*)dest, dest__len, pos, pos + Strings_Length(source, source__len)); @@ -118,7 +118,7 @@ void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, __DEL(source); } -void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len) +void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len) { INT16 len, destLen, i; __DUP(source, source__len, CHAR); @@ -143,7 +143,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHA __DEL(source); } -INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos) +INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos) { INT16 n1, n2, i, j; __DUP(pattern, pattern__len, CHAR); @@ -175,7 +175,7 @@ INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, return -1; } -void Strings_Cap (CHAR *s, LONGINT s__len) +void Strings_Cap (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -191,9 +191,9 @@ static struct Match__7 { struct Match__7 *lnk; } *Match__7_s; -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m); +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m); -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m) +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m) { while ((((n >= 0 && m >= 0)) && mask[__X(m, mask__len)] != '*')) { if (name[__X(n, name__len)] != mask[__X(m, mask__len)]) { @@ -220,7 +220,7 @@ static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__le return 0; } -BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len) +BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len) { struct Match__7 _s; BOOLEAN __retval; diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index c987af8d..76cb022d 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -8,15 +8,15 @@ -import void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -import void Strings_Cap (CHAR *s, LONGINT s__len); -import void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -import void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -import void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -import INT16 Strings_Length (CHAR *s, LONGINT s__len); -import BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -import INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -import void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +import void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +import void Strings_Cap (CHAR *s, ADDRESS s__len); +import void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +import void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +import void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import INT16 Strings_Length (CHAR *s, ADDRESS s__len); +import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); import void *Strings__init(void); diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 0ac5c5f2..f304b8bf 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -187,20 +187,20 @@ export void Texts_Append (Texts_Text T, Texts_Buffer B); export void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); static Texts_Elem Texts_CloneElem (Texts_Elem e); static Texts_Piece Texts_ClonePiece (Texts_Piece p); -export void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len); +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len); static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__typ); export void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); export void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Merge (Texts_Text T, Texts_Run u, Texts_Run *v); -export void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_OpenBuf (Texts_Buffer B); export void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); export void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -229,10 +229,10 @@ export void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x export void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); export void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len) +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; __NEW(F, Texts_FontDesc); @@ -1027,7 +1027,7 @@ void Texts_WriteLn (Texts_Writer *W, ADDRESS *W__typ) Texts_Write(&*W, W__typ, 0x0d); } -void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len) +void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -1539,7 +1539,7 @@ void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Texts_Load0(&*r, r__typ, T); } -void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; @@ -1755,7 +1755,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Store__39_s = _s.lnk; } -void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 0d5201cb..ecdf9223 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -130,7 +130,7 @@ import ADDRESS *Texts_Writer__typ; import void Texts_Append (Texts_Text T, Texts_Buffer B); import void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); -import void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); @@ -138,7 +138,7 @@ import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); import void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); -import void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_OpenBuf (Texts_Buffer B); import void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); import void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -165,7 +165,7 @@ import void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x import void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); import void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); import void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); import void *Texts__init(void); diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index f69fd90e..38c0743f 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,23 +27,23 @@ export void VT100_DECTCEMl (void); export void VT100_DSR (INT16 n); export void VT100_ED (INT16 n); export void VT100_EL (INT16 n); -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len); +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); -export void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end); +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); export void VT100_SGR (INT16 n); export void VT100_SGR2 (INT16 n, INT16 m); export void VT100_SU (INT16 n); -export void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +export void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end) { CHAR h; while (start < end) { @@ -55,7 +55,7 @@ static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) } } -void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) +void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) { CHAR b[21]; INT16 s, e; @@ -84,7 +84,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) __COPY(b, str, str__len); } -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len) { CHAR cmd[9]; __DUP(letter, letter__len, CHAR); @@ -94,7 +94,7 @@ static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -107,7 +107,7 @@ static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -120,7 +120,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) { CHAR nstr[5], mstr[5]; CHAR cmd[12]; @@ -236,7 +236,7 @@ void VT100_DECTCEMh (void) VT100_EscSeq0((CHAR*)"\?25h", 5); } -void VT100_SetAttr (CHAR *attr, LONGINT attr__len) +void VT100_SetAttr (CHAR *attr, ADDRESS attr__len) { CHAR tmpstr[16]; __DUP(attr, attr__len, CHAR); diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index d99406ec..4bbb3110 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h @@ -23,14 +23,14 @@ import void VT100_DSR (INT16 n); import void VT100_ED (INT16 n); import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); -import void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); import void VT100_SGR2 (INT16 n, INT16 m); import void VT100_SU (INT16 n); -import void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +import void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); import void *VT100__init(void); diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 37630d23..66f80319 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,13 +17,13 @@ static CHAR extTools_CFLAGS[1023]; -export void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len); -export void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len); +export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len) +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; __DUP(title, title__len, CHAR); @@ -63,7 +63,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); @@ -74,7 +74,7 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } -void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) +void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { CHAR cmd[1023]; __DUP(moduleName, moduleName__len, CHAR); @@ -86,7 +86,7 @@ void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) __DEL(moduleName); } -void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len) +void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { CHAR cmd[1023]; __DUP(additionalopts, additionalopts__len, CHAR); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 63e5df15..472c60f3 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h @@ -8,8 +8,8 @@ -import void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); +import void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +import void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); import void *extTools__init(void); diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index dc4bb660..e900905f 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 2d0061df..071d7b8e 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index b28e0caa..b1942442 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 548774b0..0a3293ab 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -52,7 +52,7 @@ static Files_File Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { - LONGINT len[1]; + ADDRESS len[1]; CHAR data[1]; } *Files_SearchPath; @@ -62,56 +62,56 @@ export ADDRESS *Files_Rider__typ; export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); -export void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); -export void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode); +export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len); +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); static void Files_Flush (Files_Buffer buf); export void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -export void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len); -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len); +export void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len); +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len); export INT32 Files_Length (Files_File f); -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len); -export Files_File Files_New (CHAR *name, LONGINT name__len); -export Files_File Files_Old (CHAR *name, LONGINT name__len); +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len); +export Files_File Files_New (CHAR *name, ADDRESS name__len); +export Files_File Files_Old (CHAR *name, ADDRESS name__len); export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +export void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +export void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); export void Files_Register (Files_File f); -export void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len); +export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -export void Files_SetSearchPath (CHAR *path, LONGINT path__len); +export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); export void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); export void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); export void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); export void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); Out_Ln(); @@ -138,7 +138,7 @@ static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) __DEL(s); } -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len) +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { INT16 i, j; __DUP(dir, dir__len, CHAR); @@ -163,7 +163,7 @@ static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT __DEL(name); } -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len) +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { INT32 n, i, j; __DUP(finalName, finalName__len, CHAR); @@ -316,7 +316,7 @@ INT32 Files_Length (Files_File f) return f->len; } -Files_File Files_New (CHAR *name, LONGINT name__len) +Files_File Files_New (CHAR *name, ADDRESS name__len) { Files_File f = NIL; __DUP(name, name__len, CHAR); @@ -332,7 +332,7 @@ Files_File Files_New (CHAR *name, LONGINT name__len) return f; } -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) { INT16 i; CHAR ch; @@ -375,7 +375,7 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) dir[i] = 0x00; } -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len) +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -415,7 +415,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) return NIL; } -Files_File Files_Old (CHAR *name, LONGINT name__len) +Files_File Files_Old (CHAR *name, ADDRESS name__len) { Files_File f = NIL; INT32 fd; @@ -618,7 +618,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } -void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -683,7 +683,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) (*r).res = 0; } -void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -722,14 +722,14 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT (*r).res = 0; } -void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res) +void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } -void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res) +void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { INT32 fdold, fdnew, n; INT16 error, ignore; @@ -812,14 +812,14 @@ void Files_Register (Files_File f) } } -void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res) +void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res) { __DUP(path, path__len, CHAR); *res = Platform_Chdir((void*)path, path__len); __DEL(path); } -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len) +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len) { INT32 i, j; if (!Platform_LittleEndian) { @@ -877,7 +877,7 @@ void Files_ReadLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL *x) Files_FlipBytes((void*)b, 8, (void*)&*x, 8); } -void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; CHAR ch; @@ -889,7 +889,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) } while (!(ch == 0x00)); } -void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -906,7 +906,7 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) x[i] = 0x00; } -void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len) +void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) { INT8 s, b; INT64 q; @@ -972,7 +972,7 @@ void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); } -void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -991,7 +991,7 @@ void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); } -void Files_GetName (Files_File f, CHAR *name, LONGINT name__len) +void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) { __COPY(f->workName, name, name__len); } @@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o) } } -void Files_SetSearchPath (CHAR *path, LONGINT path__len) +void Files_SetSearchPath (CHAR *path, ADDRESS path__len) { __DUP(path, path__len, CHAR); if (Strings_Length(path, path__len) != 0) { diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 79164af5..1012ec46 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -28,41 +28,41 @@ import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); -import void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); -import void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); +import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -import void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); +import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); -import Files_File Files_New (CHAR *name, LONGINT name__len); -import Files_File Files_Old (CHAR *name, LONGINT name__len); +import Files_File Files_New (CHAR *name, ADDRESS name__len); +import Files_File Files_Old (CHAR *name, ADDRESS name__len); import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +import void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +import void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void Files_Register (Files_File f); -import void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); +import void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); import void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -import void Files_SetSearchPath (CHAR *path, LONGINT path__len); +import void Files_SetSearchPath (CHAR *path, ADDRESS path__len); import void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); import void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); import void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); import void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); import void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); import void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); import void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void *Files__init(void); diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 72677604..ba769b74 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -85,14 +85,14 @@ static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len); +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT32 q); -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT32 size); export SYSTEM_PTR Heap_NEWREC (INT32 tag); static INT32 Heap_NewChunk (INT32 blksz); @@ -101,7 +101,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT32 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len); +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -445,7 +445,7 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { INT32 i, j, x; j = l; @@ -464,7 +464,7 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) a[i] = x; } -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { INT32 l, r, x; l = __ASHR(n, 1); @@ -482,7 +482,7 @@ static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) } } -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; chnk = Heap_heap; @@ -571,7 +571,7 @@ void Heap_FINALL (void) } } -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; INT32 inc, nofcand, sp, p, stack0; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 0aa0a18b..d200254d 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index a5e72ba3..27e4473c 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -47,21 +47,21 @@ export Modules_ModuleName Modules_imported, Modules_importing; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len); +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); -export void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_Halt (INT32 code); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -export Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); -static void Modules_errstring (CHAR *s, LONGINT s__len); +static void Modules_errstring (CHAR *s, ADDRESS s__len); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; __DUP(b, b__len, CHAR); @@ -79,7 +79,7 @@ static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) __DEL(b); } -Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) +Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { Modules_Module m = NIL; CHAR bodyname[64]; @@ -103,7 +103,7 @@ Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len) +Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) { Modules_Cmd c = NIL; __DUP(name, name__len, CHAR); @@ -130,7 +130,7 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT nam __RETCHK; } -void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all) +void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { Modules_Module m = NIL, p = NIL; __DUP(name, name__len, CHAR); @@ -168,7 +168,7 @@ static void Modules_errch (CHAR c) e = Platform_Write(1, (ADDRESS)&c, 1); } -static void Modules_errstring (CHAR *s, LONGINT s__len) +static void Modules_errstring (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 8bb89fe5..b1f2385e 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -44,10 +44,10 @@ import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; import void Modules_AssertFail (INT32 code); -import void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); import void Modules_Halt (INT32 code); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -import Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 3ef8e2f9..bc44b83a 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 0be714e8..eb93787e 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index ef4b429f..72e0feef 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,7 +56,7 @@ static void OPC_GenHeaderMsg (void); export void OPC_Halt (INT32 n); export void OPC_Ident (OPT_Object obj); static void OPC_IdentList (OPT_Object obj, INT16 vis); -static void OPC_Include (CHAR *name, LONGINT name__len); +static void OPC_Include (CHAR *name, ADDRESS name__len); static void OPC_IncludeImports (OPT_Object obj, INT16 vis); export void OPC_Increment (BOOLEAN decrement); export void OPC_Indent (INT16 count); @@ -68,11 +68,11 @@ static void OPC_InitTProcs (OPT_Object typ, OPT_Object obj); export void OPC_IntLiteral (INT64 n, INT32 size); export void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim); static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamName); -static INT16 OPC_Length (CHAR *s, LONGINT s__len); +static INT16 OPC_Length (CHAR *s, ADDRESS s__len); export BOOLEAN OPC_NeedsRetval (OPT_Object proc); export INT32 OPC_NofPtrs (OPT_Struct typ); -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len); -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len); +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len); +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len); static void OPC_ProcHeader (OPT_Object proc, BOOLEAN define); static void OPC_ProcPredefs (OPT_Object obj, INT8 vis); static void OPC_PutBase (OPT_Struct typ); @@ -80,8 +80,8 @@ static void OPC_PutPtrOffsets (OPT_Struct typ, INT32 adr, INT32 *cnt); static void OPC_RegCmds (OPT_Object obj); export void OPC_SetInclude (BOOLEAN exclude); static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause); -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x); -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l); +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x); +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l); export void OPC_TDescDecl (OPT_Struct typ); export void OPC_TypeDefs (OPT_Object obj, INT16 vis); export void OPC_TypeOf (OPT_Object ap); @@ -137,7 +137,7 @@ void OPC_EndBlk0 (void) OPM_Write('}'); } -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x) { CHAR ch; INT16 i; @@ -156,7 +156,7 @@ static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) __DEL(s); } -static INT16 OPC_Length (CHAR *s, LONGINT s__len) +static INT16 OPC_Length (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -166,7 +166,7 @@ static INT16 OPC_Length (CHAR *s, LONGINT s__len) return i; } -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len) +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len) { INT16 i, h; i = 0; @@ -364,7 +364,7 @@ static void OPC_DeclareBase (OPT_Object dcl) OPM_WriteString((CHAR*)"struct ", 8); OPC_BegBlk(); OPC_BegStat(); - OPC_Str1((CHAR*)"LONGINT len[#]", 15, nofdims); + OPC_Str1((CHAR*)"ADDRESS len[#]", 15, nofdims); OPC_EndStat(); OPC_BegStat(); __NEW(obj, OPT_ObjDesc); @@ -511,7 +511,7 @@ static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamNa typ = par->typ->BaseTyp; while (typ->comp == 3) { if (ansiDefine) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); } else { OPM_WriteString((CHAR*)", ", 3); } @@ -720,7 +720,7 @@ static void OPC_DefineType (OPT_Struct str) } } -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len) +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) { INT16 i; __DUP(y, y__len, CHAR); @@ -969,7 +969,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) OPC_EndStat(); OPC_BegStat(); base = OPT_linttyp; - OPM_WriteString((CHAR*)"LONGINT ", 9); + OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPC_EndStat(); @@ -1008,7 +1008,7 @@ static void OPC_AnsiParamList (OPT_Object obj, BOOLEAN showParamNames) __COPY(name, obj->name, 256); } if (obj->typ->comp == 3) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); OPC_LenList(obj, 1, showParamNames); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPM_WriteString((CHAR*)", ADDRESS *", 12); @@ -1062,7 +1062,7 @@ static void OPC_ProcPredefs (OPT_Object obj, INT8 vis) } } -static void OPC_Include (CHAR *name, LONGINT name__len) +static void OPC_Include (CHAR *name, ADDRESS name__len) { __DUP(name, name__len, CHAR); OPM_WriteString((CHAR*)"#include ", 10); @@ -1744,7 +1744,7 @@ static void OPC_CharacterLiteral (INT64 c) } } -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l) +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) { INT32 i; INT16 c; @@ -1912,9 +1912,9 @@ static struct InitKeywords__46 { struct InitKeywords__46 *lnk; } *InitKeywords__46_s; -static void Enter__47 (CHAR *s, LONGINT s__len); +static void Enter__47 (CHAR *s, ADDRESS s__len); -static void Enter__47 (CHAR *s, LONGINT s__len) +static void Enter__47 (CHAR *s, ADDRESS s__len) { INT16 h; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 842e7dec..5624314d 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index e76d763e..632b78e5 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,26 +53,26 @@ export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len); +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static void OPM_LogErrMsg (INT16 n); -export void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); export void OPM_LogWLn (void); export void OPM_LogWNum (INT64 i, INT64 len); -export void OPM_LogWStr (CHAR *s, LONGINT s__len); +export void OPM_LogWStr (CHAR *s, ADDRESS s__len); export INT32 OPM_Longint (INT64 n); -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len); +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len); export void OPM_Mark (INT16 n, INT32 pos); -export void OPM_NewSym (CHAR *modName, LONGINT modName__len); -export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +export void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +export void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +export void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); export BOOLEAN OPM_OpenPar (void); export void OPM_RegisterNewSym (void); -static void OPM_ScanOptions (CHAR *s, LONGINT s__len); +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); @@ -93,8 +93,8 @@ export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); export void OPM_WriteLn (void); export void OPM_WriteReal (LONGREAL r, CHAR suffx); -export void OPM_WriteString (CHAR *s, LONGINT s__len); -export void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +export void OPM_WriteString (CHAR *s, ADDRESS s__len); +export void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); export BOOLEAN OPM_eofSF (void); export void OPM_err (INT16 n); @@ -105,7 +105,7 @@ void OPM_LogW (CHAR ch) Out_Char(ch); } -void OPM_LogWStr (CHAR *s, LONGINT s__len) +void OPM_LogWStr (CHAR *s, ADDRESS s__len) { __DUP(s, s__len, CHAR); Out_String(s, s__len); @@ -122,7 +122,7 @@ void OPM_LogWLn (void) Out_Ln(); } -void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len) +void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) { __DUP(vt100code, vt100code__len, CHAR); if ((Out_IsConsole && !__IN(16, OPM_Options, 32))) { @@ -154,7 +154,7 @@ INT16 OPM_Integer (INT64 n) return __VAL(INT16, n); } -static void OPM_ScanOptions (CHAR *s, LONGINT s__len) +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -465,7 +465,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len) +void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) { Texts_Text T = NIL; INT32 beg, end, time; @@ -514,7 +514,7 @@ void OPM_Get (CHAR *ch) } } -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len) +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len) { INT16 i, j; CHAR ch; @@ -700,7 +700,7 @@ void OPM_err (INT16 n) OPM_Mark(n, OPM_errpos); } -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len) +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len) { INT16 i; INT32 l; @@ -772,7 +772,7 @@ void OPM_CloseOldSym (void) Files_Close(Files_Base(&OPM_oldSF, Files_Rider__typ)); } -void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done) +void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; @@ -832,7 +832,7 @@ void OPM_DeleteNewSym (void) { } -void OPM_NewSym (CHAR *modName, LONGINT modName__len) +void OPM_NewSym (CHAR *modName, ADDRESS modName__len) { OPM_FileName fileName; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); @@ -851,7 +851,7 @@ void OPM_Write (CHAR ch) Files_Write(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, ch); } -void OPM_WriteString (CHAR *s, LONGINT s__len) +void OPM_WriteString (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -861,7 +861,7 @@ void OPM_WriteString (CHAR *s, LONGINT s__len) Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); } -void OPM_WriteStringVar (CHAR *s, LONGINT s__len) +void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -986,7 +986,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) } } -void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len) +void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { CHAR FName[32]; __COPY(moduleName, OPM_modName, 32); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 2d272feb..c310c421 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -28,19 +28,19 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); -import void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); import void OPM_LogWNum (INT64 i, INT64 len); -import void OPM_LogWStr (CHAR *s, LONGINT s__len); +import void OPM_LogWStr (CHAR *s, ADDRESS s__len); import INT32 OPM_Longint (INT64 n); import void OPM_Mark (INT16 n, INT32 pos); -import void OPM_NewSym (CHAR *modName, LONGINT modName__len); -import void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -import void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +import void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +import void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +import void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); @@ -61,8 +61,8 @@ import void OPM_WriteHex (INT64 i); import void OPM_WriteInt (INT64 i); import void OPM_WriteLn (void); import void OPM_WriteReal (LONGREAL r, CHAR suffx); -import void OPM_WriteString (CHAR *s, LONGINT s__len); -import void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +import void OPM_WriteString (CHAR *s, ADDRESS s__len); +import void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); import BOOLEAN OPM_eofSF (void); import void OPM_err (INT16 n); import void *OPM__init(void); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 3f360d00..02fd6337 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 5a71eb39..acb2df91 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 6ee700e5..7aedbbd6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 1f7a3e58..e49c222b 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 75820a95..1eb85a06 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -120,7 +120,7 @@ static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_FPrintErr (OPT_Object obj, INT16 errcode); -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len); +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len); export void OPT_FPrintObj (OPT_Object obj); static void OPT_FPrintSign (INT32 *fp, OPT_Struct result, OPT_Object par); export void OPT_FPrintStr (OPT_Struct typ); @@ -132,7 +132,7 @@ export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); static void OPT_InMod (INT8 *mno); -static void OPT_InName (CHAR *name, LONGINT name__len); +static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par); static void OPT_InStruct (OPT_Struct *typ); @@ -155,7 +155,7 @@ static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); static void OPT_OutMod (INT16 mno); -static void OPT_OutName (CHAR *name, LONGINT name__len); +static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); @@ -576,7 +576,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) *obj = ob1; } -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len) +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -957,7 +957,7 @@ void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old) } } -static void OPT_InName (CHAR *name, LONGINT name__len) +static void OPT_InName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -1483,7 +1483,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) } } -static void OPT_OutName (CHAR *name, LONGINT name__len) +static void OPT_OutName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 90fcacf5..9d34cea9 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 5c21cb97..f6d42592 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index c4a61586..0f1980ac 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 39f383cf..82ad945b 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,16 +17,16 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Int (INT64 x, INT64 n); -static INT32 Out_Length (CHAR *s, LONGINT s__len); +static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); export void Out_LongReal (LONGREAL x, INT16 n); export void Out_Open (void); export void Out_Real (REAL x, INT16 n); static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_); -export void Out_String (CHAR *str, LONGINT str__len); +export void Out_String (CHAR *str, ADDRESS str__len); export LONGREAL Out_Ten (INT16 e); -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i); -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i); +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) @@ -55,7 +55,7 @@ void Out_Char (CHAR ch) } } -static INT32 Out_Length (CHAR *s, LONGINT s__len) +static INT32 Out_Length (CHAR *s, ADDRESS s__len) { INT32 l; l = 0; @@ -65,7 +65,7 @@ static INT32 Out_Length (CHAR *s, LONGINT s__len) return l; } -void Out_String (CHAR *str, LONGINT str__len) +void Out_String (CHAR *str, ADDRESS str__len) { INT32 l; INT16 error; @@ -125,13 +125,13 @@ void Out_Ln (void) Out_Flush(); } -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); } -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) { INT16 j; INT32 l; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0e66420d..d58a17d5 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -16,7 +16,7 @@ import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); import void Out_Open (void); import void Out_Real (REAL x, INT16 n); -import void Out_String (CHAR *str, LONGINT str__len); +import void Out_String (CHAR *str, ADDRESS str__len); import LONGREAL Out_Ten (INT16 e); import void *Out__init(void); diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 72c15bf8..459d5079 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -45,35 +45,35 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -export INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); -export void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -export INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -export INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); export void Platform_OSFree (INT32 address); -export INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -export INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +export INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); export INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -export INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +export INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); export INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -83,16 +83,16 @@ export void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t export void Platform_SetQuitHandler (Platform_SignalHandler handler); export INT16 Platform_Size (INT32 h, INT32 *l); export INT16 Platform_Sync (INT32 h); -export INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +export INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); static void Platform_TestLittleEndian (void); export INT32 Platform_Time (void); export BOOLEAN Platform_TimedOut (INT16 e); export BOOLEAN Platform_TooManyFiles (INT16 e); export INT16 Platform_Truncate (INT32 h, INT32 l); -export INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +export INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); export INT16 Platform_Write (INT32 h, INT32 p, INT32 l); static void Platform_YMDHMStoClock (INT32 ye, INT32 mo, INT32 da, INT32 ho, INT32 mi, INT32 se, INT32 *t, INT32 *d); -export BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); #include #include @@ -223,7 +223,7 @@ void Platform_Init (INT32 argc, INT32 argvadr) Platform_HeapInitHeap(); } -BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { Platform_EnvPtr p = NIL; __DUP(var, var__len, CHAR); @@ -235,7 +235,7 @@ BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__le return p != NIL; } -void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { __DUP(var, var__len, CHAR); if (!Platform_getEnv(var, var__len, (void*)val, val__len)) { @@ -244,7 +244,7 @@ void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len) +void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { Platform_ArgVec av = NIL; if (n < Platform_ArgCount) { @@ -279,7 +279,7 @@ void Platform_GetIntArg (INT16 n, INT32 *val) } } -INT16 Platform_ArgPos (CHAR *s, LONGINT s__len) +INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) { INT16 i; CHAR arg[256]; @@ -345,7 +345,7 @@ void Platform_Delay (INT32 ms) Platform_nanosleep(s, ns); } -INT16 Platform_System (CHAR *cmd, LONGINT cmd__len) +INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len) { __DUP(cmd, cmd__len, CHAR); __DEL(cmd); @@ -357,7 +357,7 @@ INT16 Platform_Error (void) return Platform_err(); } -INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openro(n, n__len); @@ -370,7 +370,7 @@ INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openrw(n, n__len); @@ -383,7 +383,7 @@ INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_opennew(n, n__len); @@ -423,7 +423,7 @@ INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *iden return 0; } -INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) +INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) { __DUP(n, n__len, CHAR); Platform_structstats(); @@ -481,7 +481,7 @@ INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n) __RETCHK; } -INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n) +INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n) { *n = Platform_readfile(h, (ADDRESS)b, b__len); if (*n < 0) { @@ -535,7 +535,7 @@ INT16 Platform_Truncate (INT32 h, INT32 l) __RETCHK; } -INT16 Platform_Unlink (CHAR *n, LONGINT n__len) +INT16 Platform_Unlink (CHAR *n, ADDRESS n__len) { if (Platform_unlink(n, n__len) < 0) { return Platform_err(); @@ -545,7 +545,7 @@ INT16 Platform_Unlink (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Chdir (CHAR *n, LONGINT n__len) +INT16 Platform_Chdir (CHAR *n, ADDRESS n__len) { INT16 r; if ((Platform_chdir(n, n__len) >= 0 && Platform_getcwd((void*)Platform_CWD, 256) != NIL)) { @@ -556,7 +556,7 @@ INT16 Platform_Chdir (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len) +INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len) { if (Platform_rename(o, o__len, n, n__len) < 0) { return Platform_err(); diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index b04f552d..34547692 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -27,35 +27,35 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -import INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); -import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -import INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -import INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); import void Platform_OSFree (INT32 address); -import INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -import INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +import INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); import INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -import INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +import INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); import INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -65,14 +65,14 @@ import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t import void Platform_SetQuitHandler (Platform_SignalHandler handler); import INT16 Platform_Size (INT32 h, INT32 *l); import INT16 Platform_Sync (INT32 h); -import INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +import INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); import INT32 Platform_Time (void); import BOOLEAN Platform_TimedOut (INT16 e); import BOOLEAN Platform_TooManyFiles (INT16 e); import INT16 Platform_Truncate (INT32 h, INT32 l); -import INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +import INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); import INT16 Platform_Write (INT32 h, INT32 p, INT32 l); -import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void *Platform__init(void); diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index cd4c3c61..be3ad909 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,11 +10,11 @@ -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); -export void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len); +export void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +export void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); export INT16 Reals_Expo (REAL x); export INT16 Reals_ExpoL (LONGREAL x); export void Reals_SetExpo (REAL *x, INT16 ex); @@ -79,7 +79,7 @@ INT16 Reals_ExpoL (LONGREAL x) return __MASK(__ASHR(i, 4), -2048); } -void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) { INT32 i, j, k; if (x < (LONGREAL)0) { @@ -107,7 +107,7 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) } } -void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) { Reals_ConvertL(x, n, (void*)d, d__len); } @@ -122,7 +122,7 @@ static CHAR Reals_ToHex (INT16 i) __RETCHK; } -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len) { INT16 i; INT32 l; @@ -137,12 +137,12 @@ static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LO } } -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&y, 4, (void*)d, d__len * 1); } -void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&x, 8, (void*)d, d__len * 1); } diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index f0c84ab1..e8d15a2f 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h @@ -8,10 +8,10 @@ -import void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +import void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +import void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); import INT16 Reals_Expo (REAL x); import INT16 Reals_ExpoL (LONGREAL x); import void Reals_SetExpo (REAL *x, INT16 ex); diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index b5707327..fd550df3 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,18 +10,18 @@ -export void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -export void Strings_Cap (CHAR *s, LONGINT s__len); -export void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -export void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -export void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -export INT16 Strings_Length (CHAR *s, LONGINT s__len); -export BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -export INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -export void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +export void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +export void Strings_Cap (CHAR *s, ADDRESS s__len); +export void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +export void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +export void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export INT16 Strings_Length (CHAR *s, ADDRESS s__len); +export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); -INT16 Strings_Length (CHAR *s, LONGINT s__len) +INT16 Strings_Length (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); @@ -39,7 +39,7 @@ INT16 Strings_Length (CHAR *s, LONGINT s__len) __RETCHK; } -void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len) +void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(extra, extra__len, CHAR); @@ -56,7 +56,7 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__ __DEL(extra); } -void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(source, source__len, CHAR); @@ -87,7 +87,7 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, L __DEL(source); } -void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) +void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n) { INT16 len, i; len = Strings_Length(s, s__len); @@ -110,7 +110,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) } } -void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { __DUP(source, source__len, CHAR); Strings_Delete((void*)dest, dest__len, pos, pos + Strings_Length(source, source__len)); @@ -118,7 +118,7 @@ void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, __DEL(source); } -void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len) +void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len) { INT16 len, destLen, i; __DUP(source, source__len, CHAR); @@ -143,7 +143,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHA __DEL(source); } -INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos) +INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos) { INT16 n1, n2, i, j; __DUP(pattern, pattern__len, CHAR); @@ -175,7 +175,7 @@ INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, return -1; } -void Strings_Cap (CHAR *s, LONGINT s__len) +void Strings_Cap (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -191,9 +191,9 @@ static struct Match__7 { struct Match__7 *lnk; } *Match__7_s; -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m); +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m); -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m) +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m) { while ((((n >= 0 && m >= 0)) && mask[__X(m, mask__len)] != '*')) { if (name[__X(n, name__len)] != mask[__X(m, mask__len)]) { @@ -220,7 +220,7 @@ static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__le return 0; } -BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len) +BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len) { struct Match__7 _s; BOOLEAN __retval; diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index c987af8d..76cb022d 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -8,15 +8,15 @@ -import void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -import void Strings_Cap (CHAR *s, LONGINT s__len); -import void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -import void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -import void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -import INT16 Strings_Length (CHAR *s, LONGINT s__len); -import BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -import INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -import void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +import void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +import void Strings_Cap (CHAR *s, ADDRESS s__len); +import void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +import void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +import void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import INT16 Strings_Length (CHAR *s, ADDRESS s__len); +import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); import void *Strings__init(void); diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index ad26b1cb..1428c051 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -187,20 +187,20 @@ export void Texts_Append (Texts_Text T, Texts_Buffer B); export void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); static Texts_Elem Texts_CloneElem (Texts_Elem e); static Texts_Piece Texts_ClonePiece (Texts_Piece p); -export void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len); +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len); static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__typ); export void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); export void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Merge (Texts_Text T, Texts_Run u, Texts_Run *v); -export void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_OpenBuf (Texts_Buffer B); export void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); export void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -229,10 +229,10 @@ export void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x export void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); export void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len) +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; __NEW(F, Texts_FontDesc); @@ -1027,7 +1027,7 @@ void Texts_WriteLn (Texts_Writer *W, ADDRESS *W__typ) Texts_Write(&*W, W__typ, 0x0d); } -void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len) +void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -1539,7 +1539,7 @@ void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Texts_Load0(&*r, r__typ, T); } -void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; @@ -1755,7 +1755,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Store__39_s = _s.lnk; } -void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index e2c03958..fa28aa92 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -131,7 +131,7 @@ import ADDRESS *Texts_Writer__typ; import void Texts_Append (Texts_Text T, Texts_Buffer B); import void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); -import void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); @@ -139,7 +139,7 @@ import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); import void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); -import void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_OpenBuf (Texts_Buffer B); import void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); import void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -166,7 +166,7 @@ import void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x import void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); import void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); import void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); import void *Texts__init(void); diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index f69fd90e..38c0743f 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,23 +27,23 @@ export void VT100_DECTCEMl (void); export void VT100_DSR (INT16 n); export void VT100_ED (INT16 n); export void VT100_EL (INT16 n); -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len); +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); -export void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end); +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); export void VT100_SGR (INT16 n); export void VT100_SGR2 (INT16 n, INT16 m); export void VT100_SU (INT16 n); -export void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +export void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end) { CHAR h; while (start < end) { @@ -55,7 +55,7 @@ static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) } } -void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) +void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) { CHAR b[21]; INT16 s, e; @@ -84,7 +84,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) __COPY(b, str, str__len); } -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len) { CHAR cmd[9]; __DUP(letter, letter__len, CHAR); @@ -94,7 +94,7 @@ static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -107,7 +107,7 @@ static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -120,7 +120,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) { CHAR nstr[5], mstr[5]; CHAR cmd[12]; @@ -236,7 +236,7 @@ void VT100_DECTCEMh (void) VT100_EscSeq0((CHAR*)"\?25h", 5); } -void VT100_SetAttr (CHAR *attr, LONGINT attr__len) +void VT100_SetAttr (CHAR *attr, ADDRESS attr__len) { CHAR tmpstr[16]; __DUP(attr, attr__len, CHAR); diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index d99406ec..4bbb3110 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h @@ -23,14 +23,14 @@ import void VT100_DSR (INT16 n); import void VT100_ED (INT16 n); import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); -import void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); import void VT100_SGR2 (INT16 n, INT16 m); import void VT100_SU (INT16 n); -import void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +import void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); import void *VT100__init(void); diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 37630d23..66f80319 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,13 +17,13 @@ static CHAR extTools_CFLAGS[1023]; -export void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len); -export void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len); +export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len) +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; __DUP(title, title__len, CHAR); @@ -63,7 +63,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); @@ -74,7 +74,7 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } -void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) +void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { CHAR cmd[1023]; __DUP(moduleName, moduleName__len, CHAR); @@ -86,7 +86,7 @@ void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) __DEL(moduleName); } -void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len) +void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { CHAR cmd[1023]; __DUP(additionalopts, additionalopts__len, CHAR); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 63e5df15..472c60f3 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h @@ -8,8 +8,8 @@ -import void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); +import void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +import void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); import void *extTools__init(void); diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index dc4bb660..e900905f 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 2d0061df..071d7b8e 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index b28e0caa..b1942442 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 826c3d63..6a53103d 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -52,7 +52,7 @@ static Files_File Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { - LONGINT len[1]; + ADDRESS len[1]; CHAR data[1]; } *Files_SearchPath; @@ -62,56 +62,56 @@ export ADDRESS *Files_Rider__typ; export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); -export void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); -export void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode); +export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len); +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); static void Files_Flush (Files_Buffer buf); export void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -export void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len); -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len); +export void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len); +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len); export INT32 Files_Length (Files_File f); -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len); -export Files_File Files_New (CHAR *name, LONGINT name__len); -export Files_File Files_Old (CHAR *name, LONGINT name__len); +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len); +export Files_File Files_New (CHAR *name, ADDRESS name__len); +export Files_File Files_Old (CHAR *name, ADDRESS name__len); export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +export void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +export void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); export void Files_Register (Files_File f); -export void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len); +export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -export void Files_SetSearchPath (CHAR *path, LONGINT path__len); +export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); export void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); export void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); export void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); export void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); Out_Ln(); @@ -138,7 +138,7 @@ static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) __DEL(s); } -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len) +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { INT16 i, j; __DUP(dir, dir__len, CHAR); @@ -163,7 +163,7 @@ static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT __DEL(name); } -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len) +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { INT32 n, i, j; __DUP(finalName, finalName__len, CHAR); @@ -316,7 +316,7 @@ INT32 Files_Length (Files_File f) return f->len; } -Files_File Files_New (CHAR *name, LONGINT name__len) +Files_File Files_New (CHAR *name, ADDRESS name__len) { Files_File f = NIL; __DUP(name, name__len, CHAR); @@ -332,7 +332,7 @@ Files_File Files_New (CHAR *name, LONGINT name__len) return f; } -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) { INT16 i; CHAR ch; @@ -375,7 +375,7 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) dir[i] = 0x00; } -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len) +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -415,7 +415,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) return NIL; } -Files_File Files_Old (CHAR *name, LONGINT name__len) +Files_File Files_Old (CHAR *name, ADDRESS name__len) { Files_File f = NIL; INT32 fd; @@ -618,7 +618,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } -void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -683,7 +683,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) (*r).res = 0; } -void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -722,14 +722,14 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT (*r).res = 0; } -void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res) +void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } -void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res) +void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { INT32 fdold, fdnew, n; INT16 error, ignore; @@ -812,14 +812,14 @@ void Files_Register (Files_File f) } } -void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res) +void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res) { __DUP(path, path__len, CHAR); *res = Platform_Chdir((void*)path, path__len); __DEL(path); } -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len) +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len) { INT32 i, j; if (!Platform_LittleEndian) { @@ -877,7 +877,7 @@ void Files_ReadLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL *x) Files_FlipBytes((void*)b, 8, (void*)&*x, 8); } -void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; CHAR ch; @@ -889,7 +889,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) } while (!(ch == 0x00)); } -void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -906,7 +906,7 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) x[i] = 0x00; } -void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len) +void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) { INT8 s, b; INT64 q; @@ -972,7 +972,7 @@ void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); } -void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -991,7 +991,7 @@ void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); } -void Files_GetName (Files_File f, CHAR *name, LONGINT name__len) +void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) { __COPY(f->workName, name, name__len); } @@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o) } } -void Files_SetSearchPath (CHAR *path, LONGINT path__len) +void Files_SetSearchPath (CHAR *path, ADDRESS path__len) { __DUP(path, path__len, CHAR); if (Strings_Length(path, path__len) != 0) { diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 855c5f7c..5a99da54 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -30,41 +30,41 @@ import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); -import void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); -import void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); +import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -import void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); +import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); -import Files_File Files_New (CHAR *name, LONGINT name__len); -import Files_File Files_Old (CHAR *name, LONGINT name__len); +import Files_File Files_New (CHAR *name, ADDRESS name__len); +import Files_File Files_Old (CHAR *name, ADDRESS name__len); import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +import void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +import void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void Files_Register (Files_File f); -import void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); +import void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); import void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -import void Files_SetSearchPath (CHAR *path, LONGINT path__len); +import void Files_SetSearchPath (CHAR *path, ADDRESS path__len); import void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); import void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); import void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); import void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); import void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); import void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); import void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void *Files__init(void); diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index a2bb8f2f..032e9544 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -85,14 +85,14 @@ static void Heap_ExtendHeap (INT64 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len); +static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT64 q); -static void Heap_MarkCandidates (INT64 n, INT64 *cand, LONGINT cand__len); +static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); -static void Heap_MarkStack (INT64 n, INT64 *cand, LONGINT cand__len); +static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT64 size); export SYSTEM_PTR Heap_NEWREC (INT64 tag); static INT64 Heap_NewChunk (INT64 blksz); @@ -101,7 +101,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT64 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len); +static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -445,7 +445,7 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len) +static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) { INT64 i, j, x; j = l; @@ -464,7 +464,7 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len) a[i] = x; } -static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len) +static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) { INT64 l, r, x; l = __ASHR(n, 1); @@ -482,7 +482,7 @@ static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len) } } -static void Heap_MarkCandidates (INT64 n, INT64 *cand, LONGINT cand__len) +static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) { INT64 chnk, adr, tag, next, lim, lim1, i, ptr, size; chnk = Heap_heap; @@ -571,7 +571,7 @@ void Heap_FINALL (void) } } -static void Heap_MarkStack (INT64 n, INT64 *cand, LONGINT cand__len) +static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; INT64 inc, nofcand, sp, p, stack0; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 163cad8c..bf12c17b 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 4e4d62e7..12ee85c4 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -47,21 +47,21 @@ export Modules_ModuleName Modules_imported, Modules_importing; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len); +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); -export void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_Halt (INT32 code); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -export Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); -static void Modules_errstring (CHAR *s, LONGINT s__len); +static void Modules_errstring (CHAR *s, ADDRESS s__len); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; __DUP(b, b__len, CHAR); @@ -79,7 +79,7 @@ static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) __DEL(b); } -Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) +Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { Modules_Module m = NIL; CHAR bodyname[64]; @@ -103,7 +103,7 @@ Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len) +Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) { Modules_Cmd c = NIL; __DUP(name, name__len, CHAR); @@ -130,7 +130,7 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT nam __RETCHK; } -void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all) +void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { Modules_Module m = NIL, p = NIL; __DUP(name, name__len, CHAR); @@ -168,7 +168,7 @@ static void Modules_errch (CHAR c) e = Platform_Write(1, (ADDRESS)&c, 1); } -static void Modules_errstring (CHAR *s, LONGINT s__len) +static void Modules_errstring (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 8bb89fe5..b1f2385e 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -44,10 +44,10 @@ import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; import void Modules_AssertFail (INT32 code); -import void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); import void Modules_Halt (INT32 code); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -import Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 3ef8e2f9..bc44b83a 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 0be714e8..eb93787e 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index ef4b429f..72e0feef 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,7 +56,7 @@ static void OPC_GenHeaderMsg (void); export void OPC_Halt (INT32 n); export void OPC_Ident (OPT_Object obj); static void OPC_IdentList (OPT_Object obj, INT16 vis); -static void OPC_Include (CHAR *name, LONGINT name__len); +static void OPC_Include (CHAR *name, ADDRESS name__len); static void OPC_IncludeImports (OPT_Object obj, INT16 vis); export void OPC_Increment (BOOLEAN decrement); export void OPC_Indent (INT16 count); @@ -68,11 +68,11 @@ static void OPC_InitTProcs (OPT_Object typ, OPT_Object obj); export void OPC_IntLiteral (INT64 n, INT32 size); export void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim); static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamName); -static INT16 OPC_Length (CHAR *s, LONGINT s__len); +static INT16 OPC_Length (CHAR *s, ADDRESS s__len); export BOOLEAN OPC_NeedsRetval (OPT_Object proc); export INT32 OPC_NofPtrs (OPT_Struct typ); -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len); -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len); +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len); +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len); static void OPC_ProcHeader (OPT_Object proc, BOOLEAN define); static void OPC_ProcPredefs (OPT_Object obj, INT8 vis); static void OPC_PutBase (OPT_Struct typ); @@ -80,8 +80,8 @@ static void OPC_PutPtrOffsets (OPT_Struct typ, INT32 adr, INT32 *cnt); static void OPC_RegCmds (OPT_Object obj); export void OPC_SetInclude (BOOLEAN exclude); static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause); -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x); -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l); +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x); +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l); export void OPC_TDescDecl (OPT_Struct typ); export void OPC_TypeDefs (OPT_Object obj, INT16 vis); export void OPC_TypeOf (OPT_Object ap); @@ -137,7 +137,7 @@ void OPC_EndBlk0 (void) OPM_Write('}'); } -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x) { CHAR ch; INT16 i; @@ -156,7 +156,7 @@ static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) __DEL(s); } -static INT16 OPC_Length (CHAR *s, LONGINT s__len) +static INT16 OPC_Length (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -166,7 +166,7 @@ static INT16 OPC_Length (CHAR *s, LONGINT s__len) return i; } -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len) +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len) { INT16 i, h; i = 0; @@ -364,7 +364,7 @@ static void OPC_DeclareBase (OPT_Object dcl) OPM_WriteString((CHAR*)"struct ", 8); OPC_BegBlk(); OPC_BegStat(); - OPC_Str1((CHAR*)"LONGINT len[#]", 15, nofdims); + OPC_Str1((CHAR*)"ADDRESS len[#]", 15, nofdims); OPC_EndStat(); OPC_BegStat(); __NEW(obj, OPT_ObjDesc); @@ -511,7 +511,7 @@ static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamNa typ = par->typ->BaseTyp; while (typ->comp == 3) { if (ansiDefine) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); } else { OPM_WriteString((CHAR*)", ", 3); } @@ -720,7 +720,7 @@ static void OPC_DefineType (OPT_Struct str) } } -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len) +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) { INT16 i; __DUP(y, y__len, CHAR); @@ -969,7 +969,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) OPC_EndStat(); OPC_BegStat(); base = OPT_linttyp; - OPM_WriteString((CHAR*)"LONGINT ", 9); + OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPC_EndStat(); @@ -1008,7 +1008,7 @@ static void OPC_AnsiParamList (OPT_Object obj, BOOLEAN showParamNames) __COPY(name, obj->name, 256); } if (obj->typ->comp == 3) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); OPC_LenList(obj, 1, showParamNames); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPM_WriteString((CHAR*)", ADDRESS *", 12); @@ -1062,7 +1062,7 @@ static void OPC_ProcPredefs (OPT_Object obj, INT8 vis) } } -static void OPC_Include (CHAR *name, LONGINT name__len) +static void OPC_Include (CHAR *name, ADDRESS name__len) { __DUP(name, name__len, CHAR); OPM_WriteString((CHAR*)"#include ", 10); @@ -1744,7 +1744,7 @@ static void OPC_CharacterLiteral (INT64 c) } } -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l) +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) { INT32 i; INT16 c; @@ -1912,9 +1912,9 @@ static struct InitKeywords__46 { struct InitKeywords__46 *lnk; } *InitKeywords__46_s; -static void Enter__47 (CHAR *s, LONGINT s__len); +static void Enter__47 (CHAR *s, ADDRESS s__len); -static void Enter__47 (CHAR *s, LONGINT s__len) +static void Enter__47 (CHAR *s, ADDRESS s__len) { INT16 h; __DUP(s, s__len, CHAR); diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 842e7dec..5624314d 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 60ab38c7..b2fd5536 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,26 +53,26 @@ export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len); +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static void OPM_LogErrMsg (INT16 n); -export void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); export void OPM_LogWLn (void); export void OPM_LogWNum (INT64 i, INT64 len); -export void OPM_LogWStr (CHAR *s, LONGINT s__len); +export void OPM_LogWStr (CHAR *s, ADDRESS s__len); export INT32 OPM_Longint (INT64 n); -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len); +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len); export void OPM_Mark (INT16 n, INT32 pos); -export void OPM_NewSym (CHAR *modName, LONGINT modName__len); -export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +export void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +export void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +export void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); export BOOLEAN OPM_OpenPar (void); export void OPM_RegisterNewSym (void); -static void OPM_ScanOptions (CHAR *s, LONGINT s__len); +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); @@ -93,8 +93,8 @@ export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); export void OPM_WriteLn (void); export void OPM_WriteReal (LONGREAL r, CHAR suffx); -export void OPM_WriteString (CHAR *s, LONGINT s__len); -export void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +export void OPM_WriteString (CHAR *s, ADDRESS s__len); +export void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); export BOOLEAN OPM_eofSF (void); export void OPM_err (INT16 n); @@ -105,7 +105,7 @@ void OPM_LogW (CHAR ch) Out_Char(ch); } -void OPM_LogWStr (CHAR *s, LONGINT s__len) +void OPM_LogWStr (CHAR *s, ADDRESS s__len) { __DUP(s, s__len, CHAR); Out_String(s, s__len); @@ -122,7 +122,7 @@ void OPM_LogWLn (void) Out_Ln(); } -void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len) +void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) { __DUP(vt100code, vt100code__len, CHAR); if ((Out_IsConsole && !__IN(16, OPM_Options, 32))) { @@ -154,7 +154,7 @@ INT16 OPM_Integer (INT64 n) return __VAL(INT16, n); } -static void OPM_ScanOptions (CHAR *s, LONGINT s__len) +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -465,7 +465,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len) +void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) { Texts_Text T = NIL; INT32 beg, end, time; @@ -514,7 +514,7 @@ void OPM_Get (CHAR *ch) } } -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len) +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len) { INT16 i, j; CHAR ch; @@ -700,7 +700,7 @@ void OPM_err (INT16 n) OPM_Mark(n, OPM_errpos); } -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len) +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len) { INT16 i; INT32 l; @@ -772,7 +772,7 @@ void OPM_CloseOldSym (void) Files_Close(Files_Base(&OPM_oldSF, Files_Rider__typ)); } -void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done) +void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; @@ -832,7 +832,7 @@ void OPM_DeleteNewSym (void) { } -void OPM_NewSym (CHAR *modName, LONGINT modName__len) +void OPM_NewSym (CHAR *modName, ADDRESS modName__len) { OPM_FileName fileName; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); @@ -851,7 +851,7 @@ void OPM_Write (CHAR ch) Files_Write(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, ch); } -void OPM_WriteString (CHAR *s, LONGINT s__len) +void OPM_WriteString (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -861,7 +861,7 @@ void OPM_WriteString (CHAR *s, LONGINT s__len) Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); } -void OPM_WriteStringVar (CHAR *s, LONGINT s__len) +void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -986,7 +986,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) } } -void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len) +void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { CHAR FName[32]; __COPY(moduleName, OPM_modName, 32); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 2d272feb..c310c421 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -28,19 +28,19 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); -import void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); import void OPM_LogWNum (INT64 i, INT64 len); -import void OPM_LogWStr (CHAR *s, LONGINT s__len); +import void OPM_LogWStr (CHAR *s, ADDRESS s__len); import INT32 OPM_Longint (INT64 n); import void OPM_Mark (INT16 n, INT32 pos); -import void OPM_NewSym (CHAR *modName, LONGINT modName__len); -import void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -import void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +import void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +import void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +import void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); @@ -61,8 +61,8 @@ import void OPM_WriteHex (INT64 i); import void OPM_WriteInt (INT64 i); import void OPM_WriteLn (void); import void OPM_WriteReal (LONGREAL r, CHAR suffx); -import void OPM_WriteString (CHAR *s, LONGINT s__len); -import void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +import void OPM_WriteString (CHAR *s, ADDRESS s__len); +import void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); import BOOLEAN OPM_eofSF (void); import void OPM_err (INT16 n); import void *OPM__init(void); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index df908a43..e6b89be2 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 5a71eb39..acb2df91 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 6ee700e5..7aedbbd6 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 1f7a3e58..e49c222b 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index a8d42b40..4a900e78 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -120,7 +120,7 @@ static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_FPrintErr (OPT_Object obj, INT16 errcode); -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len); +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len); export void OPT_FPrintObj (OPT_Object obj); static void OPT_FPrintSign (INT32 *fp, OPT_Struct result, OPT_Object par); export void OPT_FPrintStr (OPT_Struct typ); @@ -132,7 +132,7 @@ export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); static void OPT_InMod (INT8 *mno); -static void OPT_InName (CHAR *name, LONGINT name__len); +static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par); static void OPT_InStruct (OPT_Struct *typ); @@ -155,7 +155,7 @@ static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); static void OPT_OutMod (INT16 mno); -static void OPT_OutName (CHAR *name, LONGINT name__len); +static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); @@ -576,7 +576,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) *obj = ob1; } -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len) +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -957,7 +957,7 @@ void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old) } } -static void OPT_InName (CHAR *name, LONGINT name__len) +static void OPT_InName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -1483,7 +1483,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) } } -static void OPT_OutName (CHAR *name, LONGINT name__len) +static void OPT_OutName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 90fcacf5..9d34cea9 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 4bd6b3fb..1b610f35 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index c4a61586..0f1980ac 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 39f383cf..82ad945b 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,16 +17,16 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Int (INT64 x, INT64 n); -static INT32 Out_Length (CHAR *s, LONGINT s__len); +static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); export void Out_LongReal (LONGREAL x, INT16 n); export void Out_Open (void); export void Out_Real (REAL x, INT16 n); static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_); -export void Out_String (CHAR *str, LONGINT str__len); +export void Out_String (CHAR *str, ADDRESS str__len); export LONGREAL Out_Ten (INT16 e); -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i); -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i); +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) @@ -55,7 +55,7 @@ void Out_Char (CHAR ch) } } -static INT32 Out_Length (CHAR *s, LONGINT s__len) +static INT32 Out_Length (CHAR *s, ADDRESS s__len) { INT32 l; l = 0; @@ -65,7 +65,7 @@ static INT32 Out_Length (CHAR *s, LONGINT s__len) return l; } -void Out_String (CHAR *str, LONGINT str__len) +void Out_String (CHAR *str, ADDRESS str__len) { INT32 l; INT16 error; @@ -125,13 +125,13 @@ void Out_Ln (void) Out_Flush(); } -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); } -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) { INT16 j; INT32 l; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0e66420d..d58a17d5 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -16,7 +16,7 @@ import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); import void Out_Open (void); import void Out_Real (REAL x, INT16 n); -import void Out_String (CHAR *str, LONGINT str__len); +import void Out_String (CHAR *str, ADDRESS str__len); import LONGREAL Out_Ten (INT16 e); import void *Out__init(void); diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 46e18441..543ed88a 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -45,35 +45,35 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -export INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); -export void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -export INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); export void Platform_Init (INT32 argc, INT64 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -export INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT64 Platform_OSAllocate (INT64 size); export void Platform_OSFree (INT64 address); -export INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -export INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +export INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); export INT16 Platform_Read (INT32 h, INT64 p, INT32 l, INT32 *n); -export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -export INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +export INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); export INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -83,16 +83,16 @@ export void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t export void Platform_SetQuitHandler (Platform_SignalHandler handler); export INT16 Platform_Size (INT32 h, INT32 *l); export INT16 Platform_Sync (INT32 h); -export INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +export INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); static void Platform_TestLittleEndian (void); export INT32 Platform_Time (void); export BOOLEAN Platform_TimedOut (INT16 e); export BOOLEAN Platform_TooManyFiles (INT16 e); export INT16 Platform_Truncate (INT32 h, INT32 l); -export INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +export INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); export INT16 Platform_Write (INT32 h, INT64 p, INT32 l); static void Platform_YMDHMStoClock (INT32 ye, INT32 mo, INT32 da, INT32 ho, INT32 mi, INT32 se, INT32 *t, INT32 *d); -export BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); #include #include @@ -223,7 +223,7 @@ void Platform_Init (INT32 argc, INT64 argvadr) Platform_HeapInitHeap(); } -BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { Platform_EnvPtr p = NIL; __DUP(var, var__len, CHAR); @@ -235,7 +235,7 @@ BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__le return p != NIL; } -void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { __DUP(var, var__len, CHAR); if (!Platform_getEnv(var, var__len, (void*)val, val__len)) { @@ -244,7 +244,7 @@ void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len) +void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { Platform_ArgVec av = NIL; if (n < Platform_ArgCount) { @@ -279,7 +279,7 @@ void Platform_GetIntArg (INT16 n, INT32 *val) } } -INT16 Platform_ArgPos (CHAR *s, LONGINT s__len) +INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) { INT16 i; CHAR arg[256]; @@ -345,7 +345,7 @@ void Platform_Delay (INT32 ms) Platform_nanosleep(s, ns); } -INT16 Platform_System (CHAR *cmd, LONGINT cmd__len) +INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len) { __DUP(cmd, cmd__len, CHAR); __DEL(cmd); @@ -357,7 +357,7 @@ INT16 Platform_Error (void) return Platform_err(); } -INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openro(n, n__len); @@ -370,7 +370,7 @@ INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_openrw(n, n__len); @@ -383,7 +383,7 @@ INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h) { INT16 fd; fd = Platform_opennew(n, n__len); @@ -423,7 +423,7 @@ INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *iden return 0; } -INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) +INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) { __DUP(n, n__len, CHAR); Platform_structstats(); @@ -481,7 +481,7 @@ INT16 Platform_Read (INT32 h, INT64 p, INT32 l, INT32 *n) __RETCHK; } -INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n) +INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n) { *n = Platform_readfile(h, (ADDRESS)b, b__len); if (*n < 0) { @@ -535,7 +535,7 @@ INT16 Platform_Truncate (INT32 h, INT32 l) __RETCHK; } -INT16 Platform_Unlink (CHAR *n, LONGINT n__len) +INT16 Platform_Unlink (CHAR *n, ADDRESS n__len) { if (Platform_unlink(n, n__len) < 0) { return Platform_err(); @@ -545,7 +545,7 @@ INT16 Platform_Unlink (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Chdir (CHAR *n, LONGINT n__len) +INT16 Platform_Chdir (CHAR *n, ADDRESS n__len) { INT16 r; if ((Platform_chdir(n, n__len) >= 0 && Platform_getcwd((void*)Platform_CWD, 256) != NIL)) { @@ -556,7 +556,7 @@ INT16 Platform_Chdir (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len) +INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len) { if (Platform_rename(o, o__len, n, n__len) < 0) { return Platform_err(); diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 80307386..bfe37a2c 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -27,35 +27,35 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -import INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); -import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -import INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); import void Platform_Init (INT32 argc, INT64 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -import INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT64 Platform_OSAllocate (INT64 size); import void Platform_OSFree (INT64 address); -import INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -import INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +import INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); import INT16 Platform_Read (INT32 h, INT64 p, INT32 l, INT32 *n); -import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -import INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +import INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); import INT16 Platform_Seek (INT32 h, INT32 offset, INT16 whence); @@ -65,14 +65,14 @@ import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__t import void Platform_SetQuitHandler (Platform_SignalHandler handler); import INT16 Platform_Size (INT32 h, INT32 *l); import INT16 Platform_Sync (INT32 h); -import INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +import INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); import INT32 Platform_Time (void); import BOOLEAN Platform_TimedOut (INT16 e); import BOOLEAN Platform_TooManyFiles (INT16 e); import INT16 Platform_Truncate (INT32 h, INT32 l); -import INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +import INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); import INT16 Platform_Write (INT32 h, INT64 p, INT32 l); -import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void *Platform__init(void); diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index cd4c3c61..be3ad909 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,11 +10,11 @@ -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); -export void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len); +export void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +export void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); export INT16 Reals_Expo (REAL x); export INT16 Reals_ExpoL (LONGREAL x); export void Reals_SetExpo (REAL *x, INT16 ex); @@ -79,7 +79,7 @@ INT16 Reals_ExpoL (LONGREAL x) return __MASK(__ASHR(i, 4), -2048); } -void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) { INT32 i, j, k; if (x < (LONGREAL)0) { @@ -107,7 +107,7 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) } } -void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) { Reals_ConvertL(x, n, (void*)d, d__len); } @@ -122,7 +122,7 @@ static CHAR Reals_ToHex (INT16 i) __RETCHK; } -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len) { INT16 i; INT32 l; @@ -137,12 +137,12 @@ static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LO } } -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&y, 4, (void*)d, d__len * 1); } -void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&x, 8, (void*)d, d__len * 1); } diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index f0c84ab1..e8d15a2f 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h @@ -8,10 +8,10 @@ -import void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +import void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +import void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); import INT16 Reals_Expo (REAL x); import INT16 Reals_ExpoL (LONGREAL x); import void Reals_SetExpo (REAL *x, INT16 ex); diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index b5707327..fd550df3 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,18 +10,18 @@ -export void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -export void Strings_Cap (CHAR *s, LONGINT s__len); -export void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -export void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -export void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -export INT16 Strings_Length (CHAR *s, LONGINT s__len); -export BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -export INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -export void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +export void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +export void Strings_Cap (CHAR *s, ADDRESS s__len); +export void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +export void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +export void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export INT16 Strings_Length (CHAR *s, ADDRESS s__len); +export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); -INT16 Strings_Length (CHAR *s, LONGINT s__len) +INT16 Strings_Length (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); @@ -39,7 +39,7 @@ INT16 Strings_Length (CHAR *s, LONGINT s__len) __RETCHK; } -void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len) +void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(extra, extra__len, CHAR); @@ -56,7 +56,7 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__ __DEL(extra); } -void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(source, source__len, CHAR); @@ -87,7 +87,7 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, L __DEL(source); } -void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) +void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n) { INT16 len, i; len = Strings_Length(s, s__len); @@ -110,7 +110,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) } } -void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { __DUP(source, source__len, CHAR); Strings_Delete((void*)dest, dest__len, pos, pos + Strings_Length(source, source__len)); @@ -118,7 +118,7 @@ void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, __DEL(source); } -void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len) +void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len) { INT16 len, destLen, i; __DUP(source, source__len, CHAR); @@ -143,7 +143,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHA __DEL(source); } -INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos) +INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos) { INT16 n1, n2, i, j; __DUP(pattern, pattern__len, CHAR); @@ -175,7 +175,7 @@ INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, return -1; } -void Strings_Cap (CHAR *s, LONGINT s__len) +void Strings_Cap (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -191,9 +191,9 @@ static struct Match__7 { struct Match__7 *lnk; } *Match__7_s; -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m); +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m); -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m) +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m) { while ((((n >= 0 && m >= 0)) && mask[__X(m, mask__len)] != '*')) { if (name[__X(n, name__len)] != mask[__X(m, mask__len)]) { @@ -220,7 +220,7 @@ static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__le return 0; } -BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len) +BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len) { struct Match__7 _s; BOOLEAN __retval; diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index c987af8d..76cb022d 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -8,15 +8,15 @@ -import void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -import void Strings_Cap (CHAR *s, LONGINT s__len); -import void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -import void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -import void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -import INT16 Strings_Length (CHAR *s, LONGINT s__len); -import BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -import INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -import void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +import void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +import void Strings_Cap (CHAR *s, ADDRESS s__len); +import void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +import void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +import void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import INT16 Strings_Length (CHAR *s, ADDRESS s__len); +import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); import void *Strings__init(void); diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index ae12961b..7182a772 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -187,20 +187,20 @@ export void Texts_Append (Texts_Text T, Texts_Buffer B); export void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); static Texts_Elem Texts_CloneElem (Texts_Elem e); static Texts_Piece Texts_ClonePiece (Texts_Piece p); -export void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len); +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len); static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__typ); export void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); export void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Merge (Texts_Text T, Texts_Run u, Texts_Run *v); -export void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_OpenBuf (Texts_Buffer B); export void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); export void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -229,10 +229,10 @@ export void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x export void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); export void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len) +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; __NEW(F, Texts_FontDesc); @@ -1027,7 +1027,7 @@ void Texts_WriteLn (Texts_Writer *W, ADDRESS *W__typ) Texts_Write(&*W, W__typ, 0x0d); } -void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len) +void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -1539,7 +1539,7 @@ void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Texts_Load0(&*r, r__typ, T); } -void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; @@ -1755,7 +1755,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Store__39_s = _s.lnk; } -void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 61a97dda..e8735b00 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -131,7 +131,7 @@ import ADDRESS *Texts_Writer__typ; import void Texts_Append (Texts_Text T, Texts_Buffer B); import void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); -import void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); @@ -139,7 +139,7 @@ import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); import void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); -import void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_OpenBuf (Texts_Buffer B); import void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); import void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -166,7 +166,7 @@ import void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x import void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); import void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); import void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); import void *Texts__init(void); diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index f69fd90e..38c0743f 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,23 +27,23 @@ export void VT100_DECTCEMl (void); export void VT100_DSR (INT16 n); export void VT100_ED (INT16 n); export void VT100_EL (INT16 n); -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len); +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); -export void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end); +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); export void VT100_SGR (INT16 n); export void VT100_SGR2 (INT16 n, INT16 m); export void VT100_SU (INT16 n); -export void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +export void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end) { CHAR h; while (start < end) { @@ -55,7 +55,7 @@ static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) } } -void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) +void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) { CHAR b[21]; INT16 s, e; @@ -84,7 +84,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) __COPY(b, str, str__len); } -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len) { CHAR cmd[9]; __DUP(letter, letter__len, CHAR); @@ -94,7 +94,7 @@ static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -107,7 +107,7 @@ static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -120,7 +120,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) { CHAR nstr[5], mstr[5]; CHAR cmd[12]; @@ -236,7 +236,7 @@ void VT100_DECTCEMh (void) VT100_EscSeq0((CHAR*)"\?25h", 5); } -void VT100_SetAttr (CHAR *attr, LONGINT attr__len) +void VT100_SetAttr (CHAR *attr, ADDRESS attr__len) { CHAR tmpstr[16]; __DUP(attr, attr__len, CHAR); diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index d99406ec..4bbb3110 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h @@ -23,14 +23,14 @@ import void VT100_DSR (INT16 n); import void VT100_ED (INT16 n); import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); -import void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); import void VT100_SGR2 (INT16 n, INT16 m); import void VT100_SU (INT16 n); -import void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +import void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); import void *VT100__init(void); diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 37630d23..66f80319 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,13 +17,13 @@ static CHAR extTools_CFLAGS[1023]; -export void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len); -export void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len); +export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len) +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; __DUP(title, title__len, CHAR); @@ -63,7 +63,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); @@ -74,7 +74,7 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } -void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) +void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { CHAR cmd[1023]; __DUP(moduleName, moduleName__len, CHAR); @@ -86,7 +86,7 @@ void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) __DEL(moduleName); } -void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len) +void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { CHAR cmd[1023]; __DUP(additionalopts, additionalopts__len, CHAR); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 63e5df15..472c60f3 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h @@ -8,8 +8,8 @@ -import void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); +import void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +import void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); import void *extTools__init(void); diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index dc4bb660..e900905f 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 2d0061df..071d7b8e 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index b28e0caa..b1942442 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 5326fe10..bdbabe97 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -52,7 +52,7 @@ static Files_File Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { - LONGINT len[1]; + ADDRESS len[1]; CHAR data[1]; } *Files_SearchPath; @@ -62,56 +62,56 @@ export ADDRESS *Files_Rider__typ; export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); -export void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); -export void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode); +export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len); +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); static void Files_Flush (Files_Buffer buf); export void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -export void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len); -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len); +export void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len); +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len); export INT32 Files_Length (Files_File f); -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len); -export Files_File Files_New (CHAR *name, LONGINT name__len); -export Files_File Files_Old (CHAR *name, LONGINT name__len); +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len); +export Files_File Files_New (CHAR *name, ADDRESS name__len); +export Files_File Files_Old (CHAR *name, ADDRESS name__len); export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +export void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +export void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); export void Files_Register (Files_File f); -export void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len); +export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -export void Files_SetSearchPath (CHAR *path, LONGINT path__len); +export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); export void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); export void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); export void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); export void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); Out_Ln(); @@ -138,7 +138,7 @@ static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) __DEL(s); } -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len) +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { INT16 i, j; __DUP(dir, dir__len, CHAR); @@ -163,7 +163,7 @@ static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT __DEL(name); } -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len) +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { INT32 n, i, j; __DUP(finalName, finalName__len, CHAR); @@ -316,7 +316,7 @@ INT32 Files_Length (Files_File f) return f->len; } -Files_File Files_New (CHAR *name, LONGINT name__len) +Files_File Files_New (CHAR *name, ADDRESS name__len) { Files_File f = NIL; __DUP(name, name__len, CHAR); @@ -332,7 +332,7 @@ Files_File Files_New (CHAR *name, LONGINT name__len) return f; } -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) { INT16 i; CHAR ch; @@ -375,7 +375,7 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) dir[i] = 0x00; } -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len) +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -415,7 +415,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) return NIL; } -Files_File Files_Old (CHAR *name, LONGINT name__len) +Files_File Files_Old (CHAR *name, ADDRESS name__len) { Files_File f = NIL; INT32 fd; @@ -618,7 +618,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } -void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -683,7 +683,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) (*r).res = 0; } -void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -722,14 +722,14 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT (*r).res = 0; } -void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res) +void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } -void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res) +void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { INT32 fdold, fdnew, n; INT16 error, ignore; @@ -812,14 +812,14 @@ void Files_Register (Files_File f) } } -void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res) +void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res) { __DUP(path, path__len, CHAR); *res = Platform_Chdir((void*)path, path__len); __DEL(path); } -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len) +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len) { INT32 i, j; if (!Platform_LittleEndian) { @@ -877,7 +877,7 @@ void Files_ReadLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL *x) Files_FlipBytes((void*)b, 8, (void*)&*x, 8); } -void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; CHAR ch; @@ -889,7 +889,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) } while (!(ch == 0x00)); } -void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -906,7 +906,7 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) x[i] = 0x00; } -void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len) +void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) { INT8 s, b; INT64 q; @@ -972,7 +972,7 @@ void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); } -void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -991,7 +991,7 @@ void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); } -void Files_GetName (Files_File f, CHAR *name, LONGINT name__len) +void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) { __COPY(f->workName, name, name__len); } @@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o) } } -void Files_SetSearchPath (CHAR *path, LONGINT path__len) +void Files_SetSearchPath (CHAR *path, ADDRESS path__len) { __DUP(path, path__len, CHAR); if (Strings_Length(path, path__len) != 0) { diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 62df86fc..2750cbdd 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -28,41 +28,41 @@ import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); -import void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); -import void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); +import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -import void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); +import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); -import Files_File Files_New (CHAR *name, LONGINT name__len); -import Files_File Files_Old (CHAR *name, LONGINT name__len); +import Files_File Files_New (CHAR *name, ADDRESS name__len); +import Files_File Files_Old (CHAR *name, ADDRESS name__len); import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +import void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +import void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void Files_Register (Files_File f); -import void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); +import void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); import void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -import void Files_SetSearchPath (CHAR *path, LONGINT path__len); +import void Files_SetSearchPath (CHAR *path, ADDRESS path__len); import void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); import void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); import void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); import void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); import void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); import void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); import void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void *Files__init(void); diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 72677604..ba769b74 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -85,14 +85,14 @@ static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len); +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT32 q); -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len); +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT32 size); export SYSTEM_PTR Heap_NEWREC (INT32 tag); static INT32 Heap_NewChunk (INT32 blksz); @@ -101,7 +101,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT32 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len); +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -445,7 +445,7 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) +static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { INT32 i, j, x; j = l; @@ -464,7 +464,7 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, LONGINT a__len) a[i] = x; } -static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) +static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { INT32 l, r, x; l = __ASHR(n, 1); @@ -482,7 +482,7 @@ static void Heap_HeapSort (INT32 n, INT32 *a, LONGINT a__len) } } -static void Heap_MarkCandidates (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; chnk = Heap_heap; @@ -571,7 +571,7 @@ void Heap_FINALL (void) } } -static void Heap_MarkStack (INT32 n, INT32 *cand, LONGINT cand__len) +static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; INT32 inc, nofcand, sp, p, stack0; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 0aa0a18b..d200254d 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index a5e72ba3..27e4473c 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -47,21 +47,21 @@ export Modules_ModuleName Modules_imported, Modules_importing; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len); +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); -export void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_Halt (INT32 code); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -export Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); -static void Modules_errstring (CHAR *s, LONGINT s__len); +static void Modules_errstring (CHAR *s, ADDRESS s__len); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; __DUP(b, b__len, CHAR); @@ -79,7 +79,7 @@ static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) __DEL(b); } -Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) +Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { Modules_Module m = NIL; CHAR bodyname[64]; @@ -103,7 +103,7 @@ Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len) +Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) { Modules_Cmd c = NIL; __DUP(name, name__len, CHAR); @@ -130,7 +130,7 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT nam __RETCHK; } -void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all) +void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { Modules_Module m = NIL, p = NIL; __DUP(name, name__len, CHAR); @@ -168,7 +168,7 @@ static void Modules_errch (CHAR c) e = Platform_Write(1, (ADDRESS)&c, 1); } -static void Modules_errstring (CHAR *s, LONGINT s__len) +static void Modules_errstring (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 8bb89fe5..b1f2385e 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -44,10 +44,10 @@ import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; import void Modules_AssertFail (INT32 code); -import void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); import void Modules_Halt (INT32 code); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -import Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 3ef8e2f9..bc44b83a 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 0be714e8..eb93787e 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index ef4b429f..72e0feef 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,7 +56,7 @@ static void OPC_GenHeaderMsg (void); export void OPC_Halt (INT32 n); export void OPC_Ident (OPT_Object obj); static void OPC_IdentList (OPT_Object obj, INT16 vis); -static void OPC_Include (CHAR *name, LONGINT name__len); +static void OPC_Include (CHAR *name, ADDRESS name__len); static void OPC_IncludeImports (OPT_Object obj, INT16 vis); export void OPC_Increment (BOOLEAN decrement); export void OPC_Indent (INT16 count); @@ -68,11 +68,11 @@ static void OPC_InitTProcs (OPT_Object typ, OPT_Object obj); export void OPC_IntLiteral (INT64 n, INT32 size); export void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim); static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamName); -static INT16 OPC_Length (CHAR *s, LONGINT s__len); +static INT16 OPC_Length (CHAR *s, ADDRESS s__len); export BOOLEAN OPC_NeedsRetval (OPT_Object proc); export INT32 OPC_NofPtrs (OPT_Struct typ); -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len); -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len); +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len); +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len); static void OPC_ProcHeader (OPT_Object proc, BOOLEAN define); static void OPC_ProcPredefs (OPT_Object obj, INT8 vis); static void OPC_PutBase (OPT_Struct typ); @@ -80,8 +80,8 @@ static void OPC_PutPtrOffsets (OPT_Struct typ, INT32 adr, INT32 *cnt); static void OPC_RegCmds (OPT_Object obj); export void OPC_SetInclude (BOOLEAN exclude); static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause); -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x); -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l); +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x); +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l); export void OPC_TDescDecl (OPT_Struct typ); export void OPC_TypeDefs (OPT_Object obj, INT16 vis); export void OPC_TypeOf (OPT_Object ap); @@ -137,7 +137,7 @@ void OPC_EndBlk0 (void) OPM_Write('}'); } -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x) { CHAR ch; INT16 i; @@ -156,7 +156,7 @@ static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) __DEL(s); } -static INT16 OPC_Length (CHAR *s, LONGINT s__len) +static INT16 OPC_Length (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -166,7 +166,7 @@ static INT16 OPC_Length (CHAR *s, LONGINT s__len) return i; } -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len) +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len) { INT16 i, h; i = 0; @@ -364,7 +364,7 @@ static void OPC_DeclareBase (OPT_Object dcl) OPM_WriteString((CHAR*)"struct ", 8); OPC_BegBlk(); OPC_BegStat(); - OPC_Str1((CHAR*)"LONGINT len[#]", 15, nofdims); + OPC_Str1((CHAR*)"ADDRESS len[#]", 15, nofdims); OPC_EndStat(); OPC_BegStat(); __NEW(obj, OPT_ObjDesc); @@ -511,7 +511,7 @@ static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamNa typ = par->typ->BaseTyp; while (typ->comp == 3) { if (ansiDefine) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); } else { OPM_WriteString((CHAR*)", ", 3); } @@ -720,7 +720,7 @@ static void OPC_DefineType (OPT_Struct str) } } -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len) +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) { INT16 i; __DUP(y, y__len, CHAR); @@ -969,7 +969,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) OPC_EndStat(); OPC_BegStat(); base = OPT_linttyp; - OPM_WriteString((CHAR*)"LONGINT ", 9); + OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPC_EndStat(); @@ -1008,7 +1008,7 @@ static void OPC_AnsiParamList (OPT_Object obj, BOOLEAN showParamNames) __COPY(name, obj->name, 256); } if (obj->typ->comp == 3) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); OPC_LenList(obj, 1, showParamNames); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPM_WriteString((CHAR*)", ADDRESS *", 12); @@ -1062,7 +1062,7 @@ static void OPC_ProcPredefs (OPT_Object obj, INT8 vis) } } -static void OPC_Include (CHAR *name, LONGINT name__len) +static void OPC_Include (CHAR *name, ADDRESS name__len) { __DUP(name, name__len, CHAR); OPM_WriteString((CHAR*)"#include ", 10); @@ -1744,7 +1744,7 @@ static void OPC_CharacterLiteral (INT64 c) } } -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l) +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) { INT32 i; INT16 c; @@ -1912,9 +1912,9 @@ static struct InitKeywords__46 { struct InitKeywords__46 *lnk; } *InitKeywords__46_s; -static void Enter__47 (CHAR *s, LONGINT s__len); +static void Enter__47 (CHAR *s, ADDRESS s__len); -static void Enter__47 (CHAR *s, LONGINT s__len) +static void Enter__47 (CHAR *s, ADDRESS s__len) { INT16 h; __DUP(s, s__len, CHAR); diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 842e7dec..5624314d 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index e76d763e..632b78e5 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,26 +53,26 @@ export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len); +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static void OPM_LogErrMsg (INT16 n); -export void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); export void OPM_LogWLn (void); export void OPM_LogWNum (INT64 i, INT64 len); -export void OPM_LogWStr (CHAR *s, LONGINT s__len); +export void OPM_LogWStr (CHAR *s, ADDRESS s__len); export INT32 OPM_Longint (INT64 n); -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len); +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len); export void OPM_Mark (INT16 n, INT32 pos); -export void OPM_NewSym (CHAR *modName, LONGINT modName__len); -export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +export void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +export void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +export void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); export BOOLEAN OPM_OpenPar (void); export void OPM_RegisterNewSym (void); -static void OPM_ScanOptions (CHAR *s, LONGINT s__len); +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); @@ -93,8 +93,8 @@ export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); export void OPM_WriteLn (void); export void OPM_WriteReal (LONGREAL r, CHAR suffx); -export void OPM_WriteString (CHAR *s, LONGINT s__len); -export void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +export void OPM_WriteString (CHAR *s, ADDRESS s__len); +export void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); export BOOLEAN OPM_eofSF (void); export void OPM_err (INT16 n); @@ -105,7 +105,7 @@ void OPM_LogW (CHAR ch) Out_Char(ch); } -void OPM_LogWStr (CHAR *s, LONGINT s__len) +void OPM_LogWStr (CHAR *s, ADDRESS s__len) { __DUP(s, s__len, CHAR); Out_String(s, s__len); @@ -122,7 +122,7 @@ void OPM_LogWLn (void) Out_Ln(); } -void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len) +void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) { __DUP(vt100code, vt100code__len, CHAR); if ((Out_IsConsole && !__IN(16, OPM_Options, 32))) { @@ -154,7 +154,7 @@ INT16 OPM_Integer (INT64 n) return __VAL(INT16, n); } -static void OPM_ScanOptions (CHAR *s, LONGINT s__len) +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -465,7 +465,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len) +void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) { Texts_Text T = NIL; INT32 beg, end, time; @@ -514,7 +514,7 @@ void OPM_Get (CHAR *ch) } } -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len) +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len) { INT16 i, j; CHAR ch; @@ -700,7 +700,7 @@ void OPM_err (INT16 n) OPM_Mark(n, OPM_errpos); } -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len) +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len) { INT16 i; INT32 l; @@ -772,7 +772,7 @@ void OPM_CloseOldSym (void) Files_Close(Files_Base(&OPM_oldSF, Files_Rider__typ)); } -void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done) +void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; @@ -832,7 +832,7 @@ void OPM_DeleteNewSym (void) { } -void OPM_NewSym (CHAR *modName, LONGINT modName__len) +void OPM_NewSym (CHAR *modName, ADDRESS modName__len) { OPM_FileName fileName; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); @@ -851,7 +851,7 @@ void OPM_Write (CHAR ch) Files_Write(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, ch); } -void OPM_WriteString (CHAR *s, LONGINT s__len) +void OPM_WriteString (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -861,7 +861,7 @@ void OPM_WriteString (CHAR *s, LONGINT s__len) Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); } -void OPM_WriteStringVar (CHAR *s, LONGINT s__len) +void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -986,7 +986,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) } } -void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len) +void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { CHAR FName[32]; __COPY(moduleName, OPM_modName, 32); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 2d272feb..c310c421 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -28,19 +28,19 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); -import void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); import void OPM_LogWNum (INT64 i, INT64 len); -import void OPM_LogWStr (CHAR *s, LONGINT s__len); +import void OPM_LogWStr (CHAR *s, ADDRESS s__len); import INT32 OPM_Longint (INT64 n); import void OPM_Mark (INT16 n, INT32 pos); -import void OPM_NewSym (CHAR *modName, LONGINT modName__len); -import void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -import void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +import void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +import void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +import void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); @@ -61,8 +61,8 @@ import void OPM_WriteHex (INT64 i); import void OPM_WriteInt (INT64 i); import void OPM_WriteLn (void); import void OPM_WriteReal (LONGREAL r, CHAR suffx); -import void OPM_WriteString (CHAR *s, LONGINT s__len); -import void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +import void OPM_WriteString (CHAR *s, ADDRESS s__len); +import void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); import BOOLEAN OPM_eofSF (void); import void OPM_err (INT16 n); import void *OPM__init(void); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 3f360d00..02fd6337 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 5a71eb39..acb2df91 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 6ee700e5..7aedbbd6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 1f7a3e58..e49c222b 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 75820a95..1eb85a06 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -120,7 +120,7 @@ static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_FPrintErr (OPT_Object obj, INT16 errcode); -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len); +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len); export void OPT_FPrintObj (OPT_Object obj); static void OPT_FPrintSign (INT32 *fp, OPT_Struct result, OPT_Object par); export void OPT_FPrintStr (OPT_Struct typ); @@ -132,7 +132,7 @@ export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); static void OPT_InMod (INT8 *mno); -static void OPT_InName (CHAR *name, LONGINT name__len); +static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par); static void OPT_InStruct (OPT_Struct *typ); @@ -155,7 +155,7 @@ static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); static void OPT_OutMod (INT16 mno); -static void OPT_OutName (CHAR *name, LONGINT name__len); +static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); @@ -576,7 +576,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) *obj = ob1; } -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len) +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -957,7 +957,7 @@ void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old) } } -static void OPT_InName (CHAR *name, LONGINT name__len) +static void OPT_InName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -1483,7 +1483,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) } } -static void OPT_OutName (CHAR *name, LONGINT name__len) +static void OPT_OutName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 90fcacf5..9d34cea9 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 5c21cb97..f6d42592 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index c4a61586..0f1980ac 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 720267fd..de9a7701 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,16 +17,16 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Int (INT64 x, INT64 n); -static INT32 Out_Length (CHAR *s, LONGINT s__len); +static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); export void Out_LongReal (LONGREAL x, INT16 n); export void Out_Open (void); export void Out_Real (REAL x, INT16 n); static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_); -export void Out_String (CHAR *str, LONGINT str__len); +export void Out_String (CHAR *str, ADDRESS str__len); export LONGREAL Out_Ten (INT16 e); -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i); -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i); +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) @@ -55,7 +55,7 @@ void Out_Char (CHAR ch) } } -static INT32 Out_Length (CHAR *s, LONGINT s__len) +static INT32 Out_Length (CHAR *s, ADDRESS s__len) { INT32 l; l = 0; @@ -65,7 +65,7 @@ static INT32 Out_Length (CHAR *s, LONGINT s__len) return l; } -void Out_String (CHAR *str, LONGINT str__len) +void Out_String (CHAR *str, ADDRESS str__len) { INT32 l; INT16 error; @@ -125,13 +125,13 @@ void Out_Ln (void) Out_Flush(); } -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); } -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) { INT16 j; INT32 l; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0e66420d..d58a17d5 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -16,7 +16,7 @@ import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); import void Out_Open (void); import void Out_Real (REAL x, INT16 n); -import void Out_String (CHAR *str, LONGINT str__len); +import void Out_String (CHAR *str, ADDRESS str__len); import LONGREAL Out_Ten (INT16 e); import void *Out__init(void); diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 5a57f076..2d035abe 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -48,8 +48,8 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -export INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); export void Platform_Delay (INT32 ms); @@ -57,27 +57,27 @@ export BOOLEAN Platform_DifferentFilesystems (INT16 e); static void Platform_EnableVT100 (void); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); -export void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -export INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -export INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); export void Platform_OSFree (INT32 address); -export INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -export INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +export INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +export INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); export INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -export INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +export INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +export INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); export INT16 Platform_Seek (INT32 h, INT32 o, INT16 r); @@ -85,16 +85,16 @@ export void Platform_SetBadInstructionHandler (Platform_SignalHandler handler); export void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__typ, Platform_FileIdentity source); export INT16 Platform_Size (INT32 h, INT32 *l); export INT16 Platform_Sync (INT32 h); -export INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +export INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); static void Platform_TestLittleEndian (void); export INT32 Platform_Time (void); export BOOLEAN Platform_TimedOut (INT16 e); export BOOLEAN Platform_TooManyFiles (INT16 e); export INT16 Platform_Truncate (INT32 h, INT32 limit); -export INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +export INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); export INT16 Platform_Write (INT32 h, INT32 p, INT32 l); static void Platform_YMDHMStoClock (INT16 ye, INT16 mo, INT16 da, INT16 ho, INT16 mi, INT16 se, INT32 *t, INT32 *d); -export BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); #include "WindowsWrapper.h" #define Platform_ECONNABORTED() WSAECONNABORTED @@ -239,7 +239,7 @@ void Platform_Init (INT32 argc, INT32 argvadr) Platform_HeapInitHeap(); } -BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { CHAR buf[4096]; INT16 res; @@ -256,7 +256,7 @@ BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__le __RETCHK; } -void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { __DUP(var, var__len, CHAR); if (!Platform_getEnv(var, var__len, (void*)val, val__len)) { @@ -265,7 +265,7 @@ void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len) +void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { Platform_ArgVec av = NIL; if (n < Platform_ArgCount) { @@ -300,7 +300,7 @@ void Platform_GetIntArg (INT16 n, INT32 *val) } } -INT16 Platform_ArgPos (CHAR *s, LONGINT s__len) +INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) { INT16 i; CHAR arg[256]; @@ -359,7 +359,7 @@ void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec) *usec = Platform_uluSec(); } -INT16 Platform_System (CHAR *cmd, LONGINT cmd__len) +INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len) { INT16 result; __DUP(cmd, cmd__len, CHAR); @@ -381,7 +381,7 @@ INT16 Platform_Error (void) return Platform_err(); } -INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h) { INT32 fd; fd = Platform_openro(n, n__len); @@ -394,7 +394,7 @@ INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h) { INT32 fd; fd = Platform_openrw(n, n__len); @@ -407,7 +407,7 @@ INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h) __RETCHK; } -INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h) +INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h) { INT32 fd; fd = Platform_opennew(n, n__len); @@ -444,7 +444,7 @@ INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *iden return 0; } -INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) +INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) { INT32 h; INT16 e, i; @@ -508,7 +508,7 @@ INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n) __RETCHK; } -INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n) +INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n) { INT16 result; INT32 lengthread; @@ -580,7 +580,7 @@ INT16 Platform_Truncate (INT32 h, INT32 limit) return 0; } -INT16 Platform_Unlink (CHAR *n, LONGINT n__len) +INT16 Platform_Unlink (CHAR *n, ADDRESS n__len) { if (Platform_deleteFile(n, n__len) == 0) { return Platform_err(); @@ -590,7 +590,7 @@ INT16 Platform_Unlink (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Chdir (CHAR *n, LONGINT n__len) +INT16 Platform_Chdir (CHAR *n, ADDRESS n__len) { INT16 r; r = Platform_setCurrentDirectory(n, n__len); @@ -601,7 +601,7 @@ INT16 Platform_Chdir (CHAR *n, LONGINT n__len) return 0; } -INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len) +INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len) { if (Platform_moveFile(o, o__len, n, n__len) == 0) { return Platform_err(); diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index f62a8ab8..3f6520f3 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -29,35 +29,35 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -import INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); -import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -import INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -import INT16 Platform_New (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); import void Platform_OSFree (INT32 address); -import INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT32 *h); -import INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT32 *h); +import INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT32 *h); +import INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT32 *h); import INT16 Platform_Read (INT32 h, INT32 p, INT32 l, INT32 *n); -import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -import INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +import INT16 Platform_ReadBuf (INT32 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +import INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); import INT16 Platform_Seek (INT32 h, INT32 o, INT16 r); @@ -65,14 +65,14 @@ import void Platform_SetBadInstructionHandler (Platform_SignalHandler handler); import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__typ, Platform_FileIdentity source); import INT16 Platform_Size (INT32 h, INT32 *l); import INT16 Platform_Sync (INT32 h); -import INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +import INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); import INT32 Platform_Time (void); import BOOLEAN Platform_TimedOut (INT16 e); import BOOLEAN Platform_TooManyFiles (INT16 e); import INT16 Platform_Truncate (INT32 h, INT32 limit); -import INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +import INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); import INT16 Platform_Write (INT32 h, INT32 p, INT32 l); -import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void *Platform__init(void); #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index cd4c3c61..be3ad909 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,11 +10,11 @@ -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); -export void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len); +export void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +export void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); export INT16 Reals_Expo (REAL x); export INT16 Reals_ExpoL (LONGREAL x); export void Reals_SetExpo (REAL *x, INT16 ex); @@ -79,7 +79,7 @@ INT16 Reals_ExpoL (LONGREAL x) return __MASK(__ASHR(i, 4), -2048); } -void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) { INT32 i, j, k; if (x < (LONGREAL)0) { @@ -107,7 +107,7 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) } } -void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) { Reals_ConvertL(x, n, (void*)d, d__len); } @@ -122,7 +122,7 @@ static CHAR Reals_ToHex (INT16 i) __RETCHK; } -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len) { INT16 i; INT32 l; @@ -137,12 +137,12 @@ static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LO } } -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&y, 4, (void*)d, d__len * 1); } -void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&x, 8, (void*)d, d__len * 1); } diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index f0c84ab1..e8d15a2f 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h @@ -8,10 +8,10 @@ -import void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +import void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +import void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); import INT16 Reals_Expo (REAL x); import INT16 Reals_ExpoL (LONGREAL x); import void Reals_SetExpo (REAL *x, INT16 ex); diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index b5707327..fd550df3 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,18 +10,18 @@ -export void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -export void Strings_Cap (CHAR *s, LONGINT s__len); -export void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -export void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -export void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -export INT16 Strings_Length (CHAR *s, LONGINT s__len); -export BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -export INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -export void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +export void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +export void Strings_Cap (CHAR *s, ADDRESS s__len); +export void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +export void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +export void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export INT16 Strings_Length (CHAR *s, ADDRESS s__len); +export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); -INT16 Strings_Length (CHAR *s, LONGINT s__len) +INT16 Strings_Length (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); @@ -39,7 +39,7 @@ INT16 Strings_Length (CHAR *s, LONGINT s__len) __RETCHK; } -void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len) +void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(extra, extra__len, CHAR); @@ -56,7 +56,7 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__ __DEL(extra); } -void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(source, source__len, CHAR); @@ -87,7 +87,7 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, L __DEL(source); } -void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) +void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n) { INT16 len, i; len = Strings_Length(s, s__len); @@ -110,7 +110,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) } } -void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { __DUP(source, source__len, CHAR); Strings_Delete((void*)dest, dest__len, pos, pos + Strings_Length(source, source__len)); @@ -118,7 +118,7 @@ void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, __DEL(source); } -void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len) +void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len) { INT16 len, destLen, i; __DUP(source, source__len, CHAR); @@ -143,7 +143,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHA __DEL(source); } -INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos) +INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos) { INT16 n1, n2, i, j; __DUP(pattern, pattern__len, CHAR); @@ -175,7 +175,7 @@ INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, return -1; } -void Strings_Cap (CHAR *s, LONGINT s__len) +void Strings_Cap (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -191,9 +191,9 @@ static struct Match__7 { struct Match__7 *lnk; } *Match__7_s; -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m); +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m); -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m) +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m) { while ((((n >= 0 && m >= 0)) && mask[__X(m, mask__len)] != '*')) { if (name[__X(n, name__len)] != mask[__X(m, mask__len)]) { @@ -220,7 +220,7 @@ static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__le return 0; } -BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len) +BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len) { struct Match__7 _s; BOOLEAN __retval; diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index c987af8d..76cb022d 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -8,15 +8,15 @@ -import void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -import void Strings_Cap (CHAR *s, LONGINT s__len); -import void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -import void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -import void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -import INT16 Strings_Length (CHAR *s, LONGINT s__len); -import BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -import INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -import void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +import void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +import void Strings_Cap (CHAR *s, ADDRESS s__len); +import void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +import void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +import void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import INT16 Strings_Length (CHAR *s, ADDRESS s__len); +import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); import void *Strings__init(void); diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index ad26b1cb..1428c051 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -187,20 +187,20 @@ export void Texts_Append (Texts_Text T, Texts_Buffer B); export void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); static Texts_Elem Texts_CloneElem (Texts_Elem e); static Texts_Piece Texts_ClonePiece (Texts_Piece p); -export void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len); +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len); static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__typ); export void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); export void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Merge (Texts_Text T, Texts_Run u, Texts_Run *v); -export void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_OpenBuf (Texts_Buffer B); export void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); export void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -229,10 +229,10 @@ export void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x export void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); export void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len) +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; __NEW(F, Texts_FontDesc); @@ -1027,7 +1027,7 @@ void Texts_WriteLn (Texts_Writer *W, ADDRESS *W__typ) Texts_Write(&*W, W__typ, 0x0d); } -void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len) +void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -1539,7 +1539,7 @@ void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Texts_Load0(&*r, r__typ, T); } -void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; @@ -1755,7 +1755,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Store__39_s = _s.lnk; } -void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index e2c03958..fa28aa92 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -131,7 +131,7 @@ import ADDRESS *Texts_Writer__typ; import void Texts_Append (Texts_Text T, Texts_Buffer B); import void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); -import void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); @@ -139,7 +139,7 @@ import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); import void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); -import void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_OpenBuf (Texts_Buffer B); import void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); import void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -166,7 +166,7 @@ import void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x import void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); import void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); import void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); import void *Texts__init(void); diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index f69fd90e..38c0743f 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,23 +27,23 @@ export void VT100_DECTCEMl (void); export void VT100_DSR (INT16 n); export void VT100_ED (INT16 n); export void VT100_EL (INT16 n); -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len); +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); -export void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end); +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); export void VT100_SGR (INT16 n); export void VT100_SGR2 (INT16 n, INT16 m); export void VT100_SU (INT16 n); -export void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +export void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end) { CHAR h; while (start < end) { @@ -55,7 +55,7 @@ static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) } } -void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) +void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) { CHAR b[21]; INT16 s, e; @@ -84,7 +84,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) __COPY(b, str, str__len); } -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len) { CHAR cmd[9]; __DUP(letter, letter__len, CHAR); @@ -94,7 +94,7 @@ static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -107,7 +107,7 @@ static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -120,7 +120,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) { CHAR nstr[5], mstr[5]; CHAR cmd[12]; @@ -236,7 +236,7 @@ void VT100_DECTCEMh (void) VT100_EscSeq0((CHAR*)"\?25h", 5); } -void VT100_SetAttr (CHAR *attr, LONGINT attr__len) +void VT100_SetAttr (CHAR *attr, ADDRESS attr__len) { CHAR tmpstr[16]; __DUP(attr, attr__len, CHAR); diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index d99406ec..4bbb3110 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h @@ -23,14 +23,14 @@ import void VT100_DSR (INT16 n); import void VT100_ED (INT16 n); import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); -import void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); import void VT100_SGR2 (INT16 n, INT16 m); import void VT100_SU (INT16 n); -import void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +import void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); import void *VT100__init(void); diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 37630d23..66f80319 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,13 +17,13 @@ static CHAR extTools_CFLAGS[1023]; -export void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len); -export void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len); +export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len) +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; __DUP(title, title__len, CHAR); @@ -63,7 +63,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); @@ -74,7 +74,7 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } -void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) +void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { CHAR cmd[1023]; __DUP(moduleName, moduleName__len, CHAR); @@ -86,7 +86,7 @@ void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) __DEL(moduleName); } -void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len) +void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { CHAR cmd[1023]; __DUP(additionalopts, additionalopts__len, CHAR); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 63e5df15..472c60f3 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h @@ -8,8 +8,8 @@ -import void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); +import void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +import void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); import void *extTools__init(void); diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index dc4bb660..e900905f 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 2d0061df..071d7b8e 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index b28e0caa..b1942442 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index c3ea44cf..fce3936a 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,7 +53,7 @@ static Files_File Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { - LONGINT len[1]; + ADDRESS len[1]; CHAR data[1]; } *Files_SearchPath; @@ -63,56 +63,56 @@ export ADDRESS *Files_Rider__typ; export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); -export void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); -export void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode); +export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len); +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); static void Files_Flush (Files_Buffer buf); export void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -export void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len); -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len); +export void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len); +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len); export INT32 Files_Length (Files_File f); -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len); -export Files_File Files_New (CHAR *name, LONGINT name__len); -export Files_File Files_Old (CHAR *name, LONGINT name__len); +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len); +export Files_File Files_New (CHAR *name, ADDRESS name__len); +export Files_File Files_Old (CHAR *name, ADDRESS name__len); export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +export void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +export void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); export void Files_Register (Files_File f); -export void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len); +export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -export void Files_SetSearchPath (CHAR *path, LONGINT path__len); +export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); export void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); export void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); export void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); export void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x -static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) +static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); Out_Ln(); @@ -139,7 +139,7 @@ static void Files_Err (CHAR *s, LONGINT s__len, Files_File f, INT16 errcode) __DEL(s); } -static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT name__len, CHAR *dest, LONGINT dest__len) +static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { INT16 i, j; __DUP(dir, dir__len, CHAR); @@ -164,7 +164,7 @@ static void Files_MakeFileName (CHAR *dir, LONGINT dir__len, CHAR *name, LONGINT __DEL(name); } -static void Files_GetTempName (CHAR *finalName, LONGINT finalName__len, CHAR *name, LONGINT name__len) +static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { INT32 n, i, j; __DUP(finalName, finalName__len, CHAR); @@ -317,7 +317,7 @@ INT32 Files_Length (Files_File f) return f->len; } -Files_File Files_New (CHAR *name, LONGINT name__len) +Files_File Files_New (CHAR *name, ADDRESS name__len) { Files_File f = NIL; __DUP(name, name__len, CHAR); @@ -333,7 +333,7 @@ Files_File Files_New (CHAR *name, LONGINT name__len) return f; } -static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) +static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) { INT16 i; CHAR ch; @@ -376,7 +376,7 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, LONGINT dir__len) dir[i] = 0x00; } -static BOOLEAN Files_HasDir (CHAR *name, LONGINT name__len) +static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -416,7 +416,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) return NIL; } -Files_File Files_Old (CHAR *name, LONGINT name__len) +Files_File Files_Old (CHAR *name, ADDRESS name__len) { Files_File f = NIL; INT64 fd; @@ -619,7 +619,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } -void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -684,7 +684,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) (*r).res = 0; } -void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n) +void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; Files_Buffer buf = NIL; @@ -723,14 +723,14 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT (*r).res = 0; } -void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res) +void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } -void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res) +void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { INT64 fdold, fdnew; INT32 n; @@ -814,14 +814,14 @@ void Files_Register (Files_File f) } } -void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res) +void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res) { __DUP(path, path__len, CHAR); *res = Platform_Chdir((void*)path, path__len); __DEL(path); } -static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *dest, LONGINT dest__len) +static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len) { INT32 i, j; if (!Platform_LittleEndian) { @@ -879,7 +879,7 @@ void Files_ReadLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL *x) Files_FlipBytes((void*)b, 8, (void*)&*x, 8); } -void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; CHAR ch; @@ -891,7 +891,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) } while (!(ch == 0x00)); } -void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -908,7 +908,7 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) x[i] = 0x00; } -void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len) +void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) { INT8 s, b; INT64 q; @@ -974,7 +974,7 @@ void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x) Files_WriteBytes(&*R, R__typ, (void*)b, 8, 8); } -void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len) +void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) { INT16 i; i = 0; @@ -993,7 +993,7 @@ void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); } -void Files_GetName (Files_File f, CHAR *name, LONGINT name__len) +void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) { __COPY(f->workName, name, name__len); } @@ -1011,7 +1011,7 @@ static void Files_Finalize (SYSTEM_PTR o) } } -void Files_SetSearchPath (CHAR *path, LONGINT path__len) +void Files_SetSearchPath (CHAR *path, ADDRESS path__len) { __DUP(path, path__len, CHAR); if (Strings_Length(path, path__len) != 0) { diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 5c402312..7459e85e 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -29,41 +29,41 @@ import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); -import void Files_ChangeDirectory (CHAR *path, LONGINT path__len, INT16 *res); +import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); -import void Files_Delete (CHAR *name, LONGINT name__len, INT16 *res); +import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); -import void Files_GetName (Files_File f, CHAR *name, LONGINT name__len); +import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); -import Files_File Files_New (CHAR *name, LONGINT name__len); -import Files_File Files_Old (CHAR *name, LONGINT name__len); +import Files_File Files_New (CHAR *name, ADDRESS name__len); +import Files_File Files_Old (CHAR *name, ADDRESS name__len); import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); -import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); 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_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_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, LONGINT x__len); +import void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); +import void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len); 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_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void Files_Register (Files_File f); -import void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, INT16 *res); +import void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res); import void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); -import void Files_SetSearchPath (CHAR *path, LONGINT path__len); +import void Files_SetSearchPath (CHAR *path, ADDRESS path__len); import void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); import void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); -import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, LONGINT x__len, INT32 n); +import void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x); import void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x); import void Files_WriteLReal (Files_Rider *R, ADDRESS *R__typ, LONGREAL x); import void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x); import void Files_WriteReal (Files_Rider *R, ADDRESS *R__typ, REAL x); import void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); -import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, LONGINT x__len); +import void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); import void *Files__init(void); diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index a2bb8f2f..032e9544 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -85,14 +85,14 @@ static void Heap_ExtendHeap (INT64 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len); +static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT64 q); -static void Heap_MarkCandidates (INT64 n, INT64 *cand, LONGINT cand__len); +static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); -static void Heap_MarkStack (INT64 n, INT64 *cand, LONGINT cand__len); +static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT64 size); export SYSTEM_PTR Heap_NEWREC (INT64 tag); static INT64 Heap_NewChunk (INT64 blksz); @@ -101,7 +101,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT64 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len); +static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -445,7 +445,7 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len) +static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) { INT64 i, j, x; j = l; @@ -464,7 +464,7 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, LONGINT a__len) a[i] = x; } -static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len) +static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) { INT64 l, r, x; l = __ASHR(n, 1); @@ -482,7 +482,7 @@ static void Heap_HeapSort (INT64 n, INT64 *a, LONGINT a__len) } } -static void Heap_MarkCandidates (INT64 n, INT64 *cand, LONGINT cand__len) +static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) { INT64 chnk, adr, tag, next, lim, lim1, i, ptr, size; chnk = Heap_heap; @@ -571,7 +571,7 @@ void Heap_FINALL (void) } } -static void Heap_MarkStack (INT64 n, INT64 *cand, LONGINT cand__len) +static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; INT64 inc, nofcand, sp, p, stack0; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 163cad8c..bf12c17b 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 4e4d62e7..12ee85c4 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -47,21 +47,21 @@ export Modules_ModuleName Modules_imported, Modules_importing; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len); +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); -export void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_Halt (INT32 code); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -export Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); -static void Modules_errstring (CHAR *s, LONGINT s__len); +static void Modules_errstring (CHAR *s, ADDRESS s__len); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) +static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; __DUP(b, b__len, CHAR); @@ -79,7 +79,7 @@ static void Modules_Append (CHAR *a, LONGINT a__len, CHAR *b, LONGINT b__len) __DEL(b); } -Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) +Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { Modules_Module m = NIL; CHAR bodyname[64]; @@ -103,7 +103,7 @@ Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len) +Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) { Modules_Cmd c = NIL; __DUP(name, name__len, CHAR); @@ -130,7 +130,7 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT nam __RETCHK; } -void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all) +void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { Modules_Module m = NIL, p = NIL; __DUP(name, name__len, CHAR); @@ -168,7 +168,7 @@ static void Modules_errch (CHAR c) e = Platform_Write(1, (ADDRESS)&c, 1); } -static void Modules_errstring (CHAR *s, LONGINT s__len) +static void Modules_errstring (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 8bb89fe5..b1f2385e 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -44,10 +44,10 @@ import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; import void Modules_AssertFail (INT32 code); -import void Modules_Free (CHAR *name, LONGINT name__len, BOOLEAN all); +import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); import void Modules_Halt (INT32 code); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, LONGINT name__len); -import Modules_Module Modules_ThisMod (CHAR *name, LONGINT name__len); +import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); +import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 3ef8e2f9..bc44b83a 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 0be714e8..eb93787e 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index ef4b429f..72e0feef 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,7 +56,7 @@ static void OPC_GenHeaderMsg (void); export void OPC_Halt (INT32 n); export void OPC_Ident (OPT_Object obj); static void OPC_IdentList (OPT_Object obj, INT16 vis); -static void OPC_Include (CHAR *name, LONGINT name__len); +static void OPC_Include (CHAR *name, ADDRESS name__len); static void OPC_IncludeImports (OPT_Object obj, INT16 vis); export void OPC_Increment (BOOLEAN decrement); export void OPC_Indent (INT16 count); @@ -68,11 +68,11 @@ static void OPC_InitTProcs (OPT_Object typ, OPT_Object obj); export void OPC_IntLiteral (INT64 n, INT32 size); export void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim); static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamName); -static INT16 OPC_Length (CHAR *s, LONGINT s__len); +static INT16 OPC_Length (CHAR *s, ADDRESS s__len); export BOOLEAN OPC_NeedsRetval (OPT_Object proc); export INT32 OPC_NofPtrs (OPT_Struct typ); -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len); -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len); +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len); +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len); static void OPC_ProcHeader (OPT_Object proc, BOOLEAN define); static void OPC_ProcPredefs (OPT_Object obj, INT8 vis); static void OPC_PutBase (OPT_Struct typ); @@ -80,8 +80,8 @@ static void OPC_PutPtrOffsets (OPT_Struct typ, INT32 adr, INT32 *cnt); static void OPC_RegCmds (OPT_Object obj); export void OPC_SetInclude (BOOLEAN exclude); static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause); -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x); -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l); +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x); +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l); export void OPC_TDescDecl (OPT_Struct typ); export void OPC_TypeDefs (OPT_Object obj, INT16 vis); export void OPC_TypeOf (OPT_Object ap); @@ -137,7 +137,7 @@ void OPC_EndBlk0 (void) OPM_Write('}'); } -static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) +static void OPC_Str1 (CHAR *s, ADDRESS s__len, INT32 x) { CHAR ch; INT16 i; @@ -156,7 +156,7 @@ static void OPC_Str1 (CHAR *s, LONGINT s__len, INT32 x) __DEL(s); } -static INT16 OPC_Length (CHAR *s, LONGINT s__len) +static INT16 OPC_Length (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -166,7 +166,7 @@ static INT16 OPC_Length (CHAR *s, LONGINT s__len) return i; } -static INT16 OPC_PerfectHash (CHAR *s, LONGINT s__len) +static INT16 OPC_PerfectHash (CHAR *s, ADDRESS s__len) { INT16 i, h; i = 0; @@ -364,7 +364,7 @@ static void OPC_DeclareBase (OPT_Object dcl) OPM_WriteString((CHAR*)"struct ", 8); OPC_BegBlk(); OPC_BegStat(); - OPC_Str1((CHAR*)"LONGINT len[#]", 15, nofdims); + OPC_Str1((CHAR*)"ADDRESS len[#]", 15, nofdims); OPC_EndStat(); OPC_BegStat(); __NEW(obj, OPT_ObjDesc); @@ -511,7 +511,7 @@ static void OPC_LenList (OPT_Object par, BOOLEAN ansiDefine, BOOLEAN showParamNa typ = par->typ->BaseTyp; while (typ->comp == 3) { if (ansiDefine) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); } else { OPM_WriteString((CHAR*)", ", 3); } @@ -720,7 +720,7 @@ static void OPC_DefineType (OPT_Struct str) } } -static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, LONGINT y__len) +static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) { INT16 i; __DUP(y, y__len, CHAR); @@ -969,7 +969,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) OPC_EndStat(); OPC_BegStat(); base = OPT_linttyp; - OPM_WriteString((CHAR*)"LONGINT ", 9); + OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPC_EndStat(); @@ -1008,7 +1008,7 @@ static void OPC_AnsiParamList (OPT_Object obj, BOOLEAN showParamNames) __COPY(name, obj->name, 256); } if (obj->typ->comp == 3) { - OPM_WriteString((CHAR*)", LONGINT ", 11); + OPM_WriteString((CHAR*)", ADDRESS ", 11); OPC_LenList(obj, 1, showParamNames); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { OPM_WriteString((CHAR*)", ADDRESS *", 12); @@ -1062,7 +1062,7 @@ static void OPC_ProcPredefs (OPT_Object obj, INT8 vis) } } -static void OPC_Include (CHAR *name, LONGINT name__len) +static void OPC_Include (CHAR *name, ADDRESS name__len) { __DUP(name, name__len, CHAR); OPM_WriteString((CHAR*)"#include ", 10); @@ -1744,7 +1744,7 @@ static void OPC_CharacterLiteral (INT64 c) } } -static void OPC_StringLiteral (CHAR *s, LONGINT s__len, INT32 l) +static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) { INT32 i; INT16 c; @@ -1912,9 +1912,9 @@ static struct InitKeywords__46 { struct InitKeywords__46 *lnk; } *InitKeywords__46_s; -static void Enter__47 (CHAR *s, LONGINT s__len); +static void Enter__47 (CHAR *s, ADDRESS s__len); -static void Enter__47 (CHAR *s, LONGINT s__len) +static void Enter__47 (CHAR *s, ADDRESS s__len) { INT16 h; __DUP(s, s__len, CHAR); diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 842e7dec..5624314d 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 60ab38c7..b2fd5536 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -53,26 +53,26 @@ export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len); +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static void OPM_LogErrMsg (INT16 n); -export void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); export void OPM_LogWLn (void); export void OPM_LogWNum (INT64 i, INT64 len); -export void OPM_LogWStr (CHAR *s, LONGINT s__len); +export void OPM_LogWStr (CHAR *s, ADDRESS s__len); export INT32 OPM_Longint (INT64 n); -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len); +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len); export void OPM_Mark (INT16 n, INT32 pos); -export void OPM_NewSym (CHAR *modName, LONGINT modName__len); -export void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -export void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +export void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +export void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +export void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); export BOOLEAN OPM_OpenPar (void); export void OPM_RegisterNewSym (void); -static void OPM_ScanOptions (CHAR *s, LONGINT s__len); +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); @@ -93,8 +93,8 @@ export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); export void OPM_WriteLn (void); export void OPM_WriteReal (LONGREAL r, CHAR suffx); -export void OPM_WriteString (CHAR *s, LONGINT s__len); -export void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +export void OPM_WriteString (CHAR *s, ADDRESS s__len); +export void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); export BOOLEAN OPM_eofSF (void); export void OPM_err (INT16 n); @@ -105,7 +105,7 @@ void OPM_LogW (CHAR ch) Out_Char(ch); } -void OPM_LogWStr (CHAR *s, LONGINT s__len) +void OPM_LogWStr (CHAR *s, ADDRESS s__len) { __DUP(s, s__len, CHAR); Out_String(s, s__len); @@ -122,7 +122,7 @@ void OPM_LogWLn (void) Out_Ln(); } -void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len) +void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) { __DUP(vt100code, vt100code__len, CHAR); if ((Out_IsConsole && !__IN(16, OPM_Options, 32))) { @@ -154,7 +154,7 @@ INT16 OPM_Integer (INT64 n) return __VAL(INT16, n); } -static void OPM_ScanOptions (CHAR *s, LONGINT s__len) +static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -465,7 +465,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len) +void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) { Texts_Text T = NIL; INT32 beg, end, time; @@ -514,7 +514,7 @@ void OPM_Get (CHAR *ch) } } -static void OPM_MakeFileName (CHAR *name, LONGINT name__len, CHAR *FName, LONGINT FName__len, CHAR *ext, LONGINT ext__len) +static void OPM_MakeFileName (CHAR *name, ADDRESS name__len, CHAR *FName, ADDRESS FName__len, CHAR *ext, ADDRESS ext__len) { INT16 i, j; CHAR ch; @@ -700,7 +700,7 @@ void OPM_err (INT16 n) OPM_Mark(n, OPM_errpos); } -static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, LONGINT bytes__len) +static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len) { INT16 i; INT32 l; @@ -772,7 +772,7 @@ void OPM_CloseOldSym (void) Files_Close(Files_Base(&OPM_oldSF, Files_Rider__typ)); } -void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done) +void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; @@ -832,7 +832,7 @@ void OPM_DeleteNewSym (void) { } -void OPM_NewSym (CHAR *modName, LONGINT modName__len) +void OPM_NewSym (CHAR *modName, ADDRESS modName__len) { OPM_FileName fileName; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); @@ -851,7 +851,7 @@ void OPM_Write (CHAR ch) Files_Write(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, ch); } -void OPM_WriteString (CHAR *s, LONGINT s__len) +void OPM_WriteString (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -861,7 +861,7 @@ void OPM_WriteString (CHAR *s, LONGINT s__len) Files_WriteBytes(&OPM_R[__X(OPM_currFile, 3)], Files_Rider__typ, (void*)s, s__len * 1, i); } -void OPM_WriteStringVar (CHAR *s, LONGINT s__len) +void OPM_WriteStringVar (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -986,7 +986,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) } } -void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len) +void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { CHAR FName[32]; __COPY(moduleName, OPM_modName, 32); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 2d272feb..c310c421 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -28,19 +28,19 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, LONGINT mname__len); +import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); -import void OPM_LogVT100 (CHAR *vt100code, LONGINT vt100code__len); +import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); import void OPM_LogWNum (INT64 i, INT64 len); -import void OPM_LogWStr (CHAR *s, LONGINT s__len); +import void OPM_LogWStr (CHAR *s, ADDRESS s__len); import INT32 OPM_Longint (INT64 n); import void OPM_Mark (INT16 n, INT32 pos); -import void OPM_NewSym (CHAR *modName, LONGINT modName__len); -import void OPM_OldSym (CHAR *modName, LONGINT modName__len, BOOLEAN *done); -import void OPM_OpenFiles (CHAR *moduleName, LONGINT moduleName__len); +import void OPM_NewSym (CHAR *modName, ADDRESS modName__len); +import void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done); +import void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len); import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); @@ -61,8 +61,8 @@ import void OPM_WriteHex (INT64 i); import void OPM_WriteInt (INT64 i); import void OPM_WriteLn (void); import void OPM_WriteReal (LONGREAL r, CHAR suffx); -import void OPM_WriteString (CHAR *s, LONGINT s__len); -import void OPM_WriteStringVar (CHAR *s, LONGINT s__len); +import void OPM_WriteString (CHAR *s, ADDRESS s__len); +import void OPM_WriteStringVar (CHAR *s, ADDRESS s__len); import BOOLEAN OPM_eofSF (void); import void OPM_err (INT16 n); import void *OPM__init(void); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index df908a43..e6b89be2 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 5a71eb39..acb2df91 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 6ee700e5..7aedbbd6 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 1f7a3e58..e49c222b 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index a8d42b40..4a900e78 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -120,7 +120,7 @@ static void OPT_EnterTyp (OPS_Name name, INT8 form, INT16 size, OPT_Struct *res) static void OPT_EnterTypeAlias (OPS_Name name, OPT_Object *res); export void OPT_Export (BOOLEAN *ext, BOOLEAN *new); export void OPT_FPrintErr (OPT_Object obj, INT16 errcode); -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len); +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len); export void OPT_FPrintObj (OPT_Object obj); static void OPT_FPrintSign (INT32 *fp, OPT_Struct result, OPT_Object par); export void OPT_FPrintStr (OPT_Struct typ); @@ -132,7 +132,7 @@ export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); static void OPT_InMod (INT8 *mno); -static void OPT_InName (CHAR *name, LONGINT name__len); +static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par); static void OPT_InStruct (OPT_Struct *typ); @@ -155,7 +155,7 @@ static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); static void OPT_OutMod (INT16 mno); -static void OPT_OutName (CHAR *name, LONGINT name__len); +static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); @@ -576,7 +576,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) *obj = ob1; } -static void OPT_FPrintName (INT32 *fp, CHAR *name, LONGINT name__len) +static void OPT_FPrintName (INT32 *fp, CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -957,7 +957,7 @@ void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old) } } -static void OPT_InName (CHAR *name, LONGINT name__len) +static void OPT_InName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; @@ -1483,7 +1483,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) } } -static void OPT_OutName (CHAR *name, LONGINT name__len) +static void OPT_OutName (CHAR *name, ADDRESS name__len) { INT16 i; CHAR ch; diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 90fcacf5..9d34cea9 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 4bd6b3fb..1b610f35 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index c4a61586..0f1980ac 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 720267fd..de9a7701 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,16 +17,16 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Int (INT64 x, INT64 n); -static INT32 Out_Length (CHAR *s, LONGINT s__len); +static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); export void Out_LongReal (LONGREAL x, INT16 n); export void Out_Open (void); export void Out_Real (REAL x, INT16 n); static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_); -export void Out_String (CHAR *str, LONGINT str__len); +export void Out_String (CHAR *str, ADDRESS str__len); export LONGREAL Out_Ten (INT16 e); -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i); -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i); +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) @@ -55,7 +55,7 @@ void Out_Char (CHAR ch) } } -static INT32 Out_Length (CHAR *s, LONGINT s__len) +static INT32 Out_Length (CHAR *s, ADDRESS s__len) { INT32 l; l = 0; @@ -65,7 +65,7 @@ static INT32 Out_Length (CHAR *s, LONGINT s__len) return l; } -void Out_String (CHAR *str, LONGINT str__len) +void Out_String (CHAR *str, ADDRESS str__len) { INT32 l; INT16 error; @@ -125,13 +125,13 @@ void Out_Ln (void) Out_Flush(); } -static void Out_digit (INT64 n, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); } -static void Out_prepend (CHAR *t, LONGINT t__len, CHAR *s, LONGINT s__len, INT16 *i) +static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) { INT16 j; INT32 l; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0e66420d..d58a17d5 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -16,7 +16,7 @@ import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); import void Out_Open (void); import void Out_Real (REAL x, INT16 n); -import void Out_String (CHAR *str, LONGINT str__len); +import void Out_String (CHAR *str, ADDRESS str__len); import LONGREAL Out_Ten (INT16 e); import void *Out__init(void); diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 1e93deb2..9aa7ae12 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -48,8 +48,8 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -export INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT64 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); export void Platform_Delay (INT32 ms); @@ -57,27 +57,27 @@ export BOOLEAN Platform_DifferentFilesystems (INT16 e); static void Platform_EnableVT100 (void); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); -export void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -export INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); export void Platform_Init (INT32 argc, INT64 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT64 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -export INT16 Platform_New (CHAR *n, LONGINT n__len, INT64 *h); +export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT64 Platform_OSAllocate (INT64 size); export void Platform_OSFree (INT64 address); -export INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT64 *h); -export INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT64 *h); +export INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT64 *h); +export INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT64 *h); export INT16 Platform_Read (INT64 h, INT64 p, INT32 l, INT32 *n); -export INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -export INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +export INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +export INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); export BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); export BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); export INT16 Platform_Seek (INT64 h, INT32 o, INT16 r); @@ -85,16 +85,16 @@ export void Platform_SetBadInstructionHandler (Platform_SignalHandler handler); export void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__typ, Platform_FileIdentity source); export INT16 Platform_Size (INT64 h, INT32 *l); export INT16 Platform_Sync (INT64 h); -export INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +export INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); static void Platform_TestLittleEndian (void); export INT32 Platform_Time (void); export BOOLEAN Platform_TimedOut (INT16 e); export BOOLEAN Platform_TooManyFiles (INT16 e); export INT16 Platform_Truncate (INT64 h, INT32 limit); -export INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +export INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); export INT16 Platform_Write (INT64 h, INT64 p, INT32 l); static void Platform_YMDHMStoClock (INT16 ye, INT16 mo, INT16 da, INT16 ho, INT16 mi, INT16 se, INT32 *t, INT32 *d); -export BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); #include "WindowsWrapper.h" #define Platform_ECONNABORTED() WSAECONNABORTED @@ -239,7 +239,7 @@ void Platform_Init (INT32 argc, INT64 argvadr) Platform_HeapInitHeap(); } -BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { CHAR buf[4096]; INT16 res; @@ -256,7 +256,7 @@ BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__le __RETCHK; } -void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) +void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { __DUP(var, var__len, CHAR); if (!Platform_getEnv(var, var__len, (void*)val, val__len)) { @@ -265,7 +265,7 @@ void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len) +void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { Platform_ArgVec av = NIL; if (n < Platform_ArgCount) { @@ -300,7 +300,7 @@ void Platform_GetIntArg (INT16 n, INT32 *val) } } -INT16 Platform_ArgPos (CHAR *s, LONGINT s__len) +INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) { INT16 i; CHAR arg[256]; @@ -359,7 +359,7 @@ void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec) *usec = Platform_uluSec(); } -INT16 Platform_System (CHAR *cmd, LONGINT cmd__len) +INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len) { INT16 result; __DUP(cmd, cmd__len, CHAR); @@ -381,7 +381,7 @@ INT16 Platform_Error (void) return Platform_err(); } -INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT64 *h) +INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT64 *h) { INT64 fd; fd = Platform_openro(n, n__len); @@ -394,7 +394,7 @@ INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT64 *h) __RETCHK; } -INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT64 *h) +INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT64 *h) { INT64 fd; fd = Platform_openrw(n, n__len); @@ -407,7 +407,7 @@ INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT64 *h) __RETCHK; } -INT16 Platform_New (CHAR *n, LONGINT n__len, INT64 *h) +INT16 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h) { INT64 fd; fd = Platform_opennew(n, n__len); @@ -444,7 +444,7 @@ INT16 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *iden return 0; } -INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) +INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ) { INT64 h; INT16 e, i; @@ -508,7 +508,7 @@ INT16 Platform_Read (INT64 h, INT64 p, INT32 l, INT32 *n) __RETCHK; } -INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n) +INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n) { INT16 result; INT32 lengthread; @@ -580,7 +580,7 @@ INT16 Platform_Truncate (INT64 h, INT32 limit) return 0; } -INT16 Platform_Unlink (CHAR *n, LONGINT n__len) +INT16 Platform_Unlink (CHAR *n, ADDRESS n__len) { if (Platform_deleteFile(n, n__len) == 0) { return Platform_err(); @@ -590,7 +590,7 @@ INT16 Platform_Unlink (CHAR *n, LONGINT n__len) __RETCHK; } -INT16 Platform_Chdir (CHAR *n, LONGINT n__len) +INT16 Platform_Chdir (CHAR *n, ADDRESS n__len) { INT16 r; r = Platform_setCurrentDirectory(n, n__len); @@ -601,7 +601,7 @@ INT16 Platform_Chdir (CHAR *n, LONGINT n__len) return 0; } -INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len) +INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len) { if (Platform_moveFile(o, o__len, n, n__len) == 0) { return Platform_err(); diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index f6a5d008..2d7faafb 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -29,35 +29,35 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, LONGINT s__len); -import INT16 Platform_Chdir (CHAR *n, LONGINT n__len); +import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); +import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT64 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, LONGINT val__len); +import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); -import void Platform_GetEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); -import INT16 Platform_IdentifyByName (CHAR *n, LONGINT n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); +import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); import void Platform_Init (INT32 argc, INT64 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT64 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); -import INT16 Platform_New (CHAR *n, LONGINT n__len, INT64 *h); +import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT64 Platform_OSAllocate (INT64 size); import void Platform_OSFree (INT64 address); -import INT16 Platform_OldRO (CHAR *n, LONGINT n__len, INT64 *h); -import INT16 Platform_OldRW (CHAR *n, LONGINT n__len, INT64 *h); +import INT16 Platform_OldRO (CHAR *n, ADDRESS n__len, INT64 *h); +import INT16 Platform_OldRW (CHAR *n, ADDRESS n__len, INT64 *h); import INT16 Platform_Read (INT64 h, INT64 p, INT32 l, INT32 *n); -import INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, LONGINT b__len, INT32 *n); -import INT16 Platform_Rename (CHAR *o, LONGINT o__len, CHAR *n, LONGINT n__len); +import INT16 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, ADDRESS b__len, INT32 *n); +import INT16 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len); import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2); import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2); import INT16 Platform_Seek (INT64 h, INT32 o, INT16 r); @@ -65,14 +65,14 @@ import void Platform_SetBadInstructionHandler (Platform_SignalHandler handler); import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__typ, Platform_FileIdentity source); import INT16 Platform_Size (INT64 h, INT32 *l); import INT16 Platform_Sync (INT64 h); -import INT16 Platform_System (CHAR *cmd, LONGINT cmd__len); +import INT16 Platform_System (CHAR *cmd, ADDRESS cmd__len); import INT32 Platform_Time (void); import BOOLEAN Platform_TimedOut (INT16 e); import BOOLEAN Platform_TooManyFiles (INT16 e); import INT16 Platform_Truncate (INT64 h, INT32 limit); -import INT16 Platform_Unlink (CHAR *n, LONGINT n__len); +import INT16 Platform_Unlink (CHAR *n, ADDRESS n__len); import INT16 Platform_Write (INT64 h, INT64 p, INT32 l); -import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len); +import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); import void *Platform__init(void); #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index cd4c3c61..be3ad909 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,11 +10,11 @@ -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); -export void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len); +export void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +export void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +export void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); export INT16 Reals_Expo (REAL x); export INT16 Reals_ExpoL (LONGREAL x); export void Reals_SetExpo (REAL *x, INT16 ex); @@ -79,7 +79,7 @@ INT16 Reals_ExpoL (LONGREAL x) return __MASK(__ASHR(i, 4), -2048); } -void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) { INT32 i, j, k; if (x < (LONGREAL)0) { @@ -107,7 +107,7 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len) } } -void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len) +void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) { Reals_ConvertL(x, n, (void*)d, d__len); } @@ -122,7 +122,7 @@ static CHAR Reals_ToHex (INT16 i) __RETCHK; } -static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, ADDRESS b__len, SYSTEM_BYTE *d, ADDRESS d__len) { INT16 i; INT32 l; @@ -137,12 +137,12 @@ static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LO } } -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&y, 4, (void*)d, d__len * 1); } -void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len) { Reals_BytesToHex((void*)&x, 8, (void*)d, d__len * 1); } diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index f0c84ab1..e8d15a2f 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h @@ -8,10 +8,10 @@ -import void Reals_Convert (REAL x, INT16 n, CHAR *d, LONGINT d__len); -import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); -import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, LONGINT d__len); +import void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len); +import void Reals_ConvertH (REAL y, CHAR *d, ADDRESS d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, ADDRESS d__len); +import void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len); import INT16 Reals_Expo (REAL x); import INT16 Reals_ExpoL (LONGREAL x); import void Reals_SetExpo (REAL *x, INT16 ex); diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index b5707327..fd550df3 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -10,18 +10,18 @@ -export void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -export void Strings_Cap (CHAR *s, LONGINT s__len); -export void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -export void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -export void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -export INT16 Strings_Length (CHAR *s, LONGINT s__len); -export BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -export INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -export void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +export void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +export void Strings_Cap (CHAR *s, ADDRESS s__len); +export void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +export void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +export void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export INT16 Strings_Length (CHAR *s, ADDRESS s__len); +export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); -INT16 Strings_Length (CHAR *s, LONGINT s__len) +INT16 Strings_Length (CHAR *s, ADDRESS s__len) { INT32 i; __DUP(s, s__len, CHAR); @@ -39,7 +39,7 @@ INT16 Strings_Length (CHAR *s, LONGINT s__len) __RETCHK; } -void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len) +void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(extra, extra__len, CHAR); @@ -56,7 +56,7 @@ void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__ __DEL(extra); } -void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { INT16 n1, n2, i; __DUP(source, source__len, CHAR); @@ -87,7 +87,7 @@ void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, L __DEL(source); } -void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) +void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n) { INT16 len, i; len = Strings_Length(s, s__len); @@ -110,7 +110,7 @@ void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n) } } -void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len) +void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len) { __DUP(source, source__len, CHAR); Strings_Delete((void*)dest, dest__len, pos, pos + Strings_Length(source, source__len)); @@ -118,7 +118,7 @@ void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, __DEL(source); } -void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len) +void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len) { INT16 len, destLen, i; __DUP(source, source__len, CHAR); @@ -143,7 +143,7 @@ void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHA __DEL(source); } -INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos) +INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos) { INT16 n1, n2, i, j; __DUP(pattern, pattern__len, CHAR); @@ -175,7 +175,7 @@ INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, return -1; } -void Strings_Cap (CHAR *s, LONGINT s__len) +void Strings_Cap (CHAR *s, ADDRESS s__len) { INT16 i; i = 0; @@ -191,9 +191,9 @@ static struct Match__7 { struct Match__7 *lnk; } *Match__7_s; -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m); +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m); -static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__len, INT16 n, INT16 m) +static BOOLEAN M__8 (CHAR *name, ADDRESS name__len, CHAR *mask, ADDRESS mask__len, INT16 n, INT16 m) { while ((((n >= 0 && m >= 0)) && mask[__X(m, mask__len)] != '*')) { if (name[__X(n, name__len)] != mask[__X(m, mask__len)]) { @@ -220,7 +220,7 @@ static BOOLEAN M__8 (CHAR *name, LONGINT name__len, CHAR *mask, LONGINT mask__le return 0; } -BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len) +BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len) { struct Match__7 _s; BOOLEAN __retval; diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index c987af8d..76cb022d 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -8,15 +8,15 @@ -import void Strings_Append (CHAR *extra, LONGINT extra__len, CHAR *dest, LONGINT dest__len); -import void Strings_Cap (CHAR *s, LONGINT s__len); -import void Strings_Delete (CHAR *s, LONGINT s__len, INT16 pos, INT16 n); -import void Strings_Extract (CHAR *source, LONGINT source__len, INT16 pos, INT16 n, CHAR *dest, LONGINT dest__len); -import void Strings_Insert (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); -import INT16 Strings_Length (CHAR *s, LONGINT s__len); -import BOOLEAN Strings_Match (CHAR *string, LONGINT string__len, CHAR *pattern, LONGINT pattern__len); -import INT16 Strings_Pos (CHAR *pattern, LONGINT pattern__len, CHAR *s, LONGINT s__len, INT16 pos); -import void Strings_Replace (CHAR *source, LONGINT source__len, INT16 pos, CHAR *dest, LONGINT dest__len); +import void Strings_Append (CHAR *extra, ADDRESS extra__len, CHAR *dest, ADDRESS dest__len); +import void Strings_Cap (CHAR *s, ADDRESS s__len); +import void Strings_Delete (CHAR *s, ADDRESS s__len, INT16 pos, INT16 n); +import void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHAR *dest, ADDRESS dest__len); +import void Strings_Insert (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import INT16 Strings_Length (CHAR *s, ADDRESS s__len); +import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); +import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); +import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); import void *Strings__init(void); diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index ae12961b..7182a772 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -187,20 +187,20 @@ export void Texts_Append (Texts_Text T, Texts_Buffer B); export void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); static Texts_Elem Texts_CloneElem (Texts_Elem e); static Texts_Piece Texts_ClonePiece (Texts_Piece p); -export void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len); +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len); static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__typ); export void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); export void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); static void Texts_Merge (Texts_Text T, Texts_Run u, Texts_Run *v); -export void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +export void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_OpenBuf (Texts_Buffer B); export void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); export void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -229,10 +229,10 @@ export void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x export void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); export void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static Texts_FontsFont Texts_FontsThis (CHAR *name, LONGINT name__len) +static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; __NEW(F, Texts_FontDesc); @@ -1027,7 +1027,7 @@ void Texts_WriteLn (Texts_Writer *W, ADDRESS *W__typ) Texts_Write(&*W, W__typ, 0x0d); } -void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len) +void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len) { INT16 i; __DUP(s, s__len, CHAR); @@ -1539,7 +1539,7 @@ void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Texts_Load0(&*r, r__typ, T); } -void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; @@ -1755,7 +1755,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) Store__39_s = _s.lnk; } -void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len) +void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) { Files_File f = NIL; Files_Rider r; diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 61a97dda..e8735b00 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -131,7 +131,7 @@ import ADDRESS *Texts_Writer__typ; import void Texts_Append (Texts_Text T, Texts_Buffer B); import void Texts_ChangeLooks (Texts_Text T, INT32 beg, INT32 end, UINT32 sel, Texts_FontsFont fnt, INT8 col, INT8 voff); -import void Texts_Close (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); @@ -139,7 +139,7 @@ import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); import void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T); -import void Texts_Open (Texts_Text T, CHAR *name, LONGINT name__len); +import void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_OpenBuf (Texts_Buffer B); import void Texts_OpenReader (Texts_Reader *R, ADDRESS *R__typ, Texts_Text T, INT32 pos); import void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 pos); @@ -166,7 +166,7 @@ import void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x import void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n); import void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT16 k); import void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); -import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, LONGINT s__len); +import void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); import void *Texts__init(void); diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index f69fd90e..38c0743f 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,23 +27,23 @@ export void VT100_DECTCEMl (void); export void VT100_DSR (INT16 n); export void VT100_ED (INT16 n); export void VT100_EL (INT16 n); -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len); -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len); -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len); +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len); +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); -export void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end); +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); export void VT100_SGR (INT16 n); export void VT100_SGR2 (INT16 n, INT16 m); export void VT100_SU (INT16 n); -export void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +export void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); -static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) +static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end) { CHAR h; while (start < end) { @@ -55,7 +55,7 @@ static void VT100_Reverse0 (CHAR *str, LONGINT str__len, INT16 start, INT16 end) } } -void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) +void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) { CHAR b[21]; INT16 s, e; @@ -84,7 +84,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len) __COPY(b, str, str__len); } -static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq0 (CHAR *letter, ADDRESS letter__len) { CHAR cmd[9]; __DUP(letter, letter__len, CHAR); @@ -94,7 +94,7 @@ static void VT100_EscSeq0 (CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -107,7 +107,7 @@ static void VT100_EscSeq (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len) { CHAR nstr[2]; CHAR cmd[7]; @@ -120,7 +120,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, LONGINT letter__len) __DEL(letter); } -static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, LONGINT letter__len) +static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) { CHAR nstr[5], mstr[5]; CHAR cmd[12]; @@ -236,7 +236,7 @@ void VT100_DECTCEMh (void) VT100_EscSeq0((CHAR*)"\?25h", 5); } -void VT100_SetAttr (CHAR *attr, LONGINT attr__len) +void VT100_SetAttr (CHAR *attr, ADDRESS attr__len) { CHAR tmpstr[16]; __DUP(attr, attr__len, CHAR); diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index d99406ec..4bbb3110 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h @@ -23,14 +23,14 @@ import void VT100_DSR (INT16 n); import void VT100_ED (INT16 n); import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); -import void VT100_IntToStr (INT32 int_, CHAR *str, LONGINT str__len); +import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); import void VT100_SGR2 (INT16 n, INT16 m); import void VT100_SU (INT16 n); -import void VT100_SetAttr (CHAR *attr, LONGINT attr__len); +import void VT100_SetAttr (CHAR *attr, ADDRESS attr__len); import void *VT100__init(void); diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 37630d23..66f80319 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -17,13 +17,13 @@ static CHAR extTools_CFLAGS[1023]; -export void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len); -export void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len); +export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); -static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGINT cmd__len) +static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; __DUP(title, title__len, CHAR); @@ -63,7 +63,7 @@ static void extTools_execute (CHAR *title, LONGINT title__len, CHAR *cmd, LONGIN __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); @@ -74,7 +74,7 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, LONGINT s__len) Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } -void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) +void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { CHAR cmd[1023]; __DUP(moduleName, moduleName__len, CHAR); @@ -86,7 +86,7 @@ void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len) __DEL(moduleName); } -void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len) +void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { CHAR cmd[1023]; __DUP(additionalopts, additionalopts__len, CHAR); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 63e5df15..472c60f3 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/11/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h @@ -8,8 +8,8 @@ -import void extTools_Assemble (CHAR *moduleName, LONGINT moduleName__len); -import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEAN statically, CHAR *additionalopts, LONGINT additionalopts__len); +import void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); +import void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); import void *extTools__init(void); From 6a7cba23a73950dddbacd8affec4ce934054d09d Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 27 Nov 2016 16:48:03 +0000 Subject: [PATCH 005/241] Force output flush and nonzero return code on assertion failure in Files.Mod --- src/runtime/Files.Mod | 25 +++++++++++++++---------- src/runtime/Modules.Mod | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 9e51f73b..543a5c9c 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -76,6 +76,11 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files PROCEDURE^ Finalize(o: SYSTEM.PTR); + PROCEDURE Assert(truth: BOOLEAN); + BEGIN + IF ~truth THEN Out.Ln; ASSERT(truth) END + END Assert; + PROCEDURE Err(s: ARRAY OF CHAR; f: File; errcode: Platform.ErrorCode); BEGIN Out.Ln; Out.String("-- "); Out.String(s); Out.String(": "); @@ -361,7 +366,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files PROCEDURE Pos* (VAR r: Rider): LONGINT; BEGIN - ASSERT(r.offset <= BufSize); + Assert(r.offset <= BufSize); RETURN r.org + r.offset END Pos; @@ -401,7 +406,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files END ELSE buf := NIL; org := 0; offset := 0 END; - ASSERT(offset <= BufSize); + Assert(offset <= BufSize); r.buf := buf; r.org := org; r.offset := offset; r.eof := FALSE; r.res := 0 END Set; @@ -410,7 +415,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files BEGIN buf := r.buf; offset := r.offset; IF r.org # buf.org THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END; - ASSERT(offset <= buf.size); + Assert(offset <= buf.size); IF (offset < buf.size) THEN x := buf.data[offset]; r.offset := offset + 1 ELSIF r.org + offset < buf.f.len THEN @@ -436,7 +441,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files ELSIF n > restInBuf THEN min := restInBuf ELSE min := n END; SYSTEM.MOVE(SYSTEM.ADR(buf.data) + ToAdr(offset), SYSTEM.ADR(x) + ToAdr(xpos), min); INC(offset, min); r.offset := offset; INC(xpos, min); DEC(n, min); - ASSERT(offset <= BufSize) + Assert(offset <= BufSize) END; r.res := 0; r.eof := FALSE END ReadBytes; @@ -449,12 +454,12 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR buf: Buffer; offset: LONGINT; BEGIN buf := r.buf; offset := r.offset; - ASSERT(offset <= BufSize); + Assert(offset <= BufSize); IF (r.org # buf.org) OR (offset >= BufSize) THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END; - ASSERT(offset < BufSize); + Assert(offset < BufSize); buf.data[offset] := x; buf.chg := TRUE; IF offset = buf.size THEN @@ -469,17 +474,17 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files IF n > LEN(x) THEN IdxTrap END; xpos := 0; buf := r.buf; offset := r.offset; WHILE n > 0 DO - ASSERT(offset <= BufSize); + Assert(offset <= BufSize); IF (r.org # buf.org) OR (offset >= BufSize) THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END; - ASSERT(offset <= BufSize); + Assert(offset <= BufSize); restInBuf := BufSize - offset; IF n > restInBuf THEN min := restInBuf ELSE min := n END; SYSTEM.MOVE(SYSTEM.ADR(x) + ToAdr(xpos), SYSTEM.ADR(buf.data) + ToAdr(offset), min); INC(offset, min); r.offset := offset; - ASSERT(offset <= BufSize); + Assert(offset <= BufSize); IF offset > buf.size THEN INC(buf.f.len, offset - buf.size); buf.size := offset END; INC(xpos, min); DEC(n, min); buf.chg := TRUE END; @@ -664,7 +669,7 @@ Especially Length would become fairly complex. BEGIN 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)); - 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. *) END ReadNum; diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 12fbcd7a..28050126 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -148,7 +148,7 @@ MODULE Modules; (* jt 6.1.96 *) errstring("Assertion failure."); IF code # 0 THEN errstring(" ASSERT code "); errint(code); errstring("."); END; errstring(Platform.NL); - Platform.Exit(code); + IF code > 0 THEN Platform.Exit(code) ELSE Platform.Exit(-1) END; END AssertFail; END Modules. From c630f8639965527df111ced51a5141491bfa93bd Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 27 Nov 2016 16:49:12 +0000 Subject: [PATCH 006/241] Update C bootstrap sources --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 31 ++++++++++++++++++---------- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 8 +++++-- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 31 ++++++++++++++++++---------- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 8 +++++-- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 31 ++++++++++++++++++---------- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 8 +++++-- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 31 ++++++++++++++++++---------- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 8 +++++-- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 31 ++++++++++++++++++---------- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 8 +++++-- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 310 insertions(+), 245 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index e900905f..cf8a66c5 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 071d7b8e..cbbddc2b 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index b1942442..cacb981f 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 0a3293ab..947b36b8 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ; export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_Rider__typ; +static void Files_Assert (BOOLEAN truth); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); @@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x +static void Files_Assert (BOOLEAN truth) +{ + if (!truth) { + Out_Ln(); + __ASSERT(truth, 0); + } +} + static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); @@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) { - __ASSERT((*r).offset <= 4096, 0); + Files_Assert((*r).offset <= 4096); return (*r).org + (*r).offset; } @@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) org = 0; offset = 0; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); (*r).buf = buf; (*r).org = org; (*r).offset = offset; @@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= buf->size, 0); + Files_Assert(offset <= buf->size); if (offset < buf->size) { *x = buf->data[offset]; (*r).offset = offset + 1; @@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x (*r).offset = offset; xpos += min; n -= min; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); } (*r).res = 0; (*r).eof = 0; @@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) INT32 offset; buf = (*r).buf; offset = (*r).offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset < 4096, 0); + Files_Assert(offset < 4096); buf->data[offset] = x; buf->chg = 1; if (offset == buf->size) { @@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS buf = (*r).buf; offset = (*r).offset; while (n > 0) { - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); restInBuf = 4096 - offset; if (n > restInBuf) { min = restInBuf; @@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); offset += min; (*r).offset = offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if (offset > buf->size) { buf->f->len += offset - buf->size; buf->size = offset; @@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__ Files_Read(&*R, R__typ, (void*)&b); } q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); - __ASSERT(x__len <= 8, 0); + Files_Assert(x__len <= 8); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len); } diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 1012ec46..0abbbc73 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index ba769b74..e39356ea 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index d200254d..700aa7c2 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 27e4473c..8031a41f 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code) Modules_errstring((CHAR*)".", 2); } Modules_errstring(Platform_NL, 3); - Platform_Exit(code); + if (code > 0) { + Platform_Exit(code); + } else { + Platform_Exit(-1); + } } __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index b1f2385e..e651d9ec 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index bc44b83a..5ea38d2b 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index eb93787e..de00e17c 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 72e0feef..b28012be 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 5624314d..f2ef814d 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 632b78e5..5bdee03c 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index c310c421..7f78e399 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 02fd6337..e3c859a0 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index acb2df91..0d729ff7 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 7aedbbd6..30737296 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index e49c222b..4f1e8faa 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 58f06737..e2711b4d 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 9d34cea9..d3950d01 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index f6d42592..9ad04131 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 0f1980ac..54c8695a 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 82ad945b..9f596918 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index d58a17d5..c4807be1 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 459d5079..2e744566 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 34547692..d7337ec6 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index be3ad909..1a0aae45 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index e8d15a2f..a39cdedc 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index fd550df3..f29bce42 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 76cb022d..d67ec004 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f304b8bf..f0340e83 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index ecdf9223..1b34b2d4 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 38c0743f..14140265 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 4bbb3110..b8dc8094 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 66f80319..7193bad6 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 472c60f3..b6367689 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index e900905f..cf8a66c5 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 071d7b8e..cbbddc2b 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index b1942442..cacb981f 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 0a3293ab..947b36b8 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ; export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_Rider__typ; +static void Files_Assert (BOOLEAN truth); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); @@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x +static void Files_Assert (BOOLEAN truth) +{ + if (!truth) { + Out_Ln(); + __ASSERT(truth, 0); + } +} + static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); @@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) { - __ASSERT((*r).offset <= 4096, 0); + Files_Assert((*r).offset <= 4096); return (*r).org + (*r).offset; } @@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) org = 0; offset = 0; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); (*r).buf = buf; (*r).org = org; (*r).offset = offset; @@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= buf->size, 0); + Files_Assert(offset <= buf->size); if (offset < buf->size) { *x = buf->data[offset]; (*r).offset = offset + 1; @@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x (*r).offset = offset; xpos += min; n -= min; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); } (*r).res = 0; (*r).eof = 0; @@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) INT32 offset; buf = (*r).buf; offset = (*r).offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset < 4096, 0); + Files_Assert(offset < 4096); buf->data[offset] = x; buf->chg = 1; if (offset == buf->size) { @@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS buf = (*r).buf; offset = (*r).offset; while (n > 0) { - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); restInBuf = 4096 - offset; if (n > restInBuf) { min = restInBuf; @@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); offset += min; (*r).offset = offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if (offset > buf->size) { buf->f->len += offset - buf->size; buf->size = offset; @@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__ Files_Read(&*R, R__typ, (void*)&b); } q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); - __ASSERT(x__len <= 8, 0); + Files_Assert(x__len <= 8); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len); } diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 1012ec46..0abbbc73 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index ba769b74..e39356ea 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index d200254d..700aa7c2 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 27e4473c..8031a41f 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code) Modules_errstring((CHAR*)".", 2); } Modules_errstring(Platform_NL, 3); - Platform_Exit(code); + if (code > 0) { + Platform_Exit(code); + } else { + Platform_Exit(-1); + } } __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index b1f2385e..e651d9ec 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index bc44b83a..5ea38d2b 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index eb93787e..de00e17c 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 72e0feef..b28012be 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 5624314d..f2ef814d 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 632b78e5..5bdee03c 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index c310c421..7f78e399 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 02fd6337..e3c859a0 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index acb2df91..0d729ff7 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 7aedbbd6..30737296 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index e49c222b..4f1e8faa 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 1eb85a06..b84b0516 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 9d34cea9..d3950d01 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index f6d42592..9ad04131 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 0f1980ac..54c8695a 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 82ad945b..9f596918 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index d58a17d5..c4807be1 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 459d5079..2e744566 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 34547692..d7337ec6 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index be3ad909..1a0aae45 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index e8d15a2f..a39cdedc 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index fd550df3..f29bce42 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 76cb022d..d67ec004 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 1428c051..4036d0d5 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index fa28aa92..befb04d5 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 38c0743f..14140265 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 4bbb3110..b8dc8094 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 66f80319..7193bad6 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 472c60f3..b6367689 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index e900905f..cf8a66c5 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 071d7b8e..cbbddc2b 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index b1942442..cacb981f 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 6a53103d..fcff6327 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ; export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_Rider__typ; +static void Files_Assert (BOOLEAN truth); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); @@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x +static void Files_Assert (BOOLEAN truth) +{ + if (!truth) { + Out_Ln(); + __ASSERT(truth, 0); + } +} + static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); @@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) { - __ASSERT((*r).offset <= 4096, 0); + Files_Assert((*r).offset <= 4096); return (*r).org + (*r).offset; } @@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) org = 0; offset = 0; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); (*r).buf = buf; (*r).org = org; (*r).offset = offset; @@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= buf->size, 0); + Files_Assert(offset <= buf->size); if (offset < buf->size) { *x = buf->data[offset]; (*r).offset = offset + 1; @@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x (*r).offset = offset; xpos += min; n -= min; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); } (*r).res = 0; (*r).eof = 0; @@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) INT32 offset; buf = (*r).buf; offset = (*r).offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset < 4096, 0); + Files_Assert(offset < 4096); buf->data[offset] = x; buf->chg = 1; if (offset == buf->size) { @@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS buf = (*r).buf; offset = (*r).offset; while (n > 0) { - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); restInBuf = 4096 - offset; if (n > restInBuf) { min = restInBuf; @@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); offset += min; (*r).offset = offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if (offset > buf->size) { buf->f->len += offset - buf->size; buf->size = offset; @@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__ Files_Read(&*R, R__typ, (void*)&b); } q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); - __ASSERT(x__len <= 8, 0); + Files_Assert(x__len <= 8); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len); } diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 5a99da54..003d8c99 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 032e9544..49d8a8f6 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index bf12c17b..6f099a6c 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 12ee85c4..a6cc971c 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code) Modules_errstring((CHAR*)".", 2); } Modules_errstring(Platform_NL, 3); - Platform_Exit(code); + if (code > 0) { + Platform_Exit(code); + } else { + Platform_Exit(-1); + } } __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}}; diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index b1f2385e..e651d9ec 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index bc44b83a..5ea38d2b 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index eb93787e..de00e17c 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 72e0feef..b28012be 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 5624314d..f2ef814d 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index b2fd5536..ae88d2b7 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index c310c421..7f78e399 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index e6b89be2..1167b5aa 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index acb2df91..0d729ff7 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 7aedbbd6..30737296 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index e49c222b..4f1e8faa 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 4a900e78..958185d0 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 9d34cea9..d3950d01 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 1b610f35..f90939e0 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 0f1980ac..54c8695a 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 82ad945b..9f596918 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index d58a17d5..c4807be1 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 543ed88a..390490ed 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index bfe37a2c..de69c8e3 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index be3ad909..1a0aae45 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index e8d15a2f..a39cdedc 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index fd550df3..f29bce42 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 76cb022d..d67ec004 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 7182a772..59875b4f 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index e8735b00..8207d839 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 38c0743f..14140265 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 4bbb3110..b8dc8094 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 66f80319..7193bad6 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 472c60f3..b6367689 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index e900905f..cf8a66c5 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 071d7b8e..cbbddc2b 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index b1942442..cacb981f 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index bdbabe97..22743378 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -60,6 +60,7 @@ export ADDRESS *Files_FileDesc__typ; export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_Rider__typ; +static void Files_Assert (BOOLEAN truth); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); @@ -111,6 +112,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x +static void Files_Assert (BOOLEAN truth) +{ + if (!truth) { + Out_Ln(); + __ASSERT(truth, 0); + } +} + static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); @@ -526,7 +535,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) { - __ASSERT((*r).offset <= 4096, 0); + Files_Assert((*r).offset <= 4096); return (*r).org + (*r).offset; } @@ -585,7 +594,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) org = 0; offset = 0; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); (*r).buf = buf; (*r).org = org; (*r).offset = offset; @@ -604,7 +613,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= buf->size, 0); + Files_Assert(offset <= buf->size); if (offset < buf->size) { *x = buf->data[offset]; (*r).offset = offset + 1; @@ -649,7 +658,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x (*r).offset = offset; xpos += min; n -= min; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); } (*r).res = 0; (*r).eof = 0; @@ -666,13 +675,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) INT32 offset; buf = (*r).buf; offset = (*r).offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset < 4096, 0); + Files_Assert(offset < 4096); buf->data[offset] = x; buf->chg = 1; if (offset == buf->size) { @@ -694,13 +703,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS buf = (*r).buf; offset = (*r).offset; while (n > 0) { - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); restInBuf = 4096 - offset; if (n > restInBuf) { min = restInBuf; @@ -710,7 +719,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); offset += min; (*r).offset = offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if (offset > buf->size) { buf->f->len += offset - buf->size; buf->size = offset; @@ -919,7 +928,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__ Files_Read(&*R, R__typ, (void*)&b); } q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); - __ASSERT(x__len <= 8, 0); + Files_Assert(x__len <= 8); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len); } diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 2750cbdd..c932d3d5 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index ba769b74..e39356ea 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index d200254d..700aa7c2 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 27e4473c..8031a41f 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code) Modules_errstring((CHAR*)".", 2); } Modules_errstring(Platform_NL, 3); - Platform_Exit(code); + if (code > 0) { + Platform_Exit(code); + } else { + Platform_Exit(-1); + } } __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index b1f2385e..e651d9ec 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index bc44b83a..5ea38d2b 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index eb93787e..de00e17c 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 72e0feef..b28012be 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 5624314d..f2ef814d 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 632b78e5..5bdee03c 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index c310c421..7f78e399 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 02fd6337..e3c859a0 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index acb2df91..0d729ff7 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 7aedbbd6..30737296 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index e49c222b..4f1e8faa 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 1eb85a06..b84b0516 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 9d34cea9..d3950d01 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index f6d42592..9ad04131 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 0f1980ac..54c8695a 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index de9a7701..32c0b1ba 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index d58a17d5..c4807be1 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 2d035abe..afe3e355 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 3f6520f3..6ce3eb3b 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index be3ad909..1a0aae45 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index e8d15a2f..a39cdedc 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index fd550df3..f29bce42 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 76cb022d..d67ec004 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 1428c051..4036d0d5 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index fa28aa92..befb04d5 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 38c0743f..14140265 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 4bbb3110..b8dc8094 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 66f80319..7193bad6 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 472c60f3..b6367689 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index e900905f..cf8a66c5 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 071d7b8e..cbbddc2b 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index b1942442..cacb981f 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index fce3936a..dd14992a 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -61,6 +61,7 @@ export ADDRESS *Files_FileDesc__typ; export ADDRESS *Files_BufDesc__typ; export ADDRESS *Files_Rider__typ; +static void Files_Assert (BOOLEAN truth); export Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); static Files_File Files_CacheEntry (Platform_FileIdentity identity); export void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); @@ -112,6 +113,14 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) #define Files_ToAdr(x) (ADDRESS)x +static void Files_Assert (BOOLEAN truth) +{ + if (!truth) { + Out_Ln(); + __ASSERT(truth, 0); + } +} + static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) { __DUP(s, s__len, CHAR); @@ -527,7 +536,7 @@ void Files_GetDate (Files_File f, INT32 *t, INT32 *d) INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ) { - __ASSERT((*r).offset <= 4096, 0); + Files_Assert((*r).offset <= 4096); return (*r).org + (*r).offset; } @@ -586,7 +595,7 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) org = 0; offset = 0; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); (*r).buf = buf; (*r).org = org; (*r).offset = offset; @@ -605,7 +614,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= buf->size, 0); + Files_Assert(offset <= buf->size); if (offset < buf->size) { *x = buf->data[offset]; (*r).offset = offset + 1; @@ -650,7 +659,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x (*r).offset = offset; xpos += min; n -= min; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); } (*r).res = 0; (*r).eof = 0; @@ -667,13 +676,13 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) INT32 offset; buf = (*r).buf; offset = (*r).offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset < 4096, 0); + Files_Assert(offset < 4096); buf->data[offset] = x; buf->chg = 1; if (offset == buf->size) { @@ -695,13 +704,13 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS buf = (*r).buf; offset = (*r).offset; while (n > 0) { - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if ((*r).org != buf->org || offset >= 4096) { Files_Set(&*r, r__typ, buf->f, (*r).org + offset); buf = (*r).buf; offset = (*r).offset; } - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); restInBuf = 4096 - offset; if (n > restInBuf) { min = restInBuf; @@ -711,7 +720,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); offset += min; (*r).offset = offset; - __ASSERT(offset <= 4096, 0); + Files_Assert(offset <= 4096); if (offset > buf->size) { buf->f->len += offset - buf->size; buf->size = offset; @@ -921,7 +930,7 @@ void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__ Files_Read(&*R, R__typ, (void*)&b); } q += (INT64)__ASH((__MASK(b, -64) - __ASHL(__ASHR(b, 6), 6)), s); - __ASSERT(x__len <= 8, 0); + Files_Assert(x__len <= 8); __MOVE((ADDRESS)&q, (ADDRESS)x, x__len); } diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 7459e85e..59d053bd 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 032e9544..49d8a8f6 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index bf12c17b..6f099a6c 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 12ee85c4..a6cc971c 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -269,7 +269,11 @@ void Modules_AssertFail (INT32 code) Modules_errstring((CHAR*)".", 2); } Modules_errstring(Platform_NL, 3); - Platform_Exit(code); + if (code > 0) { + Platform_Exit(code); + } else { + Platform_Exit(-1); + } } __TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}}; diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index b1f2385e..e651d9ec 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index bc44b83a..5ea38d2b 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index eb93787e..de00e17c 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 72e0feef..b28012be 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 5624314d..f2ef814d 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index b2fd5536..ae88d2b7 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index c310c421..7f78e399 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index e6b89be2..1167b5aa 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index acb2df91..0d729ff7 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 7aedbbd6..30737296 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index e49c222b..4f1e8faa 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 4a900e78..958185d0 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 9d34cea9..d3950d01 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 1b610f35..f90939e0 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 0f1980ac..54c8695a 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index de9a7701..32c0b1ba 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index d58a17d5..c4807be1 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 9aa7ae12..6ecc123d 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 2d7faafb..7182d9f7 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index be3ad909..1a0aae45 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index e8d15a2f..a39cdedc 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index fd550df3..f29bce42 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 76cb022d..d67ec004 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 7182a772..59875b4f 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index e8735b00..8207d839 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 38c0743f..14140265 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 4bbb3110..b8dc8094 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 66f80319..7193bad6 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 472c60f3..b6367689 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/25]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From b9339c9516c6e81eacbd2df639f4d7447cfdf26c Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 28 Nov 2016 14:56:10 +0000 Subject: [PATCH 007/241] Merge heap fix for negative addresses from OFront. Fix ulmSets CharSet size. --- src/library/ulm/ulmSets.Mod | 96 ++++++++++++++++++------------------- src/runtime/Heap.Mod | 69 ++++++++++++++++++-------- 2 files changed, 96 insertions(+), 69 deletions(-) diff --git a/src/library/ulm/ulmSets.Mod b/src/library/ulm/ulmSets.Mod index d70d21e9..7c75a3ff 100644 --- a/src/library/ulm/ulmSets.Mod +++ b/src/library/ulm/ulmSets.Mod @@ -40,14 +40,14 @@ MODULE ulmSets; setsize* = MAX(SET) + 1; TYPE - CharSet* = ARRAY ORD(MAX(CHAR)) + 1 DIV setsize OF SET; + CharSet* = ARRAY (ORD(MAX(CHAR)) + 1) DIV setsize OF SET; PROCEDURE InitSet*(VAR set: ARRAY OF SET); VAR i: LONGINT; BEGIN i := 0; WHILE i < LEN(set) DO - set[i] := {}; INC(i); + set[i] := {}; INC(i); END; END InitSet; @@ -56,7 +56,7 @@ MODULE ulmSets; BEGIN i := 0; WHILE i < LEN(set) DO - set[i] := - set[i]; INC(i); + set[i] := - set[i]; INC(i); END; END Complement; @@ -92,115 +92,115 @@ MODULE ulmSets; PROCEDURE Intersection*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); VAR - index: INTEGER; + index: INTEGER; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; WHILE index < LEN(result) DO - result[index] := set1[index] * set2[index]; - INC(index); + result[index] := set1[index] * set2[index]; + INC(index); END; END Intersection; PROCEDURE SymDifference*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); VAR - index: INTEGER; + index: INTEGER; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; WHILE index < LEN(result) DO - result[index] := set1[index] / set2[index]; - INC(index); + result[index] := set1[index] / set2[index]; + INC(index); END; END SymDifference; PROCEDURE Union*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); VAR - index: INTEGER; + index: INTEGER; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; WHILE index < LEN(result) DO - result[index] := set1[index] + set2[index]; - INC(index); + result[index] := set1[index] + set2[index]; + INC(index); END; END Union; PROCEDURE Difference*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); VAR - index: INTEGER; + index: INTEGER; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; WHILE index < LEN(result) DO - result[index] := set1[index] - set2[index]; - INC(index); + result[index] := set1[index] - set2[index]; + INC(index); END; END Difference; PROCEDURE Equal*(set1, set2: ARRAY OF SET) : BOOLEAN; VAR - index: INTEGER; + index: INTEGER; BEGIN index := 0; WHILE (index < LEN(set1)) & (index < LEN(set2)) DO - IF set1[index] # set2[index] THEN - RETURN FALSE - END; - INC(index); + IF set1[index] # set2[index] THEN + RETURN FALSE + END; + INC(index); END; WHILE index < LEN(set1) DO - IF set1[index] # {} THEN - RETURN FALSE - END; - INC(index); + IF set1[index] # {} THEN + RETURN FALSE + END; + INC(index); END; WHILE index < LEN(set2) DO - IF set2[index] # {} THEN - RETURN FALSE - END; - INC(index); + IF set2[index] # {} THEN + RETURN FALSE + END; + INC(index); END; RETURN TRUE END Equal; PROCEDURE Subset*(set1, set2: ARRAY OF SET) : BOOLEAN; VAR - index: INTEGER; + index: INTEGER; BEGIN index := 0; WHILE (index < LEN(set1)) & (index < LEN(set2)) DO - IF set1[index] - set2[index] # {} THEN - RETURN FALSE - END; - INC(index); + IF set1[index] - set2[index] # {} THEN + RETURN FALSE + END; + INC(index); END; WHILE index < LEN(set1) DO - IF set1[index] # {} THEN - RETURN FALSE - END; - INC(index); + IF set1[index] # {} THEN + RETURN FALSE + END; + INC(index); END; RETURN TRUE END Subset; PROCEDURE Card*(set: ARRAY OF SET) : INTEGER; VAR - index: INTEGER; - i: INTEGER; - card: INTEGER; + index: INTEGER; + i: INTEGER; + card: INTEGER; BEGIN card := 0; index := 0; WHILE index < LEN(set) DO - i := 0; - WHILE i <= MAX(SET) DO - IF i IN set[index] THEN - INC(card); - END; - INC(i); - END; - INC(index); + i := 0; + WHILE i <= MAX(SET) DO + IF i IN set[index] THEN + INC(card); + END; + INC(i); + END; + INC(index); END; RETURN card END Card; diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 550867f7..71a0d161 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -22,7 +22,7 @@ MODULE Heap; (* heap chunks *) nextChnkOff = S.VAL(S.ADDRESS, 0); (* next heap chunk, sorted ascendingly! *) endOff = S.VAL(S.ADDRESS, SZA); (* end of heap chunk *) - blkOff = S.VAL(S.ADDRESS, 3*SZA); (* first block in a chunk *) + blkOff = S.VAL(S.ADDRESS, 3*SZA); (* first block in a chunk, starts with tag *) (* heap blocks *) tagOff = S.VAL(S.ADDRESS, 0); (* block starts with tag *) @@ -79,9 +79,12 @@ MODULE Heap; firstTry: BOOLEAN; (* extensible heap *) - heap: S.ADDRESS; (* the sorted list of heap chunks *) - heapend: S.ADDRESS; (* max possible pointer value (used for stack collection) *) - heapsize*: S.ADDRESS; (* the sum of all heap chunk sizes *) + heap: S.ADDRESS; (* the sorted list of heap chunks *) + heapNegMin: S.ADDRESS; (* Range of pointer values, used for stack collection *) + heapNegMax: S.ADDRESS; + heapPosMin: S.ADDRESS; + heapPosMax: S.ADDRESS; + heapsize*: S.ADDRESS; (* the sum of all heap chunk sizes *) (* finalization candidates *) fin: FinNode; @@ -166,18 +169,28 @@ MODULE Heap; PROCEDURE -OSAllocate(size: S.ADDRESS): S.ADDRESS "Platform_OSAllocate(size)"; PROCEDURE NewChunk(blksz: S.ADDRESS): S.ADDRESS; - VAR chnk: S.ADDRESS; + VAR chnk, blk, end: S.ADDRESS; BEGIN chnk := OSAllocate(blksz + blkOff); IF chnk # 0 THEN - S.PUT(chnk + endOff, chnk + (blkOff + blksz)); - S.PUT(chnk + blkOff, chnk + (blkOff + sizeOff)); - S.PUT(chnk + (blkOff + sizeOff), blksz); - S.PUT(chnk + (blkOff + sntlOff), NoPtrSntl); - S.PUT(chnk + (blkOff + nextOff), bigBlocks); - bigBlocks := chnk + blkOff; - INC(heapsize, blksz) - END ; + blk := chnk + blkOff; (* Heap chunk consists of a single block *) + end := blk + blksz; + S.PUT(chnk + endOff, end); + S.PUT(blk + tagOff, blk + sizeOff); + S.PUT(blk + sizeOff, blksz); + S.PUT(blk + sntlOff, NoPtrSntl); + S.PUT(blk + nextOff, bigBlocks); + bigBlocks := blk; (* Prepend block to list of big blocks *) + INC(heapsize, blksz); + (* Maintain heap range limits *) + IF chnk > 0 THEN + IF chnk < heapPosMin THEN heapPosMin := blk + SZA END; + IF end > heapPosMax THEN heapPosMax := end END + ELSE (* chnk < 0 *) + IF chnk < heapNegMin THEN heapNegMin := blk + SZA END; + IF end > heapNegMax THEN heapNegMax := end END + END + END; RETURN chnk END NewChunk; @@ -199,8 +212,7 @@ MODULE Heap; S.GET(j, next) END; S.PUT(chnk, next); S.PUT(j, chnk) - END ; - IF next = 0 THEN S.GET(chnk+endOff, heapend) END + END END END ExtendHeap; @@ -504,7 +516,8 @@ MODULE Heap; IF sp > stack0 THEN inc := -inc END ; WHILE sp # stack0 DO S.GET(sp, p); - IF (p > heap) & (p < heapend) THEN + IF (p > 0) & (p >= heapPosMin) & (p < heapPosMax) + OR (p < 0) & (p >= heapNegMin) & (p < heapNegMax) THEN IF nofcand = LEN(cand) THEN HeapSort(nofcand, cand); MarkCandidates(nofcand, cand); nofcand := 0 END ; cand[nofcand] := p; INC(nofcand) END ; @@ -565,11 +578,25 @@ PROCEDURE -HeapModuleInit 'Heap__init()'; (* InitHeap is called by Platform.init before any module bodies have been initialised, to enable NEW, S.NEW *) BEGIN - heap := NewChunk(heapSize0); - S.GET(heap + endOff, heapend); - S.PUT(heap, AddressZero); - allocated := 0; firstTry := TRUE; freeList[nofLists] := 1; lockdepth := 0; - FileCount := 0; modules := NIL; heapsize := 0; bigBlocks := 0; fin := NIL; + heap := 0; + heapsize := 0; + allocated := 0; + lockdepth := 0; + heapPosMin := MAX(S.ADDRESS); + heapPosMax := 0; + heapNegMin := 0; + heapNegMax := MIN(S.ADDRESS); + + heap := NewChunk(heapSize0); + S.PUT(heap + nextChnkOff, AddressZero); + + firstTry := TRUE; + freeList[nofLists] := 1; + + FileCount := 0; + modules := NIL; + bigBlocks := 0; + fin := NIL; interrupted := FALSE; HeapModuleInit; From d5c3d2aae5ae7ec38f7012e249f228f8b2a09792 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 28 Nov 2016 15:57:04 +0000 Subject: [PATCH 008/241] Merge __GUARDEQP changes from OFront. --- src/compiler/OPC.Mod | 2 +- src/runtime/SYSTEM.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index 1e5ab5a7..f2e662c9 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -1091,7 +1091,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) IF obj^.adr = 1 THEN (* WITH-variable *) IF obj^.typ^.comp = OPT.Record THEN Ident(obj); OPM.WriteString("__") ELSE (* cast with guard pointer type *) - OPM.WriteString("(("); Ident(obj^.typ^.strobj); OPM.Write(")"); Ident(obj); OPM.Write(")") + OPM.WriteString("(*("); Ident(obj^.typ^.strobj); OPM.WriteString("*)&"); Ident(obj); OPM.Write(")") END ELSIF (level # OPM.level) & (level > 0) THEN (* intermediate var *) comp := obj^.typ^.comp; diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index 43baa836..ff4c724d 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -237,7 +237,7 @@ static inline double SYSTEM_ABSD(double i) {return i >= 0.0 ? i : -i;} #define __GUARDR(r, typ, level) (*((typ*)(__IS(r##__typ,typ,level)?r:(__HALT(-5),r)))) #define __GUARDA(p, typ, level) ((struct typ*)(__IS(__TYPEOF(p),typ,level)?p:(__HALT(-5),p))) #define __GUARDEQR(p, dyntyp, typ) if(dyntyp!=typ##__typ) __HALT(-6);*(p) -#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*(p) +#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*((typ*)p) From 51ae4c32419e7a94acde37d22877373255259037 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 28 Nov 2016 15:57:49 +0000 Subject: [PATCH 009/241] Update C bootstrap. --- bootstrap/SYSTEM.h | 2 +- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 54 ++++++++++++++++++---------- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 6 ++-- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 36 +++++++++---------- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 54 ++++++++++++++++++---------- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 6 ++-- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 36 +++++++++---------- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 54 ++++++++++++++++++---------- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 6 ++-- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 36 +++++++++---------- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 54 ++++++++++++++++++---------- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 6 ++-- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 36 +++++++++---------- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 54 ++++++++++++++++++---------- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 6 ++-- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 36 +++++++++---------- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 186 files changed, 461 insertions(+), 371 deletions(-) diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 43baa836..ff4c724d 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -237,7 +237,7 @@ static inline double SYSTEM_ABSD(double i) {return i >= 0.0 ? i : -i;} #define __GUARDR(r, typ, level) (*((typ*)(__IS(r##__typ,typ,level)?r:(__HALT(-5),r)))) #define __GUARDA(p, typ, level) ((struct typ*)(__IS(__TYPEOF(p),typ,level)?p:(__HALT(-5),p))) #define __GUARDEQR(p, dyntyp, typ) if(dyntyp!=typ##__typ) __HALT(-6);*(p) -#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*(p) +#define __GUARDEQP(p, typ) if(__TYPEOF(p)!=typ##__typ)__HALT(-6);*((typ*)p) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 947b36b8..05af3356 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 0abbbc73..1d0b6ef1 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index e2711b4d..0d22f650 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 2e744566..5cc1bdc0 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index d7337ec6..f4cff92c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f0340e83..21b5fc34 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 1b34b2d4..8b80a18c 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 947b36b8..05af3356 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 0abbbc73..1d0b6ef1 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index b84b0516..b4a68499 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 2e744566..5cc1bdc0 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index d7337ec6..f4cff92c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 4036d0d5..ffda81d3 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index befb04d5..ef53cdf5 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index fcff6327..2da0ba3b 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 003d8c99..379f329e 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 49d8a8f6..ac52c6ae 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapend; +static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT64 Heap_NewChunk (INT64 blksz) { - INT64 chnk; + INT64 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 24); if (chnk != 0) { - __PUT(chnk + 8, chnk + (24 + blksz), INT64); - __PUT(chnk + 24, chnk + 32, INT64); - __PUT(chnk + 32, blksz, INT64); - __PUT(chnk + 40, -8, INT64); - __PUT(chnk + 48, Heap_bigBlocks, INT64); - Heap_bigBlocks = chnk + 24; + blk = chnk + 24; + end = blk + blksz; + __PUT(chnk + 8, end, INT64); + __PUT(blk, blk + 8, INT64); + __PUT(blk + 8, blksz, INT64); + __PUT(blk + 16, -8, INT64); + __PUT(blk + 24, Heap_bigBlocks, INT64); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 8; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 8; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } - if (next == 0) { - __GET(chnk + 8, Heap_heapend, INT64); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT64); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == (INT64)cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(256000); - __GET(Heap_heap + 8, Heap_heapend, INT64); - __PUT(Heap_heap, 0, INT64); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-9223372036854775807-1); + Heap_heap = Heap_NewChunk(256000); + __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 6f099a6c..9daf685d 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index a6cc971c..f1d1a614 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index ae88d2b7..5820c0cc 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 1167b5aa..ccf8dbe4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 958185d0..8122f444 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f90939e0..a03a1aab 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 9f596918..eba9222e 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 390490ed..def7cd38 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index de69c8e3..f9a40b7b 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 59875b4f..79492c57 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 8207d839..9042b9b8 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 22743378..ac192041 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index c932d3d5..dca42164 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index e39356ea..ae9ffcfb 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapend; +static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT32 Heap_NewChunk (INT32 blksz) { - INT32 chnk; + INT32 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 12); if (chnk != 0) { - __PUT(chnk + 4, chnk + (12 + blksz), INT32); - __PUT(chnk + 12, chnk + 16, INT32); - __PUT(chnk + 16, blksz, INT32); - __PUT(chnk + 20, -4, INT32); - __PUT(chnk + 24, Heap_bigBlocks, INT32); - Heap_bigBlocks = chnk + 12; + blk = chnk + 12; + end = blk + blksz; + __PUT(chnk + 4, end, INT32); + __PUT(blk, blk + 4, INT32); + __PUT(blk + 4, blksz, INT32); + __PUT(blk + 8, -4, INT32); + __PUT(blk + 12, Heap_bigBlocks, INT32); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 4; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 4; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } - if (next == 0) { - __GET(chnk + 4, Heap_heapend, INT32); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT32); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(128000); - __GET(Heap_heap + 4, Heap_heapend, INT32); - __PUT(Heap_heap, 0, INT32); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 2147483647; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-2147483647-1); + Heap_heap = Heap_NewChunk(128000); + __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 700aa7c2..0cf94754 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 8031a41f..e4fa8467 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 5bdee03c..34ca07fd 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index e3c859a0..aef61fc9 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index b84b0516..b4a68499 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 9ad04131..ef5a6f06 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 32c0b1ba..7b3897d4 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index afe3e355..1dc027fb 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 6ce3eb3b..1154e6b1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 4036d0d5..ffda81d3 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index befb04d5..ef53cdf5 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index cf8a66c5..6200dcea 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index cbbddc2b..13c1e7ff 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index cacb981f..6f418c8a 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index dd14992a..517844d9 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 59d053bd..4453e976 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 49d8a8f6..ac52c6ae 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapend; +static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -170,16 +170,33 @@ void Heap_INCREF (Heap_Module m) static INT64 Heap_NewChunk (INT64 blksz) { - INT64 chnk; + INT64 chnk, blk, end; chnk = Heap_OSAllocate(blksz + 24); if (chnk != 0) { - __PUT(chnk + 8, chnk + (24 + blksz), INT64); - __PUT(chnk + 24, chnk + 32, INT64); - __PUT(chnk + 32, blksz, INT64); - __PUT(chnk + 40, -8, INT64); - __PUT(chnk + 48, Heap_bigBlocks, INT64); - Heap_bigBlocks = chnk + 24; + blk = chnk + 24; + end = blk + blksz; + __PUT(chnk + 8, end, INT64); + __PUT(blk, blk + 8, INT64); + __PUT(blk + 8, blksz, INT64); + __PUT(blk + 16, -8, INT64); + __PUT(blk + 24, Heap_bigBlocks, INT64); + Heap_bigBlocks = blk; Heap_heapsize += blksz; + if (chnk > 0) { + if (chnk < Heap_heapPosMin) { + Heap_heapPosMin = blk + 8; + } + if (end > Heap_heapPosMax) { + Heap_heapPosMax = end; + } + } else { + if (chnk < Heap_heapNegMin) { + Heap_heapNegMin = blk + 8; + } + if (end > Heap_heapNegMax) { + Heap_heapNegMax = end; + } + } } return chnk; } @@ -207,9 +224,6 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } - if (next == 0) { - __GET(chnk + 8, Heap_heapend, INT64); - } } } @@ -592,7 +606,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) } while (sp != stack0) { __GET(sp, p, INT64); - if ((p > Heap_heap && p < Heap_heapend)) { + if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { if (nofcand == (INT64)cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -703,16 +717,20 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) void Heap_InitHeap (void) { - Heap_heap = Heap_NewChunk(256000); - __GET(Heap_heap + 8, Heap_heapend, INT64); - __PUT(Heap_heap, 0, INT64); + Heap_heap = 0; + Heap_heapsize = 0; Heap_allocated = 0; + Heap_lockdepth = 0; + Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMax = 0; + Heap_heapNegMin = 0; + Heap_heapNegMax = (-9223372036854775807-1); + Heap_heap = Heap_NewChunk(256000); + __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; - Heap_lockdepth = 0; Heap_FileCount = 0; Heap_modules = NIL; - Heap_heapsize = 0; Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 6f099a6c..9daf685d 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index a6cc971c..f1d1a614 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index e651d9ec..d1227884 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 5ea38d2b..f174acdc 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index de00e17c..1efe3cf3 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index b28012be..4759eb74 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1659,9 +1659,9 @@ void OPC_CompleteIdent (OPT_Object obj) OPC_Ident(obj); OPM_WriteString((CHAR*)"__", 3); } else { - OPM_WriteString((CHAR*)"((", 3); + OPM_WriteString((CHAR*)"(*(", 4); OPC_Ident(obj->typ->strobj); - OPM_Write(')'); + OPM_WriteString((CHAR*)"*)&", 4); OPC_Ident(obj); OPM_Write(')'); } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f2ef814d..a485b3c4 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index ae88d2b7..5820c0cc 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 7f78e399..0b19f055 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 1167b5aa..ccf8dbe4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 0d729ff7..6629924c 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 30737296..d5c0c747 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 4f1e8faa..87418922 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 958185d0..8122f444 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index d3950d01..019dee31 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f90939e0..a03a1aab 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 54c8695a..401db9dd 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 32c0b1ba..7b3897d4 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index c4807be1..f58803a5 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 6ecc123d..37b61a0f 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7182d9f7..eff1e977 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 1a0aae45..5361bdcd 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index a39cdedc..cc2755f0 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index f29bce42..230f60a9 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index d67ec004..ad07bc6d 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 59875b4f..79492c57 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,27 +390,27 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t if (__IS(msg__typ, Texts_CopyMsg, 1)) { Texts_CopyMsg *msg__ = (void*)msg; __NEW(e, Texts__1); - Texts_CopyElem((void*)((Texts_Alien)E), (void*)e); - e->file = ((Texts_Alien)E)->file; - e->org = ((Texts_Alien)E)->org; - e->span = ((Texts_Alien)E)->span; - __COPY(((Texts_Alien)E)->mod, e->mod, 32); - __COPY(((Texts_Alien)E)->proc, e->proc, 32); + Texts_CopyElem((void*)(*(Texts_Alien*)&E), (void*)e); + e->file = (*(Texts_Alien*)&E)->file; + e->org = (*(Texts_Alien*)&E)->org; + e->span = (*(Texts_Alien*)&E)->span; + __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { Texts_IdentifyMsg *msg__ = (void*)msg; - __COPY(((Texts_Alien)E)->mod, (*msg__).mod, 32); - __COPY(((Texts_Alien)E)->proc, (*msg__).proc, 32); + __COPY((*(Texts_Alien*)&E)->mod, (*msg__).mod, 32); + __COPY((*(Texts_Alien*)&E)->proc, (*msg__).proc, 32); (*msg__).mod[31] = 0x01; } else __WITHCHK; } else if (__IS(msg__typ, Texts_FileMsg, 1)) { if (__IS(msg__typ, Texts_FileMsg, 1)) { Texts_FileMsg *msg__ = (void*)msg; if ((*msg__).id == 1) { - Files_Set(&r, Files_Rider__typ, ((Texts_Alien)E)->file, ((Texts_Alien)E)->org); - i = ((Texts_Alien)E)->span; + Files_Set(&r, Files_Rider__typ, (*(Texts_Alien*)&E)->file, (*(Texts_Alien*)&E)->org); + i = (*(Texts_Alien*)&E)->span; while (i > 0) { Files_Read(&r, Files_Rider__typ, (void*)&ch); Files_Write(&(*msg__).r, Files_Rider__typ, ch); @@ -646,7 +646,7 @@ void Texts_Read (Texts_Reader *R, ADDRESS *R__typ, CHAR *ch) u = u->next; if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); } else __WITHCHK; } (*R).run = u; @@ -673,7 +673,7 @@ void Texts_ReadElem (Texts_Reader *R, ADDRESS *R__typ) (*R).elem = __GUARDP(u, Texts_ElemDesc, 1); if (__ISP(un, Texts_PieceDesc, 1)) { if (__ISP(un, Texts_PieceDesc, 1)) { - Files_Set(&(*R).rider, Files_Rider__typ, ((Texts_Piece)un)->file, ((Texts_Piece)un)->org); + Files_Set(&(*R).rider, Files_Rider__typ, (*(Texts_Piece*)&un)->file, (*(Texts_Piece*)&un)->org); } else __WITHCHK; } } else { @@ -1715,9 +1715,9 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) while (u != T->head) { if (__ISP(u, Texts_PieceDesc, 1)) { if (__ISP(u, Texts_PieceDesc, 1)) { - if (((Texts_Piece)u)->ascii) { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + if ((*(Texts_Piece*)&u)->ascii) { + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 0) { Files_Read(&r1, Files_Rider__typ, (void*)&ch); delta -= 1; @@ -1728,8 +1728,8 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) } } } else { - Files_Set(&r1, Files_Rider__typ, ((Texts_Piece)u)->file, ((Texts_Piece)u)->org); - delta = ((Texts_Piece)u)->len; + Files_Set(&r1, Files_Rider__typ, (*(Texts_Piece*)&u)->file, (*(Texts_Piece*)&u)->org); + delta = (*(Texts_Piece*)&u)->len; while (delta > 1024) { Files_ReadBytes(&r1, Files_Rider__typ, (void*)block, 1024, 1024); Files_WriteBytes(&msg.r, Files_Rider__typ, (void*)block, 1024, 1024); diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 8207d839..9042b9b8 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 14140265..57d8a782 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index b8dc8094..5e32e01b 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 7193bad6..18e626a3 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index b6367689..622a5a55 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/27]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From a22c894fd4d90a9a179871000274bbf6c8b4494b Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 29 Nov 2016 13:13:48 +0400 Subject: [PATCH 010/241] removed ORP PO13 compiler version from the voc source tree. -- noch --- src/voc07R/CompatTexts.Mod | 585 --------------- src/voc07R/Fonts.Mod | 146 ---- src/voc07R/ORB.Mod | 447 ------------ src/voc07R/ORG.Mod | 1134 ----------------------------- src/voc07R/ORP.Mod | 997 ------------------------- src/voc07R/ORS.Mod | 325 --------- src/voc07R/ORTool.Mod | 251 ------- src/voc07R/Oberon.Mod | 111 --- src/voc07R/Oberon10.Scn.Fnt | Bin 2284 -> 0 bytes src/voc07R/README.md | 29 - src/voc07R/makefile | 22 - src/voc07R/test/Oberon.rsc | Bin 7295 -> 0 bytes src/voc07R/test/Oberon.smb | Bin 1372 -> 0 bytes src/voc07R/test/Test.Mod | Bin 248 -> 0 bytes src/voc07R/test/Texts.rsc | Bin 12142 -> 0 bytes src/voc07R/test/Texts.smb | Bin 1212 -> 0 bytes src/voc07R/test/readme | 3 - src/voc07R/x86/CompatFiles.Mod | 677 ----------------- src/voc07R/x86_64/CompatFiles.Mod | 677 ----------------- 19 files changed, 5404 deletions(-) delete mode 100644 src/voc07R/CompatTexts.Mod delete mode 100644 src/voc07R/Fonts.Mod delete mode 100644 src/voc07R/ORB.Mod delete mode 100644 src/voc07R/ORG.Mod delete mode 100644 src/voc07R/ORP.Mod delete mode 100644 src/voc07R/ORS.Mod delete mode 100644 src/voc07R/ORTool.Mod delete mode 100644 src/voc07R/Oberon.Mod delete mode 100644 src/voc07R/Oberon10.Scn.Fnt delete mode 100644 src/voc07R/README.md delete mode 100644 src/voc07R/makefile delete mode 100644 src/voc07R/test/Oberon.rsc delete mode 100644 src/voc07R/test/Oberon.smb delete mode 100644 src/voc07R/test/Test.Mod delete mode 100644 src/voc07R/test/Texts.rsc delete mode 100644 src/voc07R/test/Texts.smb delete mode 100644 src/voc07R/test/readme delete mode 100644 src/voc07R/x86/CompatFiles.Mod delete mode 100644 src/voc07R/x86_64/CompatFiles.Mod diff --git a/src/voc07R/CompatTexts.Mod b/src/voc07R/CompatTexts.Mod deleted file mode 100644 index 8e8b45ac..00000000 --- a/src/voc07R/CompatTexts.Mod +++ /dev/null @@ -1,585 +0,0 @@ -MODULE CompatTexts; (*JG 21.11.90 / NW 11.7.90 / 24.12.95 / 22.11.10 / 26.3.2014*) - IMPORT Files := CompatFiles, Fonts; - - TYPE INTEGER = LONGINT; (* voc adaptation by noch *) - BYTE = CHAR; - - CONST (*scanner symbol classes*) - Inval* = 0; (*invalid symbol*) - Name* = 1; (*name s (length len)*) - String* = 2; (*literal string s (length len)*) - Int* = 3; (*integer i (decimal or hexadecimal)*) - Real* = 4; (*real number x*) - Char* = 6; (*special character c*) - - (* TextBlock = TextTag "1" offset run {run} "0" len {AsciiCode}. - run = fnt [name] col voff len. *) - - TAB = 9X; CR = 0DX; maxD = 9; - TextTag = 0F1X; - replace* = 0; insert* = 1; delete* = 2; unmark* = 3; (*op-codes*) - - TYPE Piece = POINTER TO PieceDesc; - PieceDesc = RECORD - f: Files.File; - off, len: LONGINT; - fnt: Fonts.Font; - col, voff: INTEGER; - prev, next: Piece - END; - - Text* = POINTER TO TextDesc; - Notifier* = PROCEDURE (T: Text; op: INTEGER; beg, end: LONGINT); - TextDesc* = RECORD - len*: LONGINT; - changed*: BOOLEAN; - notify*: Notifier; - trailer: Piece; - pce: Piece; (*cache*) - org: LONGINT; (*cache*) - END; - - Reader* = RECORD - eot*: BOOLEAN; - fnt*: Fonts.Font; - col*, voff*: INTEGER; - ref: Piece; - org: LONGINT; - off: LONGINT; - rider: Files.Rider - END; - - Scanner* = RECORD (Reader) - nextCh*: CHAR; - line*, class*: INTEGER; - i*: LONGINT; - x*: REAL; - y*: LONGREAL; - c*: CHAR; - len*: INTEGER; - s*: ARRAY 32 OF CHAR - END; - - Buffer* = POINTER TO BufDesc; - BufDesc* = RECORD - len*: LONGINT; - header, last: Piece - END; - - Writer* = RECORD - buf*: Buffer; - fnt*: Fonts.Font; - col*, voff*: INTEGER; - rider: Files.Rider - END; - - VAR TrailerFile: Files.File; - - (* voc adaptation by noch *) - PROCEDURE FLOOR(x : REAL): INTEGER; - BEGIN - RETURN ENTIER(x) - END FLOOR; - - PROCEDURE LSL (x, n : INTEGER): INTEGER; - BEGIN - RETURN ASH(x, n); - END LSL; - - PROCEDURE ASR (x, n : INTEGER): INTEGER; - BEGIN - RETURN ASH(x, n); - END ASR; - - - (* -------------------- Filing ------------------------*) - - PROCEDURE Trailer(): Piece; - VAR Q: Piece; - BEGIN NEW(Q); - Q.f := TrailerFile; Q.off := -1; Q.len := 1; Q.fnt := NIL; Q.col := 0; Q.voff := 0; RETURN Q - END Trailer; - - PROCEDURE Load* (VAR R: Files.Rider; T: Text); - VAR Q, q, p: Piece; - off: LONGINT; - N, fno: INTEGER; bt: BYTE; - f: Files.File; - FName: ARRAY 32 OF CHAR; - Dict: ARRAY 32 OF Fonts.Font; - BEGIN f := Files.Base(R); N := 1; Q := Trailer(); p := Q; - Files.ReadInt(R, off); Files.ReadByte(R, bt); - (*fno := bt;*) - fno := ORD(bt); (* voc adaptation by noch *) - WHILE fno # 0 DO - IF fno = N THEN - Files.ReadString(R, FName); - Dict[N] := Fonts.This(FName); INC(N) - END; - NEW(q); q.fnt := Dict[fno]; - Files.ReadByte(R, bt); - (*q.col := bt;*) - q.col := ORD(bt); (* voc adaptation by noch *) - Files.ReadByte(R, bt); - (*q.voff := ASR(LSL(bt, -24), 24);*) - q.voff := ASR(LSL(ORD(bt), -24), 24); (* voc adaptation by noch *) - Files.ReadInt(R, q.len); - Files.ReadByte(R, bt); - (*fno := bt;*) - fno := ORD(bt); (* voc adaptation by noch *) - q.f := f; q.off := off; off := off + q.len; - p.next := q; q.prev := p; p := q - END; - p.next := Q; Q.prev := p; - T.trailer := Q; Files.ReadInt(R, T.len); (*Files.Set(R, f, Files.Pos(R) + T.len)*) - END Load; - - PROCEDURE Open* (T: Text; name: ARRAY OF CHAR); - VAR f: Files.File; R: Files.Rider; Q, q: Piece; - tag: CHAR; len: LONGINT; - BEGIN f := Files.Old(name); - IF f # NIL THEN - Files.Set(R, f, 0); Files.Read(R, tag); - IF tag = TextTag THEN Load(R, T) - ELSE (*Ascii file*) - len := Files.Length(f); Q := Trailer(); - NEW(q); q.fnt := Fonts.Default; q.col := 1; q.voff := 0; q.f := f; q.off := 0; q.len := len; - Q.next := q; q.prev := Q; q.next := Q; Q.prev := q; T.trailer := Q; T.len := len - END - ELSE (*create new text*) - Q := Trailer(); Q.next := Q; Q.prev := Q; T.trailer := Q; T.len := 0 - END ; - T.changed := FALSE; T.org := -1; T.pce := T.trailer (*init cache*) - END Open; - - PROCEDURE Store* (VAR W: Files.Rider; T: Text); - VAR p, q: Piece; - R: Files.Rider; - off, rlen, pos: LONGINT; - N, n: INTEGER; - ch: CHAR; - Dict: ARRAY 32, 32 OF CHAR; - BEGIN pos := Files.Pos(W); Files.WriteInt(W, 0); (*place holder*) - N := 1; p := T.trailer.next; - WHILE p # T.trailer DO - rlen := p.len; q := p.next; - WHILE (q # T.trailer) & (q.fnt = p.fnt) & (q.col = p.col) & (q.voff = p.voff) DO - rlen := rlen + q.len; q := q.next - END; - (*Dict[N] := p.fnt.name;*) - IF p.fnt # NIL THEN COPY(p.fnt.name, Dict[N]) END; (* voc adaptation by noch *) - n := 1; - IF p.fnt # NIL THEN (* voc adaptation by noch *) - WHILE Dict[n] # p.fnt.name DO INC(n) END; - END; - (*Files.WriteByte(W, n);*) - Files.WriteByte(W, SHORT(SHORT(n))); (* voc adaptation by noch *) - IF p.fnt # NIL THEN (* voc adaptation by noch *) - IF n = N THEN Files.WriteString(W, p.fnt.name); INC(N) END; - END; - (*Files.WriteByte(W, p.col);*) - Files.WriteByte(W, SHORT(SHORT(p.col))); (* voc adaptation by noch *) - (*Files.WriteByte(W, p.voff);*) - Files.WriteByte(W, SHORT(SHORT(p.voff))); (* voc adaptation by noch *) - Files.WriteInt(W, rlen); - p := q - END; - Files.WriteByte(W, 0); Files.WriteInt(W, T.len); - off := Files.Pos(W); p := T.trailer.next; - WHILE p # T.trailer DO - rlen := p.len; Files.Set(R, p.f, p.off); - WHILE rlen > 0 DO Files.Read(R, ch); Files.Write(W, ch); DEC(rlen) END ; - p := p.next - END ; - Files.Set(W, Files.Base(W), pos); Files.WriteInt(W, off); (*fixup*) - T.changed := FALSE; - IF T.notify # NIL THEN T.notify(T, unmark, 0, 0) END - END Store; - - PROCEDURE Close*(T: Text; name: ARRAY OF CHAR); - VAR f: Files.File; w: Files.Rider; - BEGIN f := Files.New(name); Files.Set(w, f, 0); - Files.Write(w, TextTag); Store(w, T); Files.Register(f) - END Close; - - (* -------------------- Editing ----------------------- *) - - PROCEDURE OpenBuf* (B: Buffer); - BEGIN NEW(B.header); (*null piece*) - B.last := B.header; B.len := 0 - END OpenBuf; - - PROCEDURE FindPiece (T: Text; pos: LONGINT; VAR org: LONGINT; VAR pce: Piece); - VAR p: Piece; porg: LONGINT; - BEGIN p := T.pce; porg := T.org; - IF pos >= porg THEN - WHILE pos >= porg + p.len DO INC(porg, p.len); p := p.next END - ELSE p := p.prev; DEC(porg, p.len); - WHILE pos < porg DO p := p.prev; DEC(porg, p.len) END - END ; - T.pce := p; T.org := porg; (*update cache*) - pce := p; org := porg - END FindPiece; - - PROCEDURE SplitPiece (p: Piece; off: LONGINT; VAR pr: Piece); - VAR q: Piece; - BEGIN - IF off > 0 THEN NEW(q); - q.fnt := p.fnt; q.col := p.col; q.voff := p.voff; - q.len := p.len - off; - q.f := p.f; q.off := p.off + off; - p.len := off; - q.next := p.next; p.next := q; - q.prev := p; q.next.prev := q; - pr := q - ELSE pr := p - END - END SplitPiece; - - PROCEDURE Save* (T: Text; beg, end: LONGINT; B: Buffer); - VAR p, q, qb, qe: Piece; org: LONGINT; - BEGIN - IF end > T.len THEN end := T.len END; - FindPiece(T, beg, org, p); - NEW(qb); qb^ := p^; - qb.len := qb.len - (beg - org); - qb.off := qb.off + (beg - org); - qe := qb; - WHILE end > org + p.len DO - org := org + p.len; p := p.next; - NEW(q); q^ := p^; qe.next := q; q.prev := qe; qe := q - END; - qe.next := NIL; qe.len := qe.len - (org + p.len - end); - B.last.next := qb; qb.prev := B.last; B.last := qe; - B.len := B.len + (end - beg) - END Save; - - PROCEDURE Copy* (SB, DB: Buffer); - VAR Q, q, p: Piece; - BEGIN p := SB.header; Q := DB.last; - WHILE p # SB.last DO p := p.next; - NEW(q); q^ := p^; Q.next := q; q.prev := Q; Q := q - END; - DB.last := Q; DB.len := DB.len + SB.len - END Copy; - - PROCEDURE Insert* (T: Text; pos: LONGINT; B: Buffer); - VAR pl, pr, p, qb, qe: Piece; org, end: LONGINT; - BEGIN - FindPiece(T, pos, org, p); SplitPiece(p, pos - org, pr); - IF T.org >= org THEN T.org := org - p.prev.len; T.pce := p.prev END ; - pl := pr.prev; qb := B.header.next; - IF (qb # NIL) & (qb.f = pl.f) & (qb.off = pl.off + pl.len) - & (qb.fnt = pl.fnt) & (qb.col = pl.col) & (qb.voff = pl.voff) THEN - pl.len := pl.len + qb.len; qb := qb.next - END; - IF qb # NIL THEN qe := B.last; - qb.prev := pl; pl.next := qb; qe.next := pr; pr.prev := qe - END; - T.len := T.len + B.len; end := pos + B.len; - B.last := B.header; B.last.next := NIL; B.len := 0; - T.changed := TRUE; - (*T.notify(T, insert, pos, end)*) - IF T.notify # NIL THEN - T.notify(T, insert, pos, end) - END(* voc adaptation by noch *) - END Insert; - - PROCEDURE Append* (T: Text; B: Buffer); - BEGIN Insert(T, T.len, B) - END Append; - - PROCEDURE Delete* (T: Text; beg, end: LONGINT; B: Buffer); - VAR pb, pe, pbr, per: Piece; orgb, orge: LONGINT; - BEGIN - IF end > T.len THEN end := T.len END; - FindPiece(T, beg, orgb, pb); SplitPiece(pb, beg - orgb, pbr); - FindPiece(T, end, orge, pe); - SplitPiece(pe, end - orge, per); - IF T.org >= orgb THEN (*adjust cache*) - T.org := orgb - pb.prev.len; T.pce := pb.prev - END; - B.header.next := pbr; B.last := per.prev; - B.last.next := NIL; B.len := end - beg; - per.prev := pbr.prev; pbr.prev.next := per; - T.len := T.len - B.len; - T.changed := TRUE; - IF T.notify # NIL THEN (* noch *) - T.notify(T, delete, beg, end) - END - END Delete; - - PROCEDURE ChangeLooks* (T: Text; beg, end: LONGINT; sel: SET; fnt: Fonts.Font; col, voff: INTEGER); - VAR pb, pe, p: Piece; org: LONGINT; - BEGIN - IF end > T.len THEN end := T.len END; - FindPiece(T, beg, org, p); SplitPiece(p, beg - org, pb); - FindPiece(T, end, org, p); SplitPiece(p, end - org, pe); - p := pb; - REPEAT - IF 0 IN sel THEN p.fnt := fnt END; - IF 1 IN sel THEN p.col := col END; - IF 2 IN sel THEN p.voff := voff END; - p := p.next - UNTIL p = pe; - T.changed := TRUE; - IF T.notify # NIL THEN (* noch *) - T.notify(T, replace, beg, end) - END - END ChangeLooks; - - PROCEDURE Attributes*(T: Text; pos: LONGINT; VAR fnt: Fonts.Font; VAR col, voff: INTEGER); - VAR p: Piece; org: LONGINT; - BEGIN FindPiece(T, pos, org, p); fnt := p.fnt; col := p.col; voff := p.voff - END Attributes; - - (* ------------------ Access: Readers ------------------------- *) - - PROCEDURE OpenReader* (VAR R: Reader; T: Text; pos: LONGINT); - VAR p: Piece; org: LONGINT; - BEGIN FindPiece(T, pos, org, p); - R.ref := p; R.org := org; R.off := pos - org; - Files.Set(R.rider, p.f, p.off + R.off); R.eot := FALSE - END OpenReader; - - PROCEDURE Read* (VAR R: Reader; VAR ch: CHAR); - BEGIN Files.Read(R.rider, ch); - R.fnt := R.ref.fnt; R.col := R.ref.col; R.voff := R.ref.voff; - INC(R.off); - IF R.off = R.ref.len THEN - IF R.ref.f = TrailerFile THEN R.eot := TRUE END; - R.org := R.org + R.off; R.off := 0; - R.ref := R.ref.next; R.org := R.org + R.off; R.off := 0; - Files.Set(R.rider, R.ref.f, R.ref.off) - END - END Read; - - PROCEDURE Pos* (VAR R: Reader): LONGINT; - BEGIN RETURN R.org + R.off - END Pos; - - (* ------------------ Access: Scanners (NW) ------------------------- *) - - PROCEDURE OpenScanner* (VAR S: Scanner; T: Text; pos: LONGINT); - BEGIN OpenReader(S, T, pos); S.line := 0; S.nextCh := " " - END OpenScanner; - - (*floating point formats: - x = 1.m * 2^(e-127) bit 0: sign, bits 1- 8: e, bits 9-31: m - x = 1.m * 2^(e-1023) bit 0: sign, bits 1-11: e, bits 12-63: m *) - - PROCEDURE Ten(n: INTEGER): REAL; - VAR t, p: REAL; - BEGIN t := 1.0; p := 10.0; (*compute 10^n *) - WHILE n > 0 DO - IF ODD(n) THEN t := p * t END ; - p := p*p; n := n DIV 2 - END ; - RETURN t - END Ten; - - PROCEDURE Scan* (VAR S: Scanner); - CONST maxExp = 38; maxM = 16777216; (*2^24*) - VAR ch, term: CHAR; - neg, negE, hex: BOOLEAN; - i, j, h, d, e, n, s: INTEGER; - k: LONGINT; - x: REAL; - BEGIN ch := S.nextCh; i := 0; - WHILE (ch = " ") OR (ch = TAB) OR (ch = CR) DO - IF ch = CR THEN INC(S.line) END ; - Read(S, ch) - END ; - IF ("A" <= ch) & (ch <= "Z") OR ("a" <= ch) & (ch <= "z") THEN (*name*) - REPEAT S.s[i] := ch; INC(i); Read(S, ch) - UNTIL ((ch < "0") & (ch # ".") OR ("9" < ch) & (ch < "A") OR ("Z" < ch) & (ch < "a") OR ("z" < ch)) OR (i = 31); - S.s[i] := 0X; S.len := i; S.class := Name - ELSIF ch = 22X THEN (*string*) - Read(S, ch); - WHILE (ch # 22X) & (ch >= " ") & (i # 31) DO S.s[i] := ch; INC(i); Read(S, ch) END; - S.s[i] := 0X; S.len := i+1; Read(S, ch); S.class := String - ELSE hex := FALSE; - IF ch = "-" THEN neg := TRUE; Read(S, ch) ELSE neg := FALSE END ; - IF ("0" <= ch) & (ch <= "9") THEN (*number*) - n := ORD(ch) - 30H; h := n; Read(S, ch); - WHILE ("0" <= ch) & (ch <= "9") OR ("A" <= ch) & (ch <= "F") DO - IF ch <= "9" THEN d := ORD(ch) - 30H ELSE d := ORD(ch) - 37H; hex := TRUE END ; - n := 10*n + d; h := 10H*h + d; Read(S, ch) - END ; - IF ch = "H" THEN (*hex integer*) Read(S, ch); S.i := h; S.class := Int (*neg?*) - ELSIF ch = "." THEN (*real number*) - Read(S, ch); x := 0.0; e := 0; j := 0; - WHILE ("0" <= ch) & (ch <= "9") DO (*fraction*) - h := 10*n + (ORD(ch) - 30H); - IF h < maxM THEN n := h; INC(j) END ; - Read(S, ch) - END ; - IF ch = "E" THEN (*scale factor*) - s := 0; Read(S, ch); - IF ch = "-" THEN negE := TRUE; Read(S, ch) - ELSE negE := FALSE; - IF ch = "+" THEN Read(S, ch) END - END ; - WHILE ("0" <= ch) & (ch <= "9") DO - s := s*10 + ORD(ch) - 30H; Read(S, ch) - END ; - IF negE THEN DEC(e, s) ELSE INC(e, s) END ; - END ; - (*x := FLT(n);*) - x := n; (* voc adaptation by noch *) - DEC(e, j); - IF e < 0 THEN - IF e >= -maxExp THEN x := x / Ten(-e) ELSE x := 0.0 END - ELSIF e > 0 THEN - IF e <= maxExp THEN x := Ten(e) * x ELSE x := 0.0 END - END ; - IF neg THEN S.x := -x ELSE S.x := x END ; - IF hex THEN S.class := 0 ELSE S.class := Real END - ELSE (*decimal integer*) - IF neg THEN S.i := -n ELSE S.i := n END; - IF hex THEN S.class := Inval ELSE S.class := Int END - END - ELSE (*spectal character*) S.class := Char; - IF neg THEN S.c := "-" ELSE S.c := ch; Read(S, ch) END - END - END ; - S.nextCh := ch - END Scan; - - (* --------------- Access: Writers (NW) ------------------ *) - - PROCEDURE OpenWriter* (VAR W: Writer); - BEGIN NEW(W.buf); - OpenBuf(W.buf); W.fnt := Fonts.Default; W.col := 15; W.voff := 0; - Files.Set(W.rider, Files.New(""), 0) - END OpenWriter; - - PROCEDURE SetFont* (VAR W: Writer; fnt: Fonts.Font); - BEGIN W.fnt := fnt - END SetFont; - - PROCEDURE SetColor* (VAR W: Writer; col: INTEGER); - BEGIN W.col := col - END SetColor; - - PROCEDURE SetOffset* (VAR W: Writer; voff: INTEGER); - BEGIN W.voff := voff - END SetOffset; - - PROCEDURE Write* (VAR W: Writer; ch: CHAR); - VAR p: Piece; - BEGIN - IF (W.buf.last.fnt # W.fnt) OR (W.buf.last.col # W.col) OR (W.buf.last.voff # W.voff) THEN - NEW(p); p.f := Files.Base(W.rider); p.off := Files.Pos(W.rider); p.len := 0; - p.fnt := W.fnt; p.col := W.col; p.voff:= W.voff; - p.next := NIL; W.buf.last.next := p; - p.prev := W.buf.last; W.buf.last := p - END; - Files.Write(W.rider, ch); - INC(W.buf.last.len); INC(W.buf.len) - END Write; - - PROCEDURE WriteLn* (VAR W: Writer); - BEGIN Write(W, CR) - END WriteLn; - - PROCEDURE WriteString* (VAR W: Writer; s: ARRAY OF CHAR); - VAR i: INTEGER; - BEGIN i := 0; - WHILE s[i] >= " " DO Write(W, s[i]); INC(i) END - END WriteString; - - PROCEDURE WriteInt* (VAR W: Writer; x, n: LONGINT); - VAR i: INTEGER; x0: LONGINT; - a: ARRAY 10 OF CHAR; - BEGIN - (*IF ROR(x, 31) = 1 THEN WriteString(W, " -2147483648") - ELSE*) i := 0; (* voc adaptation by noch *) - IF x < 0 THEN DEC(n); x0 := -x ELSE x0 := x END; - REPEAT - a[i] := CHR(x0 MOD 10 + 30H); x0 := x0 DIV 10; INC(i) - UNTIL x0 = 0; - WHILE n > i DO Write(W, " "); DEC(n) END; - IF x < 0 THEN Write(W, "-") END; - REPEAT DEC(i); Write(W, a[i]) UNTIL i = 0 - (*END*) - END WriteInt; - - PROCEDURE WriteHex* (VAR W: Writer; x: LONGINT); - VAR i: INTEGER; y: LONGINT; - a: ARRAY 10 OF CHAR; - BEGIN i := 0; Write(W, " "); - REPEAT y := x MOD 10H; - IF y < 10 THEN a[i] := CHR(y + 30H) ELSE a[i] := CHR(y + 37H) END; - x := x DIV 10H; INC(i) - UNTIL i = 8; - REPEAT DEC(i); Write(W, a[i]) UNTIL i = 0 - END WriteHex; -(* commented out because it's not necessary to compile OR compiler; -- noch - PROCEDURE WriteReal* (VAR W: Writer; x: REAL; n: INTEGER); - VAR e, i, m: INTEGER; x0: REAL; neg: BOOLEAN; - d: ARRAY 16 OF CHAR; - BEGIN - IF x = 0.0 THEN - WriteString(W, " 0.0"); i := 5; - WHILE i < n DO Write(W, " "); INC(i) END - ELSE - IF x < 0.0 THEN x := -x; neg := TRUE ELSE neg := FALSE END ; - x0 := x; UNPK(x0, e); - IF e = 255 THEN WriteString(W, " NaN") - ELSE - REPEAT Write(W, " "); DEC(n) UNTIL n <= 14; - IF neg THEN Write(W, "-") ELSE Write(W, " ") END ; - e := e * 77 DIV 256 - 6; - IF e >= 0 THEN x := x / Ten(e) ELSE x := x * Ten(-e) END ; - IF x >= 10.0E6 THEN x := 0.1*x; INC(e) END ; - m := FLOOR(x + 0.5); i := 0; - IF x >= 10.0E6 THEN x := 0.1*x; INC(e) END ; - REPEAT d[i] := CHR(m MOD 10 + 30H); m := m DIV 10; INC(i) UNTIL m = 0; - DEC(i); Write(W, d[i]); Write(W, "."); - IF i < n-6 THEN n := 0 ELSE n := 13-n END ; - WHILE i > n DO DEC(i); Write(W, d[i]) END ; - Write(W, "E"); INC(e, 6); - IF e < 0 THEN Write(W, "-"); e := -e ELSE Write(W, "+") END ; - Write(W, CHR(e DIV 10 + 30H)); Write(W, CHR(e MOD 10 + 30H)) - END - END - END WriteReal; - *) - PROCEDURE WriteRealFix* (VAR W: Writer; x: REAL; n, k: INTEGER); - VAR i, m: INTEGER; neg: BOOLEAN; - d: ARRAY 12 OF CHAR; - BEGIN - IF x = 0.0 THEN WriteString(W, " 0") - ELSE - IF x < 0.0 THEN x := -x; neg := TRUE ELSE neg := FALSE END ; - IF k > 7 THEN k := 7 END ; - x := Ten(k) * x; m := FLOOR(x + 0.5); - i := 0; - REPEAT d[i] := CHR(m MOD 10 + 30H); m := m DIV 10; INC(i) UNTIL m = 0; - REPEAT Write(W, " "); DEC(n) UNTIL n <= i+3; - IF neg THEN Write(W, "-"); DEC(n) ELSE Write(W, " ") END ; - WHILE i > k DO DEC(i); Write(W, d[i]) END ; - Write(W, "."); - WHILE k > i DO DEC(k); Write(W, "0") END ; - WHILE i > 0 DO DEC(i); Write(W, d[i]) END - END - END WriteRealFix; - - PROCEDURE WritePair(VAR W: Writer; ch: CHAR; x: LONGINT); - BEGIN Write(W, ch); - Write(W, CHR(x DIV 10 + 30H)); Write(W, CHR(x MOD 10 + 30H)) - END WritePair; - - PROCEDURE WriteClock* (VAR W: Writer; d: LONGINT); - BEGIN - WritePair(W, " ", d DIV 20000H MOD 20H); (*day*) - WritePair(W, ".", d DIV 400000H MOD 10H); (*month*) - WritePair(W, ".", d DIV 4000000H MOD 40H); (*year*) - WritePair(W, " ", d DIV 1000H MOD 20H); (*hour*) - WritePair(W, ":", d DIV 40H MOD 40H); (*min*) - WritePair(W, ":", d MOD 40H) (*sec*) - END WriteClock; - -BEGIN TrailerFile := Files.New("") -END CompatTexts. diff --git a/src/voc07R/Fonts.Mod b/src/voc07R/Fonts.Mod deleted file mode 100644 index 15dabaf1..00000000 --- a/src/voc07R/Fonts.Mod +++ /dev/null @@ -1,146 +0,0 @@ -MODULE Fonts; (*JG 18.11.90; PDR 8.6.12; NW 25.3.2013*) - IMPORT SYSTEM, Files := CompatFiles; - - TYPE INTEGER = LONGINT; (* voc adaptation by noch *) - BYTE = CHAR; - - CONST FontFileId = 0DBH; - - TYPE Font* = POINTER TO FontDesc; - FontDesc* = RECORD - name*: ARRAY 32 OF CHAR; - height*, minX*, maxX*, minY*, maxY*: INTEGER; - next*: Font; - T: ARRAY 128 OF INTEGER; - raster: ARRAY 2360 OF BYTE - END ; - - LargeFontDesc = RECORD (FontDesc) ext: ARRAY 2560 OF BYTE END ; - LargeFont = POINTER TO LargeFontDesc; - - (* raster sizes: Syntax8 1367, Syntax10 1628, Syntax12 1688, Syntax14 1843, Syntax14b 1983, - Syntax16 2271, Syntax20 3034, Syntac24 4274, Syntax24b 4302 *) - -VAR Default*, root*: Font; - -PROCEDURE GetPat*(fnt: Font; ch: CHAR; VAR dx, x, y, w, h, patadr: INTEGER); - VAR pa: INTEGER; dxb, xb, yb, wb, hb: BYTE; -BEGIN pa := fnt.T[ORD(ch) MOD 80H]; patadr := pa; - SYSTEM.GET(pa-3, dxb); SYSTEM.GET(pa-2, xb); SYSTEM.GET(pa-1, yb); SYSTEM.GET(pa, wb); SYSTEM.GET(pa+1, hb); - (*dx := dxb;*) - dx := ORD(dxb); (* voc adaptation by noch *) - (*x := xb;*) - x := ORD(xb); (* voc adaptation by noch *) - (*y := yb;*) - y := ORD(yb); (* voc adaptation by noch *) - (*w := wb;*) - w := ORD(wb); (* voc adaptation by noch *) - (*h := hb;*) - h := ORD(hb); (* voc adaptation by noch *) - (*IF yb < 128 THEN y := yb ELSE y := yb - 256 END*) - IF ORD(yb) < 128 THEN y := ORD(yb) ELSE y := ORD(yb) - 256 END (* voc adaptation by noch *) -END GetPat; - -PROCEDURE This*(name: ARRAY OF CHAR): Font; - - TYPE RunRec = RECORD beg, end: BYTE END ; - BoxRec = RECORD dx, x, y, w, h: BYTE END ; - - VAR F: Font; LF: LargeFont; - f: Files.File; R: Files.Rider; - NofRuns, NofBoxes: BYTE; - NofBytes: INTEGER; - height, minX, maxX, minY, maxY: BYTE; - i, j, k, m, n: INTEGER; - a, a0: INTEGER; - b, beg, end: BYTE; - run: ARRAY 16 OF RunRec; - box: ARRAY 512 OF BoxRec; - - PROCEDURE RdInt16(VAR R: Files.Rider; VAR b0: BYTE); - VAR b1: BYTE; - BEGIN Files.ReadByte(R, b0); Files.ReadByte(R, b1) - END RdInt16; - -BEGIN F := root; - WHILE (F # NIL) & (name # F.name) DO F := F.next END; - IF F = NIL THEN - f := Files.Old(name); - IF f # NIL THEN - Files.Set(R, f, 0); Files.ReadByte(R, b); - (*IF b = FontFileId THEN*) - IF ORD(b) = FontFileId THEN (* voc adaptation by noch *) - Files.ReadByte(R, b); (*abstraction*) - Files.ReadByte(R, b); (*family*) - Files.ReadByte(R, b); (*variant*) - NEW(F); - (*F.name := name;*) - COPY(name, F.name); (* voc adaptation by noch *) - RdInt16(R, height); RdInt16(R, minX); RdInt16(R, maxX); RdInt16(R, minY); RdInt16(R, maxY); RdInt16(R, NofRuns); - (*NofBoxes := 0;*) (* voc adaptation by noch *) - NofBoxes := 0X; - k := 0; - (*WHILE k # NofRuns DO*) - WHILE k # ORD(NofRuns) DO (* voc adaptation by noch *) - RdInt16(R, beg); - run[k].beg := beg; RdInt16(R, end); - run[k].end := end; - (*NofBoxes := NofBoxes + end - beg;*) - NofBoxes := CHR(ORD(NofBoxes) + ORD(end) - ORD(beg)); (* voc adaptation by noch *) - INC(k) - END; - NofBytes := 5; j := 0; - (*WHILE j # NofBoxes DO*) - WHILE j # ORD(NofBoxes) DO (* voc adaptation by noch *) - RdInt16(R, box[j].dx); RdInt16(R, box[j].x); RdInt16(R, box[j].y); - RdInt16(R, box[j].w); RdInt16(R, box[j].h); - (*NofBytes := NofBytes + 5 + (box[j].w + 7) DIV 8 * box[j].h;*) - NofBytes := (NofBytes + 5 + (ORD(box[j].w) + 7) DIV 8 * ORD(box[j].h)); (* voc adaptation by noch *) - INC(j) - END; - IF NofBytes < 2300 THEN NEW(F) ELSE NEW(LF); F := LF END ; - (*F.name := name;*) - COPY(name, F.name); (* voc adaptation by noch *) - (*F.height := height; F.minX := minX; F.maxX := maxX; F.maxY := maxY;*) - F.height := ORD(height); F.minX := ORD(minX); F.maxX := ORD(maxX); F.maxY := ORD(maxY); (* voc adaptation by noch *) - (*IF minY >= 80H THEN F.minY := minY - 100H ELSE F.minY := minY END ;*) - IF ORD(minY) >= 80H THEN F.minY := ORD(minY) - 100H ELSE F.minY := ORD(minY) END ; (* voc adaptation by noch *) - a0 := SYSTEM.ADR(F.raster); - SYSTEM.PUT(a0, 0X); SYSTEM.PUT(a0+1, 0X); SYSTEM.PUT(a0+2, 0X); SYSTEM.PUT(a0+3, 0X); SYSTEM.PUT(a0+4, 0X); - (*null pattern for characters not in a run*) - INC(a0, 2); a := a0+3; j := 0; k := 0; m := 0; - (*WHILE k < NofRuns DO*) - WHILE k < ORD(NofRuns) DO - (*WHILE (m < run[k].beg) & (m < 128) DO F.T[m] := a0; INC(m) END;*) - WHILE (m < ORD(run[k].beg)) & (m < 128) DO F.T[m] := a0; INC(m) END; (* voc adaptation by noch *) - (*WHILE (m < run[k].end) & (m < 128) DO*) (* voc adaptation by noch *) - WHILE (m < ORD(run[k].end)) & (m < 128) DO - F.T[m] := a+3; - SYSTEM.PUT(a, box[j].dx); SYSTEM.PUT(a+1, box[j].x); SYSTEM.PUT(a+2, box[j].y); - SYSTEM.PUT(a+3, box[j].w); SYSTEM.PUT(a+4, box[j].h); INC(a, 5); - (*n := (box[j].w + 7) DIV 8 * box[j].h;*) - n := (ORD(box[j].w) + 7) DIV 8 * ORD(box[j].h); (* voc adaptation by noch *) - WHILE n # 0 DO DEC(n); Files.ReadByte(R, b); SYSTEM.PUT(a, b); INC(a) END ; - INC(j); INC(m) - END; - INC(k) - END; - WHILE m < 128 DO F.T[m] := a0; INC(m) END ; - F.next := root; root := F - ELSE (*bad file id*) F := Default - END - ELSE (*font file not available*) F := Default - END - END; - RETURN F -END This; - -PROCEDURE Free*; (*remove all but first two from font list*) - VAR f: Font; -BEGIN f := root.next; - IF f # NIL THEN f := f.next END ; - f.next := NIL -END Free; - -BEGIN root := NIL; Default := This("Oberon10.Scn.Fnt") -END Fonts. diff --git a/src/voc07R/ORB.Mod b/src/voc07R/ORB.Mod deleted file mode 100644 index 3427bb2e..00000000 --- a/src/voc07R/ORB.Mod +++ /dev/null @@ -1,447 +0,0 @@ -MODULE ORB; (*NW 25.6.2014 in Oberon-07*) - IMPORT Files := CompatFiles (* voc adaptation by noch *) - , ORS; - (*Definition of data types Object and Type, which together form the data structure - called "symbol table". Contains procedures for creation of Objects, and for search: - NewObj, this, thisimport, thisfield (and OpenScope, CloseScope). - Handling of import and export, i.e. reading and writing of "symbol files" is done by procedures - Import and Export. This module contains the list of standard identifiers, with which - the symbol table (universe), and that of the pseudo-module SYSTEM are initialized. *) - - TYPE INTEGER = LONGINT; (* voc adaptation by noch *) - BYTE = CHAR; - - CONST versionkey* = 1; maxTypTab = 64; - (* class values*) Head* = 0; - Const* = 1; Var* = 2; Par* = 3; Fld* = 4; Typ* = 5; - SProc* = 6; SFunc* = 7; Mod* = 8; - - (* form values*) - Byte* = 1; Bool* = 2; Char* = 3; Int* = 4; Real* = 5; Set* = 6; - Pointer* = 7; NilTyp* = 8; NoTyp* = 9; Proc* = 10; - String* = 11; Array* = 12; Record* = 13; - - TYPE Object* = POINTER TO ObjDesc; - Module* = POINTER TO ModDesc; - Type* = POINTER TO TypeDesc; - - ObjDesc*= RECORD - class*, lev*, exno*: INTEGER; - expo*, rdo*: BOOLEAN; (*exported / read-only*) - next*, dsc*: Object; - type*: Type; - name*: ORS.Ident; - val*: LONGINT - END ; - - ModDesc* = RECORD (ObjDesc) orgname*: ORS.Ident END ; - - TypeDesc* = RECORD - form*, ref*, mno*: INTEGER; (*ref is only used for import/export*) - nofpar*: INTEGER; (*for procedures, extension level for records*) - len*: LONGINT; (*for arrays, len < 0 => open array; for records: adr of descriptor*) - dsc*, typobj*: Object; - base*: Type; (*for arrays, records, pointers*) - size*: LONGINT; (*in bytes; always multiple of 4, except for Byte, Bool and Char*) - END ; - - (* Object classes and the meaning of "val": - class val - ---------- - Var address - Par address - Const value - Fld offset - Typ type descriptor (TD) address - SProc inline code number - SFunc inline code number - Mod key - - Type forms and the meaning of "dsc" and "base": - form dsc base - ------------------------ - Pointer - type of dereferenced object - Proc params result type - Array - type of elements - Record fields extension *) - - VAR topScope*, universe, system*: Object; - byteType*, boolType*, charType*: Type; - intType*, realType*, setType*, nilType*, noType*, strType*: Type; - nofmod, Ref: INTEGER; - typtab: ARRAY maxTypTab OF Type; - - PROCEDURE NewObj*(VAR obj: Object; id: ORS.Ident; class: INTEGER); (*insert new Object with name id*) - VAR new, x: Object; - BEGIN x := topScope; - WHILE (x.next # NIL) & (x.next.name # id) DO x := x.next END ; - IF x.next = NIL THEN - NEW(new); new.name := id; new.class := class; new.next := NIL; new.rdo := FALSE; new.dsc := NIL; - x.next := new; obj := new - ELSE obj := x.next; ORS.Mark("mult def") - END - END NewObj; - - PROCEDURE thisObj*(): Object; - VAR s, x: Object; - BEGIN s := topScope; - REPEAT x := s.next; - WHILE (x # NIL) & (x.name # ORS.id) DO x := x.next END ; - s := s.dsc - UNTIL (x # NIL) OR (s = NIL); - RETURN x - END thisObj; - - PROCEDURE thisimport*(mod: Object): Object; - VAR obj: Object; - BEGIN - IF mod.rdo THEN - IF mod.name[0] # 0X THEN - obj := mod.dsc; - WHILE (obj # NIL) & (obj.name # ORS.id) DO obj := obj.next END - ELSE obj := NIL - END - ELSE obj := NIL - END ; - RETURN obj - END thisimport; - - PROCEDURE thisfield*(rec: Type): Object; - VAR fld: Object; - BEGIN fld := rec.dsc; - WHILE (fld # NIL) & (fld.name # ORS.id) DO fld := fld.next END ; - RETURN fld - END thisfield; - - PROCEDURE OpenScope*; - VAR s: Object; - BEGIN NEW(s); s.class := Head; s.dsc := topScope; s.next := NIL; topScope := s - END OpenScope; - - PROCEDURE CloseScope*; - BEGIN topScope := topScope.dsc - END CloseScope; - - (*------------------------------- Import ---------------------------------*) - - PROCEDURE MakeFileName*(VAR FName: ORS.Ident; name, ext: ARRAY OF CHAR); - VAR i, j: INTEGER; - BEGIN i := 0; j := 0; (*assume name suffix less than 4 characters*) - WHILE (i < ORS.IdLen-5) & (name[i] > 0X) DO FName[i] := name[i]; INC(i) END ; - REPEAT FName[i]:= ext[j]; INC(i); INC(j) UNTIL ext[j] = 0X; - FName[i] := 0X - END MakeFileName; - - PROCEDURE ThisModule(name, orgname: ORS.Ident; non: BOOLEAN; key: LONGINT): Object; - VAR mod: Module; obj, obj1: Object; - BEGIN obj1 := topScope; obj := obj1.next; (*search for module*) - WHILE (obj # NIL) & (obj.name # name) DO obj1 := obj; obj := obj1.next END ; - IF obj = NIL THEN (*insert new module*) - NEW(mod); mod.class := Mod; mod.rdo := FALSE; - mod.name := name; mod.orgname := orgname; mod.val := key; - mod.lev := nofmod; INC(nofmod); mod.type := noType; mod.dsc := NIL; mod.next := NIL; - obj1.next := mod; obj := mod - ELSE (*module already present*) - IF non THEN ORS.Mark("invalid import order") END - END ; - RETURN obj - END ThisModule; - - PROCEDURE Read(VAR R: Files.Rider; VAR x: INTEGER); - VAR b: BYTE; - BEGIN Files.ReadByte(R, b); - (*IF b < 80H THEN x := b ELSE x := b - 100H END*) - IF b < 80X THEN x := ORD(b) ELSE x := ORD(b) - 100H END (* voc adaptation by noch *) - END Read; - - PROCEDURE InType(VAR R: Files.Rider; thismod: Object; VAR T: Type); - VAR key: LONGINT; - ref, class, mno, form, np, readonly: INTEGER; - new, fld, par, obj, mod, impmod: Object; - t: Type; - name, modname: ORS.Ident; - BEGIN Read(R, ref); - IF ref < 0 THEN T := typtab[-ref] (*already read*) - ELSE NEW(t); T := t; typtab[ref] := t; t.mno := thismod.lev; - Read(R, form); t.form := form; - IF form = Pointer THEN InType(R, thismod, t.base); t.size := 4 - ELSIF form = Array THEN - InType(R, thismod, t.base); Files.ReadNum(R, t.len); Files.ReadNum(R, t.size) - ELSIF form = Record THEN - InType(R, thismod, t.base); - IF t.base.form = NoTyp THEN t.base := NIL; obj := NIL ELSE obj := t.base.dsc END ; - Files.ReadNum(R, t.len); (*TD adr/exno*) - Files.ReadNum(R, t.nofpar); (*ext level*) - Files.ReadNum(R, t.size); - Read(R, class); - WHILE class # 0 DO (*fields*) - NEW(fld); fld.class := class; Files.ReadString(R, fld.name); - IF fld.name[0] # 0X THEN fld.expo := TRUE; InType(R, thismod, fld.type) ELSE fld.expo := FALSE; fld.type := nilType END ; - Files.ReadNum(R, fld.val); fld.next := obj; obj := fld; Read(R, class) - END ; - t.dsc := obj - ELSIF form = Proc THEN - InType(R, thismod, t.base); - obj := NIL; np := 0; Read(R, class); - WHILE class # 0 DO (*parameters*) - NEW(par); par.class := class; Read(R, readonly); par.rdo := readonly = 1; - InType(R, thismod, par.type); par.next := obj; obj := par; INC(np); Read(R, class) - END ; - t.dsc := obj; t.nofpar := np; t.size := 4 - END ; - Files.ReadString(R, modname); - IF modname[0] # 0X THEN (*re-import*) - Files.ReadInt(R, key); Files.ReadString(R, name); - mod := ThisModule(modname, modname, FALSE, key); - obj := mod.dsc; (*search type*) - WHILE (obj # NIL) & (obj.name # name) DO obj := obj.next END ; - IF obj # NIL THEN T := obj.type (*type object found in object list of mod*) - ELSE (*insert new type object in object list of mod*) - NEW(obj); obj.name := name; obj.class := Typ; obj.next := mod.dsc; mod.dsc := obj; obj.type := t; - t.mno := mod.lev; t.typobj := obj; T := t - END ; - typtab[ref] := T - END - END - END InType; - - PROCEDURE Import*(VAR modid, modid1: ORS.Ident); - VAR key: LONGINT; class, k: INTEGER; - obj: Object; t: Type; - thismod: Object; - modname, fname: ORS.Ident; - F: Files.File; R: Files.Rider; - BEGIN - IF modid1 = "SYSTEM" THEN - thismod := ThisModule(modid, modid1, TRUE, key); DEC(nofmod); - thismod.lev := 0; thismod.dsc := system; thismod.rdo := TRUE - ELSE MakeFileName(fname, modid1, ".smb"); F := Files.Old(fname); - IF F # NIL THEN - Files.Set(R, F, 0); Files.ReadInt(R, key); Files.ReadInt(R, key); Files.ReadString(R, modname); - thismod := ThisModule(modid, modid1, TRUE, key); thismod.rdo := TRUE; - Read(R, class); (*version key*) - IF class # versionkey THEN ORS.Mark("wrong version") END ; - Read(R, class); - WHILE class # 0 DO - NEW(obj); obj.class := class; Files.ReadString(R, obj.name); - InType(R, thismod, obj.type); obj.lev := -thismod.lev; - IF class = Typ THEN - t := obj.type; t.typobj := obj; Read(R, k); (*fixup bases of previously declared pointer types*) - WHILE k # 0 DO typtab[k].base := t; Read(R, k) END - ELSE - IF class = Const THEN - IF obj.type.form = Real THEN Files.ReadInt(R, obj.val) ELSE Files.ReadNum(R, obj.val) END - ELSIF class = Var THEN Files.ReadNum(R, obj.val); obj.rdo := TRUE - END - END ; - obj.next := thismod.dsc; thismod.dsc := obj; Read(R, class) - END ; - ELSE ORS.Mark("import not available") - END - END - END Import; - - (*-------------------------------- Export ---------------------------------*) - - PROCEDURE Write(VAR R: Files.Rider; x: INTEGER); - BEGIN - (*Files.WriteByte(R, x)*) - Files.WriteByte(R, SHORT(SHORT(x))) (* voc adaptation by noch *) - END Write; - - PROCEDURE OutType(VAR R: Files.Rider; t: Type); - VAR obj, mod, fld: Object; - - PROCEDURE OutPar(VAR R: Files.Rider; par: Object; n: INTEGER); - VAR cl: INTEGER; - BEGIN - IF n > 0 THEN - OutPar(R, par.next, n-1); cl := par.class; - Write(R, cl); - IF par.rdo THEN Write(R, 1) ELSE Write(R, 0) END ; - OutType(R, par.type) - END - END OutPar; - - PROCEDURE FindHiddenPointers(VAR R: Files.Rider; typ: Type; offset: LONGINT); - VAR fld: Object; i, n: LONGINT; - BEGIN - IF (typ.form = Pointer) OR (typ.form = NilTyp) THEN Write(R, Fld); Write(R, 0); Files.WriteNum(R, offset) - ELSIF typ.form = Record THEN fld := typ.dsc; - WHILE fld # NIL DO FindHiddenPointers(R, fld.type, fld.val + offset); fld := fld.next END - ELSIF typ.form = Array THEN i := 0; n := typ.len; - WHILE i < n DO FindHiddenPointers(R, typ.base, typ.base.size * i + offset); INC(i) END - END - END FindHiddenPointers; - - BEGIN - IF t.ref > 0 THEN (*type was already output*) Write(R, -t.ref) - ELSE obj := t.typobj; - IF obj # NIL THEN Write(R, Ref); t.ref := Ref; INC(Ref) ELSE (*anonymous*) Write(R, 0) END ; - Write(R, t.form); - IF t.form = Pointer THEN OutType(R, t.base) - ELSIF t.form = Array THEN OutType(R, t.base); Files.WriteNum(R, t.len); Files.WriteNum(R, t.size) - ELSIF t.form = Record THEN - IF t.base # NIL THEN OutType(R, t.base) ELSE OutType(R, noType) END ; - IF obj # NIL THEN Files.WriteNum(R, obj.exno) ELSE Write(R, 0) END ; - Files.WriteNum(R, t.nofpar); Files.WriteNum(R, t.size); - fld := t.dsc; - WHILE fld # NIL DO (*fields*) - IF fld.expo THEN - Write(R, Fld); Files.WriteString(R, fld.name); OutType(R, fld.type); Files.WriteNum(R, fld.val) - ELSE FindHiddenPointers(R, fld.type, fld.val) (*offset*) - END ; - fld := fld.next - END ; - Write(R, 0) - ELSIF t.form = Proc THEN OutType(R, t.base); OutPar(R, t.dsc, t.nofpar); Write(R, 0) - END ; - IF (t.mno > 0) & (obj # NIL) THEN (*re-export, output name*) - mod := topScope.next; - WHILE (mod # NIL) & (mod.lev # t.mno) DO mod := mod.next END ; - IF mod # NIL THEN Files.WriteString(R, mod.name); Files.WriteInt(R, mod.val); Files.WriteString(R, obj.name) - ELSE ORS.Mark("re-export not found"); Write(R, 0) - END - ELSE Write(R, 0) - END - END - END OutType; - - PROCEDURE Export*(VAR modid: ORS.Ident; VAR newSF: BOOLEAN; VAR key: LONGINT); - VAR x, sum, oldkey: LONGINT; - obj, obj0: Object; - filename: ORS.Ident; - F, F1: Files.File; R, R1: Files.Rider; - BEGIN Ref := Record + 1; MakeFileName(filename, modid, ".smb"); - F := Files.New(filename); Files.Set(R, F, 0); - Files.WriteInt(R, 0); (*placeholder*) - Files.WriteInt(R, 0); (*placeholder for key to be inserted at the end*) - Files.WriteString(R, modid); Write(R, versionkey); - obj := topScope.next; - WHILE obj # NIL DO - IF obj.expo THEN - Write(R, obj.class); Files.WriteString(R, obj.name); - OutType(R, obj.type); - IF obj.class = Typ THEN - IF obj.type.form = Record THEN - obj0 := topScope.next; (*check whether this is base of previously declared pointer types*) - WHILE obj0 # obj DO - IF (obj0.type.form = Pointer) & (obj0.type.base = obj.type) & (obj0.type.ref > 0) THEN Write(R, obj0.type.ref) END ; - obj0 := obj0.next - END - END ; - Write(R, 0) - ELSIF obj.class = Const THEN - IF obj.type.form = Proc THEN Files.WriteNum(R, obj.exno) - ELSIF obj.type.form = Real THEN Files.WriteInt(R, obj.val) - ELSE Files.WriteNum(R, obj.val) - END - ELSIF obj.class = Var THEN - Files.WriteNum(R, obj.exno); - IF obj.type.form = String THEN - Files.WriteNum(R, obj.val DIV 10000H); obj.val := obj.val MOD 10000H - END - END - END ; - obj := obj.next - END ; - REPEAT Write(R, 0) UNTIL Files.Length(F) MOD 4 = 0; - FOR Ref := Record+1 TO maxTypTab-1 DO typtab[Ref] := NIL END ; - Files.Set(R, F, 0); sum := 0; Files.ReadInt(R, x); (* compute key (checksum) *) - WHILE ~R.eof DO sum := sum + x; Files.ReadInt(R, x) END ; - F1 := Files.Old(filename); (*sum is new key*) - IF F1 # NIL THEN Files.Set(R1, F1, 4); Files.ReadInt(R1, oldkey) ELSE oldkey := sum+1 END ; - IF sum # oldkey THEN - IF newSF OR (F1 = NIL) THEN - key := sum; newSF := TRUE; Files.Set(R, F, 4); Files.WriteInt(R, sum); Files.Register(F) (*insert checksum*) - ELSE ORS.Mark("new symbol file inhibited") - END - ELSE newSF := FALSE; key := sum - END - END Export; - - PROCEDURE Init*; - BEGIN topScope := universe; nofmod := 1 - END Init; - - PROCEDURE type(ref, form: INTEGER; size: LONGINT): Type; - VAR tp: Type; - BEGIN NEW(tp); tp.form := form; tp.size := size; tp.ref := ref; tp.base := NIL; - typtab[ref] := tp; RETURN tp - END type; - - PROCEDURE enter(name: ARRAY OF CHAR; cl: INTEGER; type: Type; n: LONGINT); - VAR obj: Object; - BEGIN - NEW(obj); - (*obj.name := name; *) - COPY(name, obj.name); (* voc adaptation by noch *) - obj.class := cl; - obj.type := type; - obj.val := n; - obj.dsc := NIL; - IF cl = Typ THEN type.typobj := obj END ; - obj.next := system; system := obj - END enter; - -BEGIN - byteType := type(Byte, Int, 1); - boolType := type(Bool, Bool, 1); - charType := type(Char, Char,1); - intType := type(Int, Int, 4); - realType := type(Real, Real, 4); - setType := type(Set, Set,4); - nilType := type(NilTyp, NilTyp, 4); - noType := type(NoTyp, NoTyp, 4); - strType := type(String, String, 8); - - (*initialize universe with data types and in-line procedures; - LONGINT is synonym to INTEGER, LONGREAL to REAL. - LED, ADC, SBC; LDPSR, LDREG, REG, COND are not in language definition*) - system := NIL; (*n = procno*10 + nofpar*) - enter("UML", SFunc, intType, 132); (*functions*) - enter("SBC", SFunc, intType, 122); - enter("ADC", SFunc, intType, 112); - enter("ROR", SFunc, intType, 92); - enter("ASR", SFunc, intType, 82); - enter("LSL", SFunc, intType, 72); - enter("LEN", SFunc, intType, 61); - enter("CHR", SFunc, charType, 51); - enter("ORD", SFunc, intType, 41); - enter("FLT", SFunc, realType, 31); - enter("FLOOR", SFunc, intType, 21); - enter("ODD", SFunc, boolType, 11); - enter("ABS", SFunc, intType, 1); - enter("LED", SProc, noType, 81); (*procedures*) - enter("UNPK", SProc, noType, 72); - enter("PACK", SProc, noType, 62); - enter("NEW", SProc, noType, 51); - enter("ASSERT", SProc, noType, 41); - enter("EXCL", SProc, noType, 32); - enter("INCL", SProc, noType, 22); - enter("DEC", SProc, noType, 11); - enter("INC", SProc, noType, 1); - enter("SET", Typ, setType, 0); (*types*) - enter("BOOLEAN", Typ, boolType, 0); - enter("BYTE", Typ, byteType, 0); - enter("CHAR", Typ, charType, 0); - enter("LONGREAL", Typ, realType, 0); - enter("REAL", Typ, realType, 0); - enter("LONGINT", Typ, intType, 0); - enter("INTEGER", Typ, intType, 0); - topScope := NIL; OpenScope; topScope.next := system; universe := topScope; - - system := NIL; (* initialize "unsafe" pseudo-module SYSTEM*) - enter("H", SFunc, intType, 201); (*functions*) - enter("COND", SFunc, boolType, 191); - enter("SIZE", SFunc, intType, 181); - enter("ADR", SFunc, intType, 171); - enter("VAL", SFunc, intType, 162); - enter("REG", SFunc, intType, 151); - enter("BIT", SFunc, boolType, 142); - enter("LDREG", SProc, noType, 142); (*procedures*) - enter("LDPSR", SProc, noType, 131); - enter("COPY", SProc, noType, 123); - enter("PUT", SProc, noType, 112); - enter("GET", SProc, noType, 102); -END ORB. diff --git a/src/voc07R/ORG.Mod b/src/voc07R/ORG.Mod deleted file mode 100644 index fef42932..00000000 --- a/src/voc07R/ORG.Mod +++ /dev/null @@ -1,1134 +0,0 @@ -MODULE ORG; (* NW 24.6.2014 code generator in Oberon-07 for RISC*) - IMPORT SYSTEM, Files := CompatFiles, ORS, ORB; - (*Code generator for Oberon compiler for RISC processor. - Procedural interface to Parser OSAP; result in array "code". - Procedure Close writes code-files*) - - (* voc adaptation by noch *) - TYPE INTEGER = LONGINT; - BYTE = CHAR; - - CONST WordSize* = 4; - StkOrg0 = -64; VarOrg0 = 0; (*for RISC-0 only*) - MT = 12; SB = 13; SP = 14; LNK = 15; (*dedicated registers*) - maxCode = 8000; maxStrx = 2400; maxTD = 120; C24 = 1000000H; - Reg = 10; RegI = 11; Cond = 12; (*internal item modes*) - - (*frequently used opcodes*) U = 2000H; V = 1000H; - Mov = 0; Lsl = 1; Asr = 2; Ror= 3; And = 4; Ann = 5; Ior = 6; Xor = 7; - Add = 8; Sub = 9; Cmp = 9; Mul = 10; Div = 11; - Fad = 12; Fsb = 13; Fml = 14; Fdv = 15; - Ldr = 8; Str = 10; - BR = 0; BLR = 1; BC = 2; BL = 3; - MI = 0; PL = 8; EQ = 1; NE = 9; LT = 5; GE = 13; LE = 6; GT = 14; - - TYPE Item* = RECORD - mode*: INTEGER; - type*: ORB.Type; - a*, b*, r: LONGINT; - rdo*: BOOLEAN (*read only*) - END ; - - (* Item forms and meaning of fields: - mode r a b - -------------------------------- - Const - value (proc adr) (immediate value) - Var base off - (direct adr) - Par - off0 off1 (indirect adr) - Reg regno - RegI regno off - - Cond cond Fchain Tchain *) - - VAR pc*, varsize: LONGINT; (*program counter, data index*) - tdx, strx: LONGINT; - entry: LONGINT; (*main entry point*) - RH: LONGINT; (*available registers R[0] ... R[H-1]*) - curSB: LONGINT; (*current static base in SB*) - frame: LONGINT; (*frame offset changed in SaveRegs and RestoreRegs*) - fixorgP, fixorgD, fixorgT: LONGINT; (*origins of lists of locations to be fixed up by loader*) - check: BOOLEAN; (*emit run-time checks*) - version: INTEGER; (* 0 = RISC-0, 1 = RISC-5 *) - - relmap: ARRAY 6 OF INTEGER; (*condition codes for relations*) - code: ARRAY maxCode OF LONGINT; - data: ARRAY maxTD OF LONGINT; (*type descriptors*) - str: ARRAY maxStrx OF CHAR; - - (* voc adaptation by noch *) - PROCEDURE LSL (x, n : INTEGER): INTEGER; - - BEGIN - - RETURN ASH(x, n); - END LSL; - - - (*instruction assemblers according to formats*) - - PROCEDURE Put0(op, a, b, c: LONGINT); - BEGIN (*emit format-0 instruction*) - code[pc] := ((a*10H + b) * 10H + op) * 10000H + c; INC(pc) - END Put0; - - PROCEDURE Put1(op, a, b, im: LONGINT); - BEGIN (*emit format-1 instruction, -10000H <= im < 10000H*) - IF im < 0 THEN INC(op, V) END ; - code[pc] := (((a+40H) * 10H + b) * 10H + op) * 10000H + (im MOD 10000H); INC(pc) - END Put1; - - PROCEDURE Put1a(op, a, b, im: LONGINT); - BEGIN (*same as Pu1, but with range test -10000H <= im < 10000H*) - IF (im >= -10000H) & (im <= 0FFFFH) THEN Put1(op, a, b, im) - ELSE Put1(Mov+U, RH, 0, im DIV 10000H); - IF im MOD 10000H # 0 THEN Put1(Ior, RH, RH, im MOD 10000H) END ; - Put0(op, a, b, RH) - END - END Put1a; - - PROCEDURE Put2(op, a, b, off: LONGINT); - BEGIN (*emit load/store instruction*) - code[pc] := ((op * 10H + a) * 10H + b) * 100000H + (off MOD 100000H); INC(pc) - END Put2; - - PROCEDURE Put3(op, cond, off: LONGINT); - BEGIN (*emit branch instruction*) - code[pc] := ((op+12) * 10H + cond) * 1000000H + (off MOD 1000000H); INC(pc) - END Put3; - - PROCEDURE incR; - BEGIN - IF RH < MT-1 THEN INC(RH) ELSE ORS.Mark("register stack overflow") END - END incR; - - PROCEDURE CheckRegs*; - BEGIN - IF RH # 0 THEN ORS.Mark("Reg Stack"); RH := 0 END ; - IF pc >= maxCode - 40 THEN ORS.Mark("Program too long") END - END CheckRegs; - - PROCEDURE SetCC(VAR x: Item; n: LONGINT); - BEGIN x.mode := Cond; x.a := 0; x.b := 0; x.r := n - END SetCC; - - PROCEDURE Trap(cond, num: LONGINT); - BEGIN num := ORS.Pos()*100H + num*10H + MT; Put3(BLR, cond, num) - END Trap; - - (*handling of forward reference, fixups of branch addresses and constant tables*) - - PROCEDURE negated(cond: LONGINT): LONGINT; - BEGIN - IF cond < 8 THEN cond := cond+8 ELSE cond := cond-8 END ; - RETURN cond - END negated; - - PROCEDURE invalSB; - BEGIN curSB := 1 - END invalSB; - - PROCEDURE fix(at, with: LONGINT); - BEGIN code[at] := code[at] DIV C24 * C24 + (with MOD C24) - END fix; - - PROCEDURE FixLink*(L: LONGINT); - VAR L1: LONGINT; - BEGIN invalSB; - WHILE L # 0 DO L1 := code[L] MOD 40000H; fix(L, pc-L-1); L := L1 END - END FixLink; - - PROCEDURE FixLinkWith(L0, dst: LONGINT); - VAR L1: LONGINT; - BEGIN - WHILE L0 # 0 DO - L1 := code[L0] MOD C24; - code[L0] := code[L0] DIV C24 * C24 + ((dst - L0 - 1) MOD C24); L0 := L1 - END - END FixLinkWith; - - PROCEDURE merged(L0, L1: LONGINT): LONGINT; - VAR L2, L3: LONGINT; - BEGIN - IF L0 # 0 THEN L3 := L0; - REPEAT L2 := L3; L3 := code[L2] MOD 40000H UNTIL L3 = 0; - code[L2] := code[L2] + L1; L1 := L0 - END ; - RETURN L1 - END merged; - - (* loading of operands and addresses into registers *) - - PROCEDURE GetSB(base: LONGINT); - BEGIN - IF (version # 0) & ((base # curSB) OR (base # 0)) THEN - Put2(Ldr, SB, -base, pc-fixorgD); fixorgD := pc-1; curSB := base - END - END GetSB; - - PROCEDURE NilCheck; - BEGIN IF check THEN Trap(EQ, 4) END - END NilCheck; - - PROCEDURE load(VAR x: Item); - VAR op: LONGINT; - BEGIN - IF x.type.size = 1 THEN op := Ldr+1 ELSE op := Ldr END ; - IF x.mode # Reg THEN - IF x.mode = ORB.Const THEN - IF x.type.form = ORB.Proc THEN - IF x.r > 0 THEN ORS.Mark("not allowed") - ELSIF x.r = 0 THEN Put3(BL, 7, 0); Put1a(Sub, RH, LNK, pc*4 - x.a) - ELSE GetSB(x.r); Put1(Add, RH, SB, x.a + 100H) (*mark as progbase-relative*) - END - ELSIF (x.a <= 0FFFFH) & (x.a >= -10000H) THEN Put1(Mov, RH, 0, x.a) - ELSE Put1(Mov+U, RH, 0, x.a DIV 10000H MOD 10000H); - IF x.a MOD 10000H # 0 THEN Put1(Ior, RH, RH, x.a MOD 10000H) END - END ; - x.r := RH; incR - ELSIF x.mode = ORB.Var THEN - IF x.r > 0 THEN (*local*) Put2(op, RH, SP, x.a + frame) - ELSE GetSB(x.r); Put2(op, RH, SB, x.a) - END ; - x.r := RH; incR - ELSIF x.mode = ORB.Par THEN Put2(Ldr, RH, SP, x.a + frame); Put2(op, RH, RH, x.b); x.r := RH; incR - ELSIF x.mode = RegI THEN Put2(op, x.r, x.r, x.a) - ELSIF x.mode = Cond THEN - Put3(BC, negated(x.r), 2); - FixLink(x.b); Put1(Mov, RH, 0, 1); Put3(BC, 7, 1); - FixLink(x.a); Put1(Mov, RH, 0, 0); x.r := RH; incR - END ; - x.mode := Reg - END - END load; - - PROCEDURE loadAdr(VAR x: Item); - BEGIN - IF x.mode = ORB.Var THEN - IF x.r > 0 THEN (*local*) Put1a(Add, RH, SP, x.a + frame) - ELSE GetSB(x.r); Put1a(Add, RH, SB, x.a) - END ; - x.r := RH; incR - ELSIF x.mode = ORB.Par THEN Put2(Ldr, RH, SP, x.a + frame); - IF x.b # 0 THEN Put1a(Add, RH, RH, x.b) END ; - x.r := RH; incR - ELSIF x.mode = RegI THEN - IF x.a # 0 THEN Put1a(Add, x.r, x.r, x.a) END - ELSE ORS.Mark("address error") - END ; - x.mode := Reg - END loadAdr; - - PROCEDURE loadCond(VAR x: Item); - BEGIN - IF x.type.form = ORB.Bool THEN - IF x.mode = ORB.Const THEN x.r := 15 - x.a*8 - ELSE load(x); - IF code[pc-1] DIV 40000000H # -2 THEN Put1(Cmp, x.r, x.r, 0) END ; - x.r := NE; DEC(RH) - END ; - x.mode := Cond; x.a := 0; x.b := 0 - ELSE ORS.Mark("not Boolean?") - END - END loadCond; - - PROCEDURE loadTypTagAdr(T: ORB.Type); - VAR x: Item; - BEGIN x.mode := ORB.Var; x.a := T.len; x.r := -T.mno; loadAdr(x) - END loadTypTagAdr; - - PROCEDURE loadStringAdr(VAR x: Item); - BEGIN GetSB(0); Put1a(Add, RH, SB, varsize+x.a); x.mode := Reg; x.r := RH; incR - END loadStringAdr; - - (* Items: Conversion from constants or from Objects on the Heap to Items on the Stack*) - - PROCEDURE MakeConstItem*(VAR x: Item; typ: ORB.Type; val: LONGINT); - BEGIN x.mode := ORB.Const; x.type := typ; x.a := val - END MakeConstItem; - - PROCEDURE MakeRealItem*(VAR x: Item; val: REAL); - BEGIN x.mode := ORB.Const; x.type := ORB.realType; x.a := SYSTEM.VAL(LONGINT, val) - END MakeRealItem; - - PROCEDURE MakeStringItem*(VAR x: Item; len: LONGINT); (*copies string from ORS-buffer to ORG-string array*) - VAR i: LONGINT; - BEGIN x.mode := ORB.Const; x.type := ORB.strType; x.a := strx; x.b := len; i := 0; - IF strx + len + 4 < maxStrx THEN - WHILE len > 0 DO str[strx] := ORS.str[i]; INC(strx); INC(i); DEC(len) END ; - WHILE strx MOD 4 # 0 DO str[strx] := 0X; INC(strx) END - ELSE ORS.Mark("too many strings") - END - END MakeStringItem; - - PROCEDURE MakeItem*(VAR x: Item; y: ORB.Object; curlev: LONGINT); - BEGIN x.mode := y.class; x.type := y.type; x.a := y.val; x.rdo := y.rdo; - IF y.class = ORB.Par THEN x.b := 0 - ELSIF y.class = ORB.Typ THEN x.a := y.type.len; x.r := -y.lev - ELSIF (y.class = ORB.Const) & (y.type.form = ORB.String) THEN x.b := y.lev (*len*) - ELSE x.r := y.lev - END ; - IF (y.lev > 0) & (y.lev # curlev) & (y.class # ORB.Const) THEN ORS.Mark("level error, not accessible") END - END MakeItem; - - (* Code generation for Selectors, Variables, Constants *) - - PROCEDURE Field*(VAR x: Item; y: ORB.Object); (* x := x.y *) - BEGIN; - IF x.mode = ORB.Var THEN - IF x.r >= 0 THEN x.a := x.a + y.val - ELSE loadAdr(x); x.mode := RegI; x.a := y.val - END - ELSIF x.mode = RegI THEN x.a := x.a + y.val - ELSIF x.mode = ORB.Par THEN x.b := x.b + y.val - END - END Field; - - PROCEDURE Index*(VAR x, y: Item); (* x := x[y] *) - VAR s, lim: LONGINT; - BEGIN s := x.type.base.size; lim := x.type.len; - IF (y.mode = ORB.Const) & (lim >= 0) THEN - IF (y.a < 0) OR (y.a >= lim) THEN ORS.Mark("bad index") END ; - IF x.mode IN {ORB.Var, RegI} THEN x.a := y.a * s + x.a - ELSIF x.mode = ORB.Par THEN x.b := y.a * s + x.b - END - ELSE load(y); - IF check THEN (*check array bounds*) - IF lim >= 0 THEN Put1a(Cmp, RH, y.r, lim) - ELSE (*open array*) - IF x.mode IN {ORB.Var, ORB.Par} THEN Put2(Ldr, RH, SP, x.a+4+frame); Put0(Cmp, RH, y.r, RH) - ELSE ORS.Mark("error in Index") - END - END ; - Trap(10, 1) (*BCC*) - END ; - IF s = 4 THEN Put1(Lsl, y.r, y.r, 2) ELSIF s > 1 THEN Put1a(Mul, y.r, y.r, s) END ; - IF x.mode = ORB.Var THEN - IF x.r > 0 THEN Put0(Add, y.r, SP, y.r); INC(x.a, frame) - ELSE GetSB(x.r); - IF x.r = 0 THEN Put0(Add, y.r, SB, y.r) - ELSE Put1a(Add, RH, SB, x.a); Put0(Add, y.r, RH, y.r); x.a := 0 - END - END ; - x.r := y.r; x.mode := RegI - ELSIF x.mode = ORB.Par THEN - Put2(Ldr, RH, SP, x.a + frame); - Put0(Add, y.r, RH, y.r); x.mode := RegI; x.r := y.r; x.a := x.b - ELSIF x.mode = RegI THEN Put0(Add, x.r, x.r, y.r); DEC(RH) - END - END - END Index; - - PROCEDURE DeRef*(VAR x: Item); - BEGIN - IF x.mode = ORB.Var THEN - IF x.r > 0 THEN (*local*) Put2(Ldr, RH, SP, x.a + frame) ELSE GetSB(x.r); Put2(Ldr, RH, SB, x.a) END ; - NilCheck; x.r := RH; incR - ELSIF x.mode = ORB.Par THEN - Put2(Ldr, RH, SP, x.a + frame); Put2(Ldr, RH, RH, x.b); NilCheck; x.r := RH; incR - ELSIF x.mode = RegI THEN Put2(Ldr, x.r, x.r, x.a); NilCheck - ELSIF x.mode # Reg THEN ORS.Mark("bad mode in DeRef") - END ; - x.mode := RegI; x.a := 0; x.b := 0 - END DeRef; - - PROCEDURE Q(T: ORB.Type; VAR dcw: LONGINT); - BEGIN (*one entry of type descriptor extension table*) - IF T.base # NIL THEN - Q(T.base, dcw); data[dcw] := (T.mno*1000H + T.len) * 1000H + dcw - fixorgT; - fixorgT := dcw; INC(dcw) - END - END Q; - - PROCEDURE FindPtrFlds(typ: ORB.Type; off: LONGINT; VAR dcw: LONGINT); - VAR fld: ORB.Object; i, s: LONGINT; - BEGIN - IF (typ.form = ORB.Pointer) OR (typ.form = ORB.NilTyp) THEN data[dcw] := off; INC(dcw) - ELSIF typ.form = ORB.Record THEN - fld := typ.dsc; - WHILE fld # NIL DO FindPtrFlds(fld.type, fld.val + off, dcw); fld := fld.next END - ELSIF typ.form = ORB.Array THEN - s := typ.base.size; - FOR i := 0 TO typ.len-1 DO FindPtrFlds(typ.base, i*s + off, dcw) END - END - END FindPtrFlds; - - PROCEDURE BuildTD*(T: ORB.Type; VAR dc: LONGINT); - VAR dcw, k, s: LONGINT; (*dcw = word address*) - BEGIN dcw := dc DIV 4; s := T.size; (*convert size for heap allocation*) - IF s <= 24 THEN s := 32 ELSIF s <= 56 THEN s := 64 ELSIF s <= 120 THEN s := 128 - ELSE s := (s+263) DIV 256 * 256 - END ; - T.len := dc; data[dcw] := s; INC(dcw); - k := T.nofpar; (*extension level!*) - IF k > 3 THEN ORS.Mark("ext level too large") - ELSE Q(T, dcw); - WHILE k < 3 DO data[dcw] := -1; INC(dcw); INC(k) END - END ; - FindPtrFlds(T, 0, dcw); data[dcw] := -1; INC(dcw); tdx := dcw; dc := dcw*4; - IF tdx >= maxTD THEN ORS.Mark("too many record types"); tdx := 0 END - END BuildTD; - - PROCEDURE TypeTest*(VAR x: Item; T: ORB.Type; varpar, isguard: BOOLEAN); - VAR pc0: LONGINT; - BEGIN (*fetch tag into RH*) - IF varpar THEN Put2(Ldr, RH, SP, x.a+4+frame) - ELSE load(x); - pc0 := pc; Put3(BC, EQ, 0); (*NIL belongs to every pointer type*) - Put2(Ldr, RH, x.r, -8) - END ; - Put2(Ldr, RH, RH, T.nofpar*4); incR; - loadTypTagAdr(T); (*tag of T*) - Put0(Cmp, RH-1, RH-1, RH-2); DEC(RH, 2); - IF ~varpar THEN fix(pc0, pc - pc0 - 1) END ; - IF isguard THEN - IF check THEN Trap(NE, 2) END - ELSE SetCC(x, EQ); - IF ~varpar THEN DEC(RH) END - END - END TypeTest; - - (* Code generation for Boolean operators *) - - PROCEDURE Not*(VAR x: Item); (* x := ~x *) - VAR t: LONGINT; - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - x.r := negated(x.r); t := x.a; x.a := x.b; x.b := t - END Not; - - PROCEDURE And1*(VAR x: Item); (* x := x & *) - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - Put3(BC, negated(x.r), x.a); x.a := pc-1; FixLink(x.b); x.b := 0 - END And1; - - PROCEDURE And2*(VAR x, y: Item); - BEGIN - IF y.mode # Cond THEN loadCond(y) END ; - x.a := merged(y.a, x.a); x.b := y.b; x.r := y.r - END And2; - - PROCEDURE Or1*(VAR x: Item); (* x := x OR *) - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - Put3(BC, x.r, x.b); x.b := pc-1; FixLink(x.a); x.a := 0 - END Or1; - - PROCEDURE Or2*(VAR x, y: Item); - BEGIN - IF y.mode # Cond THEN loadCond(y) END ; - x.a := y.a; x.b := merged(y.b, x.b); x.r := y.r - END Or2; - - (* Code generation for arithmetic operators *) - - PROCEDURE Neg*(VAR x: Item); (* x := -x *) - BEGIN - IF x.type.form = ORB.Int THEN - IF x.mode = ORB.Const THEN x.a := -x.a - ELSE load(x); Put1(Mov, RH, 0, 0); Put0(Sub, x.r, RH, x.r) - END - ELSIF x.type.form = ORB.Real THEN - IF x.mode = ORB.Const THEN x.a := x.a + 7FFFFFFFH + 1 - ELSE load(x); Put1(Mov, RH, 0, 0); Put0(Fsb, x.r, RH, x.r) - END - ELSE (*form = Set*) - IF x.mode = ORB.Const THEN x.a := -x.a-1 - ELSE load(x); Put1(Xor, x.r, x.r, -1) - END - END - END Neg; - - PROCEDURE AddOp*(op: LONGINT; VAR x, y: Item); (* x := x +- y *) - BEGIN - IF op = ORS.plus THEN - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN x.a := x.a + y.a - ELSIF y.mode = ORB.Const THEN load(x); - IF y.a # 0 THEN Put1a(Add, x.r, x.r, y.a) END - ELSE load(x); load(y); Put0(Add, RH-2, x.r, y.r); DEC(RH); x.r := RH-1 - END - ELSE (*op = ORS.minus*) - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN x.a := x.a - y.a - ELSIF y.mode = ORB.Const THEN load(x); - IF y.a # 0 THEN Put1a(Sub, x.r, x.r, y.a) END - ELSE load(x); load(y); Put0(Sub, RH-2, x.r, y.r); DEC(RH); x.r := RH-1 - END - END - END AddOp; - - PROCEDURE log2(m: LONGINT; VAR e: LONGINT): LONGINT; - BEGIN e := 0; - WHILE ~ODD(m) DO m := m DIV 2; INC(e) END ; - RETURN m - END log2; - - PROCEDURE MulOp*(VAR x, y: Item); (* x := x * y *) - VAR e: LONGINT; - BEGIN - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN x.a := x.a * y.a - ELSIF (y.mode = ORB.Const) & (y.a >= 2) & (log2(y.a, e) = 1) THEN load(x); Put1(Lsl, x.r, x.r, e) - ELSIF y.mode = ORB.Const THEN load(x); Put1a(Mul, x.r, x.r, y.a) - ELSIF (x.mode = ORB.Const) & (x.a >= 2) & (log2(x.a, e) = 1) THEN load(y); Put1(Lsl, y.r, y.r, e); x.mode := Reg; x.r := y.r - ELSIF x.mode = ORB.Const THEN load(y); Put1a(Mul, y.r, y.r, x.a); x.mode := Reg; x.r := y.r - ELSE load(x); load(y); Put0(Mul, RH-2, x.r, y.r); DEC(RH); x.r := RH-1 - END - END MulOp; - - PROCEDURE DivOp*(op: LONGINT; VAR x, y: Item); (* x := x op y *) - VAR e: LONGINT; - BEGIN - IF op = ORS.div THEN - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN - IF y.a > 0 THEN x.a := x.a DIV y.a ELSE ORS.Mark("bad divisor") END - ELSIF (y.mode = ORB.Const) & (y.a >= 2) & (log2(y.a, e) = 1) THEN load(x); Put1(Asr, x.r, x.r, e) - ELSIF y.mode = ORB.Const THEN - IF y.a > 0 THEN load(x); Put1a(Div, x.r, x.r, y.a) ELSE ORS.Mark("bad divisor") END - ELSE load(y); - IF check THEN Trap(LE, 6) END ; - load(x); Put0(Div, RH-2, x.r, y.r); DEC(RH); x.r := RH-1 - END - ELSE (*op = ORS.mod*) - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN - IF y.a > 0 THEN x.a := x.a MOD y.a ELSE ORS.Mark("bad modulus") END - ELSIF (y.mode = ORB.Const) & (y.a >= 2) & (log2(y.a, e) = 1) THEN load(x); - IF e <= 16 THEN Put1(And, x.r, x.r, y.a-1) ELSE Put1(Lsl, x.r, x.r, 32-e); Put1(Ror, x.r, x.r, 32-e) END - ELSIF y.mode = ORB.Const THEN - IF y.a > 0 THEN load(x); Put1a(Div, x.r, x.r, y.a); Put0(Mov+U, x.r, 0, 0) ELSE ORS.Mark("bad modulus") END - ELSE load(y); - IF check THEN Trap(LE, 6) END ; - load(x); Put0(Div, RH-2, x.r, y.r); Put0(Mov+U, RH-2, 0, 0); DEC(RH); x.r := RH-1 - END - END - END DivOp; - - (* Code generation for REAL operators *) - - PROCEDURE RealOp*(op: INTEGER; VAR x, y: Item); (* x := x op y *) - BEGIN load(x); load(y); - IF op = ORS.plus THEN Put0(Fad, RH-2, x.r, y.r) - ELSIF op = ORS.minus THEN Put0(Fsb, RH-2, x.r, y.r) - ELSIF op = ORS.times THEN Put0(Fml, RH-2, x.r, y.r) - ELSIF op = ORS.rdiv THEN Put0(Fdv, RH-2, x.r, y.r) - END ; - DEC(RH); x.r := RH-1 - END RealOp; - - (* Code generation for set operators *) - - PROCEDURE Singleton*(VAR x: Item); (* x := {x} *) - BEGIN - IF x.mode = ORB.Const THEN - x.a := LSL(1, x.a) - ELSE load(x); Put1(Mov, RH, 0, 1); Put0(Lsl, x.r, RH, x.r) - END - END Singleton; - - PROCEDURE Set*(VAR x, y: Item); (* x := {x .. y} *) - BEGIN - IF (x.mode = ORB.Const) & ( y.mode = ORB.Const) THEN - IF x.a <= y.a THEN x.a := LSL(2, y.a) - LSL(1, x.a) ELSE x.a := 0 END - ELSE - IF (x.mode = ORB.Const) & (x.a < 16) THEN x.a := LSL(-1, x.a) - ELSE load(x); Put1(Mov, RH, 0, -1); Put0(Lsl, x.r, RH, x.r) - END ; - IF (y.mode = ORB.Const) & (y.a < 16) THEN Put1(Mov, RH, 0, LSL(-2, y.a)); y.mode := Reg; y.r := RH; incR - ELSE load(y); Put1(Mov, RH, 0, -2); Put0(Lsl, y.r, RH, y.r) - END ; - IF x.mode = ORB.Const THEN - IF x.a # 0 THEN Put1(Xor, y.r, y.r, -1); Put1a(And, RH-1, y.r, x.a) END ; - x.mode := Reg; x.r := RH-1 - ELSE DEC(RH); Put0(Ann, RH-1, x.r, y.r) - END - END - END Set; - - PROCEDURE In*(VAR x, y: Item); (* x := x IN y *) - BEGIN load(y); - IF x.mode = ORB.Const THEN Put1(Ror, y.r, y.r, (x.a + 1) MOD 20H); DEC(RH) - ELSE load(x); Put1(Add, x.r, x.r, 1); Put0(Ror, y.r, y.r, x.r); DEC(RH, 2) - END ; - SetCC(x, MI) - END In; - - PROCEDURE SetOp*(op: LONGINT; VAR x, y: Item); (* x := x op y *) - VAR xset, yset: SET; (*x.type.form = Set*) - BEGIN - IF (x.mode = ORB.Const) & (y.mode = ORB.Const) THEN - xset := SYSTEM.VAL(SET, x.a); yset := SYSTEM.VAL(SET, y.a); - IF op = ORS.plus THEN xset := xset + yset - ELSIF op = ORS.minus THEN xset := xset - yset - ELSIF op = ORS.times THEN xset := xset * yset - ELSIF op = ORS.rdiv THEN xset := xset / yset - END ; - x.a := SYSTEM.VAL(LONGINT, xset) - ELSIF y.mode = ORB.Const THEN - load(x); - IF op = ORS.plus THEN Put1a(Ior, x.r, x.r, y.a) - ELSIF op = ORS.minus THEN Put1a(Ann, x.r, x.r, y.a) - ELSIF op = ORS.times THEN Put1a(And, x.r, x.r, y.a) - ELSIF op = ORS.rdiv THEN Put1a(Xor, x.r, x.r, y.a) - END ; - ELSE load(x); load(y); - IF op = ORS.plus THEN Put0(Ior, RH-2, x.r, y.r) - ELSIF op = ORS.minus THEN Put0(Ann, RH-2, x.r, y.r) - ELSIF op = ORS.times THEN Put0(And, RH-2, x.r, y.r) - ELSIF op = ORS.rdiv THEN Put0(Xor, RH-2, x.r, y.r) - END ; - DEC(RH); x.r := RH-1 - END - END SetOp; - - (* Code generation for relations *) - - PROCEDURE IntRelation*(op: INTEGER; VAR x, y: Item); (* x := x < y *) - BEGIN - IF (y.mode = ORB.Const) & (y.type.form # ORB.Proc) THEN - load(x); - IF (y.a # 0) OR ~(op IN {ORS.eql, ORS.neq}) OR (code[pc-1] DIV 40000000H # -2) THEN Put1a(Cmp, x.r, x.r, y.a) END ; - DEC(RH) - ELSE load(x); load(y); Put0(Cmp, x.r, x.r, y.r); DEC(RH, 2) - END ; - SetCC(x, relmap[op - ORS.eql]) - END IntRelation; - - PROCEDURE SetRelation*(op: INTEGER; VAR x, y: Item); (* x := x < y *) - BEGIN load(x); - IF (op = ORS.eql) OR (op = ORS.neq) THEN - IF y.mode = ORB.Const THEN Put1a(Cmp, x.r, x.r, y.a); DEC(RH) - ELSE load(y); Put0(Cmp, x.r, x.r, y.r); DEC(RH, 2) - END ; - SetCC(x, relmap[op - ORS.eql]) - ELSE ORS.Mark("illegal relation") - END - END SetRelation; - - PROCEDURE RealRelation*(op: INTEGER; VAR x, y: Item); (* x := x < y *) - BEGIN load(x); - IF (y.mode = ORB.Const) & (y.a = 0) THEN DEC(RH) - ELSE load(y); Put0(Fsb, x.r, x.r, y.r); DEC(RH, 2) - END ; - SetCC(x, relmap[op - ORS.eql]) - END RealRelation; - - PROCEDURE StringRelation*(op: INTEGER; VAR x, y: Item); (* x := x < y *) - (*x, y are char arrays or strings*) - BEGIN - IF x.type.form = ORB.String THEN loadStringAdr(x) ELSE loadAdr(x) END ; - IF y.type.form = ORB.String THEN loadStringAdr(y) ELSE loadAdr(y) END ; - Put2(Ldr+1, RH, x.r, 0); Put1(Add, x.r, x.r, 1); - Put2(Ldr+1, RH+1, y.r, 0); Put1(Add, y.r, y.r, 1); - Put0(Cmp, RH+2, RH, RH+1); Put3(BC, NE, 2); - Put1(Cmp, RH+2, RH, 0); Put3(BC, NE, -8); - DEC(RH, 2); SetCC(x, relmap[op - ORS.eql]) - END StringRelation; - - (* Code generation of Assignments *) - - PROCEDURE StrToChar*(VAR x: Item); - BEGIN x.type := ORB.charType; DEC(strx, 4); x.a := ORD(str[x.a]) - END StrToChar; - - PROCEDURE Store*(VAR x, y: Item); (* x := y *) - VAR op: LONGINT; - BEGIN load(y); - IF x.type.size = 1 THEN op := Str+1 ELSE op := Str END ; - IF x.mode = ORB.Var THEN - IF x.r > 0 THEN (*local*) Put2(op, y.r, SP, x.a + frame) - ELSE GetSB(x.r); Put2(op, y.r, SB, x.a) - END - ELSIF x.mode = ORB.Par THEN Put2(Ldr, RH, SP, x.a + frame); Put2(op, y.r, RH, x.b); - ELSIF x.mode = RegI THEN Put2(op, y.r, x.r, x.a); DEC(RH); - ELSE ORS.Mark("bad mode in Store") - END ; - DEC(RH) - END Store; - - PROCEDURE StoreStruct*(VAR x, y: Item); (* x := y, frame = 0 *) - VAR s, pc0: LONGINT; - BEGIN loadAdr(x); loadAdr(y); - IF (x.type.form = ORB.Array) & (x.type.len > 0) THEN - IF y.type.len >= 0 THEN - IF x.type.len >= y.type.len THEN Put1a(Mov, RH, 0, (y.type.size+3) DIV 4) - ELSE ORS.Mark("source array too long") - END - ELSE (*y is open array*) - Put2(Ldr, RH, SP, y.a+4); s := y.type.base.size; (*element size*) - pc0 := pc; Put3(BC, EQ, 0); - IF s = 1 THEN Put1(Add, RH, RH, 3); Put1(Asr, RH, RH, 2) - ELSIF s # 4 THEN Put1a(Mul, RH, RH, s DIV 4) - END ; - IF check THEN - Put1a(Mov, RH+1, 0, (x.type.size+3) DIV 4); Put0(Cmp, RH+1, RH, RH+1); Trap(GT, 3) - END ; - fix(pc0, pc + 5 - pc0) - END - ELSIF x.type.form = ORB.Record THEN Put1a(Mov, RH, 0, x.type.size DIV 4) - ELSE ORS.Mark("inadmissible assignment") - END ; - Put2(Ldr, RH+1, y.r, 0); Put1(Add, y.r, y.r, 4); - Put2(Str, RH+1, x.r, 0); Put1(Add, x.r, x.r, 4); - Put1(Sub, RH, RH, 1); Put3(BC, NE, -6); DEC(RH, 2) - END StoreStruct; - - PROCEDURE CopyString*(VAR x, y: Item); (*from x to y*) - VAR len: LONGINT; - BEGIN loadAdr(y); len := y.type.len; - IF len >= 0 THEN - IF x.b > len THEN ORS.Mark("string too long") END - ELSIF check THEN Put2(Ldr, RH, y.r, 4); (*array length check*) - Put1(Cmp, RH, RH, x.b); Trap(NE, 3) - END ; - loadStringAdr(x); - Put2(Ldr, RH, x.r, 0); Put1(Add, x.r, x.r, 4); - Put2(Str, RH, y.r, 0); Put1(Add, y.r, y.r, 4); - Put1(Asr, RH, RH, 24); Put3(BC, NE, -6); DEC(RH, 2) - END CopyString; - - (* Code generation for parameters *) - - PROCEDURE VarParam*(VAR x: Item; ftype: ORB.Type); - VAR xmd: INTEGER; - BEGIN xmd := x.mode; loadAdr(x); - IF (ftype.form = ORB.Array) & (ftype.len < 0) THEN (*open array*) - IF x.type.len >= 0 THEN Put1a(Mov, RH, 0, x.type.len) ELSE Put2(Ldr, RH, SP, x.a+4+frame) END ; - incR - ELSIF ftype.form = ORB.Record THEN - IF xmd = ORB.Par THEN Put2(Ldr, RH, SP, x.a+4+frame); incR ELSE loadTypTagAdr(x.type) END - END - END VarParam; - - PROCEDURE ValueParam*(VAR x: Item); - BEGIN load(x) - END ValueParam; - - PROCEDURE OpenArrayParam*(VAR x: Item); - BEGIN loadAdr(x); - IF x.type.len >= 0 THEN Put1a(Mov, RH, 0, x.type.len) ELSE Put2(Ldr, RH, SP, x.a+4+frame) END ; - incR - END OpenArrayParam; - - PROCEDURE StringParam*(VAR x: Item); - BEGIN loadStringAdr(x); Put1(Mov, RH, 0, x.b); incR (*len*) - END StringParam; - - (*For Statements*) - - PROCEDURE For0*(VAR x, y: Item); - BEGIN load(y) - END For0; - - PROCEDURE For1*(VAR x, y, z, w: Item; VAR L: LONGINT); - BEGIN - IF z.mode = ORB.Const THEN Put1a(Cmp, RH, y.r, z.a) - ELSE load(z); Put0(Cmp, RH-1, y.r, z.r); DEC(RH) - END ; - L := pc; - IF w.a > 0 THEN Put3(BC, GT, 0) - ELSIF w.a < 0 THEN Put3(BC, LT, 0) - ELSE ORS.Mark("zero increment"); Put3(BC, MI, 0) - END ; - Store(x, y) - END For1; - - PROCEDURE For2*(VAR x, y, w: Item); - BEGIN load(x); DEC(RH); Put1a(Add, x.r, x.r, w.a) - END For2; - - (* Branches, procedure calls, procedure prolog and epilog *) - - PROCEDURE Here*(): LONGINT; - BEGIN invalSB; RETURN pc - END Here; - - PROCEDURE FJump*(VAR L: LONGINT); - BEGIN Put3(BC, 7, L); L := pc-1 - END FJump; - - PROCEDURE CFJump*(VAR x: Item); - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - Put3(BC, negated(x.r), x.a); FixLink(x.b); x.a := pc-1 - END CFJump; - - PROCEDURE BJump*(L: LONGINT); - BEGIN Put3(BC, 7, L-pc-1) - END BJump; - - PROCEDURE CBJump*(VAR x: Item; L: LONGINT); - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - Put3(BC, negated(x.r), L-pc-1); FixLink(x.b); FixLinkWith(x.a, L) - END CBJump; - - PROCEDURE Fixup*(VAR x: Item); - BEGIN FixLink(x.a) - END Fixup; - - PROCEDURE SaveRegs(r: LONGINT); (* R[0 .. r-1]*) - VAR r0: LONGINT; - BEGIN (*r > 0*) r0 := 0; - Put1(Sub, SP, SP, r*4); INC(frame, 4*r); - REPEAT Put2(Str, r0, SP, (r-r0-1)*4); INC(r0) UNTIL r0 = r - END SaveRegs; - - PROCEDURE RestoreRegs(r: LONGINT); (*R[0 .. r-1]*) - VAR r0: LONGINT; - BEGIN (*r > 0*) r0 := r; - REPEAT DEC(r0); Put2(Ldr, r0, SP, (r-r0-1)*4) UNTIL r0 = 0; - Put1(Add, SP, SP, r*4); DEC(frame, 4*r) - END RestoreRegs; - - PROCEDURE PrepCall*(VAR x: Item; VAR r: LONGINT); - BEGIN (*x.type.form = ORB.Proc*) - IF x.mode > ORB.Par THEN load(x) END ; - r := RH; - IF RH > 0 THEN SaveRegs(RH); RH := 0 END - END PrepCall; - - PROCEDURE Call*(VAR x: Item; r: LONGINT); - BEGIN (*x.type.form = ORB.Proc*) - IF x.mode = ORB.Const THEN - IF x.r >= 0 THEN Put3(BL, 7, (x.a DIV 4)-pc-1) - ELSE (*imported*) - IF pc - fixorgP < 1000H THEN - Put3(BL, 7, ((-x.r) * 100H + x.a) * 1000H + pc-fixorgP); fixorgP := pc-1 - ELSE ORS.Mark("fixup impossible") - END - END - ELSE - IF x.mode <= ORB.Par THEN load(x); DEC(RH) - ELSE Put2(Ldr, RH, SP, 0); Put1(Add, SP, SP, 4); DEC(r); DEC(frame, 4) - END ; - IF check THEN Trap(EQ, 5) END ; - Put3(BLR, 7, RH) - END ; - IF x.type.base.form = ORB.NoTyp THEN (*procedure*) RH := 0 - ELSE (*function*) - IF r > 0 THEN Put0(Mov, r, 0, 0); RestoreRegs(r) END ; - x.mode := Reg; x.r := r; RH := r+1 - END ; - invalSB - END Call; - - PROCEDURE Enter*(parblksize, locblksize: LONGINT; int: BOOLEAN); - VAR a, r: LONGINT; - BEGIN invalSB; frame := 0; - IF ~int THEN (*procedure prolog*) - a := 4; r := 0; - Put1(Sub, SP, SP, locblksize); Put2(Str, LNK, SP, 0); - WHILE a < parblksize DO Put2(Str, r, SP, a); INC(r); INC(a, 4) END - ELSE (*interrupt procedure*) - Put1(Sub, SP, SP, 12); Put2(Str, 0, SP, 0); Put2(Str, 1, SP, 4); Put2(Str, SB, SP, 8) - (*R0, R1, SB saved os stack*) - END - END Enter; - - PROCEDURE Return*(form: INTEGER; VAR x: Item; size: LONGINT; int: BOOLEAN); - BEGIN - IF form # ORB.NoTyp THEN load(x) END ; - IF ~int THEN (*procedure epilog*) - Put2(Ldr, LNK, SP, 0); Put1(Add, SP, SP, size); Put3(BR, 7, LNK) - ELSE (*interrupt return, restore SB, R1, R0*) - Put2(Ldr, SB, SP, 8); Put2(Ldr, 1, SP, 4); Put2(Ldr, 0, SP, 0); Put1(Add, SP, SP, 12); Put3(BR, 7, 10H) - END ; - RH := 0 - END Return; - - (* In-line code procedures*) - - PROCEDURE Increment*(upordown: LONGINT; VAR x, y: Item); - VAR op, zr, v: LONGINT; - BEGIN (*frame = 0*) - IF upordown = 0 THEN op := Add ELSE op := Sub END ; - IF x.type = ORB.byteType THEN v := 1 ELSE v := 0 END ; - IF y.type.form = ORB.NoTyp THEN y.mode := ORB.Const; y.a := 1 END ; - IF (x.mode = ORB.Var) & (x.r > 0) THEN - zr := RH; Put2(Ldr+v, zr, SP, x.a); incR; - IF y.mode = ORB.Const THEN Put1a(op, zr, zr, y.a) ELSE load(y); Put0(op, zr, zr, y.r); DEC(RH) END ; - Put2(Str+v, zr, SP, x.a); DEC(RH) - ELSE loadAdr(x); zr := RH; Put2(Ldr+v, RH, x.r, 0); incR; - IF y.mode = ORB.Const THEN Put1a(op, zr, zr, y.a) ELSE load(y); Put0(op, zr, zr, y.r); DEC(RH) END ; - Put2(Str+v, zr, x.r, 0); DEC(RH, 2) - END - END Increment; - - PROCEDURE Include*(inorex: LONGINT; VAR x, y: Item); - VAR op, zr: LONGINT; - BEGIN loadAdr(x); zr := RH; Put2(Ldr, RH, x.r, 0); incR; - IF inorex = 0 THEN op := Ior ELSE op := Ann END ; - IF y.mode = ORB.Const THEN Put1a(op, zr, zr, LSL(1, y.a)) - ELSE load(y); Put1(Mov, RH, 0, 1); Put0(Lsl, y.r, RH, y.r); Put0(op, zr, zr, y.r); DEC(RH) - END ; - Put2(Str, zr, x.r, 0); DEC(RH, 2) - END Include; - - PROCEDURE Assert*(VAR x: Item); - VAR cond: LONGINT; - BEGIN - IF x.mode # Cond THEN loadCond(x) END ; - IF x.a = 0 THEN cond := negated(x.r) - ELSE Put3(BC, x.r, x.b); FixLink(x.a); x.b := pc-1; cond := 7 - END ; - Trap(cond, 7); FixLink(x.b) - END Assert; - - PROCEDURE New*(VAR x: Item); - BEGIN loadAdr(x); loadTypTagAdr(x.type.base); Put3(BLR, 7, MT); RH := 0; invalSB - END New; - - PROCEDURE Pack*(VAR x, y: Item); - VAR z: Item; - BEGIN z := x; load(x); load(y); - Put1(Lsl, y.r, y.r, 23); Put0(Add, x.r, x.r, y.r); DEC(RH); Store(z, x) - END Pack; - - PROCEDURE Unpk*(VAR x, y: Item); - VAR z, e0: Item; - BEGIN z := x; load(x); e0.mode := Reg; e0.r := RH; e0.type := ORB.intType; - Put1(Asr, RH, x.r, 23); Put1(Sub, RH, RH, 127); Store(y, e0); incR; - Put1(Lsl, RH, RH, 23); Put0(Sub, x.r, x.r, RH); Store(z, x) - END Unpk; - - PROCEDURE Led*(VAR x: Item); - BEGIN load(x); Put1(Mov, RH, 0, -60); Put2(Str, x.r, RH, 0); DEC(RH) - END Led; - - PROCEDURE Get*(VAR x, y: Item); - BEGIN load(x); x.type := y.type; x.mode := RegI; x.a := 0; Store(y, x) - END Get; - - PROCEDURE Put*(VAR x, y: Item); - BEGIN load(x); x.type := y.type; x.mode := RegI; x.a := 0; Store(x, y) - END Put; - - PROCEDURE Copy*(VAR x, y, z: Item); - BEGIN load(x); load(y); - IF z.mode = ORB.Const THEN - IF z.a > 0 THEN load(z) ELSE ORS.Mark("bad count") END - ELSE load(z); - IF check THEN Trap(LT, 3) END ; - Put3(BC, EQ, 6) - END ; - Put2(Ldr, RH, x.r, 0); Put1(Add, x.r, x.r, 4); - Put2(Str, RH, y.r, 0); Put1(Add, y.r, y.r, 4); - Put1(Sub, z.r, z.r, 1); Put3(BC, NE, -6); DEC(RH, 3) - END Copy; - - PROCEDURE LDPSR*(VAR x: Item); - BEGIN (*x.mode = Const*) Put3(0, 15, x.a + 20H) - END LDPSR; - - PROCEDURE LDREG*(VAR x, y: Item); - BEGIN - IF y.mode = ORB.Const THEN Put1a(Mov, x.a, 0, y.a) - ELSE load(y); Put0(Mov, x.a, 0, y.r); DEC(RH) - END - END LDREG; - - (*In-line code functions*) - - PROCEDURE Abs*(VAR x: Item); - BEGIN - IF x.mode = ORB.Const THEN x.a := ABS(x.a) - ELSE load(x); - IF x.type.form = ORB.Real THEN Put1(Lsl, x.r, x.r, 1); Put1(Ror, x.r, x.r, 1) - ELSE Put1(Cmp, x.r, x.r, 0); Put3(BC, GE, 2); Put1(Mov, RH, 0, 0); Put0(Sub, x.r, RH, x.r) - END - END - END Abs; - - PROCEDURE Odd*(VAR x: Item); - BEGIN load(x); Put1(And, x.r, x.r, 1); SetCC(x, NE); DEC(RH) - END Odd; - - PROCEDURE Floor*(VAR x: Item); - BEGIN load(x); Put1(Mov+U, RH, 0, 4B00H); Put0(Fad+V, x.r, x.r, RH) - END Floor; - - PROCEDURE Float*(VAR x: Item); - BEGIN load(x); Put1(Mov+U, RH, 0, 4B00H); Put0(Fad+U, x.r, x.r, RH) - END Float; - - PROCEDURE Ord*(VAR x: Item); - BEGIN - IF x.mode IN {ORB.Var, ORB.Par, RegI} THEN load(x) END - END Ord; - - PROCEDURE Len*(VAR x: Item); - BEGIN - IF x.type.len >= 0 THEN x.mode := ORB.Const; x.a := x.type.len - ELSE (*open array*) Put2(Ldr, RH, SP, x.a + 4 + frame); x.mode := Reg; x.r := RH; incR - END - END Len; - - PROCEDURE Shift*(fct: LONGINT; VAR x, y: Item); - VAR op: LONGINT; - BEGIN load(x); - IF fct = 0 THEN op := Lsl ELSIF fct = 1 THEN op := Asr ELSE op := Ror END ; - IF y.mode = ORB.Const THEN Put1(op, x.r, x.r, y.a MOD 20H) - ELSE load(y); Put0(op, RH-2, x.r, y.r); DEC(RH); x.r := RH-1 - END - END Shift; - - PROCEDURE ADC*(VAR x, y: Item); - BEGIN load(x); load(y); Put0(Add+2000H, x.r, x.r, y.r); DEC(RH) - END ADC; - - PROCEDURE SBC*(VAR x, y: Item); - BEGIN load(x); load(y); Put0(Sub+2000H, x.r, x.r, y.r); DEC(RH) - END SBC; - - PROCEDURE UML*(VAR x, y: Item); - BEGIN load(x); load(y); Put0(Mul+2000H, x.r, x.r, y.r); DEC(RH) - END UML; - - PROCEDURE Bit*(VAR x, y: Item); - BEGIN load(x); Put2(Ldr, x.r, x.r, 0); - IF y.mode = ORB.Const THEN Put1(Ror, x.r, x.r, y.a+1); DEC(RH) - ELSE load(y); Put1(Add, y.r, y.r, 1); Put0(Ror, x.r, x.r, y.r); DEC(RH, 2) - END ; - SetCC(x, MI) - END Bit; - - PROCEDURE Register*(VAR x: Item); - BEGIN (*x.mode = Const*) - Put0(Mov, RH, 0, x.a MOD 10H); x.mode := Reg; x.r := RH; incR - END Register; - - PROCEDURE H*(VAR x: Item); - BEGIN (*x.mode = Const*) - Put0(Mov + U + x.a MOD 2 * V, RH, 0, 0); x.mode := Reg; x.r := RH; incR - END H; - - PROCEDURE Adr*(VAR x: Item); - BEGIN - IF x.mode IN {ORB.Var, ORB.Par, RegI} THEN loadAdr(x) - ELSIF (x.mode = ORB.Const) & (x.type.form = ORB.Proc) THEN load(x) - ELSIF (x.mode = ORB.Const) & (x.type.form = ORB.String) THEN loadStringAdr(x) - ELSE ORS.Mark("not addressable") - END - END Adr; - - PROCEDURE Condition*(VAR x: Item); - BEGIN (*x.mode = Const*) SetCC(x, x.a) - END Condition; - - PROCEDURE Open*(v: INTEGER); - BEGIN pc := 0; tdx := 0; strx := 0; RH := 0; fixorgP := 0; fixorgD := 0; fixorgT := 0; check := v # 0; version := v; - IF v = 0 THEN pc := 8 END - END Open; - - PROCEDURE SetDataSize*(dc: LONGINT); - BEGIN varsize := dc - END SetDataSize; - - PROCEDURE Header*; - BEGIN entry := pc*4; - IF version = 0 THEN code[0] := 0E7000000H-1 + pc; Put1a(Mov, SB, 0, VarOrg0); Put1a(Mov, SP, 0, StkOrg0) (*RISC-0*) - ELSE Put1(Sub, SP, SP, 4); Put2(Str, LNK, SP, 0); invalSB - END - END Header; - - PROCEDURE NofPtrs(typ: ORB.Type): LONGINT; - VAR fld: ORB.Object; n: LONGINT; - BEGIN - IF (typ.form = ORB.Pointer) OR (typ.form = ORB.NilTyp) THEN n := 1 - ELSIF typ.form = ORB.Record THEN - fld := typ.dsc; n := 0; - WHILE fld # NIL DO n := NofPtrs(fld.type) + n; fld := fld.next END - ELSIF typ.form = ORB.Array THEN n := NofPtrs(typ.base) * typ.len - ELSE n := 0 - END ; - RETURN n - END NofPtrs; - - PROCEDURE FindPtrs(VAR R: Files.Rider; typ: ORB.Type; adr: LONGINT); - VAR fld: ORB.Object; i, s: LONGINT; - BEGIN - IF (typ.form = ORB.Pointer) OR (typ.form = ORB.NilTyp) THEN Files.WriteInt(R, adr) - ELSIF typ.form = ORB.Record THEN - fld := typ.dsc; - WHILE fld # NIL DO FindPtrs(R, fld.type, fld.val + adr); fld := fld.next END - ELSIF typ.form = ORB.Array THEN - s := typ.base.size; - FOR i := 0 TO typ.len-1 DO FindPtrs(R, typ.base, i*s + adr) END - END - END FindPtrs; - - PROCEDURE Close*(VAR modid: ORS.Ident; key, nofent: LONGINT); - VAR obj: ORB.Object; - i, comsize, nofimps, nofptrs, size: LONGINT; - name: ORS.Ident; - F: Files.File; R: Files.Rider; - BEGIN (*exit code*) - IF version = 0 THEN Put1(Mov, 0, 0, 0); Put3(BR, 7, 0) (*RISC-0*) - ELSE Put2(Ldr, LNK, SP, 0); Put1(Add, SP, SP, 4); Put3(BR, 7, LNK) - END ; - obj := ORB.topScope.next; nofimps := 0; comsize := 4; nofptrs := 0; - WHILE obj # NIL DO - IF (obj.class = ORB.Mod) & (obj.dsc # ORB.system) THEN INC(nofimps) (*count imports*) - ELSIF (obj.exno # 0) & (obj.class = ORB.Const) & (obj.type.form = ORB.Proc) - & (obj.type.nofpar = 0) & (obj.type.base = ORB.noType) THEN i := 0; (*count commands*) - WHILE obj.name[i] # 0X DO INC(i) END ; - i := (i+4) DIV 4 * 4; INC(comsize, i+4) - ELSIF obj.class = ORB.Var THEN INC(nofptrs, NofPtrs(obj.type)) (*count pointers*) - END ; - obj := obj.next - END ; - size := varsize + strx + comsize + (pc + nofimps + nofent + nofptrs + 1)*4; (*varsize includes type descriptors*) - - ORB.MakeFileName(name, modid, ".rsc"); (*write code file*) - F := Files.New(name); Files.Set(R, F, 0); Files.WriteString(R, modid); Files.WriteInt(R, key); - (*Files.WriteByte(R, version);*) (* who writes like that? -- noch *) - Files.WriteByte(R, SHORT(SHORT(version))); (* voc adaptation by noch *) - Files.WriteInt(R, size); - obj := ORB.topScope.next; - WHILE (obj # NIL) & (obj.class = ORB.Mod) DO (*imports*) - IF obj.dsc # ORB.system THEN Files.WriteString(R, obj(ORB.Module).orgname); Files.WriteInt(R, obj.val) END ; - obj := obj.next - END ; - Files.Write(R, 0X); - Files.WriteInt(R, tdx*4); - i := 0; - WHILE i < tdx DO Files.WriteInt(R, data[i]); INC(i) END ; (*type descriptors*) - Files.WriteInt(R, varsize - tdx*4); (*data*) - Files.WriteInt(R, strx); - FOR i := 0 TO strx-1 DO Files.Write(R, str[i]) END ; (*strings*) - Files.WriteInt(R, pc); (*code len*) - FOR i := 0 TO pc-1 DO Files.WriteInt(R, code[i]) END ; (*program*) - obj := ORB.topScope.next; - WHILE obj # NIL DO (*commands*) - IF (obj.exno # 0) & (obj.class = ORB.Const) & (obj.type.form = ORB.Proc) & - (obj.type.nofpar = 0) & (obj.type.base = ORB.noType) THEN - Files.WriteString(R, obj.name); Files.WriteInt(R, obj.val) - END ; - obj := obj.next - END ; - Files.Write(R, 0X); - Files.WriteInt(R, nofent); Files.WriteInt(R, entry); - obj := ORB.topScope.next; - WHILE obj # NIL DO (*entries*) - IF obj.exno # 0 THEN - IF (obj.class = ORB.Const) & (obj.type.form = ORB.Proc) OR (obj.class = ORB.Var) THEN - Files.WriteInt(R, obj.val) - ELSIF obj.class = ORB.Typ THEN - IF obj.type.form = ORB.Record THEN Files.WriteInt(R, obj.type.len MOD 10000H) - ELSIF (obj.type.form = ORB.Pointer) & ((obj.type.base.typobj = NIL) OR (obj.type.base.typobj.exno = 0)) THEN - Files.WriteInt(R, obj.type.base.len MOD 10000H) - END - END - END ; - obj := obj.next - END ; - obj := ORB.topScope.next; - WHILE obj # NIL DO (*pointer variables*) - IF obj.class = ORB.Var THEN FindPtrs(R, obj.type, obj.val) END ; - obj := obj.next - END ; - Files.WriteInt(R, -1); - Files.WriteInt(R, fixorgP); Files.WriteInt(R, fixorgD); Files.WriteInt(R, fixorgT); Files.WriteInt(R, entry); - Files.Write(R, "O"); Files.Register(F) - END Close; - -BEGIN - relmap[0] := 1; relmap[1] := 9; relmap[2] := 5; relmap[3] := 6; relmap[4] := 14; relmap[5] := 13 -END ORG. diff --git a/src/voc07R/ORP.Mod b/src/voc07R/ORP.Mod deleted file mode 100644 index 99e6ee83..00000000 --- a/src/voc07R/ORP.Mod +++ /dev/null @@ -1,997 +0,0 @@ -MODULE ORP; (*N. Wirth 1.7.97 / 7.6.2014 Oberon compiler for RISC in Oberon-07*) - IMPORT Texts := CompatTexts, Oberon, ORS, ORB, ORG; - (*Author: Niklaus Wirth, 2014. - Parser of Oberon-RISC compiler. Uses Scanner ORS to obtain symbols (tokens), - ORB for definition of data structures and for handling import and export, and - ORG to produce binary code. ORP performs type checking and data allocation. - Parser is target-independent, except for part of the handling of allocations.*) - - TYPE INTEGER = LONGINT; (* voc adaptation by noch *) - - TYPE PtrBase = POINTER TO PtrBaseDesc; - PtrBaseDesc = RECORD (*list of names of pointer base types*) - name: ORS.Ident; type: ORB.Type; next: PtrBase - END ; - - VAR sym: INTEGER; (*last symbol read*) - dc: LONGINT; (*data counter*) - level, exno, version: INTEGER; - newSF: BOOLEAN; (*option flag*) - expression: PROCEDURE (VAR x: ORG.Item); (*to avoid forward reference*) - Type: PROCEDURE (VAR type: ORB.Type); - FormalType: PROCEDURE (VAR typ: ORB.Type; dim: INTEGER); - modid: ORS.Ident; - pbsList: PtrBase; (*list of names of pointer base types*) - dummy: ORB.Object; - W: Texts.Writer; - - PROCEDURE Check(s: INTEGER; msg: ARRAY OF CHAR); - BEGIN - IF sym = s THEN ORS.Get(sym) ELSE ORS.Mark(msg) END - END Check; - - PROCEDURE qualident(VAR obj: ORB.Object); - BEGIN obj := ORB.thisObj(); ORS.Get(sym); - IF obj = NIL THEN ORS.Mark("undef"); obj := dummy END ; - IF (sym = ORS.period) & (obj.class = ORB.Mod) THEN - ORS.Get(sym); - IF sym = ORS.ident THEN obj := ORB.thisimport(obj); ORS.Get(sym); - IF obj = NIL THEN ORS.Mark("undef"); obj := dummy END - ELSE ORS.Mark("identifier expected"); obj := dummy - END - END - END qualident; - - PROCEDURE CheckBool(VAR x: ORG.Item); - BEGIN - IF x.type.form # ORB.Bool THEN ORS.Mark("not Boolean"); x.type := ORB.boolType END - END CheckBool; - - PROCEDURE CheckInt(VAR x: ORG.Item); - BEGIN - IF x.type.form # ORB.Int THEN ORS.Mark("not Integer"); x.type := ORB.intType END - END CheckInt; - - PROCEDURE CheckReal(VAR x: ORG.Item); - BEGIN - IF x.type.form # ORB.Real THEN ORS.Mark("not Real"); x.type := ORB.realType END - END CheckReal; - - PROCEDURE CheckSet(VAR x: ORG.Item); - BEGIN - IF x.type.form # ORB.Set THEN ORS.Mark("not Set"); x.type := ORB.setType END - END CheckSet; - - PROCEDURE CheckSetVal(VAR x: ORG.Item); - BEGIN - IF x.type.form # ORB.Int THEN ORS.Mark("not Int"); x.type := ORB.setType - ELSIF x.mode = ORB.Const THEN - IF (x.a < 0) OR (x.a >= 32) THEN ORS.Mark("invalid set") END - END - END CheckSetVal; - - PROCEDURE CheckConst(VAR x: ORG.Item); - BEGIN - IF x.mode # ORB.Const THEN ORS.Mark("not a constant"); x.mode := ORB.Const END - END CheckConst; - - PROCEDURE CheckReadOnly(VAR x: ORG.Item); - BEGIN - IF x.rdo THEN ORS.Mark("read-only") END - END CheckReadOnly; - - PROCEDURE CheckExport(VAR expo: BOOLEAN); - BEGIN - IF sym = ORS.times THEN - expo := TRUE; ORS.Get(sym); - IF level # 0 THEN ORS.Mark("remove asterisk") END - ELSE expo := FALSE - END - END CheckExport; - - PROCEDURE IsExtension(t0, t1: ORB.Type): BOOLEAN; - BEGIN (*t1 is an extension of t0*) - RETURN (t0 = t1) OR (t1 # NIL) & IsExtension(t0, t1.base) - END IsExtension; - - (* expressions *) - - PROCEDURE TypeTest(VAR x: ORG.Item; T: ORB.Type; guard: BOOLEAN); - VAR xt: ORB.Type; - BEGIN xt := x.type; - WHILE (xt # T) & (xt # NIL) DO xt := xt.base END ; - IF xt # T THEN xt := x.type; - IF (xt.form = ORB.Pointer) & (T.form = ORB.Pointer) THEN - IF IsExtension(xt.base, T.base) THEN ORG.TypeTest(x, T.base, FALSE, guard); x.type := T - ELSE ORS.Mark("not an extension") - END - ELSIF (xt.form = ORB.Record) & (T.form = ORB.Record) & (x.mode = ORB.Par) THEN - IF IsExtension(xt, T) THEN ORG.TypeTest(x, T, TRUE, guard); x.type := T - ELSE ORS.Mark("not an extension") - END - ELSE ORS.Mark("incompatible types") - END - ELSIF ~guard THEN ORG.MakeConstItem(x, ORB.boolType, 1) - END ; - IF ~guard THEN x.type := ORB.boolType END - END TypeTest; - - PROCEDURE selector(VAR x: ORG.Item); - VAR y: ORG.Item; obj: ORB.Object; - BEGIN - WHILE (sym = ORS.lbrak) OR (sym = ORS.period) OR (sym = ORS.arrow) - OR (sym = ORS.lparen) & (x.type.form IN {ORB.Record, ORB.Pointer}) DO - IF sym = ORS.lbrak THEN - REPEAT ORS.Get(sym); expression(y); - IF x.type.form = ORB.Array THEN - CheckInt(y); ORG.Index(x, y); x.type := x.type.base - ELSE ORS.Mark("not an array") - END - UNTIL sym # ORS.comma; - Check(ORS.rbrak, "no ]") - ELSIF sym = ORS.period THEN ORS.Get(sym); - IF sym = ORS.ident THEN - IF x.type.form = ORB.Pointer THEN ORG.DeRef(x); x.type := x.type.base END ; - IF x.type.form = ORB.Record THEN - obj := ORB.thisfield(x.type); ORS.Get(sym); - IF obj # NIL THEN ORG.Field(x, obj); x.type := obj.type - ELSE ORS.Mark("undef") - END - ELSE ORS.Mark("not a record") - END - ELSE ORS.Mark("ident?") - END - ELSIF sym = ORS.arrow THEN - ORS.Get(sym); - IF x.type.form = ORB.Pointer THEN ORG.DeRef(x); x.type := x.type.base - ELSE ORS.Mark("not a pointer") - END - ELSIF (sym = ORS.lparen) & (x.type.form IN {ORB.Record, ORB.Pointer}) THEN (*type guard*) - ORS.Get(sym); - IF sym = ORS.ident THEN - qualident(obj); - IF obj.class = ORB.Typ THEN TypeTest(x, obj.type, TRUE) - ELSE ORS.Mark("guard type expected") - END - ELSE ORS.Mark("not an identifier") - END ; - Check(ORS.rparen, " ) missing") - END - END - END selector; - - PROCEDURE CompTypes(t0, t1: ORB.Type; varpar: BOOLEAN): BOOLEAN; - - PROCEDURE EqualSignatures(t0, t1: ORB.Type): BOOLEAN; - VAR p0, p1: ORB.Object; com: BOOLEAN; - BEGIN com := TRUE; - IF (t0.base = t1.base) & (t0.nofpar = t1.nofpar) THEN - p0 := t0.dsc; p1 := t1.dsc; - WHILE p0 # NIL DO - IF (p0.class = p1.class) & CompTypes(p0.type, p1.type, TRUE) & - (*(ORD(p0.rdo) = ORD(p1.rdo))*) - (p0.rdo = p1.rdo) (* voc adaptation by noch *) - THEN - IF p0.type.form >= ORB.Array THEN com := CompTypes(p0.type, p1.type, (p0.class = ORB.Par)) END ; - p0 := p0.next; p1 := p1.next - ELSE p0 := NIL; com := FALSE - END - END - ELSE com := FALSE - END ; - RETURN com - END EqualSignatures; - - BEGIN (*Compatible Types*) - RETURN (t0 = t1) - OR (t0.form = ORB.Array) & (t1.form = ORB.Array) & CompTypes(t0.base, t1.base, varpar) - OR (t0.form = ORB.Pointer) & (t1.form = ORB.Pointer) & IsExtension(t0.base, t1.base) - OR (t0.form = ORB.Record) & (t1.form = ORB.Record) & IsExtension(t0, t1) - OR (t0.form = ORB.Proc) & (t1.form = ORB.Proc) & EqualSignatures(t0, t1) - OR (t0.form IN {ORB.Pointer, ORB.Proc}) & (t1.form = ORB.NilTyp) - OR (t0.form = ORB.NilTyp) & (t1.form IN {ORB.Pointer, ORB.Proc}) - OR ~varpar & (t0.form = ORB.Int) & (t1.form = ORB.Int) - END CompTypes; - - PROCEDURE Parameter(par: ORB.Object); - VAR x: ORG.Item; varpar: BOOLEAN; - BEGIN expression(x); - IF par # NIL THEN - varpar := par.class = ORB.Par; - IF CompTypes(par.type, x.type, varpar) THEN - IF ~varpar THEN ORG.ValueParam(x) - ELSE (*par.class = Par*) - IF ~par.rdo THEN CheckReadOnly(x) END ; - ORG.VarParam(x, par.type) - END - ELSIF ~varpar & (par.type.form = ORB.Int) & (x.type.form = ORB.Int) THEN - ORG.ValueParam(x) - ELSIF (x.type.form = ORB.String) & (x.b = 2) & (par.class = ORB.Var) & (par.type.form = ORB.Char) THEN - ORG.StrToChar(x); ORG.ValueParam(x) - ELSIF (x.type.form = ORB.Array) & (par.type.form = ORB.Array) & - (x.type.base.form = par.type.base.form) & (par.type.len < 0) THEN - ORG.OpenArrayParam(x); - ELSIF (x.type.form = ORB.String) & varpar & par.rdo & (par.type.form = ORB.Array) & - (par.type.base.form = ORB.Char) & (par.type.len < 0) THEN ORG.StringParam(x) - ELSIF (par.type.form = ORB.Array) & (par.type.base.form = ORB.Int) & (par.type.size = x.type.size) THEN - ORG.VarParam(x, par.type) - ELSE ORS.Mark("incompatible parameters") - END - END - END Parameter; - - PROCEDURE ParamList(VAR x: ORG.Item); - VAR n: INTEGER; par: ORB.Object; - BEGIN par := x.type.dsc; n := 0; - IF sym # ORS.rparen THEN - Parameter(par); n := 1; - WHILE sym <= ORS.comma DO - Check(sym, "comma?"); - IF par # NIL THEN par := par.next END ; - INC(n); Parameter(par) - END ; - Check(ORS.rparen, ") missing") - ELSE ORS.Get(sym); - END ; - IF n < x.type.nofpar THEN ORS.Mark("too few params") - ELSIF n > x.type.nofpar THEN ORS.Mark("too many params") - END - END ParamList; - - PROCEDURE StandFunc(VAR x: ORG.Item; fct: LONGINT; restyp: ORB.Type); - VAR y: ORG.Item; n, npar: LONGINT; - BEGIN Check(ORS.lparen, "no ("); - npar := fct MOD 10; fct := fct DIV 10; expression(x); n := 1; - WHILE sym = ORS.comma DO ORS.Get(sym); expression(y); INC(n) END ; - Check(ORS.rparen, "no )"); - IF n = npar THEN - IF fct = 0 THEN (*ABS*) - IF x.type.form IN {ORB.Int, ORB.Real} THEN ORG.Abs(x); restyp := x.type ELSE ORS.Mark("bad type") END - ELSIF fct = 1 THEN (*ODD*) CheckInt(x); ORG.Odd(x) - ELSIF fct = 2 THEN (*FLOOR*) CheckReal(x); ORG.Floor(x) - ELSIF fct = 3 THEN (*FLT*) CheckInt(x); ORG.Float(x) - ELSIF fct = 4 THEN (*ORD*) - IF x.type.form <= ORB.Proc THEN ORG.Ord(x) - ELSIF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) - ELSE ORS.Mark("bad type") - END - ELSIF fct = 5 THEN (*CHR*) CheckInt(x); ORG.Ord(x) - ELSIF fct = 6 THEN (*LEN*) - IF x.type.form = ORB.Array THEN ORG.Len(x) ELSE ORS.Mark("not an array") END - ELSIF fct IN {7, 8, 9} THEN (*LSL, ASR, ROR*) CheckInt(y); - IF x.type.form IN {ORB.Int, ORB.Set} THEN ORG.Shift(fct-7, x, y); restyp := x.type ELSE ORS.Mark("bad type") END - ELSIF fct = 11 THEN (*ADC*) ORG.ADC(x, y) - ELSIF fct = 12 THEN (*SBC*) ORG.SBC(x, y) - ELSIF fct = 13 THEN (*UML*) ORG.UML(x, y) - ELSIF fct = 14 THEN (*BIT*) CheckInt(x); CheckInt(y); ORG.Bit(x, y) - ELSIF fct = 15 THEN (*REG*) CheckConst(x); CheckInt(x); ORG.Register(x) - ELSIF fct = 16 THEN (*VAL*) - IF (x.mode= ORB.Typ) & (x.type.size <= y.type.size) THEN restyp := x.type; x := y - ELSE ORS.Mark("casting not allowed") - END - ELSIF fct = 17 THEN (*ADR*) ORG.Adr(x) - ELSIF fct = 18 THEN (*SIZE*) - IF x.mode = ORB.Typ THEN ORG.MakeConstItem(x, ORB.intType, x.type.size) - ELSE ORS.Mark("must be a type") - END - ELSIF fct = 19 THEN (*COND*) CheckConst(x); CheckInt(x); ORG.Condition(x) - ELSIF fct = 20 THEN (*H*) CheckConst(x); CheckInt(x); ORG.H(x) - END ; - x.type := restyp - ELSE ORS.Mark("wrong nof params") - END - END StandFunc; - - PROCEDURE element(VAR x: ORG.Item); - VAR y: ORG.Item; - BEGIN expression(x); CheckSetVal(x); - IF sym = ORS.upto THEN ORS.Get(sym); expression(y); CheckSetVal(y); ORG.Set(x, y) - ELSE ORG.Singleton(x) - END ; - x.type := ORB.setType - END element; - - PROCEDURE set(VAR x: ORG.Item); - VAR y: ORG.Item; - BEGIN - IF sym >= ORS.if THEN - IF sym # ORS.rbrace THEN ORS.Mark(" } missing") END ; - ORG.MakeConstItem(x, ORB.setType, 0) (*empty set*) - ELSE element(x); - WHILE (sym < ORS.rparen) OR (sym > ORS.rbrace) DO - IF sym = ORS.comma THEN ORS.Get(sym) - ELSIF sym # ORS.rbrace THEN ORS.Mark("missing comma") - END ; - element(y); ORG.SetOp(ORS.plus, x, y) - END - END - END set; - - PROCEDURE factor(VAR x: ORG.Item); - VAR obj: ORB.Object; rx: LONGINT; - BEGIN (*sync*) - IF (sym < ORS.char) OR (sym > ORS.ident) THEN ORS.Mark("expression expected"); - REPEAT ORS.Get(sym) UNTIL (sym >= ORS.char) & (sym <= ORS.ident) - END ; - IF sym = ORS.ident THEN - qualident(obj); - IF obj.class = ORB.SFunc THEN StandFunc(x, obj.val, obj.type) - ELSE ORG.MakeItem(x, obj, level); selector(x); - IF sym = ORS.lparen THEN - ORS.Get(sym); - IF (x.type.form = ORB.Proc) & (x.type.base.form # ORB.NoTyp) THEN - ORG.PrepCall(x, rx); ParamList(x); ORG.Call(x, rx); x.type := x.type.base - ELSE ORS.Mark("not a function"); ParamList(x) - END - END - END - ELSIF sym = ORS.int THEN ORG.MakeConstItem(x, ORB.intType, ORS.ival); ORS.Get(sym) - ELSIF sym = ORS.real THEN ORG.MakeRealItem(x, ORS.rval); ORS.Get(sym) - ELSIF sym = ORS.char THEN ORG.MakeConstItem(x, ORB.charType, ORS.ival); ORS.Get(sym) - ELSIF sym = ORS.nil THEN ORS.Get(sym); ORG.MakeConstItem(x, ORB.nilType, 0) - ELSIF sym = ORS.string THEN ORG.MakeStringItem(x, ORS.slen); ORS.Get(sym) - ELSIF sym = ORS.lparen THEN ORS.Get(sym); expression(x); Check(ORS.rparen, "no )") - ELSIF sym = ORS.lbrace THEN ORS.Get(sym); set(x); Check(ORS.rbrace, "no }") - ELSIF sym = ORS.not THEN ORS.Get(sym); factor(x); CheckBool(x); ORG.Not(x) - ELSIF sym = ORS.false THEN ORS.Get(sym); ORG.MakeConstItem(x, ORB.boolType, 0) - ELSIF sym = ORS.true THEN ORS.Get(sym); ORG.MakeConstItem(x, ORB.boolType, 1) - ELSE ORS.Mark("not a factor"); ORG.MakeItem(x, NIL, level) - END - END factor; - - PROCEDURE term(VAR x: ORG.Item); - VAR y: ORG.Item; op, f: INTEGER; - BEGIN factor(x); f := x.type.form; - WHILE (sym >= ORS.times) & (sym <= ORS.and) DO - op := sym; ORS.Get(sym); - IF op = ORS.times THEN - IF f = ORB.Int THEN factor(y); CheckInt(y); ORG.MulOp(x, y) - ELSIF f = ORB.Real THEN factor(y); CheckReal(y); ORG.RealOp(op, x, y) - ELSIF f = ORB.Set THEN factor(y); CheckSet(y); ORG.SetOp(op, x, y) - ELSE ORS.Mark("bad type") - END - ELSIF (op = ORS.div) OR (op = ORS.mod) THEN - CheckInt(x); factor(y); CheckInt(y); ORG.DivOp(op, x, y) - ELSIF op = ORS.rdiv THEN - IF f = ORB.Real THEN factor(y); CheckReal(y); ORG.RealOp(op, x, y) - ELSIF f = ORB.Set THEN factor(y); CheckSet(y); ORG.SetOp(op, x, y) - ELSE ORS.Mark("bad type") - END - ELSE (*op = and*) CheckBool(x); ORG.And1(x); factor(y); CheckBool(y); ORG.And2(x, y) - END - END - END term; - - PROCEDURE SimpleExpression(VAR x: ORG.Item); - VAR y: ORG.Item; op: INTEGER; - BEGIN - IF sym = ORS.minus THEN ORS.Get(sym); term(x); - IF x.type.form IN {ORB.Int, ORB.Real, ORB.Set} THEN ORG.Neg(x) ELSE CheckInt(x) END - ELSIF sym = ORS.plus THEN ORS.Get(sym); term(x); - ELSE term(x) - END ; - WHILE (sym >= ORS.plus) & (sym <= ORS.or) DO - op := sym; ORS.Get(sym); - IF op = ORS.or THEN ORG.Or1(x); CheckBool(x); term(y); CheckBool(y); ORG.Or2(x, y) - ELSIF x.type.form = ORB.Int THEN term(y); CheckInt(y); ORG.AddOp(op, x, y) - ELSIF x.type.form = ORB.Real THEN term(y); CheckReal(y); ORG.RealOp(op, x, y) - ELSE CheckSet(x); term(y); CheckSet(y); ORG.SetOp(op, x, y) - END - END - END SimpleExpression; - - PROCEDURE expression0(VAR x: ORG.Item); - VAR y: ORG.Item; obj: ORB.Object; rel, xf, yf: INTEGER; - BEGIN SimpleExpression(x); - IF (sym >= ORS.eql) & (sym <= ORS.geq) THEN - rel := sym; ORS.Get(sym); SimpleExpression(y); xf := x.type.form; yf := y.type.form; - IF CompTypes(x.type, y.type, FALSE) OR - (xf = ORB.Pointer) & (yf = ORB.Pointer) & IsExtension(y.type.base, x.type.base) THEN - IF (xf IN {ORB.Char, ORB.Int}) THEN ORG.IntRelation(rel, x, y) - ELSIF xf = ORB.Real THEN ORG.RealRelation(rel, x, y) - ELSIF xf = ORB.Set THEN ORG.SetRelation(rel, x, y) - ELSIF (xf IN {ORB.Pointer, ORB.Proc, ORB.NilTyp}) THEN - IF rel <= ORS.neq THEN ORG.IntRelation(rel, x, y) ELSE ORS.Mark("only = or #") END - ELSIF (xf = ORB.Array) & (x.type.base.form = ORB.Char) OR (xf = ORB.String) THEN - ORG.StringRelation(rel, x, y) - ELSE ORS.Mark("illegal comparison") - END - ELSIF (xf = ORB.Array) & (x.type.base.form = ORB.Char) & - ((yf = ORB.String) OR (yf = ORB.Array) & (y.type.base.form = ORB.Char)) - OR (yf = ORB.Array) & (y.type.base.form = ORB.Char) & (xf = ORB.String) THEN - ORG.StringRelation(rel, x, y) - ELSIF (xf = ORB.Char) & (yf = ORB.String) & (y.b = 2) THEN - ORG.StrToChar(y); ORG.IntRelation(rel, x, y) - ELSIF (yf = ORB.Char) & (xf = ORB.String) & (x.b = 2) THEN - ORG.StrToChar(x); ORG.IntRelation(rel, x, y) - ELSE ORS.Mark("illegal comparison") - END ; - x.type := ORB.boolType - ELSIF sym = ORS.in THEN - ORS.Get(sym); SimpleExpression(y); - IF (x.type.form = ORB.Int) & (y.type.form = ORB.Set) THEN ORG.In(x, y) - ELSE ORS.Mark("illegal operands of IN") - END ; - x.type := ORB.boolType - ELSIF sym = ORS.is THEN - ORS.Get(sym); qualident(obj); TypeTest(x, obj.type, FALSE) ; - x.type := ORB.boolType - END - END expression0; - - (* statements *) - - PROCEDURE StandProc(pno: LONGINT); - VAR nap, npar: LONGINT; (*nof actual/formal parameters*) - x, y, z: ORG.Item; - BEGIN Check(ORS.lparen, "no ("); - npar := pno MOD 10; pno := pno DIV 10; expression(x); nap := 1; - IF sym = ORS.comma THEN - ORS.Get(sym); expression(y); nap := 2; z.type := ORB.noType; - WHILE sym = ORS.comma DO ORS.Get(sym); expression(z); INC(nap) END - ELSE y.type := ORB.noType - END ; - Check(ORS.rparen, "no )"); - IF (npar = nap) OR (pno IN {0, 1}) THEN - IF pno IN {0, 1} THEN (*INC, DEC*) - CheckInt(x); CheckReadOnly(x); - IF y.type # ORB.noType THEN CheckInt(y) END ; - ORG.Increment(pno, x, y) - ELSIF pno IN {2, 3} THEN (*INCL, EXCL*) - CheckSet(x); CheckReadOnly(x); CheckInt(y); ORG.Include(pno-2, x, y) - ELSIF pno = 4 THEN CheckBool(x); ORG.Assert(x) - ELSIF pno = 5 THEN(*NEW*) CheckReadOnly(x); - IF (x.type.form = ORB.Pointer) & (x.type.base.form = ORB.Record) THEN ORG.New(x) - ELSE ORS.Mark("not a pointer to record") - END - ELSIF pno = 6 THEN CheckReal(x); CheckInt(y); CheckReadOnly(x); ORG.Pack(x, y) - ELSIF pno = 7 THEN CheckReal(x); CheckInt(y); CheckReadOnly(x); ORG.Unpk(x, y) - ELSIF pno = 8 THEN - IF x.type.form <= ORB.Set THEN ORG.Led(x) ELSE ORS.Mark("bad type") END - ELSIF pno = 10 THEN CheckInt(x); ORG.Get(x, y) - ELSIF pno = 11 THEN CheckInt(x); ORG.Put(x, y) - ELSIF pno = 12 THEN CheckInt(x); CheckInt(y); CheckInt(z); ORG.Copy(x, y, z) - ELSIF pno = 13 THEN CheckConst(x); CheckInt(x); ORG.LDPSR(x) - ELSIF pno = 14 THEN CheckInt(x); ORG.LDREG(x, y) - END - ELSE ORS.Mark("wrong nof parameters") - END - END StandProc; - - PROCEDURE StatSequence; - VAR obj: ORB.Object; - orgtype: ORB.Type; (*original type of case var*) - x, y, z, w: ORG.Item; - L0, L1, rx: LONGINT; - - PROCEDURE TypeCase(obj: ORB.Object; VAR x: ORG.Item); - VAR typobj: ORB.Object; - BEGIN - IF sym = ORS.ident THEN - qualident(typobj); ORG.MakeItem(x, obj, level); - IF typobj.class # ORB.Typ THEN ORS.Mark("not a type") END ; - TypeTest(x, typobj.type, FALSE); obj.type := typobj.type; - ORG.CFJump(x); Check(ORS.colon, ": expected"); StatSequence - ELSE ORG.CFJump(x); ORS.Mark("type id expected") - END - END TypeCase; - - PROCEDURE SkipCase; - BEGIN - WHILE sym # ORS.colon DO ORS.Get(sym) END ; - ORS.Get(sym); StatSequence - END SkipCase; - - BEGIN (* StatSequence *) - REPEAT (*sync*) obj := NIL; - IF ~((sym = ORS.ident) OR (sym >= ORS.if) & (sym <= ORS.for) OR (sym >= ORS.semicolon)) THEN - ORS.Mark("statement expected"); - REPEAT ORS.Get(sym) UNTIL (sym = ORS.ident) OR (sym >= ORS.if) - END ; - IF sym = ORS.ident THEN - qualident(obj); ORG.MakeItem(x, obj, level); - IF x.mode = ORB.SProc THEN StandProc(obj.val) - ELSE selector(x); - IF sym = ORS.becomes THEN (*assignment*) - ORS.Get(sym); CheckReadOnly(x); expression(y); - IF CompTypes(x.type, y.type, FALSE) OR (x.type.form = ORB.Int) & (y.type.form = ORB.Int) THEN - IF (x.type.form <= ORB.Pointer) OR (x.type.form = ORB.Proc) THEN ORG.Store(x, y) - ELSIF y.type.size # 0 THEN ORG.StoreStruct(x, y) - END - ELSIF (x.type.form = ORB.Char) & (y.type.form = ORB.String) & (y.b = 2) THEN - ORG.StrToChar(y); ORG.Store(x, y) - ELSIF (x.type.form = ORB.Array) & (x.type.base.form = ORB.Char) & - (y.type.form = ORB.String) THEN ORG.CopyString(y, x) - ELSE ORS.Mark("illegal assignment") - END - ELSIF sym = ORS.eql THEN ORS.Mark("should be :="); ORS.Get(sym); expression(y) - ELSIF sym = ORS.lparen THEN (*procedure call*) - ORS.Get(sym); - IF (x.type.form = ORB.Proc) & (x.type.base.form = ORB.NoTyp) THEN - ORG.PrepCall(x, rx); ParamList(x); ORG.Call(x, rx) - ELSE ORS.Mark("not a procedure"); ParamList(x) - END - ELSIF x.type.form = ORB.Proc THEN (*procedure call without parameters*) - IF x.type.nofpar > 0 THEN ORS.Mark("missing parameters") END ; - IF x.type.base.form = ORB.NoTyp THEN ORG.PrepCall(x, rx); ORG.Call(x, rx) ELSE ORS.Mark("not a procedure") END - ELSIF x.mode = ORB.Typ THEN ORS.Mark("illegal assignment") - ELSE ORS.Mark("not a procedure") - END - END - ELSIF sym = ORS.if THEN - ORS.Get(sym); expression(x); CheckBool(x); ORG.CFJump(x); - Check(ORS.then, "no THEN"); - StatSequence; L0 := 0; - WHILE sym = ORS.elsif DO - ORS.Get(sym); ORG.FJump(L0); ORG.Fixup(x); expression(x); CheckBool(x); - ORG.CFJump(x); Check(ORS.then, "no THEN"); StatSequence - END ; - IF sym = ORS.else THEN ORS.Get(sym); ORG.FJump(L0); ORG.Fixup(x); StatSequence - ELSE ORG.Fixup(x) - END ; - ORG.FixLink(L0); Check(ORS.end, "no END") - ELSIF sym = ORS.while THEN - ORS.Get(sym); L0 := ORG.Here(); expression(x); CheckBool(x); ORG.CFJump(x); - Check(ORS.do, "no DO"); StatSequence; ORG.BJump(L0); - WHILE sym = ORS.elsif DO - ORS.Get(sym); ORG.Fixup(x); expression(x); CheckBool(x); ORG.CFJump(x); - Check(ORS.do, "no DO"); StatSequence; ORG.BJump(L0) - END ; - ORG.Fixup(x); Check(ORS.end, "no END") - ELSIF sym = ORS.repeat THEN - ORS.Get(sym); L0 := ORG.Here(); StatSequence; - IF sym = ORS.until THEN - ORS.Get(sym); expression(x); CheckBool(x); ORG.CBJump(x, L0) - ELSE ORS.Mark("missing UNTIL") - END - ELSIF sym = ORS.for THEN - ORS.Get(sym); - IF sym = ORS.ident THEN - qualident(obj); ORG.MakeItem(x, obj, level); CheckInt(x); CheckReadOnly(x); - IF sym = ORS.becomes THEN - ORS.Get(sym); expression(y); CheckInt(y); ORG.For0(x, y); L0 := ORG.Here(); - Check(ORS.to, "no TO"); expression(z); CheckInt(z); obj.rdo := TRUE; - IF sym = ORS.by THEN ORS.Get(sym); expression(w); CheckConst(w); CheckInt(w) - ELSE ORG.MakeConstItem(w, ORB.intType, 1) - END ; - Check(ORS.do, "no DO"); ORG.For1(x, y, z, w, L1); - StatSequence; Check(ORS.end, "no END"); - ORG.For2(x, y, w); ORG.BJump(L0); ORG.FixLink(L1); obj.rdo := FALSE - ELSE ORS.Mark(":= expected") - END - ELSE ORS.Mark("identifier expected") - END - ELSIF sym = ORS.case THEN - ORS.Get(sym); - IF sym = ORS.ident THEN - qualident(obj); orgtype := obj.type; - IF (orgtype.form = ORB.Pointer) OR (orgtype.form = ORB.Record) & (obj.class = ORB.Par) THEN - Check(ORS.of, "OF expected"); TypeCase(obj, x); L0 := 0; - WHILE sym = ORS.bar DO - ORS.Get(sym); ORG.FJump(L0); ORG.Fixup(x); obj.type := orgtype; TypeCase(obj, x) - END ; - ORG.Fixup(x); ORG.FixLink(L0); obj.type := orgtype - ELSE ORS.Mark("numeric case not implemented"); - Check(ORS.of, "OF expected"); SkipCase; - WHILE sym = ORS.bar DO SkipCase END - END - ELSE ORS.Mark("ident expected") - END ; - Check(ORS.end, "no END") - END ; - ORG.CheckRegs; - IF sym = ORS.semicolon THEN ORS.Get(sym) - ELSIF sym < ORS.semicolon THEN ORS.Mark("missing semicolon?") - END - UNTIL sym > ORS.semicolon - END StatSequence; - - (* Types and declarations *) - - PROCEDURE IdentList(class: INTEGER; VAR first: ORB.Object); - VAR obj: ORB.Object; - BEGIN - IF sym = ORS.ident THEN - ORB.NewObj(first, ORS.id, class); ORS.Get(sym); CheckExport(first.expo); - WHILE sym = ORS.comma DO - ORS.Get(sym); - IF sym = ORS.ident THEN ORB.NewObj(obj, ORS.id, class); ORS.Get(sym); CheckExport(obj.expo) - ELSE ORS.Mark("ident?") - END - END; - IF sym = ORS.colon THEN ORS.Get(sym) ELSE ORS.Mark(":?") END - ELSE first := NIL - END - END IdentList; - - PROCEDURE ArrayType(VAR type: ORB.Type); - VAR x: ORG.Item; typ: ORB.Type; len: LONGINT; - BEGIN NEW(typ); typ.form := ORB.NoTyp; - IF sym = ORS.of THEN (*dynamic array*) len := -1 - ELSE expression(x); - IF (x.mode = ORB.Const) & (x.type.form = ORB.Int) & (x.a >= 0) THEN len := x.a - ELSE len := 0; ORS.Mark("not a valid length") - END - END ; - IF sym = ORS.of THEN ORS.Get(sym); Type(typ.base); - IF (typ.base.form = ORB.Array) & (typ.base.len < 0) THEN ORS.Mark("dyn array not allowed") END - ELSIF sym = ORS.comma THEN ORS.Get(sym); ArrayType(typ.base) - ELSE ORS.Mark("missing OF"); typ.base := ORB.intType - END ; - IF len >= 0 THEN typ.size := (len * typ.base.size + 3) DIV 4 * 4 ELSE typ.size := 2*ORG.WordSize (*array desc*) END ; - typ.form := ORB.Array; typ.len := len; type := typ - END ArrayType; - - PROCEDURE RecordType(VAR type: ORB.Type); - VAR obj, obj0, new, bot, base: ORB.Object; - typ, tp: ORB.Type; - offset, off, n: LONGINT; - BEGIN NEW(typ); typ.form := ORB.NoTyp; typ.base := NIL; typ.mno := -level; typ.nofpar := 0; offset := 0; bot := NIL; - IF sym = ORS.lparen THEN - ORS.Get(sym); (*record extension*) - IF level # 0 THEN ORS.Mark("extension of local types not implemented") END ; - IF sym = ORS.ident THEN - qualident(base); - IF base.class = ORB.Typ THEN - IF base.type.form = ORB.Record THEN typ.base := base.type - ELSE typ.base := ORB.intType; ORS.Mark("invalid extension") - END ; - typ.nofpar := typ.base.nofpar + 1; (*"nofpar" here abused for extension level*) - bot := typ.base.dsc; offset := typ.base.size - ELSE ORS.Mark("type expected") - END - ELSE ORS.Mark("ident expected") - END ; - Check(ORS.rparen, "no )") - END ; - WHILE sym = ORS.ident DO (*fields*) - n := 0; obj := bot; - WHILE sym = ORS.ident DO - obj0 := obj; - WHILE (obj0 # NIL) & (obj0.name # ORS.id) DO obj0 := obj0.next END ; - IF obj0 # NIL THEN ORS.Mark("mult def") END ; - NEW(new); ORS.CopyId(new.name); new.class := ORB.Fld; new.next := obj; obj := new; INC(n); - ORS.Get(sym); CheckExport(new.expo); - IF (sym # ORS.comma) & (sym # ORS.colon) THEN ORS.Mark("comma expected") - ELSIF sym = ORS.comma THEN ORS.Get(sym) - END - END ; - Check(ORS.colon, "colon expected"); Type(tp); - IF (tp.form = ORB.Array) & (tp.len < 0) THEN ORS.Mark("dyn array not allowed") END ; - IF tp.size > 1 THEN offset := (offset+3) DIV 4 * 4 END ; - offset := offset + n * tp.size; off := offset; obj0 := obj; - WHILE obj0 # bot DO obj0.type := tp; obj0.lev := 0; off := off - tp.size; obj0.val := off; obj0 := obj0.next END ; - bot := obj; - IF sym = ORS.semicolon THEN ORS.Get(sym) ELSIF sym # ORS.end THEN ORS.Mark(" ; or END") END - END ; - typ.form := ORB.Record; typ.dsc := bot; typ.size := (offset + 3) DIV 4 * 4; type := typ - END RecordType; - - PROCEDURE FPSection(VAR adr: LONGINT; VAR nofpar: INTEGER); - VAR obj, first: ORB.Object; tp: ORB.Type; - parsize: LONGINT; cl: INTEGER; rdo: BOOLEAN; - BEGIN - IF sym = ORS.var THEN ORS.Get(sym); cl := ORB.Par ELSE cl := ORB.Var END ; - IdentList(cl, first); FormalType(tp, 0); rdo := FALSE; - IF (cl = ORB.Var) & (tp.form >= ORB.Array) THEN cl := ORB.Par; rdo := TRUE END ; - IF (tp.form = ORB.Array) & (tp.len < 0) OR (tp.form = ORB.Record) THEN - parsize := 2*ORG.WordSize (*open array or record, needs second word for length or type tag*) - ELSE parsize := ORG.WordSize - END ; - obj := first; - WHILE obj # NIL DO - INC(nofpar); obj.class := cl; obj.type := tp; obj.rdo := rdo; obj.lev := level; obj.val := adr; - adr := adr + parsize; obj := obj.next - END ; - IF adr >= 52 THEN ORS.Mark("too many parameters") END - END FPSection; - - PROCEDURE ProcedureType(ptype: ORB.Type; VAR parblksize: LONGINT); - VAR obj: ORB.Object; size: LONGINT; nofpar: INTEGER; - BEGIN ptype.base := ORB.noType; size := parblksize; nofpar := 0; ptype.dsc := NIL; - IF sym = ORS.lparen THEN - ORS.Get(sym); - IF sym = ORS.rparen THEN ORS.Get(sym) - ELSE FPSection(size, nofpar); - WHILE sym = ORS.semicolon DO ORS.Get(sym); FPSection(size, nofpar) END ; - Check(ORS.rparen, "no )") - END ; - ptype.nofpar := nofpar; parblksize := size; - IF sym = ORS.colon THEN (*function*) - ORS.Get(sym); - IF sym = ORS.ident THEN qualident(obj); - IF (obj.class = ORB.Typ) & (obj.type.form IN {ORB.Byte .. ORB.Pointer, ORB.Proc}) THEN ptype.base := obj.type - ELSE ORS.Mark("illegal function type") - END - ELSE ORS.Mark("type identifier expected") - END - END - END - END ProcedureType; - - PROCEDURE FormalType0(VAR typ: ORB.Type; dim: INTEGER); - VAR obj: ORB.Object; dmy: LONGINT; - BEGIN - IF sym = ORS.ident THEN - qualident(obj); - IF obj.class = ORB.Typ THEN typ := obj.type ELSE ORS.Mark("not a type"); typ := ORB.intType END - ELSIF sym = ORS.array THEN - ORS.Get(sym); Check(ORS.of, "OF ?"); - IF dim >= 1 THEN ORS.Mark("multi-dimensional open arrays not implemented") END ; - NEW(typ); typ.form := ORB.Array; typ.len := -1; typ.size := 2*ORG.WordSize; - FormalType(typ.base, dim+1) - ELSIF sym = ORS.procedure THEN - ORS.Get(sym); ORB.OpenScope; - NEW(typ); typ.form := ORB.Proc; typ.size := ORG.WordSize; dmy := 0; ProcedureType(typ, dmy); - typ.dsc := ORB.topScope.next; ORB.CloseScope - ELSE ORS.Mark("identifier expected"); typ := ORB.noType - END - END FormalType0; - - PROCEDURE CheckRecLevel(lev: INTEGER); - BEGIN - IF lev # 0 THEN ORS.Mark("ptr base must be global") END - END CheckRecLevel; - - PROCEDURE Type0(VAR type: ORB.Type); - VAR dmy: LONGINT; obj: ORB.Object; ptbase: PtrBase; - BEGIN type := ORB.intType; (*sync*) - IF (sym # ORS.ident) & (sym < ORS.array) THEN ORS.Mark("not a type"); - REPEAT ORS.Get(sym) UNTIL (sym = ORS.ident) OR (sym >= ORS.array) - END ; - IF sym = ORS.ident THEN - qualident(obj); - IF obj.class = ORB.Typ THEN - IF (obj.type # NIL) & (obj.type.form # ORB.NoTyp) THEN type := obj.type END - ELSE ORS.Mark("not a type or undefined") - END - ELSIF sym = ORS.array THEN ORS.Get(sym); ArrayType(type) - ELSIF sym = ORS.record THEN - ORS.Get(sym); RecordType(type); Check(ORS.end, "no END") - ELSIF sym = ORS.pointer THEN - ORS.Get(sym); Check(ORS.to, "no TO"); - NEW(type); type.form := ORB.Pointer; type.size := ORG.WordSize; type.base := ORB.intType; - IF sym = ORS.ident THEN - obj := ORB.thisObj(); ORS.Get(sym); - IF obj # NIL THEN - IF (obj.class = ORB.Typ) & (obj.type.form IN {ORB.Record, ORB.NoTyp}) THEN - CheckRecLevel(obj.lev); type.base := obj.type - ELSE ORS.Mark("no valid base type") - END - ELSE CheckRecLevel(level); (*enter into list of forward references to be fixed in Declarations*) - NEW(ptbase); ORS.CopyId(ptbase.name); ptbase.type := type; ptbase.next := pbsList; pbsList := ptbase - END - ELSE Type(type.base); - IF type.base.form # ORB.Record THEN ORS.Mark("must point to record") END ; - CheckRecLevel(level) - END - ELSIF sym = ORS.procedure THEN - ORS.Get(sym); ORB.OpenScope; - NEW(type); type.form := ORB.Proc; type.size := ORG.WordSize; dmy := 0; - ProcedureType(type, dmy); type.dsc := ORB.topScope.next; ORB.CloseScope - ELSE ORS.Mark("illegal type") - END - END Type0; - - PROCEDURE Declarations(VAR varsize: LONGINT); - VAR obj, first: ORB.Object; - x: ORG.Item; tp: ORB.Type; ptbase: PtrBase; - expo: BOOLEAN; id: ORS.Ident; - BEGIN (*sync*) pbsList := NIL; - IF (sym < ORS.const) & (sym # ORS.end) THEN ORS.Mark("declaration?"); - REPEAT ORS.Get(sym) UNTIL (sym >= ORS.const) OR (sym = ORS.end) - END ; - IF sym = ORS.const THEN - ORS.Get(sym); - WHILE sym = ORS.ident DO - ORS.CopyId(id); ORS.Get(sym); CheckExport(expo); - IF sym = ORS.eql THEN ORS.Get(sym) ELSE ORS.Mark("= ?") END; - expression(x); - IF (x.type.form = ORB.String) & (x.b = 2) THEN ORG.StrToChar(x) END ; - ORB.NewObj(obj, id, ORB.Const); obj.expo := expo; - IF x.mode = ORB.Const THEN obj.val := x.a; obj.lev := x.b; obj.type := x.type - ELSE ORS.Mark("expression not constant"); obj.type := ORB.intType - END; - Check(ORS.semicolon, "; missing") - END - END ; - IF sym = ORS.type THEN - ORS.Get(sym); - WHILE sym = ORS.ident DO - ORS.CopyId(id); ORS.Get(sym); CheckExport(expo); - IF sym = ORS.eql THEN ORS.Get(sym) ELSE ORS.Mark("=?") END ; - Type(tp); - ORB.NewObj(obj, id, ORB.Typ); obj.type := tp; obj.expo := expo; obj.lev := level; tp.typobj := obj; - IF expo & (obj.type.form = ORB.Record) THEN obj.exno := exno; INC(exno) ELSE obj.exno := 0 END ; - IF tp.form = ORB.Record THEN - ptbase := pbsList; (*check whether this is base of a pointer type; search and fixup*) - WHILE ptbase # NIL DO - IF obj.name = ptbase.name THEN ptbase.type.base := obj.type END ; - ptbase := ptbase.next - END ; - IF level = 0 THEN ORG.BuildTD(tp, dc) END (*type descriptor; len used as its address*) - END ; - Check(ORS.semicolon, "; missing") - END - END ; - IF sym = ORS.var THEN - ORS.Get(sym); - WHILE sym = ORS.ident DO - IdentList(ORB.Var, first); Type(tp); - obj := first; - WHILE obj # NIL DO - obj.type := tp; obj.lev := level; - IF tp.size > 1 THEN varsize := (varsize + 3) DIV 4 * 4 (*align*) END ; - obj.val := varsize; varsize := varsize + obj.type.size; - IF obj.expo THEN obj.exno := exno; INC(exno) END ; - obj := obj.next - END ; - Check(ORS.semicolon, "; missing") - END - END ; - varsize := (varsize + 3) DIV 4 * 4; - ptbase := pbsList; - WHILE ptbase # NIL DO - IF ptbase.type.base.form = ORB.Int THEN ORS.Mark("undefined pointer base of") END ; - ptbase := ptbase.next - END ; - IF (sym >= ORS.const) & (sym <= ORS.var) THEN ORS.Mark("declaration in bad order") END - END Declarations; - - PROCEDURE ProcedureDecl; - VAR proc: ORB.Object; - type: ORB.Type; - procid: ORS.Ident; - x: ORG.Item; - locblksize, parblksize, L: LONGINT; - int: BOOLEAN; - BEGIN (* ProcedureDecl *) int := FALSE; ORS.Get(sym); - IF sym = ORS.times THEN ORS.Get(sym); int := TRUE END ; - IF sym = ORS.ident THEN - ORS.CopyId(procid); ORS.Get(sym); - ORB.NewObj(proc, ORS.id, ORB.Const); parblksize := 4; - NEW(type); type.form := ORB.Proc; type.size := ORG.WordSize; proc.type := type; - CheckExport(proc.expo); - IF proc.expo THEN proc.exno := exno; INC(exno) END ; - ORB.OpenScope; INC(level); proc.val := -1; type.base := ORB.noType; - ProcedureType(type, parblksize); (*formal parameter list*) - Check(ORS.semicolon, "no ;"); locblksize := parblksize; - Declarations(locblksize); - proc.val := ORG.Here() * 4; proc.type.dsc := ORB.topScope.next; - IF sym = ORS.procedure THEN - L := 0; ORG.FJump(L); - REPEAT ProcedureDecl; Check(ORS.semicolon, "no ;") UNTIL sym # ORS.procedure; - ORG.FixLink(L); proc.val := ORG.Here() * 4; proc.type.dsc := ORB.topScope.next - END ; - ORG.Enter(parblksize, locblksize, int); - IF sym = ORS.begin THEN ORS.Get(sym); StatSequence END ; - IF sym = ORS.return THEN - ORS.Get(sym); expression(x); - IF type.base = ORB.noType THEN ORS.Mark("this is not a function") - ELSIF ~CompTypes(type.base, x.type, FALSE) THEN ORS.Mark("wrong result type") - END - ELSIF type.base.form # ORB.NoTyp THEN - ORS.Mark("function without result"); type.base := ORB.noType - END ; - ORG.Return(type.base.form, x, locblksize, int); - ORB.CloseScope; DEC(level); Check(ORS.end, "no END"); - IF sym = ORS.ident THEN - IF ORS.id # procid THEN ORS.Mark("no match") END ; - ORS.Get(sym) - ELSE ORS.Mark("no proc id") - END - END ; - int := FALSE - END ProcedureDecl; - - PROCEDURE Module; - VAR key: LONGINT; - obj: ORB.Object; - impid, impid1: ORS.Ident; - BEGIN Texts.WriteString(W, " compiling "); ORS.Get(sym); - IF sym = ORS.module THEN - ORS.Get(sym); - IF sym = ORS.times THEN version := 0; Texts.Write(W, "*"); ORS.Get(sym) ELSE version := 1 END ; - ORB.Init; ORB.OpenScope; - IF sym = ORS.ident THEN - ORS.CopyId(modid); ORS.Get(sym); - Texts.WriteString(W, modid); Texts.Append(Oberon.Log, W.buf); - Oberon.DumpLog; (* voc adaptation; -- noch *) - ELSE ORS.Mark("identifier expected") - END ; - Check(ORS.semicolon, "no ;"); level := 0; dc := 0; exno := 1; key := 0; - IF sym = ORS.import THEN - ORS.Get(sym); - WHILE sym = ORS.ident DO - ORS.CopyId(impid); ORS.Get(sym); - IF sym = ORS.becomes THEN - ORS.Get(sym); - IF sym = ORS.ident THEN ORS.CopyId(impid1); ORS.Get(sym) - ELSE ORS.Mark("id expected") - END - ELSE impid1 := impid - END ; - ORB.Import(impid, impid1); - IF sym = ORS.comma THEN ORS.Get(sym) - ELSIF sym = ORS.ident THEN ORS.Mark("comma missing") - END - END ; - Check(ORS.semicolon, "no ;") - END ; - obj := ORB.topScope.next; - ORG.Open(version); Declarations(dc); ORG.SetDataSize((dc + 3) DIV 4 * 4); - WHILE sym = ORS.procedure DO ProcedureDecl; Check(ORS.semicolon, "no ;") END ; - ORG.Header; - IF sym = ORS.begin THEN ORS.Get(sym); StatSequence END ; - Check(ORS.end, "no END"); - IF sym = ORS.ident THEN - IF ORS.id # modid THEN ORS.Mark("no match") END ; - ORS.Get(sym) - ELSE ORS.Mark("identifier missing") - END ; - IF sym # ORS.period THEN ORS.Mark("period missing") END ; - IF (ORS.errcnt = 0) & (version # 0) THEN - ORB.Export(modid, newSF, key); - IF newSF THEN Texts.WriteString(W, " new symbol file") END - END ; - IF ORS.errcnt = 0 THEN - ORG.Close(modid, key, exno); - Texts.WriteInt(W, ORG.pc, 6); Texts.WriteInt(W, dc, 6); Texts.WriteHex(W, key) - ELSE Texts.WriteLn(W); Texts.WriteString(W, "compilation FAILED") - END ; - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - Oberon.DumpLog; (* voc adaptation; -- noch *) - ORB.CloseScope; pbsList := NIL - ELSE ORS.Mark("must start with MODULE") - END - END Module; - - PROCEDURE Option(VAR S: Texts.Scanner); - BEGIN newSF := FALSE; - IF S.nextCh = "/" THEN - Texts.Scan(S); Texts.Scan(S); - IF (S.class = Texts.Name) & (S.s[0] = "s") THEN newSF := TRUE END - END - END Option; - - PROCEDURE Compile*; - VAR beg, end, time: LONGINT; - T: Texts.Text; - S: Texts.Scanner; - BEGIN Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S); - IF S.class = Texts.Char THEN - IF S.c = "@" THEN - Option(S); Oberon.GetSelection(T, beg, end, time); - IF time >= 0 THEN ORS.Init(T, beg); Module END - ELSIF S.c = "^" THEN - Option(S); Oberon.GetSelection(T, beg, end, time); - IF time >= 0 THEN - Texts.OpenScanner(S, T, beg); Texts.Scan(S); - IF S.class = Texts.Name THEN - Texts.WriteString(W, S.s); NEW(T); Texts.Open(T, S.s); - IF T.len > 0 THEN ORS.Init(T, 0); Module END - END - END - END - ELSE - WHILE S.class = Texts.Name DO - NEW(T); Texts.Open(T, S.s); - IF T.len > 0 THEN Option(S); ORS.Init(T, 0); Module - ELSE Texts.WriteString(W, S.s); Texts.WriteString(W, " not found"); - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - Oberon.DumpLog; (* voc adaptation; -- noch *) - END ; - IF (T.len # 0) & (ORS.errcnt = 0) THEN Texts.Scan(S) ELSE S.class := 0 END - END - END ; - Oberon.Collect(0) - END Compile; - -BEGIN Texts.OpenWriter(W); Texts.WriteString(W, "OR Compiler 7.6.2014"); - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - Oberon.DumpLog; (* voc adaptation; -- noch *) - NEW(dummy); dummy.class := ORB.Var; dummy.type := ORB.intType; - expression := expression0; Type := Type0; FormalType := FormalType0; - - Compile (* voc adaptation; -- noch *) -END ORP. diff --git a/src/voc07R/ORS.Mod b/src/voc07R/ORS.Mod deleted file mode 100644 index 1d005e38..00000000 --- a/src/voc07R/ORS.Mod +++ /dev/null @@ -1,325 +0,0 @@ -MODULE ORS; (* NW 19.9.93 / 1.4.2014 Scanner in Oberon-07*) - IMPORT SYSTEM, Texts := CompatTexts, Oberon; (* CompatTexts is voc adaptation by noch *) - - TYPE INTEGER = LONGINT; (* voc adaptation by noch *) - -(* Oberon Scanner does lexical analysis. Input is Oberon-Text, output is - sequence of symbols, i.e identifiers, numbers, strings, and special symbols. - Recognises all Oberon keywords and skips comments. The keywords are - recorded in a table. - Get(sym) delivers next symbol from input text with Reader R. - Mark(msg) records error and delivers error message with Writer W. - If Get delivers ident, then the identifier (a string) is in variable id, if int or char - in ival, if real in rval, and if string in str (and slen) *) - - CONST IdLen* = 32; - NKW = 34; (*nof keywords*) - maxExp = 38; stringBufSize = 256; - - (*lexical symbols*) - null = 0; times* = 1; rdiv* = 2; div* = 3; mod* = 4; - and* = 5; plus* = 6; minus* = 7; or* = 8; eql* = 9; - neq* = 10; lss* = 11; leq* = 12; gtr* = 13; geq* = 14; - in* = 15; is* = 16; arrow* = 17; period* = 18; - char* = 20; int* = 21; real* = 22; false* = 23; true* = 24; - nil* = 25; string* = 26; not* = 27; lparen* = 28; lbrak* = 29; - lbrace* = 30; ident* = 31; - if* = 32; while* = 34; repeat* = 35; case* = 36; for* = 37; - comma* = 40; colon* = 41; becomes* = 42; upto* = 43; rparen* = 44; - rbrak* = 45; rbrace* = 46; then* = 47; of* = 48; do* = 49; - to* = 50; by* = 51; semicolon* = 52; end* = 53; bar* = 54; - else* = 55; elsif* = 56; until* = 57; return* = 58; - array* = 60; record* = 61; pointer* = 62; const* = 63; type* = 64; - var* = 65; procedure* = 66; begin* = 67; import* = 68; module* = 69; - - TYPE Ident* = ARRAY IdLen OF CHAR; - - VAR ival*, slen*: LONGINT; (*results of Get*) - rval*: REAL; - id*: Ident; (*for identifiers*) - str*: ARRAY stringBufSize OF CHAR; - errcnt*: INTEGER; - - ch: CHAR; (*last character read*) - errpos: LONGINT; - R: Texts.Reader; - W: Texts.Writer; - k: INTEGER; - KWX: ARRAY 10 OF INTEGER; - keyTab: ARRAY NKW OF - RECORD sym: INTEGER; id: ARRAY 12 OF CHAR END; - - PROCEDURE CopyId*(VAR ident: Ident); - BEGIN ident := id - END CopyId; - - PROCEDURE Pos*(): LONGINT; - BEGIN RETURN Texts.Pos(R) - 1 - END Pos; - - PROCEDURE Mark*(msg: ARRAY OF CHAR); - VAR p: LONGINT; - BEGIN p := Pos(); - IF (p > errpos) & (errcnt < 25) THEN - Texts.WriteLn(W); Texts.WriteString(W, " pos "); Texts.WriteInt(W, p, 1); Texts.Write(W, " "); - Texts.WriteString(W, msg); Texts.Append(Oberon.Log, W.buf); - Oberon.DumpLog; (* voc adaptation by noch *) - END ; - INC(errcnt); errpos := p + 4 - END Mark; - - PROCEDURE Identifier(VAR sym: INTEGER); - VAR i, k: INTEGER; - BEGIN i := 0; - REPEAT - IF i < IdLen-1 THEN id[i] := ch; INC(i) END ; - Texts.Read(R, ch) - UNTIL (ch < "0") OR (ch > "9") & (ch < "A") OR (ch > "Z") & (ch < "a") OR (ch > "z"); - id[i] := 0X; - IF i < 10 THEN k := KWX[i-1]; (*search for keyword*) - WHILE (id # keyTab[k].id) & (k < KWX[i]) DO INC(k) END ; - IF k < KWX[i] THEN sym := keyTab[k].sym ELSE sym := ident END - ELSE sym := ident - END - END Identifier; - - PROCEDURE String; - VAR i: INTEGER; - BEGIN i := 0; Texts.Read(R, ch); - WHILE ~R.eot & (ch # 22X) DO - IF ch >= " " THEN - IF i < stringBufSize-1 THEN str[i] := ch; INC(i) ELSE Mark("string too long") END ; - END ; - Texts.Read(R, ch) - END ; - str[i] := 0X; INC(i); Texts.Read(R, ch); slen := i - END String; - - PROCEDURE HexString; - VAR i, m, n: INTEGER; - BEGIN i := 0; Texts.Read(R, ch); - WHILE ~R.eot & (ch # "$") DO - WHILE (ch = " ") OR (ch = 9X) OR (ch = 0DX) DO Texts.Read(R, ch) END ; (*skip*) - IF ("0" <= ch) & (ch <= "9") THEN m := ORD(ch) - 30H - ELSIF ("A" <= ch) & (ch <= "F") THEN m := ORD(ch) - 37H - ELSE m := 0; Mark("hexdig expected") - END ; - Texts.Read(R, ch); - IF ("0" <= ch) & (ch <= "9") THEN n := ORD(ch) - 30H - ELSIF ("A" <= ch) & (ch <= "F") THEN n := ORD(ch) - 37H - ELSE n := 0; Mark("hexdig expected") - END ; - IF i < stringBufSize THEN str[i] := CHR(m*10H + n); INC(i) ELSE Mark("string too long") END ; - Texts.Read(R, ch) - END ; - Texts.Read(R, ch); slen := i (*no 0X appended!*) - END HexString; - - PROCEDURE Ten(e: LONGINT): REAL; - VAR x, t: REAL; - BEGIN x := 1.0; t := 10.0; - WHILE e > 0 DO - IF ODD(e) THEN x := t * x END ; - t := t * t; e := e DIV 2 - END ; - RETURN x - END Ten; - - PROCEDURE Number(VAR sym: INTEGER); - CONST max = 2147483647 (*2^31 - 1*); - VAR i, k, e, n, s, h: LONGINT; x: REAL; - d: ARRAY 16 OF INTEGER; - negE: BOOLEAN; - BEGIN ival := 0; i := 0; n := 0; k := 0; - REPEAT - IF n < 16 THEN d[n] := ORD(ch)-30H; INC(n) ELSE Mark("too many digits"); n := 0 END ; - Texts.Read(R, ch) - UNTIL (ch < "0") OR (ch > "9") & (ch < "A") OR (ch > "F"); - IF (ch = "H") OR (ch = "R") OR (ch = "X") THEN (*hex*) - REPEAT h := d[i]; - IF h >= 10 THEN h := h-7 END ; - k := k*10H + h; INC(i) (*no overflow check*) - UNTIL i = n; - IF ch = "X" THEN sym := char; - IF k < 100H THEN ival := k ELSE Mark("illegal value"); ival := 0 END - ELSIF ch = "R" THEN sym := real; rval := SYSTEM.VAL(REAL, k) - ELSE sym := int; ival := k - END ; - Texts.Read(R, ch) - ELSIF ch = "." THEN - Texts.Read(R, ch); - IF ch = "." THEN (*double dot*) ch := 7FX; (*decimal integer*) - REPEAT - IF d[i] < 10 THEN - IF k <= (max-d[i]) DIV 10 THEN k := k *10 + d[i] ELSE Mark("too large"); k := 0 END - ELSE Mark("bad integer") - END ; - INC(i) - UNTIL i = n; - sym := int; ival := k - ELSE (*real number*) x := 0.0; e := 0; - REPEAT (*integer part*) - (*x := x * 10.0 + FLT(d[i]); *) - x := x * 10.0 + (d[i]); (* voc adaptation by noch *) - INC(i) - UNTIL i = n; - WHILE (ch >= "0") & (ch <= "9") DO (*fraction*) - (*x := x * 10.0 + FLT(ORD(ch) - 30H);*) - x := x * 10.0 + (ORD(ch) - 30H); (* voc adaptation by noch *) - DEC(e); - Texts.Read(R, ch) - END ; - IF (ch = "E") OR (ch = "D") THEN (*scale factor*) - Texts.Read(R, ch); s := 0; - IF ch = "-" THEN negE := TRUE; Texts.Read(R, ch) - ELSE negE := FALSE; - IF ch = "+" THEN Texts.Read(R, ch) END - END ; - IF (ch >= "0") & (ch <= "9") THEN - REPEAT s := s*10 + ORD(ch)-30H; Texts.Read(R, ch) - UNTIL (ch < "0") OR (ch >"9"); - IF negE THEN e := e-s ELSE e := e+s END - ELSE Mark("digit?") - END - END ; - IF e < 0 THEN - IF e >= -maxExp THEN x := x / Ten(-e) ELSE x := 0.0 END - ELSIF e > 0 THEN - IF e <= maxExp THEN x := Ten(e) * x ELSE x := 0.0; Mark("too large") END - END ; - sym := real; rval := x - END - ELSE (*decimal integer*) - REPEAT - IF d[i] < 10 THEN - IF k <= (max-d[i]) DIV 10 THEN k := k*10 + d[i] ELSE Mark("too large"); k := 0 END - ELSE Mark("bad integer") - END ; - INC(i) - UNTIL i = n; - sym := int; ival := k - END - END Number; - - PROCEDURE comment; - BEGIN Texts.Read(R, ch); - REPEAT - WHILE ~R.eot & (ch # "*") DO - IF ch = "(" THEN Texts.Read(R, ch); - IF ch = "*" THEN comment END - ELSE Texts.Read(R, ch) - END - END ; - WHILE ch = "*" DO Texts.Read(R, ch) END - UNTIL (ch = ")") OR R.eot; - IF ~R.eot THEN Texts.Read(R, ch) ELSE Mark("unterminated comment") END - END comment; - - PROCEDURE Get*(VAR sym: INTEGER); - BEGIN - REPEAT - WHILE ~R.eot & (ch <= " ") DO Texts.Read(R, ch) END; - IF ch < "A" THEN - IF ch < "0" THEN - IF ch = 22X THEN String; sym := string - ELSIF ch = "#" THEN Texts.Read(R, ch); sym := neq - ELSIF ch = "$" THEN HexString; sym := string - ELSIF ch = "&" THEN Texts.Read(R, ch); sym := and - ELSIF ch = "(" THEN Texts.Read(R, ch); - IF ch = "*" THEN sym := null; comment ELSE sym := lparen END - ELSIF ch = ")" THEN Texts.Read(R, ch); sym := rparen - ELSIF ch = "*" THEN Texts.Read(R, ch); sym := times - ELSIF ch = "+" THEN Texts.Read(R, ch); sym := plus - ELSIF ch = "," THEN Texts.Read(R, ch); sym := comma - ELSIF ch = "-" THEN Texts.Read(R, ch); sym := minus - ELSIF ch = "." THEN Texts.Read(R, ch); - IF ch = "." THEN Texts.Read(R, ch); sym := upto ELSE sym := period END - ELSIF ch = "/" THEN Texts.Read(R, ch); sym := rdiv - ELSE Texts.Read(R, ch); (* ! % ' *) sym := null - END - ELSIF ch < ":" THEN Number(sym) - ELSIF ch = ":" THEN Texts.Read(R, ch); - IF ch = "=" THEN Texts.Read(R, ch); sym := becomes ELSE sym := colon END - ELSIF ch = ";" THEN Texts.Read(R, ch); sym := semicolon - ELSIF ch = "<" THEN Texts.Read(R, ch); - IF ch = "=" THEN Texts.Read(R, ch); sym := leq ELSE sym := lss END - ELSIF ch = "=" THEN Texts.Read(R, ch); sym := eql - ELSIF ch = ">" THEN Texts.Read(R, ch); - IF ch = "=" THEN Texts.Read(R, ch); sym := geq ELSE sym := gtr END - ELSE (* ? @ *) Texts.Read(R, ch); sym := null - END - ELSIF ch < "[" THEN Identifier(sym) - ELSIF ch < "a" THEN - IF ch = "[" THEN sym := lbrak - ELSIF ch = "]" THEN sym := rbrak - ELSIF ch = "^" THEN sym := arrow - ELSE (* _ ` *) sym := null - END ; - Texts.Read(R, ch) - ELSIF ch < "{" THEN Identifier(sym) ELSE - IF ch = "{" THEN sym := lbrace - ELSIF ch = "}" THEN sym := rbrace - ELSIF ch = "|" THEN sym := bar - ELSIF ch = "~" THEN sym := not - ELSIF ch = 7FX THEN sym := upto - ELSE sym := null - END ; - Texts.Read(R, ch) - END - UNTIL sym # null - END Get; - - PROCEDURE Init*(T: Texts.Text; pos: LONGINT); - BEGIN errpos := pos; errcnt := 0; Texts.OpenReader(R, T, pos); Texts.Read(R, ch) - END Init; - - PROCEDURE EnterKW(sym: INTEGER; name: ARRAY OF CHAR); - BEGIN - (*keyTab[k].id := name; *) - COPY(name, keyTab[k].id); (* voc adaptation by noch *) - keyTab[k].sym := sym; - INC(k) - END EnterKW; - -BEGIN Texts.OpenWriter(W); k := 0; KWX[0] := 0; KWX[1] := 0; - EnterKW(if, "IF"); - EnterKW(do, "DO"); - EnterKW(of, "OF"); - EnterKW(or, "OR"); - EnterKW(to, "TO"); - EnterKW(in, "IN"); - EnterKW(is, "IS"); - EnterKW(by, "BY"); - KWX[2] := k; - EnterKW(end, "END"); - EnterKW(nil, "NIL"); - EnterKW(var, "VAR"); - EnterKW(div, "DIV"); - EnterKW(mod, "MOD"); - EnterKW(for, "FOR"); - KWX[3] := k; - EnterKW(else, "ELSE"); - EnterKW(then, "THEN"); - EnterKW(true, "TRUE"); - EnterKW(type, "TYPE"); - EnterKW(case, "CASE"); - KWX[4] := k; - EnterKW(elsif, "ELSIF"); - EnterKW(false, "FALSE"); - EnterKW(array, "ARRAY"); - EnterKW(begin, "BEGIN"); - EnterKW(const, "CONST"); - EnterKW(until, "UNTIL"); - EnterKW(while, "WHILE"); - KWX[5] := k; - EnterKW(record, "RECORD"); - EnterKW(repeat, "REPEAT"); - EnterKW(return, "RETURN"); - EnterKW(import, "IMPORT"); - EnterKW(module, "MODULE"); - KWX[6] := k; - EnterKW(pointer, "POINTER"); - KWX[7] := k; KWX[8] := k; - EnterKW(procedure, "PROCEDURE"); - KWX[9] := k -END ORS. diff --git a/src/voc07R/ORTool.Mod b/src/voc07R/ORTool.Mod deleted file mode 100644 index e0a08d42..00000000 --- a/src/voc07R/ORTool.Mod +++ /dev/null @@ -1,251 +0,0 @@ -MODULE ORTool; (*NW 18.2.2013*) - IMPORT SYSTEM, Files, Texts, Oberon, ORB; - VAR W: Texts.Writer; - Form: INTEGER; (*result of ReadType*) - mnemo0, mnemo1: ARRAY 16, 4 OF CHAR; (*mnemonics*) - - PROCEDURE Read(VAR R: Files.Rider; VAR n: INTEGER); - VAR b: BYTE; - BEGIN Files.ReadByte(R, b); - IF b < 80H THEN n := b ELSE n := b - 100H END - END Read; - - PROCEDURE ReadType(VAR R: Files.Rider); - VAR key, len, lev, size, off: INTEGER; - ref, mno, class, form, readonly: INTEGER; - name, modname: ARRAY 32 OF CHAR; - BEGIN Read(R, ref); Texts.Write(W, " "); Texts.Write(W, "["); - IF ref < 0 THEN Texts.Write(W, "^"); Texts.WriteInt(W, -ref, 1) - ELSE Texts.WriteInt(W, ref, 1); - Read(R, form); Texts.WriteString(W, " form = "); Texts.WriteInt(W, form, 1); - IF form = ORB.Pointer THEN ReadType(R) - ELSIF form = ORB.Array THEN - ReadType(R); Files.ReadNum(R, len); Files.ReadNum(R, size); - Texts.WriteString(W, " len = "); Texts.WriteInt(W, len, 1); - Texts.WriteString(W, " size = "); Texts.WriteInt(W, size, 1) - ELSIF form = ORB.Record THEN - ReadType(R); (*base type*) - Files.ReadNum(R, off); Texts.WriteString(W, " exno = "); Texts.WriteInt(W, off, 1); - Files.ReadNum(R, off); Texts.WriteString(W, " extlev = "); Texts.WriteInt(W, off, 1); - Files.ReadNum(R, size); Texts.WriteString(W, " size = "); Texts.WriteInt(W, size, 1); - Texts.Write(W, " "); Texts.Write(W, "{"); Read(R, class); - WHILE class # 0 DO (*fields*) - Files.ReadString(R, name); - IF name[0] # 0X THEN Texts.Write(W, " "); Texts.WriteString(W, name); ReadType(R) - ELSE Texts.WriteString(W, " --") - END ; - Files.ReadNum(R, off); Texts.WriteInt(W, off, 4); Read(R, class) - END ; - Texts.Write(W, "}") - ELSIF form = ORB.Proc THEN - ReadType(R); Texts.Write(W, "("); Read(R, class); - WHILE class # 0 DO - Texts.WriteString(W, " class = "); Texts.WriteInt(W, class, 1); Read(R, readonly); - IF readonly = 1 THEN Texts.Write(W, "#") END ; - ReadType(R); Read(R, class) - END ; - Texts.Write(W, ")") - END ; - Files.ReadString(R, modname); - IF modname[0] # 0X THEN - Files.ReadInt(R, key); Files.ReadString(R, name); - Texts.Write(W, " "); Texts.WriteString(W, modname); Texts.Write(W, "."); Texts.WriteString(W, name); - Texts.WriteHex(W, key) - END - END ; - Form := form; Texts.Write(W, "]") - END ReadType; - - PROCEDURE DecSym*; (*decode symbol file*) - VAR class, typno, k: INTEGER; - name: ARRAY 32 OF CHAR; - F: Files.File; R: Files.Rider; - S: Texts.Scanner; - BEGIN Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S); - IF S.class = Texts.Name THEN - Texts.WriteString(W, "OR-decode "); Texts.WriteString(W, S.s); - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - F := Files.Old(S.s); - IF F # NIL THEN - Files.Set(R, F, 0); Files.ReadInt(R, k); Files.ReadInt(R, k); - Files.ReadString(R, name); Texts.WriteString(W, name); Texts.WriteHex(W, k); - Read(R, class); Texts.WriteInt(W, class, 3); (*sym file version*) - IF class = ORB.versionkey THEN - Texts.WriteLn(W); Read(R, class); - WHILE class # 0 DO - Texts.WriteInt(W, class, 4); Files.ReadString(R, name); Texts.Write(W, " "); Texts.WriteString(W, name); - ReadType(R); - IF class = ORB.Typ THEN - Texts.Write(W, "("); Read(R, class); - WHILE class # 0 DO (*pointer base fixup*) - Texts.WriteString(W, " ->"); Texts.WriteInt(W, class, 4); Read(R, class) - END ; - Texts.Write(W, ")") - ELSIF (class = ORB.Const) OR (class = ORB.Var) THEN - Files.ReadNum(R, k); Texts.WriteInt(W, k, 5); (*Reals, Strings!*) - END ; - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - Read(R, class) - END - ELSE Texts.WriteString(W, " bad symfile version") - END - ELSE Texts.WriteString(W, " not found") - END ; - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) - END - END DecSym; - -(* ---------------------------------------------------*) - - PROCEDURE WriteReg(r: LONGINT); - BEGIN Texts.Write(W, " "); - IF r < 12 THEN Texts.WriteString(W, " R"); Texts.WriteInt(W, r MOD 10H, 1) - ELSIF r = 12 THEN Texts.WriteString(W, "MT") - ELSIF r = 13 THEN Texts.WriteString(W, "SB") - ELSIF r = 14 THEN Texts.WriteString(W, "SP") - ELSE Texts.WriteString(W, "LNK") - END - END WriteReg; - - PROCEDURE opcode(w: LONGINT); - VAR k, op, u, a, b, c: LONGINT; - BEGIN - k := w DIV 40000000H MOD 4; - a := w DIV 1000000H MOD 10H; - b := w DIV 100000H MOD 10H; - op := w DIV 10000H MOD 10H; - u := w DIV 20000000H MOD 2; - IF k = 0 THEN - Texts.WriteString(W, mnemo0[op]); - IF u = 1 THEN Texts.Write(W, "'") END ; - WriteReg(a); WriteReg(b); WriteReg(w MOD 10H) - ELSIF k = 1 THEN - Texts.WriteString(W, mnemo0[op]); - IF u = 1 THEN Texts.Write(W, "'") END ; - WriteReg(a); WriteReg(b); w := w MOD 10000H; - IF w >= 8000H THEN w := w - 10000H END ; - Texts.WriteInt(W, w, 7) - ELSIF k = 2 THEN (*LDR/STR*) - IF u = 1 THEN Texts.WriteString(W, "STR ") ELSE Texts.WriteString(W, "LDR") END ; - WriteReg(a); WriteReg(b); w := w MOD 100000H; - IF w >= 80000H THEN w := w - 100000H END ; - Texts.WriteInt(W, w, 8) - ELSIF k = 3 THEN (*Branch instr*) - Texts.Write(W, "B"); - IF ODD(w DIV 10000000H) THEN Texts.Write(W, "L") END ; - Texts.WriteString(W, mnemo1[a]); - IF u = 0 THEN WriteReg(w MOD 10H) ELSE - w := w MOD 100000H; - IF w >= 80000H THEN w := w - 100000H END ; - Texts.WriteInt(W, w, 8) - END - END - END opcode; - - PROCEDURE Sync(VAR R: Files.Rider); - VAR ch: CHAR; - BEGIN Files.Read(R, ch); Texts.WriteString(W, "Sync "); Texts.Write(W, ch); Texts.WriteLn(W) - END Sync; - - PROCEDURE Write(VAR R: Files.Rider; x: INTEGER); - BEGIN Files.WriteByte(R, x) (* -128 <= x < 128 *) - END Write; - - PROCEDURE DecObj*; (*decode object file*) - VAR class, i, n, key, size, fix, adr, data, len: INTEGER; - ch: CHAR; - name: ARRAY 32 OF CHAR; - F: Files.File; R: Files.Rider; - S: Texts.Scanner; - BEGIN Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); Texts.Scan(S); - IF S.class = Texts.Name THEN - Texts.WriteString(W, "decode "); Texts.WriteString(W, S.s); F := Files.Old(S.s); - IF F # NIL THEN - Files.Set(R, F, 0); Files.ReadString(R, name); Texts.WriteLn(W); Texts.WriteString(W, name); - Files.ReadInt(R, key); Texts.WriteHex(W, key); Read(R, class); Texts.WriteInt(W, class, 4); (*version*) - Files.ReadInt(R, size); Texts.WriteInt(W, size, 6); Texts.WriteLn(W); - Texts.WriteString(W, "imports:"); Texts.WriteLn(W); Files.ReadString(R, name); - WHILE name[0] # 0X DO - Texts.Write(W, 9X); Texts.WriteString(W, name); - Files.ReadInt(R, key); Texts.WriteHex(W, key); Texts.WriteLn(W); - Files.ReadString(R, name) - END ; - (* Sync(R); *) - Texts.WriteString(W, "type descriptors"); Texts.WriteLn(W); - Files.ReadInt(R, n); n := n DIV 4; i := 0; - WHILE i < n DO Files.ReadInt(R, data); Texts.WriteHex(W, data); INC(i) END ; - Texts.WriteLn(W); - Texts.WriteString(W, "data"); Files.ReadInt(R, data); Texts.WriteInt(W, data, 6); Texts.WriteLn(W); - Texts.WriteString(W, "strings"); Texts.WriteLn(W); - Files.ReadInt(R, n); i := 0; - WHILE i < n DO Files.Read(R, ch); Texts.Write(W, ch); INC(i) END ; - Texts.WriteLn(W); - Texts.WriteString(W, "code"); Texts.WriteLn(W); - Files.ReadInt(R, n); i := 0; - WHILE i < n DO - Files.ReadInt(R, data); Texts.WriteInt(W, i, 4); Texts.Write(W, 9X); Texts.WriteHex(W, data); - Texts.Write(W, 9X); opcode(data); Texts.WriteLn(W); INC(i) - END ; - (* Sync(R); *) - Texts.WriteString(W, "commands:"); Texts.WriteLn(W); - Files.ReadString(R, name); - WHILE name[0] # 0X DO - Texts.Write(W, 9X); Texts.WriteString(W, name); - Files.ReadInt(R, adr); Texts.WriteInt(W, adr, 5); Texts.WriteLn(W); - Files.ReadString(R, name) - END ; - (* Sync(R); *) - Texts.WriteString(W, "entries"); Texts.WriteLn(W); - Files.ReadInt(R, n); i := 0; - WHILE i < n DO - Files.ReadInt(R, adr); Texts.WriteInt(W, adr, 6); INC(i) - END ; - Texts.WriteLn(W); - (* Sync(R); *) - Texts.WriteString(W, "pointer refs"); Texts.WriteLn(W); Files.ReadInt(R, adr); - WHILE adr # -1 DO Texts.WriteInt(W, adr, 6); Files.ReadInt(R, adr) END ; - Texts.WriteLn(W); - (* Sync(R); *) - Files.ReadInt(R, data); Texts.WriteString(W, "fixP = "); Texts.WriteInt(W, data, 8); Texts.WriteLn(W); - Files.ReadInt(R, data); Texts.WriteString(W, "fixD = "); Texts.WriteInt(W, data, 8); Texts.WriteLn(W); - Files.ReadInt(R, data); Texts.WriteString(W, "fixT = "); Texts.WriteInt(W, data, 8); Texts.WriteLn(W); - Files.ReadInt(R, data); Texts.WriteString(W, "entry = "); Texts.WriteInt(W, data, 8); Texts.WriteLn(W); - Files.Read(R, ch); - IF ch # "O" THEN Texts.WriteString(W, "format eror"); Texts.WriteLn(W) END - (* Sync(R); *) - ELSE Texts.WriteString(W, " not found"); Texts.WriteLn(W) - END ; - Texts.Append(Oberon.Log, W.buf) - END - END DecObj; - -BEGIN Texts.OpenWriter(W); Texts.WriteString(W, "ORTool 18.2.2013"); - Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf); - mnemo0[0] := "MOV"; - mnemo0[1] := "LSL"; - mnemo0[2] := "ASR"; - mnemo0[3] := "ROR"; - mnemo0[4] := "AND"; - mnemo0[5] := "ANN"; - mnemo0[6] := "IOR"; - mnemo0[7] := "XOR"; - mnemo0[8] := "ADD"; - mnemo0[9] := "SUB"; - mnemo0[10] := "MUL"; - mnemo0[11] := "DIV"; - mnemo0[12] := "FAD"; - mnemo0[13] := "FSB"; - mnemo0[14] := "FML"; - mnemo0[15] := "FDV"; - mnemo1[0] := "MI "; - mnemo1[8] := "PL"; - mnemo1[1] := "EQ "; - mnemo1[9] := "NE "; - mnemo1[2] := "LS "; - mnemo1[10] := "HI "; - mnemo1[5] := "LT "; - mnemo1[13] := "GE "; - mnemo1[6] := "LE "; - mnemo1[14] := "GT "; - mnemo1[15] := "NO "; -END ORTool. diff --git a/src/voc07R/Oberon.Mod b/src/voc07R/Oberon.Mod deleted file mode 100644 index b2da7dee..00000000 --- a/src/voc07R/Oberon.Mod +++ /dev/null @@ -1,111 +0,0 @@ -MODULE Oberon; - -(* this module emulates Oberon.Log and Oberon.Par in order to pass agruments to Oberon programs, as it's in Oberon environment; - it creates Oberon.Par from command line arguments; - procedure Dump dumps Oberon.Log to standard output. - - -- noch *) - -(* Files are commented out, because it's not necessary for work, but can be very useful for debug. See WriteTextToFile procedure; -- noch *) -IMPORT Args, Strings, Texts := CompatTexts, (*Files := CompatFiles,*) Out := Console; - -VAR Log*: Texts.Text; - - Par*: RECORD - text*: Texts.Text; - pos* : LONGINT; - END; - -arguments : ARRAY 2048 OF CHAR; - -PROCEDURE GetSelection* (VAR text: Texts.Text; VAR beg, end, time: LONGINT); - (*VAR M: SelectionMsg;*) - BEGIN - (*M.time := -1; Viewers.Broadcast(M); time := M.time; - IF time >= 0 THEN text := M.text; beg := M.beg; end := M.end END*) - END GetSelection; - -PROCEDURE Collect*( count : LONGINT); -BEGIN - -END Collect; - -PROCEDURE ArgsToString(VAR opts : ARRAY OF CHAR); -VAR i : INTEGER; - opt : ARRAY 256 OF CHAR; -BEGIN - - i := 1; - opt := ""; COPY ("", opts); - - WHILE i < Args.argc DO - Args.Get(i, opt); - Strings.Append(opt, opts);(* Strings.Append (" ", opts);*) - (* ORP calls Texts.Scan, which returns filename, and nextCh would be set to " " if we append here " ". However after that ORP will check nextCh, and if it finds that nextCh is not "/" it's not gonna parse options. That's why Strings.Append is commented out; -- noch *) - INC(i) - END; - -END ArgsToString; - -PROCEDURE StringToText(VAR arguments : ARRAY OF CHAR; VAR T : Texts.Text); -VAR - W : Texts.Writer; -BEGIN - Texts.OpenWriter(W); - Texts.WriteString(W, arguments); - Texts.Append (T, W.buf); -END StringToText; -(* -PROCEDURE WriteTextToFile(VAR T : Texts.Text; filename : ARRAY OF CHAR); - VAR f : Files.File; r : Files.Rider; -BEGIN - f := Files.New(filename); - Files.Set(r, f, 0); - Texts.Store(r, T); - Files.Register(f); -END WriteTextToFile; -*) -PROCEDURE TextToString(VAR T : Texts.Text; VAR string : ARRAY OF CHAR); - VAR R : Texts.Reader; - ch : CHAR; - i : LONGINT; -BEGIN - COPY("", string); - Texts.OpenReader(R, T, 0); - i := 0; - WHILE Texts.Pos(R) < T.len DO - Texts.Read(R, ch); - string[i] := ch; - INC(i); - END; - (*string[i] := 0X;*) -END TextToString; - -PROCEDURE DumpLog*; -VAR s : POINTER TO ARRAY OF CHAR; -BEGIN - NEW(s, Log.len + 1); - COPY("", s^); - TextToString(Log, s^); - Out.String(s^); Out.Ln; - - NEW(Log); - Texts.Open(Log, ""); -END DumpLog; - - -BEGIN - NEW(Log); - Texts.Open(Log, ""); - - NEW(Par.text); - Texts.Open(Par.text, ""); - Par.pos := 0; - - COPY("", arguments); - ArgsToString(arguments); - StringToText(arguments, Par.text); - (*WriteTextToFile(Par.text, "params.txt");*) - (*WriteTextToFile(Log, "log.txt");*) - (*DumpLog;*) -END Oberon. diff --git a/src/voc07R/Oberon10.Scn.Fnt b/src/voc07R/Oberon10.Scn.Fnt deleted file mode 100644 index 15f999211bf7ec25781c232d43af678d6d0b9385..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2284 zcmaJ?&5qgTsd;#1@;->u+P8+B)H6F z;mUz$*=L!_exIv7P7e~5j$JC(&sSeL>JRe6XKN8@<$jJ*ON91ZewJV4SNTnTmp|lB z`Ahy5`lvKwp?G*MH3M6Xr;$@l{b-|BX$q_^Wijygi10Y6B&1jmTMdtS_P~>Otf96l*%UobPyN{KQ(H!_ zNZH3zjaXQ>PJIwnu1o%y&jMcsjY121ReUY9hq(bSA)N-qE?LV+m#pR3l0{>QzQkr! zWS3$edt*l>Hl|a~zSM{bAF(JKjG*md4hd;SRk-pg3;ha$+%LPMaQ5Z2M3gLL`n1h6 zCwO`f$bCp1@qX#83FxiNTp1_3@v+OLEmz~TC>8u@yT|QRO=C~_yPqxYWM+-`o*WoN zWUfk$r`kRG$Tg_3OV+JVG-A;ktMlb8q43t{87(vOR56nw#xh_2W;__-P2_i!zbMXw zJXtVE3CNq#$HinaLwWj3RK<4674u~#mA{;2=~ryZpGEy*`#&w;Vt&7zLgDnk)wD}~ zk6AP`=W8k-hv+L~s?bk;sLah3Yuh#aoVCf{T4(T5U}@dtT8G8)aN@$lrs;+xU2^obn@lo? z&@>HRZa1-ACnXr$!T*zuv7<(BC&uILLbH8#f!$=hX@9-0s`cwhCalo$l~~jaqka3& z-QC^4-@LiKJ$$|2H%*T;c>6Jdw_`t$l%ekd6fd{5zd2l80s2VL6JFXWl~p0LBsc}Y zKBVWp@c9_UujwSjwxSUMPE>^O>O z`q-r&gS9o>I*a8J$Lg;oa8-^(fNG^e4|M$w^5a{LVWo(1p%PP|h8Ck|@Rh48Q`arB z_1317sC|(|vPouRtm_z4qsNwA)1yUPI4make - -Run -=== - ->./ORP test.Mod /s - -like that. - -you may need symbol (.smb) files from RISC Oberon system in order to write programs that import some modules. - -some answers -============ - -- why Oberon10.Scn.Fnt ? -- it's actually not really necessary. because Texts are patched (test for NIL) to not crash if this file does not exist. however, unless I remove dependency from Fonts.Mod I have decided to keep this file here, and thus my added test for NIL is not necessary, and generated output file is completely correct Oberon Text file. Otherwise it would not contain the font name, for instance. - diff --git a/src/voc07R/makefile b/src/voc07R/makefile deleted file mode 100644 index 5343361c..00000000 --- a/src/voc07R/makefile +++ /dev/null @@ -1,22 +0,0 @@ - -SETPATH = MODULES=".:x86_64" - -VOC0 = $(SETPATH) /opt/voc/bin/voc - -all: - #$(VOC0) -s ORS.Mod - #$(VOC0) -s ORB.Mod - #$(VOC0) -s ORG.Mod - $(VOC0) -s CompatFiles.Mod \ - Fonts.Mod CompatTexts.Mod Oberon.Mod \ - ORS.Mod ORB.Mod ORG.Mod ORP.Mod -M - -test: - ./ORP -s test.Mod - -clean: - rm *.sym - rm *.o - rm *.h - rm *.c - diff --git a/src/voc07R/test/Oberon.rsc b/src/voc07R/test/Oberon.rsc deleted file mode 100644 index d0e49fa8d0fcdda90d1814c62979d5dbe3af6c4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7295 zcma)B3v69w9sl1)*W0xncU^(Lw%xIob){nsk2vC@=XPZo;Q&P*Vi-w>t6@pq8oG(# zjOTV;z|8Bq#HbJ=XKb295K1J72__JU3KHp6BbA`uD&1NcWQ&ly&0+oh{^$E{Pj6dB zlP~9c{NJzd|J~klZ}0uPc1qh zUieL%y|UsySrE4D!w&@_s_{hjHvAG3U3|e5>%q@Nk}q zNJXTnt^94kXGH1%Cc~GAj04uI0~~NY;$iN69I140o{C7q`IanpKqCVhgHfrEHtkdz zgAr+sh$IgIM#z_Z2v45>oSr^Gy5dzhu)_rB0Nw@}ggm%TN`&%4E^3xP*d&uTUnKI| z+7i7$?@7QN*(j2IT*g2zkfjo`$E3A0Dwko%rkJdaZCsQ1J7n4ym%22F9*IMqh^*~A zH$6Q?`N;3N>FL5U&^jukKKa%fzH!6%&eYNZ_v2kce6jQ zy~6b8vzO&VyM*PWEhr~)(b%SfHk{?Fz-GFyb}NJ3%8lL15r4E@xv||X7qA`T*2H*n z#LlZEiC7KxlRD2I{3P4Mzr)NA#vJetY#p!4aSk0k+6^=^IDgC1L{E&WE&}=|8NQY zg=#M3LCvgiSTA2iJhMJEXq^ab9Mt{<@?qw@2Kfjb6pwlNJA;SVLyZb*a2U^?BQ~@i zTK#T-jO5R}B%QGZ_$N>c$lsn@{ub|@1^8P$dv5t#o2@lAvi?h!)N|$p2I5FiUnSd$ z7=V4E@aq)yL~ePAeFwDz>lwdUUjqidcGTZh(!KvO@axw)6VRlu@0y2ZG(^+NYW+)^ zaYHi!n$@6r_bi${*{Gp;M@Y^!nA6s7e@!k4xdl8fGk$jW)*!!vz2$cAM>RR<TpZ%Yq$XV^ z4Qcu(Oe1_h(#AN14<U3D^f{S_lU1=Z(~x*Tez_F1IIT;iRGfSF)jv;9^D z;+*%U`&?a)cbWUkI^+TG)EfF1I2tQH{X<#o-89#x`6toWXa6jt!;l(1verhAHpG4C zqu!~1IcHxTvD{OiPY}!N{J=<_Wo5F_vtABsPd^Zz zG1pA^*Bf*AX52r{PZzKnbM2-pSLauZvP2{(e!anrsOnV)L zv~*<4LUk%`*4Kd^^+FBsXUXyFxpIVMraZ`van=si?}I=V>emJRxKI7&(5+lGN53## z>RP1PwyLNfX(H#nF2oS@>b!Qiqk#J1U$uZ` z4$B+<(cfllydzJtb*SBt757Ur8;7r=_@b|2Tu8+H)>DSPi0Qvk($T%Fg>o-^Dwm{~qhm-mqa6ed`OJPkKr(u84Ez+qtwW@&r zu(*!<$pT=DYs9((zLedkO&88l_9c=XGQAaZ&waa@a-}htXP!G1tWiIL^|@xgU-7m! z>xvfBpPKc`7R85N3QztvkF8y)6K&xRv{1)v0(YRhuSIJE`C#q2hgy^m*9!YYOAhu{ zx#E#A2lBxO`uo@6u#VyPq2g6vPI)}^`D%CgUTcke_2qh(0Y-g^I2^~B=WY)63HK4~ zu6tj)TxD^;%(G;sC{v%(4rC(kH-fe5fc0kr-TWDO>lK#r+Ba{hP1viI`mGd(_4kaa zk=D2K!JPjTFj5jD-6rq0Aip*uuN~B?A9gr}NRmB!g|i87BNu1!lv8j~ZyK?O{%R_M zm}`a2T1{T^O;>@uj6qiWe*5l!`CGwEoUTXylSTt*AZDkchQ>zNt{t=-d^_;v8uLso z?hW`Wh@I!x2KU$tYxVaO@J-`)8onjvGtYcHCgr z@W&M2@h_uqUS<4NDl^`Cyq7dD0FQd6Yx-c0PS!VT!aB9J2X<_4FY2@uJgrVfKBWb@ ze8|We;JJI+H77CmYwxwnz^T>Tco_3o%!S-Fa3j)~v>$I-$cM95+ zeK%?Rm1X3mBQ_qKW*l_FFEUs zn7N1f^O(PAe((C}xoPdAY<~R&Yx*jBo<55kpKac@z4xYFdj@*tB+9$HYgfPYqd)pW??CTvc?1iTS}`1q zyD<7NhA{YFv!fWtFzBj0#=97k7-ulfW3Uy7V~k-I2Y_%=op&Z+w?{|8A2bu<6~ diff --git a/src/voc07R/test/Oberon.smb b/src/voc07R/test/Oberon.smb deleted file mode 100644 index 148bd4143863ecdd9e2db981b0cf3209b2feb8a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1372 zcmZuxU2hXd6g_u6t{2w}1_C4y+5n}{0xj)RUy&mhq=ZCG%E#kkkCRo_JJ!xPZg}bM z=x^vRp|3pg-ZrQak%C%Ts!YSZv$g}G(n>pf?$?=n&s_lcva|bQ<%!Ns2BMb9Y`?29 z0=YbHZDB;z)*aL8Tfs8jXE;rsvIkK&&eT!NC?$p z9uM$Zsb<{Pc+GZ{8~xmx9QBBUX4GSh>go|jHN`ys3zg*N@B{C9FYEQ)vfaSR=u|Wm zXfd(9G~U5q&%>o=9(T1^OSGW2O{as=ylR;gqgmC-98Ombn5C3`gx16|KYZGtk zQnV&TL$#%MEdEt0X?yl4ujy2`Tw*dwJQM9Jsw|%ov|py0lnkZhJEa*Dh40N#1)=+ZO(uL-3d3a(3ELENc4aM<|~KA$>NuTU$2hQTCij`uorP2&M6bAtDa$n)QYa` zg{mV%!AqsK2RVLcHpc@Vc$1s|>V%vcGM~DfR%Bo&gZrieZU!7mjQV5SrXwbo4yrbtj-d#s?Hr*iUv&0z$}SOr%}M1 zcV0Dx%-``mPe16c+14U(N!x7-T@PQJz;|`BvFWDx zCqC7>-^pnr;8T)DP2eKM0r@QZ?m*`H)eT$uzi18pfQwbw}eC^9qmmZ8Ehv}8HY0ZIzkJz9}XAy5;&sQ2&&)>aeUOeWuZZ+@OW zLdau{9DB7~kn*U=PHE(!hvBwlEUr@uT24B`ILQjeE2!j6Pa(LR!3Aeq8rPgc+|MI? zSaT4tayBByPRr4_Hguol7~3#mgH%p|K+K{KwWQQzr`kY-;9un3{})sBV_y$u$|-Pn bkhE_@5Tv=DO$5_CHrJTuyVsKU9|YqU*UktpwP}FnQ7A%A8C?F8@ov-=}ZH(2?YYvu}EiNT-vUa7|EU30Rj<)1oihn z_ubW#yr^jA&3pHrbI(2Je?IPcZ*|#?cieWXyYnac!OXxJ&YgeL%{SiaZo2#B@1FmM zw?Me!t>@l!&pPJ{Tr;V^9OF)|W-k4Sluzz~Ez4MRjSKT=y^Q<0#8aQpV(#6A#npXk z@#GWUutx*qu)Z*lCjBHsbp2_Ko;Tabx%_EoojI^=U~tRUfk92>^Zlnwr~IxxyOObP zZtqg(8r)IlD&MJhQ-wv&?Q`zsA#8i8-c{o08%rimV(wXYun7CO%{{SXVrIr&!hU}I z{E~@`b3^Fs$1g3JfLAj7_=q2ahabP;$L-0Oy&r0DQ@fTq_sqenE|qeFtBg0h$|Ks7 z=i;V=+3C%$Qf9A0o;ylRXSs95o!kRo&P@$3&9+U4@dn2AmF)BeR~hStk1M{`xx>06 zrTnSygu_;zXt`f$D1Rr6Q-#oW;lbQuJWcM1$Kf+`Irrw$HybO@Mb1o5pSY zZ%q?9#`3$3kNPowkCidd%J?CUrkf_97s(^fSHE?mu3tKV|BP3D zjLw?n#rJV^zNe?LV7?SxzjR_V`h)dD2b0*@Q6qM+IflQuG@q@;%EkCzzPR3H_hpE6 z_AO!KNaKFtJ4KfI`2jFL$+b-n5I3*8M&{j7(Hjyv@lv{!7(Cm#N$I|HEIU1jZKpB^ zZe`-6Kzdd4sbBUqwvbQxeRbrMY_hpEEtWs>r;Sf>%@9-!&BZLlB?Kf&*78C+NLwqj~)1@S++j947rXvw~W|!aW>5V^D@I+ zH0Qc9EIte^j$U3y?zotkDBJjmUq`%qd6}%mept88VvTi6vnDTEk+uC~i|S5~#T4|F z34Oip(!WoPAC0res9+7;<@}1Ifvb`)w4Kz zDDRpIs%O|yjJ_bfvc>4Z?8JrCE94Awf{oU@&LMDnw4S+)+c^Br%*;{YS3n+@mvvyC ztba^oJ>g}s{$bTXZsX3kk%#XOOO|*f_b7S>pD`|d=GwMt(b3&7 zlg)vS?xm=!4c+slXjR)po;+@Ts%=_!N}l{Yhxej3@XePRkvV66ZyUJgON&$UU|6ar zUW6n2ls})+3!8?Qqmt7yk^+Y7$YXkbP2izIpATq8YYWZSUn&H4%j%q!fb8?0~-(6`2MT6t^m7A%sz_8VXhJ4;3f8W z=)!v6J8WK{{^$CA{a5`yZ(iM(Zt1%Jy6ObjXzrv`t^WmePxve;$j-_`o0A$e+duhO zi^kjWM?-;rrds=Dd-OxilWWiEp0#>y^9S1v18f?X+|Uc@b+Xk7V$hu z+x#!ZuR4^}nct)~!Ef?z*iShq~q0y`IEebnz)xOI7pD=Bqrf&IZW> ziy}3}dJba4o`oO%pY@XMHSm*8%8v`lk1YPZDdi*iHtOy0K02*~c=J7&%?~8=AL#&h ze-7FFdCC069q5`ZN;jLoI+?$*gLsy&E2TQl5%Bl)+Y|cT9r!+r?#cYU$^1Uu!@AB4 z`Qb4rOP)XLZJ&Qg_@C^+Pgy(j4XbCQXR5C{7`+ zk`IRKh8nmc)5qoCb}CP04>)&8?^jKqCp#76l2_JPHuO@HkU4T5{SrQ-ADhjWoP06e zY5tGi?Nm)5=WCxw#=E!+d&sS9m+&d|Qgb+G>V$p3-S{>od;@d&gms*_h^^Z67kyjZOfB%*_MCu|#YbcINrljZT%B%{#*5aNj_R8^VQrMfWJv|=#)jbPh z&pvU~*E2Vdw)9whr}Cxz3fP-|ANMq2VB_l~pP0P4M>VAs{c%r{>%x8(1LDIlsC9k` z2gy*bz&COyXOMjE=X^~ehlYR5ykRz!!!{T9vPS(SweyJ0Uz)QRimun4K5uVMae!ac zXKu`>ZW-S#3Ev%_Pqo+Ld`x3!eURZ&&Y5qb$8&}?u~Alh@Gf-N;^e8EkCSI|miO|z z^f`;(&FC*C^#8DXDf)%vsor^Pn3H)e$cbpL=;rSNi?hb(fx=eoCO{ z6Z)o=hEM39TcKM_d?cY?uu}0}igvHG_zwEWr>6HcqPv)9vlrZapYlcVJIh7m`>K~0 z;w1Wp$+h}ydHH?m;p?;E`>!i4f5dNo`0tg9nPN00d(r2$l_$iG`JsN5#h7ZV`u+{* zW%Jop7N=2eRf4Mx9j3^JC?u?SIiKdnd&Y2Wn)&gY4~3%$d&P4QrH3r6{|`{H1rAAlLX-ubCSg zXReW6_g}qbjl~8<-eLnhPl%2Fd9eY{Bkc7kI6j6C9!I~g+aB+&sqORZ+7oA+yD&V6j$&G%z*8ENVF@Myh zX~))rX{8u^yC_ZTSZDrKjWs!2HFma##=Wdlt^2vX3$xGV>*nJ72kSh(pIT@5;@=bS z;|L03Q zk4F2}gGc`;Jok3G!oBrwaM9lH+B;}L>(Oz)bPVqU*&5iS<)dpUo4h0A$2eNsXShff zXOrn-^IQ828_jcm&dx`DhL7espKQJp-SHPT*>@DnGm~+9pXHj)V%1~y%4c#GNgty> z&}VUeMxFomE==gj?c0mw%Qo@qtk+m__}=04EG*fxkj$6GXEJ}&XK|-_VXyfQx<2@T zHDHu4MLRxZeqcPB#Rt&^A2MI;=3QEt(|1{1)H)01?oTqm-b(p+(gUV#ADkC&vSGlvG1l&ve~95S&trU#)3;^y5o3)!<7azr;hFC^ zM>Vf!euuI67_1Rf9-FD*^TFkR&}9hutou?DH^(L8N@Og-#yu$-{hHD4gvL9{apflZ z4CN}P9zx%udJ4(8j6Og#eN&U(v;LSG-pHPk-;WG*Kc?r?c|I9^x2N_Bv>|BpT}Q60 zLE8fj9go~OmuBB6Rzu@^lzs0s9q-v()e$_0f{xOAH!+bxhMsru9A(_3^jeFIGZGvF zX8%j?9BAll*vlt;>#pugY#gp)v;4H`zN}jio1YB_(khaVfuFB_wB5ID|wdxHsD(>>u=Mt_9H93 z9$#AAXuV=;C?%Vo+-T=R)%2*6%*_)3-`tav}2QNvq$8sV&1XbT6Y)ED#UqU&Zu$i5`mCznZu1bF2%sVt_q` zeQ$E-tSYB5=}6hy&U3IsG1Bk4hE$)WxAbrsw@0}N2FEm(jmWe7lH9aym!QLu#J2O$ zaVt7XkInP=E`V=-Oe~uh6X(Fgw^fS?(Zqi$GV#qEyawP)+eW@t{RpIHQ1ama~BDl=DhG0J@f=xqp@Qz^6{9S z56v|0=KMV3=k;y4%az!dwMFMvJITP;lW8Ba*7lVg`kq&{wvT6O@NqrM=UT72Uu!+N zG^TnD4PCV7N>>m6P9Im3nh#^*c?>%b%U_yPEs{RWRma52WRPk0o6IhgnZ)X(=Cxkq z_mi29=`1qQvAT!kOOMl%xrlR;ytRChT#dQM4LmDfzDFO7Z&_0*hBI|=firy*ead~Q z{~N&Gc>6mu(~JFYou<2bD6lu3)Hel8La&si25NuKynQdYmxnWa72Ol`j zpUlS(8r}?r+te4lzRfC3EljIdCr$ z&wkyqLDLg_i(upD`UXu_c#lPH9Bm);n4U8TR;hREOZFiasxLn6`K6cU zLQE1b4{zZ&p(@|E68V3p`-wfi>F|W<1@6B0S3HEiv{ql7#QyMY^S+JD|2C@l#imEu z!+NoH)6?o|CiiFC4?!=gZ{yE;OZ8gPTk_$hf46VGi*kQ$yrcRK>|Flg%h^}5LXW54 zVWl(gZr01c-*^9@hjL0awaxc{G4-W-ru-%Gc95JVw@035AJrbk4`+eSeD%Ss_4Qll z9}1~9srHwpQ+^+2o^S7+=#$pvO@G$LvW0j(7OYBcNvO}I9>jU&0g_%Q#&GgX%Z&$@*7 z*X%DG!?*6-pzQ5#u)X!%fXzQk@Cv>OIzjg~zOln>?8L_B&{6AxjeJ9~SegIs zBOBp+RC{w4?}>A#3}sx4qu;K^$QOu_3NgaDH8Ko#^bF=t`H;22cU6A~qi?dm=<>IG zFW)_z#7=r2FwuKS?2_|Zwo{Y}z4SneHRkPEJb7qbafhoLx`)0EY{xt7|FRmLXpG|- za6)EP_cPFa3f<9pWCgna4Kf36((|4Kr+}$2YemLyW@glLSbr4w6=%1?PwdT+aSLYcU8+mwF!D4g+F`73lef>KfY;%b(gdhCi)Rm!kIwl+NOIf&6r}S(wr#bBv#_Aat z-22$<-Wm4N|5XJ2&SU@I(pw4F#l$Rk!&v^KFR#Y7V&IL0FZfNo>6kbbo}=&t+0e<) zQ-}Nc-@c#Mm`Bc9(O!Y(s7Iln>#tFdu+_fF&h>eVOUL{ViTT%vd2|}N96Rp%tgXHC6{}%!gP#6Por3eN(OeJjfKL>@(Wt&Klv(Z{!elIM9TTXs1A1 z2JNRcXx-4xh4w;<7GyRjGM`S-&Q4@5PS!n9gC==DU|u$acZ{UB{?0-2=S}x=AwymM zGVe3QhyKsHEME24yemE9)`7%li6(;96}WETx{vEIt_QfDC1d`HmCq7=sv!M%@?JW= z`&hl3FIe|--At$a0w?WGehr=Cx|%NG0j^K*-#qn8(I)4%Wl&^6g`tnno^QJ(+BT>x?stIMHg&JstTlvq6VpJHyO89T~A~?Rf~l9D1Lwi z3qUMbu;3Sf(n3`fi8_TdV}}|EVR>Pnd+y`hIW_=1eOq66qW0nlLOcw19UlqABWFh; z5uzD~Ua*Ozz)*~&DAtrANYU7GLL@^XR2|=GkqhAkkqSu?qOE)t6Dx>ru;YZ=Oe~oe z7%h)gdjfM3;}R7a=-6}jF+S2OkeuDez_4s>Il-oC<4j6l1*~qa(j&w7RETe|^_EoB z!uL^>I8~eQM3sf^O3X{#F)enr>msShmgdaE(xrsS@~>qbQ0)4THz(!^QYsze%r3adCFUWv` z8(ZlAf1bm9`}{}{RV;QmRVIlru~D&W57SP{Q7xh*&F28EvNCDX`Fs)ZRacA HGG_h_Vq;QE diff --git a/src/voc07R/test/readme b/src/voc07R/test/readme deleted file mode 100644 index 9108c517..00000000 --- a/src/voc07R/test/readme +++ /dev/null @@ -1,3 +0,0 @@ -put ORP binary here and run - -> ./ORP Test.Mod diff --git a/src/voc07R/x86/CompatFiles.Mod b/src/voc07R/x86/CompatFiles.Mod deleted file mode 100644 index d7a9c06e..00000000 --- a/src/voc07R/x86/CompatFiles.Mod +++ /dev/null @@ -1,677 +0,0 @@ -MODULE CompatFiles; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files *) -(* modified version of Files, which opens only the file provided and does not scan any path in any environment variable, also ReadLine procedure added; -- noch *) - IMPORT SYSTEM, Unix, Kernel, Args, Console; - - (* standard data type I/O - - little endian, - Sint:1, Int:2, Lint:4 - ORD({0}) = 1, - false = 0, true =1 - IEEE real format, - null terminated strings, - compact numbers according to M.Odersky *) - - - CONST - nofbufs = 4; - bufsize = 4096; - fileTabSize = 64; - noDesc = -1; - notDone = -1; - - (* file states *) - open = 0; create = 1; close = 2; - - - TYPE - FileName = ARRAY 101 OF CHAR; - File* = POINTER TO Handle; - Buffer = POINTER TO BufDesc; - - Handle = RECORD - workName, registerName: FileName; - tempFile: BOOLEAN; - dev, ino, mtime: LONGINT; - fd-, len, pos: LONGINT; - bufs: ARRAY nofbufs OF Buffer; - swapper, state: INTEGER - END ; - - BufDesc = RECORD - f: File; - chg: BOOLEAN; - org, size: LONGINT; - data: ARRAY bufsize OF SYSTEM.BYTE - END ; - - Rider* = RECORD - res*: LONGINT; - eof*: BOOLEAN; - buf: Buffer; - org, offset: LONGINT - END ; - - Time = POINTER TO TimeDesc; - TimeDesc = RECORD - sec*, min*, hour*, mday*, mon*, year*, wday*, isdst*, zone*, gmtoff*: LONGINT; -(* sec*, min*, hour*, mday*, mon*, year*, wday*, isdst*, zone*, gmtoff*: INTEGER;*) - END ; - - VAR - fileTab: ARRAY fileTabSize OF LONGINT (*=File*); - tempno: INTEGER; - -(* for localtime *) - PROCEDURE -includetime() - '#include "time.h"'; - - PROCEDURE -localtime(VAR clock: LONGINT): Time - "(CompatFiles_Time) localtime(clock)"; - - PROCEDURE -getcwd(VAR cwd: Unix.Name) - "getcwd(cwd, cwd__len)"; - - PROCEDURE -IdxTrap "__HALT(-1)"; - - PROCEDURE^ Finalize(o: SYSTEM.PTR); - - PROCEDURE Err(s: ARRAY OF CHAR; f: File; errno: LONGINT); - BEGIN - Console.Ln; Console.String("-- "); Console.String(s); Console.String(": "); - IF f # NIL THEN - IF f.registerName # "" THEN Console.String(f.registerName) ELSE Console.String(f.workName) END - END ; - IF errno # 0 THEN Console.String(" errno = "); Console.Int(errno, 1) END ; - Console.Ln; - HALT(99) - END Err; - - PROCEDURE MakeFileName(dir, name: ARRAY OF CHAR; VAR dest: ARRAY OF CHAR); - VAR i, j: INTEGER; - BEGIN i := 0; j := 0; - WHILE dir[i] # 0X DO dest[i] := dir[i]; INC(i) END ; - IF dest[i-1] # "/" THEN dest[i] := "/"; INC(i) END ; - WHILE name[j] # 0X DO dest[i] := name[j]; INC(i); INC(j) END ; - dest[i] := 0X - END MakeFileName; - - PROCEDURE GetTempName(finalName: ARRAY OF CHAR; VAR name: ARRAY OF CHAR); - VAR n, i, j: LONGINT; - BEGIN - INC(tempno); n := tempno; i := 0; - IF finalName[0] # "/" THEN (* relative pathname *) - WHILE Kernel.CWD[i] # 0X DO name[i] := Kernel.CWD[i]; INC(i) END; - IF Kernel.CWD[i-1] # "/" THEN name[i] := "/"; INC(i) END - END; - j := 0; - WHILE finalName[j] # 0X DO name[i] := finalName[j]; INC(i); INC(j) END; - DEC(i); - WHILE name[i] # "/" DO DEC(i) END; - name[i+1] := "."; name[i+2] := "t"; name[i+3] := "m"; name[i+4] := "p"; name[i+5] := "."; INC(i, 6); - WHILE n > 0 DO name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; INC(i) END; - name[i] := "."; INC(i); n := SHORT(Unix.Getpid()); - WHILE n > 0 DO name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; INC(i) END; - name[i] := 0X - END GetTempName; - - PROCEDURE Create(f: File); - VAR stat: Unix.Status; done: BOOLEAN; - errno: LONGINT; err: ARRAY 32 OF CHAR; - BEGIN - IF f.fd = noDesc THEN - IF f.state = create THEN GetTempName(f.registerName, f.workName); f.tempFile := TRUE - ELSIF f.state = close THEN - f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE - END ; - errno := Unix.Unlink(f.workName); (*unlink first to avoid stale NFS handles and to avoid reuse of inodes*) - f.fd := Unix.Open(f.workName, Unix.rdwr + Unix.creat + Unix.trunc, {2, 4,5, 7,8}); - done := f.fd >= 0; errno := Unix.errno(); - IF (~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE))) OR (done & (f.fd >= fileTabSize)) THEN - IF done & (f.fd >= fileTabSize) THEN errno := Unix.Close(f.fd) END ; - Kernel.GC(TRUE); - f.fd := Unix.Open(f.workName, Unix.rdwr + Unix.creat + Unix.trunc, {2, 4,5, 7,8}); - done := f.fd >= 0 - END ; - IF done THEN - IF f.fd >= fileTabSize THEN errno := Unix.Close(f.fd); Err("too many files open", f, 0) - ELSE fileTab[f.fd] := SYSTEM.VAL(LONGINT, f); INC(Kernel.nofiles); Kernel.RegisterObject(f, Finalize); - f.state := open; f.pos := 0; errno := Unix.Fstat(f.fd, stat); - f.dev := stat.dev; f.ino := stat.ino; f.mtime := stat.mtime - END - ELSE errno := Unix.errno(); - IF errno = Unix.ENOENT THEN err := "no such directory" - ELSIF (errno = Unix.ENFILE) OR (errno = Unix.EMFILE) THEN err := "too many files open" - ELSE err := "file not created" - END ; - Err(err, f, errno) - END - END - END Create; - - PROCEDURE Flush(buf: Buffer); - VAR res: LONGINT; f: File; stat: Unix.Status; - BEGIN - IF buf.chg THEN f := buf.f; Create(f); - IF buf.org # f.pos THEN res := Unix.Lseek(f.fd, buf.org, 0) END ; - res := Unix.Write(f.fd, SYSTEM.ADR(buf.data), buf.size); - IF res < 0 THEN Err("error in writing file", f, Unix.errno()) END ; - f.pos := buf.org + buf.size; - buf.chg := FALSE; - res := Unix.Fstat(f.fd, stat); - f.mtime := stat.mtime - END - END Flush; - - PROCEDURE Close* (f: File); - VAR i, res: LONGINT; - BEGIN - IF (f.state # create) OR (f.registerName # "") THEN - Create(f); i := 0; - WHILE (i < nofbufs) & (f.bufs[i] # NIL) DO Flush(f.bufs[i]); INC(i) END ; - res := Unix.Fsync(f.fd); - IF res < 0 THEN Err("error in writing file", f, Unix.errno()) END - END - END Close; - - PROCEDURE Length* (f: File): LONGINT; - BEGIN RETURN f.len - END Length; - - PROCEDURE New* (name: ARRAY OF CHAR): File; - VAR f: File; - BEGIN - NEW(f); f.workName := ""; COPY(name, f.registerName); - f.fd := noDesc; f.state := create; f.len := 0; f.pos := 0; f.swapper := -1; (*all f.buf[i] = NIL*) - RETURN f - END New; -(* - PROCEDURE ScanPath(VAR pos: INTEGER; VAR dir: ARRAY OF CHAR); (* supports ~, ~user and blanks inside path *) - VAR i: INTEGER; ch: CHAR; home: ARRAY 256 OF CHAR; - BEGIN - i := 0; ch := Kernel.OBERON[pos]; - WHILE (ch = " ") OR (ch = ":") DO INC(pos); ch := Kernel.OBERON[pos] END ; - IF ch = "~" THEN - INC(pos); ch := Kernel.OBERON[pos]; - home := ""; Args.GetEnv("HOME", home); - WHILE home[i] # 0X DO dir[i] := home[i]; INC(i) END ; - IF (ch # "/") & (ch # 0X) & (ch # ":") & (ch # " ") THEN - WHILE (i > 0) & (dir[i-1] # "/") DO DEC(i) END - END - END ; - WHILE (ch # 0X) & (ch # ":") DO dir[i] := ch; INC(i); INC(pos); ch := Kernel.OBERON[pos] END ; - WHILE (i > 0) & (dir[i-1] = " ") DO DEC(i) END ; - dir[i] := 0X - END ScanPath; -*) - PROCEDURE HasDir(VAR name: ARRAY OF CHAR): BOOLEAN; - VAR i: INTEGER; ch: CHAR; - BEGIN i := 0; ch := name[0]; - WHILE (ch # 0X) & (ch # "/") DO INC(i); ch := name[i] END ; - RETURN ch = "/" - END HasDir; - - PROCEDURE CacheEntry(dev, ino: LONGINT; mtime: LONGINT): File; - VAR f: File; i: INTEGER; stat: Unix.Status; res: LONGINT; - BEGIN i := 0; - WHILE i < fileTabSize DO - f := SYSTEM.VAL(File, fileTab[i]); - IF (f # NIL) & (ino = f.ino) & (dev = f.dev) THEN - IF mtime # f.mtime THEN i := 0; - WHILE i < nofbufs DO - IF f.bufs[i] # NIL THEN f.bufs[i].org := -1; f.bufs[i] := NIL END ; - INC(i) - END ; - f.swapper := -1; f.mtime := mtime; - res := Unix.Fstat(f.fd, stat); f.len := stat.size - END ; - RETURN f - END ; - INC(i) - END ; - RETURN NIL - END CacheEntry; - - PROCEDURE Old* (name: ARRAY OF CHAR): File; - VAR f: File; fd, res, errno: LONGINT; pos: INTEGER; done: BOOLEAN; - dir, path: ARRAY 256 OF CHAR; - stat: Unix.Status; - BEGIN - IF name # "" THEN - IF HasDir(name) THEN dir := ""; COPY(name, path) - ELSE - pos := 0; - COPY(name, path); (* -- noch *) - (*ScanPath(pos, dir);*) (*MakeFileName(dir, name, path);*) (*ScanPath(pos, dir)*) - END ; - LOOP - fd := Unix.Open(path, Unix.rdwr, {}); done := fd >= 0; errno := Unix.errno(); - IF (~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE))) OR (done & (fd >= fileTabSize)) THEN - IF done & (fd >= fileTabSize) THEN res := Unix.Close(fd) END ; - Kernel.GC(TRUE); - fd := Unix.Open(path, Unix.rdwr, {}); - done := fd >= 0; errno := Unix.errno(); - IF ~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE)) THEN Err("too many files open", f, errno) END - END ; - IF ~done & ((errno = Unix.EACCES) OR (errno = Unix.EROFS) OR (errno = Unix.EAGAIN)) THEN - (* errno EAGAIN observed on Solaris 2.4 *) - fd := Unix.Open(path, Unix.rdonly, {}); done := fd >= 0; errno := Unix.errno() - END ; -IF (~done) & (errno # Unix.ENOENT) THEN - Console.String("warning Files.Old "); Console.String(name); - Console.String(" errno = "); Console.Int(errno, 0); Console.Ln; -END ; - IF done THEN - res := Unix.Fstat(fd, stat); - f := CacheEntry(stat.dev, stat.ino, stat.mtime); - IF f # NIL THEN res := Unix.Close(fd); RETURN f - ELSIF fd >= fileTabSize THEN res := Unix.Close(fd); Err("too many files open", f, 0) - ELSE NEW(f); fileTab[fd] := SYSTEM.VAL(LONGINT, f); INC(Kernel.nofiles); Kernel.RegisterObject(f, Finalize); - f.fd := fd; f.state := open; f.len := stat.size; f.pos := 0; f.swapper := -1; (*all f.buf[i] = NIL*) - COPY(name, f.workName); f.registerName := ""; f.tempFile := FALSE; - f.dev := stat.dev; f.ino := stat.ino; f.mtime := stat.mtime; - RETURN f - END - ELSIF dir = "" THEN RETURN NIL - ELSE (*MakeFileName(dir, name, path);*) (*ScanPath(pos, dir)*) - RETURN NIL - END - END - ELSE RETURN NIL - END - END Old; - - PROCEDURE Purge* (f: File); - VAR i: INTEGER; stat: Unix.Status; res: LONGINT; - BEGIN i := 0; - WHILE i < nofbufs DO - IF f.bufs[i] # NIL THEN f.bufs[i].org := -1; f.bufs[i] := NIL END ; - INC(i) - END ; - IF f.fd # noDesc THEN res := Unix.Ftruncate(f.fd, 0); res := Unix.Lseek(f.fd, 0, 0) END ; - f.pos := 0; f.len := 0; f.swapper := -1; - res := Unix.Fstat(f.fd, stat); f.mtime := stat.mtime - END Purge; - - PROCEDURE GetDate* (f: File; VAR t, d: LONGINT); - VAR stat: Unix.Status; clock, res: LONGINT; time: Time; - BEGIN - Create(f); res := Unix.Fstat(f.fd, stat); - time := localtime(stat.mtime); - t := time.sec + ASH(time.min, 6) + ASH(time.hour, 12); - d := time.mday + ASH(time.mon+1, 5) + ASH(time.year MOD 100, 9) - END GetDate; - - PROCEDURE Pos* (VAR r: Rider): LONGINT; - BEGIN RETURN r.org + r.offset - END Pos; - - PROCEDURE Set* (VAR r: Rider; f: File; pos: LONGINT); - VAR org, offset, i, n, res: LONGINT; buf: Buffer; - BEGIN - IF f # NIL THEN - IF pos > f.len THEN pos := f.len ELSIF pos < 0 THEN pos := 0 END ; - offset := pos MOD bufsize; org := pos - offset; i := 0; - WHILE (i < nofbufs) & (f.bufs[i] # NIL) & (org # f.bufs[i].org) DO INC(i) END ; - IF i < nofbufs THEN - IF f.bufs[i] = NIL THEN NEW(buf); buf.chg := FALSE; buf.org := -1; buf.f := f; f.bufs[i] := buf - ELSE buf := f.bufs[i] - END - ELSE - f.swapper := (f.swapper + 1) MOD nofbufs; - buf := f.bufs[f.swapper]; - Flush(buf) - END ; - IF buf.org # org THEN - IF org = f.len THEN buf.size := 0 - ELSE Create(f); - IF f.pos # org THEN res := Unix.Lseek(f.fd, org, 0) END ; - n := Unix.ReadBlk(f.fd, buf.data); - IF n < 0 THEN Err("read from file not done", f, Unix.errno()) END ; - f.pos := org + n; - buf.size := n - END ; - buf.org := org; buf.chg := FALSE - END - ELSE buf := NIL; org := 0; offset := 0 - END ; - r.buf := buf; r.org := org; r.offset := offset; r.eof := FALSE; r.res := 0 - END Set; - - PROCEDURE Read* (VAR r: Rider; VAR x: SYSTEM.BYTE); - VAR offset: LONGINT; buf: Buffer; - BEGIN - buf := r.buf; offset := r.offset; - IF r.org # buf.org THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END ; - IF (offset < buf.size) THEN - x := buf.data[offset]; r.offset := offset + 1 - ELSIF r.org + offset < buf.f.len THEN - Set(r, r.buf.f, r.org + offset); - x := r.buf.data[0]; r.offset := 1 - ELSE - x := 0X; r.eof := TRUE - END - END Read; - - PROCEDURE ReadBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT); - VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; - BEGIN - IF n > LEN(x) THEN IdxTrap END ; - xpos := 0; buf := r.buf; offset := r.offset; - WHILE n > 0 DO - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - restInBuf := buf.size - offset; - IF restInBuf = 0 THEN r.res := n; r.eof := TRUE; RETURN - ELSIF n > restInBuf THEN min := restInBuf ELSE min := n END ; - SYSTEM.MOVE(SYSTEM.ADR(buf.data) + offset, SYSTEM.ADR(x) + xpos, min); - INC(offset, min); r.offset := offset; INC(xpos, min); DEC(n, min) - END ; - r.res := 0; r.eof := FALSE - END ReadBytes; - - PROCEDURE ReadByte* (VAR r : Rider; VAR x : ARRAY OF SYSTEM.BYTE); - BEGIN - ReadBytes(r, x, 1); - END ReadByte; - - PROCEDURE Base* (VAR r: Rider): File; - BEGIN RETURN r.buf.f - END Base; - - PROCEDURE Write* (VAR r: Rider; x: SYSTEM.BYTE); - VAR buf: Buffer; offset: LONGINT; - BEGIN - buf := r.buf; offset := r.offset; - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - buf.data[offset] := x; - buf.chg := TRUE; - IF offset = buf.size THEN - INC(buf.size); INC(buf.f.len) - END ; - r.offset := offset + 1; r.res := 0 - END Write; - - PROCEDURE WriteByte* (VAR r : Rider; x : SYSTEM.BYTE); (* added for compatibility with PO 2013, -- noch *) - BEGIN - Write(r, x); - END WriteByte; - - PROCEDURE WriteBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT); - VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; - BEGIN - IF n > LEN(x) THEN IdxTrap END ; - xpos := 0; buf := r.buf; offset := r.offset; - WHILE n > 0 DO - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - restInBuf := bufsize - offset; - IF n > restInBuf THEN min := restInBuf ELSE min := n END ; - SYSTEM.MOVE(SYSTEM.ADR(x) + xpos, SYSTEM.ADR(buf.data) + offset, min); - INC(offset, min); r.offset := offset; - IF offset > buf.size THEN INC(buf.f.len, offset - buf.size); buf.size := offset END ; - INC(xpos, min); DEC(n, min); buf.chg := TRUE - END ; - r.res := 0 - END WriteBytes; - -(* another solution would be one that is similar to ReadBytes, WriteBytes. -No code duplication, more symmetric, only two ifs for -Read and Write in buffer, buf.size replaced by bufsize in Write ops, buf.size and len -must be made consistent with offset (if offset > buf.size) in a lazy way. - -PROCEDURE Write* (VAR r: Rider; x: SYSTEM.BYTE); - VAR buf: Buffer; offset: LONGINT; -BEGIN - buf := r.buf; offset := r.offset; - IF (offset >= bufsize) OR (r.org # buf.org) THEN - Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset; - END ; - buf.data[offset] := x; r.offset := offset + 1; buf.chg := TRUE -END Write; - - -PROCEDURE WriteBytes ... - -PROCEDURE Read* (VAR r: Rider; VAR x: SYSTEM.BYTE); - VAR offset: LONGINT; buf: Buffer; -BEGIN - buf := r.buf; offset := r.offset; - IF (offset >= buf.size) OR (r.org # buf.org) THEN - IF r.org + offset >= buf.f.len THEN x := 0X; r.eof := TRUE; RETURN - ELSE Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset - END - END ; - x := buf.data[offset]; r.offset := offset + 1 -END Read; - -but this would also affect Set, Length, and Flush. -Especially Length would become fairly complex. -*) - - PROCEDURE Delete* (name: ARRAY OF CHAR; VAR res: INTEGER); - BEGIN - res := SHORT(Unix.Unlink(name)); - res := SHORT(Unix.errno()) - END Delete; - - PROCEDURE Rename* (old, new: ARRAY OF CHAR; VAR res: INTEGER); - VAR fdold, fdnew, n, errno, r: LONGINT; - ostat, nstat: Unix.Status; - buf: ARRAY 4096 OF CHAR; - BEGIN - r := Unix.Stat(old, ostat); - IF r >= 0 THEN - r := Unix.Stat(new, nstat); - IF (r >= 0) & ((ostat.dev # nstat.dev) OR (ostat.ino # nstat.ino)) THEN - Delete(new, res); (* work around stale nfs handles *) - END ; - r := Unix.Rename(old, new); - IF r < 0 THEN res := SHORT(Unix.errno()); - IF res = Unix.EXDEV THEN (* cross device link, move the file *) - fdold := Unix.Open(old, Unix.rdonly, {}); - IF fdold < 0 THEN res := 2; RETURN END ; - fdnew := Unix.Open(new, Unix.rdwr + Unix.creat + Unix.trunc, {2, 4,5, 7,8}); - IF fdnew < 0 THEN r := Unix.Close(fdold); res := 3; RETURN END ; - n := Unix.Read(fdold, SYSTEM.ADR(buf), bufsize); - WHILE n > 0 DO - r := Unix.Write(fdnew, SYSTEM.ADR(buf), n); - IF r < 0 THEN errno := Unix.errno(); r := Unix.Close(fdold); r := Unix.Close(fdnew); - Err("cannot move file", NIL, errno) - END ; - n := Unix.Read(fdold, SYSTEM.ADR(buf), bufsize) - END ; - errno := Unix.errno(); - r := Unix.Close(fdold); r := Unix.Close(fdnew); - IF n = 0 THEN r := Unix.Unlink(old); res := 0 - ELSE Err("cannot move file", NIL, errno) - END ; - ELSE RETURN (* res is Unix.Rename return code *) - END - END ; - res := 0 - ELSE res := 2 (* old file not found *) - END - END Rename; - - PROCEDURE Register* (f: File); - VAR idx, errno: INTEGER; f1: File; file: ARRAY 104 OF CHAR; - BEGIN - IF (f.state = create) & (f.registerName # "") THEN f.state := close (* shortcut renaming *) END ; - Close(f); - IF f.registerName # "" THEN - Rename(f.workName, f.registerName, errno); - IF errno # 0 THEN COPY(f.registerName, file); HALT(99) END ; - f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE - END - END Register; - - PROCEDURE ChangeDirectory*(path: ARRAY OF CHAR; VAR res: INTEGER); - BEGIN - res := SHORT(Unix.Chdir(path)); - getcwd(Kernel.CWD) - END ChangeDirectory; - - PROCEDURE FlipBytes(VAR src, dest: ARRAY OF SYSTEM.BYTE); - VAR i, j: LONGINT; - BEGIN - IF ~Kernel.littleEndian THEN i := LEN(src); j := 0; - WHILE i > 0 DO DEC(i); dest[j] := src[i]; INC(j) END - ELSE SYSTEM.MOVE(SYSTEM.ADR(src), SYSTEM.ADR(dest), LEN(src)) - END - END FlipBytes; - - PROCEDURE ReadBool* (VAR R: Rider; VAR x: BOOLEAN); - BEGIN Read(R, SYSTEM.VAL(CHAR, x)) - END ReadBool; - -(* PROCEDURE ReadInt* (VAR R: Rider; VAR x: INTEGER); - VAR b: ARRAY 2 OF CHAR; - BEGIN ReadBytes(R, b, 2); - x := ORD(b[0]) + ORD(b[1])*256 - END ReadInt; - *) - - PROCEDURE ReadInt* (VAR R: Rider; VAR x: LONGINT); (* to compile OR compiler; -- noch *) - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H - END ReadInt; - - PROCEDURE ReadLInt* (VAR R: Rider; VAR x: LONGINT); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H - END ReadLInt; - - PROCEDURE ReadSet* (VAR R: Rider; VAR x: SET); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := SYSTEM.VAL(SET, ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H) - END ReadSet; - - PROCEDURE ReadReal* (VAR R: Rider; VAR x: REAL); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); FlipBytes(b, x) - END ReadReal; - - PROCEDURE ReadLReal* (VAR R: Rider; VAR x: LONGREAL); - VAR b: ARRAY 8 OF CHAR; - BEGIN ReadBytes(R, b, 8); FlipBytes(b, x) - END ReadLReal; - - PROCEDURE ReadString* (VAR R: Rider; VAR x: ARRAY OF CHAR); - VAR i: INTEGER; ch: CHAR; - BEGIN i := 0; - REPEAT Read(R, ch); x[i] := ch; INC(i) UNTIL ch = 0X - END ReadString; - - (* need to read line; -- noch *) - PROCEDURE ReadLine* (VAR R: Rider; VAR x: ARRAY OF CHAR); - VAR i: INTEGER; ch: CHAR; b : BOOLEAN; - BEGIN i := 0; - b := FALSE; - REPEAT - Read(R, ch); - IF ((ch = 0X) OR (ch = 0AX) OR (ch = 0DX)) THEN - b := TRUE - ELSE - x[i] := ch; - INC(i); - END; - UNTIL b - END ReadLine; - - 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; - - PROCEDURE WriteBool* (VAR R: Rider; x: BOOLEAN); - BEGIN Write(R, SYSTEM.VAL(CHAR, x)) - END WriteBool; - -(* PROCEDURE WriteInt* (VAR R: Rider; x: INTEGER); - VAR b: ARRAY 2 OF CHAR; - BEGIN b[0] := CHR(x); b[1] := CHR(x DIV 256); - WriteBytes(R, b, 2); - END WriteInt; - *) - PROCEDURE WriteInt* (VAR R: Rider; x: LONGINT); (* to compile OR compiler; -- noch *) - VAR b: ARRAY 4 OF CHAR; - BEGIN - b[0] := CHR(x); b[1] := CHR(x DIV 100H); b[2] := CHR(x DIV 10000H); b[3] := CHR(x DIV 1000000H); - WriteBytes(R, b, 4); - END WriteInt; - - PROCEDURE WriteLInt* (VAR R: Rider; x: LONGINT); - VAR b: ARRAY 4 OF CHAR; - BEGIN - b[0] := CHR(x); b[1] := CHR(x DIV 100H); b[2] := CHR(x DIV 10000H); b[3] := CHR(x DIV 1000000H); - WriteBytes(R, b, 4); - END WriteLInt; - - PROCEDURE WriteSet* (VAR R: Rider; x: SET); - VAR b: ARRAY 4 OF CHAR; i: LONGINT; - BEGIN i := SYSTEM.VAL(LONGINT, x); - b[0] := CHR(i); b[1] := CHR(i DIV 100H); b[2] := CHR(i DIV 10000H); b[3] := CHR(i DIV 1000000H); - WriteBytes(R, b, 4); - END WriteSet; - - PROCEDURE WriteReal* (VAR R: Rider; x: REAL); - VAR b: ARRAY 4 OF CHAR; - BEGIN FlipBytes(x, b); WriteBytes(R, b, 4) - END WriteReal; - - PROCEDURE WriteLReal* (VAR R: Rider; x: LONGREAL); - VAR b: ARRAY 8 OF CHAR; - BEGIN FlipBytes(x, b); WriteBytes(R, b, 8) - END WriteLReal; - - PROCEDURE WriteString* (VAR R: Rider; x: ARRAY [1] OF CHAR); - VAR i: INTEGER; - BEGIN i := 0; - WHILE x[i] # 0X DO INC(i) END ; - WriteBytes(R, x, i+1) - END WriteString; - - PROCEDURE WriteNum* (VAR R: Rider; x: LONGINT); - BEGIN - WHILE (x < - 64) OR (x > 63) DO Write(R, CHR(x MOD 128 + 128)); x := x DIV 128 END; - Write(R, CHR(x MOD 128)) - END WriteNum; - - PROCEDURE GetName*(f: File; VAR name: ARRAY OF CHAR); - BEGIN - COPY (f.workName, name); - END GetName; - - PROCEDURE Finalize(o: SYSTEM.PTR); - VAR f: File; res: LONGINT; - BEGIN - f := SYSTEM.VAL(File, o); - IF f.fd >= 0 THEN - fileTab[f.fd] := 0; res := Unix.Close(f.fd); f.fd := -1; DEC(Kernel.nofiles); - IF f.tempFile THEN res := Unix.Unlink(f.workName) END - END - END Finalize; - - PROCEDURE Init; - VAR i: LONGINT; - BEGIN - i := 0; WHILE i < fileTabSize DO fileTab[i] := 0; INC(i) END ; - tempno := -1; Kernel.nofiles := 0 - END Init; - -BEGIN Init -END CompatFiles. diff --git a/src/voc07R/x86_64/CompatFiles.Mod b/src/voc07R/x86_64/CompatFiles.Mod deleted file mode 100644 index 785a9666..00000000 --- a/src/voc07R/x86_64/CompatFiles.Mod +++ /dev/null @@ -1,677 +0,0 @@ -MODULE CompatFiles; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files *) -(* modified version of Files, which opens only the file provided and does not scan any path in any environment variable, also ReadLine procedure added; -- noch *) - IMPORT SYSTEM, Unix, Kernel, Args, Console; - - (* standard data type I/O - - little endian, - Sint:1, Int:2, Lint:4 - ORD({0}) = 1, - false = 0, true =1 - IEEE real format, - null terminated strings, - compact numbers according to M.Odersky *) - - - CONST - nofbufs = 4; - bufsize = 4096; - fileTabSize = 64; - noDesc = -1; - notDone = -1; - - (* file states *) - open = 0; create = 1; close = 2; - - - TYPE - FileName = ARRAY 101 OF CHAR; - File* = POINTER TO Handle; - Buffer = POINTER TO BufDesc; - - Handle = RECORD - workName, registerName: FileName; - tempFile: BOOLEAN; - dev, ino, mtime: LONGINT; - fd-: INTEGER; len, pos: LONGINT; - bufs: ARRAY nofbufs OF Buffer; - swapper, state: INTEGER - END ; - - BufDesc = RECORD - f: File; - chg: BOOLEAN; - org, size: LONGINT; - data: ARRAY bufsize OF SYSTEM.BYTE - END ; - - Rider* = RECORD - res*: LONGINT; - eof*: BOOLEAN; - buf: Buffer; - org, offset: LONGINT - END ; - - Time = POINTER TO TimeDesc; - TimeDesc = RECORD - sec*, min*, hour*, mday*, mon*, year*, wday*, isdst*, zone*, gmtoff*: LONGINT; -(* sec*, min*, hour*, mday*, mon*, year*, wday*, isdst*, zone*, gmtoff*: INTEGER;*) - END ; - - VAR - fileTab: ARRAY fileTabSize OF LONGINT (*=File*); - tempno: INTEGER; - -(* for localtime *) - PROCEDURE -includetime() - '#include "time.h"'; - - PROCEDURE -localtime(VAR clock: LONGINT): Time - "(CompatFiles_Time) localtime(clock)"; - - PROCEDURE -getcwd(VAR cwd: Unix.Name) - "getcwd(cwd, cwd__len)"; - - PROCEDURE -IdxTrap "__HALT(-1)"; - - PROCEDURE^ Finalize(o: SYSTEM.PTR); - - PROCEDURE Err(s: ARRAY OF CHAR; f: File; errno: LONGINT); - BEGIN - Console.Ln; Console.String("-- "); Console.String(s); Console.String(": "); - IF f # NIL THEN - IF f.registerName # "" THEN Console.String(f.registerName) ELSE Console.String(f.workName) END - END ; - IF errno # 0 THEN Console.String(" errno = "); Console.Int(errno, 1) END ; - Console.Ln; - HALT(99) - END Err; - - PROCEDURE MakeFileName(dir, name: ARRAY OF CHAR; VAR dest: ARRAY OF CHAR); - VAR i, j: INTEGER; - BEGIN i := 0; j := 0; - WHILE dir[i] # 0X DO dest[i] := dir[i]; INC(i) END ; - IF dest[i-1] # "/" THEN dest[i] := "/"; INC(i) END ; - WHILE name[j] # 0X DO dest[i] := name[j]; INC(i); INC(j) END ; - dest[i] := 0X - END MakeFileName; - - PROCEDURE GetTempName(finalName: ARRAY OF CHAR; VAR name: ARRAY OF CHAR); - VAR n, i, j: LONGINT; - BEGIN - INC(tempno); n := tempno; i := 0; - IF finalName[0] # "/" THEN (* relative pathname *) - WHILE Kernel.CWD[i] # 0X DO name[i] := Kernel.CWD[i]; INC(i) END; - IF Kernel.CWD[i-1] # "/" THEN name[i] := "/"; INC(i) END - END; - j := 0; - WHILE finalName[j] # 0X DO name[i] := finalName[j]; INC(i); INC(j) END; - DEC(i); - WHILE name[i] # "/" DO DEC(i) END; - name[i+1] := "."; name[i+2] := "t"; name[i+3] := "m"; name[i+4] := "p"; name[i+5] := "."; INC(i, 6); - WHILE n > 0 DO name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; INC(i) END; - name[i] := "."; INC(i); n := SHORT(Unix.Getpid()); - WHILE n > 0 DO name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; INC(i) END; - name[i] := 0X - END GetTempName; - - PROCEDURE Create(f: File); - VAR stat: Unix.Status; done: BOOLEAN; - errno: LONGINT; err: ARRAY 32 OF CHAR; - BEGIN - IF f.fd = noDesc THEN - IF f.state = create THEN GetTempName(f.registerName, f.workName); f.tempFile := TRUE - ELSIF f.state = close THEN - f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE - END ; - errno := Unix.Unlink(f.workName); (*unlink first to avoid stale NFS handles and to avoid reuse of inodes*) - f.fd := Unix.Open(f.workName, SYSTEM.VAL(INTEGER, Unix.rdwr + Unix.creat + Unix.trunc), SYSTEM.VAL(LONGINT, {2, 4,5, 7,8})); - done := f.fd >= 0; errno := Unix.errno(); - IF (~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE))) OR (done & (f.fd >= fileTabSize)) THEN - IF done & (f.fd >= fileTabSize) THEN errno := Unix.Close(f.fd) END ; - Kernel.GC(TRUE); - f.fd := Unix.Open(f.workName, SYSTEM.VAL(INTEGER, Unix.rdwr + Unix.creat + Unix.trunc), SYSTEM.VAL(LONGINT, {2, 4,5, 7,8})); - done := f.fd >= 0 - END ; - IF done THEN - IF f.fd >= fileTabSize THEN errno := Unix.Close(f.fd); Err("too many files open", f, 0) - ELSE fileTab[f.fd] := SYSTEM.VAL(LONGINT, f); INC(Kernel.nofiles); Kernel.RegisterObject(f, Finalize); - f.state := open; f.pos := 0; errno := Unix.Fstat(f.fd, stat); - f.dev := stat.dev; f.ino := stat.ino; f.mtime := stat.mtime - END - ELSE errno := Unix.errno(); - IF errno = Unix.ENOENT THEN err := "no such directory" - ELSIF (errno = Unix.ENFILE) OR (errno = Unix.EMFILE) THEN err := "too many files open" - ELSE err := "file not created" - END ; - Err(err, f, errno) - END - END - END Create; - - PROCEDURE Flush(buf: Buffer); - VAR res: LONGINT; f: File; stat: Unix.Status; - BEGIN - IF buf.chg THEN f := buf.f; Create(f); - IF buf.org # f.pos THEN res := Unix.Lseek(f.fd, buf.org, 0) END ; - res := Unix.Write(f.fd, SYSTEM.ADR(buf.data), buf.size); - IF res < 0 THEN Err("error in writing file", f, Unix.errno()) END ; - f.pos := buf.org + buf.size; - buf.chg := FALSE; - res := Unix.Fstat(f.fd, stat); - f.mtime := stat.mtime - END - END Flush; - - PROCEDURE Close* (f: File); - VAR i, res: LONGINT; - BEGIN - IF (f.state # create) OR (f.registerName # "") THEN - Create(f); i := 0; - WHILE (i < nofbufs) & (f.bufs[i] # NIL) DO Flush(f.bufs[i]); INC(i) END ; - res := Unix.Fsync(f.fd); - IF res < 0 THEN Err("error in writing file", f, Unix.errno()) END - END - END Close; - - PROCEDURE Length* (f: File): LONGINT; - BEGIN RETURN f.len - END Length; - - PROCEDURE New* (name: ARRAY OF CHAR): File; - VAR f: File; - BEGIN - NEW(f); f.workName := ""; COPY(name, f.registerName); - f.fd := noDesc; f.state := create; f.len := 0; f.pos := 0; f.swapper := -1; (*all f.buf[i] = NIL*) - RETURN f - END New; -(* - PROCEDURE ScanPath(VAR pos: INTEGER; VAR dir: ARRAY OF CHAR); (* supports ~, ~user and blanks inside path *) - VAR i: INTEGER; ch: CHAR; home: ARRAY 256 OF CHAR; - BEGIN - i := 0; ch := Kernel.OBERON[pos]; - WHILE (ch = " ") OR (ch = ":") DO INC(pos); ch := Kernel.OBERON[pos] END ; - IF ch = "~" THEN - INC(pos); ch := Kernel.OBERON[pos]; - home := ""; Args.GetEnv("HOME", home); - WHILE home[i] # 0X DO dir[i] := home[i]; INC(i) END ; - IF (ch # "/") & (ch # 0X) & (ch # ":") & (ch # " ") THEN - WHILE (i > 0) & (dir[i-1] # "/") DO DEC(i) END - END - END ; - WHILE (ch # 0X) & (ch # ":") DO dir[i] := ch; INC(i); INC(pos); ch := Kernel.OBERON[pos] END ; - WHILE (i > 0) & (dir[i-1] = " ") DO DEC(i) END ; - dir[i] := 0X - END ScanPath; -*) - PROCEDURE HasDir(VAR name: ARRAY OF CHAR): BOOLEAN; - VAR i: INTEGER; ch: CHAR; - BEGIN i := 0; ch := name[0]; - WHILE (ch # 0X) & (ch # "/") DO INC(i); ch := name[i] END ; - RETURN ch = "/" - END HasDir; - - PROCEDURE CacheEntry(dev, ino: LONGINT; mtime: LONGINT): File; - VAR f: File; i: INTEGER; stat: Unix.Status; res: LONGINT; - BEGIN i := 0; - WHILE i < fileTabSize DO - f := SYSTEM.VAL(File, fileTab[i]); - IF (f # NIL) & (ino = f.ino) & (dev = f.dev) THEN - IF mtime # f.mtime THEN i := 0; - WHILE i < nofbufs DO - IF f.bufs[i] # NIL THEN f.bufs[i].org := -1; f.bufs[i] := NIL END ; - INC(i) - END ; - f.swapper := -1; f.mtime := mtime; - res := Unix.Fstat(f.fd, stat); f.len := stat.size - END ; - RETURN f - END ; - INC(i) - END ; - RETURN NIL - END CacheEntry; - - PROCEDURE Old* (name: ARRAY OF CHAR): File; - VAR f: File; fd, res: INTEGER; errno: LONGINT; pos: INTEGER; done: BOOLEAN; - dir, path: ARRAY 256 OF CHAR; - stat: Unix.Status; - BEGIN - IF name # "" THEN - IF HasDir(name) THEN dir := ""; COPY(name, path) - ELSE - pos := 0; - COPY(name, path); (* -- noch *) - (*ScanPath(pos, dir);*) (*MakeFileName(dir, name, path);*) (*ScanPath(pos, dir)*) - END ; - LOOP - fd := Unix.Open(path, SYSTEM.VAL(INTEGER, Unix.rdwr), (*{}*) 0); done := fd >= 0; errno := Unix.errno(); - IF (~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE))) OR (done & (fd >= fileTabSize)) THEN - IF done & (fd >= fileTabSize) THEN res := Unix.Close(fd) END ; - Kernel.GC(TRUE); - fd := Unix.Open(path, SYSTEM.VAL(INTEGER, Unix.rdwr), (*{}*)0); - done := fd >= 0; errno := Unix.errno(); - IF ~done & ((errno = Unix.ENFILE) OR (errno = Unix.EMFILE)) THEN Err("too many files open", f, errno) END - END ; - IF ~done & ((errno = Unix.EACCES) OR (errno = Unix.EROFS) OR (errno = Unix.EAGAIN)) THEN - (* errno EAGAIN observed on Solaris 2.4 *) - fd := Unix.Open(path, SYSTEM.VAL(INTEGER, Unix.rdonly), (*{}*)0); done := fd >= 0; errno := Unix.errno() - END ; -IF (~done) & (errno # Unix.ENOENT) THEN - Console.String("warning Files.Old "); Console.String(name); - Console.String(" errno = "); Console.Int(errno, 0); Console.Ln; -END ; - IF done THEN - res := Unix.Fstat(fd, stat); - f := CacheEntry(stat.dev, stat.ino, stat.mtime); - IF f # NIL THEN res := Unix.Close(fd); RETURN f - ELSIF fd >= fileTabSize THEN res := Unix.Close(fd); Err("too many files open", f, 0) - ELSE NEW(f); fileTab[fd] := SYSTEM.VAL(LONGINT, f); INC(Kernel.nofiles); Kernel.RegisterObject(f, Finalize); - f.fd := fd; f.state := open; f.len := stat.size; f.pos := 0; f.swapper := -1; (*all f.buf[i] = NIL*) - COPY(name, f.workName); f.registerName := ""; f.tempFile := FALSE; - f.dev := stat.dev; f.ino := stat.ino; f.mtime := stat.mtime; - RETURN f - END - ELSIF dir = "" THEN RETURN NIL - ELSE (*MakeFileName(dir, name, path);*) (*ScanPath(pos, dir)*) - RETURN NIL - END - END - ELSE RETURN NIL - END - END Old; - - PROCEDURE Purge* (f: File); - VAR i: INTEGER; stat: Unix.Status; res: LONGINT; - BEGIN i := 0; - WHILE i < nofbufs DO - IF f.bufs[i] # NIL THEN f.bufs[i].org := -1; f.bufs[i] := NIL END ; - INC(i) - END ; - IF f.fd # noDesc THEN res := Unix.Ftruncate(f.fd, 0); res := Unix.Lseek(f.fd, 0, 0) END ; - f.pos := 0; f.len := 0; f.swapper := -1; - res := Unix.Fstat(f.fd, stat); f.mtime := stat.mtime - END Purge; - - PROCEDURE GetDate* (f: File; VAR t, d: LONGINT); - VAR stat: Unix.Status; clock, res: LONGINT; time: Time; - BEGIN - Create(f); res := Unix.Fstat(f.fd, stat); - time := localtime(stat.mtime); - t := time.sec + ASH(time.min, 6) + ASH(time.hour, 12); - d := time.mday + ASH(time.mon+1, 5) + ASH(time.year MOD 100, 9) - END GetDate; - - PROCEDURE Pos* (VAR r: Rider): LONGINT; - BEGIN RETURN r.org + r.offset - END Pos; - - PROCEDURE Set* (VAR r: Rider; f: File; pos: LONGINT); - VAR org, offset, i, n, res: LONGINT; buf: Buffer; - BEGIN - IF f # NIL THEN - IF pos > f.len THEN pos := f.len ELSIF pos < 0 THEN pos := 0 END ; - offset := pos MOD bufsize; org := pos - offset; i := 0; - WHILE (i < nofbufs) & (f.bufs[i] # NIL) & (org # f.bufs[i].org) DO INC(i) END ; - IF i < nofbufs THEN - IF f.bufs[i] = NIL THEN NEW(buf); buf.chg := FALSE; buf.org := -1; buf.f := f; f.bufs[i] := buf - ELSE buf := f.bufs[i] - END - ELSE - f.swapper := (f.swapper + 1) MOD nofbufs; - buf := f.bufs[f.swapper]; - Flush(buf) - END ; - IF buf.org # org THEN - IF org = f.len THEN buf.size := 0 - ELSE Create(f); - IF f.pos # org THEN res := Unix.Lseek(f.fd, org, 0) END ; - n := Unix.ReadBlk(f.fd, buf.data); - IF n < 0 THEN Err("read from file not done", f, Unix.errno()) END ; - f.pos := org + n; - buf.size := n - END ; - buf.org := org; buf.chg := FALSE - END - ELSE buf := NIL; org := 0; offset := 0 - END ; - r.buf := buf; r.org := org; r.offset := offset; r.eof := FALSE; r.res := 0 - END Set; - - PROCEDURE Read* (VAR r: Rider; VAR x: SYSTEM.BYTE); - VAR offset: LONGINT; buf: Buffer; - BEGIN - buf := r.buf; offset := r.offset; - IF r.org # buf.org THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END ; - IF (offset < buf.size) THEN - x := buf.data[offset]; r.offset := offset + 1 - ELSIF r.org + offset < buf.f.len THEN - Set(r, r.buf.f, r.org + offset); - x := r.buf.data[0]; r.offset := 1 - ELSE - x := 0X; r.eof := TRUE - END - END Read; - - PROCEDURE ReadBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT); - VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; - BEGIN - IF n > LEN(x) THEN IdxTrap END ; - xpos := 0; buf := r.buf; offset := r.offset; - WHILE n > 0 DO - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - restInBuf := buf.size - offset; - IF restInBuf = 0 THEN r.res := n; r.eof := TRUE; RETURN - ELSIF n > restInBuf THEN min := restInBuf ELSE min := n END ; - SYSTEM.MOVE(SYSTEM.ADR(buf.data) + offset, SYSTEM.ADR(x) + xpos, min); - INC(offset, min); r.offset := offset; INC(xpos, min); DEC(n, min) - END ; - r.res := 0; r.eof := FALSE - END ReadBytes; - - PROCEDURE ReadByte* (VAR r : Rider; VAR x : ARRAY OF SYSTEM.BYTE); - BEGIN - ReadBytes(r, x, 1); - END ReadByte; - - PROCEDURE Base* (VAR r: Rider): File; - BEGIN RETURN r.buf.f - END Base; - - PROCEDURE Write* (VAR r: Rider; x: SYSTEM.BYTE); - VAR buf: Buffer; offset: LONGINT; - BEGIN - buf := r.buf; offset := r.offset; - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - buf.data[offset] := x; - buf.chg := TRUE; - IF offset = buf.size THEN - INC(buf.size); INC(buf.f.len) - END ; - r.offset := offset + 1; r.res := 0 - END Write; - - PROCEDURE WriteByte* (VAR r : Rider; x : SYSTEM.BYTE); (* added for compatibility with PO 2013, -- noch *) - BEGIN - Write(r, x); - END WriteByte; - - PROCEDURE WriteBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT); - VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; - BEGIN - IF n > LEN(x) THEN IdxTrap END ; - xpos := 0; buf := r.buf; offset := r.offset; - WHILE n > 0 DO - IF (r.org # buf.org) OR (offset >= bufsize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset - END ; - restInBuf := bufsize - offset; - IF n > restInBuf THEN min := restInBuf ELSE min := n END ; - SYSTEM.MOVE(SYSTEM.ADR(x) + xpos, SYSTEM.ADR(buf.data) + offset, min); - INC(offset, min); r.offset := offset; - IF offset > buf.size THEN INC(buf.f.len, offset - buf.size); buf.size := offset END ; - INC(xpos, min); DEC(n, min); buf.chg := TRUE - END ; - r.res := 0 - END WriteBytes; - -(* another solution would be one that is similar to ReadBytes, WriteBytes. -No code duplication, more symmetric, only two ifs for -Read and Write in buffer, buf.size replaced by bufsize in Write ops, buf.size and len -must be made consistent with offset (if offset > buf.size) in a lazy way. - -PROCEDURE Write* (VAR r: Rider; x: SYSTEM.BYTE); - VAR buf: Buffer; offset: LONGINT; -BEGIN - buf := r.buf; offset := r.offset; - IF (offset >= bufsize) OR (r.org # buf.org) THEN - Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset; - END ; - buf.data[offset] := x; r.offset := offset + 1; buf.chg := TRUE -END Write; - - -PROCEDURE WriteBytes ... - -PROCEDURE Read* (VAR r: Rider; VAR x: SYSTEM.BYTE); - VAR offset: LONGINT; buf: Buffer; -BEGIN - buf := r.buf; offset := r.offset; - IF (offset >= buf.size) OR (r.org # buf.org) THEN - IF r.org + offset >= buf.f.len THEN x := 0X; r.eof := TRUE; RETURN - ELSE Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset - END - END ; - x := buf.data[offset]; r.offset := offset + 1 -END Read; - -but this would also affect Set, Length, and Flush. -Especially Length would become fairly complex. -*) - - PROCEDURE Delete* (name: ARRAY OF CHAR; VAR res: INTEGER); - BEGIN - res := SHORT(Unix.Unlink(name)); - res := SHORT(Unix.errno()) - END Delete; - - PROCEDURE Rename* (old, new: ARRAY OF CHAR; VAR res: INTEGER); - VAR fdold, fdnew: INTEGER; n, errno, r: LONGINT; - ostat, nstat: Unix.Status; - buf: ARRAY 4096 OF CHAR; - BEGIN - r := Unix.Stat(old, ostat); - IF r >= 0 THEN - r := Unix.Stat(new, nstat); - IF (r >= 0) & ((ostat.dev # nstat.dev) OR (ostat.ino # nstat.ino)) THEN - Delete(new, res); (* work around stale nfs handles *) - END ; - r := Unix.Rename(old, new); - IF r < 0 THEN res := SHORT(Unix.errno()); - IF res = Unix.EXDEV THEN (* cross device link, move the file *) - fdold := Unix.Open(old, SYSTEM.VAL(INTEGER, Unix.rdonly), (*{}*)0); - IF fdold < 0 THEN res := 2; RETURN END ; - fdnew := Unix.Open(new, SYSTEM.VAL(INTEGER, Unix.rdwr + Unix.creat + Unix.trunc), SYSTEM.VAL(LONGINT, {2, 4,5, 7,8})); - IF fdnew < 0 THEN r := Unix.Close(fdold); res := 3; RETURN END ; - n := Unix.Read(fdold, SYSTEM.ADR(buf), bufsize); - WHILE n > 0 DO - r := Unix.Write(fdnew, SYSTEM.ADR(buf), n); - IF r < 0 THEN errno := Unix.errno(); r := Unix.Close(fdold); r := Unix.Close(fdnew); - Err("cannot move file", NIL, errno) - END ; - n := Unix.Read(fdold, SYSTEM.ADR(buf), bufsize) - END ; - errno := Unix.errno(); - r := Unix.Close(fdold); r := Unix.Close(fdnew); - IF n = 0 THEN r := Unix.Unlink(old); res := 0 - ELSE Err("cannot move file", NIL, errno) - END ; - ELSE RETURN (* res is Unix.Rename return code *) - END - END ; - res := 0 - ELSE res := 2 (* old file not found *) - END - END Rename; - - PROCEDURE Register* (f: File); - VAR idx, errno: INTEGER; f1: File; file: ARRAY 104 OF CHAR; - BEGIN - IF (f.state = create) & (f.registerName # "") THEN f.state := close (* shortcut renaming *) END ; - Close(f); - IF f.registerName # "" THEN - Rename(f.workName, f.registerName, errno); - IF errno # 0 THEN COPY(f.registerName, file); HALT(99) END ; - f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE - END - END Register; - - PROCEDURE ChangeDirectory*(path: ARRAY OF CHAR; VAR res: INTEGER); - BEGIN - res := SHORT(Unix.Chdir(path)); - getcwd(Kernel.CWD) - END ChangeDirectory; - - PROCEDURE FlipBytes(VAR src, dest: ARRAY OF SYSTEM.BYTE); - VAR i, j: LONGINT; - BEGIN - IF ~Kernel.littleEndian THEN i := LEN(src); j := 0; - WHILE i > 0 DO DEC(i); dest[j] := src[i]; INC(j) END - ELSE SYSTEM.MOVE(SYSTEM.ADR(src), SYSTEM.ADR(dest), LEN(src)) - END - END FlipBytes; - - PROCEDURE ReadBool* (VAR R: Rider; VAR x: BOOLEAN); - BEGIN Read(R, SYSTEM.VAL(CHAR, x)) - END ReadBool; - -(* PROCEDURE ReadInt* (VAR R: Rider; VAR x: INTEGER); - VAR b: ARRAY 2 OF CHAR; - BEGIN ReadBytes(R, b, 2); - x := ORD(b[0]) + ORD(b[1])*256 - END ReadInt; - *) - - PROCEDURE ReadInt* (VAR R: Rider; VAR x: LONGINT); (* to compile OR compiler; -- noch *) - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H - END ReadInt; - - PROCEDURE ReadLInt* (VAR R: Rider; VAR x: LONGINT); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H - END ReadLInt; - - PROCEDURE ReadSet* (VAR R: Rider; VAR x: SET); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); - x := SYSTEM.VAL(SET, ORD(b[0]) + ORD(b[1])*100H + ORD(b[2])*10000H + ORD(b[3])*1000000H) - END ReadSet; - - PROCEDURE ReadReal* (VAR R: Rider; VAR x: REAL); - VAR b: ARRAY 4 OF CHAR; - BEGIN ReadBytes(R, b, 4); FlipBytes(b, x) - END ReadReal; - - PROCEDURE ReadLReal* (VAR R: Rider; VAR x: LONGREAL); - VAR b: ARRAY 8 OF CHAR; - BEGIN ReadBytes(R, b, 8); FlipBytes(b, x) - END ReadLReal; - - PROCEDURE ReadString* (VAR R: Rider; VAR x: ARRAY OF CHAR); - VAR i: INTEGER; ch: CHAR; - BEGIN i := 0; - REPEAT Read(R, ch); x[i] := ch; INC(i) UNTIL ch = 0X - END ReadString; - - (* need to read line; -- noch *) - PROCEDURE ReadLine* (VAR R: Rider; VAR x: ARRAY OF CHAR); - VAR i: INTEGER; ch: CHAR; b : BOOLEAN; - BEGIN i := 0; - b := FALSE; - REPEAT - Read(R, ch); - IF ((ch = 0X) OR (ch = 0AX) OR (ch = 0DX)) THEN - b := TRUE - ELSE - x[i] := ch; - INC(i); - END; - UNTIL b - END ReadLine; - - 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; - - PROCEDURE WriteBool* (VAR R: Rider; x: BOOLEAN); - BEGIN Write(R, SYSTEM.VAL(CHAR, x)) - END WriteBool; - -(* PROCEDURE WriteInt* (VAR R: Rider; x: INTEGER); - VAR b: ARRAY 2 OF CHAR; - BEGIN b[0] := CHR(x); b[1] := CHR(x DIV 256); - WriteBytes(R, b, 2); - END WriteInt; - *) - PROCEDURE WriteInt* (VAR R: Rider; x: LONGINT); (* to compile OR compiler; -- noch *) - VAR b: ARRAY 4 OF CHAR; - BEGIN - b[0] := CHR(x); b[1] := CHR(x DIV 100H); b[2] := CHR(x DIV 10000H); b[3] := CHR(x DIV 1000000H); - WriteBytes(R, b, 4); - END WriteInt; - - PROCEDURE WriteLInt* (VAR R: Rider; x: LONGINT); - VAR b: ARRAY 4 OF CHAR; - BEGIN - b[0] := CHR(x); b[1] := CHR(x DIV 100H); b[2] := CHR(x DIV 10000H); b[3] := CHR(x DIV 1000000H); - WriteBytes(R, b, 4); - END WriteLInt; - - PROCEDURE WriteSet* (VAR R: Rider; x: SET); - VAR b: ARRAY 4 OF CHAR; i: LONGINT; - BEGIN i := SYSTEM.VAL(LONGINT, x); - b[0] := CHR(i); b[1] := CHR(i DIV 100H); b[2] := CHR(i DIV 10000H); b[3] := CHR(i DIV 1000000H); - WriteBytes(R, b, 4); - END WriteSet; - - PROCEDURE WriteReal* (VAR R: Rider; x: REAL); - VAR b: ARRAY 4 OF CHAR; - BEGIN FlipBytes(x, b); WriteBytes(R, b, 4) - END WriteReal; - - PROCEDURE WriteLReal* (VAR R: Rider; x: LONGREAL); - VAR b: ARRAY 8 OF CHAR; - BEGIN FlipBytes(x, b); WriteBytes(R, b, 8) - END WriteLReal; - - PROCEDURE WriteString* (VAR R: Rider; x: ARRAY [1] OF CHAR); - VAR i: INTEGER; - BEGIN i := 0; - WHILE x[i] # 0X DO INC(i) END ; - WriteBytes(R, x, i+1) - END WriteString; - - PROCEDURE WriteNum* (VAR R: Rider; x: LONGINT); - BEGIN - WHILE (x < - 64) OR (x > 63) DO Write(R, CHR(x MOD 128 + 128)); x := x DIV 128 END; - Write(R, CHR(x MOD 128)) - END WriteNum; - - PROCEDURE GetName*(f: File; VAR name: ARRAY OF CHAR); - BEGIN - COPY (f.workName, name); - END GetName; - - PROCEDURE Finalize(o: SYSTEM.PTR); - VAR f: File; res: LONGINT; - BEGIN - f := SYSTEM.VAL(File, o); - IF f.fd >= 0 THEN - fileTab[f.fd] := 0; res := Unix.Close(f.fd); f.fd := -1; DEC(Kernel.nofiles); - IF f.tempFile THEN res := Unix.Unlink(f.workName) END - END - END Finalize; - - PROCEDURE Init; - VAR i: LONGINT; - BEGIN - i := 0; WHILE i < fileTabSize DO fileTab[i] := 0; INC(i) END ; - tempno := -1; Kernel.nofiles := 0 - END Init; - -BEGIN Init -END CompatFiles. From 047d8b94e70cbf2d1ec86c53e06b10208c84a5a0 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 29 Nov 2016 15:00:18 +0400 Subject: [PATCH 011/241] plongrealarray had to be pointer to longrealarray. -- noch --- src/library/ulm/ulmSYSTEM.Mod | 22 ++++++++++++---------- src/library/ulm/ulmTypes.Mod | 8 ++++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/library/ulm/ulmSYSTEM.Mod b/src/library/ulm/ulmSYSTEM.Mod index ece334a7..3d00abab 100644 --- a/src/library/ulm/ulmSYSTEM.Mod +++ b/src/library/ulm/ulmSYSTEM.Mod @@ -8,7 +8,7 @@ TYPE pchar = POINTER TO ARRAY 1 OF CHAR; TYPE bytearray* = ARRAY SIZE(LONGINT) OF SYSTEM.BYTE; (* need this because voc does not convert implicitly LONGINT to ARRAY OF BYTE; -- noch *) pbytearray* = POINTER TO bytearray; TYPE longrealarray* = ARRAY SIZE(LONGREAL) OF SYSTEM.BYTE; (* need this because voc does not convert implicitly LONGINT to ARRAY OF BYTE; -- noch *) - plongrealarray* = POINTER TO bytearray; + plongrealarray* = POINTER TO longrealarray; PROCEDURE LongToByteArr* ( l : LONGINT; VAR bar : bytearray); (* noch *) VAR b : SYSTEM.BYTE; @@ -23,24 +23,26 @@ TYPE pchar = POINTER TO ARRAY 1 OF CHAR; PROCEDURE LRealToByteArr* ( l : LONGREAL; VAR lar : longrealarray); (* noch *) VAR b : SYSTEM.BYTE; + (*adr: SYSTEM.ADDRESS;*) p : plongrealarray; i : LONGINT; BEGIN p := SYSTEM.VAL(plongrealarray, SYSTEM.ADR(l)); FOR i := 0 TO SIZE(LONGREAL) -1 DO - b := p^[i]; lar[i] := b; + b := p^[i]; + lar[i] := b; END + (* + adr := SYSTEM.ADR(l); + i := 0; + REPEAT + SYSTEM.GET(adr + i, b); + lar[i] := b; + INC(i) + UNTIL i = SIZE(LONGREAL);*) END LRealToByteArr; -(* - PROCEDURE -Write(adr, n: LONGINT): LONGINT - "write(1/*stdout*/, adr, n)"; - - PROCEDURE -read(VAR ch: CHAR): LONGINT - "read(0/*stdin*/, ch, 1)"; -*) - PROCEDURE TAS*(VAR flag:BOOLEAN): BOOLEAN; (* added for compatibility with ulmSYSTEM module; noch *) VAR oldflag : BOOLEAN; BEGIN diff --git a/src/library/ulm/ulmTypes.Mod b/src/library/ulm/ulmTypes.Mod index 93bab9fc..0d09a4f5 100644 --- a/src/library/ulm/ulmTypes.Mod +++ b/src/library/ulm/ulmTypes.Mod @@ -55,13 +55,13 @@ MODULE ulmTypes; UntracedAddress* = POINTER[1] TO UntracedAddressDesc; (*SYS.UNTRACEDADDRESS;*) UntracedAddressDesc* = RECORD[1] END; - Count* = LONGINT; + Count* = SYS.INT32; Size* = Count; Byte* = SYS.BYTE; IntAddress* = LONGINT; - Int8* = SHORTINT; - Int16* = INTEGER; (* No real 16 bit integer type *) - Int32* = INTEGER; + Int8* = SYS.INT8; + Int16* = SYS.INT16; + Int32* = SYS.INT32; Real32* = REAL; Real64* = LONGREAL; From 247852e0b7c413cb93e7af370fe3275050f4f3a4 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 29 Nov 2016 16:14:15 +0400 Subject: [PATCH 012/241] fixed overflow in LRealToByteArr; -- noch --- src/library/ulm/ulmSYSTEM.Mod | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/library/ulm/ulmSYSTEM.Mod b/src/library/ulm/ulmSYSTEM.Mod index 3d00abab..796a0d1b 100644 --- a/src/library/ulm/ulmSYSTEM.Mod +++ b/src/library/ulm/ulmSYSTEM.Mod @@ -12,34 +12,30 @@ TYPE pchar = POINTER TO ARRAY 1 OF CHAR; PROCEDURE LongToByteArr* ( l : LONGINT; VAR bar : bytearray); (* noch *) VAR b : SYSTEM.BYTE; - p : pbytearray; + adr : SYSTEM.ADDRESS; i : LONGINT; BEGIN - p := SYSTEM.VAL(pbytearray, SYSTEM.ADR(l)); - FOR i := 0 TO SIZE(LONGINT) -1 DO - b := p^[i]; bar[i] := b; - END + adr := SYSTEM.ADR(l); + i := 0; + REPEAT + SYSTEM.GET(adr + i, b); + lar[i] := b; + INC(i) + UNTIL i = SIZE(LONGINT) END LongToByteArr; PROCEDURE LRealToByteArr* ( l : LONGREAL; VAR lar : longrealarray); (* noch *) VAR b : SYSTEM.BYTE; - (*adr: SYSTEM.ADDRESS;*) - p : plongrealarray; + adr: SYSTEM.ADDRESS; i : LONGINT; BEGIN - p := SYSTEM.VAL(plongrealarray, SYSTEM.ADR(l)); - FOR i := 0 TO SIZE(LONGREAL) -1 DO - b := p^[i]; - lar[i] := b; - END - (* adr := SYSTEM.ADR(l); i := 0; REPEAT SYSTEM.GET(adr + i, b); lar[i] := b; INC(i) - UNTIL i = SIZE(LONGREAL);*) + UNTIL i = SIZE(LONGREAL); END LRealToByteArr; From c549f5847be7a73665e765f34dd2b250f19fafd9 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 29 Nov 2016 16:45:18 +0400 Subject: [PATCH 013/241] fixed Longint to Byte Arr function; -- noch --- src/library/ulm/ulmPrint.Mod | 1294 ++++++++++++++++----------------- src/library/ulm/ulmSYSTEM.Mod | 3 +- src/library/ulm/ulmTypes.Mod | 74 +- 3 files changed, 682 insertions(+), 689 deletions(-) diff --git a/src/library/ulm/ulmPrint.Mod b/src/library/ulm/ulmPrint.Mod index 756a3813..42f5a7fe 100644 --- a/src/library/ulm/ulmPrint.Mod +++ b/src/library/ulm/ulmPrint.Mod @@ -35,7 +35,7 @@ ---------------------------------------------------------------------------- *) -MODULE ulmPrint; +MODULE Print; (* formatted printing; Print.F[0-9] prints to Streams.stdout @@ -57,13 +57,13 @@ MODULE ulmPrint; ErrorCode* = SHORTINT; ErrorEvent* = POINTER TO ErrorEventRec; ErrorEventRec* = - RECORD - (Events.EventRec) - errorcode*: ErrorCode; - format*: FormatString; - errpos*: LONGINT; - nargs*: INTEGER; - END; + RECORD + (Events.EventRec) + errorcode*: ErrorCode; + format*: FormatString; + errpos*: LONGINT; + nargs*: INTEGER; + END; VAR error*: Events.EventType; errormsg*: ARRAY errors OF Events.Message; @@ -77,887 +77,883 @@ MODULE ulmPrint; errormsg[tooFewArgs] := "too few arguments given"; errormsg[badFormat] := "syntax error in format string"; errormsg[badArgumentSize] := - "size of argument doesn't conform to the corresponding format element"; + "size of argument doesn't conform to the corresponding format element"; END InitErrorHandling; PROCEDURE Out(out: Streams.Stream; VAR fmt: ARRAY OF CHAR; nargs: INTEGER; - VAR p1,p2,p3,p4,p5,p6,p7,p8,p9: ARRAY OF SYS.BYTE; - errors: RelatedEvents.Object); + VAR p1,p2,p3,p4,p5,p6,p7,p8,p9: ARRAY OF BYTE; + errors: RelatedEvents.Object); CONST - maxargs = 9; (* maximal number of arguments *) - maxargsize = SIZE(LONGREAL); (* maximal arg size (except strings) *) - fmtcmd = "%"; - escape = "\"; + maxargs = 9; (* maximal number of arguments *) + maxargsize = SIZE(LONGREAL); (* maximal arg size (except strings) *) + fmtcmd = "%"; + escape = "\"; VAR - arglen: ARRAY maxargs OF LONGINT; - nextarg: INTEGER; - fmtindex: LONGINT; - fmtchar: CHAR; - hexcharval: LONGINT; + arglen: ARRAY maxargs OF LONGINT; + nextarg: INTEGER; + fmtindex: LONGINT; + fmtchar: CHAR; + hexcharval: LONGINT; PROCEDURE Error(errorcode: ErrorCode); - VAR - event: ErrorEvent; + VAR + event: ErrorEvent; BEGIN - NEW(event); - event.type := error; - event.message := errormsg[errorcode]; - event.errorcode := errorcode; - COPY(fmt, event.format); - event.errpos := fmtindex; - event.nargs := nargs; - RelatedEvents.Raise(errors, event); + NEW(event); + event.type := error; + event.message := errormsg[errorcode]; + event.errorcode := errorcode; + COPY(fmt, event.format); + event.errpos := fmtindex; + event.nargs := nargs; + RelatedEvents.Raise(errors, event); END Error; PROCEDURE Next() : BOOLEAN; BEGIN - IF fmtindex < LEN(fmt) THEN - fmtchar := fmt[fmtindex]; INC(fmtindex); - IF fmtchar = 0X THEN - fmtindex := LEN(fmt); - RETURN FALSE - ELSE - RETURN TRUE - END; - ELSE - RETURN FALSE - END; + IF fmtindex < LEN(fmt) THEN + fmtchar := fmt[fmtindex]; INC(fmtindex); + IF fmtchar = 0X THEN + fmtindex := LEN(fmt); + RETURN FALSE + ELSE + RETURN TRUE + END; + ELSE + RETURN FALSE + END; END Next; PROCEDURE Unget; BEGIN - IF (fmtindex > 0) & (fmtindex < LEN(fmt)) THEN - DEC(fmtindex); fmtchar := fmt[fmtindex]; - ELSE - fmtchar := 0X; - END; + IF (fmtindex > 0) & (fmtindex < LEN(fmt)) THEN + DEC(fmtindex); fmtchar := fmt[fmtindex]; + ELSE + fmtchar := 0X; + END; END Unget; - PROCEDURE Write(byte: SYS.BYTE); + PROCEDURE Write(byte: BYTE); BEGIN - IF Streams.WriteByte(out, byte) THEN - INC(out.count); - END; + IF Streams.WriteByte(out, byte) THEN + INC(out.count); + END; END Write; PROCEDURE WriteLn; - VAR - lineterm: StreamDisciplines.LineTerminator; - i: INTEGER; + VAR + lineterm: StreamDisciplines.LineTerminator; + i: INTEGER; BEGIN - StreamDisciplines.GetLineTerm(out, lineterm); - Write(lineterm[0]); - i := 1; - WHILE (i < LEN(lineterm)) & (lineterm[i] # 0X) DO - Write(lineterm[i]); INC(i); - END; + StreamDisciplines.GetLineTerm(out, lineterm); + Write(lineterm[0]); + i := 1; + WHILE (i < LEN(lineterm)) & (lineterm[i] # 0X) DO + Write(lineterm[i]); INC(i); + END; END WriteLn; PROCEDURE Int(VAR int: LONGINT; base: INTEGER) : BOOLEAN; - PROCEDURE ValidDigit(ch: CHAR) : BOOLEAN; - BEGIN - RETURN (ch >= "0") & (ch <= "9") OR - (base = 16) & (CAP(ch) >= "A") & (CAP(ch) <= "F") - END ValidDigit; + PROCEDURE ValidDigit(ch: CHAR) : BOOLEAN; + BEGIN + RETURN (ch >= "0") & (ch <= "9") OR + (base = 16) & (CAP(ch) >= "A") & (CAP(ch) <= "F") + END ValidDigit; BEGIN - int := 0; - REPEAT - int := int * base; - IF (fmtchar >= "0") & (fmtchar <= "9") THEN - INC(int, LONG(ORD(fmtchar) - ORD("0"))); - ELSIF (base = 16) & - (CAP(fmtchar) >= "A") & (CAP(fmtchar) <= "F") THEN - INC(int, LONG(10 + ORD(CAP(fmtchar)) - ORD("A"))); - ELSE - RETURN FALSE - END; - UNTIL ~Next() OR ~ValidDigit(fmtchar); - RETURN TRUE + int := 0; + REPEAT + int := int * base; + IF (fmtchar >= "0") & (fmtchar <= "9") THEN + INC(int, ORD(fmtchar) - ORD("0")); + ELSIF (base = 16) & + (CAP(fmtchar) >= "A") & (CAP(fmtchar) <= "F") THEN + INC(int, 10 + ORD(CAP(fmtchar)) - ORD("A")); + ELSE + RETURN FALSE + END; + UNTIL ~Next() OR ~ValidDigit(fmtchar); + RETURN TRUE END Int; PROCEDURE SetSize; - VAR - index: INTEGER; + VAR + index: INTEGER; BEGIN - index := 0; - WHILE index < nargs DO - CASE index OF - | 0: arglen[index] := LEN(p1); - | 1: arglen[index] := LEN(p2); - | 2: arglen[index] := LEN(p3); - | 3: arglen[index] := LEN(p4); - | 4: arglen[index] := LEN(p5); - | 5: arglen[index] := LEN(p6); - | 6: arglen[index] := LEN(p7); - | 7: arglen[index] := LEN(p8); - | 8: arglen[index] := LEN(p9); - ELSE - END; - INC(index); - END; + index := 0; + WHILE index < nargs DO + CASE index OF + | 0: arglen[index] := LEN(p1); + | 1: arglen[index] := LEN(p2); + | 2: arglen[index] := LEN(p3); + | 3: arglen[index] := LEN(p4); + | 4: arglen[index] := LEN(p5); + | 5: arglen[index] := LEN(p6); + | 6: arglen[index] := LEN(p7); + | 7: arglen[index] := LEN(p8); + | 8: arglen[index] := LEN(p9); + END; + INC(index); + END; END SetSize; - PROCEDURE Access(par: INTEGER; at: LONGINT) : SYS.BYTE; + PROCEDURE Access(par: INTEGER; at: LONGINT) : BYTE; BEGIN - CASE par OF - | 0: RETURN p1[at] - | 1: RETURN p2[at] - | 2: RETURN p3[at] - | 3: RETURN p4[at] - | 4: RETURN p5[at] - | 5: RETURN p6[at] - | 6: RETURN p7[at] - | 7: RETURN p8[at] - | 8: RETURN p9[at] - ELSE - END; + CASE par OF + | 0: RETURN p1[at] + | 1: RETURN p2[at] + | 2: RETURN p3[at] + | 3: RETURN p4[at] + | 4: RETURN p5[at] + | 5: RETURN p6[at] + | 6: RETURN p7[at] + | 7: RETURN p8[at] + | 8: RETURN p9[at] + END; END Access; - PROCEDURE Convert(from: INTEGER; VAR to: ARRAY OF SYS.BYTE); - VAR i: INTEGER; + PROCEDURE Convert(from: INTEGER; VAR to: ARRAY OF BYTE); + VAR i: INTEGER; BEGIN - i := 0; - WHILE i < arglen[from] DO - to[i] := Access(from, i); INC(i); - END; + i := 0; + WHILE i < arglen[from] DO + to[i] := Access(from, i); INC(i); + END; END Convert; PROCEDURE GetInt(index: INTEGER; VAR long: LONGINT) : BOOLEAN; - (* access index-th parameter (counted from 0); - fails if arglen[index] > SIZE(LONGINT) - *) - VAR - short: SHORTINT; - (*int16: SYS.INT16;*) - int: INTEGER; - + (* access index-th parameter (counted from 0); + fails if arglen[index] > SYS.SIZE(LONGINT) + *) + VAR + short: SHORTINT; + int16: SYS.INT16; + int: INTEGER; + BEGIN - IF arglen[index] = SIZE(SHORTINT) THEN - Convert(index, short); long := short; - (*ELSIF arglen[index] = SIZE(SYS.INT16) THEN - Convert(index, int16); long := int16;*) - ELSIF arglen[index] = SIZE(INTEGER) THEN - Convert(index, int); long := int; - ELSIF arglen[index] = SIZE(LONGINT) THEN - Convert(index, long); - ELSE - Error(badArgumentSize); - RETURN FALSE - END; - RETURN TRUE + IF arglen[index] = SIZE(SHORTINT) THEN + Convert(index, short); long := short; + ELSIF arglen[index] = SIZE(SYS.INT16) THEN + Convert(index, int16); long := int16; + ELSIF arglen[index] = SIZE(INTEGER) THEN + Convert(index, int); long := int; + ELSIF arglen[index] = SIZE(LONGINT) THEN + Convert(index, long); + ELSE + Error(badArgumentSize); + RETURN FALSE + END; + RETURN TRUE END GetInt; PROCEDURE Format() : BOOLEAN; - VAR - fillch: CHAR; (* filling character *) - insert: BOOLEAN; (* insert between sign and 1st digit *) - sign: BOOLEAN; (* sign even positive values *) - leftaligned: BOOLEAN; (* output left aligned *) - width, scale: LONGINT; + VAR + fillch: CHAR; (* filling character *) + insert: BOOLEAN; (* insert between sign and 1st digit *) + sign: BOOLEAN; (* sign even positive values *) + leftaligned: BOOLEAN; (* output left aligned *) + width, scale: LONGINT; - PROCEDURE NextArg(VAR index: INTEGER) : BOOLEAN; - BEGIN - IF nextarg < nargs THEN - index := nextarg; INC(nextarg); RETURN TRUE - ELSE - RETURN FALSE - END; - END NextArg; + PROCEDURE NextArg(VAR index: INTEGER) : BOOLEAN; + BEGIN + IF nextarg < nargs THEN + index := nextarg; INC(nextarg); RETURN TRUE + ELSE + RETURN FALSE + END; + END NextArg; - PROCEDURE Flags() : BOOLEAN; - BEGIN - fillch := " "; insert := FALSE; sign := FALSE; - leftaligned := FALSE; - REPEAT - CASE fmtchar OF - | "+": sign := TRUE; - | "0": fillch := "0"; insert := TRUE; - | "-": leftaligned := TRUE; - | "^": insert := TRUE; - | "\": IF ~Next() THEN RETURN FALSE END; fillch := fmtchar; - ELSE - RETURN TRUE - END; - UNTIL ~Next(); - Error(badFormat); - RETURN FALSE (* unexpected end *) - END Flags; + PROCEDURE Flags() : BOOLEAN; + BEGIN + fillch := " "; insert := FALSE; sign := FALSE; + leftaligned := FALSE; + REPEAT + CASE fmtchar OF + | "+": sign := TRUE; + | "0": fillch := "0"; insert := TRUE; + | "-": leftaligned := TRUE; + | "^": insert := TRUE; + | "\": IF ~Next() THEN RETURN FALSE END; fillch := fmtchar; + ELSE + RETURN TRUE + END; + UNTIL ~Next(); + Error(badFormat); + RETURN FALSE (* unexpected end *) + END Flags; - PROCEDURE FetchInt(VAR int: LONGINT) : BOOLEAN; - VAR - index: INTEGER; - BEGIN - RETURN (fmtchar = "*") & Next() & - NextArg(index) & GetInt(index, int) OR - Int(int, 10) & (int >= 0) - END FetchInt; + PROCEDURE FetchInt(VAR int: LONGINT) : BOOLEAN; + VAR + index: INTEGER; + BEGIN + RETURN (fmtchar = "*") & Next() & + NextArg(index) & GetInt(index, int) OR + Int(int, 10) & (int >= 0) + END FetchInt; - PROCEDURE Width() : BOOLEAN; - BEGIN - IF (fmtchar >= "0") & (fmtchar <= "9") OR (fmtchar = "*") THEN - IF FetchInt(width) THEN - RETURN TRUE - END; - Error(badFormat); RETURN FALSE - ELSE - width := 0; - RETURN TRUE - END; - END Width; + PROCEDURE Width() : BOOLEAN; + BEGIN + IF (fmtchar >= "0") & (fmtchar <= "9") OR (fmtchar = "*") THEN + IF FetchInt(width) THEN + RETURN TRUE + END; + Error(badFormat); RETURN FALSE + ELSE + width := 0; + RETURN TRUE + END; + END Width; - PROCEDURE Scale() : BOOLEAN; - BEGIN - IF fmtchar = "." THEN - IF Next() & FetchInt(scale) THEN - RETURN TRUE - ELSE - Error(badFormat); RETURN FALSE - END; - ELSE - scale := -1; RETURN TRUE - END; - END Scale; + PROCEDURE Scale() : BOOLEAN; + BEGIN + IF fmtchar = "." THEN + IF Next() & FetchInt(scale) THEN + RETURN TRUE + ELSE + Error(badFormat); RETURN FALSE + END; + ELSE + scale := -1; RETURN TRUE + END; + END Scale; - PROCEDURE Conversion() : BOOLEAN; + PROCEDURE Conversion() : BOOLEAN; - PROCEDURE Fill(cnt: LONGINT); - (* cnt: space used by normal output *) - VAR i: LONGINT; - BEGIN - IF cnt < width THEN - i := width - cnt; - WHILE i > 0 DO - Write(fillch); - DEC(i); - END; - END; - END Fill; + PROCEDURE Fill(cnt: LONGINT); + (* cnt: space used by normal output *) + VAR i: LONGINT; + BEGIN + IF cnt < width THEN + i := width - cnt; + WHILE i > 0 DO + Write(fillch); + DEC(i); + END; + END; + END Fill; - PROCEDURE FillLeft(cnt: LONGINT); - BEGIN - IF ~leftaligned THEN - Fill(cnt); - END; - END FillLeft; + PROCEDURE FillLeft(cnt: LONGINT); + BEGIN + IF ~leftaligned THEN + Fill(cnt); + END; + END FillLeft; - PROCEDURE FillRight(cnt: LONGINT); - BEGIN - IF leftaligned THEN - Fill(cnt); - END; - END FillRight; + PROCEDURE FillRight(cnt: LONGINT); + BEGIN + IF leftaligned THEN + Fill(cnt); + END; + END FillRight; - PROCEDURE WriteBool(true, false: ARRAY OF CHAR) : BOOLEAN; - VAR index: INTEGER; val: LONGINT; + PROCEDURE WriteBool(true, false: ARRAY OF CHAR) : BOOLEAN; + VAR index: INTEGER; val: LONGINT; - PROCEDURE WriteString(VAR s: ARRAY OF CHAR); - VAR i, len: INTEGER; - BEGIN - len := 0; - WHILE (len < LEN(s)) & (s[len] # 0X) DO - INC(len); - END; - FillLeft(len); - i := 0; - WHILE i < len DO - Write(s[i]); INC(i); - END; - FillRight(len); - END WriteString; + PROCEDURE WriteString(VAR s: ARRAY OF CHAR); + VAR i, len: INTEGER; + BEGIN + len := 0; + WHILE (len < LEN(s)) & (s[len] # 0X) DO + INC(len); + END; + FillLeft(len); + i := 0; + WHILE i < len DO + Write(s[i]); INC(i); + END; + FillRight(len); + END WriteString; - BEGIN - IF NextArg(index) & GetInt(index, val) THEN - IF val = 0 THEN - WriteString(false); RETURN TRUE - ELSIF val = 1 THEN - WriteString(true); RETURN TRUE - END; - END; - RETURN FALSE - END WriteBool; + BEGIN + IF NextArg(index) & GetInt(index, val) THEN + IF val = 0 THEN + WriteString(false); RETURN TRUE + ELSIF val = 1 THEN + WriteString(true); RETURN TRUE + END; + END; + RETURN FALSE + END WriteBool; - PROCEDURE WriteChar() : BOOLEAN; - VAR - val: LONGINT; - index: INTEGER; - BEGIN - IF NextArg(index) & GetInt(index, val) & - (val >= 0) & (val <= ORD(MAX(CHAR))) THEN - FillLeft(1); - Write(CHR(val)); - FillRight(1); - RETURN TRUE - END; - RETURN FALSE - END WriteChar; + PROCEDURE WriteChar() : BOOLEAN; + VAR + val: LONGINT; + index: INTEGER; + BEGIN + IF NextArg(index) & GetInt(index, val) & + (val >= 0) & (val <= ORD(MAX(CHAR))) THEN + FillLeft(1); + Write(CHR(val)); + FillRight(1); + RETURN TRUE + END; + RETURN FALSE + END WriteChar; - PROCEDURE WriteInt(base: INTEGER) : BOOLEAN; - VAR - index: INTEGER; - val: LONGINT; - neg: BOOLEAN; (* set by Convert *) - buf: ARRAY 12 OF CHAR; (* filled by Convert *) - i: INTEGER; - len: INTEGER; (* space needed for val *) - signcnt: INTEGER; (* =1 if sign printed; else 0 *) - signch: CHAR; + PROCEDURE WriteInt(base: INTEGER) : BOOLEAN; + VAR + index: INTEGER; + val: LONGINT; + neg: BOOLEAN; (* set by Convert *) + buf: ARRAY 12 OF CHAR; (* filled by Convert *) + i: INTEGER; + len: INTEGER; (* space needed for val *) + signcnt: INTEGER; (* =1 if sign printed; else 0 *) + signch: CHAR; - PROCEDURE Convert; - VAR - index: INTEGER; - digit: LONGINT; - BEGIN - neg := val < 0; - index := 0; - REPEAT - digit := val MOD base; - val := val DIV base; - IF neg & (digit > 0) THEN - digit := base - digit; - INC(val); - END; - IF digit < 10 THEN - buf[index] := CHR(ORD("0") + digit); - ELSE - buf[index] := CHR(ORD("A") + digit - 10); - END; - INC(index); - UNTIL val = 0; - len := index; - END Convert; + PROCEDURE Convert; + VAR + index: INTEGER; + digit: LONGINT; + BEGIN + neg := val < 0; + index := 0; + REPEAT + digit := val MOD base; + val := val DIV base; + IF neg & (digit > 0) THEN + digit := base - digit; + INC(val); + END; + IF digit < 10 THEN + buf[index] := CHR(ORD("0") + digit); + ELSE + buf[index] := CHR(ORD("A") + digit - 10); + END; + INC(index); + UNTIL val = 0; + len := index; + END Convert; - BEGIN (* WriteInt *) - IF NextArg(index) & GetInt(index, val) THEN - Convert; - IF sign OR neg THEN - signcnt := 1; - IF neg THEN - signch := "-"; - ELSE - signch := "+"; - END; - ELSE - signcnt := 0; - END; - IF insert & (signcnt = 1) THEN - Write(signch); - END; - FillLeft(len+signcnt); - IF ~insert & (signcnt = 1) THEN - Write(signch); - END; - i := len; - WHILE i > 0 DO - DEC(i); Write(buf[i]); - END; - FillRight(len+signcnt); - RETURN TRUE - END; - RETURN FALSE - END WriteInt; + BEGIN (* WriteInt *) + IF NextArg(index) & GetInt(index, val) THEN + Convert; + IF sign OR neg THEN + signcnt := 1; + IF neg THEN + signch := "-"; + ELSE + signch := "+"; + END; + ELSE + signcnt := 0; + END; + IF insert & (signcnt = 1) THEN + Write(signch); + END; + FillLeft(len+signcnt); + IF ~insert & (signcnt = 1) THEN + Write(signch); + END; + i := len; + WHILE i > 0 DO + DEC(i); Write(buf[i]); + END; + FillRight(len+signcnt); + RETURN TRUE + END; + RETURN FALSE + END WriteInt; - PROCEDURE WriteReal(format: CHAR) : BOOLEAN; - (* format either "f", "e", or "g" *) - CONST - defaultscale = 6; - VAR - index: INTEGER; - lr: LONGREAL; - r: REAL; - shortint: SHORTINT; int: INTEGER; longint: LONGINT; - (*int16: SYS.INT16;*) - long: BOOLEAN; - exponent: INTEGER; - mantissa: LONGREAL; - digits: ARRAY Reals.maxlongdignum OF CHAR; - neg: BOOLEAN; - ndigits: INTEGER; - decpt: INTEGER; + PROCEDURE WriteReal(format: CHAR) : BOOLEAN; + (* format either "f", "e", or "g" *) + CONST + defaultscale = 6; + VAR + index: INTEGER; + lr: LONGREAL; + r: REAL; + shortint: SHORTINT; int: INTEGER; longint: LONGINT; + int16: SYS.INT16; + long: BOOLEAN; + exponent: INTEGER; + mantissa: LONGREAL; + digits: ARRAY Reals.maxlongdignum OF CHAR; + neg: BOOLEAN; + ndigits: INTEGER; + decpt: INTEGER; - PROCEDURE Print(decpt: INTEGER; withexp: BOOLEAN; exp: INTEGER); - (* decpt: position of decimal point - = 0: just before the digits - > 0: after decpt digits - < 0: ABS(decpt) zeroes before digits needed - *) - VAR - needed: INTEGER; (* space needed *) - index: INTEGER; - count: LONGINT; + PROCEDURE Print(decpt: INTEGER; withexp: BOOLEAN; exp: INTEGER); + (* decpt: position of decimal point + = 0: just before the digits + > 0: after decpt digits + < 0: ABS(decpt) zeroes before digits needed + *) + VAR + needed: INTEGER; (* space needed *) + index: INTEGER; + count: LONGINT; - PROCEDURE WriteExp(exp: INTEGER); - CONST - base = 10; - VAR - power: INTEGER; - digit: INTEGER; - BEGIN - IF long THEN - Write("D"); - ELSE - Write("E"); - END; - IF exp < 0 THEN - Write("-"); exp := - exp; - ELSE - Write("+"); - END; - IF long THEN - power := 1000; - ELSE - power := 100; - END; - WHILE power > 0 DO - digit := (exp DIV power) MOD base; - Write(CHR(digit+ORD("0"))); - power := power DIV base; - END; - END WriteExp; + PROCEDURE WriteExp(exp: INTEGER); + CONST + base = 10; + VAR + power: INTEGER; + digit: INTEGER; + BEGIN + IF long THEN + Write("D"); + ELSE + Write("E"); + END; + IF exp < 0 THEN + Write("-"); exp := - exp; + ELSE + Write("+"); + END; + IF long THEN + power := 1000; + ELSE + power := 100; + END; + WHILE power > 0 DO + digit := (exp DIV power) MOD base; + Write(CHR(digit+ORD("0"))); + power := power DIV base; + END; + END WriteExp; - BEGIN (* Print *) - (* leading digits *) - IF decpt > 0 THEN - needed := decpt; - ELSE - needed := 1; - END; - IF neg OR sign THEN - INC(needed); - END; - IF withexp OR (scale # 0) THEN - INC(needed); (* decimal point *) - END; - IF withexp THEN - INC(needed, 2); (* E[+-] *) - IF long THEN - INC(needed, 4); - ELSE - INC(needed, 3); - END; - END; - INC(needed, SHORT(scale)); + BEGIN (* Print *) + (* leading digits *) + IF decpt > 0 THEN + needed := decpt; + ELSE + needed := 1; + END; + IF neg OR sign THEN + INC(needed); + END; + IF withexp OR (scale # 0) THEN + INC(needed); (* decimal point *) + END; + IF withexp THEN + INC(needed, 2); (* E[+-] *) + IF long THEN + INC(needed, 4); + ELSE + INC(needed, 3); + END; + END; + INC(needed, scale); - FillLeft(needed); - IF neg THEN - Write("-"); - ELSIF sign THEN - Write("+"); - END; - IF decpt <= 0 THEN - Write("0"); - ELSE - index := 0; - WHILE index < decpt DO - IF index < ndigits THEN - Write(digits[index]); - ELSE - Write("0"); - END; - INC(index); - END; - END; - IF withexp OR (scale > 0) THEN - Write("."); - END; - IF scale > 0 THEN - count := scale; - index := decpt; - WHILE (index < 0) & (count > 0) DO - Write("0"); INC(index); DEC(count); - END; - WHILE (index < ndigits) & (count > 0) DO - Write(digits[index]); INC(index); DEC(count); - END; - WHILE count > 0 DO - Write("0"); DEC(count); - END; - END; - IF withexp THEN - WriteExp(exp); - END; - FillRight(needed); - END Print; + FillLeft(needed); + IF neg THEN + Write("-"); + ELSIF sign THEN + Write("+"); + END; + IF decpt <= 0 THEN + Write("0"); + ELSE + index := 0; + WHILE index < decpt DO + IF index < ndigits THEN + Write(digits[index]); + ELSE + Write("0"); + END; + INC(index); + END; + END; + IF withexp OR (scale > 0) THEN + Write("."); + END; + IF scale > 0 THEN + count := scale; + index := decpt; + WHILE (index < 0) & (count > 0) DO + Write("0"); INC(index); DEC(count); + END; + WHILE (index < ndigits) & (count > 0) DO + Write(digits[index]); INC(index); DEC(count); + END; + WHILE count > 0 DO + Write("0"); DEC(count); + END; + END; + IF withexp THEN + WriteExp(exp); + END; + FillRight(needed); + END Print; - BEGIN (* WriteReal *) - IF NextArg(index) THEN - IF arglen[index] = SIZE(LONGREAL) THEN - long := TRUE; - Convert(index, lr); - ELSIF arglen[index] = SIZE(REAL) THEN - long := FALSE; - Convert(index, r); - lr := r; - ELSIF arglen[index] = SIZE(LONGINT) THEN - long := FALSE; - Convert(index, longint); - lr := longint; - ELSIF arglen[index] = SIZE(INTEGER) THEN - long := FALSE; - Convert(index, int); - lr := int; - (*ELSIF arglen[index] = SIZE(SYS.INT16) THEN - long := FALSE; - Convert(index, int16); - lr := int16;*) - ELSIF arglen[index] = SIZE(SHORTINT) THEN - long := FALSE; - Convert(index, shortint); - lr := shortint; - ELSE - Error(badArgumentSize); RETURN FALSE - END; - IF scale = -1 THEN - scale := defaultscale; - END; - (* check for NaNs and other invalid numbers *) - IF ~IEEE.Valid(lr) THEN - IF IEEE.NotANumber(lr) THEN - Write("N"); Write("a"); Write("N"); - RETURN TRUE - ELSE - IF lr < 0 THEN - Write("-"); - ELSE - Write("+"); - END; - Write("i"); Write("n"); Write("f"); - END; - RETURN TRUE - END; - (* real value in `lr' *) - Reals.ExpAndMan(lr, long, 10, exponent, mantissa); - CASE format OF - | "e": ndigits := SHORT(scale)+1; - | "f": ndigits := SHORT(scale)+exponent+1; - IF ndigits <= 0 THEN - ndigits := 1; - END; - | "g": ndigits := SHORT(scale); - ELSE - END; - Reals.Digits(mantissa, 10, digits, neg, - (* force = *) format # "g", ndigits); - decpt := 1; - CASE format OF - | "e": Print(decpt, (* withexp = *) TRUE, exponent); - | "f": INC(decpt, exponent); - Print(decpt, (* withexp = *) FALSE, 0); - | "g": IF (exponent < -4) OR (exponent > scale) THEN - scale := ndigits-1; - Print(decpt, (* withexp = *) TRUE, exponent); - ELSE - INC(decpt, exponent); - scale := ndigits-1; - DEC(scale, LONG(exponent)); - IF scale < 0 THEN - scale := 0; - END; - Print(decpt, (* withexp = *) FALSE, 0); - END; - ELSE - END; - RETURN TRUE - ELSE - RETURN FALSE - END; - END WriteReal; + BEGIN (* WriteReal *) + IF NextArg(index) THEN + IF arglen[index] = SIZE(LONGREAL) THEN + long := TRUE; + Convert(index, lr); + ELSIF arglen[index] = SIZE(REAL) THEN + long := FALSE; + Convert(index, r); + lr := r; + ELSIF arglen[index] = SIZE(LONGINT) THEN + long := FALSE; + Convert(index, longint); + lr := longint; + ELSIF arglen[index] = SIZE(INTEGER) THEN + long := FALSE; + Convert(index, int); + lr := int; + ELSIF arglen[index] = SIZE(SYS.INT16) THEN + long := FALSE; + Convert(index, int16); + lr := int16; + ELSIF arglen[index] = SIZE(SHORTINT) THEN + long := FALSE; + Convert(index, shortint); + lr := shortint; + ELSE + Error(badArgumentSize); RETURN FALSE + END; + IF scale = -1 THEN + scale := defaultscale; + END; + (* check for NaNs and other invalid numbers *) + IF ~IEEE.Valid(lr) THEN + IF IEEE.NotANumber(lr) THEN + Write("N"); Write("a"); Write("N"); + RETURN TRUE + ELSE + IF lr < 0 THEN + Write("-"); + ELSE + Write("+"); + END; + Write("i"); Write("n"); Write("f"); + END; + RETURN TRUE + END; + (* real value in `lr' *) + Reals.ExpAndMan(lr, long, 10, exponent, mantissa); + CASE format OF + | "e": ndigits := SHORT(scale)+1; + | "f": ndigits := SHORT(scale)+exponent+1; + IF ndigits <= 0 THEN + ndigits := 1; + END; + | "g": ndigits := SHORT(scale); + END; + Reals.Digits(mantissa, 10, digits, neg, + (* force = *) format # "g", ndigits); + decpt := 1; + CASE format OF + | "e": Print(decpt, (* withexp = *) TRUE, exponent); + | "f": INC(decpt, exponent); + Print(decpt, (* withexp = *) FALSE, 0); + | "g": IF (exponent < -4) OR (exponent > scale) THEN + scale := ndigits-1; + Print(decpt, (* withexp = *) TRUE, exponent); + ELSE + INC(decpt, exponent); + scale := ndigits-1; + DEC(scale, exponent); + IF scale < 0 THEN + scale := 0; + END; + Print(decpt, (* withexp = *) FALSE, 0); + END; + END; + RETURN TRUE + ELSE + RETURN FALSE + END; + END WriteReal; - PROCEDURE WriteString() : BOOLEAN; - VAR - index: INTEGER; - i: LONGINT; - byte: SYS.BYTE; - len: LONGINT; - BEGIN - IF NextArg(index) THEN - len := 0; - WHILE (len < arglen[index]) & - ((scale = -1) OR (len < scale)) & - ((*CHR*)SYS.VAL(CHAR, (Access(index, len))) # 0X) DO - INC(len); - END; - FillLeft(len); - i := 0; - WHILE i < len DO - byte := Access(index, i); - Write(byte); - INC(i); - END; - FillRight(len); - RETURN TRUE - END; - RETURN FALSE - END WriteString; + PROCEDURE WriteString() : BOOLEAN; + VAR + index: INTEGER; + i: LONGINT; + byte: BYTE; + len: LONGINT; + BEGIN + IF NextArg(index) THEN + len := 0; + WHILE (len < arglen[index]) & + ((scale = -1) OR (len < scale)) & + (CHR(Access(index, len)) # 0X) DO + INC(len); + END; + FillLeft(len); + i := 0; + WHILE i < len DO + byte := Access(index, i); + Write(byte); + INC(i); + END; + FillRight(len); + RETURN TRUE + END; + RETURN FALSE + END WriteString; - BEGIN (* Conversion *) - CASE fmtchar OF - | "b": RETURN WriteBool("TRUE", "FALSE") - | "c": RETURN WriteChar() - | "d": RETURN WriteInt(10) - | "e", - "f", - "g": RETURN WriteReal(fmtchar) - | "j": RETURN WriteBool("ja", "nein") - | "o": RETURN WriteInt(8) - | "s": RETURN WriteString() - | "x": RETURN WriteInt(16) - | "y": RETURN WriteBool("yes", "no") - ELSE - Error(badFormat); RETURN FALSE - END; - END Conversion; + BEGIN (* Conversion *) + CASE fmtchar OF + | "b": RETURN WriteBool("TRUE", "FALSE") + | "c": RETURN WriteChar() + | "d": RETURN WriteInt(10) + | "e", + "f", + "g": RETURN WriteReal(fmtchar) + | "j": RETURN WriteBool("ja", "nein") + | "o": RETURN WriteInt(8) + | "s": RETURN WriteString() + | "x": RETURN WriteInt(16) + | "y": RETURN WriteBool("yes", "no") + ELSE + Error(badFormat); RETURN FALSE + END; + END Conversion; BEGIN - IF ~Next() THEN RETURN FALSE END; - IF fmtchar = fmtcmd THEN Write(fmtcmd); RETURN TRUE END; - RETURN Flags() & Width() & Scale() & Conversion() + IF ~Next() THEN RETURN FALSE END; + IF fmtchar = fmtcmd THEN Write(fmtcmd); RETURN TRUE END; + RETURN Flags() & Width() & Scale() & Conversion() END Format; - + BEGIN out.count := 0; out.error := FALSE; SetSize; nextarg := 0; fmtindex := 0; WHILE Next() DO - IF fmtchar = fmtcmd THEN - IF ~Format() THEN - RETURN - END; - ELSIF (fmtchar = "\") & Next() THEN - CASE fmtchar OF - | "0".."9", "A".."F": - IF ~Int(hexcharval, 16) THEN - (* Error(s, BadFormat); *) RETURN - END; - Unget; - Write(CHR(hexcharval)); - | "b": Write(08X); (* back space *) - | "e": Write(1BX); (* escape *) - | "f": Write(0CX); (* form feed *) - | "n": WriteLn; - | "q": Write("'"); - | "Q": Write(22X); (* double quote: " *) - | "r": Write(0DX); (* carriage return *) - | "t": Write(09X); (* horizontal tab *) - | "&": Write(07X); (* bell *) - ELSE - Write(fmtchar); - END; - ELSE - Write(fmtchar); - END; + IF fmtchar = fmtcmd THEN + IF ~Format() THEN + RETURN + END; + ELSIF (fmtchar = "\") & Next() THEN + CASE fmtchar OF + | "0".."9", "A".."F": + IF ~Int(hexcharval, 16) THEN + (* Error(s, BadFormat); *) RETURN + END; + Unget; + Write(CHR(hexcharval)); + | "b": Write(08X); (* back space *) + | "e": Write(1BX); (* escape *) + | "f": Write(0CX); (* form feed *) + | "n": WriteLn; + | "q": Write("'"); + | "Q": Write(22X); (* double quote: " *) + | "r": Write(0DX); (* carriage return *) + | "t": Write(09X); (* horizontal tab *) + | "&": Write(07X); (* bell *) + ELSE + Write(fmtchar); + END; + ELSE + Write(fmtchar); + END; END; IF nextarg < nargs THEN - Error(tooManyArgs); + Error(tooManyArgs); ELSIF nextarg > nargs THEN - Error(tooFewArgs); + Error(tooFewArgs); END; END Out; (* === public part ============================================== *) - PROCEDURE F*(fmt: ARRAY OF CHAR); + PROCEDURE F(fmt: ARRAY OF CHAR); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END F; - PROCEDURE F1*(fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE); + PROCEDURE F1(fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 1, p1, x,x,x,x,x,x,x,x, NIL); END F1; - PROCEDURE F2*(fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE); + PROCEDURE F2(fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 2, p1,p2, x,x,x,x,x,x,x, NIL); END F2; - PROCEDURE F3*(fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF SYS.BYTE); + PROCEDURE F3(fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 3, p1,p2,p3, x,x,x,x,x,x, NIL); END F3; - PROCEDURE F4*(fmt: ARRAY OF CHAR; p1, p2, p3, p4: ARRAY OF SYS.BYTE); + PROCEDURE F4(fmt: ARRAY OF CHAR; p1, p2, p3, p4: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, NIL); END F4; - PROCEDURE F5*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE); + PROCEDURE F5(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, NIL); END F5; - PROCEDURE F6*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE); + PROCEDURE F6(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, NIL); END F6; - PROCEDURE F7*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE); + PROCEDURE F7(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, NIL); END F7; - PROCEDURE F8*(fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE); + PROCEDURE F8(fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(Streams.stdout, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, NIL); END F8; - PROCEDURE F9*(fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE); + PROCEDURE F9(fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE); BEGIN Out(Streams.stdout, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, NIL); END F9; - PROCEDURE S*(out: Streams.Stream; fmt: ARRAY OF CHAR); + PROCEDURE S(out: Streams.Stream; fmt: ARRAY OF CHAR); VAR x: INTEGER; BEGIN Out(out, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END S; - PROCEDURE S1*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE); + PROCEDURE S1(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 1, p1, x,x,x,x,x,x,x,x, NIL); END S1; - PROCEDURE S2*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE); + PROCEDURE S2(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 2, p1,p2, x,x,x,x,x,x,x, NIL); END S2; - PROCEDURE S3*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF SYS.BYTE); + PROCEDURE S3(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 3, p1,p2,p3, x,x,x,x,x,x, NIL); END S3; - PROCEDURE S4*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4: ARRAY OF SYS.BYTE); + PROCEDURE S4(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, NIL); END S4; - PROCEDURE S5*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE); + PROCEDURE S5(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, NIL); END S5; - PROCEDURE S6*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE); + PROCEDURE S6(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, NIL); END S6; - PROCEDURE S7*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE); + PROCEDURE S7(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, NIL); END S7; - PROCEDURE S8*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE); + PROCEDURE S8(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE); VAR x: INTEGER; BEGIN Out(out, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, NIL); END S8; - PROCEDURE S9*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE); + PROCEDURE S9(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE); BEGIN Out(out, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, NIL); END S9; - PROCEDURE SE*(out: Streams.Stream; fmt: ARRAY OF CHAR; - errors: RelatedEvents.Object); + PROCEDURE SE(out: Streams.Stream; fmt: ARRAY OF CHAR; + errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END SE; - PROCEDURE SE1*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE; + PROCEDURE SE1(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 1, p1, x,x,x,x,x,x,x,x, errors); END SE1; - PROCEDURE SE2*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE; + PROCEDURE SE2(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 2, p1,p2, x,x,x,x,x,x,x, errors); END SE2; - PROCEDURE SE3*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3: ARRAY OF SYS.BYTE; + PROCEDURE SE3(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 3, p1,p2,p3, x,x,x,x,x,x, errors); END SE3; - PROCEDURE SE4*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4: ARRAY OF SYS.BYTE; + PROCEDURE SE4(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, errors); END SE4; - PROCEDURE SE5*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE; + PROCEDURE SE5(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, errors); END SE5; - PROCEDURE SE6*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE; + PROCEDURE SE6(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, errors); END SE6; - PROCEDURE SE7*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE; + PROCEDURE SE7(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, errors); END SE7; - PROCEDURE SE8*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE; + PROCEDURE SE8(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE; errors: RelatedEvents.Object); VAR x: INTEGER; BEGIN Out(out, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, errors); END SE8; - PROCEDURE SE9*(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE; + PROCEDURE SE9(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE; errors: RelatedEvents.Object); BEGIN Out(out, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, errors); @@ -965,4 +961,4 @@ MODULE ulmPrint; BEGIN InitErrorHandling; -END ulmPrint. +END Print. diff --git a/src/library/ulm/ulmSYSTEM.Mod b/src/library/ulm/ulmSYSTEM.Mod index 796a0d1b..f4efb7d5 100644 --- a/src/library/ulm/ulmSYSTEM.Mod +++ b/src/library/ulm/ulmSYSTEM.Mod @@ -19,7 +19,7 @@ TYPE pchar = POINTER TO ARRAY 1 OF CHAR; i := 0; REPEAT SYSTEM.GET(adr + i, b); - lar[i] := b; + bar[i] := b; INC(i) UNTIL i = SIZE(LONGINT) END LongToByteArr; @@ -138,4 +138,5 @@ TYPE pchar = POINTER TO ARRAY 1 OF CHAR; BEGIN SYSTEM.MOVE(from, to, n); END WMOVE; + END ulmSYSTEM. diff --git a/src/library/ulm/ulmTypes.Mod b/src/library/ulm/ulmTypes.Mod index 0d09a4f5..755f7cee 100644 --- a/src/library/ulm/ulmTypes.Mod +++ b/src/library/ulm/ulmTypes.Mod @@ -40,7 +40,7 @@ ---------------------------------------------------------------------------- *) -MODULE ulmTypes; +MODULE Types; (* compiler-dependent type definitions; this version works for Ulm's Oberon Compilers on @@ -51,24 +51,23 @@ MODULE ulmTypes; TYPE Address* = SYS.ADDRESS; + UntracedAddress* = POINTER[1] TO UntracedAddressDesc; + UntracedAddressDesc* = RECORD[1] END; - UntracedAddress* = POINTER[1] TO UntracedAddressDesc; (*SYS.UNTRACEDADDRESS;*) - UntracedAddressDesc* = RECORD[1] END; - - Count* = SYS.INT32; - Size* = Count; - Byte* = SYS.BYTE; - IntAddress* = LONGINT; - Int8* = SYS.INT8; - Int16* = SYS.INT16; - Int32* = SYS.INT32; - Real32* = REAL; - Real64* = LONGREAL; + Count* = SYS.INT32; + Size* = Count; + Byte* = SYS.BYTE; + IntAddress* = SYS.INT32; + Int8* = SYS.INT8; + Int16* = SYS.INT16; + Int32* = SYS.INT32; + Real32* = LONGREAL; + Real64* = LONGREAL; CONST - bigEndian* = 0; (* SPARC, M68K etc *) + bigEndian* = 0; (* SPARC, M68K etc *) littleEndian* = 1; (* Intel 80x86, VAX etc *) - byteorder* = littleEndian; (* machine-dependent constant *) + byteorder* = littleEndian; (* machine-dependent constant *) TYPE ByteOrder* = SHORTINT; (* bigEndian or littleEndian *) @@ -77,14 +76,27 @@ MODULE ulmTypes; to allow for bit operations on INTEGER values *) TYPE - SetInt* = LONGINT; (* INTEGER type that corresponds to SET *) - VAR msb* : SET; - msbIsMax*, msbIs0*: SHORTINT; - msbindex*, lsbindex*, nofbits*: LONGINT; + SetInt* = INTEGER; (* INTEGER type that corresponds to SET *) + CONST + msb* = SYS.VAL(SET, MIN(SetInt)); + (* most significant bit, converted to a SET *) + (* we expect msbIsMax XOR msbIs0 to be 1; + this is checked for by an assertion + *) + msbIsMax* = SYS.VAL(SHORTINT, (msb = {MAX(SET)})); + (* is 1, if msb equals {MAX(SET)} *) + msbIs0* = SYS.VAL(SHORTINT, (msb = {0})); + (* is 0, if msb equals {0} *) + msbindex* = msbIsMax * MAX(SET); + (* set element that corresponds to the most-significant-bit *) + lsbindex* = MAX(SET) - msbindex; + (* set element that corresponds to the lowest-significant-bit *) + nofbits* = MAX(SET) + 1; + (* number of elements in SETs *) PROCEDURE ToInt8*(int: LONGINT) : Int8; BEGIN - RETURN SYS.VAL(SHORTINT, int) + RETURN SHORT(SHORT(int)) END ToInt8; PROCEDURE ToInt16*(int: LONGINT) : Int16; @@ -94,7 +106,7 @@ MODULE ulmTypes; PROCEDURE ToInt32*(int: LONGINT) : Int32; BEGIN - RETURN SYS.VAL(INTEGER, int) + RETURN int END ToInt32; PROCEDURE ToReal32*(real: LONGREAL) : Real32; @@ -104,25 +116,9 @@ MODULE ulmTypes; PROCEDURE ToReal64*(real: LONGREAL) : Real64; BEGIN - RETURN real + RETURN SHORT(real) END ToReal64; BEGIN - msb := SYS.VAL(SET, MIN(SetInt)); - (* most significant bit, converted to a SET *) - (* we expect msbIsMax XOR msbIs0 to be 1; - this is checked for by an assertion - *) - msbIsMax := SYS.VAL(SHORTINT, (msb = {MAX(SET)})); - (* is 1, if msb equals {MAX(SET)} *) - msbIs0 := SYS.VAL(SHORTINT, (msb = {0})); - (* is 0, if msb equals {0} *) - msbindex := msbIsMax * MAX(SET); - (* set element that corresponds to the most-significant-bit *) - lsbindex := MAX(SET) - msbindex; - (* set element that corresponds to the lowest-significant-bit *) - nofbits := MAX(SET) + 1; - (* number of elements in SETs *) - ASSERT((msbIs0 = 1) & (msbIsMax = 0) OR (msbIs0 = 0) & (msbIsMax = 1)); -END ulmTypes. +END Types. From 9f0cbccf5504830039d477fb7ed818b84f6dc577 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 29 Nov 2016 15:27:30 +0000 Subject: [PATCH 014/241] Various fixes to OS vs Oberon file lifetime management in Files.Mod. --- src/compiler/OPM.Mod | 5 ++- src/runtime/Files.Mod | 78 ++++++++++++++++++++--------------------- src/runtime/Heap.Mod | 3 +- src/runtime/Modules.Mod | 3 +- 4 files changed, 44 insertions(+), 45 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index fe43393b..7c88f8fc 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -500,8 +500,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) WHILE i > 0 DO LogW(" "); DEC(i) END; LogVT100(VT100.Green); LogW("^"); LogVT100(VT100.ResetAll); - - Files.Close(f); END ShowLine; @@ -597,7 +595,8 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) oldSFile := Files.Old(fileName); done := oldSFile # NIL; IF done THEN Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver); - IF (tag # SFtag) OR (ver # SFver) THEN err(-306); (*possibly a symbol file from another Oberon implementation, e.g. HP-Oberon*) + IF (tag # SFtag) OR (ver # SFver) THEN + err(-306); (*possibly a symbol file from another Oberon implementation, e.g. HP-Oberon*) CloseOldSym; done := FALSE END END diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 543a5c9c..983b4f64 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -18,14 +18,15 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files BufSize = 4096; NoDesc = -1; - (* file states *) + (* No file states, used when FileDesc.fd = NoDesc *) open = 0; (* OS File has been opened *) create = 1; (* OS file needs to be created *) - close = 2; (* Register telling Create to use registerName directly: - i.e. since we're closing and all data is still in - buffers bypass writing to temp file and then renaming - and just write directly to fianl register name *) - + close = 2; (* Flag used by Files.Register to tell Create to create the + file using it's registerName directly, rather than to + create a temporary file: i.e. since we're closing and all + data is still in buffers bypass writing to temp file and + then renaming and just write directly to final register + name *) TYPE FileName = ARRAY 101 OF CHAR; @@ -37,7 +38,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files registerName: FileName; tempFile: BOOLEAN; identity: Platform.FileIdentity; - fd-: Platform.FileHandle; + fd: Platform.FileHandle; len, pos: LONGINT; bufs: ARRAY NumBufs OF Buffer; swapper: INTEGER; @@ -63,7 +64,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR - files: File; (* List of files that have an OS file handle/descriptor assigned *) + files: File; (* List of files backed by an OS file, whether open, registered or temporary. *) tempno: INTEGER; HOME: ARRAY 1024 OF CHAR; SearchPath: POINTER TO ARRAY OF CHAR; @@ -122,6 +123,10 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files END GetTempName; PROCEDURE Create(f: File); + (* Makes sure there is an OS file backing this Oberon file. + Used when more data has been written to an unregistered new file than + buffers can hold, or when registering a new file whose data is all in + buffers. *) VAR identity: Platform.FileIdentity; done: BOOLEAN; @@ -137,16 +142,20 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files *) IF f.fd = NoDesc THEN IF f.state = create THEN + (* New file with enough data written to exceed buffers, so we need to + create a temporary file to back it. *) GetTempName(f.registerName, f.workName); f.tempFile := TRUE - ELSIF f.state = close THEN + ELSE + ASSERT(f.state = close); + (* New file with all data in buffers being registered. No need for a + temp file, will just write the buffers to the registerName. *) f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE END; error := Platform.Unlink(f.workName); (*unlink first to avoid stale NFS handles and to avoid reuse of inodes*) - error := Platform.New(f.workName, f.fd); done := error = 0; IF done THEN - f.next := files; files := f; + f.next := files; files := f; (* Link this file into the list of OS bakced files. *) INC(Heap.FileCount); Heap.RegisterFinalizer(f, Finalize); f.state := open; @@ -186,31 +195,12 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files IF error # 0 THEN Err("error writing file", f, error) END; f.pos := buf.org + buf.size; buf.chg := FALSE; - error := Platform.Identify(f.fd, f.identity); + error := Platform.Identify(f.fd, f.identity); (* Update identity with new modification time. *) IF error # 0 THEN Err("error identifying file", f, error) END; - (* - error := Platform.Identify(f.fd, identity); - f.identity.mtime := identity.mtime; - *) END END Flush; - PROCEDURE CloseOSFile(f: File); - (* Close the OS file handle and remove f from 'files' *) - VAR prev: File; error: Platform.ErrorCode; - BEGIN - IF files = f THEN files := f.next - ELSE - prev := files; - WHILE (prev # NIL) & (prev.next # f) DO prev := prev.next END; - IF prev.next # NIL THEN prev.next := f.next END - END; - error := Platform.Close(f.fd); - f.fd := NoDesc; f.state := create; DEC(Heap.FileCount); - END CloseOSFile; - - PROCEDURE Close* (f: File); VAR i: LONGINT; @@ -219,12 +209,6 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files IF (f.state # create) OR (f.registerName # "") THEN Create(f); i := 0; WHILE (i < NumBufs) & (f.bufs[i] # NIL) DO Flush(f.bufs[i]); INC(i) END; - (* There's no reason to sync this file - we're about to close it. The OS - will sync if necessary. Further, sync will fail for a R/O file on Windows. - error := Platform.Sync(f.fd); - IF error # 0 THEN Err("error syncing file", f, error) END; - *) - CloseOSFile(f); END END Close; @@ -323,7 +307,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files error := Platform.Identify(fd, identity); f := CacheEntry(identity); IF f # NIL THEN - (* error := Platform.Close(fd); DCWB: Either this should be removed or should call CloseOSFile. *) + error := Platform.Close(fd); (* fd not needed - we'll be using f.fd. *) RETURN f ELSE NEW(f); Heap.RegisterFinalizer(f, Finalize); f.fd := fd; f.state := open; f.pos := 0; f.swapper := -1; (*all f.buf[i] = NIL*) @@ -579,7 +563,7 @@ Especially Length would become fairly complex. END Rename; PROCEDURE Register* (f: File); - VAR idx, errcode: INTEGER; f1: File; file: ARRAY 104 OF CHAR; + VAR idx, errcode: INTEGER; f1: File; BEGIN (* Out.String("Files.Register f.registerName = "); Out.String(f.registerName); @@ -595,7 +579,7 @@ Especially Length would become fairly complex. Out.String(" to registerName "); Out.String(f.registerName); Out.String(" errorcode = "); Out.Int(errcode,1); Out.Ln; *) - IF errcode # 0 THEN COPY(f.registerName, file); HALT(99) END; + IF errcode # 0 THEN Err("Couldn't rename temp name as register name", f, errcode) END; f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE END END Register; @@ -725,6 +709,20 @@ Especially Length would become fairly complex. COPY (f.workName, name); END GetName; + PROCEDURE CloseOSFile(f: File); + (* Close the OS file handle and remove f from 'files' *) + VAR prev: File; error: Platform.ErrorCode; + BEGIN + IF files = f THEN files := f.next + ELSE + prev := files; + WHILE (prev # NIL) & (prev.next # f) DO prev := prev.next END; + IF prev.next # NIL THEN prev.next := f.next END + END; + error := Platform.Close(f.fd); + f.fd := NoDesc; f.state := create; DEC(Heap.FileCount); + END CloseOSFile; + PROCEDURE Finalize(o: SYSTEM.PTR); VAR f: File; res: LONGINT; BEGIN diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 71a0d161..e368ae88 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -530,7 +530,8 @@ MODULE Heap; PROCEDURE GC*(markStack: BOOLEAN); VAR m: Module; - i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23: S.ADDRESS; + i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, + i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23: S.ADDRESS; cand: ARRAY 10000 OF S.ADDRESS; BEGIN IF (lockdepth = 0) OR (lockdepth = 1) & ~markStack THEN diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 28050126..970bc547 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -136,7 +136,7 @@ MODULE Modules; (* jt 6.1.96 *) PROCEDURE Halt*(code: SYSTEM.INT32); BEGIN - (*IF HaltHandler # NIL THEN HaltHandler(code) END;*) + Heap.FINALL; errstring("Terminated by Halt("); errint(code); errstring("). "); IF code < 0 THEN DisplayHaltCode(code) END; errstring(Platform.NL); @@ -145,6 +145,7 @@ MODULE Modules; (* jt 6.1.96 *) PROCEDURE AssertFail*(code: SYSTEM.INT32); BEGIN + Heap.FINALL; errstring("Assertion failure."); IF code # 0 THEN errstring(" ASSERT code "); errint(code); errstring("."); END; errstring(Platform.NL); From 19af6d76d370378e00338b0f535505bd1d88811f Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 29 Nov 2016 15:43:11 +0000 Subject: [PATCH 015/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 53 ++++++++++++++-------------- bootstrap/unix-44/Files.h | 7 ++-- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 4 ++- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 3 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 53 ++++++++++++++-------------- bootstrap/unix-48/Files.h | 7 ++-- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 4 ++- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 3 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 53 ++++++++++++++-------------- bootstrap/unix-88/Files.h | 6 ++-- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 4 ++- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 3 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 53 ++++++++++++++-------------- bootstrap/windows-48/Files.h | 7 ++-- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 4 ++- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 3 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 53 ++++++++++++++-------------- bootstrap/windows-88/Files.h | 7 ++-- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 4 ++- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 3 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 334 insertions(+), 340 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 6200dcea..19053dd2 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 13c1e7ff..d0de3d5d 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 6f418c8a..2cc1873a 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 05af3356..3a6ec440 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -232,7 +232,8 @@ static void Files_Create (Files_File f) if (f->state == 1) { Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); f->tempFile = 1; - } else if (f->state == 2) { + } else { + __ASSERT(f->state == 2, 0); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -284,27 +285,6 @@ static void Files_Flush (Files_Buffer buf) } } -static void Files_CloseOSFile (Files_File f) -{ - Files_File prev = NIL; - INT16 error; - if (Files_files == f) { - Files_files = f->next; - } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; - } - if (prev->next != NIL) { - prev->next = f->next; - } - } - error = Platform_Close(f->fd); - f->fd = -1; - f->state = 1; - Heap_FileCount -= 1; -} - void Files_Close (Files_File f) { INT32 i; @@ -316,7 +296,6 @@ void Files_Close (Files_File f) Files_Flush(f->bufs[i]); i += 1; } - Files_CloseOSFile(f); } } @@ -465,6 +444,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) error = Platform_Identify(fd, &identity, Platform_FileIdentity__typ); f = Files_CacheEntry(identity); if (f != NIL) { + error = Platform_Close(fd); __DEL(name); return f; } else { @@ -804,7 +784,6 @@ void Files_Register (Files_File f) { INT16 idx, errcode; Files_File f1 = NIL; - CHAR file[104]; if ((f->state == 1 && f->registerName[0] != 0x00)) { f->state = 2; } @@ -812,8 +791,7 @@ void Files_Register (Files_File f) if (f->registerName[0] != 0x00) { Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { - __COPY(f->registerName, file, 104); - __HALT(99); + Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; @@ -1005,6 +983,27 @@ void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) __COPY(f->workName, name, name__len); } +static void Files_CloseOSFile (Files_File f) +{ + Files_File prev = NIL; + INT16 error; + if (Files_files == f) { + Files_files = f->next; + } else { + prev = Files_files; + while ((prev != NIL && prev->next != f)) { + prev = prev->next; + } + if (prev->next != NIL) { + prev->next = f->next; + } + } + error = Platform_Close(f->fd); + f->fd = -1; + f->state = 1; + Heap_FileCount -= 1; +} + static void Files_Finalize (SYSTEM_PTR o) { Files_File f = NIL; diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 1d0b6ef1..a2ddea5e 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -10,9 +10,8 @@ typedef typedef struct Files_FileDesc { - char _prvt0[216]; - INT32 fd; - char _prvt1[32]; + INT32 _prvt0; + char _prvt1[248]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index ae9ffcfb..88e5fa50 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 0cf94754..313d111e 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index e4fa8467..8ce1e8f3 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -250,6 +250,7 @@ static void Modules_DisplayHaltCode (INT32 code) void Modules_Halt (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Terminated by Halt(", 20); Modules_errint(code); Modules_errstring((CHAR*)"). ", 4); @@ -262,6 +263,7 @@ void Modules_Halt (INT32 code) void Modules_AssertFail (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Assertion failure.", 19); if (code != 0) { Modules_errstring((CHAR*)" ASSERT code ", 14); diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index d1227884..2bd2b5da 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index f174acdc..d34d0f9b 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 1efe3cf3..084b0534 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 4759eb74..6b592341 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index a485b3c4..5219140a 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 34ca07fd..f54fae67 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -640,7 +640,6 @@ static void OPM_ShowLine (INT64 pos) OPM_LogVT100((CHAR*)"32m", 4); OPM_LogW('^'); OPM_LogVT100((CHAR*)"0m", 3); - Files_Close(f); } void OPM_Mark (INT16 n, INT32 pos) diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 0b19f055..cd390d68 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index aef61fc9..b4ed079b 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 6629924c..ab972651 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index d5c0c747..6028caf7 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 87418922..ad1dc868 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 0d22f650..ae240604 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 019dee31..7c1139c0 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index ef5a6f06..9250891d 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 401db9dd..296c8975 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index eba9222e..ff896aa0 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index f58803a5..44a26650 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 5cc1bdc0..410edde3 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index f4cff92c..d5cc19f6 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 5361bdcd..fe5db80a 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index cc2755f0..e791f967 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 230f60a9..7c07366c 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index ad07bc6d..96231bce 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 21b5fc34..05d98559 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 8b80a18c..8f626f64 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 57d8a782..6646a439 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 5e32e01b..ee7770b0 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 18e626a3..e450651e 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 622a5a55..aea1841e 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 6200dcea..19053dd2 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 13c1e7ff..d0de3d5d 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 6f418c8a..2cc1873a 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 05af3356..3a6ec440 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -232,7 +232,8 @@ static void Files_Create (Files_File f) if (f->state == 1) { Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); f->tempFile = 1; - } else if (f->state == 2) { + } else { + __ASSERT(f->state == 2, 0); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -284,27 +285,6 @@ static void Files_Flush (Files_Buffer buf) } } -static void Files_CloseOSFile (Files_File f) -{ - Files_File prev = NIL; - INT16 error; - if (Files_files == f) { - Files_files = f->next; - } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; - } - if (prev->next != NIL) { - prev->next = f->next; - } - } - error = Platform_Close(f->fd); - f->fd = -1; - f->state = 1; - Heap_FileCount -= 1; -} - void Files_Close (Files_File f) { INT32 i; @@ -316,7 +296,6 @@ void Files_Close (Files_File f) Files_Flush(f->bufs[i]); i += 1; } - Files_CloseOSFile(f); } } @@ -465,6 +444,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) error = Platform_Identify(fd, &identity, Platform_FileIdentity__typ); f = Files_CacheEntry(identity); if (f != NIL) { + error = Platform_Close(fd); __DEL(name); return f; } else { @@ -804,7 +784,6 @@ void Files_Register (Files_File f) { INT16 idx, errcode; Files_File f1 = NIL; - CHAR file[104]; if ((f->state == 1 && f->registerName[0] != 0x00)) { f->state = 2; } @@ -812,8 +791,7 @@ void Files_Register (Files_File f) if (f->registerName[0] != 0x00) { Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { - __COPY(f->registerName, file, 104); - __HALT(99); + Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; @@ -1005,6 +983,27 @@ void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) __COPY(f->workName, name, name__len); } +static void Files_CloseOSFile (Files_File f) +{ + Files_File prev = NIL; + INT16 error; + if (Files_files == f) { + Files_files = f->next; + } else { + prev = Files_files; + while ((prev != NIL && prev->next != f)) { + prev = prev->next; + } + if (prev->next != NIL) { + prev->next = f->next; + } + } + error = Platform_Close(f->fd); + f->fd = -1; + f->state = 1; + Heap_FileCount -= 1; +} + static void Files_Finalize (SYSTEM_PTR o) { Files_File f = NIL; diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 1d0b6ef1..a2ddea5e 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -10,9 +10,8 @@ typedef typedef struct Files_FileDesc { - char _prvt0[216]; - INT32 fd; - char _prvt1[32]; + INT32 _prvt0; + char _prvt1[248]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index ae9ffcfb..88e5fa50 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 0cf94754..313d111e 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index e4fa8467..8ce1e8f3 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -250,6 +250,7 @@ static void Modules_DisplayHaltCode (INT32 code) void Modules_Halt (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Terminated by Halt(", 20); Modules_errint(code); Modules_errstring((CHAR*)"). ", 4); @@ -262,6 +263,7 @@ void Modules_Halt (INT32 code) void Modules_AssertFail (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Assertion failure.", 19); if (code != 0) { Modules_errstring((CHAR*)" ASSERT code ", 14); diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index d1227884..2bd2b5da 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index f174acdc..d34d0f9b 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 1efe3cf3..084b0534 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 4759eb74..6b592341 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index a485b3c4..5219140a 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 34ca07fd..f54fae67 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -640,7 +640,6 @@ static void OPM_ShowLine (INT64 pos) OPM_LogVT100((CHAR*)"32m", 4); OPM_LogW('^'); OPM_LogVT100((CHAR*)"0m", 3); - Files_Close(f); } void OPM_Mark (INT16 n, INT32 pos) diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 0b19f055..cd390d68 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index aef61fc9..b4ed079b 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 6629924c..ab972651 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index d5c0c747..6028caf7 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 87418922..ad1dc868 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index b4a68499..7ed72408 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 019dee31..7c1139c0 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index ef5a6f06..9250891d 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 401db9dd..296c8975 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index eba9222e..ff896aa0 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index f58803a5..44a26650 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 5cc1bdc0..410edde3 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index f4cff92c..d5cc19f6 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 5361bdcd..fe5db80a 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index cc2755f0..e791f967 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 230f60a9..7c07366c 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index ad07bc6d..96231bce 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index ffda81d3..68aa0310 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index ef53cdf5..2635c7ad 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 57d8a782..6646a439 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 5e32e01b..ee7770b0 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 18e626a3..e450651e 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 622a5a55..aea1841e 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 6200dcea..19053dd2 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 13c1e7ff..d0de3d5d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 6f418c8a..2cc1873a 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 2da0ba3b..1b967820 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -232,7 +232,8 @@ static void Files_Create (Files_File f) if (f->state == 1) { Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); f->tempFile = 1; - } else if (f->state == 2) { + } else { + __ASSERT(f->state == 2, 0); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -284,27 +285,6 @@ static void Files_Flush (Files_Buffer buf) } } -static void Files_CloseOSFile (Files_File f) -{ - Files_File prev = NIL; - INT16 error; - if (Files_files == f) { - Files_files = f->next; - } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; - } - if (prev->next != NIL) { - prev->next = f->next; - } - } - error = Platform_Close(f->fd); - f->fd = -1; - f->state = 1; - Heap_FileCount -= 1; -} - void Files_Close (Files_File f) { INT32 i; @@ -316,7 +296,6 @@ void Files_Close (Files_File f) Files_Flush(f->bufs[i]); i += 1; } - Files_CloseOSFile(f); } } @@ -465,6 +444,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) error = Platform_Identify(fd, &identity, Platform_FileIdentity__typ); f = Files_CacheEntry(identity); if (f != NIL) { + error = Platform_Close(fd); __DEL(name); return f; } else { @@ -804,7 +784,6 @@ void Files_Register (Files_File f) { INT16 idx, errcode; Files_File f1 = NIL; - CHAR file[104]; if ((f->state == 1 && f->registerName[0] != 0x00)) { f->state = 2; } @@ -812,8 +791,7 @@ void Files_Register (Files_File f) if (f->registerName[0] != 0x00) { Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { - __COPY(f->registerName, file, 104); - __HALT(99); + Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; @@ -1005,6 +983,27 @@ void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) __COPY(f->workName, name, name__len); } +static void Files_CloseOSFile (Files_File f) +{ + Files_File prev = NIL; + INT16 error; + if (Files_files == f) { + Files_files = f->next; + } else { + prev = Files_files; + while ((prev != NIL && prev->next != f)) { + prev = prev->next; + } + if (prev->next != NIL) { + prev->next = f->next; + } + } + error = Platform_Close(f->fd); + f->fd = -1; + f->state = 1; + Heap_FileCount -= 1; +} + static void Files_Finalize (SYSTEM_PTR o) { Files_File f = NIL; diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 379f329e..6d4e7f78 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,9 +11,7 @@ typedef typedef struct Files_FileDesc { INT64 _prvt0; - char _prvt1[208]; - INT32 fd; - char _prvt2[60]; + char _prvt1[272]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index ac52c6ae..afc96221 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 9daf685d..e8a34cc3 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index f1d1a614..e161f52a 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -250,6 +250,7 @@ static void Modules_DisplayHaltCode (INT32 code) void Modules_Halt (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Terminated by Halt(", 20); Modules_errint(code); Modules_errstring((CHAR*)"). ", 4); @@ -262,6 +263,7 @@ void Modules_Halt (INT32 code) void Modules_AssertFail (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Assertion failure.", 19); if (code != 0) { Modules_errstring((CHAR*)" ASSERT code ", 14); diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index d1227884..2bd2b5da 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index f174acdc..d34d0f9b 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 1efe3cf3..084b0534 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 4759eb74..6b592341 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index a485b3c4..5219140a 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 5820c0cc..944cb3df 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -640,7 +640,6 @@ static void OPM_ShowLine (INT64 pos) OPM_LogVT100((CHAR*)"32m", 4); OPM_LogW('^'); OPM_LogVT100((CHAR*)"0m", 3); - Files_Close(f); } void OPM_Mark (INT16 n, INT32 pos) diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 0b19f055..cd390d68 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index ccf8dbe4..5b8ca3cb 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 6629924c..ab972651 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index d5c0c747..6028caf7 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 87418922..ad1dc868 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 8122f444..50fa7c31 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 019dee31..7c1139c0 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index a03a1aab..70113cd4 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 401db9dd..296c8975 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index eba9222e..ff896aa0 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index f58803a5..44a26650 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index def7cd38..fde6b221 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index f9a40b7b..31c0037a 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 5361bdcd..fe5db80a 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index cc2755f0..e791f967 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 230f60a9..7c07366c 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index ad07bc6d..96231bce 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 79492c57..590a2041 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 9042b9b8..1d12b7c6 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 57d8a782..6646a439 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 5e32e01b..ee7770b0 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 18e626a3..e450651e 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 622a5a55..aea1841e 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 6200dcea..19053dd2 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 13c1e7ff..d0de3d5d 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 6f418c8a..2cc1873a 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index ac192041..a737c2d8 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -232,7 +232,8 @@ static void Files_Create (Files_File f) if (f->state == 1) { Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); f->tempFile = 1; - } else if (f->state == 2) { + } else { + __ASSERT(f->state == 2, 0); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -284,27 +285,6 @@ static void Files_Flush (Files_Buffer buf) } } -static void Files_CloseOSFile (Files_File f) -{ - Files_File prev = NIL; - INT16 error; - if (Files_files == f) { - Files_files = f->next; - } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; - } - if (prev->next != NIL) { - prev->next = f->next; - } - } - error = Platform_Close(f->fd); - f->fd = -1; - f->state = 1; - Heap_FileCount -= 1; -} - void Files_Close (Files_File f) { INT32 i; @@ -316,7 +296,6 @@ void Files_Close (Files_File f) Files_Flush(f->bufs[i]); i += 1; } - Files_CloseOSFile(f); } } @@ -465,6 +444,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) error = Platform_Identify(fd, &identity, Platform_FileIdentity__typ); f = Files_CacheEntry(identity); if (f != NIL) { + error = Platform_Close(fd); __DEL(name); return f; } else { @@ -804,7 +784,6 @@ void Files_Register (Files_File f) { INT16 idx, errcode; Files_File f1 = NIL; - CHAR file[104]; if ((f->state == 1 && f->registerName[0] != 0x00)) { f->state = 2; } @@ -812,8 +791,7 @@ void Files_Register (Files_File f) if (f->registerName[0] != 0x00) { Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { - __COPY(f->registerName, file, 104); - __HALT(99); + Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; @@ -1005,6 +983,27 @@ void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) __COPY(f->workName, name, name__len); } +static void Files_CloseOSFile (Files_File f) +{ + Files_File prev = NIL; + INT16 error; + if (Files_files == f) { + Files_files = f->next; + } else { + prev = Files_files; + while ((prev != NIL && prev->next != f)) { + prev = prev->next; + } + if (prev->next != NIL) { + prev->next = f->next; + } + } + error = Platform_Close(f->fd); + f->fd = -1; + f->state = 1; + Heap_FileCount -= 1; +} + static void Files_Finalize (SYSTEM_PTR o) { Files_File f = NIL; diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dca42164..355916fa 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -10,9 +10,8 @@ typedef typedef struct Files_FileDesc { - char _prvt0[224]; - INT32 fd; - char _prvt1[32]; + INT32 _prvt0; + char _prvt1[256]; } Files_FileDesc; typedef diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index ae9ffcfb..88e5fa50 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 0cf94754..313d111e 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index e4fa8467..8ce1e8f3 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -250,6 +250,7 @@ static void Modules_DisplayHaltCode (INT32 code) void Modules_Halt (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Terminated by Halt(", 20); Modules_errint(code); Modules_errstring((CHAR*)"). ", 4); @@ -262,6 +263,7 @@ void Modules_Halt (INT32 code) void Modules_AssertFail (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Assertion failure.", 19); if (code != 0) { Modules_errstring((CHAR*)" ASSERT code ", 14); diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index d1227884..2bd2b5da 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index f174acdc..d34d0f9b 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 1efe3cf3..084b0534 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 4759eb74..6b592341 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index a485b3c4..5219140a 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 34ca07fd..f54fae67 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -640,7 +640,6 @@ static void OPM_ShowLine (INT64 pos) OPM_LogVT100((CHAR*)"32m", 4); OPM_LogW('^'); OPM_LogVT100((CHAR*)"0m", 3); - Files_Close(f); } void OPM_Mark (INT16 n, INT32 pos) diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 0b19f055..cd390d68 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index aef61fc9..b4ed079b 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 6629924c..ab972651 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index d5c0c747..6028caf7 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 87418922..ad1dc868 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index b4a68499..7ed72408 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 019dee31..7c1139c0 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index ef5a6f06..9250891d 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 401db9dd..296c8975 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 7b3897d4..eae902f9 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index f58803a5..44a26650 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 1dc027fb..518cb928 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 1154e6b1..35a0878d 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 5361bdcd..fe5db80a 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index cc2755f0..e791f967 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 230f60a9..7c07366c 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index ad07bc6d..96231bce 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index ffda81d3..68aa0310 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index ef53cdf5..2635c7ad 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 57d8a782..6646a439 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 5e32e01b..ee7770b0 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 18e626a3..e450651e 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 622a5a55..aea1841e 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 6200dcea..19053dd2 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 13c1e7ff..d0de3d5d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 6f418c8a..2cc1873a 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 517844d9..134741a5 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -233,7 +233,8 @@ static void Files_Create (Files_File f) if (f->state == 1) { Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); f->tempFile = 1; - } else if (f->state == 2) { + } else { + __ASSERT(f->state == 2, 0); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -285,27 +286,6 @@ static void Files_Flush (Files_Buffer buf) } } -static void Files_CloseOSFile (Files_File f) -{ - Files_File prev = NIL; - INT16 error; - if (Files_files == f) { - Files_files = f->next; - } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; - } - if (prev->next != NIL) { - prev->next = f->next; - } - } - error = Platform_Close(f->fd); - f->fd = -1; - f->state = 1; - Heap_FileCount -= 1; -} - void Files_Close (Files_File f) { INT32 i; @@ -317,7 +297,6 @@ void Files_Close (Files_File f) Files_Flush(f->bufs[i]); i += 1; } - Files_CloseOSFile(f); } } @@ -466,6 +445,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) error = Platform_Identify(fd, &identity, Platform_FileIdentity__typ); f = Files_CacheEntry(identity); if (f != NIL) { + error = Platform_Close(fd); __DEL(name); return f; } else { @@ -806,7 +786,6 @@ void Files_Register (Files_File f) { INT16 idx, errcode; Files_File f1 = NIL; - CHAR file[104]; if ((f->state == 1 && f->registerName[0] != 0x00)) { f->state = 2; } @@ -814,8 +793,7 @@ void Files_Register (Files_File f) if (f->registerName[0] != 0x00) { Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { - __COPY(f->registerName, file, 104); - __HALT(99); + Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; @@ -1007,6 +985,27 @@ void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) __COPY(f->workName, name, name__len); } +static void Files_CloseOSFile (Files_File f) +{ + Files_File prev = NIL; + INT16 error; + if (Files_files == f) { + Files_files = f->next; + } else { + prev = Files_files; + while ((prev != NIL && prev->next != f)) { + prev = prev->next; + } + if (prev->next != NIL) { + prev->next = f->next; + } + } + error = Platform_Close(f->fd); + f->fd = -1; + f->state = 1; + Heap_FileCount -= 1; +} + static void Files_Finalize (SYSTEM_PTR o) { Files_File f = NIL; diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 4453e976..3cd0b80b 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -10,9 +10,8 @@ typedef typedef struct Files_FileDesc { - char _prvt0[224]; - INT64 fd; - char _prvt1[56]; + INT64 _prvt0; + char _prvt1[280]; } Files_FileDesc; typedef diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index ac52c6ae..afc96221 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 9daf685d..e8a34cc3 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index f1d1a614..e161f52a 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -250,6 +250,7 @@ static void Modules_DisplayHaltCode (INT32 code) void Modules_Halt (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Terminated by Halt(", 20); Modules_errint(code); Modules_errstring((CHAR*)"). ", 4); @@ -262,6 +263,7 @@ void Modules_Halt (INT32 code) void Modules_AssertFail (INT32 code) { + Heap_FINALL(); Modules_errstring((CHAR*)"Assertion failure.", 19); if (code != 0) { Modules_errstring((CHAR*)" ASSERT code ", 14); diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index d1227884..2bd2b5da 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index f174acdc..d34d0f9b 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 1efe3cf3..084b0534 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 4759eb74..6b592341 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index a485b3c4..5219140a 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 5820c0cc..944cb3df 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -640,7 +640,6 @@ static void OPM_ShowLine (INT64 pos) OPM_LogVT100((CHAR*)"32m", 4); OPM_LogW('^'); OPM_LogVT100((CHAR*)"0m", 3); - Files_Close(f); } void OPM_Mark (INT16 n, INT32 pos) diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 0b19f055..cd390d68 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index ccf8dbe4..5b8ca3cb 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 6629924c..ab972651 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index d5c0c747..6028caf7 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 87418922..ad1dc868 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 8122f444..50fa7c31 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 019dee31..7c1139c0 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index a03a1aab..70113cd4 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 401db9dd..296c8975 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 7b3897d4..eae902f9 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index f58803a5..44a26650 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 37b61a0f..954ef044 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index eff1e977..c39b5ac2 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 5361bdcd..fe5db80a 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index cc2755f0..e791f967 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 230f60a9..7c07366c 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index ad07bc6d..96231bce 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 79492c57..590a2041 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 9042b9b8..1d12b7c6 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 57d8a782..6646a439 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 5e32e01b..ee7770b0 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 18e626a3..e450651e 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 622a5a55..aea1841e 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 0e1c5fe498d8de3774e74f47f8e35472c8142c9c Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 30 Nov 2016 19:39:26 +0400 Subject: [PATCH 016/241] ulm library compiled by fixing integer, longint, shortint and set sizes. -- noch --- src/library/ulm/ulmAssertions.Mod | 2 +- src/library/ulm/ulmAsymmetricCiphers.Mod | 12 +- src/library/ulm/ulmBlockCiphers.Mod | 16 +- src/library/ulm/ulmCipherOps.Mod | 10 +- src/library/ulm/ulmCiphers.Mod | 8 +- src/library/ulm/ulmClocks.Mod | 8 +- src/library/ulm/ulmConclusions.Mod | 12 +- src/library/ulm/ulmConditions.Mod | 44 ++-- src/library/ulm/ulmConstStrings.Mod | 50 ++-- src/library/ulm/ulmEvents.Mod | 30 +-- src/library/ulm/ulmIO.Mod | 38 +-- src/library/ulm/ulmIntOperations.Mod | 18 +- src/library/ulm/ulmMC68881.Mod | 56 ++--- src/library/ulm/ulmNetIO.Mod | 58 ++--- src/library/ulm/ulmOperations.Mod | 10 +- src/library/ulm/ulmPersistentObjects.Mod | 28 +-- src/library/ulm/ulmPlotters.Mod | 44 ++-- src/library/ulm/ulmPrint.Mod | 292 ++++++++++++----------- src/library/ulm/ulmPriorities.Mod | 4 +- src/library/ulm/ulmProcess.Mod | 6 +- src/library/ulm/ulmRandomGenerators.Mod | 40 ++-- src/library/ulm/ulmReals.Mod | 52 ++-- src/library/ulm/ulmScales.Mod | 20 +- src/library/ulm/ulmServices.Mod | 34 +-- src/library/ulm/ulmSets.Mod | 53 ++-- src/library/ulm/ulmStreamDisciplines.Mod | 12 +- src/library/ulm/ulmStreams.Mod | 28 +-- src/library/ulm/ulmStrings.Mod | 26 +- src/library/ulm/ulmSysConversions.Mod | 74 +++--- src/library/ulm/ulmSysErrors.Mod | 18 +- src/library/ulm/ulmSysIO.Mod | 44 ++-- src/library/ulm/ulmSysStat.Mod | 52 ++-- src/library/ulm/ulmSysTypes.Mod | 12 +- src/library/ulm/ulmTCrypt.Mod | 123 +++++----- src/library/ulm/ulmTimers.Mod | 6 +- src/library/ulm/ulmTimes.Mod | 14 +- src/library/ulm/ulmTypes.Mod | 62 ++--- src/library/ulm/ulmWrite.Mod | 38 +-- src/tools/make/oberon.mk | 2 +- 39 files changed, 733 insertions(+), 723 deletions(-) diff --git a/src/library/ulm/ulmAssertions.Mod b/src/library/ulm/ulmAssertions.Mod index 0f6fe59e..dcceea08 100644 --- a/src/library/ulm/ulmAssertions.Mod +++ b/src/library/ulm/ulmAssertions.Mod @@ -35,7 +35,7 @@ MODULE ulmAssertions; (* general error handling of library routines *) - IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, IO := ulmIO, Priorities := ulmPriorities, RelatedEvents := ulmRelatedEvents, Services := ulmServices; + IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, IO := ulmIO, Priorities := ulmPriorities, RelatedEvents := ulmRelatedEvents, Services := ulmServices, Types := ulmTypes; TYPE Object = Disciplines.Object; diff --git a/src/library/ulm/ulmAsymmetricCiphers.Mod b/src/library/ulm/ulmAsymmetricCiphers.Mod index ba8dfdda..069972bd 100644 --- a/src/library/ulm/ulmAsymmetricCiphers.Mod +++ b/src/library/ulm/ulmAsymmetricCiphers.Mod @@ -30,13 +30,13 @@ MODULE ulmAsymmetricCiphers; (* Michael Szczuka *) (* abstraction for the use of public key ciphers *) - IMPORT BlockCiphers := ulmBlockCiphers, Ciphers := ulmCiphers, NetIO := ulmNetIO, PersistentObjects := ulmPersistentObjects, Services := ulmServices, Streams := ulmStreams; + IMPORT BlockCiphers := ulmBlockCiphers, Ciphers := ulmCiphers, NetIO := ulmNetIO, PersistentObjects := ulmPersistentObjects, Services := ulmServices, Streams := ulmStreams, Types := ulmTypes; CONST composed* = 0; isPrivateKey* = 1; TYPE - CapabilitySet* = SET; + CapabilitySet* = Types.Set; TYPE Cipher* = POINTER TO CipherRec; @@ -66,13 +66,13 @@ MODULE ulmAsymmetricCiphers; (* Michael Szczuka *) (* need to have this in case anyone wants to decrypt something with a public cipher ... *) PROCEDURE Identity(in: Streams.Stream; key: Ciphers.Cipher; - length: INTEGER; out: Streams.Stream) : BOOLEAN; + length: Types.Int32; out: Streams.Stream) : BOOLEAN; BEGIN RETURN Streams.Copy(in, out, length); END Identity; PROCEDURE Init* (key: Cipher; if: Interface; - cap: CapabilitySet; inLength, outLength: INTEGER); + cap: CapabilitySet; inLength, outLength: Types.Int32); BEGIN IF if.decrypt = NIL THEN (* decrypt is not defined, so we have only the public part of a cipher; @@ -122,7 +122,7 @@ MODULE ulmAsymmetricCiphers; (* Michael Szczuka *) END ComposedEncrypt; PROCEDURE ComposedEncryptPart* (in: Streams.Stream; key: Cipher; - length: INTEGER; + length: Types.Int32; out: Streams.Stream) : BOOLEAN; BEGIN RETURN key.asymIf.compencrypt(in, key, length, out); @@ -131,7 +131,7 @@ MODULE ulmAsymmetricCiphers; (* Michael Szczuka *) PROCEDURE ComposedEncryptBlock* (in: Streams.Stream; key: Cipher; out: Streams.Stream) : BOOLEAN; VAR - length : INTEGER; + length : Types.Int32; BEGIN length := BlockCiphers.GetInLength(key); RETURN key.asymIf.compencrypt(in, key, length, out); diff --git a/src/library/ulm/ulmBlockCiphers.Mod b/src/library/ulm/ulmBlockCiphers.Mod index 41e3355c..630b4c91 100644 --- a/src/library/ulm/ulmBlockCiphers.Mod +++ b/src/library/ulm/ulmBlockCiphers.Mod @@ -30,7 +30,7 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) (* abstraction for the use of block ciphers *) - IMPORT Ciphers := ulmCiphers, NetIO := ulmNetIO, PersistentObjects := ulmPersistentObjects, Services := ulmServices, Streams := ulmStreams; + IMPORT Ciphers := ulmCiphers, NetIO := ulmNetIO, PersistentObjects := ulmPersistentObjects, Services := ulmServices, Streams := ulmStreams, Types := ulmTypes; TYPE Cipher* = POINTER TO CipherRec; @@ -38,8 +38,8 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) CipherRec* = RECORD (Ciphers.CipherRec) (* private *) - inLength: INTEGER; - outLength: INTEGER; + inLength: Types.Int32; + outLength: Types.Int32; END; VAR @@ -47,7 +47,7 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) if : PersistentObjects.Interface; PROCEDURE Init* (key: Cipher; if: Ciphers.Interface; - inLength, outLength: INTEGER); + inLength, outLength: Types.Int32); (* init a block cipher with its special interface *) BEGIN Ciphers.Init(key, if); @@ -57,13 +57,13 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) key.outLength := outLength; END Init; - PROCEDURE GetInLength* (key: Cipher) : INTEGER; + PROCEDURE GetInLength* (key: Cipher) : Types.Int32; (* returns the input block length of a block cipher *) BEGIN RETURN key.inLength; END GetInLength; - PROCEDURE GetOutLength* (key: Cipher) : INTEGER; + PROCEDURE GetOutLength* (key: Cipher) : Types.Int32; (* returns the output block length of a block cipher *) BEGIN RETURN key.outLength; @@ -72,7 +72,7 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) PROCEDURE EncryptBlock* (in: Streams.Stream; key: Cipher; out: Streams.Stream) : BOOLEAN; VAR - length : INTEGER; + length : Types.Int32; BEGIN length := GetInLength(key); RETURN Ciphers.EncryptPart(in, key, length, out); @@ -81,7 +81,7 @@ MODULE ulmBlockCiphers; (* Michael Szczuka *) PROCEDURE DecryptBlock* (in: Streams.Stream; key: Cipher; out: Streams.Stream) : BOOLEAN; VAR - length : INTEGER; + length : Types.Int32; BEGIN length := GetOutLength(key); RETURN Ciphers.DecryptPart(in, key, length, out); diff --git a/src/library/ulm/ulmCipherOps.Mod b/src/library/ulm/ulmCipherOps.Mod index f2ef7602..39d951c2 100644 --- a/src/library/ulm/ulmCipherOps.Mod +++ b/src/library/ulm/ulmCipherOps.Mod @@ -30,18 +30,18 @@ MODULE ulmCipherOps; (* Michael Szczuka *) (* useful functions for stream ciphers *) - IMPORT Streams := ulmStreams, SYS := SYSTEM, Write := ulmWrite; + IMPORT Streams := ulmStreams, SYS := SYSTEM, Write := ulmWrite, Types := ulmTypes; PROCEDURE XorByte* (b1, b2: SYS.BYTE) : SYS.BYTE; (* adds two bytes bitwise modulo 2 *) BEGIN - (*RETURN SYS.VAL(SYS.BYTE, SYS.VAL(SET, LONG(b1)) / SYS.VAL(SET, LONG(b2)))*) - RETURN SYS.VAL(SYS.BYTE, SYS.VAL(SET, LONG(LONG(SYS.VAL(SHORTINT, b1)))) - / SYS.VAL(SET, LONG(LONG(SYS.VAL(SHORTINT, b2))))) + (*RETURN SYS.VAL(SYS.BYTE, SYS.VAL(Types.Set, LONG(b1)) / SYS.VAL(Types.Set, LONG(b2)))*) + RETURN SYS.VAL(SYS.BYTE, SYS.VAL(Types.Set, LONG(LONG(SYS.VAL(Types.Int8, b1)))) + / SYS.VAL(Types.Set, LONG(LONG(SYS.VAL(Types.Int8, b2))))) END XorByte; PROCEDURE XorStream* (in1, in2, out: Streams.Stream; - length: INTEGER) : BOOLEAN; + length: Types.Int32) : BOOLEAN; (* adds two streams bitwise modulo 2; restricted to length bytes *) VAR b1, b2, res : SYS.BYTE; diff --git a/src/library/ulm/ulmCiphers.Mod b/src/library/ulm/ulmCiphers.Mod index 95d66aa8..fbd97445 100644 --- a/src/library/ulm/ulmCiphers.Mod +++ b/src/library/ulm/ulmCiphers.Mod @@ -30,14 +30,14 @@ MODULE ulmCiphers; IMPORT Objects := ulmObjects, PersistentObjects := ulmPersistentObjects, PersistentDisciplines := ulmPersistentDisciplines, Services := ulmServices, - Streams := ulmStreams, Write := ulmWrite; + Streams := ulmStreams, Write := ulmWrite, Types := ulmTypes; TYPE Cipher* = POINTER TO CipherRec; TYPE CryptProc* = PROCEDURE (in: Streams.Stream; key: Cipher; - length: INTEGER; out: Streams.Stream) : BOOLEAN; + length: Types.Int32; out: Streams.Stream) : BOOLEAN; TYPE Interface* = POINTER TO InterfaceRec; @@ -77,13 +77,13 @@ BEGIN END Decrypt; PROCEDURE EncryptPart*(in: Streams.Stream; key: Cipher; - length: INTEGER; out: Streams.Stream) : BOOLEAN; + length: Types.Int32; out: Streams.Stream) : BOOLEAN; BEGIN RETURN key.if.encrypt(in, key, length, out); END EncryptPart; PROCEDURE DecryptPart*(in: Streams.Stream; key: Cipher; - length: INTEGER; out: Streams.Stream) : BOOLEAN; + length: Types.Int32; out: Streams.Stream) : BOOLEAN; BEGIN RETURN key.if.decrypt(in, key, length, out); END DecryptPart; diff --git a/src/library/ulm/ulmClocks.Mod b/src/library/ulm/ulmClocks.Mod index d0416cfb..6a72d661 100644 --- a/src/library/ulm/ulmClocks.Mod +++ b/src/library/ulm/ulmClocks.Mod @@ -37,7 +37,7 @@ MODULE ulmClocks; IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, Objects := ulmObjects, Op := ulmOperations, Priorities := ulmPriorities, - RelatedEvents := ulmRelatedEvents, Services := ulmServices, Times := ulmTimes; + RelatedEvents := ulmRelatedEvents, Services := ulmServices, Times := ulmTimes, Types := ulmTypes; TYPE Clock* = POINTER TO ClockRec; @@ -45,7 +45,7 @@ MODULE ulmClocks; CONST settime* = 0; timer* = 1; passed* = 2; TYPE - CapabilitySet* = SET; (* OF [settime..passed] *) + CapabilitySet* = Types.Set; (* OF [settime..passed] *) TYPE GetTimeProc* = PROCEDURE (clock: Clock; VAR time: Times.Time); SetTimeProc* = PROCEDURE (clock: Clock; time: Times.Time); @@ -102,13 +102,13 @@ MODULE ulmClocks; ErrorEventRec* = RECORD (Events.EventRec) - errorcode*: SHORTINT; + errorcode*: Types.Int8; END; VAR errormsg*: ARRAY errorcodes OF Events.Message; error*: Events.EventType; - PROCEDURE Error(clock: Clock; code: SHORTINT); + PROCEDURE Error(clock: Clock; code: Types.Int8); VAR event: ErrorEvent; BEGIN diff --git a/src/library/ulm/ulmConclusions.Mod b/src/library/ulm/ulmConclusions.Mod index 2d0a6ade..7012b15c 100644 --- a/src/library/ulm/ulmConclusions.Mod +++ b/src/library/ulm/ulmConclusions.Mod @@ -39,22 +39,22 @@ MODULE ulmConclusions; *) IMPORT Errors := ulmErrors, Events := ulmEvents, Process := ulmProcess, RelatedEvents := ulmRelatedEvents, StreamDisciplines := ulmStreamDisciplines, - Streams := ulmStreams, Strings := ulmStrings, Write := ulmWrite; + Streams := ulmStreams, Strings := ulmStrings, Write := ulmWrite, Types := ulmTypes; VAR handlerSet*: Errors.HandlerSet; - errors*: INTEGER; (* number of errors *) - fatalcode*: INTEGER; (* exit code on fatal events *) + errors*: Types.Int32; (* number of errors *) + fatalcode*: Types.Int32; (* exit code on fatal events *) (* private variables *) cmdName: Process.Name; (* should be sufficient for a base name *) - cmdNameLen: INTEGER; (* Strings.Len(cmdName) *) + cmdNameLen: Types.Int32; (* Strings.Len(cmdName) *) (* private procedures *) PROCEDURE GeneralHandler(event: Events.Event; kind: Errors.Kind); VAR - width: INTEGER; + width: Types.Int32; BEGIN IF event # NIL THEN Write.IndentS(Streams.stderr); @@ -114,7 +114,7 @@ MODULE ulmConclusions; text: ARRAY OF CHAR); VAR queue: RelatedEvents.Queue; - width: INTEGER; + width: Types.Int32; PROCEDURE ReverseQueue(VAR queue: RelatedEvents.Queue); VAR diff --git a/src/library/ulm/ulmConditions.Mod b/src/library/ulm/ulmConditions.Mod index 2b983470..101d590c 100644 --- a/src/library/ulm/ulmConditions.Mod +++ b/src/library/ulm/ulmConditions.Mod @@ -60,12 +60,12 @@ MODULE ulmConditions; IMPORT Clocks := ulmClocks, Disciplines := ulmDisciplines, Events := ulmEvents, Objects := ulmObjects, Op := ulmOperations, - Priorities := ulmPriorities, Process := ulmProcess, RelatedEvents := ulmRelatedEvents, Scales := ulmScales, Timers := ulmTimers, Times := ulmTimes, SYSTEM; + Priorities := ulmPriorities, Process := ulmProcess, RelatedEvents := ulmRelatedEvents, Scales := ulmScales, Timers := ulmTimers, Times := ulmTimes, SYSTEM, Types := ulmTypes; CONST tags = 64; TYPE - Tag = INTEGER; (* 0..tags-1 *) + Tag = Types.Int32; (* 0..tags-1 *) (* tags are used for the hashs *) VAR nextTag: Tag; (* 0..tags-1, 0..tags-1, ... *) @@ -95,16 +95,16 @@ MODULE ulmConditions; ConditionSetRec* = RECORD (Objects.ObjectRec) - cardinality: INTEGER; + cardinality: Types.Int32; bucket: BucketTable; (* for the iterator *) - next: ConditionList; i: INTEGER; + next: ConditionList; i: Types.Int32; END; CONST select* = 0; timelimit* = 1; async* = 2; timecond* = 3; preconditions* = 4; TYPE - CapabilitySet* = SET; (* OF [select..preconditions] *) + CapabilitySet* = Types.Set; (* OF [select..preconditions] *) TYPE SelectProc* = PROCEDURE (domain: Domain; conditionSet: ConditionSet; time: Times.Time; @@ -159,7 +159,7 @@ MODULE ulmConditions; END; TYPE - GetTimeOfNextTryProc* = PROCEDURE (iteration: INTEGER; + GetTimeOfNextTryProc* = PROCEDURE (iteration: Types.Int32; VAR time: Times.Time); (* return a relative time measure *) VAR @@ -188,7 +188,7 @@ MODULE ulmConditions; getTimeOfNextTry := p; END SetGetTimeOfNextTryProc; - PROCEDURE GetTimeOfNextTry(iteration: INTEGER; VAR time: Times.Time); + PROCEDURE GetTimeOfNextTry(iteration: Types.Int32; VAR time: Times.Time); BEGIN Times.CreateAndSet(time, Times.relative, 0, 1, 0); iteration := iteration DIV 5; @@ -203,7 +203,7 @@ MODULE ulmConditions; PROCEDURE CreateSet*(VAR conditionSet: ConditionSet); VAR - i: INTEGER; + i: Types.Int32; cset: ConditionSet; BEGIN NEW(cset); @@ -226,7 +226,7 @@ MODULE ulmConditions; VAR listp: ConditionList; new: ConditionList; - i: INTEGER; + i: Types.Int32; BEGIN (* check if condition is already present in conditionSet *) i := condition.tag; @@ -245,7 +245,7 @@ MODULE ulmConditions; PROCEDURE Excl*(conditionSet: ConditionSet; condition: Condition); VAR prev, listp: ConditionList; - i: INTEGER; + i: Types.Int32; BEGIN i := condition.tag; listp := conditionSet.bucket[i]; prev := NIL; @@ -282,8 +282,8 @@ MODULE ulmConditions; VAR listp: ConditionList; newelem, newelems: ConditionList; - count: INTEGER; (* # of added elements in newelems *) - i: INTEGER; + count: Types.Int32; (* # of added elements in newelems *) + i: Types.Int32; BEGIN count := 0; i := 0; @@ -320,7 +320,7 @@ MODULE ulmConditions; CreateSet(result); Union(result, set1); Union(result, set2); END Union3; - PROCEDURE Card*(conditionSet: ConditionSet) : INTEGER; + PROCEDURE Card*(conditionSet: ConditionSet) : Types.Int32; BEGIN RETURN conditionSet.cardinality END Card; @@ -334,7 +334,7 @@ MODULE ulmConditions; PROCEDURE GetNextCondition*(conditionSet: ConditionSet; VAR condition: Condition) : BOOLEAN; VAR - i: INTEGER; + i: Types.Int32; BEGIN IF conditionSet.next = NIL THEN i := conditionSet.i; @@ -380,7 +380,7 @@ MODULE ulmConditions; VAR domain: Domain) : BOOLEAN; VAR dom: Domain; - i: INTEGER; + i: Types.Int32; listp: ConditionList; BEGIN dom := NIL; @@ -448,7 +448,7 @@ MODULE ulmConditions; VAR listp: ConditionList; - i: INTEGER; + i: Types.Int32; PROCEDURE CreateList(VAR list: List); BEGIN @@ -555,7 +555,7 @@ MODULE ulmConditions; PROCEDURE SetupAsyncEvents(list: List) : BOOLEAN; VAR elp: Element; - listp: ConditionList; i: INTEGER; + listp: ConditionList; i: Types.Int32; wakeupEvent: WakeupEvent; sendevent: SendEventProc; anythingTrue: BOOLEAN; @@ -603,7 +603,7 @@ MODULE ulmConditions; queue: RelatedEvents.Queue; (* queue of waitErrors *) busyLoop: BOOLEAN; (* TRUE if we have to resort to a busy loop *) wakeupEvent: Events.Event; (* iteration event for busy loops *) - loopCnt: INTEGER; (* number of iterations *) + loopCnt: Types.Int32; (* number of iterations *) nextTime: Times.Time; minTime: Times.Time; minTimeCond: Condition; @@ -679,7 +679,7 @@ MODULE ulmConditions; VAR setOfTrueConditions: ConditionSet; errors: RelatedEvents.Object) : BOOLEAN; VAR - listp: ConditionList; i: INTEGER; + listp: ConditionList; i: Types.Int32; condition: Condition; anythingTrue: BOOLEAN; BEGIN (* TestAndSelect *) @@ -728,7 +728,7 @@ MODULE ulmConditions; PROCEDURE TestAsyncList(list: List) : BOOLEAN; VAR element: Element; - listp: ConditionList; i: INTEGER; + listp: ConditionList; i: Types.Int32; condition: Condition; anythingFound: BOOLEAN; BEGIN @@ -872,7 +872,7 @@ MODULE ulmConditions; VAR setOfTrueConditions: ConditionSet; errors: RelatedEvents.Object); VAR - listp: ConditionList; i: INTEGER; + listp: ConditionList; i: Types.Int32; testSet: ConditionSet; preconds: ConditionSet; domain: Domain; @@ -881,7 +881,7 @@ MODULE ulmConditions; PROCEDURE PretestClosure(testSet, preconds: ConditionSet); VAR - listp: ConditionList; i: INTEGER; + listp: ConditionList; i: Types.Int32; domain: Domain; morePreconditions: ConditionSet; evenMorePreconditions: ConditionSet; diff --git a/src/library/ulm/ulmConstStrings.Mod b/src/library/ulm/ulmConstStrings.Mod index ae62e3b7..61f73a28 100644 --- a/src/library/ulm/ulmConstStrings.Mod +++ b/src/library/ulm/ulmConstStrings.Mod @@ -49,8 +49,7 @@ MODULE ulmConstStrings; (* WORM-device for strings *) - IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, Objects := ulmObjects, Process := ulmProcess, Services := ulmServices, Streams := ulmStreams, Strings := ulmStrings, - Texts := ulmTexts, Types := ulmTypes; + IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, Objects := ulmObjects, Process := ulmProcess, Services := ulmServices, Streams := ulmStreams, Strings := ulmStrings, Texts := ulmTexts, Types := ulmTypes; CONST tabsize = 1031; (* should be a prime number *) @@ -65,7 +64,7 @@ MODULE ulmConstStrings; BufferRec = RECORD buf: ARRAY bufsize OF CHAR; - free: INTEGER; (* buf[free..bufsize-1] is unused *) + free: Types.Int32; (* buf[free..bufsize-1] is unused *) next: Buffer; END; @@ -74,17 +73,17 @@ MODULE ulmConstStrings; RECORD (Disciplines.ObjectRec) (* read-only *) - len-: Streams.Count; (* length of string in bytes *) - hashval-: LONGINT; (* hash value *) + len*: Streams.Count; (* length of string in bytes *) + hashval*: Types.Int32; (* hash value *) (* private part *) domain: Domain; length: Streams.Count; (* private copy of length *) buf: Buffer; (* first buffer containing the string *) - offset: INTEGER; (* offset into buf *) + offset: Types.Int32; (* offset into buf *) next: String; (* list of strings with same hash value *) END; - TYPE + TYPE DomainRec* = RECORD (Disciplines.ObjectRec) @@ -108,7 +107,7 @@ MODULE ulmConstStrings; (Streams.StreamRec) string: String; buf: Buffer; (* current buffer *) - offset: INTEGER; (* index in current buffer *) + offset: Types.Int32; (* index in current buffer *) pos: Streams.Count; (* current position *) END; @@ -121,7 +120,7 @@ MODULE ulmConstStrings; (* === internal procedures =========================================== *) PROCEDURE HashVal(s: Streams.Stream; len: Streams.Count; - VAR hashval, orighashval: LONGINT); + VAR hashval, orighashval: Types.Int32); (* compute the hash value of the first `len' bytes of `s'; the hash value is returned in two variants: hashval: hash value MOD tabsize @@ -130,7 +129,7 @@ MODULE ulmConstStrings; CONST shift = 4; VAR - ordval: INTEGER; + ordval: Types.Int32; ch: CHAR; index: Streams.Count; @@ -159,7 +158,7 @@ MODULE ulmConstStrings; *) VAR ch: CHAR; - buf: Buffer; offset: INTEGER; + buf: Buffer; offset: Types.Int32; index: Streams.Count; BEGIN Streams.SetPos(s, 0); @@ -183,7 +182,7 @@ MODULE ulmConstStrings; END Equal; PROCEDURE Allocate(domain: Domain; len: Streams.Count; - VAR buf: Buffer; VAR offset: INTEGER); + VAR buf: Buffer; VAR offset: Types.Int32); (* allocate space for `len' bytes; `buf' and `offset' are returned, designating the begin of the allocated area; note that @@ -214,9 +213,9 @@ MODULE ulmConstStrings; offset := buf.free; WHILE len > 0 DO IF len <= bufsize - domain.tail.free THEN - INC(domain.tail.free, SHORT(len)); len := 0; + INC(domain.tail.free, len); len := 0; ELSE - DEC(len, bufsize - LONG(domain.tail.free)); + DEC(len, bufsize - domain.tail.free); domain.tail.free := bufsize; NewBuffer; END; @@ -224,7 +223,7 @@ MODULE ulmConstStrings; END Allocate; PROCEDURE CopyString(s: Streams.Stream; length: Streams.Count; - buf: Buffer; offset: INTEGER); + buf: Buffer; offset: Types.Int32); (* copy `length' bytes from `s' to `buf' at the given offset and its subsequent buffers *) @@ -254,7 +253,7 @@ MODULE ulmConstStrings; VAR string: String); (* common part of CloseD and CreateD *) VAR - orighashval, hashval: LONGINT; + orighashval, hashval: Types.Int32; str: String; BEGIN HashVal(s, length, hashval, orighashval); @@ -358,7 +357,7 @@ MODULE ulmConstStrings; s := rs; END Open; - PROCEDURE Compare*(string1, string2: String) : INTEGER; + PROCEDURE Compare*(string1, string2: String) : Types.Int32; (* returns < 0: if string1 < string2 = 0: if string1 = string2 (see note above) > 0: if string1 > string2 @@ -366,10 +365,10 @@ MODULE ulmConstStrings; VAR ch1, ch2: CHAR; buf1, buf2: Buffer; - offset1, offset2: INTEGER; + offset1, offset2: Types.Int32; len1, len2: Streams.Count; - PROCEDURE Next(VAR buf: Buffer; VAR offset: INTEGER; VAR ch: CHAR); + PROCEDURE Next(VAR buf: Buffer; VAR offset: Types.Int32; VAR ch: CHAR); BEGIN ch := buf.buf[offset]; INC(offset); @@ -409,7 +408,7 @@ MODULE ulmConstStrings; VAR len: Streams.Count; buf: Buffer; - offset: INTEGER; + offset: Types.Int32; count: Streams.Count; bytes: Streams.Count; BEGIN @@ -427,7 +426,7 @@ MODULE ulmConstStrings; INC(count, s.count); EXIT END; - INC(count, bytes); DEC(len, bytes); INC(offset, SHORT(bytes)); + INC(count, bytes); DEC(len, bytes); INC(offset, bytes); IF offset >= bufsize THEN buf := buf.next; offset := 0; @@ -441,7 +440,7 @@ MODULE ulmConstStrings; VAR len: Streams.Count; buf: Buffer; - offset: INTEGER; + offset: Types.Int32; index: Streams.Count; BEGIN len := string.length; @@ -480,7 +479,7 @@ MODULE ulmConstStrings; END; END ReadByte; - PROCEDURE ReadBuf(s: Streams.Stream; VAR buf: ARRAY OF Types.Byte(*BYTE*); + PROCEDURE ReadBuf(s: Streams.Stream; VAR buf: ARRAY OF Types.Byte; off, cnt: Streams.Count) : Streams.Count; VAR bytes, max: Streams.Count; @@ -520,7 +519,6 @@ MODULE ulmConstStrings; | Streams.fromStart: realpos := cnt; | Streams.fromPos: realpos := s.pos + cnt; | Streams.fromEnd: realpos := s.string.length + cnt; - ELSE END; IF (realpos < 0) OR (realpos > s.string.length) THEN RETURN FALSE @@ -531,10 +529,10 @@ MODULE ulmConstStrings; END; WHILE s.pos < realpos DO IF realpos - s.pos < bufsize - s.offset THEN - INC(s.offset, SHORT(realpos - s.pos)); + INC(s.offset, realpos - s.pos); s.pos := realpos; ELSE - INC(s.pos, LONG(bufsize - s.offset)); + INC(s.pos, bufsize - s.offset); s.offset := 0; s.buf := s.buf.next; END; diff --git a/src/library/ulm/ulmEvents.Mod b/src/library/ulm/ulmEvents.Mod index 52695762..07deb129 100644 --- a/src/library/ulm/ulmEvents.Mod +++ b/src/library/ulm/ulmEvents.Mod @@ -39,7 +39,7 @@ MODULE ulmEvents; - IMPORT Objects := ulmObjects, Priorities := ulmPriorities, Services := ulmServices, SYS := ulmSYSTEM; + IMPORT Objects := ulmObjects, Priorities := ulmPriorities, Services := ulmServices, SYS := ulmSYSTEM, Types := ulmTypes; TYPE EventType* = POINTER TO EventTypeRec; @@ -51,7 +51,7 @@ MODULE ulmEvents; funcs* = 2; (* call associated event handlers *) TYPE - Reaction* = INTEGER; (* one of default, ignore, or funcs *) + Reaction* = Types.Int32; (* one of default, ignore, or funcs *) Message* = ARRAY 80 OF CHAR; Event* = POINTER TO EventRec; EventRec* = @@ -69,7 +69,7 @@ MODULE ulmEvents; *) EventManager = PROCEDURE (type: EventType; reaction: Reaction); - Priority = INTEGER; (* must be non-negative *) + Priority = Types.Int32; (* must be non-negative *) (* every event with reaction `funcs' has a handler list; the list is in calling order which is reverse to @@ -104,7 +104,7 @@ MODULE ulmEvents; Queue = POINTER TO QueueRec; QueueRec = RECORD - priority: INTEGER; (* queue for this priority *) + priority: Types.Int32; (* queue for this priority *) head, tail: Event; next: Queue; (* queue with lower priority *) END; @@ -125,8 +125,8 @@ MODULE ulmEvents; (* private part *) currentPriority: Priority; priotab: ARRAY priotabsize OF Priority; - priotop: INTEGER; - overflow: INTEGER; (* of priority table *) + priotop: Types.Int32; + overflow: Types.Int32; (* of priority table *) END; CONST @@ -141,7 +141,7 @@ MODULE ulmEvents; ErrorEventRec* = RECORD (EventRec) - errorcode*: SHORTINT; + errorcode*: Types.Int8; END; VAR @@ -151,7 +151,7 @@ MODULE ulmEvents; VAR (* private part *) abort, log, queueHandler: EventHandler; - nestlevel: INTEGER; (* of Raise calls *) + nestlevel: Types.Int32; (* of Raise calls *) queue: Queue; lock: BOOLEAN; (* lock critical operations *) psys: PrioritySystem; (* current priority system *) @@ -173,7 +173,7 @@ MODULE ulmEvents; "negative priority given to Events.SetPriority"; END InitErrorHandling; - PROCEDURE Error(code: SHORTINT); + PROCEDURE Error(code: Types.Int8); VAR event: ErrorEvent; BEGIN NEW(event); event.type := error; @@ -301,10 +301,10 @@ MODULE ulmEvents; (* now QueueHandler will translate partly like BOOLEAN b; handler_EventHandler tmphandler; - LONGINT i, j; - i = (LONGINT)handler; + Types.Int32 i, j; + i = (Types.Int32)handler; tmphandler = handler_NilHandler; - j = (LONGINT)tmphandler; + j = (Types.Int32)tmphandler; b = i != j; *) (* changed because voc cannot compara handler and NilHandler -- noch *) @@ -316,12 +316,12 @@ MODULE ulmEvents; *) VAR b : BOOLEAN; (* noch *) tmphandler : EventHandler; - (*i,j : LONGINT;*) + (*i,j : Types.Int32;*) BEGIN - (*i := SYSTEM.VAL(LONGINT, handler);*) + (*i := SYSTEM.VAL(Types.Int32, handler);*) tmphandler := NilHandler; (*b := tmphandler = handler;*) - (*j := SYSTEM.VAL(LONGINT, tmphandler); + (*j := SYSTEM.VAL(Types.Int32, tmphandler); b := i # j;*) b := handler # tmphandler; (*ASSERT (handler # NilHandler);*) diff --git a/src/library/ulm/ulmIO.Mod b/src/library/ulm/ulmIO.Mod index 162aa127..31aedf8a 100644 --- a/src/library/ulm/ulmIO.Mod +++ b/src/library/ulm/ulmIO.Mod @@ -1,6 +1,6 @@ MODULE ulmIO; - IMPORT SYS := ulmSYSTEM, SYSTEM, Platform; + IMPORT SYS := ulmSYSTEM, SYSTEM, Platform, Types := ulmTypes; CONST nl = 0AX; @@ -11,7 +11,7 @@ MODULE ulmIO; dec = 1; hex = 2; TYPE - Basetype = SHORTINT; (* oct..hex *) + Basetype = Types.Int8; (* oct..hex *) (* basic IO *) @@ -22,7 +22,7 @@ MODULE ulmIO; (* ==================== conversions ================================= *) - PROCEDURE ConvertNumber(num, len: LONGINT; btyp: Basetype; neg: BOOLEAN; + PROCEDURE ConvertNumber(num, len: Types.Int32; btyp: Basetype; neg: BOOLEAN; VAR str: ARRAY OF CHAR); (* conversion of a number into a string of characters *) @@ -36,13 +36,13 @@ MODULE ulmIO; VAR (*digits : ARRAY NumberLen+1 OF CHAR;*) digits : POINTER TO ARRAY OF CHAR; - base : INTEGER; - cnt, ix : INTEGER; - maxlen : LONGINT; - dig : LONGINT; - NumberLen : SHORTINT; + base : Types.Int32; + cnt, ix : Types.Int32; + maxlen : Types.Int32; + dig : Types.Int32; + NumberLen : Types.Int8; BEGIN - IF SIZE(LONGINT) = 8 THEN + IF SIZE(Types.Int32) = 8 THEN NumberLen := 21 ELSE NumberLen := 11 (* default value, corresponds to 32 bit *) @@ -107,7 +107,7 @@ MODULE ulmIO; END; END ConvertNumber; - PROCEDURE ConvertInteger(num: LONGINT; len: INTEGER; VAR str: ARRAY OF + PROCEDURE ConvertInteger(num: Types.Int32; len: Types.Int32; VAR str: ARRAY OF CHAR); (* conversion of an integer decimal number to a string *) BEGIN @@ -119,8 +119,8 @@ MODULE ulmIO; (* PROCEDURE ReadChar(VAR ch: CHAR) : BOOLEAN; CONST read = 3; - (*VAR r0, r1: INTEGER;*) - VAR r0, r1: LONGINT; (* in ulm system INTEGER and LONGINT have the same 4 byte size; -- noch *) + (*VAR r0, r1: Types.Int32;*) + VAR r0, r1: Types.Int32; (* in ulm system Types.Int32 and Types.Int32 have the same 4 byte size; -- noch *) BEGIN RETURN SYS.UNIXCALL(read, r0, r1, 0, SYSTEM.ADR(ch), 1) & (r0 > 0) END ReadChar; @@ -128,7 +128,7 @@ MODULE ulmIO; PROCEDURE ReadChar(VAR ch: CHAR) : BOOLEAN; (* Read one byte, returning success flag *) - VAR error: Platform.ErrorCode; readcount: LONGINT; + VAR error: Platform.ErrorCode; readcount: Types.Int32; BEGIN error := Platform.ReadBuf(Platform.StdIn, ch, readcount); RETURN readcount > 0 @@ -137,8 +137,8 @@ MODULE ulmIO; (* PROCEDURE WriteChar(ch: CHAR) : BOOLEAN; CONST write = 4; - (*VAR r0, r1: INTEGER;*) - VAR r0, r1: LONGINT; (* same here *) + (*VAR r0, r1: Types.Int32;*) + VAR r0, r1: Types.Int32; (* same here *) BEGIN RETURN SYS.UNIXCALL(write, r0, r1, 1, SYSTEM.ADR(ch), 1) END WriteChar; @@ -186,7 +186,7 @@ MODULE ulmIO; END WriteLn; PROCEDURE WriteString*(s: ARRAY OF CHAR); - VAR i: INTEGER; + VAR i: Types.Int32; BEGIN i := 0; WHILE (i < LEN(s)) & (s[i] # 0X) DO @@ -201,14 +201,14 @@ MODULE ulmIO; Done := TRUE; END InitIO; - PROCEDURE WriteInt*(arg: LONGINT); + PROCEDURE WriteInt*(arg: Types.Int32); VAR field: ARRAY 23 OF CHAR; BEGIN (* the field size should be big enough to hold the long number. it was 12 to hold just 32 bit numbers, now it can hold 64 bit numbers; need to be more for 128bit numbers; -- noch *) ConvertInteger(arg, 1, field); WriteString(field); END WriteInt; - PROCEDURE ReadInt*(VAR arg: LONGINT); + PROCEDURE ReadInt*(VAR arg: Types.Int32); VAR ch: CHAR; minus: BOOLEAN; BEGIN @@ -236,7 +236,7 @@ MODULE ulmIO; PROCEDURE ReadLine*(VAR string: ARRAY OF CHAR); VAR - index: INTEGER; + index: Types.Int32; ch: CHAR; ok: BOOLEAN; BEGIN diff --git a/src/library/ulm/ulmIntOperations.Mod b/src/library/ulm/ulmIntOperations.Mod index 3f1799aa..739bb5a4 100644 --- a/src/library/ulm/ulmIntOperations.Mod +++ b/src/library/ulm/ulmIntOperations.Mod @@ -43,16 +43,16 @@ MODULE ulmIntOperations; (* Frank B.J. Fischer *) TYPE CapabilitySet* = Operations.CapabilitySet; - (* SET of [Operations.add..shift] *) + (* Types.Set of [Operations.add..shift] *) IsLargeEnoughForProc* = PROCEDURE (op: Operations.Operand; - n: LONGINT): BOOLEAN; + n: Types.Int32): BOOLEAN; UnsignedProc* = PROCEDURE (op: Operations.Operand): BOOLEAN; IntToOpProc* = PROCEDURE (int32: Types.Int32; VAR op: Operations.Operand); OpToIntProc* = PROCEDURE (op: Operations.Operand; VAR int32: Types.Int32); - Log2Proc* = PROCEDURE (op: Operations.Operand): LONGINT; + Log2Proc* = PROCEDURE (op: Operations.Operand): Types.Int32; OddProc* = PROCEDURE (op: Operations.Operand): BOOLEAN; ShiftProc* = PROCEDURE (op: Operations.Operand; - n: INTEGER): Operations.Operand; + n: Types.Int32): Operations.Operand; IntOperatorProc* = PROCEDURE(op: Operation; op1, op2, op3: Operations.Operand; VAR result: Operations.Operand); @@ -95,7 +95,7 @@ MODULE ulmIntOperations; (* Frank B.J. Fischer *) END Capabilities; - PROCEDURE IsLargeEnoughFor*(op: Operations.Operand; n: LONGINT): BOOLEAN; + PROCEDURE IsLargeEnoughFor*(op: Operations.Operand; n: Types.Int32): BOOLEAN; BEGIN WITH op: Operand DO RETURN op.if.isLargeEnoughFor(op, n) @@ -130,7 +130,7 @@ MODULE ulmIntOperations; (* Frank B.J. Fischer *) END OpToInt; - PROCEDURE Log2*(op: Operations.Operand): LONGINT; + PROCEDURE Log2*(op: Operations.Operand): Types.Int32; BEGIN WITH op: Operand DO RETURN op.if.log2(op) @@ -167,7 +167,7 @@ MODULE ulmIntOperations; (* Frank B.J. Fischer *) END Op; - PROCEDURE Shift*(op1: Operations.Operand; n: INTEGER): Operations.Operand; + PROCEDURE Shift*(op1: Operations.Operand; n: Types.Int32): Operations.Operand; BEGIN WITH op1: Operand DO ASSERT(shift IN op1.caps); @@ -176,14 +176,14 @@ MODULE ulmIntOperations; (* Frank B.J. Fischer *) END Shift; - PROCEDURE Shift2*(VAR op1: Operations.Operand; n: INTEGER); + PROCEDURE Shift2*(VAR op1: Operations.Operand; n: Types.Int32); BEGIN op1 := Shift(op1, n); END Shift2; PROCEDURE Shift3*(VAR result: Operations.Operand; op1: Operations.Operand; - n : INTEGER); + n : Types.Int32); VAR tmpresult: Operations.Operand; BEGIN diff --git a/src/library/ulm/ulmMC68881.Mod b/src/library/ulm/ulmMC68881.Mod index 4bcf69a0..fc3986d0 100644 --- a/src/library/ulm/ulmMC68881.Mod +++ b/src/library/ulm/ulmMC68881.Mod @@ -5,7 +5,7 @@ MODULE ulmMC68881; (* library interface to MC68881 instructions *) - IMPORT SYS := SYSTEM; + IMPORT SYS := SYSTEM, Types := ulmTypes; CONST available* = FALSE; (* TRUE if MC68881 present *) @@ -36,130 +36,130 @@ MODULE ulmMC68881; (* monadic operations *) - PROCEDURE FACOS*(x: LONGREAL) : LONGREAL; + PROCEDURE FACOS*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FACOS; - PROCEDURE FASIN*(x: LONGREAL) : LONGREAL; + PROCEDURE FASIN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FASIN; - PROCEDURE FATAN*(x: LONGREAL) : LONGREAL; + PROCEDURE FATAN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FATAN; - PROCEDURE FATANH*(x: LONGREAL) : LONGREAL; + PROCEDURE FATANH*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FATANH; - PROCEDURE FCOS*(x: LONGREAL) : LONGREAL; + PROCEDURE FCOS*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FCOS; - PROCEDURE FCOSH*(x: LONGREAL) : LONGREAL; + PROCEDURE FCOSH*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FCOSH; - PROCEDURE FETOX*(x: LONGREAL) : LONGREAL; + PROCEDURE FETOX*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FETOX; - PROCEDURE FETOXM1*(x: LONGREAL) : LONGREAL; + PROCEDURE FETOXM1*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FETOXM1; - PROCEDURE FGETEXP*(x: LONGREAL) : LONGREAL; + PROCEDURE FGETEXP*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FGETEXP; - PROCEDURE FGETMAN*(x: LONGREAL) : LONGREAL; + PROCEDURE FGETMAN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FGETMAN; - PROCEDURE FLOG10*(x: LONGREAL) : LONGREAL; + PROCEDURE FLOG10*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FLOG10; - PROCEDURE FLOG2*(x: LONGREAL) : LONGREAL; + PROCEDURE FLOG2*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FLOG2; - PROCEDURE FLOGN*(x: LONGREAL) : LONGREAL; + PROCEDURE FLOGN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FLOGN; - PROCEDURE FLOGNP1*(x: LONGREAL) : LONGREAL; + PROCEDURE FLOGNP1*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FLOGNP1; - PROCEDURE FSIN*(x: LONGREAL) : LONGREAL; + PROCEDURE FSIN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FSIN; - PROCEDURE FSINH*(x: LONGREAL) : LONGREAL; + PROCEDURE FSINH*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FSINH; - PROCEDURE FSQRT*(x: LONGREAL) : LONGREAL; + PROCEDURE FSQRT*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FSQRT; - PROCEDURE FTAN*(x: LONGREAL) : LONGREAL; + PROCEDURE FTAN*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FTAN; - PROCEDURE FTANH*(x: LONGREAL) : LONGREAL; + PROCEDURE FTANH*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FTANH; - PROCEDURE FTENTOX*(x: LONGREAL) : LONGREAL; + PROCEDURE FTENTOX*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FTENTOX; - PROCEDURE FTWOTOX*(x: LONGREAL) : LONGREAL; + PROCEDURE FTWOTOX*(x: Types.Real64) : Types.Real64; BEGIN RETURN ABS(x) END FTWOTOX; - PROCEDURE GetExceptionEnable*(VAR exceptions: SET); + PROCEDURE GetExceptionEnable*(VAR exceptions: Types.Set); BEGIN exceptions := {}; END GetExceptionEnable; - PROCEDURE SetExceptionEnable*(exceptions: SET); + PROCEDURE SetExceptionEnable*(exceptions: Types.Set); BEGIN exceptions := {}; END SetExceptionEnable; - PROCEDURE GetRoundingMode*(VAR precision, mode: INTEGER); + PROCEDURE GetRoundingMode*(VAR precision, mode: Types.Int32); BEGIN precision := 1; mode := 2; END GetRoundingMode; - PROCEDURE SetRoundingMode*(precision, mode: INTEGER); + PROCEDURE SetRoundingMode*(precision, mode: Types.Int32); BEGIN precision := 1; mode := 2; @@ -170,12 +170,12 @@ MODULE ulmMC68881; float must consist of at least floatlen bytes *) - PROCEDURE RealToFloat*(real: LONGREAL; VAR float: ARRAY OF SYS.BYTE); + PROCEDURE RealToFloat*(real: Types.Real64; VAR float: ARRAY OF SYS.BYTE); BEGIN (*SYS.WMOVE(SYS.ADR(real), SYS.ADR(float), floatlen DIV 4);*) END RealToFloat; - PROCEDURE FloatToReal*(float: ARRAY OF SYS.BYTE; VAR real: LONGREAL); + PROCEDURE FloatToReal*(float: ARRAY OF SYS.BYTE; VAR real: Types.Real64); BEGIN (*SYS.WMOVE(SYS.ADR(float), SYS.ADR(real), floatlen DIV 4);*) END FloatToReal; diff --git a/src/library/ulm/ulmNetIO.Mod b/src/library/ulm/ulmNetIO.Mod index b9741f30..3db6887b 100644 --- a/src/library/ulm/ulmNetIO.Mod +++ b/src/library/ulm/ulmNetIO.Mod @@ -64,17 +64,17 @@ MODULE ulmNetIO; ReadBooleanProc* = PROCEDURE (s: Streams.Stream; VAR boolean: BOOLEAN) : BOOLEAN; ReadShortIntProc* = - PROCEDURE (s: Streams.Stream; VAR shortint: SHORTINT) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR shortint: Types.Int8) : BOOLEAN; ReadIntegerProc* = - PROCEDURE (s: Streams.Stream; VAR integer: INTEGER) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR integer: Types.Int32) : BOOLEAN; ReadLongIntProc* = - PROCEDURE (s: Streams.Stream; VAR longint: LONGINT) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR longint: Types.Int32) : BOOLEAN; ReadRealProc* = - PROCEDURE (s: Streams.Stream; VAR real: REAL) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR real: Types.Real32) : BOOLEAN; ReadLongRealProc* = - PROCEDURE (s: Streams.Stream; VAR longreal: LONGREAL) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR longreal: Types.Real64) : BOOLEAN; ReadSetProc* = - PROCEDURE (s: Streams.Stream; VAR set: SET) : BOOLEAN; + PROCEDURE (s: Streams.Stream; VAR set: Types.Set) : BOOLEAN; ReadStringProc* = PROCEDURE (s: Streams.Stream; VAR string: ARRAY OF CHAR) : BOOLEAN; ReadConstStringProc* = @@ -88,17 +88,17 @@ MODULE ulmNetIO; WriteBooleanProc* = PROCEDURE (s: Streams.Stream; boolean: BOOLEAN) : BOOLEAN; WriteShortIntProc* = - PROCEDURE (s: Streams.Stream; shortint: SHORTINT) : BOOLEAN; + PROCEDURE (s: Streams.Stream; shortint: Types.Int8) : BOOLEAN; WriteIntegerProc* = - PROCEDURE (s: Streams.Stream; integer: INTEGER) : BOOLEAN; + PROCEDURE (s: Streams.Stream; integer: Types.Int32) : BOOLEAN; WriteLongIntProc* = - PROCEDURE (s: Streams.Stream; longint: LONGINT) : BOOLEAN; + PROCEDURE (s: Streams.Stream; longint: Types.Int32) : BOOLEAN; WriteRealProc* = - PROCEDURE (s: Streams.Stream; real: REAL) : BOOLEAN; + PROCEDURE (s: Streams.Stream; real: Types.Real32) : BOOLEAN; WriteLongRealProc* = - PROCEDURE (s: Streams.Stream; longreal: LONGREAL) : BOOLEAN; + PROCEDURE (s: Streams.Stream; longreal: Types.Real64) : BOOLEAN; WriteSetProc* = - PROCEDURE (s: Streams.Stream; set: SET) : BOOLEAN; + PROCEDURE (s: Streams.Stream; set: Types.Set) : BOOLEAN; WriteStringProc* = PROCEDURE (s: Streams.Stream; string: ARRAY OF CHAR) : BOOLEAN; WriteConstStringProc* = @@ -154,7 +154,7 @@ MODULE ulmNetIO; PROCEDURE Swap (VAR a : ARRAY OF SYS.BYTE); VAR - i,j : LONGINT; + i,j : Types.Int32; tmp : SYS.BYTE; BEGIN i := 0; j := LEN (a) - 1; @@ -166,8 +166,8 @@ MODULE ulmNetIO; PROCEDURE BitSwap (VAR a : ARRAY OF SYS.BYTE); VAR - i,old, bit : LONGINT; - new : LONGINT; + i,old, bit : Types.Int32; + new : Types.Int32; BEGIN i := 0; @@ -266,7 +266,7 @@ MODULE ulmNetIO; END; END ReadBoolean; - PROCEDURE ReadShortInt*(s: Streams.Stream; VAR shortint: SHORTINT) : BOOLEAN; + PROCEDURE ReadShortInt*(s: Streams.Stream; VAR shortint: Types.Int8) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -277,7 +277,7 @@ MODULE ulmNetIO; END; END ReadShortInt; - PROCEDURE ReadInteger*(s: Streams.Stream; VAR integer: INTEGER) : BOOLEAN; + PROCEDURE ReadInteger*(s: Streams.Stream; VAR integer: Types.Int32) : BOOLEAN; VAR disc: Discipline; ret : BOOLEAN; @@ -293,7 +293,7 @@ MODULE ulmNetIO; END; END ReadInteger; - PROCEDURE ReadLongInt*(s: Streams.Stream; VAR longint: LONGINT) : BOOLEAN; + PROCEDURE ReadLongInt*(s: Streams.Stream; VAR longint: Types.Int32) : BOOLEAN; VAR disc: Discipline; ret : BOOLEAN; @@ -309,7 +309,7 @@ MODULE ulmNetIO; END; END ReadLongInt; - PROCEDURE ReadReal*(s: Streams.Stream; VAR real: REAL) : BOOLEAN; + PROCEDURE ReadReal*(s: Streams.Stream; VAR real: Types.Real32) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -320,7 +320,7 @@ MODULE ulmNetIO; END; END ReadReal; - PROCEDURE ReadLongReal*(s: Streams.Stream; VAR longreal: LONGREAL) : BOOLEAN; + PROCEDURE ReadLongReal*(s: Streams.Stream; VAR longreal: Types.Real64) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -331,7 +331,7 @@ MODULE ulmNetIO; END; END ReadLongReal; - PROCEDURE ReadSet*(s: Streams.Stream; VAR set: SET) : BOOLEAN; + PROCEDURE ReadSet*(s: Streams.Stream; VAR set: Types.Set) : BOOLEAN; VAR disc: Discipline; ret : BOOLEAN; @@ -350,7 +350,7 @@ MODULE ulmNetIO; PROCEDURE ReadString*(s: Streams.Stream; VAR string: ARRAY OF CHAR) : BOOLEAN; VAR disc: Discipline; - ch: CHAR; index: LONGINT; + ch: CHAR; index: Types.Int32; BEGIN IF Seek(s, discID, disc) THEN RETURN disc.if.readString(s, string) @@ -372,7 +372,7 @@ MODULE ulmNetIO; CONST bufsize = 512; VAR - length: LONGINT; + length: Types.Int32; buf: Streams.Stream; ch: CHAR; disc: Discipline; @@ -442,7 +442,7 @@ MODULE ulmNetIO; END; END WriteBoolean; - PROCEDURE WriteShortInt*(s: Streams.Stream; shortint: SHORTINT) : BOOLEAN; + PROCEDURE WriteShortInt*(s: Streams.Stream; shortint: Types.Int8) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -453,7 +453,7 @@ MODULE ulmNetIO; END; END WriteShortInt; - PROCEDURE WriteInteger*(s: Streams.Stream; integer: INTEGER) : BOOLEAN; + PROCEDURE WriteInteger*(s: Streams.Stream; integer: Types.Int32) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -467,7 +467,7 @@ MODULE ulmNetIO; END; END WriteInteger; - PROCEDURE WriteLongInt*(s: Streams.Stream; longint: LONGINT) : BOOLEAN; + PROCEDURE WriteLongInt*(s: Streams.Stream; longint: Types.Int32) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -481,7 +481,7 @@ MODULE ulmNetIO; END; END WriteLongInt; - PROCEDURE WriteReal*(s: Streams.Stream; real: REAL) : BOOLEAN; + PROCEDURE WriteReal*(s: Streams.Stream; real: Types.Real32) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -492,7 +492,7 @@ MODULE ulmNetIO; END; END WriteReal; - PROCEDURE WriteLongReal*(s: Streams.Stream; longreal: LONGREAL) : BOOLEAN; + PROCEDURE WriteLongReal*(s: Streams.Stream; longreal: Types.Real64) : BOOLEAN; VAR disc: Discipline; BEGIN @@ -503,7 +503,7 @@ MODULE ulmNetIO; END; END WriteLongReal; - PROCEDURE WriteSet*(s: Streams.Stream; set: SET) : BOOLEAN; + PROCEDURE WriteSet*(s: Streams.Stream; set: Types.Set) : BOOLEAN; VAR disc: Discipline; BEGIN diff --git a/src/library/ulm/ulmOperations.Mod b/src/library/ulm/ulmOperations.Mod index 617b9808..317b42d8 100644 --- a/src/library/ulm/ulmOperations.Mod +++ b/src/library/ulm/ulmOperations.Mod @@ -44,22 +44,22 @@ MODULE ulmOperations; (* generic support of arithmetic operations *) - IMPORT Events := ulmEvents, Objects := ulmObjects, PersistentDisciplines := ulmPersistentDisciplines, PersistentObjects := ulmPersistentObjects, Services := ulmServices; + IMPORT Events := ulmEvents, Objects := ulmObjects, PersistentDisciplines := ulmPersistentDisciplines, PersistentObjects := ulmPersistentObjects, Services := ulmServices, Types := ulmTypes; CONST add* = 0; sub* = 1; mul* = 2; div* = 3; cmp* = 4; TYPE - Operation* = SHORTINT; (* add..cmp *) + Operation* = Types.Int8; (* add..cmp *) Operand* = POINTER TO OperandRec; TYPE - CapabilitySet* = SET; (* SET OF [add..cmp] *) + CapabilitySet* = Types.Set; (* Types.Set OF [add..cmp] *) CreateProc* = PROCEDURE (VAR op: Operand); (* should call Operations.Init for op *) OperatorProc* = PROCEDURE (op: Operation; op1, op2: Operand; VAR result: Operand); AssignProc* = PROCEDURE (VAR target: Operand; source: Operand); - CompareProc* = PROCEDURE (op1, op2: Operand) : INTEGER; + CompareProc* = PROCEDURE (op1, op2: Operand) : Types.Int32; Interface* = POINTER TO InterfaceRec; InterfaceRec* = RECORD @@ -194,7 +194,7 @@ MODULE ulmOperations; Op(div, op1, op2, result); END Div3; - PROCEDURE Compare*(op1, op2: Operand) : INTEGER; + PROCEDURE Compare*(op1, op2: Operand) : Types.Int32; BEGIN ASSERT(op1.if = op2.if); ASSERT(cmp IN op1.caps); diff --git a/src/library/ulm/ulmPersistentObjects.Mod b/src/library/ulm/ulmPersistentObjects.Mod index c64b4fc0..b34b3645 100644 --- a/src/library/ulm/ulmPersistentObjects.Mod +++ b/src/library/ulm/ulmPersistentObjects.Mod @@ -72,7 +72,7 @@ MODULE ulmPersistentObjects; IMPORT ASCII := ulmASCII, ConstStrings := ulmConstStrings, Disciplines := ulmDisciplines, Errors := ulmErrors, Events := ulmEvents, Forwarders := ulmForwarders, IndirectDisciplines := ulmIndirectDisciplines, Loader := ulmLoader, NetIO := ulmNetIO, Objects := ulmObjects, Priorities := ulmPriorities, - RelatedEvents := ulmRelatedEvents, Services := ulmServices, StreamDisciplines := ulmStreamDisciplines, Streams := ulmStreams, Strings := ulmStrings, Texts := ulmTexts, SYS := SYSTEM; + RelatedEvents := ulmRelatedEvents, Services := ulmServices, StreamDisciplines := ulmStreamDisciplines, Streams := ulmStreams, Strings := ulmStrings, Texts := ulmTexts, SYS := SYSTEM, Types := ulmTypes; CONST maxNameLen = 128; (* max length of data type names *) @@ -123,8 +123,8 @@ MODULE ulmPersistentObjects; maxF = 13; (* maximal valid form code *) TYPE - Mode* = SHORTINT; - Form = SHORTINT; + Mode* = Types.Int8; + Form = Types.Int8; Object* = POINTER TO ObjectRec; Type = POINTER TO TypeRec; @@ -160,7 +160,7 @@ MODULE ulmPersistentObjects; TypeEntry = POINTER TO TypeEntryRec; TypeEntryRec = RECORD - code: LONGINT; + code: Types.Int32; type: Type; next: TypeEntry; END; @@ -185,7 +185,7 @@ MODULE ulmPersistentObjects; baseType: Type; (* the next non-abstract base type *) if: Interface; (* may be = NIL for abstract types *) ifs: InterfaceList; (* list of interfaces in reverse order *) - code: LONGINT; (* unique number *) + code: Types.Int32; (* unique number *) END; (* this list is used for storing the base type list of an object during @@ -201,7 +201,7 @@ MODULE ulmPersistentObjects; (* each error causes an event; the error number is stored in event.errorcode; the associated text can be taken from event.message *) - ErrorCode = SHORTINT; + ErrorCode = Types.Int8; Event = POINTER TO EventRec; EventRec* = RECORD @@ -230,7 +230,7 @@ MODULE ulmPersistentObjects; VAR id: Disciplines.Identifier; - nextTypeCode: LONGINT; (* for the generation of unique numbers *) + nextTypeCode: Types.Int32; (* for the generation of unique numbers *) potype: Services.Type; errormsg*: ARRAY errorcodes OF Events.Message; @@ -298,7 +298,7 @@ MODULE ulmPersistentObjects; PROCEDURE WriteLn(s: Streams.Stream) : BOOLEAN; VAR lineterm: StreamDisciplines.LineTerminator; - width: INTEGER; + width: Types.Int32; BEGIN StreamDisciplines.GetLineTerm(s, lineterm); IF ~WriteString(s, lineterm) THEN RETURN FALSE END; @@ -383,7 +383,7 @@ MODULE ulmPersistentObjects; (* encoding scheme: Object = Form Type Size ObjectInfo . - Form = SHORTINT; + Form = Types.Int8; Type = Code (* codeF *) | Code TypeName (* incrF *) | TypeName (* nameF *) | @@ -397,8 +397,8 @@ MODULE ulmPersistentObjects; PROCEDURE DecodeForm(form: Form; VAR nameGiven, codeGiven, hier, size: BOOLEAN); VAR - typeform: SHORTINT; - sizeform: SHORTINT; + typeform: Types.Int8; + sizeform: Types.Int8; BEGIN typeform := form MOD maskF; sizeform := form DIV maskF; nameGiven := typeform IN {incrF, nameF, hierF, incrhierF}; @@ -410,7 +410,7 @@ MODULE ulmPersistentObjects; PROCEDURE GetModule(name: ARRAY OF CHAR; VAR module: ARRAY OF CHAR); (* get the name of the module where 'name' was defined *) VAR - index: INTEGER; + index: Types.Int32; BEGIN index := 0; WHILE (name[index] # ".") & (name[index] # 0X) & @@ -471,7 +471,7 @@ MODULE ulmPersistentObjects; PROCEDURE ReadType(s: Streams.Stream; VAR type: Type; VAR sentinelFound, unknownTypeFound: BOOLEAN) : BOOLEAN; VAR - code: LONGINT; + code: Types.Int32; entry: TypeEntry; typeName: TypeName; btype: Type; @@ -755,7 +755,7 @@ MODULE ulmPersistentObjects; baseType: Services.Type; member: InterfaceList; bt: Type; - ifval: INTEGER; + ifval: Types.Int32; BEGIN (* check the parameters *) ASSERT(name[0] # 0X); diff --git a/src/library/ulm/ulmPlotters.Mod b/src/library/ulm/ulmPlotters.Mod index 59ee292d..58d1fda6 100644 --- a/src/library/ulm/ulmPlotters.Mod +++ b/src/library/ulm/ulmPlotters.Mod @@ -28,7 +28,7 @@ MODULE ulmPlotters; - IMPORT Events := ulmEvents, Objects := ulmObjects, Resources := ulmResources, Services := ulmServices, SYS := ulmSYSTEM; + IMPORT Events := ulmEvents, Objects := ulmObjects, Resources := ulmResources, Services := ulmServices, SYS := ulmSYSTEM, Types := ulmTypes; TYPE Plotter* = POINTER TO PlotterRec; @@ -41,7 +41,7 @@ MODULE ulmPlotters; longdashed* = 4; lineModes* = 5; TYPE - LineMode* = SHORTINT; (* solid ... *) + LineMode* = Types.Int8; (* solid ... *) CONST setspace* = 0; @@ -50,34 +50,34 @@ MODULE ulmPlotters; linemodes* = 3; linewidth* = 4; TYPE - CapabilitySet* = SET; (* OF setspace, erase ... *) + CapabilitySet* = Types.Set; (* OF setspace, erase ... *) TYPE Description* = POINTER TO DescriptionRec; DescriptionRec* = RECORD (Objects.ObjectRec) - xmin*, ymin, xmax, ymax: INTEGER; (* maximal supported range *) + xmin*, ymin, xmax, ymax: Types.Int32; (* maximal supported range *) END; TYPE GetSpaceProc* = PROCEDURE ( plotter: Plotter; - VAR xmin, ymin, xmax, ymax: INTEGER); + VAR xmin, ymin, xmax, ymax: Types.Int32); SetSpaceProc* = PROCEDURE ( plotter: Plotter; - xmin, ymin, xmax, ymax: INTEGER); + xmin, ymin, xmax, ymax: Types.Int32); EraseProc* = PROCEDURE (plotter: Plotter); - MoveProc* = PROCEDURE (plotter: Plotter; xto, yto: INTEGER); - LineProc* = PROCEDURE (plotter: Plotter; xfrom, yfrom, xto, yto: INTEGER); + MoveProc* = PROCEDURE (plotter: Plotter; xto, yto: Types.Int32); + LineProc* = PROCEDURE (plotter: Plotter; xfrom, yfrom, xto, yto: Types.Int32); ArcProc* = PROCEDURE ( plotter: Plotter; - xcenter, ycenter, xstart, ystart, xend, yend: INTEGER); + xcenter, ycenter, xstart, ystart, xend, yend: Types.Int32); CircleProc* = PROCEDURE ( - plotter: Plotter; xcenter, ycenter, radius: INTEGER); + plotter: Plotter; xcenter, ycenter, radius: Types.Int32); StringProc* = PROCEDURE (plotter: Plotter; str: ARRAY OF CHAR); SetLineModeProc* = PROCEDURE (plotter: Plotter; mode: LineMode); - SetLineWidthProc* = PROCEDURE (plotter: Plotter; width: INTEGER); + SetLineWidthProc* = PROCEDURE (plotter: Plotter; width: Types.Int32); CloseProc* = PROCEDURE (plotter: Plotter); TYPE Interface* = POINTER TO InterfaceRec; @@ -105,7 +105,7 @@ MODULE ulmPlotters; if: Interface; caps: CapabilitySet; desc: Description; - xmin, ymin, xmax, ymax: INTEGER; (* current range *) + xmin, ymin, xmax, ymax: Types.Int32; (* current range *) terminated: BOOLEAN; END; VAR @@ -162,7 +162,7 @@ MODULE ulmPlotters; PROCEDURE GetSpace*(plotter: Plotter; VAR xmin, ymin, - xmax, ymax: INTEGER); + xmax, ymax: Types.Int32); BEGIN xmin := plotter.xmin; xmax := plotter.xmax; @@ -172,7 +172,7 @@ MODULE ulmPlotters; PROCEDURE GetMaxSpace*(plotter: Plotter; VAR xmin, ymin, - xmax, ymax: INTEGER); + xmax, ymax: Types.Int32); BEGIN xmin := plotter.desc.xmin; xmax := plotter.desc.xmax; @@ -182,7 +182,7 @@ MODULE ulmPlotters; PROCEDURE SetSpace*(plotter: Plotter; xmin, ymin, - xmax, ymax: INTEGER); + xmax, ymax: Types.Int32); BEGIN ASSERT((xmin < xmax) & (ymin < ymax)); ASSERT((xmin >= plotter.desc.xmin) & @@ -203,33 +203,33 @@ MODULE ulmPlotters; plotter.if.erase(plotter); END Erase; - PROCEDURE Move*(plotter: Plotter; xto, yto: INTEGER); + PROCEDURE Move*(plotter: Plotter; xto, yto: Types.Int32); BEGIN plotter.if.move(plotter, xto, yto); END Move; - PROCEDURE Cont*(plotter: Plotter; xto, yto: INTEGER); + PROCEDURE Cont*(plotter: Plotter; xto, yto: Types.Int32); BEGIN plotter.if.cont(plotter, xto, yto); END Cont; - PROCEDURE Point*(plotter: Plotter; xpoint, ypoint: INTEGER); + PROCEDURE Point*(plotter: Plotter; xpoint, ypoint: Types.Int32); BEGIN plotter.if.point(plotter, xpoint, ypoint); END Point; - PROCEDURE Line*(plotter: Plotter; xfrom, yfrom, xto, yto: INTEGER); + PROCEDURE Line*(plotter: Plotter; xfrom, yfrom, xto, yto: Types.Int32); BEGIN plotter.if.line(plotter, xfrom, yfrom, xto, yto); END Line; PROCEDURE Arc*(plotter: Plotter; - xcenter, ycenter, xstart, ystart, xend, yend: INTEGER); + xcenter, ycenter, xstart, ystart, xend, yend: Types.Int32); BEGIN plotter.if.arc(plotter, xcenter, ycenter, xstart, ystart, xend, yend); END Arc; - PROCEDURE Circle*(plotter: Plotter; xcenter, ycenter, radius: INTEGER); + PROCEDURE Circle*(plotter: Plotter; xcenter, ycenter, radius: Types.Int32); BEGIN plotter.if.circle(plotter, xcenter, ycenter, radius); END Circle; @@ -246,7 +246,7 @@ MODULE ulmPlotters; plotter.if.setLineMode(plotter, mode); END SetLineMode; - PROCEDURE SetLineWidth*(plotter: Plotter; width: INTEGER); + PROCEDURE SetLineWidth*(plotter: Plotter; width: Types.Int32); BEGIN ASSERT((linewidth IN plotter.caps) & (width > 0)); plotter.if.setLineWidth(plotter, width); diff --git a/src/library/ulm/ulmPrint.Mod b/src/library/ulm/ulmPrint.Mod index 42f5a7fe..a2fb35e0 100644 --- a/src/library/ulm/ulmPrint.Mod +++ b/src/library/ulm/ulmPrint.Mod @@ -35,7 +35,7 @@ ---------------------------------------------------------------------------- *) -MODULE Print; +MODULE ulmPrint; (* formatted printing; Print.F[0-9] prints to Streams.stdout @@ -44,7 +44,7 @@ MODULE Print; *) IMPORT Events := ulmEvents, IEEE := ulmIEEE, Priorities := ulmPriorities, Reals := ulmReals, RelatedEvents := ulmRelatedEvents, StreamDisciplines := ulmStreamDisciplines, - Streams := ulmStreams, SYS := SYSTEM; + Streams := ulmStreams, SYS := SYSTEM, Types := ulmTypes; CONST tooManyArgs* = 0; (* too many arguments given *) @@ -54,15 +54,15 @@ MODULE Print; errors* = 4; TYPE FormatString* = ARRAY 128 OF CHAR; - ErrorCode* = SHORTINT; + ErrorCode* = Types.Int8; ErrorEvent* = POINTER TO ErrorEventRec; ErrorEventRec* = RECORD (Events.EventRec) errorcode*: ErrorCode; format*: FormatString; - errpos*: LONGINT; - nargs*: INTEGER; + errpos*: Types.Int32; + nargs*: Types.Int32; END; VAR error*: Events.EventType; @@ -80,20 +80,20 @@ MODULE Print; "size of argument doesn't conform to the corresponding format element"; END InitErrorHandling; - PROCEDURE Out(out: Streams.Stream; VAR fmt: ARRAY OF CHAR; nargs: INTEGER; - VAR p1,p2,p3,p4,p5,p6,p7,p8,p9: ARRAY OF BYTE; + PROCEDURE Out(out: Streams.Stream; VAR fmt: ARRAY OF CHAR; nargs: Types.Int32; + VAR p1,p2,p3,p4,p5,p6,p7,p8,p9: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); CONST maxargs = 9; (* maximal number of arguments *) - maxargsize = SIZE(LONGREAL); (* maximal arg size (except strings) *) + maxargsize = SIZE(Types.Real64); (* maximal arg size (except strings) *) fmtcmd = "%"; escape = "\"; VAR - arglen: ARRAY maxargs OF LONGINT; - nextarg: INTEGER; - fmtindex: LONGINT; + arglen: ARRAY maxargs OF Types.Int32; + nextarg: Types.Int32; + fmtindex: Types.Int32; fmtchar: CHAR; - hexcharval: LONGINT; + hexcharval: Types.Int32; PROCEDURE Error(errorcode: ErrorCode); VAR @@ -133,7 +133,7 @@ MODULE Print; END; END Unget; - PROCEDURE Write(byte: BYTE); + PROCEDURE Write(byte: SYS.BYTE); BEGIN IF Streams.WriteByte(out, byte) THEN INC(out.count); @@ -143,7 +143,7 @@ MODULE Print; PROCEDURE WriteLn; VAR lineterm: StreamDisciplines.LineTerminator; - i: INTEGER; + i: Types.Int32; BEGIN StreamDisciplines.GetLineTerm(out, lineterm); Write(lineterm[0]); @@ -153,7 +153,7 @@ MODULE Print; END; END WriteLn; - PROCEDURE Int(VAR int: LONGINT; base: INTEGER) : BOOLEAN; + PROCEDURE Int(VAR int: Types.Int32; base: Types.Int32) : BOOLEAN; PROCEDURE ValidDigit(ch: CHAR) : BOOLEAN; BEGIN @@ -179,7 +179,7 @@ MODULE Print; PROCEDURE SetSize; VAR - index: INTEGER; + index: Types.Int32; BEGIN index := 0; WHILE index < nargs DO @@ -193,12 +193,13 @@ MODULE Print; | 6: arglen[index] := LEN(p7); | 7: arglen[index] := LEN(p8); | 8: arglen[index] := LEN(p9); + ELSE END; INC(index); END; END SetSize; - PROCEDURE Access(par: INTEGER; at: LONGINT) : BYTE; + PROCEDURE Access(par: Types.Int32; at: Types.Int32) : SYS.BYTE; BEGIN CASE par OF | 0: RETURN p1[at] @@ -210,11 +211,12 @@ MODULE Print; | 6: RETURN p7[at] | 7: RETURN p8[at] | 8: RETURN p9[at] + ELSE END; END Access; - PROCEDURE Convert(from: INTEGER; VAR to: ARRAY OF BYTE); - VAR i: INTEGER; + PROCEDURE Convert(from: Types.Int32; VAR to: ARRAY OF SYS.BYTE); + VAR i: Types.Int32; BEGIN i := 0; WHILE i < arglen[from] DO @@ -222,23 +224,23 @@ MODULE Print; END; END Convert; - PROCEDURE GetInt(index: INTEGER; VAR long: LONGINT) : BOOLEAN; + PROCEDURE GetInt(index: Types.Int32; VAR long: Types.Int32) : BOOLEAN; (* access index-th parameter (counted from 0); - fails if arglen[index] > SYS.SIZE(LONGINT) + fails if arglen[index] > SYS.SIZE(Types.Int32) *) VAR - short: SHORTINT; + short: Types.Int8; int16: SYS.INT16; - int: INTEGER; + int: Types.Int32; BEGIN - IF arglen[index] = SIZE(SHORTINT) THEN + IF arglen[index] = SIZE(Types.Int8) THEN Convert(index, short); long := short; ELSIF arglen[index] = SIZE(SYS.INT16) THEN Convert(index, int16); long := int16; - ELSIF arglen[index] = SIZE(INTEGER) THEN + ELSIF arglen[index] = SIZE(Types.Int32) THEN Convert(index, int); long := int; - ELSIF arglen[index] = SIZE(LONGINT) THEN + ELSIF arglen[index] = SIZE(Types.Int32) THEN Convert(index, long); ELSE Error(badArgumentSize); @@ -254,9 +256,9 @@ MODULE Print; insert: BOOLEAN; (* insert between sign and 1st digit *) sign: BOOLEAN; (* sign even positive values *) leftaligned: BOOLEAN; (* output left aligned *) - width, scale: LONGINT; + width, scale: Types.Int32; - PROCEDURE NextArg(VAR index: INTEGER) : BOOLEAN; + PROCEDURE NextArg(VAR index: Types.Int32) : BOOLEAN; BEGIN IF nextarg < nargs THEN index := nextarg; INC(nextarg); RETURN TRUE @@ -284,9 +286,9 @@ MODULE Print; RETURN FALSE (* unexpected end *) END Flags; - PROCEDURE FetchInt(VAR int: LONGINT) : BOOLEAN; + PROCEDURE FetchInt(VAR int: Types.Int32) : BOOLEAN; VAR - index: INTEGER; + index: Types.Int32; BEGIN RETURN (fmtchar = "*") & Next() & NextArg(index) & GetInt(index, int) OR @@ -321,9 +323,9 @@ MODULE Print; PROCEDURE Conversion() : BOOLEAN; - PROCEDURE Fill(cnt: LONGINT); + PROCEDURE Fill(cnt: Types.Int32); (* cnt: space used by normal output *) - VAR i: LONGINT; + VAR i: Types.Int32; BEGIN IF cnt < width THEN i := width - cnt; @@ -334,14 +336,14 @@ MODULE Print; END; END Fill; - PROCEDURE FillLeft(cnt: LONGINT); + PROCEDURE FillLeft(cnt: Types.Int32); BEGIN IF ~leftaligned THEN Fill(cnt); END; END FillLeft; - PROCEDURE FillRight(cnt: LONGINT); + PROCEDURE FillRight(cnt: Types.Int32); BEGIN IF leftaligned THEN Fill(cnt); @@ -349,10 +351,10 @@ MODULE Print; END FillRight; PROCEDURE WriteBool(true, false: ARRAY OF CHAR) : BOOLEAN; - VAR index: INTEGER; val: LONGINT; + VAR index: Types.Int32; val: Types.Int32; PROCEDURE WriteString(VAR s: ARRAY OF CHAR); - VAR i, len: INTEGER; + VAR i, len: Types.Int32; BEGIN len := 0; WHILE (len < LEN(s)) & (s[len] # 0X) DO @@ -379,8 +381,8 @@ MODULE Print; PROCEDURE WriteChar() : BOOLEAN; VAR - val: LONGINT; - index: INTEGER; + val: Types.Int32; + index: Types.Int32; BEGIN IF NextArg(index) & GetInt(index, val) & (val >= 0) & (val <= ORD(MAX(CHAR))) THEN @@ -392,21 +394,21 @@ MODULE Print; RETURN FALSE END WriteChar; - PROCEDURE WriteInt(base: INTEGER) : BOOLEAN; + PROCEDURE WriteInt(base: Types.Int32) : BOOLEAN; VAR - index: INTEGER; - val: LONGINT; + index: Types.Int32; + val: Types.Int32; neg: BOOLEAN; (* set by Convert *) buf: ARRAY 12 OF CHAR; (* filled by Convert *) - i: INTEGER; - len: INTEGER; (* space needed for val *) - signcnt: INTEGER; (* =1 if sign printed; else 0 *) + i: Types.Int32; + len: Types.Int32; (* space needed for val *) + signcnt: Types.Int32; (* =1 if sign printed; else 0 *) signch: CHAR; PROCEDURE Convert; VAR - index: INTEGER; - digit: LONGINT; + index: Types.Int32; + digit: Types.Int32; BEGIN neg := val < 0; index := 0; @@ -462,36 +464,36 @@ MODULE Print; CONST defaultscale = 6; VAR - index: INTEGER; - lr: LONGREAL; - r: REAL; - shortint: SHORTINT; int: INTEGER; longint: LONGINT; + index: Types.Int32; + lr: Types.Real64; + r: Types.Real32; + shortint: Types.Int8; int: Types.Int32; longint: Types.Int32; int16: SYS.INT16; long: BOOLEAN; - exponent: INTEGER; - mantissa: LONGREAL; + exponent: Types.Int32; + mantissa: Types.Real64; digits: ARRAY Reals.maxlongdignum OF CHAR; neg: BOOLEAN; - ndigits: INTEGER; - decpt: INTEGER; + ndigits: Types.Int32; + decpt: Types.Int32; - PROCEDURE Print(decpt: INTEGER; withexp: BOOLEAN; exp: INTEGER); + PROCEDURE Print(decpt: Types.Int32; withexp: BOOLEAN; exp: Types.Int32); (* decpt: position of decimal point = 0: just before the digits > 0: after decpt digits < 0: ABS(decpt) zeroes before digits needed *) VAR - needed: INTEGER; (* space needed *) - index: INTEGER; - count: LONGINT; + needed: Types.Int32; (* space needed *) + index: Types.Int32; + count: Types.Int32; - PROCEDURE WriteExp(exp: INTEGER); + PROCEDURE WriteExp(exp: Types.Int32); CONST base = 10; VAR - power: INTEGER; - digit: INTEGER; + power: Types.Int32; + digit: Types.Int32; BEGIN IF long THEN Write("D"); @@ -581,18 +583,18 @@ MODULE Print; BEGIN (* WriteReal *) IF NextArg(index) THEN - IF arglen[index] = SIZE(LONGREAL) THEN + IF arglen[index] = SIZE(Types.Real64) THEN long := TRUE; Convert(index, lr); - ELSIF arglen[index] = SIZE(REAL) THEN + ELSIF arglen[index] = SIZE(Types.Real32) THEN long := FALSE; Convert(index, r); lr := r; - ELSIF arglen[index] = SIZE(LONGINT) THEN + ELSIF arglen[index] = SIZE(Types.Int32) THEN long := FALSE; Convert(index, longint); lr := longint; - ELSIF arglen[index] = SIZE(INTEGER) THEN + ELSIF arglen[index] = SIZE(Types.Int32) THEN long := FALSE; Convert(index, int); lr := int; @@ -600,7 +602,7 @@ MODULE Print; long := FALSE; Convert(index, int16); lr := int16; - ELSIF arglen[index] = SIZE(SHORTINT) THEN + ELSIF arglen[index] = SIZE(Types.Int8) THEN long := FALSE; Convert(index, shortint); lr := shortint; @@ -634,6 +636,7 @@ MODULE Print; ndigits := 1; END; | "g": ndigits := SHORT(scale); + ELSE END; Reals.Digits(mantissa, 10, digits, neg, (* force = *) format # "g", ndigits); @@ -654,6 +657,7 @@ MODULE Print; END; Print(decpt, (* withexp = *) FALSE, 0); END; + ELSE END; RETURN TRUE ELSE @@ -663,16 +667,16 @@ MODULE Print; PROCEDURE WriteString() : BOOLEAN; VAR - index: INTEGER; - i: LONGINT; - byte: BYTE; - len: LONGINT; + index: Types.Int32; + i: Types.Int32; + byte: SYS.BYTE; + len: Types.Int32; BEGIN IF NextArg(index) THEN len := 0; WHILE (len < arglen[index]) & ((scale = -1) OR (len < scale)) & - (CHR(Access(index, len)) # 0X) DO + ((*CHR*)SYS.VAL(CHAR, Access(index, len)) # 0X) DO INC(len); END; FillLeft(len); @@ -755,205 +759,205 @@ MODULE Print; (* === public part ============================================== *) - PROCEDURE F(fmt: ARRAY OF CHAR); - VAR x: INTEGER; + PROCEDURE F*(fmt: ARRAY OF CHAR); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END F; - PROCEDURE F1(fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F1*(fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 1, p1, x,x,x,x,x,x,x,x, NIL); END F1; - PROCEDURE F2(fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F2*(fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 2, p1,p2, x,x,x,x,x,x,x, NIL); END F2; - PROCEDURE F3(fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F3*(fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 3, p1,p2,p3, x,x,x,x,x,x, NIL); END F3; - PROCEDURE F4(fmt: ARRAY OF CHAR; p1, p2, p3, p4: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F4*(fmt: ARRAY OF CHAR; p1, p2, p3, p4: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, NIL); END F4; - PROCEDURE F5(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F5*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, NIL); END F5; - PROCEDURE F6(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F6*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, NIL); END F6; - PROCEDURE F7(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F7*(fmt: ARRAY OF CHAR; p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, NIL); END F7; - PROCEDURE F8(fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE F8*(fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(Streams.stdout, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, NIL); END F8; - PROCEDURE F9(fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE); + PROCEDURE F9*(fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE); BEGIN Out(Streams.stdout, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, NIL); END F9; - PROCEDURE S(out: Streams.Stream; fmt: ARRAY OF CHAR); - VAR x: INTEGER; + PROCEDURE S*(out: Streams.Stream; fmt: ARRAY OF CHAR); + VAR x: Types.Int32; BEGIN Out(out, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END S; - PROCEDURE S1(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S1*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 1, p1, x,x,x,x,x,x,x,x, NIL); END S1; - PROCEDURE S2(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S2*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 2, p1,p2, x,x,x,x,x,x,x, NIL); END S2; - PROCEDURE S3(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S3*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2, p3: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 3, p1,p2,p3, x,x,x,x,x,x, NIL); END S3; - PROCEDURE S4(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S4*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, NIL); END S4; - PROCEDURE S5(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S5*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, NIL); END S5; - PROCEDURE S6(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S6*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, NIL); END S6; - PROCEDURE S7(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S7*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, NIL); END S7; - PROCEDURE S8(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE); - VAR x: INTEGER; + PROCEDURE S8*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE); + VAR x: Types.Int32; BEGIN Out(out, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, NIL); END S8; - PROCEDURE S9(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE); + PROCEDURE S9*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE); BEGIN Out(out, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, NIL); END S9; - PROCEDURE SE(out: Streams.Stream; fmt: ARRAY OF CHAR; + PROCEDURE SE*(out: Streams.Stream; fmt: ARRAY OF CHAR; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 0, x,x,x,x,x,x,x,x,x, NIL); END SE; - PROCEDURE SE1(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF BYTE; + PROCEDURE SE1*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 1, p1, x,x,x,x,x,x,x,x, errors); END SE1; - PROCEDURE SE2(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF BYTE; + PROCEDURE SE2*(out: Streams.Stream; fmt: ARRAY OF CHAR; p1, p2: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 2, p1,p2, x,x,x,x,x,x,x, errors); END SE2; - PROCEDURE SE3(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3: ARRAY OF BYTE; + PROCEDURE SE3*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 3, p1,p2,p3, x,x,x,x,x,x, errors); END SE3; - PROCEDURE SE4(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4: ARRAY OF BYTE; + PROCEDURE SE4*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 4, p1,p2,p3,p4, x,x,x,x,x, errors); END SE4; - PROCEDURE SE5(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5: ARRAY OF BYTE; + PROCEDURE SE5*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 5, p1,p2,p3,p4,p5, x,x,x,x, errors); END SE5; - PROCEDURE SE6(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6: ARRAY OF BYTE; + PROCEDURE SE6*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 6, p1,p2,p3,p4,p5,p6, x,x,x, errors); END SE6; - PROCEDURE SE7(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7: ARRAY OF BYTE; + PROCEDURE SE7*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 7, p1,p2,p3,p4,p5,p6,p7, x,x, errors); END SE7; - PROCEDURE SE8(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF BYTE; + PROCEDURE SE8*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); - VAR x: INTEGER; + VAR x: Types.Int32; BEGIN Out(out, fmt, 8, p1,p2,p3,p4,p5,p6,p7,p8, x, errors); END SE8; - PROCEDURE SE9(out: Streams.Stream; fmt: ARRAY OF CHAR; - p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF BYTE; + PROCEDURE SE9*(out: Streams.Stream; fmt: ARRAY OF CHAR; + p1, p2, p3, p4, p5, p6, p7, p8, p9: ARRAY OF SYS.BYTE; errors: RelatedEvents.Object); BEGIN Out(out, fmt, 9, p1,p2,p3,p4,p5,p6,p7,p8,p9, errors); @@ -961,4 +965,4 @@ MODULE Print; BEGIN InitErrorHandling; -END Print. +END ulmPrint. diff --git a/src/library/ulm/ulmPriorities.Mod b/src/library/ulm/ulmPriorities.Mod index e171907a..a308df8f 100644 --- a/src/library/ulm/ulmPriorities.Mod +++ b/src/library/ulm/ulmPriorities.Mod @@ -49,7 +49,7 @@ MODULE ulmPriorities; - gap defines the minimum distance between two priority regions defined in this module *) - + IMPORT Types := ulmTypes; CONST region* = 10; gap* = 10; @@ -59,7 +59,7 @@ MODULE ulmPriorities; *) TYPE - Priority* = INTEGER; + Priority* = Types.Int32; VAR (* current priority at begin of execution (after init of Events); diff --git a/src/library/ulm/ulmProcess.Mod b/src/library/ulm/ulmProcess.Mod index 20bb5186..ce4ce70f 100644 --- a/src/library/ulm/ulmProcess.Mod +++ b/src/library/ulm/ulmProcess.Mod @@ -36,7 +36,7 @@ MODULE ulmProcess; - IMPORT Events := ulmEvents, Priorities := ulmPriorities; + IMPORT Events := ulmEvents, Priorities := ulmPriorities, Types := ulmTypes; (* user readable name of our process *) TYPE @@ -48,7 +48,7 @@ MODULE ulmProcess; (* exit codes *) TYPE - ExitCode* = INTEGER; + ExitCode* = Types.Int32; VAR indicateSuccess*: ExitCode; indicateFailure*: ExitCode; @@ -83,7 +83,7 @@ MODULE ulmProcess; (* private declarations *) VAR handlers: Interface; - nestlevel: INTEGER; + nestlevel: Types.Int32; PROCEDURE SetHandlers*(if: Interface); BEGIN diff --git a/src/library/ulm/ulmRandomGenerators.Mod b/src/library/ulm/ulmRandomGenerators.Mod index f1aa36de..baa0219e 100644 --- a/src/library/ulm/ulmRandomGenerators.Mod +++ b/src/library/ulm/ulmRandomGenerators.Mod @@ -74,7 +74,7 @@ MODULE ulmRandomGenerators; Sequence* = POINTER TO SequenceRec; Int32ValSProc* = PROCEDURE (sequence: Sequence): Types.Int32; - LongRealValSProc* = PROCEDURE (sequence: Sequence): LONGREAL; + LongRealValSProc* = PROCEDURE (sequence: Sequence): Types.Real64; RewindSequenceProc* = PROCEDURE (sequence: Sequence); RestartSequenceProc* = PROCEDURE (sequence, seed: Sequence); SetValSProc* = PROCEDURE (sequence: Sequence; value: Operations.Operand); @@ -83,7 +83,7 @@ MODULE ulmRandomGenerators; int32ValS* = 0; longRealValS* = 1; rewindSequence* = 2; restartSequence* = 3; TYPE - CapabilitySet* = SET; (* of [int32ValS..restartSequence] *) + CapabilitySet* = Types.Set; (* of [int32ValS..restartSequence] *) Interface* = POINTER TO InterfaceRec; InterfaceRec* = RECORD @@ -127,8 +127,8 @@ MODULE ulmRandomGenerators; DefaultSequenceRec = RECORD (SequenceRec) - seed1, seed2: LONGINT; - value1, value2: LONGINT; + seed1, seed2: Types.Int32; + value1, value2: Types.Int32; END; ServiceDiscipline = POINTER TO ServiceDisciplineRec; @@ -146,9 +146,9 @@ MODULE ulmRandomGenerators; (* ----- bug workaround ----- *) - PROCEDURE Entier(value: LONGREAL): LONGINT; + PROCEDURE Entier(value: Types.Real64): Types.Int32; VAR - result: LONGINT; + result: Types.Int32; BEGIN result := ENTIER(value); IF result > value THEN @@ -193,12 +193,12 @@ MODULE ulmRandomGenerators; sequence.if.restartSequence(sequence, seed); END RestartSequence; - PROCEDURE ^ LongRealValS*(sequence: Sequence): LONGREAL; + PROCEDURE ^ LongRealValS*(sequence: Sequence): Types.Real64; PROCEDURE Int32ValS*(sequence: Sequence): Types.Int32; (* get random 32-bit value from sequence *) VAR - real: LONGREAL; + real: Types.Real64; BEGIN IF int32ValS IN sequence.caps THEN RETURN sequence.if.int32ValS(sequence) @@ -214,7 +214,7 @@ MODULE ulmRandomGenerators; RETURN Int32ValS(std); END Int32Val; - PROCEDURE LongRealValS*(sequence: Sequence): LONGREAL; + PROCEDURE LongRealValS*(sequence: Sequence): Types.Real64; (* get a uniformly distributed longreal value in [0..1) *) BEGIN IF longRealValS IN sequence.caps THEN @@ -225,32 +225,32 @@ MODULE ulmRandomGenerators; END; END LongRealValS; - PROCEDURE LongRealVal*(): LONGREAL; + PROCEDURE LongRealVal*(): Types.Real64; (* get a uniformly distributed longreal value in [0..1) *) BEGIN RETURN LongRealValS(std) END LongRealVal; - PROCEDURE RealValS*(sequence: Sequence): REAL; + PROCEDURE RealValS*(sequence: Sequence): Types.Real32; (* get a uniformly distributed real value in [0..1) *) BEGIN RETURN SHORT(LongRealValS(sequence)) END RealValS; - PROCEDURE RealVal*(): REAL; + PROCEDURE RealVal*(): Types.Real32; (* get a uniformly distributed real value in [0..1) *) BEGIN RETURN SHORT(LongRealValS(std)) END RealVal; - PROCEDURE ValS*(sequence: Sequence; low, high: LONGINT): LONGINT; + PROCEDURE ValS*(sequence: Sequence; low, high: Types.Int32): Types.Int32; (* get a uniformly distributed integer in [low..high] *) BEGIN ASSERT(low <= high); RETURN Entier( low + LongRealValS(sequence) * (1. + high - low) ) END ValS; - PROCEDURE Val*(low, high: LONGINT): LONGINT; + PROCEDURE Val*(low, high: Types.Int32): Types.Int32; (* get a uniformly distributed integer in [low..high] *) BEGIN RETURN ValS(std, low, high) @@ -305,7 +305,7 @@ MODULE ulmRandomGenerators; (* ----- DefaultSequence ----- *) - PROCEDURE CongruentialStep(VAR value1, value2: LONGINT); + PROCEDURE CongruentialStep(VAR value1, value2: Types.Int32); BEGIN value1 := factor1 * (value1 MOD quotient1) - remainder1 * (value1 DIV quotient1); @@ -319,9 +319,9 @@ MODULE ulmRandomGenerators; END; END CongruentialStep; - PROCEDURE DefaultSequenceValue(sequence: Sequence): LONGREAL; + PROCEDURE DefaultSequenceValue(sequence: Sequence): Types.Real64; VAR - value: LONGINT; + value: Types.Int32; BEGIN WITH sequence: DefaultSequence DO CongruentialStep(sequence.value1, sequence.value2); @@ -357,12 +357,12 @@ MODULE ulmRandomGenerators; if: Interface; daytime: Times.Time; timeval: Times.TimeValueRec; - count: LONGINT; + count: Types.Int32; - PROCEDURE Hash(str: ARRAY OF CHAR): LONGINT; + PROCEDURE Hash(str: ARRAY OF CHAR): Types.Int32; VAR index, - val: LONGINT; + val: Types.Int32; BEGIN val := 27567352; index := 0; diff --git a/src/library/ulm/ulmReals.Mod b/src/library/ulm/ulmReals.Mod index f941c05a..a646512d 100644 --- a/src/library/ulm/ulmReals.Mod +++ b/src/library/ulm/ulmReals.Mod @@ -33,14 +33,14 @@ MODULE ulmReals; - IMPORT IEEE := ulmIEEE, MC68881 := ulmMC68881; + IMPORT IEEE := ulmIEEE, MC68881 := ulmMC68881, Types := ulmTypes; CONST - (* for REAL *) + (* for Types.Real32 *) maxexp* = 309; minexp* = -323; maxdignum* = 16; - (* for LONGREAL *) + (* for Types.Real64 *) (* maxlongexp = 4932; minlongexp = -4951; @@ -55,30 +55,30 @@ MODULE ulmReals; TYPE PowerRec = RECORD - p10: LONGREAL; - n: INTEGER; + p10: Types.Real64; + n: Types.Int32; END; VAR powtab: ARRAY powers OF PowerRec; - sigdigits: ARRAY maxbase+1 OF INTEGER; (* valid range: [2..maxbase] *) + sigdigits: ARRAY maxbase+1 OF Types.Int32; (* valid range: [2..maxbase] *) - PROCEDURE ExpAndMan*(r: LONGREAL; long: BOOLEAN; base: INTEGER; - VAR exponent: INTEGER; VAR mantissa: LONGREAL); + PROCEDURE ExpAndMan*(r: Types.Real64; long: BOOLEAN; base: Types.Int32; + VAR exponent: Types.Int32; VAR mantissa: Types.Real64); (* get exponent and mantissa from `r': (1.0 >= ABS(mantissa)) & (ABS(mantissa) < base) r = mantissa * base^exponent - long should be false if a REAL-value is passed to `r' + long should be false if a Types.Real32-value is passed to `r' valid values of base: 2, 8, 10, and 16 *) VAR neg: BOOLEAN; - index: INTEGER; - roundoff: LONGREAL; - i: INTEGER; - ndigits: INTEGER; + index: Types.Int32; + roundoff: Types.Real64; + i: Types.Int32; + ndigits: Types.Int32; BEGIN IF r = 0.0 THEN exponent := 0; mantissa := 0; RETURN @@ -164,10 +164,10 @@ MODULE ulmReals; END; END ExpAndMan; - PROCEDURE Power*(base: LONGREAL; exp: INTEGER) : LONGREAL; + PROCEDURE Power*(base: Types.Real64; exp: Types.Int32) : Types.Real64; (* efficient calculation of base^exp *) VAR - r, res: LONGREAL; + r, res: Types.Real64; neg: BOOLEAN; (* negative exponent? *) BEGIN IF MC68881.available & (base = 10) THEN @@ -197,10 +197,10 @@ MODULE ulmReals; END; END Power; - PROCEDURE Digits*(mantissa: LONGREAL; base: INTEGER; + PROCEDURE Digits*(mantissa: Types.Real64; base: Types.Int32; VAR buf: ARRAY OF CHAR; VAR neg: BOOLEAN; - force: BOOLEAN; VAR ndigits: INTEGER); + force: BOOLEAN; VAR ndigits: Types.Int32); (* PRE: mantissa holds the post-condition of ExpAndMan; valid values for base are 2, 8, 10, and 16 @@ -216,11 +216,11 @@ MODULE ulmReals; ndigits is unchanged *) VAR - index: INTEGER; (* of buf *) - i: INTEGER; roundoff: LONGREAL; - lastnz: INTEGER; (* last index with buf[index] # "0" *) + index: Types.Int32; (* of buf *) + i: Types.Int32; roundoff: Types.Real64; + lastnz: Types.Int32; (* last index with buf[index] # "0" *) ch: CHAR; - digit: LONGINT; + digit: Types.Int32; maxdig: CHAR; (* base-1 converted *) BEGIN @@ -269,14 +269,14 @@ MODULE ulmReals; buf[index] := 0X; ndigits := index; END Digits; - PROCEDURE Convert*(digits: ARRAY OF CHAR; base: INTEGER; neg: BOOLEAN; - VAR mantissa: LONGREAL); + PROCEDURE Convert*(digits: ARRAY OF CHAR; base: Types.Int32; neg: BOOLEAN; + VAR mantissa: Types.Real64); (* convert normalized `digits' (decimal point after 1st digit) into `mantissa' *) VAR - index: INTEGER; - factor: LONGREAL; + index: Types.Int32; + factor: Types.Real64; BEGIN IF digits = "0" THEN mantissa := 0; @@ -304,7 +304,7 @@ BEGIN powtab[4].p10 := 1.0D2; powtab[4].n := 2; powtab[5].p10 := 1.0D1; powtab[5].n := 1; - (* for LONGREAL *) + (* for Types.Real64 *) sigdigits[2] := 64; sigdigits[3] := 40; sigdigits[4] := 32; sigdigits[5] := 27; sigdigits[6] := 24; sigdigits[7] := 22; sigdigits[8] := 21; sigdigits[9] := 20; sigdigits[10] := 19; diff --git a/src/library/ulm/ulmScales.Mod b/src/library/ulm/ulmScales.Mod index 12cf5363..25af6eac 100644 --- a/src/library/ulm/ulmScales.Mod +++ b/src/library/ulm/ulmScales.Mod @@ -39,7 +39,7 @@ MODULE ulmScales; IMPORT Disciplines := ulmDisciplines, Events := ulmEvents, Objects := ulmObjects, Operations := ulmOperations, PersistentObjects := ulmPersistentObjects, - RelatedEvents := ulmRelatedEvents, Services := ulmServices, SYS := SYSTEM; + RelatedEvents := ulmRelatedEvents, Services := ulmServices, SYS := SYSTEM, Types := ulmTypes; TYPE Scale* = POINTER TO ScaleRec; @@ -88,25 +88,25 @@ MODULE ulmScales; RECORD (Operations.OperandRec) scale: Scale; - type: SHORTINT; (* absolute or relative? *) + type: Types.Int8; (* absolute or relative? *) END; VAR measureType: Services.Type; TYPE - Value* = LONGINT; + Value* = Types.Int32; CONST add* = Operations.add; sub* = Operations.sub; TYPE - Operation* = SHORTINT; (* add or sub *) + Operation* = Types.Int8; (* add or sub *) TYPE CreateProc* = PROCEDURE (scale: Scale; VAR measure: Measure; abs: BOOLEAN); GetValueProc* = PROCEDURE (measure: Measure; unit: Unit; VAR value: Value); SetValueProc* = PROCEDURE (measure: Measure; unit: Unit; value: Value); AssignProc* = PROCEDURE (target: Measure; source: Measure); OperatorProc* = PROCEDURE (op: Operation; op1, op2, result: Measure); - CompareProc* = PROCEDURE (op1, op2: Measure) : INTEGER; + CompareProc* = PROCEDURE (op1, op2: Measure) : Types.Int32; ConvertProc* = PROCEDURE (from, to: Measure); InterfaceRec* = @@ -183,7 +183,7 @@ MODULE ulmScales; scale.tail := listp; END InitUnit; - PROCEDURE CreateMeasure*(scale: Scale; VAR measure: Measure; type: SHORTINT); + PROCEDURE CreateMeasure*(scale: Scale; VAR measure: Measure; type: Types.Int8); BEGIN scale.if.create(scale, measure, type = absolute); Operations.Init(measure, opif, opcaps); @@ -295,7 +295,7 @@ MODULE ulmScales; RETURN measure.type = relative END IsRelative; - PROCEDURE MeasureType*(measure: Measure) : SHORTINT; + PROCEDURE MeasureType*(measure: Measure) : Types.Int8; BEGIN RETURN measure.type END MeasureType; @@ -372,10 +372,10 @@ MODULE ulmScales; PROCEDURE Op(op: Operations.Operation; op1, op2: Operations.Operand; VAR result: Operations.Operand); VAR - restype: SHORTINT; (* type of result -- set by CheckTypes *) + restype: Types.Int8; (* type of result -- set by CheckTypes *) m1, m2: Measure; - PROCEDURE CheckTypes(VAR restype: SHORTINT); + PROCEDURE CheckTypes(VAR restype: Types.Int8); (* check operands for correct typing; sets restype to the correct result type; *) @@ -419,7 +419,7 @@ MODULE ulmScales; END; END Op; - PROCEDURE Compare(op1, op2: Operations.Operand) : INTEGER; + PROCEDURE Compare(op1, op2: Operations.Operand) : Types.Int32; VAR m1, m2: Measure; BEGIN diff --git a/src/library/ulm/ulmServices.Mod b/src/library/ulm/ulmServices.Mod index 7ec557df..73b80aad 100644 --- a/src/library/ulm/ulmServices.Mod +++ b/src/library/ulm/ulmServices.Mod @@ -31,7 +31,7 @@ MODULE ulmServices; - IMPORT Disciplines := ulmDisciplines, Objects := ulmObjects; + IMPORT Disciplines := ulmDisciplines, Objects := ulmObjects, Types := ulmTypes; TYPE Type* = POINTER TO TypeRec; @@ -84,9 +84,9 @@ MODULE ulmServices; bufsize = 512; (* length of a name buffer in bytes *) tabsize = 1171; TYPE - BufferPosition = INTEGER; - Length = LONGINT; - HashValue = INTEGER; + BufferPosition = Types.Int32; + Length = Types.Int32; + HashValue = Types.Int32; Buffer = ARRAY bufsize OF CHAR; NameList = POINTER TO NameListRec; NameListRec = @@ -116,14 +116,14 @@ MODULE ulmServices; (* ==== name table management ======================================== *) - PROCEDURE Hash(name: ARRAY OF CHAR; length: LONGINT) : HashValue; + PROCEDURE Hash(name: ARRAY OF CHAR; length: Types.Int32) : HashValue; CONST shift = 4; VAR - index: LONGINT; - val: LONGINT; + index: Types.Int32; + val: Types.Int32; ch: CHAR; - ordval: INTEGER; + ordval: Types.Int32; BEGIN index := 0; val := length; WHILE index < length DO @@ -150,9 +150,9 @@ MODULE ulmServices; currentPos := 0; END CreateBuf; - PROCEDURE StringLength(string: ARRAY OF CHAR) : LONGINT; + PROCEDURE StringLength(string: ARRAY OF CHAR) : Types.Int32; VAR - index: LONGINT; + index: Types.Int32; BEGIN index := 0; WHILE (index < LEN(string)) & (string[index] # 0X) DO @@ -163,7 +163,7 @@ MODULE ulmServices; PROCEDURE InitName(name: Type; string: ARRAY OF CHAR); VAR - index, length: LONGINT; + index, length: Types.Int32; firstbuf, buf: NameList; startpos: BufferPosition; BEGIN @@ -195,9 +195,9 @@ MODULE ulmServices; PROCEDURE EqualName(name: Type; string: ARRAY OF CHAR) : BOOLEAN; (* precondition: both have the same length *) VAR - index: LONGINT; + index: Types.Int32; buf: NameList; - pos: INTEGER; + pos: Types.Int32; BEGIN buf := name.begin; pos := name.pos; index := 0; @@ -216,7 +216,7 @@ MODULE ulmServices; PROCEDURE SeekName(string: ARRAY OF CHAR; VAR name: Type) : BOOLEAN; VAR - length: LONGINT; + length: Types.Int32; hashval: HashValue; p: Type; BEGIN @@ -232,9 +232,9 @@ MODULE ulmServices; PROCEDURE ExtractName(name: Type; VAR string: ARRAY OF CHAR); VAR - index: LONGINT; + index: Types.Int32; buf: NameList; - pos: INTEGER; + pos: Types.Int32; BEGIN buf := name.begin; pos := name.pos; index := 0; @@ -331,7 +331,7 @@ MODULE ulmServices; PROCEDURE GetModule(name: ARRAY OF CHAR; VAR module: ARRAY OF CHAR); (* get the name of the module where 'name' was defined *) VAR - index: INTEGER; + index: Types.Int32; BEGIN index := 0; WHILE (name[index] # ".") & (name[index] # 0X) & diff --git a/src/library/ulm/ulmSets.Mod b/src/library/ulm/ulmSets.Mod index 7c75a3ff..a1dcd4df 100644 --- a/src/library/ulm/ulmSets.Mod +++ b/src/library/ulm/ulmSets.Mod @@ -35,15 +35,16 @@ *) MODULE ulmSets; +IMPORT Types := ulmTypes; CONST - setsize* = MAX(SET) + 1; + setsize* = MAX(Types.Set) + 1; TYPE - CharSet* = ARRAY (ORD(MAX(CHAR)) + 1) DIV setsize OF SET; + CharSet* = ARRAY (ORD(MAX(CHAR)) + 1) DIV setsize OF Types.Set; - PROCEDURE InitSet*(VAR set: ARRAY OF SET); - VAR i: LONGINT; + PROCEDURE InitSet*(VAR set: ARRAY OF Types.Set); + VAR i: Types.Int32; BEGIN i := 0; WHILE i < LEN(set) DO @@ -51,8 +52,8 @@ MODULE ulmSets; END; END InitSet; - PROCEDURE Complement*(VAR set: ARRAY OF SET); - VAR i: LONGINT; + PROCEDURE Complement*(VAR set: ARRAY OF Types.Set); + VAR i: Types.Int32; BEGIN i := 0; WHILE i < LEN(set) DO @@ -60,17 +61,17 @@ MODULE ulmSets; END; END Complement; - PROCEDURE In*(VAR set: ARRAY OF SET; i: LONGINT) : BOOLEAN; + PROCEDURE In*(VAR set: ARRAY OF Types.Set; i: Types.Int32) : BOOLEAN; BEGIN RETURN (i MOD setsize) IN set[i DIV setsize] END In; - PROCEDURE Incl*(VAR set: ARRAY OF SET; i: LONGINT); + PROCEDURE Incl*(VAR set: ARRAY OF Types.Set; i: Types.Int32); BEGIN INCL(set[i DIV setsize], i MOD setsize); END Incl; - PROCEDURE Excl*(VAR set: ARRAY OF SET; i: LONGINT); + PROCEDURE Excl*(VAR set: ARRAY OF Types.Set; i: Types.Int32); BEGIN EXCL(set[i DIV setsize], i MOD setsize); END Excl; @@ -90,9 +91,9 @@ MODULE ulmSets; EXCL(charset[ORD(ch) DIV setsize], ORD(ch) MOD setsize); END ExclChar; - PROCEDURE Intersection*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); + PROCEDURE Intersection*(set1, set2: ARRAY OF Types.Set; VAR result: ARRAY OF Types.Set); VAR - index: INTEGER; + index: Types.Int32; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; @@ -102,9 +103,9 @@ MODULE ulmSets; END; END Intersection; - PROCEDURE SymDifference*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); + PROCEDURE SymDifference*(set1, set2: ARRAY OF Types.Set; VAR result: ARRAY OF Types.Set); VAR - index: INTEGER; + index: Types.Int32; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; @@ -114,9 +115,9 @@ MODULE ulmSets; END; END SymDifference; - PROCEDURE Union*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); + PROCEDURE Union*(set1, set2: ARRAY OF Types.Set; VAR result: ARRAY OF Types.Set); VAR - index: INTEGER; + index: Types.Int32; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; @@ -126,9 +127,9 @@ MODULE ulmSets; END; END Union; - PROCEDURE Difference*(set1, set2: ARRAY OF SET; VAR result: ARRAY OF SET); + PROCEDURE Difference*(set1, set2: ARRAY OF Types.Set; VAR result: ARRAY OF Types.Set); VAR - index: INTEGER; + index: Types.Int32; BEGIN ASSERT((LEN(result) = LEN(set1)) & (LEN(result) = LEN(set2))); index := 0; @@ -138,9 +139,9 @@ MODULE ulmSets; END; END Difference; - PROCEDURE Equal*(set1, set2: ARRAY OF SET) : BOOLEAN; + PROCEDURE Equal*(set1, set2: ARRAY OF Types.Set) : BOOLEAN; VAR - index: INTEGER; + index: Types.Int32; BEGIN index := 0; WHILE (index < LEN(set1)) & (index < LEN(set2)) DO @@ -164,9 +165,9 @@ MODULE ulmSets; RETURN TRUE END Equal; - PROCEDURE Subset*(set1, set2: ARRAY OF SET) : BOOLEAN; + PROCEDURE Subset*(set1, set2: ARRAY OF Types.Set) : BOOLEAN; VAR - index: INTEGER; + index: Types.Int32; BEGIN index := 0; WHILE (index < LEN(set1)) & (index < LEN(set2)) DO @@ -184,17 +185,17 @@ MODULE ulmSets; RETURN TRUE END Subset; - PROCEDURE Card*(set: ARRAY OF SET) : INTEGER; + PROCEDURE Card*(set: ARRAY OF Types.Set) : Types.Int32; VAR - index: INTEGER; - i: INTEGER; - card: INTEGER; + index: Types.Int32; + i: Types.Int32; + card: Types.Int32; BEGIN card := 0; index := 0; WHILE index < LEN(set) DO i := 0; - WHILE i <= MAX(SET) DO + WHILE i <= MAX(Types.Set) DO IF i IN set[index] THEN INC(card); END; diff --git a/src/library/ulm/ulmStreamDisciplines.Mod b/src/library/ulm/ulmStreamDisciplines.Mod index 522f9cda..32f56bfe 100644 --- a/src/library/ulm/ulmStreamDisciplines.Mod +++ b/src/library/ulm/ulmStreamDisciplines.Mod @@ -35,7 +35,7 @@ MODULE ulmStreamDisciplines; (* definition of general-purpose disciplines for streams *) - IMPORT ASCII := ulmASCII, Disciplines := ulmIndirectDisciplines, Events := ulmEvents, Sets := ulmSets, Streams := ulmStreams, SYSTEM; + IMPORT ASCII := ulmASCII, Disciplines := ulmIndirectDisciplines, Events := ulmEvents, Sets := ulmSets, Streams := ulmStreams, SYSTEM, Types := ulmTypes; TYPE LineTerminator* = ARRAY 4 OF CHAR; @@ -51,7 +51,7 @@ MODULE ulmStreamDisciplines; fieldseps: Sets.CharSet; fieldsep: CHAR; (* one of them *) whitespace: Sets.CharSet; - indentwidth: INTEGER; + indentwidth: Types.Int32; END; VAR @@ -61,7 +61,7 @@ MODULE ulmStreamDisciplines; defaultFieldSep: CHAR; defaultLineTerm: LineTerminator; defaultWhiteSpace: Sets.CharSet; - defaultIndentWidth: INTEGER; + defaultIndentWidth: Types.Int32; PROCEDURE InitDiscipline(VAR disc: Disciplines.Discipline); VAR @@ -194,7 +194,7 @@ MODULE ulmStreamDisciplines; Disciplines.Add(s, disc); END SetWhiteSpace; - PROCEDURE SetIndentationWidth*(s: Streams.Stream; indentwidth: INTEGER); + PROCEDURE SetIndentationWidth*(s: Streams.Stream; indentwidth: Types.Int32); VAR disc: Disciplines.Discipline; BEGIN @@ -207,7 +207,7 @@ MODULE ulmStreamDisciplines; END; END SetIndentationWidth; - PROCEDURE GetIndentationWidth*(s: Streams.Stream; VAR indentwidth: INTEGER); + PROCEDURE GetIndentationWidth*(s: Streams.Stream; VAR indentwidth: Types.Int32); VAR disc: Disciplines.Discipline; BEGIN @@ -218,7 +218,7 @@ MODULE ulmStreamDisciplines; END; END GetIndentationWidth; - PROCEDURE IncrIndentationWidth*(s: Streams.Stream; incr: INTEGER); + PROCEDURE IncrIndentationWidth*(s: Streams.Stream; incr: Types.Int32); VAR disc: Disciplines.Discipline; BEGIN diff --git a/src/library/ulm/ulmStreams.Mod b/src/library/ulm/ulmStreams.Mod index bb55c3e6..37f25dfd 100644 --- a/src/library/ulm/ulmStreams.Mod +++ b/src/library/ulm/ulmStreams.Mod @@ -144,10 +144,10 @@ MODULE ulmStreams; Address* = Types.Address; Count* = Types.Count; Byte* = Types.Byte; - Whence* = SHORTINT; (* Whence = (fromStart, fromPos, fromEnd); *) - CapabilitySet* = SET; (* OF Capability; *) - BufMode* = SHORTINT; - ErrorCode* = SHORTINT; + Whence* = Types.Int8; (* Whence = (fromStart, fromPos, fromEnd); *) + CapabilitySet* = Types.Set; (* OF Capability; *) + BufMode* = Types.Int8; + ErrorCode* = Types.Int8; Stream* = POINTER TO StreamRec; Message* = RECORD (Objects.ObjectRec) END; @@ -185,8 +185,8 @@ MODULE ulmStreams; BufferPool = POINTER TO BufferPoolRec; BufferPoolRec = RECORD - maxbuf: INTEGER; (* maximal number of buffers to be used *) - nbuf: INTEGER; (* number of buffers in use *) + maxbuf: Types.Int32; (* maximal number of buffers to be used *) + nbuf: Types.Int32; (* number of buffers in use *) bucket: BucketTable; (* list of all buffers sorted after the last access time; tail points to the buffer most recently accessed @@ -230,7 +230,7 @@ MODULE ulmStreams; (Services.ObjectRec) (* following components are set after i/o-operations *) count*: Count; (* resulting count of last operation *) - errors*: INTEGER; (* incremented for each error; may be set to 0 *) + errors*: Types.Int32; (* incremented for each error; may be set to 0 *) error*: BOOLEAN; (* last operation successful? *) lasterror*: ErrorCode; (* error code of last error *) eof*: BOOLEAN; (* last read-operation with count=0 returned *) @@ -367,7 +367,7 @@ MODULE ulmStreams; PROCEDURE InitBufPool(s: Stream); VAR - index: INTEGER; + index: Types.Int32; BEGIN s.bufpool.maxbuf := 16; (* default size *) s.bufpool.nbuf := 0; (* currently, no buffers are allocated *) @@ -379,7 +379,7 @@ MODULE ulmStreams; END; END InitBufPool; - PROCEDURE HashValue(pos: Count) : INTEGER; + PROCEDURE HashValue(pos: Count) : Types.Int32; (* HashValue returns a hash value for pos *) BEGIN RETURN SHORT(pos DIV bufsize) MOD hashtabsize @@ -387,7 +387,7 @@ MODULE ulmStreams; PROCEDURE FindBuffer(s: Stream; pos: Count; VAR buf: Buffer) : BOOLEAN; VAR - index: INTEGER; + index: Types.Int32; bp: Buffer; BEGIN index := HashValue(pos); @@ -410,11 +410,11 @@ MODULE ulmStreams; buf: Buffer; pos: Count; (* buffer boundary for s.pos *) posindex: Count; (* buf[posindex] corresponds to s.pos *) - index: INTEGER; (* index into bucket table of the buffer pool *) + index: Types.Int32; (* index into bucket table of the buffer pool *) PROCEDURE InitBuf(buf: Buffer); VAR - index: INTEGER; (* of bucket table *) + index: Types.Int32; (* of bucket table *) BEGIN buf.ok := TRUE; buf.pos := pos; @@ -612,7 +612,7 @@ MODULE ulmStreams; in.tiedStream := out; END Tie; - PROCEDURE SetBufferPoolSize*(s: Stream; nbuf: INTEGER); + PROCEDURE SetBufferPoolSize*(s: Stream; nbuf: Types.Int32); BEGIN s.error := FALSE; IF SYS.TAS(s.lock) THEN @@ -624,7 +624,7 @@ MODULE ulmStreams; s.lock := FALSE; END SetBufferPoolSize; - PROCEDURE GetBufferPoolSize*(s: Stream; VAR nbuf: INTEGER); + PROCEDURE GetBufferPoolSize*(s: Stream; VAR nbuf: Types.Int32); BEGIN s.error := FALSE; CASE s.bufmode OF diff --git a/src/library/ulm/ulmStrings.Mod b/src/library/ulm/ulmStrings.Mod index 19b64395..56785bf9 100644 --- a/src/library/ulm/ulmStrings.Mod +++ b/src/library/ulm/ulmStrings.Mod @@ -64,7 +64,7 @@ MODULE ulmStrings; posOutside* = 3; (* trunc failure: position beyond trunc pos *) errorcodes* = 4; TYPE - ErrorCode* = SHORTINT; + ErrorCode* = Types.Int8; Event* = POINTER TO EventRec; EventRec* = RECORD @@ -91,13 +91,13 @@ MODULE ulmStrings; (* ======= string to stream operations =========================== *) PROCEDURE WritePart*(stream: Streams.Stream; string: ARRAY OF CHAR; - sourceIndex: LONGINT); + sourceIndex: Types.Int32); (* seek to position 0 of `stream' and copy string[sourceIndex..] to it; the file pointer of `stream' is left on position 0 *) VAR - index: LONGINT; + index: Types.Int32; BEGIN IF ~Streams.Seek(stream, 0, Streams.fromStart) OR ~Streams.Trunc(stream, 0) THEN @@ -122,12 +122,12 @@ MODULE ulmStrings; (* ======= stream to string operations =========================== *) - PROCEDURE ReadPart*(VAR string: ARRAY OF CHAR; destIndex: LONGINT; + PROCEDURE ReadPart*(VAR string: ARRAY OF CHAR; destIndex: Types.Int32; stream: Streams.Stream); (* like `Read' but fill string[destIndex..] *) VAR - len: LONGINT; - endIndex: LONGINT; + len: Types.Int32; + endIndex: Types.Int32; BEGIN len := LEN(string); IF Streams.Seek(stream, 0, Streams.fromStart) & (destIndex < len) THEN @@ -160,8 +160,8 @@ MODULE ulmStrings; PROCEDURE Copy*(VAR destination: ARRAY OF CHAR; source: ARRAY OF CHAR); VAR - index: LONGINT; - minlen: LONGINT; + index: Types.Int32; + minlen: Types.Int32; BEGIN minlen := LEN(destination); IF minlen > LEN(source) THEN @@ -180,8 +180,8 @@ MODULE ulmStrings; destination[index] := 0X; END Copy; - PROCEDURE PartCopy*(VAR destination: ARRAY OF CHAR; destIndex: LONGINT; - source: ARRAY OF CHAR; sourceIndex: LONGINT); + PROCEDURE PartCopy*(VAR destination: ARRAY OF CHAR; destIndex: Types.Int32; + source: ARRAY OF CHAR; sourceIndex: Types.Int32); (* copy source[sourceIndex..] to destination[destIndex..] *) BEGIN WHILE (destIndex+1 < LEN(destination)) & @@ -195,10 +195,10 @@ MODULE ulmStrings; END; END PartCopy; - PROCEDURE Len*(string: ARRAY OF CHAR) : LONGINT; + PROCEDURE Len*(string: ARRAY OF CHAR) : Types.Int32; (* returns the number of characters (without terminating 0X) *) VAR - len: LONGINT; + len: Types.Int32; BEGIN len := 0; WHILE (len < LEN(string)) & (string[len] # 0X) DO @@ -316,7 +316,7 @@ MODULE ulmStrings; PROCEDURE Flush(s: Streams.Stream) : BOOLEAN; VAR - len: LONGINT; + len: Types.Int32; ch: CHAR; BEGIN WITH s: Stream DO diff --git a/src/library/ulm/ulmSysConversions.Mod b/src/library/ulm/ulmSysConversions.Mod index 4da16095..babdab5d 100644 --- a/src/library/ulm/ulmSysConversions.Mod +++ b/src/library/ulm/ulmSysConversions.Mod @@ -38,7 +38,7 @@ MODULE ulmSysConversions; (* convert Oberon records to/from C structures *) IMPORT Events := ulmEvents, Objects := ulmObjects, Priorities := ulmPriorities, Streams := ulmStreams, Strings := ulmStrings, - SYS := SYSTEM, SysTypes := ulmSysTypes, Texts := ulmTexts; + SYS := SYSTEM, SysTypes := ulmSysTypes, Texts := ulmTexts, Types := ulmTypes; TYPE Address* = SysTypes.Address; @@ -66,10 +66,10 @@ MODULE ulmSysConversions; b: SYS.BYTE B: BOOLEAN c: CHAR - s: SHORTINT - i: INTEGER - l: LONGINT - S: SET + s: Types.Int8 + i: Types.Int32 + l: Types.Int32 + S: Types.Set C data types: @@ -90,10 +90,10 @@ MODULE ulmSysConversions; Rec = RECORD - a, b: INTEGER; + a, b: Types.Int32; c: CHAR; - s: SET; - f: ARRAY 3 OF INTEGER; + s: Types.Set; + f: ARRAY 3 OF Types.Int32; END; to @@ -118,7 +118,7 @@ MODULE ulmSysConversions; unsigned = 0; (* suppress sign extension *) boolean = 1; (* convert anything # 0 to 1 *) TYPE - Flags = SET; + Flags = Types.Set; Event* = POINTER TO EventRec; EventRec* = RECORD @@ -134,9 +134,9 @@ MODULE ulmSysConversions; (* 1: Oberon type 2: C type *) - type1, type2: CHAR; length: INTEGER; left: INTEGER; + type1, type2: CHAR; length: Types.Int32; left: Types.Int32; offset1, offset2: Address; - size1, size2: Address; elementsleft: INTEGER; flags: Flags; + size1, size2: Address; elementsleft: Types.Int32; flags: Flags; END; Format* = POINTER TO FormatRec; @@ -192,7 +192,7 @@ MODULE ulmSysConversions; RETURN (ch >= "0") & (ch <= "9") END IsDigit; - PROCEDURE ReadInt(cv: ConvStream; VAR i: INTEGER); + PROCEDURE ReadInt(cv: ConvStream; VAR i: Types.Int32); BEGIN i := 0; REPEAT @@ -219,10 +219,10 @@ MODULE ulmSysConversions; PROCEDURE ScanConv(cv: ConvStream; VAR type1, type2: CHAR; - VAR length: INTEGER) : BOOLEAN; + VAR length: Types.Int32) : BOOLEAN; VAR - i: INTEGER; - factor: INTEGER; + i: Types.Int32; + factor: Types.Int32; BEGIN IF cv.left > 0 THEN type1 := cv.type1; @@ -274,8 +274,8 @@ MODULE ulmSysConversions; PROCEDURE Align(VAR offset: Address; boundary: Address); BEGIN - IF SYS.VAL (INTEGER, offset) MOD SYS.VAL (INTEGER, boundary) # 0 THEN - offset := SYS.VAL (INTEGER, offset) + (SYS.VAL (INTEGER, boundary) - SYS.VAL (INTEGER, offset) MOD SYS.VAL (INTEGER, boundary)); + IF SYS.VAL (Types.Int32, offset) MOD SYS.VAL (Types.Int32, boundary) # 0 THEN + offset := SYS.VAL (Types.Int32, offset) + (SYS.VAL (Types.Int32, boundary) - SYS.VAL (Types.Int32, offset) MOD SYS.VAL (Types.Int32, boundary)); END; END Align; @@ -285,28 +285,28 @@ MODULE ulmSysConversions; VAR flags: Flags) : BOOLEAN; VAR type1, type2: CHAR; - length: INTEGER; + length: Types.Int32; align: BOOLEAN; - boundary: INTEGER; + boundary: Types.Int32; BEGIN IF cv.elementsleft > 0 THEN DEC(cv.elementsleft); (* Oberon type *) IF size1 > SIZE(SYS.BYTE) THEN - Align(cv.offset1, SIZE(INTEGER)); + Align(cv.offset1, SIZE(Types.Int32)); END; - offset1 := cv.offset1; cv.offset1 := SYS.VAL (INTEGER, cv.offset1) + size1; + offset1 := cv.offset1; cv.offset1 := SYS.VAL (Types.Int32, cv.offset1) + size1; size1 := cv.size1; size2 := cv.size2; flags := cv.flags; IF (size1 > 0) & (cv.elementsleft = 0) THEN - Align(cv.offset1, SIZE(INTEGER)); + Align(cv.offset1, SIZE(Types.Int32)); END; (* C type *) IF size2 > 1 THEN Align(cv.offset2, 2); END; - offset2 := cv.offset2; cv.offset2 := SYS.VAL (INTEGER, cv.offset2) + SYS.VAL (INTEGER, size2); + offset2 := cv.offset2; cv.offset2 := SYS.VAL (Types.Int32, cv.offset2) + SYS.VAL (Types.Int32, size2); RETURN TRUE END; @@ -318,21 +318,21 @@ MODULE ulmSysConversions; | "b": size1 := SIZE(SYS.BYTE); INCL(flags, unsigned); | "B": size1 := SIZE(BOOLEAN); INCL(flags, boolean); | "c": size1 := SIZE(CHAR); INCL(flags, unsigned); - | "s": size1 := SIZE(SHORTINT); - | "i": size1 := SIZE(INTEGER); - | "l": size1 := SIZE(LONGINT); - | "S": size1 := SIZE(SET); INCL(flags, unsigned); + | "s": size1 := SIZE(Types.Int8); + | "i": size1 := SIZE(Types.Int32); + | "l": size1 := SIZE(Types.Int32); + | "S": size1 := SIZE(Types.Set); INCL(flags, unsigned); | "-": size1 := 0; ELSE Error(cv, "bad Oberon type specifier"); RETURN FALSE END; IF size1 > 0 THEN IF length > 0 THEN - Align(cv.offset1, SIZE(INTEGER)); + Align(cv.offset1, SIZE(Types.Int32)); ELSIF size1 > SIZE(SYS.BYTE) THEN - Align(cv.offset1, SIZE(INTEGER)); + Align(cv.offset1, SIZE(Types.Int32)); END; END; - offset1 := cv.offset1; cv.offset1 := SYS.VAL (INTEGER, cv.offset1) + size1; + offset1 := cv.offset1; cv.offset1 := SYS.VAL (Types.Int32, cv.offset1) + size1; (* C type *) CASE type2 OF @@ -352,7 +352,7 @@ MODULE ulmSysConversions; IF size2 > 1 THEN Align(cv.offset2, size2); END; - offset2 := cv.offset2; cv.offset2 := SYS.VAL (INTEGER, cv.offset2) + SYS.VAL (INTEGER, size2); + offset2 := cv.offset2; cv.offset2 := SYS.VAL (Types.Int32, cv.offset2) + SYS.VAL (Types.Int32, size2); cv.size1 := size1; cv.size2 := size2; IF length > 0 THEN @@ -371,7 +371,7 @@ MODULE ulmSysConversions; Pointer = POINTER TO Bytes; VAR dest, source: Pointer; - dindex, sindex: INTEGER; + dindex, sindex: Types.Int32; nonzero: BOOLEAN; fill : CHAR; BEGIN @@ -383,7 +383,7 @@ MODULE ulmSysConversions; nonzero := FALSE; WHILE ssize > 0 DO nonzero := nonzero OR (source[sindex] # 0X); - INC(sindex); ssize := SYS.VAL (INTEGER, ssize) - 1; + INC(sindex); ssize := SYS.VAL (Types.Int32, ssize) - 1; END; IF dsize > 0 THEN IF nonzero THEN @@ -395,12 +395,12 @@ MODULE ulmSysConversions; END; WHILE dsize > 0 DO dest[dindex] := 0X; - dsize := SYS.VAL (INTEGER, dsize) - 1; INC(dindex); + dsize := SYS.VAL (Types.Int32, dsize) - 1; INC(dindex); END; ELSE WHILE (dsize > 0) & (ssize > 0) DO dest[dindex] := source[sindex]; - ssize := SYS.VAL (INTEGER, ssize) - 1; + ssize := SYS.VAL (Types.Int32, ssize) - 1; dsize := dsize - 1; INC(dindex); INC(sindex); END; @@ -415,7 +415,7 @@ MODULE ulmSysConversions; END; WHILE dsize > 0 DO dest[dindex] := fill; - dsize := SYS.VAL (INTEGER, dsize) - 1; INC(dindex); + dsize := SYS.VAL (Types.Int32, dsize) - 1; INC(dindex); END; END; END; @@ -475,7 +475,7 @@ MODULE ulmSysConversions; WHILE ReadConv(cv, offset1, offset2, size1, size2, flags) DO END; Close(cv); size := offset1 + size1; - Align(size, SIZE(INTEGER)); + Align(size, SIZE(Types.Int32)); RETURN size END OberonSize; diff --git a/src/library/ulm/ulmSysErrors.Mod b/src/library/ulm/ulmSysErrors.Mod index 0e81818d..ce535744 100644 --- a/src/library/ulm/ulmSysErrors.Mod +++ b/src/library/ulm/ulmSysErrors.Mod @@ -1,6 +1,6 @@ MODULE ulmSysErrors; - IMPORT Errors := ulmErrors, Events := ulmEvents, Priorities := ulmPriorities, RelatedEvents := ulmRelatedEvents, Streams := ulmStreams, Strings := ulmStrings, Sys := ulmSys; + IMPORT Errors := ulmErrors, Events := ulmEvents, Priorities := ulmPriorities, RelatedEvents := ulmRelatedEvents, Streams := ulmStreams, Strings := ulmStrings, Sys := ulmSys, Types := ulmTypes; CONST perm* = 1; @@ -138,8 +138,8 @@ MODULE ulmSysErrors; EventRec* = RECORD (Events.EventRec) - errno*: (*INTEGER*)LONGINT; - syscall*: (*INTEGER*)LONGINT; (* number of system call *) + errno*: (*Types.Int32*)Types.Int32; + syscall*: (*Types.Int32*)Types.Int32; (* number of system call *) text*: ARRAY textlen OF CHAR; END; @@ -150,7 +150,7 @@ MODULE ulmSysErrors; syserror*: ARRAY ncodes OF Events.EventType; PROCEDURE Raise*(errors: RelatedEvents.Object; - errno, syscall: (*INTEGER*)LONGINT; text: ARRAY OF CHAR); (* in ulm's system INTEGER and LONGINT have the same size *) + errno, syscall: (*Types.Int32*)Types.Int32; text: ARRAY OF CHAR); (* in ulm's system Types.Int32 and Types.Int32 have the same size *) (* raises the events syserrors and syserrors[syscall]; `text' contains additional information (e.g. filenames); further, the syserrors[syscall] event is passed to @@ -192,9 +192,9 @@ MODULE ulmSysErrors; IF ~Streams.WriteByte(s, ch) THEN END; END Write; - PROCEDURE WriteInt(intval: LONGINT); + PROCEDURE WriteInt(intval: Types.Int32); VAR - rest: LONGINT; + rest: Types.Int32; BEGIN rest := intval DIV 10; IF rest > 0 THEN @@ -231,7 +231,7 @@ MODULE ulmSysErrors; PROCEDURE InitEvents; VAR - errno: INTEGER; + errno: Types.Int32; BEGIN syserror[0] := NIL; errno := 1; @@ -447,11 +447,11 @@ BEGIN message[netdown] := "Network is down"; name[netunreach] := "ENETUNREACH"; message[netunreach] := "Network is unreachable"; - name[netreset] := "ENETRESET"; + name[netreset] := "ENETRETypes.Set"; message[netreset] := "Network dropped connection because of reset"; name[connaborted] := "ECONNABORTED"; message[connaborted] := "Software caused connection abort"; - name[connreset] := "ECONNRESET"; + name[connreset] := "ECONNRETypes.Set"; message[connreset] := "Connection reset by peer"; name[nobufs] := "ENOBUFS"; message[nobufs] := "No buffer space available"; diff --git a/src/library/ulm/ulmSysIO.Mod b/src/library/ulm/ulmSysIO.Mod index 2a22d29f..3274efda 100644 --- a/src/library/ulm/ulmSysIO.Mod +++ b/src/library/ulm/ulmSysIO.Mod @@ -33,7 +33,7 @@ MODULE ulmSysIO; IMPORT RelatedEvents := ulmRelatedEvents, Sys := ulmSys, SYS := SYSTEM, ulmSYSTEM, SysErrors := ulmSysErrors, SysTypes := ulmSysTypes, - Platform; + Platform, Types := ulmTypes; CONST (* file control options: arguments of Fcntl and Open *) @@ -79,11 +79,11 @@ MODULE ulmSysIO; File* = SysTypes.File; (* file descriptor *) Address* = SysTypes.Address; Count* = SysTypes.Count; - Protection* = LONGINT; - Whence* = LONGINT; + Protection* = Types.Int32; + Whence* = Types.Int32; PROCEDURE OpenCreat*(VAR fd: File; - filename: ARRAY OF CHAR; options: SET; + filename: ARRAY OF CHAR; options: Types.Set; protection: Protection; errors: RelatedEvents.Object; retry: BOOLEAN; VAR interrupted: BOOLEAN) : BOOLEAN; @@ -110,7 +110,7 @@ MODULE ulmSysIO; END OpenCreat; PROCEDURE Open*(VAR fd: File; - filename: ARRAY OF CHAR; options: SET; + filename: ARRAY OF CHAR; options: Types.Set; errors: RelatedEvents.Object; retry: BOOLEAN; VAR interrupted: BOOLEAN) : BOOLEAN; (* the filename must be 0X-terminated *) @@ -196,7 +196,7 @@ MODULE ulmSysIO; PROCEDURE Seek*(fd: File; offset: Count; whence: Whence; errors: RelatedEvents.Object) : BOOLEAN; VAR - error: Platform.ErrorCode; relativity: INTEGER; + error: Platform.ErrorCode; relativity: Types.Int16; BEGIN CASE whence OF |fromPos: relativity := Platform.SeekCur @@ -216,7 +216,7 @@ MODULE ulmSysIO; PROCEDURE Tell*(fd: File; VAR offset: Count; errors: RelatedEvents.Object) : BOOLEAN; VAR - d0, d1: LONGINT; + d0, d1: Types.Int32; BEGIN IF ulmSYSTEM.UNIXCALL(Sys.lseek, d0, d1, fd, 0, fromPos) THEN offset := d0; @@ -232,17 +232,17 @@ MODULE ulmSysIO; sizeofStructTermIO = 18; tcgeta = 00005405H; VAR - d0, d1: LONGINT; + d0, d1: Types.Int32; buf: ARRAY 32 OF SYS.BYTE; (* Should be more than sufficient *) BEGIN (* following system call fails for non-tty's *) RETURN ulmSYSTEM.UNIXCALL(Sys.ioctl, d0, d1, fd, tcgeta, SYS.ADR(buf)) END Isatty; - PROCEDURE Fcntl*(fd: File; request: INTEGER; VAR arg: LONGINT; + PROCEDURE Fcntl*(fd: File; request: Types.Int32; VAR arg: Types.Int32; errors: RelatedEvents.Object; retry: BOOLEAN; VAR interrupted: BOOLEAN) : BOOLEAN; VAR - d0, d1: LONGINT; + d0, d1: Types.Int32; BEGIN interrupted := FALSE; LOOP @@ -261,15 +261,15 @@ MODULE ulmSysIO; END; END Fcntl; - PROCEDURE FcntlSet*(fd: File; request: INTEGER; flags: SET; + PROCEDURE FcntlSet*(fd: File; request: Types.Int32; flags: Types.Set; errors: RelatedEvents.Object; retry: BOOLEAN; VAR interrupted: BOOLEAN) : BOOLEAN; VAR - d0, d1: LONGINT; + d0, d1: Types.Int32; BEGIN interrupted := FALSE; LOOP - IF ulmSYSTEM.UNIXCALL(Sys.fcntl, d0, d1, fd, request, SYS.VAL(LONGINT, flags)) THEN + IF ulmSYSTEM.UNIXCALL(Sys.fcntl, d0, d1, fd, request, SYS.VAL(Types.Int32, flags)) THEN RETURN TRUE ELSE IF d0 = SysErrors.intr THEN @@ -283,10 +283,10 @@ MODULE ulmSysIO; END; END FcntlSet; - PROCEDURE FcntlGet*(fd: File; request: INTEGER; VAR flags: SET; + PROCEDURE FcntlGet*(fd: File; request: Types.Int32; VAR flags: Types.Set; errors: RelatedEvents.Object) : BOOLEAN; VAR - d0, d1: LONGINT; + d0, d1: Types.Int32; BEGIN IF ulmSYSTEM.UNIXCALL(Sys.fcntl, d0, d1, fd, request, 0) THEN ulmSYSTEM.WMOVE(SYS.ADR(d0), SYS.ADR(flags), 1); @@ -300,8 +300,8 @@ MODULE ulmSysIO; PROCEDURE Dup*(fd: File; VAR newfd: File; errors: RelatedEvents.Object) : BOOLEAN; VAR - d0, d1: LONGINT; - a0, a1: LONGINT; + d0, d1: Types.Int32; + a0, a1: Types.Int32; BEGIN a0 := 0; a1 := 0; (* Initialised to disable compiler warning. *) IF ulmSYSTEM.UNIXCALL(Sys.dup, d0, d1, fd, a0, a1) THEN @@ -315,8 +315,8 @@ MODULE ulmSysIO; PROCEDURE Dup2*(fd, newfd: File; errors: RelatedEvents.Object) : BOOLEAN; VAR - d0, d1: LONGINT; - a0, a1: LONGINT; + d0, d1: Types.Int32; + a0, a1: Types.Int32; fd2: File; interrupted: BOOLEAN; BEGIN @@ -338,9 +338,9 @@ MODULE ulmSysIO; PROCEDURE Pipe*(VAR readfd, writefd: File; errors: RelatedEvents.Object) : BOOLEAN; VAR - d0, d1: LONGINT; - a0, a1: LONGINT; - fds : ARRAY 2 OF (*File*)INTEGER; (* it needs int pipefd[2], and int is 4 bytes long on x86_64 -- noch *) + d0, d1: Types.Int32; + a0, a1: Types.Int32; + fds : ARRAY 2 OF (*File*)Types.Int32; (* it needs int pipefd[2], and int is 4 bytes long on x86_64 -- noch *) BEGIN a0 := 0; a1 := 0; (* Initialised to disable compiler warning. *) IF ulmSYSTEM.UNIXCALL(Sys.pipe, d0, d1, SYS.ADR (fds), a0, a1) THEN diff --git a/src/library/ulm/ulmSysStat.Mod b/src/library/ulm/ulmSysStat.Mod index f9aaa507..addb33f2 100644 --- a/src/library/ulm/ulmSysStat.Mod +++ b/src/library/ulm/ulmSysStat.Mod @@ -40,7 +40,7 @@ MODULE ulmSysStat; (* examine inode: stat(2) and fstat(2) *) IMPORT RelatedEvents := ulmRelatedEvents, Sys := ulmSys, SYS := SYSTEM, uSYS := ulmSYSTEM, SysConversions := ulmSysConversions, SysErrors := ulmSysErrors, - SysTypes := ulmSysTypes; + SysTypes := ulmSysTypes, Types := ulmTypes; CONST (* file mode: @@ -96,17 +96,17 @@ MODULE ulmSysStat; device*: SysTypes.Device; (* ID of device containing a directory entry for this file *) inode*: SysTypes.Inode; (* inode number *) - mode*: SET; (* file mode; see mknod(2) *) - nlinks*: LONGINT; (* number of links *) - uid*: LONGINT; (* user id of the file's owner *) - gid*: LONGINT; (* group id of the file's group *) + mode*: Types.Set; (* file mode; see mknod(2) *) + nlinks*: Types.Int32; (* number of links *) + uid*: Types.Int32; (* user id of the file's owner *) + gid*: Types.Int32; (* group id of the file's group *) rdev*: SysTypes.Device; (* ID of device. this entry is defined only for character special or block special files *) size*: SysTypes.Offset; (* file size in bytes *) (* Blocks and blksize are not available on all platforms. - blksize*: LONGINT; (* preferred blocksize *) - blocks*: LONGINT; (* # of blocks allocated *) + blksize*: Types.Int32; (* preferred blocksize *) + blocks*: Types.Int32; (* # of blocks allocated *) *) atime*: SysTypes.Time; (* time of last access *) @@ -119,27 +119,27 @@ MODULE ulmSysStat; PROCEDURE -Aerrno '#include '; PROCEDURE -structstats "struct stat s"; - PROCEDURE -statdev(): LONGINT "(LONGINT)s.st_dev"; - PROCEDURE -statino(): LONGINT "(LONGINT)s.st_ino"; - PROCEDURE -statmode(): LONGINT "(LONGINT)s.st_mode"; - PROCEDURE -statnlink(): LONGINT "(LONGINT)s.st_nlink"; - PROCEDURE -statuid(): LONGINT "(LONGINT)s.st_uid"; - PROCEDURE -statgid(): LONGINT "(LONGINT)s.st_gid"; - PROCEDURE -statrdev(): LONGINT "(LONGINT)s.st_rdev"; - PROCEDURE -statsize(): LONGINT "(LONGINT)s.st_size"; - PROCEDURE -statatime(): LONGINT "(LONGINT)s.st_atime"; - PROCEDURE -statmtime(): LONGINT "(LONGINT)s.st_mtime"; - PROCEDURE -statctime(): LONGINT "(LONGINT)s.st_ctime"; + PROCEDURE -statdev(): Types.Int32 "(INT32)s.st_dev"; + PROCEDURE -statino(): Types.Int32 "(INT32)s.st_ino"; + PROCEDURE -statmode(): Types.Int32 "(INT32)s.st_mode"; + PROCEDURE -statnlink(): Types.Int32 "(INT32)s.st_nlink"; + PROCEDURE -statuid(): Types.Int32 "(INT32)s.st_uid"; + PROCEDURE -statgid(): Types.Int32 "(INT32)s.st_gid"; + PROCEDURE -statrdev(): Types.Int32 "(INT32)s.st_rdev"; + PROCEDURE -statsize(): Types.Int32 "(INT32)s.st_size"; + PROCEDURE -statatime(): Types.Int32 "(INT32)s.st_atime"; + PROCEDURE -statmtime(): Types.Int32 "(INT32)s.st_mtime"; + PROCEDURE -statctime(): Types.Int32 "(INT32)s.st_ctime"; (* Blocks and blksize are not available on all platforms. - PROCEDURE -statblksize(): LONGINT "(LONGINT)s.st_blksize"; - PROCEDURE -statblocks(): LONGINT "(LONGINT)s.st_blocks"; + PROCEDURE -statblksize(): Types.Int32 "(Types.Int32)s.st_blksize"; + PROCEDURE -statblocks(): Types.Int32 "(Types.Int32)s.st_blocks"; *) - PROCEDURE -fstat(fd: LONGINT): INTEGER "fstat(fd, &s)"; - PROCEDURE -stat (n: ARRAY OF CHAR): INTEGER "stat((char*)n, &s)"; + PROCEDURE -fstat(fd: Types.Int32): Types.Int32 "fstat(fd, &s)"; + PROCEDURE -stat (n: ARRAY OF CHAR): Types.Int32 "stat((char*)n, &s)"; - PROCEDURE -err(): INTEGER "errno"; + PROCEDURE -err(): Types.Int32 "errno"; PROCEDURE Stat*(path: ARRAY OF CHAR; VAR buf: StatRec; errors: RelatedEvents.Object): BOOLEAN; BEGIN @@ -147,7 +147,7 @@ MODULE ulmSysStat; IF stat(path) < 0 THEN SysErrors.Raise(errors, err(), Sys.newstat, path); RETURN FALSE END; buf.device := SYS.VAL(SysTypes.Device, statdev()); buf.inode := SYS.VAL(SysTypes.Inode, statino()); - buf.mode := SYS.VAL(SET, statmode()); + buf.mode := SYS.VAL(Types.Set, statmode()); buf.nlinks := statnlink(); buf.uid := statuid(); buf.gid := statgid(); @@ -166,10 +166,10 @@ MODULE ulmSysStat; PROCEDURE Fstat*(fd: SysTypes.File; VAR buf: StatRec; errors: RelatedEvents.Object): BOOLEAN; BEGIN structstats; - IF fstat(SYS.VAL(LONGINT, fd)) < 0 THEN SysErrors.Raise(errors, err(), Sys.newfstat, ""); RETURN FALSE END; + IF fstat(SYS.VAL(Types.Int32, fd)) < 0 THEN SysErrors.Raise(errors, err(), Sys.newfstat, ""); RETURN FALSE END; buf.device := SYS.VAL(SysTypes.Device, statdev()); buf.inode := SYS.VAL(SysTypes.Inode, statino()); - buf.mode := SYS.VAL(SET, statmode()); + buf.mode := SYS.VAL(Types.Set, statmode()); buf.nlinks := statnlink(); buf.uid := statuid(); buf.gid := statgid(); diff --git a/src/library/ulm/ulmSysTypes.Mod b/src/library/ulm/ulmSysTypes.Mod index 6d16ab4b..c757a5dc 100644 --- a/src/library/ulm/ulmSysTypes.Mod +++ b/src/library/ulm/ulmSysTypes.Mod @@ -40,12 +40,12 @@ MODULE ulmSysTypes; Byte* = Types.Byte; File* = Platform.FileHandle; - Offset* = LONGINT; - Device* = LONGINT; - Inode* = LONGINT; - Time* = LONGINT; + Offset* = Types.Int32; + Device* = Types.Int32; + Inode* = Types.Int32; + Time* = Types.Int32; - Word* = INTEGER; (* must have the size of C's int-type *) + Word* = Types.Int32; (* must have the size of C's int-type *) (* Note: linux supports wait4 but not waitid, i.e. these * constants aren't needed. *) @@ -64,7 +64,7 @@ MODULE ulmSysTypes; idAll = 7; (* all processes *) idLwpid = 8; (* an LWP identifier *) TYPE - IdType = INTEGER; (* idPid .. idLwpid *) + IdType = Types.Int32; (* idPid .. idLwpid *) *) END ulmSysTypes. diff --git a/src/library/ulm/ulmTCrypt.Mod b/src/library/ulm/ulmTCrypt.Mod index c35c7809..f31decda 100644 --- a/src/library/ulm/ulmTCrypt.Mod +++ b/src/library/ulm/ulmTCrypt.Mod @@ -36,7 +36,8 @@ MODULE ulmTCrypt; (* Michael Szczuka *) Events := ulmEvents, NetIO := ulmNetIO, PersistentObjects := ulmPersistentObjects, Random := ulmRandomGenerators, RelatedEvents := ulmRelatedEvents, Services := ulmServices, - Streams := ulmStreams, SYS := SYSTEM; + Streams := ulmStreams, SYS := SYSTEM, + Types := ulmTypes; CONST M = 16; (* size of an element of CC(M) [ring of Circular Convolution] *) @@ -59,8 +60,8 @@ MODULE ulmTCrypt; (* Michael Szczuka *) TYPE (* an element out of CC(M) *) - CCMElement = SET; - Exponent = ARRAY MaxVar OF SHORTINT; + CCMElement = Types.Set; + Exponent = ARRAY MaxVar OF Types.Int8; TYPE (* a polynomial with coefficients out of CC(M) *) @@ -161,7 +162,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) ErrorEvent = POINTER TO ErrorEventRec; ErrorEventRec = RECORD (Events.EventRec) - errorcode : SHORTINT; + errorcode : Types.Int8; END; VAR @@ -176,7 +177,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) PolFeld : ARRAY MaxTerms OF Polynom; (* used for sorting purposes *) PreEvalArg : ARRAY M OF TCryptInput; (* precomputed values to speed up evaluation of a polynomial *) - k : SHORTINT; (* simple counter during initialisation *) + k : Types.Int8; (* simple counter during initialisation *) error : Events.EventType; errormsg : ARRAY errorcodes OF Events.Message; @@ -191,7 +192,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) errormsg[notRegular] := "element isn't regular"; END InitErrorHandling; - PROCEDURE Error(s: Streams.Stream; errorcode: SHORTINT); + PROCEDURE Error(s: Streams.Stream; errorcode: Types.Int8); VAR event: ErrorEvent; BEGIN @@ -208,7 +209,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) (* tests x for regularity [a regular CCMElement contains an odd number of set bits]; returns TRUE when x is regular, FALSE otherwise *) VAR - res, i : SHORTINT; + res, i : Types.Int8; BEGIN i := 0; res := 0; @@ -225,7 +226,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) (* compares x and y for equality; if x and y are equal TRUE is returned, FALSE otherwise *) VAR - i : SHORTINT; + i : Types.Int8; BEGIN i := 0; WHILE i < M DO @@ -240,7 +241,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) PROCEDURE AddCCM (x, y: CCMElement; VAR z: CCMElement); (* add x and y in CC(M) *) VAR - i : SHORTINT; + i : Types.Int8; BEGIN z := NullCCM; i := 0; @@ -255,8 +256,8 @@ MODULE ulmTCrypt; (* Michael Szczuka *) PROCEDURE MulCCM (x, y: CCMElement; VAR z: CCMElement); (* multiply x and y in CC(M) *) VAR - i, j, diff : SHORTINT; - tmp : INTEGER; + i, j, diff : Types.Int8; + tmp : Types.Int32; BEGIN z := NullCCM; i := 0; @@ -283,7 +284,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) UNTIL i>=M; END MulCCM; - PROCEDURE PowerCCM (x: CCMElement; exp: INTEGER; VAR z: CCMElement); + PROCEDURE PowerCCM (x: CCMElement; exp: Types.Int32; VAR z: CCMElement); (* raises x to the power exp in CC(M) *) VAR tmp : CCMElement; @@ -320,12 +321,12 @@ MODULE ulmTCrypt; (* Michael Szczuka *) UNTIL exp < 1; END PowerCCM; - PROCEDURE CreateCCM (VAR x: CCMElement; mode: SHORTINT); + PROCEDURE CreateCCM (VAR x: CCMElement; mode: Types.Int8); (* creates a random element out of CC(M) depending on mode which can be reg, sing or random; the result is in any case different from the zero *) VAR - i, SetBits: SHORTINT; + i, SetBits: Types.Int8; BEGIN x := NullCCM; REPEAT @@ -361,10 +362,10 @@ MODULE ulmTCrypt; (* Michael Szczuka *) (* ***** arithmetic functions for polynomials over CC(M) ***** *) - PROCEDURE LengthPolynom(p: Polynom) : INTEGER; + PROCEDURE LengthPolynom(p: Polynom) : Types.Int32; (* returns the number of terms which make up the polynomial p *) VAR - i : INTEGER; + i : Types.Int32; BEGIN i := 0; WHILE p # NIL DO @@ -378,7 +379,7 @@ MODULE ulmTCrypt; (* Michael Szczuka *) (* tests the regularity of a polynomial [a polynomial is regular iff the # of regular coefficients is odd] *) VAR - regkoeffs : SHORTINT; + regkoeffs : Types.Int8; BEGIN regkoeffs := 0; WHILE p # NIL DO @@ -391,16 +392,16 @@ MODULE ulmTCrypt; (* Michael Szczuka *) RETURN (regkoeffs MOD 2) = 1; END RegulaerPolynom; - PROCEDURE CmpExp (exp1, exp2: Exponent) : SHORTINT; + PROCEDURE CmpExp (exp1, exp2: Exponent) : Types.Int8; (* compares two exponent vectors and returns 0 on equality, a positive value if exp1>exp2 and a negative value if exp1 0) & Streams.WriteByte(s, " ") DO @@ -180,12 +180,12 @@ MODULE ulmWrite; (* procedures writing to Streams.stdout *) - PROCEDURE Int*(int: LONGINT; width: LONGINT); + PROCEDURE Int*(int: Types.Int32; width: Types.Int32); BEGIN IntS(Streams.stdout, int, width); END Int; - PROCEDURE Real*(real: LONGREAL; width: LONGINT); + PROCEDURE Real*(real: Types.Real64; width: Types.Int32); (* write real in exponential format *) BEGIN RealS(Streams.stdout, real, width); diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 796cb8d5..c852bd57 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -273,6 +273,7 @@ oocX11: ulm: @printf "\nMaking ulm library for -O$(MODEL)\n" + cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTypes.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmObjects.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPriorities.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmDisciplines.Mod @@ -284,7 +285,6 @@ ulm: cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmResources.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmForwarders.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmRelatedEvents.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTypes.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreams.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStrings.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysTypes.Mod From 67e4848eb7659be1d1169528dd7727f115497663 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 30 Nov 2016 15:49:27 +0000 Subject: [PATCH 017/241] PlatformWindows file sharing mode parity with PlatfromUnix. Allow GC to collect unused files. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 21 +++++++++--------- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 21 +++++++++--------- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 21 +++++++++--------- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 21 +++++++++--------- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 8 +++---- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 21 +++++++++--------- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 8 +++---- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- doc/Features.md | 33 +++++++++++++++++++++++++++- src/runtime/Files.Mod | 4 ++-- src/runtime/Platformwindows.Mod | 6 ++--- 188 files changed, 278 insertions(+), 252 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 19053dd2..29524a91 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index d0de3d5d..54214f70 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 2cc1873a..1e6381e9 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 3a6ec440..3b5fd2eb 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -36,7 +36,7 @@ typedef INT32 fd, len, pos; Files_Buffer bufs[4]; INT16 swapper, state; - Files_File next; + struct Files_FileDesc *next; } Files_FileDesc; typedef @@ -48,7 +48,7 @@ typedef } Files_Rider; -static Files_File Files_files; +static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { @@ -380,7 +380,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) { Files_File f = NIL; INT16 i, error; - f = Files_files; + f = (Files_File)Files_files; while (f != NIL) { if (Platform_SameFile(identity, f->identity)) { if (!Platform_SameFileTime(identity, f->identity)) { @@ -398,7 +398,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) } return f; } - f = f->next; + f = (Files_File)f->next; } return NIL; } @@ -987,12 +987,12 @@ static void Files_CloseOSFile (Files_File f) { Files_File prev = NIL; INT16 error; - if (Files_files == f) { + if (Files_files == (void *) f) { Files_files = f->next; } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; + prev = (Files_File)Files_files; + while ((prev != NIL && prev->next != (void *) f)) { + prev = (Files_File)prev->next; } if (prev->next != NIL) { prev->next = f->next; @@ -1031,11 +1031,10 @@ void Files_SetSearchPath (CHAR *path, ADDRESS path__len) static void EnumPtrs(void (*P)(void*)) { - P(Files_files); P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 5) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, 248, -24}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index a2ddea5e..28a97c05 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 88e5fa50..af8fd777 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 313d111e..cc058553 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8ce1e8f3..9aedc826 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 2bd2b5da..568db414 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d34d0f9b..2e03b5fc 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 084b0534..6641207d 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 6b592341..fd11366a 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 5219140a..4eff8cf5 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index f54fae67..58701bfc 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index cd390d68..4dd3d03b 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index b4ed079b..d4922137 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index ab972651..2814e733 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 6028caf7..7218afe1 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index ad1dc868..a860454b 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index ae240604..7b7f6fbc 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 7c1139c0..86256024 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 9250891d..eb5ad767 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 296c8975..9a8653a0 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index ff896aa0..1508a8bb 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 44a26650..b273390e 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 410edde3..9a2555d2 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index d5cc19f6..315a17e0 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index fe5db80a..ee1f94ca 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index e791f967..16a16b7a 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 7c07366c..b60bb504 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 96231bce..adf86c42 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 05d98559..ea3662c0 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 8f626f64..beb1d7c1 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 6646a439..f0e444ea 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index ee7770b0..0f1bc5ac 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index e450651e..43e5cb69 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index aea1841e..784b684d 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 19053dd2..29524a91 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index d0de3d5d..54214f70 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 2cc1873a..1e6381e9 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 3a6ec440..3b5fd2eb 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -36,7 +36,7 @@ typedef INT32 fd, len, pos; Files_Buffer bufs[4]; INT16 swapper, state; - Files_File next; + struct Files_FileDesc *next; } Files_FileDesc; typedef @@ -48,7 +48,7 @@ typedef } Files_Rider; -static Files_File Files_files; +static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { @@ -380,7 +380,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) { Files_File f = NIL; INT16 i, error; - f = Files_files; + f = (Files_File)Files_files; while (f != NIL) { if (Platform_SameFile(identity, f->identity)) { if (!Platform_SameFileTime(identity, f->identity)) { @@ -398,7 +398,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) } return f; } - f = f->next; + f = (Files_File)f->next; } return NIL; } @@ -987,12 +987,12 @@ static void Files_CloseOSFile (Files_File f) { Files_File prev = NIL; INT16 error; - if (Files_files == f) { + if (Files_files == (void *) f) { Files_files = f->next; } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; + prev = (Files_File)Files_files; + while ((prev != NIL && prev->next != (void *) f)) { + prev = (Files_File)prev->next; } if (prev->next != NIL) { prev->next = f->next; @@ -1031,11 +1031,10 @@ void Files_SetSearchPath (CHAR *path, ADDRESS path__len) static void EnumPtrs(void (*P)(void*)) { - P(Files_files); P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 5) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, 248, -24}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index a2ddea5e..28a97c05 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 88e5fa50..af8fd777 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 313d111e..cc058553 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8ce1e8f3..9aedc826 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 2bd2b5da..568db414 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d34d0f9b..2e03b5fc 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 084b0534..6641207d 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 6b592341..fd11366a 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 5219140a..4eff8cf5 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index f54fae67..58701bfc 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index cd390d68..4dd3d03b 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index b4ed079b..d4922137 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index ab972651..2814e733 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 6028caf7..7218afe1 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index ad1dc868..a860454b 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 7ed72408..aa53a484 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 7c1139c0..86256024 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 9250891d..eb5ad767 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 296c8975..9a8653a0 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index ff896aa0..1508a8bb 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 44a26650..b273390e 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 410edde3..9a2555d2 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index d5cc19f6..315a17e0 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index fe5db80a..ee1f94ca 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index e791f967..16a16b7a 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 7c07366c..b60bb504 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 96231bce..adf86c42 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 68aa0310..c9010809 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 2635c7ad..16b07b6f 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 6646a439..f0e444ea 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index ee7770b0..0f1bc5ac 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index e450651e..43e5cb69 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index aea1841e..784b684d 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 19053dd2..29524a91 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index d0de3d5d..54214f70 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 2cc1873a..1e6381e9 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 1b967820..74c2d809 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -36,7 +36,7 @@ typedef INT32 fd, len, pos; Files_Buffer bufs[4]; INT16 swapper, state; - Files_File next; + struct Files_FileDesc *next; } Files_FileDesc; typedef @@ -48,7 +48,7 @@ typedef } Files_Rider; -static Files_File Files_files; +static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { @@ -380,7 +380,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) { Files_File f = NIL; INT16 i, error; - f = Files_files; + f = (Files_File)Files_files; while (f != NIL) { if (Platform_SameFile(identity, f->identity)) { if (!Platform_SameFileTime(identity, f->identity)) { @@ -398,7 +398,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) } return f; } - f = f->next; + f = (Files_File)f->next; } return NIL; } @@ -987,12 +987,12 @@ static void Files_CloseOSFile (Files_File f) { Files_File prev = NIL; INT16 error; - if (Files_files == f) { + if (Files_files == (void *) f) { Files_files = f->next; } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; + prev = (Files_File)Files_files; + while ((prev != NIL && prev->next != (void *) f)) { + prev = (Files_File)prev->next; } if (prev->next != NIL) { prev->next = f->next; @@ -1031,11 +1031,10 @@ void Files_SetSearchPath (CHAR *path, ADDRESS path__len) static void EnumPtrs(void (*P)(void*)) { - P(Files_files); P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 5) = {__TDFLDS("FileDesc", 280), {232, 240, 248, 256, 272, -48}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 280), {232, 240, 248, 256, -40}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}}; diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 6d4e7f78..0da4768b 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index afc96221..95dd55ee 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index e8a34cc3..b96e0160 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index e161f52a..9b72d021 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 2bd2b5da..568db414 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d34d0f9b..2e03b5fc 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 084b0534..6641207d 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 6b592341..fd11366a 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 5219140a..4eff8cf5 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 944cb3df..e4915a3e 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index cd390d68..4dd3d03b 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 5b8ca3cb..a08cee09 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index ab972651..2814e733 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 6028caf7..7218afe1 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index ad1dc868..a860454b 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 50fa7c31..de44eed9 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 7c1139c0..86256024 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 70113cd4..7a7ce5c1 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 296c8975..9a8653a0 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index ff896aa0..1508a8bb 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 44a26650..b273390e 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index fde6b221..a211fab4 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 31c0037a..131a8aa8 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index fe5db80a..ee1f94ca 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index e791f967..16a16b7a 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 7c07366c..b60bb504 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 96231bce..adf86c42 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 590a2041..0bb7d871 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 1d12b7c6..b1eafc02 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 6646a439..f0e444ea 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index ee7770b0..0f1bc5ac 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index e450651e..43e5cb69 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index aea1841e..784b684d 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 19053dd2..29524a91 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index d0de3d5d..54214f70 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 2cc1873a..1e6381e9 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index a737c2d8..07f758d2 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -36,7 +36,7 @@ typedef INT32 fd, len, pos; Files_Buffer bufs[4]; INT16 swapper, state; - Files_File next; + struct Files_FileDesc *next; } Files_FileDesc; typedef @@ -48,7 +48,7 @@ typedef } Files_Rider; -static Files_File Files_files; +static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { @@ -380,7 +380,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) { Files_File f = NIL; INT16 i, error; - f = Files_files; + f = (Files_File)Files_files; while (f != NIL) { if (Platform_SameFile(identity, f->identity)) { if (!Platform_SameFileTime(identity, f->identity)) { @@ -398,7 +398,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) } return f; } - f = f->next; + f = (Files_File)f->next; } return NIL; } @@ -987,12 +987,12 @@ static void Files_CloseOSFile (Files_File f) { Files_File prev = NIL; INT16 error; - if (Files_files == f) { + if (Files_files == (void *) f) { Files_files = f->next; } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; + prev = (Files_File)Files_files; + while ((prev != NIL && prev->next != (void *) f)) { + prev = (Files_File)prev->next; } if (prev->next != NIL) { prev->next = f->next; @@ -1031,11 +1031,10 @@ void Files_SetSearchPath (CHAR *path, ADDRESS path__len) static void EnumPtrs(void (*P)(void*)) { - P(Files_files); P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 5) = {__TDFLDS("FileDesc", 260), {236, 240, 244, 248, 256, -24}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 260), {236, 240, 244, 248, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 355916fa..fa8f3e8d 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 88e5fa50..af8fd777 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 313d111e..cc058553 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 8ce1e8f3..9aedc826 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 2bd2b5da..568db414 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d34d0f9b..2e03b5fc 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 084b0534..6641207d 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 6b592341..fd11366a 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 5219140a..4eff8cf5 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index f54fae67..58701bfc 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index cd390d68..4dd3d03b 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index b4ed079b..d4922137 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index ab972651..2814e733 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 6028caf7..7218afe1 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index ad1dc868..a860454b 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 7ed72408..aa53a484 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 7c1139c0..86256024 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 9250891d..eb5ad767 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 296c8975..9a8653a0 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index eae902f9..0edcb502 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 44a26650..b273390e 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 518cb928..78f4409a 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -151,9 +151,9 @@ extern void Heap_InitHeap(); #define Platform_largeInteger() LARGE_INTEGER li #define Platform_liLongint() (LONGINT)li.QuadPart #define Platform_moveFile(o, o__len, n, n__len) (INTEGER)MoveFileEx((char*)o, (char*)n, MOVEFILE_REPLACE_EXISTING) -#define Platform_opennew(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0) -#define Platform_openro(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) -#define Platform_openrw(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_opennew(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_openro(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_openrw(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) #define Platform_processInfo() PROCESS_INFORMATION pi = {0}; #define Platform_readfile(fd, p, l, n) (INTEGER)ReadFile((HANDLE)fd, (void*)p, (DWORD)l, (DWORD*)n, 0) #define Platform_seekcur() FILE_CURRENT diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 35a0878d..a4ad7737 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index fe5db80a..ee1f94ca 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index e791f967..16a16b7a 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 7c07366c..b60bb504 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 96231bce..adf86c42 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 68aa0310..c9010809 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 2635c7ad..16b07b6f 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 6646a439..f0e444ea 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index ee7770b0..0f1bc5ac 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index e450651e..43e5cb69 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index aea1841e..784b684d 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 19053dd2..29524a91 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index d0de3d5d..54214f70 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 2cc1873a..1e6381e9 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 134741a5..1db4ed49 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -37,7 +37,7 @@ typedef INT32 len, pos; Files_Buffer bufs[4]; INT16 swapper, state; - Files_File next; + struct Files_FileDesc *next; } Files_FileDesc; typedef @@ -49,7 +49,7 @@ typedef } Files_Rider; -static Files_File Files_files; +static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; static struct { @@ -381,7 +381,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) { Files_File f = NIL; INT16 i, error; - f = Files_files; + f = (Files_File)Files_files; while (f != NIL) { if (Platform_SameFile(identity, f->identity)) { if (!Platform_SameFileTime(identity, f->identity)) { @@ -399,7 +399,7 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) } return f; } - f = f->next; + f = (Files_File)f->next; } return NIL; } @@ -989,12 +989,12 @@ static void Files_CloseOSFile (Files_File f) { Files_File prev = NIL; INT16 error; - if (Files_files == f) { + if (Files_files == (void *) f) { Files_files = f->next; } else { - prev = Files_files; - while ((prev != NIL && prev->next != f)) { - prev = prev->next; + prev = (Files_File)Files_files; + while ((prev != NIL && prev->next != (void *) f)) { + prev = (Files_File)prev->next; } if (prev->next != NIL) { prev->next = f->next; @@ -1033,11 +1033,10 @@ void Files_SetSearchPath (CHAR *path, ADDRESS path__len) static void EnumPtrs(void (*P)(void*)) { - P(Files_files); P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 5) = {__TDFLDS("FileDesc", 288), {240, 248, 256, 264, 280, -48}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 288), {240, 248, 256, 264, -40}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}}; diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 3cd0b80b..1d930af8 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index afc96221..95dd55ee 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index e8a34cc3..b96e0160 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index e161f52a..9b72d021 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 2bd2b5da..568db414 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d34d0f9b..2e03b5fc 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 084b0534..6641207d 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 6b592341..fd11366a 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 5219140a..4eff8cf5 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 944cb3df..e4915a3e 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index cd390d68..4dd3d03b 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 5b8ca3cb..a08cee09 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index ab972651..2814e733 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 6028caf7..7218afe1 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index ad1dc868..a860454b 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 50fa7c31..de44eed9 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 7c1139c0..86256024 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 70113cd4..7a7ce5c1 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 296c8975..9a8653a0 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index eae902f9..0edcb502 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 44a26650..b273390e 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 954ef044..ad0adb4d 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -151,9 +151,9 @@ extern void Heap_InitHeap(); #define Platform_largeInteger() LARGE_INTEGER li #define Platform_liLongint() (LONGINT)li.QuadPart #define Platform_moveFile(o, o__len, n, n__len) (INTEGER)MoveFileEx((char*)o, (char*)n, MOVEFILE_REPLACE_EXISTING) -#define Platform_opennew(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0) -#define Platform_openro(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) -#define Platform_openrw(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_opennew(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_openro(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) +#define Platform_openrw(n, n__len) (ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0) #define Platform_processInfo() PROCESS_INFORMATION pi = {0}; #define Platform_readfile(fd, p, l, n) (INTEGER)ReadFile((HANDLE)fd, (void*)p, (DWORD)l, (DWORD*)n, 0) #define Platform_seekcur() FILE_CURRENT diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index c39b5ac2..d2d424eb 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index fe5db80a..ee1f94ca 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index e791f967..16a16b7a 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 7c07366c..b60bb504 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 96231bce..adf86c42 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 590a2041..0bb7d871 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 1d12b7c6..b1eafc02 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 6646a439..f0e444ea 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index ee7770b0..0f1bc5ac 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index e450651e..43e5cb69 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index aea1841e..784b684d 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/doc/Features.md b/doc/Features.md index ae0bcc43..96c1bf78 100644 --- a/doc/Features.md +++ b/doc/Features.md @@ -136,11 +136,42 @@ The following SYSTEM module predefined functions and procedures now use SYSTEM.A Note that the standard function LEN() still returns LONGINT. +#### Files.Mod - Oberon System file semantics on Linux and Windows + +The oberon system has a simpler approach to files than most contemporary operating systems: the data part is manipulated entirely independently of the directory of file names. While Linux has inodes and directories, it does not expose them as independently as Oberon does. + +In particular a file is created in Oberon without touching the directory. Only when a program is ready to expose it in the directory does it call the OS to 'Register' the file. + +In order to mimic this behaviour on Windows and Linux, a new file goes through a number of stages: + + 1. Files.New returns a Files.File, which is an opaque pointer to a file descriptor record. No OS file is created at this stage. + 2. As the first data is written to the file, it is buffered. Still no OS file is created at this stage. + 3. As more data is written to the file more buffers are allocated. Still no OS file is created. + 4. After a limit is reached (currently 4 buffers of 4KB each), a temporary OS file is created, and a buffer reclaimed by flushing it to the temporary file. + 5. Data continues to be written to buffers, with buffers being flushed to the temporary file as necessary to maintain the limit of 4 buffers per file. + 6. Finally, when the client program calls Register, any active buffers are flushed to disk, and the temporary file is renamed to the client specified registration name. + +##### OS file handle lifetime + +Once an OS file has been opened, either by Files.Old, or by sufficient data written to a new file, or by Files.Register, it wil remain open. The client program can Files.Set a new rider on the file at any time. + +Only if the Files.File becomes inaccessible will the garbage collector (eventually) recover the space used by the file descriptor, and only at this time will the OS file handle be closed. + +As in Oberon, Files.Close is only a mechanism to flush buffers, the file remains accessible and may be passed successfully to Files.Set. + +##### Rename and Delete + +Note that on a real Oberon system, it is possible to call rename and delete on files that are currently accessible through a Files.File pointer. For example a program could register a Files.File, and then call Files.Delete passing the same filename - the Files.File remains valid, containing the same data, only the directory entry is removed. + +Such behaviour is not supported on Unix/Windows - an attempt to delete a file that is registered and in use by the program will fail. + + + #### Runtime error and exit handling When passed FALSE, ASSERT displays the message 'Assertion failure.'. If a second, nonzero value is passed to ASSERT it will also be displayed. ASSERT then exits to the OS passing the assert value or zero. HALT displays the message 'Terminated by Halt(n)'. For negative values that correspond to a standard runtime error a descriptive string is also printed. Finally Halt exits to the oprerating system passing the error code. -Bear in mind that both Linux and Windows generally treat the return code as a signed 8 bit value, ignoring higher order bits. Therefore it is best to restrict HALT and ASSERT codes to the range -128 .. 127. +Bear in mind that both Unix and Windows generally treat the return code as a signed 8 bit value, ignoring higher order bits. Therefore it is best to restrict HALT and ASSERT codes to the range -128 .. 127. diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 983b4f64..4b0c9e44 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -43,7 +43,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files bufs: ARRAY NumBufs OF Buffer; swapper: INTEGER; state: INTEGER; - next: File; + next: POINTER [1] TO FileDesc; END; BufDesc = RECORD @@ -64,7 +64,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR - files: File; (* List of files backed by an OS file, whether open, registered or temporary. *) + files: POINTER [1] TO FileDesc; (* List of files backed by an OS file, whether open, registered or temporary. *) tempno: INTEGER; HOME: ARRAY 1024 OF CHAR; SearchPath: POINTER TO ARRAY OF CHAR; diff --git a/src/runtime/Platformwindows.Mod b/src/runtime/Platformwindows.Mod index bde70184..808e2e0d 100644 --- a/src/runtime/Platformwindows.Mod +++ b/src/runtime/Platformwindows.Mod @@ -300,13 +300,13 @@ PROCEDURE Error*(): ErrorCode; BEGIN RETURN err() END Error; PROCEDURE -invalidHandleValue(): SYSTEM.ADDRESS "((ADDRESS)INVALID_HANDLE_VALUE)"; PROCEDURE -openrw (n: ARRAY OF CHAR): FileHandle -"(ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)"; +"(ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)"; PROCEDURE -openro (n: ARRAY OF CHAR): FileHandle -"(ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)"; +"(ADDRESS)CreateFile((char*)n, GENERIC_READ , FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0)"; PROCEDURE -opennew(n: ARRAY OF CHAR): FileHandle -"(ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)"; +"(ADDRESS)CreateFile((char*)n, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)"; From b16e82f866f7d6b996eeebcfec4948e963d90252 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 30 Nov 2016 18:13:32 +0000 Subject: [PATCH 018/241] Update open FileDescs at deregistration resulting from delete, rename or register. --- bootstrap/unix-44/Files.c | 32 +++++++++++++++++++++- bootstrap/unix-48/Files.c | 32 +++++++++++++++++++++- bootstrap/unix-88/Files.c | 32 +++++++++++++++++++++- bootstrap/windows-48/Files.c | 32 +++++++++++++++++++++- bootstrap/windows-88/Files.c | 32 +++++++++++++++++++++- src/runtime/Files.Mod | 52 ++++++++++++++++++++++++++++++++---- 6 files changed, 202 insertions(+), 10 deletions(-) diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 3b5fd2eb..763569cc 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -68,6 +68,7 @@ export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Deregister (CHAR *name, ADDRESS name__len); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -222,9 +223,35 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na __DEL(finalName); } -static void Files_Create (Files_File f) +static void Files_Deregister (CHAR *name, ADDRESS name__len) { Platform_FileIdentity identity; + Files_File osfile = NIL; + INT16 error; + __DUP(name, name__len, CHAR); + if (Platform_IdentifyByName(name, name__len, &identity, Platform_FileIdentity__typ) == 0) { + osfile = (Files_File)Files_files; + while ((osfile != NIL && !Platform_SameFile(osfile->identity, identity))) { + osfile = (Files_File)osfile->next; + } + if (osfile != NIL) { + __ASSERT(!osfile->tempFile, 0); + __ASSERT(osfile->fd >= 0, 0); + __COPY(osfile->workName, osfile->registerName, 101); + Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + osfile->tempFile = 1; + osfile->state = 0; + error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + if (error != 0) { + Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); + } + } + } + __DEL(name); +} + +static void Files_Create (Files_File f) +{ BOOLEAN done; INT16 error; CHAR err[32]; @@ -234,6 +261,7 @@ static void Files_Create (Files_File f) f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); + Files_Deregister(f->registerName, 101); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -714,6 +742,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); + Files_Deregister(name, name__len); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } @@ -789,6 +818,7 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { + Files_Deregister(f->registerName, 101); Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 3b5fd2eb..763569cc 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -68,6 +68,7 @@ export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Deregister (CHAR *name, ADDRESS name__len); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -222,9 +223,35 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na __DEL(finalName); } -static void Files_Create (Files_File f) +static void Files_Deregister (CHAR *name, ADDRESS name__len) { Platform_FileIdentity identity; + Files_File osfile = NIL; + INT16 error; + __DUP(name, name__len, CHAR); + if (Platform_IdentifyByName(name, name__len, &identity, Platform_FileIdentity__typ) == 0) { + osfile = (Files_File)Files_files; + while ((osfile != NIL && !Platform_SameFile(osfile->identity, identity))) { + osfile = (Files_File)osfile->next; + } + if (osfile != NIL) { + __ASSERT(!osfile->tempFile, 0); + __ASSERT(osfile->fd >= 0, 0); + __COPY(osfile->workName, osfile->registerName, 101); + Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + osfile->tempFile = 1; + osfile->state = 0; + error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + if (error != 0) { + Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); + } + } + } + __DEL(name); +} + +static void Files_Create (Files_File f) +{ BOOLEAN done; INT16 error; CHAR err[32]; @@ -234,6 +261,7 @@ static void Files_Create (Files_File f) f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); + Files_Deregister(f->registerName, 101); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -714,6 +742,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); + Files_Deregister(name, name__len); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } @@ -789,6 +818,7 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { + Files_Deregister(f->registerName, 101); Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 74c2d809..e2cf2f3a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -68,6 +68,7 @@ export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Deregister (CHAR *name, ADDRESS name__len); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -222,9 +223,35 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na __DEL(finalName); } -static void Files_Create (Files_File f) +static void Files_Deregister (CHAR *name, ADDRESS name__len) { Platform_FileIdentity identity; + Files_File osfile = NIL; + INT16 error; + __DUP(name, name__len, CHAR); + if (Platform_IdentifyByName(name, name__len, &identity, Platform_FileIdentity__typ) == 0) { + osfile = (Files_File)Files_files; + while ((osfile != NIL && !Platform_SameFile(osfile->identity, identity))) { + osfile = (Files_File)osfile->next; + } + if (osfile != NIL) { + __ASSERT(!osfile->tempFile, 0); + __ASSERT(osfile->fd >= 0, 0); + __COPY(osfile->workName, osfile->registerName, 101); + Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + osfile->tempFile = 1; + osfile->state = 0; + error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + if (error != 0) { + Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); + } + } + } + __DEL(name); +} + +static void Files_Create (Files_File f) +{ BOOLEAN done; INT16 error; CHAR err[32]; @@ -234,6 +261,7 @@ static void Files_Create (Files_File f) f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); + Files_Deregister(f->registerName, 101); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -714,6 +742,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); + Files_Deregister(name, name__len); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } @@ -789,6 +818,7 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { + Files_Deregister(f->registerName, 101); Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 07f758d2..aa879424 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -68,6 +68,7 @@ export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Deregister (CHAR *name, ADDRESS name__len); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -222,9 +223,35 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na __DEL(finalName); } -static void Files_Create (Files_File f) +static void Files_Deregister (CHAR *name, ADDRESS name__len) { Platform_FileIdentity identity; + Files_File osfile = NIL; + INT16 error; + __DUP(name, name__len, CHAR); + if (Platform_IdentifyByName(name, name__len, &identity, Platform_FileIdentity__typ) == 0) { + osfile = (Files_File)Files_files; + while ((osfile != NIL && !Platform_SameFile(osfile->identity, identity))) { + osfile = (Files_File)osfile->next; + } + if (osfile != NIL) { + __ASSERT(!osfile->tempFile, 0); + __ASSERT(osfile->fd >= 0, 0); + __COPY(osfile->workName, osfile->registerName, 101); + Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + osfile->tempFile = 1; + osfile->state = 0; + error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + if (error != 0) { + Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); + } + } + } + __DEL(name); +} + +static void Files_Create (Files_File f) +{ BOOLEAN done; INT16 error; CHAR err[32]; @@ -234,6 +261,7 @@ static void Files_Create (Files_File f) f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); + Files_Deregister(f->registerName, 101); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -714,6 +742,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); + Files_Deregister(name, name__len); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } @@ -789,6 +818,7 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { + Files_Deregister(f->registerName, 101); Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 1db4ed49..f83fafeb 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -69,6 +69,7 @@ export void Files_Close (Files_File f); static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +static void Files_Deregister (CHAR *name, ADDRESS name__len); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -223,9 +224,35 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na __DEL(finalName); } -static void Files_Create (Files_File f) +static void Files_Deregister (CHAR *name, ADDRESS name__len) { Platform_FileIdentity identity; + Files_File osfile = NIL; + INT16 error; + __DUP(name, name__len, CHAR); + if (Platform_IdentifyByName(name, name__len, &identity, Platform_FileIdentity__typ) == 0) { + osfile = (Files_File)Files_files; + while ((osfile != NIL && !Platform_SameFile(osfile->identity, identity))) { + osfile = (Files_File)osfile->next; + } + if (osfile != NIL) { + __ASSERT(!osfile->tempFile, 0); + __ASSERT(osfile->fd >= 0, 0); + __COPY(osfile->workName, osfile->registerName, 101); + Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + osfile->tempFile = 1; + osfile->state = 0; + error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + if (error != 0) { + Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); + } + } + } + __DEL(name); +} + +static void Files_Create (Files_File f) +{ BOOLEAN done; INT16 error; CHAR err[32]; @@ -235,6 +262,7 @@ static void Files_Create (Files_File f) f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); + Files_Deregister(f->registerName, 101); __COPY(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; @@ -715,6 +743,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) { __DUP(name, name__len, CHAR); + Files_Deregister(name, name__len); *res = Platform_Unlink((void*)name, name__len); __DEL(name); } @@ -791,6 +820,7 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { + Files_Deregister(f->registerName, 101); Files_Rename(f->workName, 101, f->registerName, 101, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 4b0c9e44..7bbecbf7 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -122,16 +122,51 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files name[i] := 0X END GetTempName; + (* When registering a file, it may turn out that the name we want to use + is aready in use by another File. E.g. the compiler opens and reads + an existing symbol file if present before creating an updated one. + When this happens on Windows, creation of the new file will be blocked + by the presence of the old one because it is in a open state. Further, + on both Unix and Windows systems we want behaviour to match that of + a real Oberon system, where registering the new file has the effect of + unregistering the old file. To simulate this we need to change the old + Files.File back to a temp file. *) + PROCEDURE Deregister(name: ARRAY OF CHAR); + VAR + identity: Platform.FileIdentity; + osfile: File; + error: Platform.ErrorCode; + BEGIN + IF Platform.IdentifyByName(name, identity) = 0 THEN + (* The name we are registering is an already existing file. *) + osfile := files; + WHILE (osfile # NIL) & ~Platform.SameFile(osfile.identity, identity) DO osfile := osfile.next END; + IF osfile # NIL THEN + (* osfile is the FileDesc corresponding to the file name we are hoping + to register. Turn it into a temporary file. *) + ASSERT(~osfile.tempFile); ASSERT(osfile.fd >= 0); + osfile.registerName := osfile.workName; + GetTempName(osfile.registerName, osfile.workName); + osfile.tempFile := TRUE; + osfile.state := open; + error := Platform.Rename(osfile.registerName, osfile.workName); + IF error # 0 THEN + Err("Couldn't rename previous version of file being registered", osfile, error) + END + END + END + END Deregister; + + PROCEDURE Create(f: File); (* Makes sure there is an OS file backing this Oberon file. Used when more data has been written to an unregistered new file than buffers can hold, or when registering a new file whose data is all in buffers. *) VAR - identity: Platform.FileIdentity; - done: BOOLEAN; - error: Platform.ErrorCode; - err: ARRAY 32 OF CHAR; + done: BOOLEAN; + error: Platform.ErrorCode; + err: ARRAY 32 OF CHAR; BEGIN (* Out.String("Files.Create fd = "); Out.Int(f.fd,1); @@ -149,6 +184,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files ASSERT(f.state = close); (* New file with all data in buffers being registered. No need for a temp file, will just write the buffers to the registerName. *) + Deregister(f.registerName); f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE END; error := Platform.Unlink(f.workName); (*unlink first to avoid stale NFS handles and to avoid reuse of inodes*) @@ -509,7 +545,10 @@ Especially Length would become fairly complex. *) PROCEDURE Delete*(name: ARRAY OF CHAR; VAR res: INTEGER); - BEGIN res := Platform.Unlink(name) END Delete; + BEGIN + Deregister(name); + res := Platform.Unlink(name) + END Delete; PROCEDURE Rename* (old, new: ARRAY OF CHAR; VAR res: INTEGER); VAR @@ -531,6 +570,8 @@ Especially Length would become fairly complex. END; error := Platform.Rename(old, new); (* Out.String("Platform.Rename error code "); Out.Int(error,1); Out.Ln; *) + (* TODO, if we already have a FileDesc for old, it ought to be updated + with the new workname. *) IF ~Platform.DifferentFilesystems(error) THEN res := error; RETURN ELSE @@ -572,6 +613,7 @@ Especially Length would become fairly complex. IF (f.state = create) & (f.registerName # "") THEN f.state := close (* shortcut renaming *) END; Close(f); IF f.registerName # "" THEN + Deregister(f.registerName); Rename(f.workName, f.registerName, errcode); (* Out.String("Renamed (for register) f.fd = "); Out.Int(f.fd,1); From aed9134e9961145a40397e6b70833d307ae221a9 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 1 Dec 2016 17:57:27 +0000 Subject: [PATCH 019/241] Allow Revised Oberon array assignment (source may be shorter than target). --- src/compiler/OPB.Mod | 18 +++++++++--------- src/compiler/OPV.Mod | 13 +++++++++++-- src/test/confidence/arrayassignment/aa.mod | 3 --- src/test/confidence/arrayassignment/expected | 3 --- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/compiler/OPB.Mod b/src/compiler/OPB.Mod index 91576fd3..710cd640 100644 --- a/src/compiler/OPB.Mod +++ b/src/compiler/OPB.Mod @@ -891,20 +891,26 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) IF x^.comp = OPT.Array THEN IF (ynode^.class = OPT.Nconst) & (g = OPT.Char) THEN CharToString(ynode); y := ynode^.typ; g := OPT.String END ; IF x = y THEN (* ok *) + ELSIF (y.comp = OPT.Array) & (y.BaseTyp = x.BaseTyp) & (y.n <= x.n) THEN (* OK by Oberon-07/2013 *) + ELSIF (y.comp = OPT.DynArr) & (y.BaseTyp = x.BaseTyp) THEN (* OK by Oberon-07/2013, length tested at runtime *) ELSIF x^.BaseTyp = OPT.chartyp THEN (* Assign to (static) ARRAY OF CHAR *) IF g = OPT.String THEN (*check length of string*) IF ynode^.conval^.intval2 > x^.n THEN err(114) END + (* Todo: implement Oberon-07/2013 array assignment ELSIF (y.comp IN {OPT.DynArr, OPT.Array}) & (y.BaseTyp = OPT.chartyp) THEN (* Assignment from ARRAY OF CHAR is good.*) + *) ELSE err(113) END ELSE err(113) END + (* Todo: implement Oberon-07/2013 array assignment ELSIF (x.comp = OPT.DynArr) & (x^.BaseTyp = OPT.chartyp) THEN (* Assign to dynamic ARRAY OF CHAR*) IF (y.comp IN {OPT.DynArr, OPT.Array}) & (y.BaseTyp = OPT.chartyp) THEN (* Assignment from ARRAY OF CHAR is good.*) ELSE err(113) END + *) ELSIF x^.comp = OPT.Record THEN IF x = y THEN (* ok *) ELSIF y^.comp = OPT.Record THEN @@ -913,7 +919,7 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) IF q = NIL THEN err(113) END ELSE err(113) END - ELSE err(113) + ELSE (* Assign to dynamic array *) err(113) END ELSE OPM.LogWStr("unhandled case in OPB.CheckAssign, f = "); OPM.LogWNum(f, 0); OPM.LogWLn; END ; @@ -1464,7 +1470,7 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) END Return; PROCEDURE Assign*(VAR x: OPT.Node; y: OPT.Node); - VAR z: OPT.Node; subcl: SHORTINT; + VAR z: OPT.Node; BEGIN IF x^.class >= OPT.Nconst THEN err(56) END ; CheckAssign(x^.typ, y); @@ -1481,15 +1487,9 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) (y^.typ^.form = OPT.String) & (y^.conval^.intval2 = 1) THEN (* replace array := "" with array[0] := 0X *) y^.typ := OPT.chartyp; y^.conval^.intval := 0; Index(x, NewIntConst(0)) - END ; - IF (x.typ.comp IN {OPT.Array, OPT.DynArr}) & (x.typ.BaseTyp = OPT.chartyp) - & (y.typ.comp IN {OPT.Array, OPT.DynArr}) & (y.typ.BaseTyp = OPT.chartyp) THEN - subcl := OPT.copyfn - ELSE - subcl := OPT.assign END; BindNodes(OPT.Nassign, OPT.notyp, x, y); - x^.subcl := subcl; + x^.subcl := OPT.assign; END Assign; PROCEDURE Inittd*(VAR inittd, last: OPT.Node; typ: OPT.Struct); diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index cd3c649c..c2099cc5 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -785,8 +785,17 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPM.WriteString(MoveFunc); expr(r, MinPrec); OPM.WriteString(Comma); expr(l, MinPrec); OPM.WriteString(Comma); IF r^.typ = OPT.stringtyp THEN OPM.WriteInt(r^.conval^.intval2) - ELSE OPM.WriteInt(r^.typ^.size) - END ; + ELSIF r.typ.comp = OPT.DynArr THEN + (* Dynamic array to array copy *) + OPM.WriteString("__X("); + OPC.Len(r.obj, r.typ, 0); OPM.WriteString(" * "); OPM.WriteInt(r.typ.BaseTyp.size); + OPM.WriteString(", "); + OPM.WriteInt(l.typ.size); + OPM.Write(")") + ELSE (* Array to array copy. *) + ASSERT(r.typ.comp = OPT.Array); ASSERT(r.typ.size <= l.typ.size); + OPM.WriteInt(r^.typ^.size) + END; OPM.Write(CloseParen) ELSE IF (l^.typ^.form = OPT.Pointer) & (l^.obj # NIL) & (l^.obj^.adr = 1) & (l^.obj^.mode = OPT.Var) THEN diff --git a/src/test/confidence/arrayassignment/aa.mod b/src/test/confidence/arrayassignment/aa.mod index 145824e8..e5ac2db0 100644 --- a/src/test/confidence/arrayassignment/aa.mod +++ b/src/test/confidence/arrayassignment/aa.mod @@ -19,8 +19,5 @@ BEGIN COPY(a30, a10); Console.String("a10: "); Console.String(a10); Console.Ln; Console.String("a20: "); Console.String(a20); Console.Ln; Console.Ln; - a10 := a30; Console.String("a10: "); Console.String(a10); Console.Ln; - Console.String("a20: "); Console.String(a20); Console.Ln; - Console.Ln; Console.String("Array assignment test complete."); Console.Ln; END aa. diff --git a/src/test/confidence/arrayassignment/expected b/src/test/confidence/arrayassignment/expected index 7ca85cf2..753916be 100644 --- a/src/test/confidence/arrayassignment/expected +++ b/src/test/confidence/arrayassignment/expected @@ -4,7 +4,4 @@ a20: 1st 10 ch 2nd 10 ch a10: 1st 10 ch a20: 1st 10 ch 2nd 10 ch -a10: 1st 10 ch -a20: 1st 10 ch 2nd 10 ch - Array assignment test complete. From 299b0636ad82edb7bd1a865cc3cf96afbaf2bd0e Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 1 Dec 2016 18:08:08 +0000 Subject: [PATCH 020/241] Fix Platform initialisation, move common Arg handling code from Platfrom to Modules. --- src/compiler/OPM.Mod | 16 ++++---- src/library/v4/Args.Mod | 12 +++--- src/runtime/Heap.Mod | 12 +++--- src/runtime/Modules.Mod | 64 +++++++++++++++++++++++++++++- src/runtime/Oberon.Mod | 8 ++-- src/runtime/Platformunix.Mod | 67 +++----------------------------- src/runtime/Platformwindows.Mod | 66 ------------------------------- src/runtime/SYSTEM.h | 4 +- src/tools/browser/BrowserCmd.Mod | 12 +++--- 9 files changed, 99 insertions(+), 162 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 7c88f8fc..e59435eb 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -4,7 +4,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) 31.1.2007 jt synchronized with BlackBox version, in particular PromoteIntConstToLInt added *) - IMPORT SYSTEM, Texts, Files, Platform, Out, Configuration, VT100, Strings; + IMPORT SYSTEM, Texts, Files, Platform, Modules, Out, Configuration, VT100, Strings; CONST OptionChar* = "-"; @@ -233,7 +233,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) PROCEDURE OpenPar*(): BOOLEAN; (* prepare for a sequence of translations *) VAR s: ARRAY 256 OF CHAR; BEGIN - IF Platform.ArgCount = 1 THEN + IF Modules.ArgCount = 1 THEN LogWLn; LogWStr("Oberon-2 compiler v"); LogWStr(Configuration.versionLong); LogW("."); LogWLn; LogWStr("Based on Ofront by J. Templ and Software Templ OEG."); LogWLn; @@ -290,10 +290,10 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) Options := {inxchk, typchk, ptrinit, assert}; (* Default options *) (* Pick up global option changes from start of command line *) - S:=1; s:=""; Platform.GetArg(S, s); + S:=1; s:=""; Modules.GetArg(S, s); WHILE s[0] = OptionChar DO ScanOptions(s); - INC(S); s:=""; Platform.GetArg(S, s) + INC(S); s:=""; Modules.GetArg(S, s) END; (* Record global option settings for this command line *) @@ -328,10 +328,10 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) BEGIN Options := GlobalOptions; Model:=GlobalModel; Alignment := GlobalAlignment; AddressSize := GlobalAddressSize; - s:=""; Platform.GetArg(S, s); + s:=""; Modules.GetArg(S, s); WHILE s[0] = OptionChar DO ScanOptions(s); - INC(S); s:=""; Platform.GetArg(S, s) + INC(S); s:=""; Modules.GetArg(S, s) END; IF mainlinkstat IN Options THEN INCL(Options, mainprog) END; @@ -369,9 +369,9 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) BEGIN done := FALSE; curpos := 0; - IF S >= Platform.ArgCount THEN RETURN END ; + IF S >= Modules.ArgCount THEN RETURN END ; - s:=""; Platform.GetArg(S, s); + s:=""; Modules.GetArg(S, s); NEW(T); Texts.Open(T, s); LogWStr(s); LogWStr(" "); diff --git a/src/library/v4/Args.Mod b/src/library/v4/Args.Mod index a196b5c5..578ac7e5 100644 --- a/src/library/v4/Args.Mod +++ b/src/library/v4/Args.Mod @@ -3,7 +3,7 @@ MODULE Args; (* jt, 8.12.94 *) (* command line argument handling for voc (jet backend) *) - IMPORT Platform, SYSTEM; + IMPORT Platform, Modules, SYSTEM; TYPE ArgPtr = POINTER TO ARRAY 1024 OF CHAR; @@ -14,9 +14,9 @@ MODULE Args; (* jt, 8.12.94 *) argv-: SYSTEM.ADDRESS; -PROCEDURE Get* (n: INTEGER; VAR val: ARRAY OF CHAR); BEGIN Platform.GetArg(n, val) END Get; -PROCEDURE GetInt*(n: INTEGER; VAR val: LONGINT); BEGIN Platform.GetIntArg(n, val) END GetInt; -PROCEDURE Pos* (s: ARRAY OF CHAR): INTEGER; BEGIN RETURN Platform.ArgPos(s) END Pos; +PROCEDURE Get* (n: INTEGER; VAR val: ARRAY OF CHAR); BEGIN Modules.GetArg(n, val) END Get; +PROCEDURE GetInt*(n: INTEGER; VAR val: LONGINT); BEGIN Modules.GetIntArg(n, val) END GetInt; +PROCEDURE Pos* (s: ARRAY OF CHAR): INTEGER; BEGIN RETURN Modules.ArgPos(s) END Pos; PROCEDURE GetEnv*(var: ARRAY OF CHAR; VAR val: ARRAY OF CHAR); BEGIN Platform.GetEnv(var, val) END GetEnv; @@ -26,6 +26,6 @@ BEGIN RETURN Platform.getEnv(var, val) END getEnv; BEGIN - argc := Platform.ArgCount; - argv := Platform.ArgVector; + argc := Modules.ArgCount; + argv := Modules.ArgVector; END Args. diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index e368ae88..6407f27d 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -495,8 +495,8 @@ MODULE Heap; END END FINALL; - PROCEDURE -ExternMainStackFrame "extern ADDRESS Platform_MainStackFrame;"; - PROCEDURE -PlatformMainStackFrame(): S.ADDRESS "Platform_MainStackFrame"; + PROCEDURE -ExternMainStackFrame "extern ADDRESS Modules_MainStackFrame;"; + PROCEDURE -ModulesMainStackFrame(): S.ADDRESS "Modules_MainStackFrame"; PROCEDURE MarkStack(n: S.ADDRESS; VAR cand: ARRAY OF S.ADDRESS); VAR @@ -510,7 +510,7 @@ MODULE Heap; END ; IF n = 0 THEN nofcand := 0; sp := S.ADR(frame); - stack0 := PlatformMainStackFrame(); + stack0 := ModulesMainStackFrame(); (* check for minimum alignment of pointers *) inc := S.ADR(align.p) - S.ADR(align); IF sp > stack0 THEN inc := -inc END ; @@ -572,8 +572,8 @@ MODULE Heap; END RegisterFinalizer; -PROCEDURE -ExternHeapInit "extern void *Heap__init();"; -PROCEDURE -HeapModuleInit 'Heap__init()'; + PROCEDURE -ExternHeapInit "extern void *Heap__init();"; + PROCEDURE -HeapModuleInit 'Heap__init()'; PROCEDURE InitHeap*; (* InitHeap is called by Platform.init before any module bodies have been @@ -596,7 +596,7 @@ PROCEDURE -HeapModuleInit 'Heap__init()'; FileCount := 0; modules := NIL; - bigBlocks := 0; + bigBlocks := 0; fin := NIL; interrupted := FALSE; diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 970bc547..8e9c1851 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -3,7 +3,7 @@ MODULE Modules; (* jt 6.1.96 *) (* access to list of modules and commands, based on ETH Oberon *) - IMPORT SYSTEM, Heap, Platform; + IMPORT SYSTEM, Platform, Heap; (* Note, must import Platform before Heap *) CONST ModNameLen* = 20; @@ -35,6 +35,66 @@ MODULE Modules; (* jt 6.1.96 *) resMsg*: ARRAY 256 OF CHAR; imported*, importing*: ModuleName; + MainStackFrame-: SYSTEM.ADDRESS; + ArgCount-: INTEGER; + ArgVector-: SYSTEM.ADDRESS; + + +(* Program startup *) + + PROCEDURE -ExternInitHeap "extern void Heap_InitHeap();"; + PROCEDURE -InitHeap "Heap_InitHeap()"; + PROCEDURE -ExternInitModulesInit "extern void *Modules__init(void);"; + PROCEDURE -ModulesInit() "Modules__init()"; + + PROCEDURE Init*(argc: SYSTEM.INT32; argvadr: SYSTEM.ADDRESS); + (* This start code is called by the __INIT macro generated by the compiler + as the C main program. *) + TYPE ArgVecPtr = POINTER TO ARRAY 1 OF SYSTEM.ADDRESS; + VAR av: ArgVecPtr; + BEGIN + MainStackFrame := argvadr; + ArgCount := SYSTEM.VAL(INTEGER, argc); + av := SYSTEM.VAL(ArgVecPtr, argvadr); + ArgVector := av[0]; + + InitHeap; (* Initailse heap varaibles neded for compiler generated *__inits *) + ModulesInit(); (* Our own __init code will run the Platform and Heap __init code. *) + END Init; + + + PROCEDURE GetArg*(n: INTEGER; VAR val: ARRAY OF CHAR); + TYPE + ArgPtr = POINTER TO ARRAY 1024 OF CHAR; + ArgVec = POINTER TO ARRAY 1024 OF ArgPtr; + VAR av: ArgVec; + BEGIN + IF n < ArgCount THEN + av := SYSTEM.VAL(ArgVec, ArgVector); + COPY(av[n]^, val) + END + END GetArg; + + PROCEDURE GetIntArg*(n: INTEGER; VAR val: LONGINT); + VAR s: ARRAY 64 OF CHAR; k, d, i: LONGINT; + BEGIN + s := ""; GetArg(n, s); i := 0; + IF s[0] = "-" THEN i := 1 END ; + k := 0; d := ORD(s[i]) - ORD("0"); + WHILE (d >= 0 ) & (d <= 9) DO k := k*10 + d; INC(i); d := ORD(s[i]) - ORD("0") END ; + IF s[0] = "-" THEN k := -k; DEC(i) END ; + IF i > 0 THEN val := k END + END GetIntArg; + + PROCEDURE ArgPos*(s: ARRAY OF CHAR): INTEGER; + VAR i: INTEGER; arg: ARRAY 256 OF CHAR; + BEGIN + i := 0; GetArg(i, arg); + WHILE (i < ArgCount) & (s # arg) DO INC(i); GetArg(i, arg) END ; + RETURN i + END ArgPos; + + PROCEDURE Append(VAR a: ARRAY OF CHAR; b: ARRAY OF CHAR); VAR i, j: INTEGER; @@ -95,7 +155,7 @@ MODULE Modules; (* jt 6.1.96 *) PROCEDURE errch(c: CHAR); (* Here we favour simplicity over efficiency, so no buffering. *) VAR e: Platform.ErrorCode; - BEGIN e := Platform.Write(1, SYSTEM.ADR(c), 1) + BEGIN e := Platform.Write(Platform.StdOut, SYSTEM.ADR(c), 1) END errch; PROCEDURE errstring(s: ARRAY OF CHAR); diff --git a/src/runtime/Oberon.Mod b/src/runtime/Oberon.Mod index fbc3abd4..c67dcf17 100644 --- a/src/runtime/Oberon.Mod +++ b/src/runtime/Oberon.Mod @@ -2,7 +2,7 @@ MODULE Oberon; (* this version should not have dependency on graphics -- noch *) - IMPORT Platform, Texts, Out; + IMPORT Platform, Modules, Texts, Out; TYPE ParList* = POINTER TO ParRec; @@ -38,11 +38,11 @@ PROCEDURE PopulateParams; BEGIN Texts.OpenWriter(W); i := 1; (* skip program name *) - WHILE i < Platform.ArgCount DO - Platform.GetArg(i, str); Texts.WriteString(W, str); Texts.Write(W, " "); + WHILE i < Modules.ArgCount DO + Modules.GetArg(i, str); Texts.WriteString(W, str); Texts.Write(W, " "); INC(i) END; - Texts.Append (Par^.text, W.buf); + Texts.Append(Par^.text, W.buf); END PopulateParams; PROCEDURE GetSelection*(VAR text: Texts.Text; VAR beg, end, time: LONGINT); diff --git a/src/runtime/Platformunix.Mod b/src/runtime/Platformunix.Mod index fa22d7ee..79ae5e7f 100644 --- a/src/runtime/Platformunix.Mod +++ b/src/runtime/Platformunix.Mod @@ -7,7 +7,6 @@ CONST StdErr- = 2; TYPE - HaltProcedure = PROCEDURE(n: SYSTEM.INT32); SignalHandler = PROCEDURE(signal: SYSTEM.INT32); ErrorCode* = INTEGER; @@ -19,21 +18,13 @@ TYPE mtime: LONGINT; (* File modification time, value is system dependent *) END; - EnvPtr = POINTER TO ARRAY 1024 OF CHAR; - ArgPtr = POINTER TO ARRAY 1024 OF CHAR; - ArgVec = POINTER TO ARRAY 1024 OF ArgPtr; - ArgVecPtr = POINTER TO ARRAY 1 OF SYSTEM.ADDRESS; - - VAR LittleEndian-: BOOLEAN; - MainStackFrame-: SYSTEM.ADDRESS; PID-: INTEGER; (* Note: Must be updated by Fork implementation *) CWD-: ARRAY 256 OF CHAR; ArgCount-: INTEGER; ArgVector-: SYSTEM.ADDRESS; - HaltHandler: HaltProcedure; TimeStart: LONGINT; SeekSet-: INTEGER; @@ -118,72 +109,24 @@ PROCEDURE OSFree*(address: SYSTEM.ADDRESS); BEGIN free(address) END OSFree; -(* Program startup *) - -PROCEDURE -ExternInitHeap "extern void Heap_InitHeap();"; -PROCEDURE -HeapInitHeap() "Heap_InitHeap()"; - -PROCEDURE Init*(argc: SYSTEM.INT32; argvadr: SYSTEM.ADDRESS); -VAR av: ArgVecPtr; -BEGIN - MainStackFrame := argvadr; - ArgCount := SYSTEM.VAL(INTEGER, argc); - av := SYSTEM.VAL(ArgVecPtr, argvadr); - ArgVector := av[0]; - - (* This function (Platform.Init) is called at program startup BEFORE any - modules have been initalised. In turn we must initialise the heap - before module startup (xxx__init) code is run. *) - HeapInitHeap(); -END Init; - - - - (* Program arguments and environment access *) -PROCEDURE -getenv(var: ARRAY OF CHAR): EnvPtr "(Platform_EnvPtr)getenv((char*)var)"; +PROCEDURE -getenv(var: ARRAY OF CHAR): SYSTEM.ADDRESS "getenv((char*)var)"; PROCEDURE getEnv*(var: ARRAY OF CHAR; VAR val: ARRAY OF CHAR): BOOLEAN; - VAR p: EnvPtr; +TYPE EnvPtr = POINTER TO ARRAY 1024 OF CHAR; +VAR p: EnvPtr; BEGIN - p := getenv(var); + p := SYSTEM.VAL(EnvPtr, getenv(var)); IF p # NIL THEN COPY(p^, val) END; RETURN p # NIL; END getEnv; PROCEDURE GetEnv*(var: ARRAY OF CHAR; VAR val: ARRAY OF CHAR); BEGIN - IF ~ getEnv(var, val) THEN val[0] := 0X END; + IF ~getEnv(var, val) THEN val[0] := 0X END; END GetEnv; -PROCEDURE GetArg*(n: INTEGER; VAR val: ARRAY OF CHAR); - VAR av: ArgVec; -BEGIN - IF n < ArgCount THEN - av := SYSTEM.VAL(ArgVec,ArgVector); - COPY(av[n]^, val) - END -END GetArg; - -PROCEDURE GetIntArg*(n: INTEGER; VAR val: LONGINT); - VAR s: ARRAY 64 OF CHAR; k, d, i: LONGINT; -BEGIN - s := ""; GetArg(n, s); i := 0; - IF s[0] = "-" THEN i := 1 END ; - k := 0; d := ORD(s[i]) - ORD("0"); - WHILE (d >= 0 ) & (d <= 9) DO k := k*10 + d; INC(i); d := ORD(s[i]) - ORD("0") END ; - IF s[0] = "-" THEN k := -k; DEC(i) END ; - IF i > 0 THEN val := k END -END GetIntArg; - -PROCEDURE ArgPos*(s: ARRAY OF CHAR): INTEGER; - VAR i: INTEGER; arg: ARRAY 256 OF CHAR; -BEGIN - i := 0; GetArg(i, arg); - WHILE (i < ArgCount) & (s # arg) DO INC(i); GetArg(i, arg) END ; - RETURN i -END ArgPos; diff --git a/src/runtime/Platformwindows.Mod b/src/runtime/Platformwindows.Mod index 808e2e0d..44337f22 100644 --- a/src/runtime/Platformwindows.Mod +++ b/src/runtime/Platformwindows.Mod @@ -8,7 +8,6 @@ IMPORT SYSTEM; TYPE - HaltProcedure = PROCEDURE(n: SYSTEM.INT32); SignalHandler = PROCEDURE(signal: SYSTEM.INT32); ErrorCode* = INTEGER; @@ -22,22 +21,10 @@ TYPE mtimelow: LONGINT; (* File modification time, value is system dependent *) END; - EnvPtr = POINTER TO ARRAY 1024 OF CHAR; - ArgPtr = POINTER TO ARRAY 1024 OF CHAR; - ArgVec = POINTER TO ARRAY 1024 OF ArgPtr; - ArgVecPtr = POINTER TO ARRAY 1 OF SYSTEM.ADDRESS; - - VAR LittleEndian-: BOOLEAN; - MainStackFrame-: SYSTEM.ADDRESS; - HaltCode-: LONGINT; PID-: INTEGER; (* Note: Must be updated by Fork implementation *) CWD-: ARRAY 4096 OF CHAR; - ArgCount-: INTEGER; - - ArgVector-: SYSTEM.ADDRESS; - HaltHandler: HaltProcedure; TimeStart: LONGINT; SeekSet-: INTEGER; @@ -117,29 +104,6 @@ PROCEDURE OSFree*(address: SYSTEM.ADDRESS); BEGIN free(address) END OSFree; -(* Program startup *) - -PROCEDURE -ExternInitHeap "extern void Heap_InitHeap();"; -PROCEDURE -HeapInitHeap() "Heap_InitHeap()"; - -PROCEDURE Init*(argc: SYSTEM.INT32; argvadr: SYSTEM.ADDRESS); -VAR av: ArgVecPtr; -BEGIN - MainStackFrame := argvadr; - ArgCount := SYSTEM.VAL(INTEGER, argc); - av := SYSTEM.VAL(ArgVecPtr, argvadr); - ArgVector := av[0]; - HaltCode := -128; - - (* This function (Platform.Init) is called at program startup BEFORE any - modules have been initalised. In turn we must initialise the heap - before module startup (xxx__init) code is run. *) - HeapInitHeap(); -END Init; - - - - (* Program arguments and environmet access *) PROCEDURE -getenv(name: ARRAY OF CHAR; VAR buf: ARRAY OF CHAR): INTEGER @@ -164,34 +128,6 @@ BEGIN IF ~getEnv(var, val) THEN val[0] := 0X END; END GetEnv; -PROCEDURE GetArg*(n: INTEGER; VAR val: ARRAY OF CHAR); - VAR av: ArgVec; -BEGIN - IF n < ArgCount THEN - av := SYSTEM.VAL(ArgVec,ArgVector); - COPY(av[n]^, val) - END -END GetArg; - -PROCEDURE GetIntArg*(n: INTEGER; VAR val: LONGINT); - VAR s: ARRAY 64 OF CHAR; k, d, i: LONGINT; -BEGIN - s := ""; GetArg(n, s); i := 0; - IF s[0] = "-" THEN i := 1 END ; - k := 0; d := ORD(s[i]) - ORD("0"); - WHILE (d >= 0 ) & (d <= 9) DO k := k*10 + d; INC(i); d := ORD(s[i]) - ORD("0") END ; - IF s[0] = "-" THEN k := -k; DEC(i) END ; - IF i > 0 THEN val := k END -END GetIntArg; - -PROCEDURE ArgPos*(s: ARRAY OF CHAR): INTEGER; - VAR i: INTEGER; arg: ARRAY 256 OF CHAR; -BEGIN - i := 0; GetArg(i, arg); - WHILE (i < ArgCount) & (s # arg) DO INC(i); GetArg(i, arg) END ; - RETURN i -END ArgPos; - @@ -559,8 +495,6 @@ PROCEDURE -getpid(): INTEGER "(INTEGER)GetCurrentProcessId()"; BEGIN TestLittleEndian; - HaltCode := -128; - HaltHandler := NIL; TimeStart := 0; TimeStart := Time(); CWD := ""; getCurrentDirectory(CWD); PID := getpid(); diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index ff4c724d..f6936068 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -258,10 +258,10 @@ extern void Heap_INCREF(); // Main module initialisation, registration and finalisation -extern void Platform_Init(INT32 argc, ADDRESS argv); +extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); -#define __INIT(argc, argv) static void *m; Platform_Init(argc, (ADDRESS)&argv); +#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 diff --git a/src/tools/browser/BrowserCmd.Mod b/src/tools/browser/BrowserCmd.Mod index d463c22d..14df830f 100644 --- a/src/tools/browser/BrowserCmd.Mod +++ b/src/tools/browser/BrowserCmd.Mod @@ -3,7 +3,7 @@ MODULE BrowserCmd; (* RC 29.10.93 *) (* object model 4.12.93, command line ver IMPORT OPM, OPS, OPT, OPV, Texts, Strings, Files, Out, - Oberon, Platform, SYSTEM, Configuration; + Oberon, Modules, SYSTEM, Configuration; CONST OptionChar = "-"; @@ -265,13 +265,13 @@ MODULE BrowserCmd; (* RC 29.10.93 *) (* object model 4.12.93, command line ver PROCEDURE ShowDef*; VAR S, vname, name: OPS.Name; BEGIN - option := 0X; Platform.GetArg(1, S); - IF Platform.ArgCount > 2 THEN - IF S[0] = OptionChar THEN option := S[1]; Platform.GetArg(2, S) - ELSE Platform.GetArg(2, vname); option := vname[1] + option := 0X; Modules.GetArg(1, S); + IF Modules.ArgCount > 2 THEN + IF S[0] = OptionChar THEN option := S[1]; Modules.GetArg(2, S) + ELSE Modules.GetArg(2, vname); option := vname[1] END END; - IF Platform.ArgCount >= 2 THEN + IF Modules.ArgCount >= 2 THEN Ident(S, name); OPT.Init(name, {}); OPT.SelfName := "AvoidErr154"; WModule(name, Oberon.Log); From c65b89daf36f4023c6e740ed9a4f224b7467a234 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 1 Dec 2016 18:39:02 +0000 Subject: [PATCH 021/241] Update confidence tests for arg handling move. Remove unused vars in Platform. --- src/runtime/Platformunix.Mod | 4 ---- src/runtime/Platformwindows.Mod | 2 -- src/test/confidence/lola/lola.Mod | 4 ++-- src/test/confidence/signal/signal.mod | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/runtime/Platformunix.Mod b/src/runtime/Platformunix.Mod index 79ae5e7f..ff03a960 100644 --- a/src/runtime/Platformunix.Mod +++ b/src/runtime/Platformunix.Mod @@ -22,9 +22,6 @@ VAR LittleEndian-: BOOLEAN; PID-: INTEGER; (* Note: Must be updated by Fork implementation *) CWD-: ARRAY 256 OF CHAR; - ArgCount-: INTEGER; - - ArgVector-: SYSTEM.ADDRESS; TimeStart: LONGINT; SeekSet-: INTEGER; @@ -426,7 +423,6 @@ PROCEDURE -getpid(): INTEGER "(INTEGER)getpid()"; BEGIN TestLittleEndian; - HaltHandler := NIL; TimeStart := 0; TimeStart := Time(); PID := getpid(); IF getcwd(CWD) = NIL THEN CWD := "" END; diff --git a/src/runtime/Platformwindows.Mod b/src/runtime/Platformwindows.Mod index 44337f22..4087c75b 100644 --- a/src/runtime/Platformwindows.Mod +++ b/src/runtime/Platformwindows.Mod @@ -35,8 +35,6 @@ VAR StdOut-: FileHandle; StdErr-: FileHandle; - InterruptHandler: SignalHandler; - NL-: ARRAY 3 OF CHAR; (* Platform specific newline representation *) diff --git a/src/test/confidence/lola/lola.Mod b/src/test/confidence/lola/lola.Mod index eccebbfd..8f7faaa3 100644 --- a/src/test/confidence/lola/lola.Mod +++ b/src/test/confidence/lola/lola.Mod @@ -1,7 +1,7 @@ MODULE Lola; (* Command line runner for Lola to verilog compilation *) - IMPORT LSB, LSC, LSV, Platform, Console; + IMPORT LSB, LSC, LSV, Modules, Console; BEGIN - IF Platform.ArgCount < 3 THEN + IF Modules.ArgCount < 3 THEN Console.String("Lola - compile lola source to verilog source."); Console.Ln; Console.Ln; Console.String("usage:"); Console.Ln; Console.Ln; Console.String(" lola lola-source-file verilog-source-file"); Console.Ln; Console.Ln; diff --git a/src/test/confidence/signal/signal.mod b/src/test/confidence/signal/signal.mod index 3a897392..294345f2 100644 --- a/src/test/confidence/signal/signal.mod +++ b/src/test/confidence/signal/signal.mod @@ -1,6 +1,6 @@ (* Test that interrupt and quit are handled correctly. *) MODULE SignalTest; -IMPORT Console, Platform, Files, SYSTEM; +IMPORT Console, Platform, Modules, Files, SYSTEM; VAR result: Files.File; rider: Files.Rider; @@ -42,7 +42,7 @@ END Take5; BEGIN result := Files.New("result"); Files.Set(rider, result, 0); - IF Platform.ArgCount > 1 THEN + IF Modules.ArgCount > 1 THEN Platform.SetInterruptHandler(handle); Platform.SetQuitHandler(handle) END; From 62c6d5c2a45ea05d4cf13f69933ffe98d4d9cf84 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 1 Dec 2016 18:40:01 +0000 Subject: [PATCH 022/241] Update C bootstrap source. --- bootstrap/SYSTEM.h | 4 +- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 8 +-- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 8 +-- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 83 +++++++++++++++++++++++- bootstrap/unix-44/Modules.h | 9 ++- bootstrap/unix-44/OPB.c | 20 ++---- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 22 ++++--- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 10 +-- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 8 +-- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 14 +++- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 95 ++-------------------------- bootstrap/unix-44/Platform.h | 9 +-- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 6 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 8 +-- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 8 +-- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 83 +++++++++++++++++++++++- bootstrap/unix-48/Modules.h | 9 ++- bootstrap/unix-48/OPB.c | 20 ++---- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 22 ++++--- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 10 +-- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 8 +-- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 14 +++- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 95 ++-------------------------- bootstrap/unix-48/Platform.h | 9 +-- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 6 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 8 +-- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 8 +-- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 83 +++++++++++++++++++++++- bootstrap/unix-88/Modules.h | 9 ++- bootstrap/unix-88/OPB.c | 20 ++---- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 22 ++++--- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 10 +-- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 8 +-- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 14 +++- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 95 ++-------------------------- bootstrap/unix-88/Platform.h | 9 +-- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 6 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 8 +-- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 8 +-- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 85 ++++++++++++++++++++++++- bootstrap/windows-48/Modules.h | 9 ++- bootstrap/windows-48/OPB.c | 20 ++---- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 22 ++++--- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 10 +-- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 8 +-- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 14 +++- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 92 +-------------------------- bootstrap/windows-48/Platform.h | 10 +-- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 6 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 8 +-- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 8 +-- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 85 ++++++++++++++++++++++++- bootstrap/windows-88/Modules.h | 9 ++- bootstrap/windows-88/OPB.c | 20 ++---- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 22 ++++--- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 10 +-- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 8 +-- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 14 +++- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 92 +-------------------------- bootstrap/windows-88/Platform.h | 10 +-- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 6 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 186 files changed, 854 insertions(+), 870 deletions(-) diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index ff4c724d..f6936068 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -258,10 +258,10 @@ extern void Heap_INCREF(); // Main module initialisation, registration and finalisation -extern void Platform_Init(INT32 argc, ADDRESS argv); +extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); -#define __INIT(argc, argv) static void *m; Platform_Init(argc, (ADDRESS)&argv); +#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 29524a91..e59d7615 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 54214f70..01281cfc 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 1e6381e9..98f85767 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 763569cc..f39534fc 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -237,7 +237,7 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __COPY(osfile->workName, osfile->registerName, 101); + __MOVE(osfile->workName, osfile->registerName, 101); Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); osfile->tempFile = 1; osfile->state = 0; @@ -262,7 +262,7 @@ static void Files_Create (Files_File f) } else { __ASSERT(f->state == 2, 0); Files_Deregister(f->registerName, 101); - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -823,7 +823,7 @@ void Files_Register (Files_File f) if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 28a97c05..e124b950 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index af8fd777..b6abc8f3 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -105,12 +105,12 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); -extern ADDRESS Platform_MainStackFrame; +extern ADDRESS Modules_MainStackFrame; extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_HeapModuleInit() Heap__init() #define Heap_ModulesHalt(code) Modules_Halt(code) +#define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) -#define Heap_PlatformMainStackFrame() Platform_MainStackFrame void Heap_Lock (void) { @@ -599,7 +599,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) if (n == 0) { nofcand = 0; sp = (ADDRESS)&frame; - stack0 = Heap_PlatformMainStackFrame(); + stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; if (sp > stack0) { inc = -inc; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index cc058553..82ebd04d 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 9aedc826..0290d664 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -43,24 +43,105 @@ typedef export INT16 Modules_res; export CHAR Modules_resMsg[256]; export Modules_ModuleName Modules_imported, Modules_importing; +export INT32 Modules_MainStackFrame; +export INT16 Modules_ArgCount; +export INT32 Modules_ArgVector; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); +export void Modules_Init (INT32 argc, INT32 argvadr); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); +extern void Heap_InitHeap(); +extern void *Modules__init(void); +#define Modules_InitHeap() Heap_InitHeap() +#define Modules_ModulesInit() Modules__init() #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m +typedef + INT32 (*ArgVecPtr__14)[1]; + +void Modules_Init (INT32 argc, INT32 argvadr) +{ + ArgVecPtr__14 av = NIL; + Modules_MainStackFrame = argvadr; + Modules_ArgCount = __VAL(INT16, argc); + av = (ArgVecPtr__14)(ADDRESS)argvadr; + Modules_ArgVector = (*av)[0]; + Modules_InitHeap(); + Modules_ModulesInit(); +} + +typedef + CHAR (*ArgPtr__9)[1024]; + +typedef + ArgPtr__9 (*ArgVec__10)[1024]; + +void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) +{ + ArgVec__10 av = NIL; + if (n < Modules_ArgCount) { + av = (ArgVec__10)(ADDRESS)Modules_ArgVector; + __COPY(*(*av)[__X(n, 1024)], val, val__len); + } +} + +void Modules_GetIntArg (INT16 n, INT32 *val) +{ + CHAR s[64]; + INT32 k, d, i; + s[0] = 0x00; + Modules_GetArg(n, (void*)s, 64); + i = 0; + if (s[0] == '-') { + i = 1; + } + k = 0; + d = (INT16)s[__X(i, 64)] - 48; + while ((d >= 0 && d <= 9)) { + k = k * 10 + d; + i += 1; + d = (INT16)s[__X(i, 64)] - 48; + } + if (s[0] == '-') { + k = -k; + i -= 1; + } + if (i > 0) { + *val = k; + } +} + +INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) +{ + INT16 i; + CHAR arg[256]; + __DUP(s, s__len, CHAR); + i = 0; + Modules_GetArg(i, (void*)arg, 256); + while ((i < Modules_ArgCount && __STRCMP(s, arg) != 0)) { + i += 1; + Modules_GetArg(i, (void*)arg, 256); + } + __DEL(s); + return i; +} + static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 568db414..3ab94701 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -39,13 +39,20 @@ typedef import INT16 Modules_res; import CHAR Modules_resMsg[256]; import Modules_ModuleName Modules_imported, Modules_importing; +import INT32 Modules_MainStackFrame; +import INT16 Modules_ArgCount; +import INT32 Modules_ArgVector; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; +import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); +import void Modules_Init (INT32 argc, INT32 argvadr); import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 2e03b5fc..d9e826b8 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -253,7 +253,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len) x->conval->intval = -1; x->conval->intval2 = OPM_Longint(len); x->conval->ext = OPT_NewExt(); - __COPY(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 256); return x; } @@ -1624,23 +1624,19 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) g = 8; } if (x == y) { + } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { + } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } } else { OPB_err(113); } - } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { - } else { - OPB_err(113); - } } else if (x->comp == 4) { if (x == y) { } else if (y->comp == 4) { @@ -2536,7 +2532,6 @@ void OPB_Return (OPT_Node *x, OPT_Object proc) void OPB_Assign (OPT_Node *x, OPT_Node y) { OPT_Node z = NIL; - INT8 subcl; if ((*x)->class >= 7) { OPB_err(56); } @@ -2562,13 +2557,8 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { - subcl = 18; - } else { - subcl = 0; - } OPB_BindNodes(19, OPT_notyp, &*x, y); - (*x)->subcl = subcl; + (*x)->subcl = 0; } void OPB_Inittd (OPT_Node *inittd, OPT_Node *last, OPT_Struct typ) diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 6641207d..2c396170 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index fd11366a..5f4dc826 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 4eff8cf5..f9bc06a4 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 58701bfc..1732c950 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Configuration.h" #include "Files.h" +#include "Modules.h" #include "Out.h" #include "Platform.h" #include "Strings.h" @@ -266,7 +267,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - if (Platform_ArgCount == 1) { + if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); OPM_LogWStr(Configuration_versionLong, 75); @@ -362,16 +363,16 @@ BOOLEAN OPM_OpenPar (void) OPM_Options = 0xa9; OPM_S = 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } OPM_GlobalAddressSize = OPM_AddressSize; OPM_GlobalAlignment = OPM_Alignment; - __COPY(OPM_Model, OPM_GlobalModel, 10); + __MOVE(OPM_Model, OPM_GlobalModel, 10); OPM_GlobalOptions = OPM_Options; return 1; } @@ -410,16 +411,16 @@ void OPM_InitOptions (void) CHAR searchpath[1024], modules[1024]; CHAR MODULES[1024]; OPM_Options = OPM_GlobalOptions; - __COPY(OPM_GlobalModel, OPM_Model, 10); + __MOVE(OPM_GlobalModel, OPM_Model, 10); OPM_Alignment = OPM_GlobalAlignment; OPM_AddressSize = OPM_GlobalAddressSize; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } if (__IN(15, OPM_Options, 32)) { OPM_Options |= __SETOF(10,32); @@ -472,11 +473,11 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) CHAR s[256]; *done = 0; OPM_curpos = 0; - if (OPM_S >= Platform_ArgCount) { + if (OPM_S >= Modules_ArgCount) { return; } s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); __NEW(T, Texts_TextDesc); Texts_Open(T, s, 256); OPM_LogWStr(s, 256); @@ -1070,6 +1071,7 @@ export void *OPM__init(void) __DEFMOD; __MODULE_IMPORT(Configuration); __MODULE_IMPORT(Files); + __MODULE_IMPORT(Modules); __MODULE_IMPORT(Out); __MODULE_IMPORT(Platform); __MODULE_IMPORT(Strings); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 4dd3d03b..979995c8 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index d4922137..69624c1f 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -527,7 +527,7 @@ static void OPP_selector (OPT_Node *x) } else if (OPP_sym == 18) { OPS_Get(&OPP_sym); if (OPP_sym == 38) { - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPS_Get(&OPP_sym); if ((*x)->typ != NIL) { if ((*x)->typ->form == 11) { @@ -867,7 +867,7 @@ static void OPP_Receiver (INT8 *mode, OPS_Name name, OPT_Struct *typ, OPT_Struct } else { *mode = 1; } - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckSym(38); OPP_CheckSym(20); if (OPP_sym == 38) { @@ -1030,7 +1030,7 @@ static void TProcDecl__23 (void) } OPP_Receiver(&objMode, objName, &objTyp, &recTyp); if (OPP_sym == 38) { - __COPY(OPS_name, *ProcedureDeclaration__16_s->name, 256); + __MOVE(OPS_name, *ProcedureDeclaration__16_s->name, 256); OPP_CheckMark(&*ProcedureDeclaration__16_s->vis); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp, &*ProcedureDeclaration__16_s->fwd); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp->BaseTyp, &baseProc); @@ -1129,7 +1129,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) TProcDecl__23(); } else if (OPP_sym == 38) { OPT_Find(&fwd); - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckMark(&vis); if ((vis != 0 && mode == 6)) { mode = 7; diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 2814e733..b748e221 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 7218afe1..eee78d80 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index a860454b..7ab70899 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 7b7f6fbc..40f61458 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -434,8 +434,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_topScope = OPT_universe; OPT_OpenScope(0, NIL); OPT_SYSimported = 0; - __COPY(name, OPT_SelfName, 256); - __COPY(name, OPT_topScope->name, 256); + __MOVE(name, OPT_SelfName, 256); + __MOVE(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; OPT_newsf = __IN(4, opt, 32); @@ -1186,7 +1186,7 @@ static void OPT_InStruct (OPT_Struct *typ) } *typ = OPT_NewStr(0, 1); } else { - __COPY(name, obj->name, 256); + __MOVE(name, obj->name, 256); OPT_InsertImport(obj, &OPT_GlbMod[__X(mno, 64)]->right, &old); if (old != NIL) { OPT_FPrintObj(old); diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 86256024..67996e8e 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index eb5ad767..fb6ac690 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -163,7 +163,7 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte } scope = obj->scope; scope->leaf = 1; - __COPY(obj->name, scope->name, 256); + __MOVE(obj->name, scope->name, 256); OPV_Stamp(scope->name); if (mode == 9) { obj->adr = 1; @@ -1286,7 +1286,17 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); if (r->typ == OPT_stringtyp) { OPM_WriteInt(r->conval->intval2); + } else if (r->typ->comp == 3) { + OPM_WriteString((CHAR*)"__X(", 5); + OPC_Len(r->obj, r->typ, 0); + OPM_WriteString((CHAR*)" * ", 4); + OPM_WriteInt(r->typ->BaseTyp->size); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(l->typ->size); + OPM_Write(')'); } else { + __ASSERT(r->typ->comp == 2, 0); + __ASSERT(r->typ->size <= l->typ->size, 0); OPM_WriteInt(r->typ->size); } OPM_Write(')'); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 9a8653a0..43aaf24a 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 1508a8bb..a03cf592 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index b273390e..27f2c9bb 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 9a2555d2..1fc766bf 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,37 +7,18 @@ #include "SYSTEM.h" -typedef - CHAR (*Platform_ArgPtr)[1024]; - -typedef - Platform_ArgPtr (*Platform_ArgVec)[1024]; - -typedef - INT32 (*Platform_ArgVecPtr)[1]; - -typedef - CHAR (*Platform_EnvPtr)[1024]; - typedef struct Platform_FileIdentity { INT32 volume, index, mtime; } Platform_FileIdentity; -typedef - void (*Platform_HaltProcedure)(INT32); - typedef void (*Platform_SignalHandler)(INT32); export BOOLEAN Platform_LittleEndian; -export INT32 Platform_MainStackFrame; export INT16 Platform_PID; export CHAR Platform_CWD[256]; -export INT16 Platform_ArgCount; -export INT32 Platform_ArgVector; -static Platform_HaltProcedure Platform_HaltHandler; static INT32 Platform_TimeStart; export INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; export CHAR Platform_NL[3]; @@ -45,7 +26,6 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -53,15 +33,12 @@ export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); -export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); @@ -117,8 +94,6 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV -extern void Heap_InitHeap(); -#define Platform_HeapInitHeap() Heap_InitHeap() #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -129,7 +104,7 @@ extern void Heap_InitHeap(); #define Platform_fsync(fd) fsync(fd) #define Platform_ftruncate(fd, l) ftruncate(fd, l) #define Platform_getcwd(cwd, cwd__len) getcwd((char*)cwd, cwd__len) -#define Platform_getenv(var, var__len) (Platform_EnvPtr)getenv((char*)var) +#define Platform_getenv(var, var__len) getenv((char*)var) #define Platform_getpid() (INTEGER)getpid() #define Platform_gettimeval() struct timeval tv; gettimeofday(&tv,0) #define Platform_isatty(fd) isatty(fd) @@ -213,21 +188,14 @@ void Platform_OSFree (INT32 address) Platform_free(address); } -void Platform_Init (INT32 argc, INT32 argvadr) -{ - Platform_ArgVecPtr av = NIL; - Platform_MainStackFrame = argvadr; - Platform_ArgCount = __VAL(INT16, argc); - av = (Platform_ArgVecPtr)(ADDRESS)argvadr; - Platform_ArgVector = (*av)[0]; - Platform_HeapInitHeap(); -} +typedef + CHAR (*EnvPtr__78)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - Platform_EnvPtr p = NIL; + EnvPtr__78 p = NIL; __DUP(var, var__len, CHAR); - p = Platform_getenv(var, var__len); + p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } @@ -244,56 +212,6 @@ void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) -{ - Platform_ArgVec av = NIL; - if (n < Platform_ArgCount) { - av = (Platform_ArgVec)(ADDRESS)Platform_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); - } -} - -void Platform_GetIntArg (INT16 n, INT32 *val) -{ - CHAR s[64]; - INT32 k, d, i; - s[0] = 0x00; - Platform_GetArg(n, (void*)s, 64); - i = 0; - if (s[0] == '-') { - i = 1; - } - k = 0; - d = (INT16)s[__X(i, 64)] - 48; - while ((d >= 0 && d <= 9)) { - k = k * 10 + d; - i += 1; - d = (INT16)s[__X(i, 64)] - 48; - } - if (s[0] == '-') { - k = -k; - i -= 1; - } - if (i > 0) { - *val = k; - } -} - -INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) -{ - INT16 i; - CHAR arg[256]; - __DUP(s, s__len, CHAR); - i = 0; - Platform_GetArg(i, (void*)arg, 256); - while ((i < Platform_ArgCount && __STRCMP(s, arg) != 0)) { - i += 1; - Platform_GetArg(i, (void*)arg, 256); - } - __DEL(s); - return i; -} - void Platform_SetInterruptHandler (Platform_SignalHandler handler) { Platform_sethandler(2, handler); @@ -587,7 +505,6 @@ export void *Platform__init(void) __INITYP(Platform_FileIdentity, Platform_FileIdentity, 0); /* BEGIN */ Platform_TestLittleEndian(); - Platform_HaltHandler = NIL; Platform_TimeStart = 0; Platform_TimeStart = Platform_Time(); Platform_PID = Platform_getpid(); diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 315a17e0..9be32cda 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -16,18 +16,14 @@ typedef import BOOLEAN Platform_LittleEndian; -import INT32 Platform_MainStackFrame; import INT16 Platform_PID; import CHAR Platform_CWD[256]; -import INT16 Platform_ArgCount; -import INT32 Platform_ArgVector; import INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -35,15 +31,12 @@ import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); -import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index ee1f94ca..e4149017 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 16a16b7a..e3bfadb5 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index b60bb504..a3f1e808 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index adf86c42..b192b7bb 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index ea3662c0..376db061 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -394,8 +394,8 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t e->file = (*(Texts_Alien*)&E)->file; e->org = (*(Texts_Alien*)&E)->org; e->span = (*(Texts_Alien*)&E)->span; - __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); - __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); + __MOVE((*(Texts_Alien*)&E)->mod, e->mod, 32); + __MOVE((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index beb1d7c1..4ea56de1 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index f0e444ea..7a2a840d 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 0f1bc5ac..5a3fe6d0 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 43e5cb69..657534b4 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 784b684d..6ad7abb0 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 29524a91..e59d7615 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 54214f70..01281cfc 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 1e6381e9..98f85767 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 763569cc..f39534fc 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -237,7 +237,7 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __COPY(osfile->workName, osfile->registerName, 101); + __MOVE(osfile->workName, osfile->registerName, 101); Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); osfile->tempFile = 1; osfile->state = 0; @@ -262,7 +262,7 @@ static void Files_Create (Files_File f) } else { __ASSERT(f->state == 2, 0); Files_Deregister(f->registerName, 101); - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -823,7 +823,7 @@ void Files_Register (Files_File f) if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 28a97c05..e124b950 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index af8fd777..b6abc8f3 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -105,12 +105,12 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); -extern ADDRESS Platform_MainStackFrame; +extern ADDRESS Modules_MainStackFrame; extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_HeapModuleInit() Heap__init() #define Heap_ModulesHalt(code) Modules_Halt(code) +#define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) -#define Heap_PlatformMainStackFrame() Platform_MainStackFrame void Heap_Lock (void) { @@ -599,7 +599,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) if (n == 0) { nofcand = 0; sp = (ADDRESS)&frame; - stack0 = Heap_PlatformMainStackFrame(); + stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; if (sp > stack0) { inc = -inc; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index cc058553..82ebd04d 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 9aedc826..0290d664 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -43,24 +43,105 @@ typedef export INT16 Modules_res; export CHAR Modules_resMsg[256]; export Modules_ModuleName Modules_imported, Modules_importing; +export INT32 Modules_MainStackFrame; +export INT16 Modules_ArgCount; +export INT32 Modules_ArgVector; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); +export void Modules_Init (INT32 argc, INT32 argvadr); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); +extern void Heap_InitHeap(); +extern void *Modules__init(void); +#define Modules_InitHeap() Heap_InitHeap() +#define Modules_ModulesInit() Modules__init() #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m +typedef + INT32 (*ArgVecPtr__14)[1]; + +void Modules_Init (INT32 argc, INT32 argvadr) +{ + ArgVecPtr__14 av = NIL; + Modules_MainStackFrame = argvadr; + Modules_ArgCount = __VAL(INT16, argc); + av = (ArgVecPtr__14)(ADDRESS)argvadr; + Modules_ArgVector = (*av)[0]; + Modules_InitHeap(); + Modules_ModulesInit(); +} + +typedef + CHAR (*ArgPtr__9)[1024]; + +typedef + ArgPtr__9 (*ArgVec__10)[1024]; + +void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) +{ + ArgVec__10 av = NIL; + if (n < Modules_ArgCount) { + av = (ArgVec__10)(ADDRESS)Modules_ArgVector; + __COPY(*(*av)[__X(n, 1024)], val, val__len); + } +} + +void Modules_GetIntArg (INT16 n, INT32 *val) +{ + CHAR s[64]; + INT32 k, d, i; + s[0] = 0x00; + Modules_GetArg(n, (void*)s, 64); + i = 0; + if (s[0] == '-') { + i = 1; + } + k = 0; + d = (INT16)s[__X(i, 64)] - 48; + while ((d >= 0 && d <= 9)) { + k = k * 10 + d; + i += 1; + d = (INT16)s[__X(i, 64)] - 48; + } + if (s[0] == '-') { + k = -k; + i -= 1; + } + if (i > 0) { + *val = k; + } +} + +INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) +{ + INT16 i; + CHAR arg[256]; + __DUP(s, s__len, CHAR); + i = 0; + Modules_GetArg(i, (void*)arg, 256); + while ((i < Modules_ArgCount && __STRCMP(s, arg) != 0)) { + i += 1; + Modules_GetArg(i, (void*)arg, 256); + } + __DEL(s); + return i; +} + static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 568db414..3ab94701 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -39,13 +39,20 @@ typedef import INT16 Modules_res; import CHAR Modules_resMsg[256]; import Modules_ModuleName Modules_imported, Modules_importing; +import INT32 Modules_MainStackFrame; +import INT16 Modules_ArgCount; +import INT32 Modules_ArgVector; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; +import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); +import void Modules_Init (INT32 argc, INT32 argvadr); import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 2e03b5fc..d9e826b8 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -253,7 +253,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len) x->conval->intval = -1; x->conval->intval2 = OPM_Longint(len); x->conval->ext = OPT_NewExt(); - __COPY(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 256); return x; } @@ -1624,23 +1624,19 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) g = 8; } if (x == y) { + } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { + } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } } else { OPB_err(113); } - } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { - } else { - OPB_err(113); - } } else if (x->comp == 4) { if (x == y) { } else if (y->comp == 4) { @@ -2536,7 +2532,6 @@ void OPB_Return (OPT_Node *x, OPT_Object proc) void OPB_Assign (OPT_Node *x, OPT_Node y) { OPT_Node z = NIL; - INT8 subcl; if ((*x)->class >= 7) { OPB_err(56); } @@ -2562,13 +2557,8 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { - subcl = 18; - } else { - subcl = 0; - } OPB_BindNodes(19, OPT_notyp, &*x, y); - (*x)->subcl = subcl; + (*x)->subcl = 0; } void OPB_Inittd (OPT_Node *inittd, OPT_Node *last, OPT_Struct typ) diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 6641207d..2c396170 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index fd11366a..5f4dc826 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 4eff8cf5..f9bc06a4 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 58701bfc..1732c950 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Configuration.h" #include "Files.h" +#include "Modules.h" #include "Out.h" #include "Platform.h" #include "Strings.h" @@ -266,7 +267,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - if (Platform_ArgCount == 1) { + if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); OPM_LogWStr(Configuration_versionLong, 75); @@ -362,16 +363,16 @@ BOOLEAN OPM_OpenPar (void) OPM_Options = 0xa9; OPM_S = 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } OPM_GlobalAddressSize = OPM_AddressSize; OPM_GlobalAlignment = OPM_Alignment; - __COPY(OPM_Model, OPM_GlobalModel, 10); + __MOVE(OPM_Model, OPM_GlobalModel, 10); OPM_GlobalOptions = OPM_Options; return 1; } @@ -410,16 +411,16 @@ void OPM_InitOptions (void) CHAR searchpath[1024], modules[1024]; CHAR MODULES[1024]; OPM_Options = OPM_GlobalOptions; - __COPY(OPM_GlobalModel, OPM_Model, 10); + __MOVE(OPM_GlobalModel, OPM_Model, 10); OPM_Alignment = OPM_GlobalAlignment; OPM_AddressSize = OPM_GlobalAddressSize; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } if (__IN(15, OPM_Options, 32)) { OPM_Options |= __SETOF(10,32); @@ -472,11 +473,11 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) CHAR s[256]; *done = 0; OPM_curpos = 0; - if (OPM_S >= Platform_ArgCount) { + if (OPM_S >= Modules_ArgCount) { return; } s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); __NEW(T, Texts_TextDesc); Texts_Open(T, s, 256); OPM_LogWStr(s, 256); @@ -1070,6 +1071,7 @@ export void *OPM__init(void) __DEFMOD; __MODULE_IMPORT(Configuration); __MODULE_IMPORT(Files); + __MODULE_IMPORT(Modules); __MODULE_IMPORT(Out); __MODULE_IMPORT(Platform); __MODULE_IMPORT(Strings); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 4dd3d03b..979995c8 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index d4922137..69624c1f 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -527,7 +527,7 @@ static void OPP_selector (OPT_Node *x) } else if (OPP_sym == 18) { OPS_Get(&OPP_sym); if (OPP_sym == 38) { - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPS_Get(&OPP_sym); if ((*x)->typ != NIL) { if ((*x)->typ->form == 11) { @@ -867,7 +867,7 @@ static void OPP_Receiver (INT8 *mode, OPS_Name name, OPT_Struct *typ, OPT_Struct } else { *mode = 1; } - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckSym(38); OPP_CheckSym(20); if (OPP_sym == 38) { @@ -1030,7 +1030,7 @@ static void TProcDecl__23 (void) } OPP_Receiver(&objMode, objName, &objTyp, &recTyp); if (OPP_sym == 38) { - __COPY(OPS_name, *ProcedureDeclaration__16_s->name, 256); + __MOVE(OPS_name, *ProcedureDeclaration__16_s->name, 256); OPP_CheckMark(&*ProcedureDeclaration__16_s->vis); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp, &*ProcedureDeclaration__16_s->fwd); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp->BaseTyp, &baseProc); @@ -1129,7 +1129,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) TProcDecl__23(); } else if (OPP_sym == 38) { OPT_Find(&fwd); - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckMark(&vis); if ((vis != 0 && mode == 6)) { mode = 7; diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 2814e733..b748e221 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 7218afe1..eee78d80 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index a860454b..7ab70899 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index aa53a484..174aae08 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -434,8 +434,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_topScope = OPT_universe; OPT_OpenScope(0, NIL); OPT_SYSimported = 0; - __COPY(name, OPT_SelfName, 256); - __COPY(name, OPT_topScope->name, 256); + __MOVE(name, OPT_SelfName, 256); + __MOVE(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; OPT_newsf = __IN(4, opt, 32); @@ -1186,7 +1186,7 @@ static void OPT_InStruct (OPT_Struct *typ) } *typ = OPT_NewStr(0, 1); } else { - __COPY(name, obj->name, 256); + __MOVE(name, obj->name, 256); OPT_InsertImport(obj, &OPT_GlbMod[__X(mno, 64)]->right, &old); if (old != NIL) { OPT_FPrintObj(old); diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 86256024..67996e8e 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index eb5ad767..fb6ac690 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -163,7 +163,7 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte } scope = obj->scope; scope->leaf = 1; - __COPY(obj->name, scope->name, 256); + __MOVE(obj->name, scope->name, 256); OPV_Stamp(scope->name); if (mode == 9) { obj->adr = 1; @@ -1286,7 +1286,17 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); if (r->typ == OPT_stringtyp) { OPM_WriteInt(r->conval->intval2); + } else if (r->typ->comp == 3) { + OPM_WriteString((CHAR*)"__X(", 5); + OPC_Len(r->obj, r->typ, 0); + OPM_WriteString((CHAR*)" * ", 4); + OPM_WriteInt(r->typ->BaseTyp->size); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(l->typ->size); + OPM_Write(')'); } else { + __ASSERT(r->typ->comp == 2, 0); + __ASSERT(r->typ->size <= l->typ->size, 0); OPM_WriteInt(r->typ->size); } OPM_Write(')'); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 9a8653a0..43aaf24a 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 1508a8bb..a03cf592 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index b273390e..27f2c9bb 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 9a2555d2..1fc766bf 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,37 +7,18 @@ #include "SYSTEM.h" -typedef - CHAR (*Platform_ArgPtr)[1024]; - -typedef - Platform_ArgPtr (*Platform_ArgVec)[1024]; - -typedef - INT32 (*Platform_ArgVecPtr)[1]; - -typedef - CHAR (*Platform_EnvPtr)[1024]; - typedef struct Platform_FileIdentity { INT32 volume, index, mtime; } Platform_FileIdentity; -typedef - void (*Platform_HaltProcedure)(INT32); - typedef void (*Platform_SignalHandler)(INT32); export BOOLEAN Platform_LittleEndian; -export INT32 Platform_MainStackFrame; export INT16 Platform_PID; export CHAR Platform_CWD[256]; -export INT16 Platform_ArgCount; -export INT32 Platform_ArgVector; -static Platform_HaltProcedure Platform_HaltHandler; static INT32 Platform_TimeStart; export INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; export CHAR Platform_NL[3]; @@ -45,7 +26,6 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -53,15 +33,12 @@ export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); -export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); @@ -117,8 +94,6 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV -extern void Heap_InitHeap(); -#define Platform_HeapInitHeap() Heap_InitHeap() #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -129,7 +104,7 @@ extern void Heap_InitHeap(); #define Platform_fsync(fd) fsync(fd) #define Platform_ftruncate(fd, l) ftruncate(fd, l) #define Platform_getcwd(cwd, cwd__len) getcwd((char*)cwd, cwd__len) -#define Platform_getenv(var, var__len) (Platform_EnvPtr)getenv((char*)var) +#define Platform_getenv(var, var__len) getenv((char*)var) #define Platform_getpid() (INTEGER)getpid() #define Platform_gettimeval() struct timeval tv; gettimeofday(&tv,0) #define Platform_isatty(fd) isatty(fd) @@ -213,21 +188,14 @@ void Platform_OSFree (INT32 address) Platform_free(address); } -void Platform_Init (INT32 argc, INT32 argvadr) -{ - Platform_ArgVecPtr av = NIL; - Platform_MainStackFrame = argvadr; - Platform_ArgCount = __VAL(INT16, argc); - av = (Platform_ArgVecPtr)(ADDRESS)argvadr; - Platform_ArgVector = (*av)[0]; - Platform_HeapInitHeap(); -} +typedef + CHAR (*EnvPtr__78)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - Platform_EnvPtr p = NIL; + EnvPtr__78 p = NIL; __DUP(var, var__len, CHAR); - p = Platform_getenv(var, var__len); + p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } @@ -244,56 +212,6 @@ void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) -{ - Platform_ArgVec av = NIL; - if (n < Platform_ArgCount) { - av = (Platform_ArgVec)(ADDRESS)Platform_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); - } -} - -void Platform_GetIntArg (INT16 n, INT32 *val) -{ - CHAR s[64]; - INT32 k, d, i; - s[0] = 0x00; - Platform_GetArg(n, (void*)s, 64); - i = 0; - if (s[0] == '-') { - i = 1; - } - k = 0; - d = (INT16)s[__X(i, 64)] - 48; - while ((d >= 0 && d <= 9)) { - k = k * 10 + d; - i += 1; - d = (INT16)s[__X(i, 64)] - 48; - } - if (s[0] == '-') { - k = -k; - i -= 1; - } - if (i > 0) { - *val = k; - } -} - -INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) -{ - INT16 i; - CHAR arg[256]; - __DUP(s, s__len, CHAR); - i = 0; - Platform_GetArg(i, (void*)arg, 256); - while ((i < Platform_ArgCount && __STRCMP(s, arg) != 0)) { - i += 1; - Platform_GetArg(i, (void*)arg, 256); - } - __DEL(s); - return i; -} - void Platform_SetInterruptHandler (Platform_SignalHandler handler) { Platform_sethandler(2, handler); @@ -587,7 +505,6 @@ export void *Platform__init(void) __INITYP(Platform_FileIdentity, Platform_FileIdentity, 0); /* BEGIN */ Platform_TestLittleEndian(); - Platform_HaltHandler = NIL; Platform_TimeStart = 0; Platform_TimeStart = Platform_Time(); Platform_PID = Platform_getpid(); diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 315a17e0..9be32cda 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -16,18 +16,14 @@ typedef import BOOLEAN Platform_LittleEndian; -import INT32 Platform_MainStackFrame; import INT16 Platform_PID; import CHAR Platform_CWD[256]; -import INT16 Platform_ArgCount; -import INT32 Platform_ArgVector; import INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -35,15 +31,12 @@ import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); -import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index ee1f94ca..e4149017 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 16a16b7a..e3bfadb5 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index b60bb504..a3f1e808 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index adf86c42..b192b7bb 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index c9010809..4fa93c49 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -394,8 +394,8 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t e->file = (*(Texts_Alien*)&E)->file; e->org = (*(Texts_Alien*)&E)->org; e->span = (*(Texts_Alien*)&E)->span; - __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); - __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); + __MOVE((*(Texts_Alien*)&E)->mod, e->mod, 32); + __MOVE((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 16b07b6f..235cecb4 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index f0e444ea..7a2a840d 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 0f1bc5ac..5a3fe6d0 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 43e5cb69..657534b4 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 784b684d..6ad7abb0 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 29524a91..e59d7615 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 54214f70..01281cfc 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 1e6381e9..98f85767 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index e2cf2f3a..0c219af5 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -237,7 +237,7 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __COPY(osfile->workName, osfile->registerName, 101); + __MOVE(osfile->workName, osfile->registerName, 101); Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); osfile->tempFile = 1; osfile->state = 0; @@ -262,7 +262,7 @@ static void Files_Create (Files_File f) } else { __ASSERT(f->state == 2, 0); Files_Deregister(f->registerName, 101); - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -823,7 +823,7 @@ void Files_Register (Files_File f) if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 0da4768b..4a1cbfe9 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 95dd55ee..222162d5 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -105,12 +105,12 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); -extern ADDRESS Platform_MainStackFrame; +extern ADDRESS Modules_MainStackFrame; extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_HeapModuleInit() Heap__init() #define Heap_ModulesHalt(code) Modules_Halt(code) +#define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) -#define Heap_PlatformMainStackFrame() Platform_MainStackFrame void Heap_Lock (void) { @@ -599,7 +599,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) if (n == 0) { nofcand = 0; sp = (ADDRESS)&frame; - stack0 = Heap_PlatformMainStackFrame(); + stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; if (sp > stack0) { inc = -inc; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index b96e0160..585db2f0 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 9b72d021..b0cf5fd9 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -43,24 +43,105 @@ typedef export INT16 Modules_res; export CHAR Modules_resMsg[256]; export Modules_ModuleName Modules_imported, Modules_importing; +export INT64 Modules_MainStackFrame; +export INT16 Modules_ArgCount; +export INT64 Modules_ArgVector; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); +export void Modules_Init (INT32 argc, INT64 argvadr); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); +extern void Heap_InitHeap(); +extern void *Modules__init(void); +#define Modules_InitHeap() Heap_InitHeap() +#define Modules_ModulesInit() Modules__init() #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m +typedef + INT64 (*ArgVecPtr__14)[1]; + +void Modules_Init (INT32 argc, INT64 argvadr) +{ + ArgVecPtr__14 av = NIL; + Modules_MainStackFrame = argvadr; + Modules_ArgCount = __VAL(INT16, argc); + av = (ArgVecPtr__14)(ADDRESS)argvadr; + Modules_ArgVector = (*av)[0]; + Modules_InitHeap(); + Modules_ModulesInit(); +} + +typedef + CHAR (*ArgPtr__9)[1024]; + +typedef + ArgPtr__9 (*ArgVec__10)[1024]; + +void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) +{ + ArgVec__10 av = NIL; + if (n < Modules_ArgCount) { + av = (ArgVec__10)(ADDRESS)Modules_ArgVector; + __COPY(*(*av)[__X(n, 1024)], val, val__len); + } +} + +void Modules_GetIntArg (INT16 n, INT32 *val) +{ + CHAR s[64]; + INT32 k, d, i; + s[0] = 0x00; + Modules_GetArg(n, (void*)s, 64); + i = 0; + if (s[0] == '-') { + i = 1; + } + k = 0; + d = (INT16)s[__X(i, 64)] - 48; + while ((d >= 0 && d <= 9)) { + k = k * 10 + d; + i += 1; + d = (INT16)s[__X(i, 64)] - 48; + } + if (s[0] == '-') { + k = -k; + i -= 1; + } + if (i > 0) { + *val = k; + } +} + +INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) +{ + INT16 i; + CHAR arg[256]; + __DUP(s, s__len, CHAR); + i = 0; + Modules_GetArg(i, (void*)arg, 256); + while ((i < Modules_ArgCount && __STRCMP(s, arg) != 0)) { + i += 1; + Modules_GetArg(i, (void*)arg, 256); + } + __DEL(s); + return i; +} + static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 568db414..a3e555ef 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -39,13 +39,20 @@ typedef import INT16 Modules_res; import CHAR Modules_resMsg[256]; import Modules_ModuleName Modules_imported, Modules_importing; +import INT64 Modules_MainStackFrame; +import INT16 Modules_ArgCount; +import INT64 Modules_ArgVector; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; +import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); +import void Modules_Init (INT32 argc, INT64 argvadr); import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 2e03b5fc..d9e826b8 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -253,7 +253,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len) x->conval->intval = -1; x->conval->intval2 = OPM_Longint(len); x->conval->ext = OPT_NewExt(); - __COPY(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 256); return x; } @@ -1624,23 +1624,19 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) g = 8; } if (x == y) { + } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { + } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } } else { OPB_err(113); } - } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { - } else { - OPB_err(113); - } } else if (x->comp == 4) { if (x == y) { } else if (y->comp == 4) { @@ -2536,7 +2532,6 @@ void OPB_Return (OPT_Node *x, OPT_Object proc) void OPB_Assign (OPT_Node *x, OPT_Node y) { OPT_Node z = NIL; - INT8 subcl; if ((*x)->class >= 7) { OPB_err(56); } @@ -2562,13 +2557,8 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { - subcl = 18; - } else { - subcl = 0; - } OPB_BindNodes(19, OPT_notyp, &*x, y); - (*x)->subcl = subcl; + (*x)->subcl = 0; } void OPB_Inittd (OPT_Node *inittd, OPT_Node *last, OPT_Struct typ) diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 6641207d..2c396170 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index fd11366a..5f4dc826 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 4eff8cf5..f9bc06a4 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index e4915a3e..f52cb5e2 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Configuration.h" #include "Files.h" +#include "Modules.h" #include "Out.h" #include "Platform.h" #include "Strings.h" @@ -266,7 +267,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - if (Platform_ArgCount == 1) { + if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); OPM_LogWStr(Configuration_versionLong, 75); @@ -362,16 +363,16 @@ BOOLEAN OPM_OpenPar (void) OPM_Options = 0xa9; OPM_S = 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } OPM_GlobalAddressSize = OPM_AddressSize; OPM_GlobalAlignment = OPM_Alignment; - __COPY(OPM_Model, OPM_GlobalModel, 10); + __MOVE(OPM_Model, OPM_GlobalModel, 10); OPM_GlobalOptions = OPM_Options; return 1; } @@ -410,16 +411,16 @@ void OPM_InitOptions (void) CHAR searchpath[1024], modules[1024]; CHAR MODULES[1024]; OPM_Options = OPM_GlobalOptions; - __COPY(OPM_GlobalModel, OPM_Model, 10); + __MOVE(OPM_GlobalModel, OPM_Model, 10); OPM_Alignment = OPM_GlobalAlignment; OPM_AddressSize = OPM_GlobalAddressSize; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } if (__IN(15, OPM_Options, 32)) { OPM_Options |= __SETOF(10,32); @@ -472,11 +473,11 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) CHAR s[256]; *done = 0; OPM_curpos = 0; - if (OPM_S >= Platform_ArgCount) { + if (OPM_S >= Modules_ArgCount) { return; } s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); __NEW(T, Texts_TextDesc); Texts_Open(T, s, 256); OPM_LogWStr(s, 256); @@ -1070,6 +1071,7 @@ export void *OPM__init(void) __DEFMOD; __MODULE_IMPORT(Configuration); __MODULE_IMPORT(Files); + __MODULE_IMPORT(Modules); __MODULE_IMPORT(Out); __MODULE_IMPORT(Platform); __MODULE_IMPORT(Strings); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 4dd3d03b..979995c8 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index a08cee09..954279d4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -527,7 +527,7 @@ static void OPP_selector (OPT_Node *x) } else if (OPP_sym == 18) { OPS_Get(&OPP_sym); if (OPP_sym == 38) { - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPS_Get(&OPP_sym); if ((*x)->typ != NIL) { if ((*x)->typ->form == 11) { @@ -867,7 +867,7 @@ static void OPP_Receiver (INT8 *mode, OPS_Name name, OPT_Struct *typ, OPT_Struct } else { *mode = 1; } - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckSym(38); OPP_CheckSym(20); if (OPP_sym == 38) { @@ -1030,7 +1030,7 @@ static void TProcDecl__23 (void) } OPP_Receiver(&objMode, objName, &objTyp, &recTyp); if (OPP_sym == 38) { - __COPY(OPS_name, *ProcedureDeclaration__16_s->name, 256); + __MOVE(OPS_name, *ProcedureDeclaration__16_s->name, 256); OPP_CheckMark(&*ProcedureDeclaration__16_s->vis); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp, &*ProcedureDeclaration__16_s->fwd); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp->BaseTyp, &baseProc); @@ -1129,7 +1129,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) TProcDecl__23(); } else if (OPP_sym == 38) { OPT_Find(&fwd); - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckMark(&vis); if ((vis != 0 && mode == 6)) { mode = 7; diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 2814e733..b748e221 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 7218afe1..eee78d80 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index a860454b..7ab70899 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index de44eed9..b58d6175 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -434,8 +434,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_topScope = OPT_universe; OPT_OpenScope(0, NIL); OPT_SYSimported = 0; - __COPY(name, OPT_SelfName, 256); - __COPY(name, OPT_topScope->name, 256); + __MOVE(name, OPT_SelfName, 256); + __MOVE(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; OPT_newsf = __IN(4, opt, 32); @@ -1186,7 +1186,7 @@ static void OPT_InStruct (OPT_Struct *typ) } *typ = OPT_NewStr(0, 1); } else { - __COPY(name, obj->name, 256); + __MOVE(name, obj->name, 256); OPT_InsertImport(obj, &OPT_GlbMod[__X(mno, 64)]->right, &old); if (old != NIL) { OPT_FPrintObj(old); diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 86256024..67996e8e 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 7a7ce5c1..22c12372 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -163,7 +163,7 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte } scope = obj->scope; scope->leaf = 1; - __COPY(obj->name, scope->name, 256); + __MOVE(obj->name, scope->name, 256); OPV_Stamp(scope->name); if (mode == 9) { obj->adr = 1; @@ -1286,7 +1286,17 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); if (r->typ == OPT_stringtyp) { OPM_WriteInt(r->conval->intval2); + } else if (r->typ->comp == 3) { + OPM_WriteString((CHAR*)"__X(", 5); + OPC_Len(r->obj, r->typ, 0); + OPM_WriteString((CHAR*)" * ", 4); + OPM_WriteInt(r->typ->BaseTyp->size); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(l->typ->size); + OPM_Write(')'); } else { + __ASSERT(r->typ->comp == 2, 0); + __ASSERT(r->typ->size <= l->typ->size, 0); OPM_WriteInt(r->typ->size); } OPM_Write(')'); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 9a8653a0..43aaf24a 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 1508a8bb..a03cf592 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index b273390e..27f2c9bb 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index a211fab4..eadd3813 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,37 +7,18 @@ #include "SYSTEM.h" -typedef - CHAR (*Platform_ArgPtr)[1024]; - -typedef - Platform_ArgPtr (*Platform_ArgVec)[1024]; - -typedef - INT64 (*Platform_ArgVecPtr)[1]; - -typedef - CHAR (*Platform_EnvPtr)[1024]; - typedef struct Platform_FileIdentity { INT32 volume, index, mtime; } Platform_FileIdentity; -typedef - void (*Platform_HaltProcedure)(INT32); - typedef void (*Platform_SignalHandler)(INT32); export BOOLEAN Platform_LittleEndian; -export INT64 Platform_MainStackFrame; export INT16 Platform_PID; export CHAR Platform_CWD[256]; -export INT16 Platform_ArgCount; -export INT64 Platform_ArgVector; -static Platform_HaltProcedure Platform_HaltHandler; static INT32 Platform_TimeStart; export INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; export CHAR Platform_NL[3]; @@ -45,7 +26,6 @@ export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -53,15 +33,12 @@ export void Platform_Delay (INT32 ms); export BOOLEAN Platform_DifferentFilesystems (INT16 e); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); -export void Platform_Init (INT32 argc, INT64 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); @@ -117,8 +94,6 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV -extern void Heap_InitHeap(); -#define Platform_HeapInitHeap() Heap_InitHeap() #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -129,7 +104,7 @@ extern void Heap_InitHeap(); #define Platform_fsync(fd) fsync(fd) #define Platform_ftruncate(fd, l) ftruncate(fd, l) #define Platform_getcwd(cwd, cwd__len) getcwd((char*)cwd, cwd__len) -#define Platform_getenv(var, var__len) (Platform_EnvPtr)getenv((char*)var) +#define Platform_getenv(var, var__len) getenv((char*)var) #define Platform_getpid() (INTEGER)getpid() #define Platform_gettimeval() struct timeval tv; gettimeofday(&tv,0) #define Platform_isatty(fd) isatty(fd) @@ -213,21 +188,14 @@ void Platform_OSFree (INT64 address) Platform_free(address); } -void Platform_Init (INT32 argc, INT64 argvadr) -{ - Platform_ArgVecPtr av = NIL; - Platform_MainStackFrame = argvadr; - Platform_ArgCount = __VAL(INT16, argc); - av = (Platform_ArgVecPtr)(ADDRESS)argvadr; - Platform_ArgVector = (*av)[0]; - Platform_HeapInitHeap(); -} +typedef + CHAR (*EnvPtr__78)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - Platform_EnvPtr p = NIL; + EnvPtr__78 p = NIL; __DUP(var, var__len, CHAR); - p = Platform_getenv(var, var__len); + p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } @@ -244,56 +212,6 @@ void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) -{ - Platform_ArgVec av = NIL; - if (n < Platform_ArgCount) { - av = (Platform_ArgVec)(ADDRESS)Platform_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); - } -} - -void Platform_GetIntArg (INT16 n, INT32 *val) -{ - CHAR s[64]; - INT32 k, d, i; - s[0] = 0x00; - Platform_GetArg(n, (void*)s, 64); - i = 0; - if (s[0] == '-') { - i = 1; - } - k = 0; - d = (INT16)s[__X(i, 64)] - 48; - while ((d >= 0 && d <= 9)) { - k = k * 10 + d; - i += 1; - d = (INT16)s[__X(i, 64)] - 48; - } - if (s[0] == '-') { - k = -k; - i -= 1; - } - if (i > 0) { - *val = k; - } -} - -INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) -{ - INT16 i; - CHAR arg[256]; - __DUP(s, s__len, CHAR); - i = 0; - Platform_GetArg(i, (void*)arg, 256); - while ((i < Platform_ArgCount && __STRCMP(s, arg) != 0)) { - i += 1; - Platform_GetArg(i, (void*)arg, 256); - } - __DEL(s); - return i; -} - void Platform_SetInterruptHandler (Platform_SignalHandler handler) { Platform_sethandler(2, handler); @@ -587,7 +505,6 @@ export void *Platform__init(void) __INITYP(Platform_FileIdentity, Platform_FileIdentity, 0); /* BEGIN */ Platform_TestLittleEndian(); - Platform_HaltHandler = NIL; Platform_TimeStart = 0; Platform_TimeStart = Platform_Time(); Platform_PID = Platform_getpid(); diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 131a8aa8..ee748a4f 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -16,18 +16,14 @@ typedef import BOOLEAN Platform_LittleEndian; -import INT64 Platform_MainStackFrame; import INT16 Platform_PID; import CHAR Platform_CWD[256]; -import INT16 Platform_ArgCount; -import INT64 Platform_ArgVector; import INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -35,15 +31,12 @@ import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); -import void Platform_Init (INT32 argc, INT64 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index ee1f94ca..e4149017 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 16a16b7a..e3bfadb5 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index b60bb504..a3f1e808 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index adf86c42..b192b7bb 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 0bb7d871..a7cc3ff1 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -394,8 +394,8 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t e->file = (*(Texts_Alien*)&E)->file; e->org = (*(Texts_Alien*)&E)->org; e->span = (*(Texts_Alien*)&E)->span; - __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); - __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); + __MOVE((*(Texts_Alien*)&E)->mod, e->mod, 32); + __MOVE((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index b1eafc02..8c1b9016 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index f0e444ea..7a2a840d 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 0f1bc5ac..5a3fe6d0 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 43e5cb69..657534b4 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 784b684d..6ad7abb0 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 29524a91..e59d7615 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 54214f70..01281cfc 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 1e6381e9..98f85767 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index aa879424..841d80d9 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -237,7 +237,7 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __COPY(osfile->workName, osfile->registerName, 101); + __MOVE(osfile->workName, osfile->registerName, 101); Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); osfile->tempFile = 1; osfile->state = 0; @@ -262,7 +262,7 @@ static void Files_Create (Files_File f) } else { __ASSERT(f->state == 2, 0); Files_Deregister(f->registerName, 101); - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -823,7 +823,7 @@ void Files_Register (Files_File f) if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index fa8f3e8d..dab76a88 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index af8fd777..b6abc8f3 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -105,12 +105,12 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); -extern ADDRESS Platform_MainStackFrame; +extern ADDRESS Modules_MainStackFrame; extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_HeapModuleInit() Heap__init() #define Heap_ModulesHalt(code) Modules_Halt(code) +#define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) -#define Heap_PlatformMainStackFrame() Platform_MainStackFrame void Heap_Lock (void) { @@ -599,7 +599,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) if (n == 0) { nofcand = 0; sp = (ADDRESS)&frame; - stack0 = Heap_PlatformMainStackFrame(); + stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; if (sp > stack0) { inc = -inc; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index cc058553..82ebd04d 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 9aedc826..98b3a7e9 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -43,24 +43,105 @@ typedef export INT16 Modules_res; export CHAR Modules_resMsg[256]; export Modules_ModuleName Modules_imported, Modules_importing; +export INT32 Modules_MainStackFrame; +export INT16 Modules_ArgCount; +export INT32 Modules_ArgVector; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); +export void Modules_Init (INT32 argc, INT32 argvadr); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); +extern void Heap_InitHeap(); +extern void *Modules__init(void); +#define Modules_InitHeap() Heap_InitHeap() +#define Modules_ModulesInit() Modules__init() #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m +typedef + INT32 (*ArgVecPtr__14)[1]; + +void Modules_Init (INT32 argc, INT32 argvadr) +{ + ArgVecPtr__14 av = NIL; + Modules_MainStackFrame = argvadr; + Modules_ArgCount = __VAL(INT16, argc); + av = (ArgVecPtr__14)(ADDRESS)argvadr; + Modules_ArgVector = (*av)[0]; + Modules_InitHeap(); + Modules_ModulesInit(); +} + +typedef + CHAR (*ArgPtr__9)[1024]; + +typedef + ArgPtr__9 (*ArgVec__10)[1024]; + +void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) +{ + ArgVec__10 av = NIL; + if (n < Modules_ArgCount) { + av = (ArgVec__10)(ADDRESS)Modules_ArgVector; + __COPY(*(*av)[__X(n, 1024)], val, val__len); + } +} + +void Modules_GetIntArg (INT16 n, INT32 *val) +{ + CHAR s[64]; + INT32 k, d, i; + s[0] = 0x00; + Modules_GetArg(n, (void*)s, 64); + i = 0; + if (s[0] == '-') { + i = 1; + } + k = 0; + d = (INT16)s[__X(i, 64)] - 48; + while ((d >= 0 && d <= 9)) { + k = k * 10 + d; + i += 1; + d = (INT16)s[__X(i, 64)] - 48; + } + if (s[0] == '-') { + k = -k; + i -= 1; + } + if (i > 0) { + *val = k; + } +} + +INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) +{ + INT16 i; + CHAR arg[256]; + __DUP(s, s__len, CHAR); + i = 0; + Modules_GetArg(i, (void*)arg, 256); + while ((i < Modules_ArgCount && __STRCMP(s, arg) != 0)) { + i += 1; + Modules_GetArg(i, (void*)arg, 256); + } + __DEL(s); + return i; +} + static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; @@ -165,7 +246,7 @@ void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) static void Modules_errch (CHAR c) { INT16 e; - e = Platform_Write(1, (ADDRESS)&c, 1); + e = Platform_Write(Platform_StdOut, (ADDRESS)&c, 1); } static void Modules_errstring (CHAR *s, ADDRESS s__len) diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 568db414..3ab94701 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -39,13 +39,20 @@ typedef import INT16 Modules_res; import CHAR Modules_resMsg[256]; import Modules_ModuleName Modules_imported, Modules_importing; +import INT32 Modules_MainStackFrame; +import INT16 Modules_ArgCount; +import INT32 Modules_ArgVector; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; +import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); +import void Modules_Init (INT32 argc, INT32 argvadr); import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 2e03b5fc..d9e826b8 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -253,7 +253,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len) x->conval->intval = -1; x->conval->intval2 = OPM_Longint(len); x->conval->ext = OPT_NewExt(); - __COPY(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 256); return x; } @@ -1624,23 +1624,19 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) g = 8; } if (x == y) { + } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { + } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } } else { OPB_err(113); } - } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { - } else { - OPB_err(113); - } } else if (x->comp == 4) { if (x == y) { } else if (y->comp == 4) { @@ -2536,7 +2532,6 @@ void OPB_Return (OPT_Node *x, OPT_Object proc) void OPB_Assign (OPT_Node *x, OPT_Node y) { OPT_Node z = NIL; - INT8 subcl; if ((*x)->class >= 7) { OPB_err(56); } @@ -2562,13 +2557,8 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { - subcl = 18; - } else { - subcl = 0; - } OPB_BindNodes(19, OPT_notyp, &*x, y); - (*x)->subcl = subcl; + (*x)->subcl = 0; } void OPB_Inittd (OPT_Node *inittd, OPT_Node *last, OPT_Struct typ) diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 6641207d..2c396170 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index fd11366a..5f4dc826 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 4eff8cf5..f9bc06a4 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 58701bfc..1732c950 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Configuration.h" #include "Files.h" +#include "Modules.h" #include "Out.h" #include "Platform.h" #include "Strings.h" @@ -266,7 +267,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - if (Platform_ArgCount == 1) { + if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); OPM_LogWStr(Configuration_versionLong, 75); @@ -362,16 +363,16 @@ BOOLEAN OPM_OpenPar (void) OPM_Options = 0xa9; OPM_S = 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } OPM_GlobalAddressSize = OPM_AddressSize; OPM_GlobalAlignment = OPM_Alignment; - __COPY(OPM_Model, OPM_GlobalModel, 10); + __MOVE(OPM_Model, OPM_GlobalModel, 10); OPM_GlobalOptions = OPM_Options; return 1; } @@ -410,16 +411,16 @@ void OPM_InitOptions (void) CHAR searchpath[1024], modules[1024]; CHAR MODULES[1024]; OPM_Options = OPM_GlobalOptions; - __COPY(OPM_GlobalModel, OPM_Model, 10); + __MOVE(OPM_GlobalModel, OPM_Model, 10); OPM_Alignment = OPM_GlobalAlignment; OPM_AddressSize = OPM_GlobalAddressSize; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } if (__IN(15, OPM_Options, 32)) { OPM_Options |= __SETOF(10,32); @@ -472,11 +473,11 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) CHAR s[256]; *done = 0; OPM_curpos = 0; - if (OPM_S >= Platform_ArgCount) { + if (OPM_S >= Modules_ArgCount) { return; } s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); __NEW(T, Texts_TextDesc); Texts_Open(T, s, 256); OPM_LogWStr(s, 256); @@ -1070,6 +1071,7 @@ export void *OPM__init(void) __DEFMOD; __MODULE_IMPORT(Configuration); __MODULE_IMPORT(Files); + __MODULE_IMPORT(Modules); __MODULE_IMPORT(Out); __MODULE_IMPORT(Platform); __MODULE_IMPORT(Strings); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 4dd3d03b..979995c8 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index d4922137..69624c1f 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -527,7 +527,7 @@ static void OPP_selector (OPT_Node *x) } else if (OPP_sym == 18) { OPS_Get(&OPP_sym); if (OPP_sym == 38) { - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPS_Get(&OPP_sym); if ((*x)->typ != NIL) { if ((*x)->typ->form == 11) { @@ -867,7 +867,7 @@ static void OPP_Receiver (INT8 *mode, OPS_Name name, OPT_Struct *typ, OPT_Struct } else { *mode = 1; } - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckSym(38); OPP_CheckSym(20); if (OPP_sym == 38) { @@ -1030,7 +1030,7 @@ static void TProcDecl__23 (void) } OPP_Receiver(&objMode, objName, &objTyp, &recTyp); if (OPP_sym == 38) { - __COPY(OPS_name, *ProcedureDeclaration__16_s->name, 256); + __MOVE(OPS_name, *ProcedureDeclaration__16_s->name, 256); OPP_CheckMark(&*ProcedureDeclaration__16_s->vis); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp, &*ProcedureDeclaration__16_s->fwd); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp->BaseTyp, &baseProc); @@ -1129,7 +1129,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) TProcDecl__23(); } else if (OPP_sym == 38) { OPT_Find(&fwd); - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckMark(&vis); if ((vis != 0 && mode == 6)) { mode = 7; diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 2814e733..b748e221 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 7218afe1..eee78d80 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index a860454b..7ab70899 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index aa53a484..174aae08 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -434,8 +434,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_topScope = OPT_universe; OPT_OpenScope(0, NIL); OPT_SYSimported = 0; - __COPY(name, OPT_SelfName, 256); - __COPY(name, OPT_topScope->name, 256); + __MOVE(name, OPT_SelfName, 256); + __MOVE(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; OPT_newsf = __IN(4, opt, 32); @@ -1186,7 +1186,7 @@ static void OPT_InStruct (OPT_Struct *typ) } *typ = OPT_NewStr(0, 1); } else { - __COPY(name, obj->name, 256); + __MOVE(name, obj->name, 256); OPT_InsertImport(obj, &OPT_GlbMod[__X(mno, 64)]->right, &old); if (old != NIL) { OPT_FPrintObj(old); diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 86256024..67996e8e 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index eb5ad767..fb6ac690 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -163,7 +163,7 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte } scope = obj->scope; scope->leaf = 1; - __COPY(obj->name, scope->name, 256); + __MOVE(obj->name, scope->name, 256); OPV_Stamp(scope->name); if (mode == 9) { obj->adr = 1; @@ -1286,7 +1286,17 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); if (r->typ == OPT_stringtyp) { OPM_WriteInt(r->conval->intval2); + } else if (r->typ->comp == 3) { + OPM_WriteString((CHAR*)"__X(", 5); + OPC_Len(r->obj, r->typ, 0); + OPM_WriteString((CHAR*)" * ", 4); + OPM_WriteInt(r->typ->BaseTyp->size); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(l->typ->size); + OPM_Write(')'); } else { + __ASSERT(r->typ->comp == 2, 0); + __ASSERT(r->typ->size <= l->typ->size, 0); OPM_WriteInt(r->typ->size); } OPM_Write(')'); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 9a8653a0..43aaf24a 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 0edcb502..0d3f9e29 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index b273390e..27f2c9bb 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 78f4409a..4a164fb8 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,48 +7,26 @@ #include "SYSTEM.h" -typedef - CHAR (*Platform_ArgPtr)[1024]; - -typedef - Platform_ArgPtr (*Platform_ArgVec)[1024]; - -typedef - INT32 (*Platform_ArgVecPtr)[1]; - -typedef - CHAR (*Platform_EnvPtr)[1024]; - typedef struct Platform_FileIdentity { INT32 volume, indexhigh, indexlow, mtimehigh, mtimelow; } Platform_FileIdentity; -typedef - void (*Platform_HaltProcedure)(INT32); - typedef void (*Platform_SignalHandler)(INT32); export BOOLEAN Platform_LittleEndian; -export INT32 Platform_MainStackFrame; -export INT32 Platform_HaltCode; export INT16 Platform_PID; export CHAR Platform_CWD[4096]; -export INT16 Platform_ArgCount; -export INT32 Platform_ArgVector; -static Platform_HaltProcedure Platform_HaltHandler; static INT32 Platform_TimeStart; export INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; export INT32 Platform_StdIn, Platform_StdOut, Platform_StdErr; -static Platform_SignalHandler Platform_InterruptHandler; export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT32 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -57,15 +35,12 @@ export BOOLEAN Platform_DifferentFilesystems (INT16 e); static void Platform_EnableVT100 (void); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); -export void Platform_Init (INT32 argc, INT32 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); @@ -111,10 +86,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_ERRORTOOMANYOPENFILES() ERROR_TOO_MANY_OPEN_FILES #define Platform_ERRORWRITEPROTECT() ERROR_WRITE_PROTECT #define Platform_ETIMEDOUT() WSAETIMEDOUT -extern void Heap_InitHeap(); #define Platform_GetConsoleMode(h, m) GetConsoleMode((HANDLE)h, (DWORD*)m) #define Platform_GetTickCount() (LONGINT)(UINT32)GetTickCount() -#define Platform_HeapInitHeap() Heap_InitHeap() #define Platform_SetConsoleMode(h, m) SetConsoleMode((HANDLE)h, (DWORD)m) #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) #define Platform_SetQuitHandler(h) SystemSetQuitHandler((ADDRESS)h) @@ -228,17 +201,6 @@ void Platform_OSFree (INT32 address) Platform_free(address); } -void Platform_Init (INT32 argc, INT32 argvadr) -{ - Platform_ArgVecPtr av = NIL; - Platform_MainStackFrame = argvadr; - Platform_ArgCount = __VAL(INT16, argc); - av = (Platform_ArgVecPtr)(ADDRESS)argvadr; - Platform_ArgVector = (*av)[0]; - Platform_HaltCode = -128; - Platform_HeapInitHeap(); -} - BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { CHAR buf[4096]; @@ -265,56 +227,6 @@ void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) -{ - Platform_ArgVec av = NIL; - if (n < Platform_ArgCount) { - av = (Platform_ArgVec)(ADDRESS)Platform_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); - } -} - -void Platform_GetIntArg (INT16 n, INT32 *val) -{ - CHAR s[64]; - INT32 k, d, i; - s[0] = 0x00; - Platform_GetArg(n, (void*)s, 64); - i = 0; - if (s[0] == '-') { - i = 1; - } - k = 0; - d = (INT16)s[__X(i, 64)] - 48; - while ((d >= 0 && d <= 9)) { - k = k * 10 + d; - i += 1; - d = (INT16)s[__X(i, 64)] - 48; - } - if (s[0] == '-') { - k = -k; - i -= 1; - } - if (i > 0) { - *val = k; - } -} - -INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) -{ - INT16 i; - CHAR arg[256]; - __DUP(s, s__len, CHAR); - i = 0; - Platform_GetArg(i, (void*)arg, 256); - while ((i < Platform_ArgCount && __STRCMP(s, arg) != 0)) { - i += 1; - Platform_GetArg(i, (void*)arg, 256); - } - __DEL(s); - return i; -} - void Platform_SetBadInstructionHandler (Platform_SignalHandler handler) { } @@ -646,8 +558,6 @@ export void *Platform__init(void) __INITYP(Platform_FileIdentity, Platform_FileIdentity, 0); /* BEGIN */ Platform_TestLittleEndian(); - Platform_HaltCode = -128; - Platform_HaltHandler = NIL; Platform_TimeStart = 0; Platform_TimeStart = Platform_Time(); Platform_CWD[0] = 0x00; diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index a4ad7737..adfe4173 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -16,12 +16,8 @@ typedef import BOOLEAN Platform_LittleEndian; -import INT32 Platform_MainStackFrame; -import INT32 Platform_HaltCode; import INT16 Platform_PID; import CHAR Platform_CWD[4096]; -import INT16 Platform_ArgCount; -import INT32 Platform_ArgVector; import INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; import INT32 Platform_StdIn, Platform_StdOut, Platform_StdErr; import CHAR Platform_NL[3]; @@ -29,7 +25,6 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT32 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -37,15 +32,12 @@ import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT32 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); -import void Platform_Init (INT32 argc, INT32 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index ee1f94ca..e4149017 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 16a16b7a..e3bfadb5 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index b60bb504..a3f1e808 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index adf86c42..b192b7bb 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index c9010809..4fa93c49 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -394,8 +394,8 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t e->file = (*(Texts_Alien*)&E)->file; e->org = (*(Texts_Alien*)&E)->org; e->span = (*(Texts_Alien*)&E)->span; - __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); - __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); + __MOVE((*(Texts_Alien*)&E)->mod, e->mod, 32); + __MOVE((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 16b07b6f..235cecb4 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index f0e444ea..7a2a840d 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 0f1bc5ac..5a3fe6d0 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 43e5cb69..657534b4 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 784b684d..6ad7abb0 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 29524a91..e59d7615 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 54214f70..01281cfc 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 1e6381e9..98f85767 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index f83fafeb..8ad0e207 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -238,7 +238,7 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __COPY(osfile->workName, osfile->registerName, 101); + __MOVE(osfile->workName, osfile->registerName, 101); Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); osfile->tempFile = 1; osfile->state = 0; @@ -263,7 +263,7 @@ static void Files_Create (Files_File f) } else { __ASSERT(f->state == 2, 0); Files_Deregister(f->registerName, 101); - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -825,7 +825,7 @@ void Files_Register (Files_File f) if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __COPY(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 101); f->registerName[0] = 0x00; f->tempFile = 0; } diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 1d930af8..3631e4aa 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 95dd55ee..222162d5 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -105,12 +105,12 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); -extern ADDRESS Platform_MainStackFrame; +extern ADDRESS Modules_MainStackFrame; extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_HeapModuleInit() Heap__init() #define Heap_ModulesHalt(code) Modules_Halt(code) +#define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) -#define Heap_PlatformMainStackFrame() Platform_MainStackFrame void Heap_Lock (void) { @@ -599,7 +599,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) if (n == 0) { nofcand = 0; sp = (ADDRESS)&frame; - stack0 = Heap_PlatformMainStackFrame(); + stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; if (sp > stack0) { inc = -inc; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index b96e0160..585db2f0 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 9b72d021..c6884be5 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -43,24 +43,105 @@ typedef export INT16 Modules_res; export CHAR Modules_resMsg[256]; export Modules_ModuleName Modules_imported, Modules_importing; +export INT64 Modules_MainStackFrame; +export INT16 Modules_ArgCount; +export INT64 Modules_ArgVector; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); static void Modules_DisplayHaltCode (INT32 code); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); +export void Modules_Init (INT32 argc, INT64 argvadr); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); +extern void Heap_InitHeap(); +extern void *Modules__init(void); +#define Modules_InitHeap() Heap_InitHeap() +#define Modules_ModulesInit() Modules__init() #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m +typedef + INT64 (*ArgVecPtr__14)[1]; + +void Modules_Init (INT32 argc, INT64 argvadr) +{ + ArgVecPtr__14 av = NIL; + Modules_MainStackFrame = argvadr; + Modules_ArgCount = __VAL(INT16, argc); + av = (ArgVecPtr__14)(ADDRESS)argvadr; + Modules_ArgVector = (*av)[0]; + Modules_InitHeap(); + Modules_ModulesInit(); +} + +typedef + CHAR (*ArgPtr__9)[1024]; + +typedef + ArgPtr__9 (*ArgVec__10)[1024]; + +void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) +{ + ArgVec__10 av = NIL; + if (n < Modules_ArgCount) { + av = (ArgVec__10)(ADDRESS)Modules_ArgVector; + __COPY(*(*av)[__X(n, 1024)], val, val__len); + } +} + +void Modules_GetIntArg (INT16 n, INT32 *val) +{ + CHAR s[64]; + INT32 k, d, i; + s[0] = 0x00; + Modules_GetArg(n, (void*)s, 64); + i = 0; + if (s[0] == '-') { + i = 1; + } + k = 0; + d = (INT16)s[__X(i, 64)] - 48; + while ((d >= 0 && d <= 9)) { + k = k * 10 + d; + i += 1; + d = (INT16)s[__X(i, 64)] - 48; + } + if (s[0] == '-') { + k = -k; + i -= 1; + } + if (i > 0) { + *val = k; + } +} + +INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) +{ + INT16 i; + CHAR arg[256]; + __DUP(s, s__len, CHAR); + i = 0; + Modules_GetArg(i, (void*)arg, 256); + while ((i < Modules_ArgCount && __STRCMP(s, arg) != 0)) { + i += 1; + Modules_GetArg(i, (void*)arg, 256); + } + __DEL(s); + return i; +} + static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) { INT16 i, j; @@ -165,7 +246,7 @@ void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) static void Modules_errch (CHAR c) { INT16 e; - e = Platform_Write(1, (ADDRESS)&c, 1); + e = Platform_Write(Platform_StdOut, (ADDRESS)&c, 1); } static void Modules_errstring (CHAR *s, ADDRESS s__len) diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 568db414..a3e555ef 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -39,13 +39,20 @@ typedef import INT16 Modules_res; import CHAR Modules_resMsg[256]; import Modules_ModuleName Modules_imported, Modules_importing; +import INT64 Modules_MainStackFrame; +import INT16 Modules_ArgCount; +import INT64 Modules_ArgVector; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; +import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); import void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); +import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); +import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); +import void Modules_Init (INT32 argc, INT64 argvadr); import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 2e03b5fc..d9e826b8 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -253,7 +253,7 @@ OPT_Node OPB_NewString (OPS_String str, INT64 len) x->conval->intval = -1; x->conval->intval2 = OPM_Longint(len); x->conval->ext = OPT_NewExt(); - __COPY(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 256); return x; } @@ -1624,23 +1624,19 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) g = 8; } if (x == y) { + } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { + } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } } else { OPB_err(113); } - } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { - } else { - OPB_err(113); - } } else if (x->comp == 4) { if (x == y) { } else if (y->comp == 4) { @@ -2536,7 +2532,6 @@ void OPB_Return (OPT_Node *x, OPT_Object proc) void OPB_Assign (OPT_Node *x, OPT_Node y) { OPT_Node z = NIL; - INT8 subcl; if ((*x)->class >= 7) { OPB_err(56); } @@ -2562,13 +2557,8 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { - subcl = 18; - } else { - subcl = 0; - } OPB_BindNodes(19, OPT_notyp, &*x, y); - (*x)->subcl = subcl; + (*x)->subcl = 0; } void OPB_Inittd (OPT_Node *inittd, OPT_Node *last, OPT_Struct typ) diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 6641207d..2c396170 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index fd11366a..5f4dc826 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 4eff8cf5..f9bc06a4 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index e4915a3e..f52cb5e2 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Configuration.h" #include "Files.h" +#include "Modules.h" #include "Out.h" #include "Platform.h" #include "Strings.h" @@ -266,7 +267,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - if (Platform_ArgCount == 1) { + if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); OPM_LogWStr(Configuration_versionLong, 75); @@ -362,16 +363,16 @@ BOOLEAN OPM_OpenPar (void) OPM_Options = 0xa9; OPM_S = 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } OPM_GlobalAddressSize = OPM_AddressSize; OPM_GlobalAlignment = OPM_Alignment; - __COPY(OPM_Model, OPM_GlobalModel, 10); + __MOVE(OPM_Model, OPM_GlobalModel, 10); OPM_GlobalOptions = OPM_Options; return 1; } @@ -410,16 +411,16 @@ void OPM_InitOptions (void) CHAR searchpath[1024], modules[1024]; CHAR MODULES[1024]; OPM_Options = OPM_GlobalOptions; - __COPY(OPM_GlobalModel, OPM_Model, 10); + __MOVE(OPM_GlobalModel, OPM_Model, 10); OPM_Alignment = OPM_GlobalAlignment; OPM_AddressSize = OPM_GlobalAddressSize; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); while (s[0] == '-') { OPM_ScanOptions(s, 256); OPM_S += 1; s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); } if (__IN(15, OPM_Options, 32)) { OPM_Options |= __SETOF(10,32); @@ -472,11 +473,11 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) CHAR s[256]; *done = 0; OPM_curpos = 0; - if (OPM_S >= Platform_ArgCount) { + if (OPM_S >= Modules_ArgCount) { return; } s[0] = 0x00; - Platform_GetArg(OPM_S, (void*)s, 256); + Modules_GetArg(OPM_S, (void*)s, 256); __NEW(T, Texts_TextDesc); Texts_Open(T, s, 256); OPM_LogWStr(s, 256); @@ -1070,6 +1071,7 @@ export void *OPM__init(void) __DEFMOD; __MODULE_IMPORT(Configuration); __MODULE_IMPORT(Files); + __MODULE_IMPORT(Modules); __MODULE_IMPORT(Out); __MODULE_IMPORT(Platform); __MODULE_IMPORT(Strings); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 4dd3d03b..979995c8 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index a08cee09..954279d4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -527,7 +527,7 @@ static void OPP_selector (OPT_Node *x) } else if (OPP_sym == 18) { OPS_Get(&OPP_sym); if (OPP_sym == 38) { - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPS_Get(&OPP_sym); if ((*x)->typ != NIL) { if ((*x)->typ->form == 11) { @@ -867,7 +867,7 @@ static void OPP_Receiver (INT8 *mode, OPS_Name name, OPT_Struct *typ, OPT_Struct } else { *mode = 1; } - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckSym(38); OPP_CheckSym(20); if (OPP_sym == 38) { @@ -1030,7 +1030,7 @@ static void TProcDecl__23 (void) } OPP_Receiver(&objMode, objName, &objTyp, &recTyp); if (OPP_sym == 38) { - __COPY(OPS_name, *ProcedureDeclaration__16_s->name, 256); + __MOVE(OPS_name, *ProcedureDeclaration__16_s->name, 256); OPP_CheckMark(&*ProcedureDeclaration__16_s->vis); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp, &*ProcedureDeclaration__16_s->fwd); OPT_FindField(*ProcedureDeclaration__16_s->name, recTyp->BaseTyp, &baseProc); @@ -1129,7 +1129,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) TProcDecl__23(); } else if (OPP_sym == 38) { OPT_Find(&fwd); - __COPY(OPS_name, name, 256); + __MOVE(OPS_name, name, 256); OPP_CheckMark(&vis); if ((vis != 0 && mode == 6)) { mode = 7; diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 2814e733..b748e221 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 7218afe1..eee78d80 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index a860454b..7ab70899 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index de44eed9..b58d6175 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -434,8 +434,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_topScope = OPT_universe; OPT_OpenScope(0, NIL); OPT_SYSimported = 0; - __COPY(name, OPT_SelfName, 256); - __COPY(name, OPT_topScope->name, 256); + __MOVE(name, OPT_SelfName, 256); + __MOVE(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; OPT_newsf = __IN(4, opt, 32); @@ -1186,7 +1186,7 @@ static void OPT_InStruct (OPT_Struct *typ) } *typ = OPT_NewStr(0, 1); } else { - __COPY(name, obj->name, 256); + __MOVE(name, obj->name, 256); OPT_InsertImport(obj, &OPT_GlbMod[__X(mno, 64)]->right, &old); if (old != NIL) { OPT_FPrintObj(old); diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 86256024..67996e8e 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 7a7ce5c1..22c12372 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -163,7 +163,7 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte } scope = obj->scope; scope->leaf = 1; - __COPY(obj->name, scope->name, 256); + __MOVE(obj->name, scope->name, 256); OPV_Stamp(scope->name); if (mode == 9) { obj->adr = 1; @@ -1286,7 +1286,17 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); if (r->typ == OPT_stringtyp) { OPM_WriteInt(r->conval->intval2); + } else if (r->typ->comp == 3) { + OPM_WriteString((CHAR*)"__X(", 5); + OPC_Len(r->obj, r->typ, 0); + OPM_WriteString((CHAR*)" * ", 4); + OPM_WriteInt(r->typ->BaseTyp->size); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(l->typ->size); + OPM_Write(')'); } else { + __ASSERT(r->typ->comp == 2, 0); + __ASSERT(r->typ->size <= l->typ->size, 0); OPM_WriteInt(r->typ->size); } OPM_Write(')'); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 9a8653a0..43aaf24a 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 0edcb502..0d3f9e29 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index b273390e..27f2c9bb 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index ad0adb4d..bad7600e 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,48 +7,26 @@ #include "SYSTEM.h" -typedef - CHAR (*Platform_ArgPtr)[1024]; - -typedef - Platform_ArgPtr (*Platform_ArgVec)[1024]; - -typedef - INT64 (*Platform_ArgVecPtr)[1]; - -typedef - CHAR (*Platform_EnvPtr)[1024]; - typedef struct Platform_FileIdentity { INT32 volume, indexhigh, indexlow, mtimehigh, mtimelow; } Platform_FileIdentity; -typedef - void (*Platform_HaltProcedure)(INT32); - typedef void (*Platform_SignalHandler)(INT32); export BOOLEAN Platform_LittleEndian; -export INT64 Platform_MainStackFrame; -export INT32 Platform_HaltCode; export INT16 Platform_PID; export CHAR Platform_CWD[4096]; -export INT16 Platform_ArgCount; -export INT64 Platform_ArgVector; -static Platform_HaltProcedure Platform_HaltHandler; static INT32 Platform_TimeStart; export INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; export INT64 Platform_StdIn, Platform_StdOut, Platform_StdErr; -static Platform_SignalHandler Platform_InterruptHandler; export CHAR Platform_NL[3]; export ADDRESS *Platform_FileIdentity__typ; export BOOLEAN Platform_Absent (INT16 e); -export INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); export INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); export INT16 Platform_Close (INT64 h); export BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -57,15 +35,12 @@ export BOOLEAN Platform_DifferentFilesystems (INT16 e); static void Platform_EnableVT100 (void); export INT16 Platform_Error (void); export void Platform_Exit (INT32 code); -export void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Platform_GetClock (INT32 *t, INT32 *d); export void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -export void Platform_GetIntArg (INT16 n, INT32 *val); export void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); export INT16 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); export INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); export BOOLEAN Platform_Inaccessible (INT16 e); -export void Platform_Init (INT32 argc, INT64 argvadr); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT64 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); @@ -111,10 +86,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_ERRORTOOMANYOPENFILES() ERROR_TOO_MANY_OPEN_FILES #define Platform_ERRORWRITEPROTECT() ERROR_WRITE_PROTECT #define Platform_ETIMEDOUT() WSAETIMEDOUT -extern void Heap_InitHeap(); #define Platform_GetConsoleMode(h, m) GetConsoleMode((HANDLE)h, (DWORD*)m) #define Platform_GetTickCount() (LONGINT)(UINT32)GetTickCount() -#define Platform_HeapInitHeap() Heap_InitHeap() #define Platform_SetConsoleMode(h, m) SetConsoleMode((HANDLE)h, (DWORD)m) #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) #define Platform_SetQuitHandler(h) SystemSetQuitHandler((ADDRESS)h) @@ -228,17 +201,6 @@ void Platform_OSFree (INT64 address) Platform_free(address); } -void Platform_Init (INT32 argc, INT64 argvadr) -{ - Platform_ArgVecPtr av = NIL; - Platform_MainStackFrame = argvadr; - Platform_ArgCount = __VAL(INT16, argc); - av = (Platform_ArgVecPtr)(ADDRESS)argvadr; - Platform_ArgVector = (*av)[0]; - Platform_HaltCode = -128; - Platform_HeapInitHeap(); -} - BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { CHAR buf[4096]; @@ -265,56 +227,6 @@ void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) __DEL(var); } -void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len) -{ - Platform_ArgVec av = NIL; - if (n < Platform_ArgCount) { - av = (Platform_ArgVec)(ADDRESS)Platform_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); - } -} - -void Platform_GetIntArg (INT16 n, INT32 *val) -{ - CHAR s[64]; - INT32 k, d, i; - s[0] = 0x00; - Platform_GetArg(n, (void*)s, 64); - i = 0; - if (s[0] == '-') { - i = 1; - } - k = 0; - d = (INT16)s[__X(i, 64)] - 48; - while ((d >= 0 && d <= 9)) { - k = k * 10 + d; - i += 1; - d = (INT16)s[__X(i, 64)] - 48; - } - if (s[0] == '-') { - k = -k; - i -= 1; - } - if (i > 0) { - *val = k; - } -} - -INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len) -{ - INT16 i; - CHAR arg[256]; - __DUP(s, s__len, CHAR); - i = 0; - Platform_GetArg(i, (void*)arg, 256); - while ((i < Platform_ArgCount && __STRCMP(s, arg) != 0)) { - i += 1; - Platform_GetArg(i, (void*)arg, 256); - } - __DEL(s); - return i; -} - void Platform_SetBadInstructionHandler (Platform_SignalHandler handler) { } @@ -646,8 +558,6 @@ export void *Platform__init(void) __INITYP(Platform_FileIdentity, Platform_FileIdentity, 0); /* BEGIN */ Platform_TestLittleEndian(); - Platform_HaltCode = -128; - Platform_HaltHandler = NIL; Platform_TimeStart = 0; Platform_TimeStart = Platform_Time(); Platform_CWD[0] = 0x00; diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index d2d424eb..7d53aaad 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h @@ -16,12 +16,8 @@ typedef import BOOLEAN Platform_LittleEndian; -import INT64 Platform_MainStackFrame; -import INT32 Platform_HaltCode; import INT16 Platform_PID; import CHAR Platform_CWD[4096]; -import INT16 Platform_ArgCount; -import INT64 Platform_ArgVector; import INT16 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd; import INT64 Platform_StdIn, Platform_StdOut, Platform_StdErr; import CHAR Platform_NL[3]; @@ -29,7 +25,6 @@ import CHAR Platform_NL[3]; import ADDRESS *Platform_FileIdentity__typ; import BOOLEAN Platform_Absent (INT16 e); -import INT16 Platform_ArgPos (CHAR *s, ADDRESS s__len); import INT16 Platform_Chdir (CHAR *n, ADDRESS n__len); import INT16 Platform_Close (INT64 h); import BOOLEAN Platform_ConnectionFailed (INT16 e); @@ -37,15 +32,12 @@ import void Platform_Delay (INT32 ms); import BOOLEAN Platform_DifferentFilesystems (INT16 e); import INT16 Platform_Error (void); import void Platform_Exit (INT32 code); -import void Platform_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Platform_GetClock (INT32 *t, INT32 *d); import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len); -import void Platform_GetIntArg (INT16 n, INT32 *val); import void Platform_GetTimeOfDay (INT32 *sec, INT32 *usec); import INT16 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *identity__typ); import INT16 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ); import BOOLEAN Platform_Inaccessible (INT16 e); -import void Platform_Init (INT32 argc, INT64 argvadr); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT64 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index ee1f94ca..e4149017 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 16a16b7a..e3bfadb5 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index b60bb504..a3f1e808 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index adf86c42..b192b7bb 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 0bb7d871..a7cc3ff1 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -394,8 +394,8 @@ static void Texts_HandleAlien (Texts_Elem E, Texts_ElemMsg *msg, ADDRESS *msg__t e->file = (*(Texts_Alien*)&E)->file; e->org = (*(Texts_Alien*)&E)->org; e->span = (*(Texts_Alien*)&E)->span; - __COPY((*(Texts_Alien*)&E)->mod, e->mod, 32); - __COPY((*(Texts_Alien*)&E)->proc, e->proc, 32); + __MOVE((*(Texts_Alien*)&E)->mod, e->mod, 32); + __MOVE((*(Texts_Alien*)&E)->proc, e->proc, 32); (*msg__).e = (Texts_Elem)e; } else __WITHCHK; } else if (__IS(msg__typ, Texts_IdentifyMsg, 1)) { diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index b1eafc02..8c1b9016 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index f0e444ea..7a2a840d 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 0f1bc5ac..5a3fe6d0 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 43e5cb69..657534b4 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 784b684d..6ad7abb0 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/11/30]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From c57a91210ba071dcd7ea05eda31ceba6b7f085b3 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 2 Dec 2016 12:26:21 +0000 Subject: [PATCH 023/241] Append 'LL' to large integer constants to avoid OpenBSD gcc warnings. --- src/compiler/OPB.Mod | 11 ----------- src/compiler/OPM.Mod | 9 +++++---- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/compiler/OPB.Mod b/src/compiler/OPB.Mod index 710cd640..84085804 100644 --- a/src/compiler/OPB.Mod +++ b/src/compiler/OPB.Mod @@ -896,21 +896,10 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) ELSIF x^.BaseTyp = OPT.chartyp THEN (* Assign to (static) ARRAY OF CHAR *) IF g = OPT.String THEN (*check length of string*) IF ynode^.conval^.intval2 > x^.n THEN err(114) END - (* Todo: implement Oberon-07/2013 array assignment - ELSIF (y.comp IN {OPT.DynArr, OPT.Array}) & (y.BaseTyp = OPT.chartyp) THEN - (* Assignment from ARRAY OF CHAR is good.*) - *) ELSE err(113) END ELSE err(113) END - (* Todo: implement Oberon-07/2013 array assignment - ELSIF (x.comp = OPT.DynArr) & (x^.BaseTyp = OPT.chartyp) THEN (* Assign to dynamic ARRAY OF CHAR*) - IF (y.comp IN {OPT.DynArr, OPT.Array}) & (y.BaseTyp = OPT.chartyp) THEN - (* Assignment from ARRAY OF CHAR is good.*) - ELSE err(113) - END - *) ELSIF x^.comp = OPT.Record THEN IF x = y THEN (* ok *) ELSIF y^.comp = OPT.Record THEN diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index e59435eb..a314cdc3 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -685,7 +685,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END WriteHex; PROCEDURE WriteInt* (i: SYSTEM.INT64); - VAR s: ARRAY 24 OF CHAR; i1, k: SYSTEM.INT64; + VAR s: ARRAY 26 OF CHAR; i1, k: SYSTEM.INT64; BEGIN IF (i = SignedMinimum(2)) OR (i = SignedMinimum(4)) OR (i = SignedMinimum(8)) THEN (* abs(minint) is one more than maxint, causing problems representing the value as a minus sign @@ -694,11 +694,12 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) only way to represent MinLInt. *) Write("("); WriteInt(i+1); WriteString("-1)") ELSE i1 := ABS(i); - s[0] := CHR(i1 MOD 10 + ORD("0")); i1 := i1 DIV 10; k := 1; + IF i1 <= MAX(SYSTEM.INT32) THEN k := 0 ELSE s := "LL"; k := 2 END; + s[k] := CHR(i1 MOD 10 + ORD("0")); i1 := i1 DIV 10; INC(k); WHILE i1 > 0 DO s[k] := CHR(i1 MOD 10 + ORD("0")); i1 := i1 DIV 10; INC(k) END ; IF i < 0 THEN s[k] := "-"; INC(k) END ; - WHILE k > 0 DO DEC(k); Write(s[k]) END - END ; + WHILE k > 0 DO DEC(k); Write(s[k]) END; + END; END WriteInt; PROCEDURE WriteReal* (r: LONGREAL; suffx: CHAR); From 6c0c666f91be0610b4416f0b24939499b1761d5e Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 2 Dec 2016 12:27:03 +0000 Subject: [PATCH 024/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 18 +++++++++--------- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 20 +++++++++++++------- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 4 ++-- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 6 +++--- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 4 ++-- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +++--- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 18 +++++++++--------- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 20 +++++++++++++------- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 4 ++-- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 6 +++--- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 4 ++-- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +++--- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 6 +++--- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 18 +++++++++--------- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 20 +++++++++++++------- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 4 ++-- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 6 +++--- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 4 ++-- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +++--- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 18 +++++++++--------- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 20 +++++++++++++------- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 4 ++-- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 6 +++--- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 4 ++-- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +++--- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 6 +++--- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 18 +++++++++--------- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 20 +++++++++++++------- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 4 ++-- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 6 +++--- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 4 ++-- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +++--- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 324 insertions(+), 294 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index e59d7615..9322477d 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 01281cfc..f30fe61f 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 98f85767..39dd27b9 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index f39534fc..96dd911c 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index e124b950..c97d14a6 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index b6abc8f3..95b746d7 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 82ebd04d..86033649 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 0290d664..73c918d9 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 3ab94701..92ebb074 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d9e826b8..57fde3a0 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -550,7 +550,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = -z->conval->intval; @@ -577,7 +577,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = __ABS(z->conval->intval); @@ -920,7 +920,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) if (f == 4) { xv = xval->intval; yv = yval->intval; - if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) { + if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807LL, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807LL-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807LL-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807LL-1))) && yv != (-9223372036854775807LL-1))) && -xv <= __DIV(9223372036854775807LL, -yv))) { xval->intval = xv * yv; OPB_SetIntType(x); } else { @@ -999,8 +999,8 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 6: if (f == 4) { - temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval); - if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) { + temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807LL - yval->intval); + if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807LL-1) - yval->intval)) { xval->intval += yval->intval; OPB_SetIntType(x); } else { @@ -1023,7 +1023,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 7: if (f == 4) { - if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) { + if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807LL-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807LL + yval->intval)) { xval->intval -= yval->intval; OPB_SetIntType(x); } else { @@ -2087,7 +2087,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno) OPB_err(208); p->conval->intval = 1; } else if (x->conval->intval >= 0) { - if (__ABS(p->conval->intval) <= __DIV(9223372036854775807, (INT64)__ASH(1, x->conval->intval))) { + if (__ABS(p->conval->intval) <= __DIV(9223372036854775807LL, (INT64)__ASH(1, x->conval->intval))) { p->conval->intval = p->conval->intval * (INT64)__ASH(1, x->conval->intval); } else { OPB_err(208); @@ -2585,7 +2585,7 @@ export void *OPB__init(void) __MODULE_IMPORT(OPT); __REGMOD("OPB", 0); /* BEGIN */ - OPB_maxExp = OPB_log(4611686018427387904); + OPB_maxExp = OPB_log(4611686018427387904LL); OPB_maxExp = OPB_exp; __ENDMOD; } diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 2c396170..e841f317 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 5f4dc826..73872a51 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f9bc06a4..06fa9996 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 1732c950..9aca428d 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -893,7 +893,7 @@ void OPM_WriteHex (INT64 i) void OPM_WriteInt (INT64 i) { - CHAR s[24]; + CHAR s[26]; INT64 i1, k; if ((i == OPM_SignedMinimum(2) || i == OPM_SignedMinimum(4)) || i == OPM_SignedMinimum(8)) { OPM_Write('('); @@ -901,21 +901,27 @@ void OPM_WriteInt (INT64 i) OPM_WriteString((CHAR*)"-1)", 4); } else { i1 = __ABS(i); - s[0] = (CHAR)(__MOD(i1, 10) + 48); + if (i1 <= 2147483647) { + k = 0; + } else { + __MOVE("LL", s, 3); + k = 2; + } + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); - k = 1; + k += 1; while (i1 > 0) { - s[__X(k, 24)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } if (i < 0) { - s[__X(k, 24)] = '-'; + s[__X(k, 26)] = '-'; k += 1; } while (k > 0) { k -= 1; - OPM_Write(s[__X(k, 24)]); + OPM_Write(s[__X(k, 26)]); } } } diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 979995c8..6ea722dc 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 69624c1f..24a04912 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index b748e221..b6d59055 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index eee78d80..311cbe15 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -198,7 +198,7 @@ static void OPS_Number (void) while (i < n) { d = Ord__7(dig[i], 0); i += 1; - if (OPS_intval <= __DIV(9223372036854775807 - (INT64)d, 10)) { + if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; } else { OPS_err(203); diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 7ab70899..28618fe1 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 40f61458..dcaf0156 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 67996e8e..ab443dff 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index fb6ac690..5a44f258 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 43aaf24a..d26a1b3e 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index a03cf592..73f0311a 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ void Out_Int (INT64 x, INT64 n) INT16 i; BOOLEAN negative; negative = x < 0; - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { __MOVE("8085774586302733229", s, 20); i = 19; } else { @@ -175,7 +175,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) INT64 m; INT16 d, dr; e = (INT16)__MASK(__ASHR((__VAL(INT64, x)), 52), -2048); - f = __MASK((__VAL(INT64, x)), -4503599627370496); + f = __MASK((__VAL(INT64, x)), -4503599627370496LL); nn = (__VAL(INT64, x) < 0 && !((e == 2047 && f != 0))); if (nn) { n -= 1; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 27f2c9bb..a4eb7cb6 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 1fc766bf..95c8d97b 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 9be32cda..1f183fc5 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index e4149017..33c286b7 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index e3bfadb5..6fc2dd5c 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index a3f1e808..42190367 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index b192b7bb..1806a7cc 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 376db061..489acce0 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1046,7 +1046,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) CHAR a[24]; i = 0; if (x < 0) { - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 4ea56de1..00add2ac 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 7a2a840d..c6c421f9 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 5a3fe6d0..b1771722 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 657534b4..e89705a7 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 6ad7abb0..e92a4c5f 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index e59d7615..9322477d 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 01281cfc..f30fe61f 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 98f85767..39dd27b9 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index f39534fc..96dd911c 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index e124b950..c97d14a6 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index b6abc8f3..95b746d7 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 82ebd04d..86033649 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 0290d664..73c918d9 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 3ab94701..92ebb074 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d9e826b8..57fde3a0 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -550,7 +550,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = -z->conval->intval; @@ -577,7 +577,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = __ABS(z->conval->intval); @@ -920,7 +920,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) if (f == 4) { xv = xval->intval; yv = yval->intval; - if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) { + if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807LL, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807LL-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807LL-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807LL-1))) && yv != (-9223372036854775807LL-1))) && -xv <= __DIV(9223372036854775807LL, -yv))) { xval->intval = xv * yv; OPB_SetIntType(x); } else { @@ -999,8 +999,8 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 6: if (f == 4) { - temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval); - if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) { + temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807LL - yval->intval); + if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807LL-1) - yval->intval)) { xval->intval += yval->intval; OPB_SetIntType(x); } else { @@ -1023,7 +1023,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 7: if (f == 4) { - if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) { + if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807LL-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807LL + yval->intval)) { xval->intval -= yval->intval; OPB_SetIntType(x); } else { @@ -2087,7 +2087,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno) OPB_err(208); p->conval->intval = 1; } else if (x->conval->intval >= 0) { - if (__ABS(p->conval->intval) <= __DIV(9223372036854775807, (INT64)__ASH(1, x->conval->intval))) { + if (__ABS(p->conval->intval) <= __DIV(9223372036854775807LL, (INT64)__ASH(1, x->conval->intval))) { p->conval->intval = p->conval->intval * (INT64)__ASH(1, x->conval->intval); } else { OPB_err(208); @@ -2585,7 +2585,7 @@ export void *OPB__init(void) __MODULE_IMPORT(OPT); __REGMOD("OPB", 0); /* BEGIN */ - OPB_maxExp = OPB_log(4611686018427387904); + OPB_maxExp = OPB_log(4611686018427387904LL); OPB_maxExp = OPB_exp; __ENDMOD; } diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 2c396170..e841f317 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 5f4dc826..73872a51 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f9bc06a4..06fa9996 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 1732c950..9aca428d 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -893,7 +893,7 @@ void OPM_WriteHex (INT64 i) void OPM_WriteInt (INT64 i) { - CHAR s[24]; + CHAR s[26]; INT64 i1, k; if ((i == OPM_SignedMinimum(2) || i == OPM_SignedMinimum(4)) || i == OPM_SignedMinimum(8)) { OPM_Write('('); @@ -901,21 +901,27 @@ void OPM_WriteInt (INT64 i) OPM_WriteString((CHAR*)"-1)", 4); } else { i1 = __ABS(i); - s[0] = (CHAR)(__MOD(i1, 10) + 48); + if (i1 <= 2147483647) { + k = 0; + } else { + __MOVE("LL", s, 3); + k = 2; + } + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); - k = 1; + k += 1; while (i1 > 0) { - s[__X(k, 24)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } if (i < 0) { - s[__X(k, 24)] = '-'; + s[__X(k, 26)] = '-'; k += 1; } while (k > 0) { k -= 1; - OPM_Write(s[__X(k, 24)]); + OPM_Write(s[__X(k, 26)]); } } } diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 979995c8..6ea722dc 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 69624c1f..24a04912 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index b748e221..b6d59055 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index eee78d80..311cbe15 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -198,7 +198,7 @@ static void OPS_Number (void) while (i < n) { d = Ord__7(dig[i], 0); i += 1; - if (OPS_intval <= __DIV(9223372036854775807 - (INT64)d, 10)) { + if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; } else { OPS_err(203); diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 7ab70899..28618fe1 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 174aae08..7284592a 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 67996e8e..ab443dff 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index fb6ac690..5a44f258 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 43aaf24a..d26a1b3e 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index a03cf592..73f0311a 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ void Out_Int (INT64 x, INT64 n) INT16 i; BOOLEAN negative; negative = x < 0; - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { __MOVE("8085774586302733229", s, 20); i = 19; } else { @@ -175,7 +175,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) INT64 m; INT16 d, dr; e = (INT16)__MASK(__ASHR((__VAL(INT64, x)), 52), -2048); - f = __MASK((__VAL(INT64, x)), -4503599627370496); + f = __MASK((__VAL(INT64, x)), -4503599627370496LL); nn = (__VAL(INT64, x) < 0 && !((e == 2047 && f != 0))); if (nn) { n -= 1; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 27f2c9bb..a4eb7cb6 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 1fc766bf..95c8d97b 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 9be32cda..1f183fc5 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index e4149017..33c286b7 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index e3bfadb5..6fc2dd5c 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index a3f1e808..42190367 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index b192b7bb..1806a7cc 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 4fa93c49..cc68acd9 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1046,7 +1046,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) CHAR a[24]; i = 0; if (x < 0) { - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 235cecb4..9aed03da 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 7a2a840d..c6c421f9 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 5a3fe6d0..b1771722 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 657534b4..e89705a7 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 6ad7abb0..e92a4c5f 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index e59d7615..9322477d 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 01281cfc..f30fe61f 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 98f85767..39dd27b9 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 0c219af5..a2d72b8e 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 4a1cbfe9..4dab2431 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 222162d5..5f4cd2f3 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -721,10 +721,10 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMin = 9223372036854775807LL; Heap_heapPosMax = 0; Heap_heapNegMin = 0; - Heap_heapNegMax = (-9223372036854775807-1); + Heap_heapNegMax = (-9223372036854775807LL-1); Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 585db2f0..da41e4b8 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index b0cf5fd9..fcf1bb3a 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index a3e555ef..327f139b 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d9e826b8..57fde3a0 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -550,7 +550,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = -z->conval->intval; @@ -577,7 +577,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = __ABS(z->conval->intval); @@ -920,7 +920,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) if (f == 4) { xv = xval->intval; yv = yval->intval; - if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) { + if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807LL, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807LL-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807LL-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807LL-1))) && yv != (-9223372036854775807LL-1))) && -xv <= __DIV(9223372036854775807LL, -yv))) { xval->intval = xv * yv; OPB_SetIntType(x); } else { @@ -999,8 +999,8 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 6: if (f == 4) { - temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval); - if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) { + temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807LL - yval->intval); + if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807LL-1) - yval->intval)) { xval->intval += yval->intval; OPB_SetIntType(x); } else { @@ -1023,7 +1023,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 7: if (f == 4) { - if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) { + if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807LL-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807LL + yval->intval)) { xval->intval -= yval->intval; OPB_SetIntType(x); } else { @@ -2087,7 +2087,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno) OPB_err(208); p->conval->intval = 1; } else if (x->conval->intval >= 0) { - if (__ABS(p->conval->intval) <= __DIV(9223372036854775807, (INT64)__ASH(1, x->conval->intval))) { + if (__ABS(p->conval->intval) <= __DIV(9223372036854775807LL, (INT64)__ASH(1, x->conval->intval))) { p->conval->intval = p->conval->intval * (INT64)__ASH(1, x->conval->intval); } else { OPB_err(208); @@ -2585,7 +2585,7 @@ export void *OPB__init(void) __MODULE_IMPORT(OPT); __REGMOD("OPB", 0); /* BEGIN */ - OPB_maxExp = OPB_log(4611686018427387904); + OPB_maxExp = OPB_log(4611686018427387904LL); OPB_maxExp = OPB_exp; __ENDMOD; } diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 2c396170..e841f317 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 5f4dc826..73872a51 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f9bc06a4..06fa9996 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index f52cb5e2..0533cbfc 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -893,7 +893,7 @@ void OPM_WriteHex (INT64 i) void OPM_WriteInt (INT64 i) { - CHAR s[24]; + CHAR s[26]; INT64 i1, k; if ((i == OPM_SignedMinimum(2) || i == OPM_SignedMinimum(4)) || i == OPM_SignedMinimum(8)) { OPM_Write('('); @@ -901,21 +901,27 @@ void OPM_WriteInt (INT64 i) OPM_WriteString((CHAR*)"-1)", 4); } else { i1 = __ABS(i); - s[0] = (CHAR)(__MOD(i1, 10) + 48); + if (i1 <= 2147483647) { + k = 0; + } else { + __MOVE("LL", s, 3); + k = 2; + } + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); - k = 1; + k += 1; while (i1 > 0) { - s[__X(k, 24)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } if (i < 0) { - s[__X(k, 24)] = '-'; + s[__X(k, 26)] = '-'; k += 1; } while (k > 0) { k -= 1; - OPM_Write(s[__X(k, 24)]); + OPM_Write(s[__X(k, 26)]); } } } diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 979995c8..6ea722dc 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 954279d4..a7630159 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index b748e221..b6d59055 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index eee78d80..311cbe15 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -198,7 +198,7 @@ static void OPS_Number (void) while (i < n) { d = Ord__7(dig[i], 0); i += 1; - if (OPS_intval <= __DIV(9223372036854775807 - (INT64)d, 10)) { + if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; } else { OPS_err(203); diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 7ab70899..28618fe1 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index b58d6175..0dd110b2 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 67996e8e..ab443dff 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 22c12372..6a1d23a7 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 43aaf24a..d26a1b3e 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a03cf592..73f0311a 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ void Out_Int (INT64 x, INT64 n) INT16 i; BOOLEAN negative; negative = x < 0; - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { __MOVE("8085774586302733229", s, 20); i = 19; } else { @@ -175,7 +175,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) INT64 m; INT16 d, dr; e = (INT16)__MASK(__ASHR((__VAL(INT64, x)), 52), -2048); - f = __MASK((__VAL(INT64, x)), -4503599627370496); + f = __MASK((__VAL(INT64, x)), -4503599627370496LL); nn = (__VAL(INT64, x) < 0 && !((e == 2047 && f != 0))); if (nn) { n -= 1; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 27f2c9bb..a4eb7cb6 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index eadd3813..11b9bd14 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index ee748a4f..f84abacb 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index e4149017..33c286b7 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index e3bfadb5..6fc2dd5c 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index a3f1e808..42190367 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index b192b7bb..1806a7cc 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index a7cc3ff1..627eb31d 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1046,7 +1046,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) CHAR a[24]; i = 0; if (x < 0) { - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 8c1b9016..ac4a8157 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 7a2a840d..c6c421f9 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 5a3fe6d0..b1771722 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 657534b4..e89705a7 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 6ad7abb0..e92a4c5f 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index e59d7615..9322477d 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 01281cfc..f30fe61f 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 98f85767..39dd27b9 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 841d80d9..c0bb12ed 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dab76a88..b2973453 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index b6abc8f3..95b746d7 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 82ebd04d..86033649 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 98b3a7e9..85b323b2 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 3ab94701..92ebb074 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d9e826b8..57fde3a0 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -550,7 +550,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = -z->conval->intval; @@ -577,7 +577,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = __ABS(z->conval->intval); @@ -920,7 +920,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) if (f == 4) { xv = xval->intval; yv = yval->intval; - if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) { + if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807LL, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807LL-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807LL-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807LL-1))) && yv != (-9223372036854775807LL-1))) && -xv <= __DIV(9223372036854775807LL, -yv))) { xval->intval = xv * yv; OPB_SetIntType(x); } else { @@ -999,8 +999,8 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 6: if (f == 4) { - temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval); - if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) { + temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807LL - yval->intval); + if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807LL-1) - yval->intval)) { xval->intval += yval->intval; OPB_SetIntType(x); } else { @@ -1023,7 +1023,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 7: if (f == 4) { - if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) { + if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807LL-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807LL + yval->intval)) { xval->intval -= yval->intval; OPB_SetIntType(x); } else { @@ -2087,7 +2087,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno) OPB_err(208); p->conval->intval = 1; } else if (x->conval->intval >= 0) { - if (__ABS(p->conval->intval) <= __DIV(9223372036854775807, (INT64)__ASH(1, x->conval->intval))) { + if (__ABS(p->conval->intval) <= __DIV(9223372036854775807LL, (INT64)__ASH(1, x->conval->intval))) { p->conval->intval = p->conval->intval * (INT64)__ASH(1, x->conval->intval); } else { OPB_err(208); @@ -2585,7 +2585,7 @@ export void *OPB__init(void) __MODULE_IMPORT(OPT); __REGMOD("OPB", 0); /* BEGIN */ - OPB_maxExp = OPB_log(4611686018427387904); + OPB_maxExp = OPB_log(4611686018427387904LL); OPB_maxExp = OPB_exp; __ENDMOD; } diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 2c396170..e841f317 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 5f4dc826..73872a51 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f9bc06a4..06fa9996 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 1732c950..9aca428d 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -893,7 +893,7 @@ void OPM_WriteHex (INT64 i) void OPM_WriteInt (INT64 i) { - CHAR s[24]; + CHAR s[26]; INT64 i1, k; if ((i == OPM_SignedMinimum(2) || i == OPM_SignedMinimum(4)) || i == OPM_SignedMinimum(8)) { OPM_Write('('); @@ -901,21 +901,27 @@ void OPM_WriteInt (INT64 i) OPM_WriteString((CHAR*)"-1)", 4); } else { i1 = __ABS(i); - s[0] = (CHAR)(__MOD(i1, 10) + 48); + if (i1 <= 2147483647) { + k = 0; + } else { + __MOVE("LL", s, 3); + k = 2; + } + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); - k = 1; + k += 1; while (i1 > 0) { - s[__X(k, 24)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } if (i < 0) { - s[__X(k, 24)] = '-'; + s[__X(k, 26)] = '-'; k += 1; } while (k > 0) { k -= 1; - OPM_Write(s[__X(k, 24)]); + OPM_Write(s[__X(k, 26)]); } } } diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 979995c8..6ea722dc 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 69624c1f..24a04912 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index b748e221..b6d59055 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index eee78d80..311cbe15 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -198,7 +198,7 @@ static void OPS_Number (void) while (i < n) { d = Ord__7(dig[i], 0); i += 1; - if (OPS_intval <= __DIV(9223372036854775807 - (INT64)d, 10)) { + if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; } else { OPS_err(203); diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 7ab70899..28618fe1 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 174aae08..7284592a 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 67996e8e..ab443dff 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index fb6ac690..5a44f258 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 43aaf24a..d26a1b3e 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 0d3f9e29..b5ccb18b 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ void Out_Int (INT64 x, INT64 n) INT16 i; BOOLEAN negative; negative = x < 0; - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { __MOVE("8085774586302733229", s, 20); i = 19; } else { @@ -175,7 +175,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) INT64 m; INT16 d, dr; e = (INT16)__MASK(__ASHR((__VAL(INT64, x)), 52), -2048); - f = __MASK((__VAL(INT64, x)), -4503599627370496); + f = __MASK((__VAL(INT64, x)), -4503599627370496LL); nn = (__VAL(INT64, x) < 0 && !((e == 2047 && f != 0))); if (nn) { n -= 1; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 27f2c9bb..a4eb7cb6 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 4a164fb8..20c5ca89 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index adfe4173..f53d70ed 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index e4149017..33c286b7 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index e3bfadb5..6fc2dd5c 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index a3f1e808..42190367 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index b192b7bb..1806a7cc 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 4fa93c49..cc68acd9 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1046,7 +1046,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) CHAR a[24]; i = 0; if (x < 0) { - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 235cecb4..9aed03da 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 7a2a840d..c6c421f9 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 5a3fe6d0..b1771722 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 657534b4..e89705a7 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 6ad7abb0..e92a4c5f 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index e59d7615..9322477d 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 01281cfc..f30fe61f 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 98f85767..39dd27b9 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 8ad0e207..27810f46 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 3631e4aa..8d9e7acc 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 222162d5..5f4cd2f3 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -721,10 +721,10 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 9223372036854775807; + Heap_heapPosMin = 9223372036854775807LL; Heap_heapPosMax = 0; Heap_heapNegMin = 0; - Heap_heapNegMax = (-9223372036854775807-1); + Heap_heapNegMax = (-9223372036854775807LL-1); Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 585db2f0..da41e4b8 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index c6884be5..d3b0e7ec 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index a3e555ef..327f139b 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d9e826b8..57fde3a0 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -550,7 +550,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = -z->conval->intval; @@ -577,7 +577,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { - if (z->conval->intval == (-9223372036854775807-1)) { + if (z->conval->intval == (-9223372036854775807LL-1)) { OPB_err(203); } else { z->conval->intval = __ABS(z->conval->intval); @@ -920,7 +920,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) if (f == 4) { xv = xval->intval; yv = yval->intval; - if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807-1))) && yv != (-9223372036854775807-1))) && -xv <= __DIV(9223372036854775807, -yv))) { + if (((((xv == 0 || yv == 0) || (((xv > 0 && yv > 0)) && yv <= __DIV(9223372036854775807LL, xv))) || (((xv > 0 && yv < 0)) && yv >= __DIV((-9223372036854775807LL-1), xv))) || (((xv < 0 && yv > 0)) && xv >= __DIV((-9223372036854775807LL-1), yv))) || (((((((xv < 0 && yv < 0)) && xv != (-9223372036854775807LL-1))) && yv != (-9223372036854775807LL-1))) && -xv <= __DIV(9223372036854775807LL, -yv))) { xval->intval = xv * yv; OPB_SetIntType(x); } else { @@ -999,8 +999,8 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 6: if (f == 4) { - temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807 - yval->intval); - if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807-1) - yval->intval)) { + temp = (yval->intval >= 0 && xval->intval <= 9223372036854775807LL - yval->intval); + if (temp || (yval->intval < 0 && xval->intval >= (-9223372036854775807LL-1) - yval->intval)) { xval->intval += yval->intval; OPB_SetIntType(x); } else { @@ -1023,7 +1023,7 @@ static void OPB_ConstOp (INT16 op, OPT_Node x, OPT_Node y) break; case 7: if (f == 4) { - if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807 + yval->intval)) { + if ((yval->intval >= 0 && xval->intval >= (-9223372036854775807LL-1) + yval->intval) || (yval->intval < 0 && xval->intval <= 9223372036854775807LL + yval->intval)) { xval->intval -= yval->intval; OPB_SetIntType(x); } else { @@ -2087,7 +2087,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno) OPB_err(208); p->conval->intval = 1; } else if (x->conval->intval >= 0) { - if (__ABS(p->conval->intval) <= __DIV(9223372036854775807, (INT64)__ASH(1, x->conval->intval))) { + if (__ABS(p->conval->intval) <= __DIV(9223372036854775807LL, (INT64)__ASH(1, x->conval->intval))) { p->conval->intval = p->conval->intval * (INT64)__ASH(1, x->conval->intval); } else { OPB_err(208); @@ -2585,7 +2585,7 @@ export void *OPB__init(void) __MODULE_IMPORT(OPT); __REGMOD("OPB", 0); /* BEGIN */ - OPB_maxExp = OPB_log(4611686018427387904); + OPB_maxExp = OPB_log(4611686018427387904LL); OPB_maxExp = OPB_exp; __ENDMOD; } diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 2c396170..e841f317 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 5f4dc826..73872a51 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f9bc06a4..06fa9996 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index f52cb5e2..0533cbfc 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -893,7 +893,7 @@ void OPM_WriteHex (INT64 i) void OPM_WriteInt (INT64 i) { - CHAR s[24]; + CHAR s[26]; INT64 i1, k; if ((i == OPM_SignedMinimum(2) || i == OPM_SignedMinimum(4)) || i == OPM_SignedMinimum(8)) { OPM_Write('('); @@ -901,21 +901,27 @@ void OPM_WriteInt (INT64 i) OPM_WriteString((CHAR*)"-1)", 4); } else { i1 = __ABS(i); - s[0] = (CHAR)(__MOD(i1, 10) + 48); + if (i1 <= 2147483647) { + k = 0; + } else { + __MOVE("LL", s, 3); + k = 2; + } + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); - k = 1; + k += 1; while (i1 > 0) { - s[__X(k, 24)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } if (i < 0) { - s[__X(k, 24)] = '-'; + s[__X(k, 26)] = '-'; k += 1; } while (k > 0) { k -= 1; - OPM_Write(s[__X(k, 24)]); + OPM_Write(s[__X(k, 26)]); } } } diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 979995c8..6ea722dc 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 954279d4..a7630159 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index b748e221..b6d59055 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index eee78d80..311cbe15 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -198,7 +198,7 @@ static void OPS_Number (void) while (i < n) { d = Ord__7(dig[i], 0); i += 1; - if (OPS_intval <= __DIV(9223372036854775807 - (INT64)d, 10)) { + if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; } else { OPS_err(203); diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 7ab70899..28618fe1 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index b58d6175..0dd110b2 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 67996e8e..ab443dff 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 22c12372..6a1d23a7 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 43aaf24a..d26a1b3e 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 0d3f9e29..b5ccb18b 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ void Out_Int (INT64 x, INT64 n) INT16 i; BOOLEAN negative; negative = x < 0; - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { __MOVE("8085774586302733229", s, 20); i = 19; } else { @@ -175,7 +175,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) INT64 m; INT16 d, dr; e = (INT16)__MASK(__ASHR((__VAL(INT64, x)), 52), -2048); - f = __MASK((__VAL(INT64, x)), -4503599627370496); + f = __MASK((__VAL(INT64, x)), -4503599627370496LL); nn = (__VAL(INT64, x) < 0 && !((e == 2047 && f != 0))); if (nn) { n -= 1; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 27f2c9bb..a4eb7cb6 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index bad7600e..ca463179 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7d53aaad..03b75dc0 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index e4149017..33c286b7 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index e3bfadb5..6fc2dd5c 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index a3f1e808..42190367 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index b192b7bb..1806a7cc 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index a7cc3ff1..627eb31d 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1046,7 +1046,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) CHAR a[24]; i = 0; if (x < 0) { - if (x == (-9223372036854775807-1)) { + if (x == (-9223372036854775807LL-1)) { Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 8c1b9016..ac4a8157 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 7a2a840d..c6c421f9 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 5a3fe6d0..b1771722 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 657534b4..e89705a7 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 6ad7abb0..e92a4c5f 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 5c3b42be0940dcc477fea50f3eaaaecc1f95058b Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 2 Dec 2016 13:02:35 +0000 Subject: [PATCH 025/241] Fix incorrect dynarray length type merge with subsequent longint in IdentList. --- src/compiler/OPC.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index f2e662c9..376ba412 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -655,7 +655,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) DeclareObj(obj, vis = 3); IF obj^.typ^.comp = OPT.DynArr THEN (* declare len parameter(s) *) EndStat; BegStat; - base := OPT.linttyp; + base := OPT.adrtyp; OPM.WriteString("ADDRESS "); LenList(obj, FALSE, TRUE) ELSIF (obj^.mode = OPT.VarPar) & (obj^.typ^.comp = OPT.Record) THEN EndStat; BegStat; From 6beeaa5626b62022a40051a67aa8a7147edf5cdb Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 2 Dec 2016 13:03:18 +0000 Subject: [PATCH 026/241] Update bootstrap C sources. --- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-88/OPC.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 73872a51..d3e4eaf5 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -968,7 +968,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) if (obj->typ->comp == 3) { OPC_EndStat(); OPC_BegStat(); - base = OPT_linttyp; + base = OPT_adrtyp; OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 73872a51..d3e4eaf5 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -968,7 +968,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) if (obj->typ->comp == 3) { OPC_EndStat(); OPC_BegStat(); - base = OPT_linttyp; + base = OPT_adrtyp; OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 73872a51..d3e4eaf5 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -968,7 +968,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) if (obj->typ->comp == 3) { OPC_EndStat(); OPC_BegStat(); - base = OPT_linttyp; + base = OPT_adrtyp; OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 73872a51..d3e4eaf5 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -968,7 +968,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) if (obj->typ->comp == 3) { OPC_EndStat(); OPC_BegStat(); - base = OPT_linttyp; + base = OPT_adrtyp; OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 73872a51..d3e4eaf5 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -968,7 +968,7 @@ static void OPC_IdentList (OPT_Object obj, INT16 vis) if (obj->typ->comp == 3) { OPC_EndStat(); OPC_BegStat(); - base = OPT_linttyp; + base = OPT_adrtyp; OPM_WriteString((CHAR*)"ADDRESS ", 9); OPC_LenList(obj, 0, 1); } else if ((obj->mode == 2 && obj->typ->comp == 4)) { From 8c9d029df38eb7a66befd4d33936e6f81ff3359d Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 3 Dec 2016 12:07:16 +0000 Subject: [PATCH 027/241] Fix error message display during library build. --- src/tools/make/oberon.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index c852bd57..4d4b0b40 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -372,6 +372,7 @@ library: rm -rf $(BUILDDIR)/$(MODEL) mkdir -p $(BUILDDIR)/$(MODEL) cp $(BUILDDIR)/SYSTEM.[ho] $(BUILDDIR)/$(MODEL) + cp src/runtime/*.Txt $(BUILDDIR)/$(MODEL) cp $(BUILDDIR)/WindowsWrapper.h $(BUILDDIR)/$(MODEL) @make -f src/tools/make/oberon.mk -s O$(MODEL)library MODEL=$(MODEL) @printf "\nMaking lib$(ONAME)-O$(MODEL) .a and .so\n" From 1ae3a2ff328ec92e3c4f25406c79216bc10671d6 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 3 Dec 2016 18:43:13 +0000 Subject: [PATCH 028/241] Simplify ARGV setup. Add trial binary directory discovery code. --- src/compiler/OPM.Mod | 1 + src/runtime/Modules.Mod | 171 ++++++++++++++++++++++---- src/test/confidence/intsyntax/test.sh | 2 +- 3 files changed, 149 insertions(+), 25 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index a314cdc3..4145a1fc 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -233,6 +233,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) PROCEDURE OpenPar*(): BOOLEAN; (* prepare for a sequence of translations *) VAR s: ARRAY 256 OF CHAR; BEGIN + Out.String("Testing. Binary directory is: '"); Out.String(Modules.BinaryDir); Out.String("'."); Out.Ln; IF Modules.ArgCount = 1 THEN LogWLn; LogWStr("Oberon-2 compiler v"); LogWStr(Configuration.versionLong); LogW("."); LogWLn; diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 8e9c1851..15896d21 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -31,13 +31,15 @@ MODULE Modules; (* jt 6.1.96 *) END ; VAR - res*: INTEGER; - resMsg*: ARRAY 256 OF CHAR; - imported*, importing*: ModuleName; + res*: INTEGER; + resMsg*: ARRAY 256 OF CHAR; + imported*: ModuleName; + importing*: ModuleName; MainStackFrame-: SYSTEM.ADDRESS; ArgCount-: INTEGER; ArgVector-: SYSTEM.ADDRESS; + BinaryDir-: ARRAY 1024 OF CHAR; (* Program startup *) @@ -50,28 +52,23 @@ MODULE Modules; (* jt 6.1.96 *) PROCEDURE Init*(argc: SYSTEM.INT32; argvadr: SYSTEM.ADDRESS); (* This start code is called by the __INIT macro generated by the compiler as the C main program. *) - TYPE ArgVecPtr = POINTER TO ARRAY 1 OF SYSTEM.ADDRESS; - VAR av: ArgVecPtr; BEGIN MainStackFrame := argvadr; - ArgCount := SYSTEM.VAL(INTEGER, argc); - av := SYSTEM.VAL(ArgVecPtr, argvadr); - ArgVector := av[0]; + ArgCount := SYSTEM.VAL(INTEGER, argc); + SYSTEM.GET(argvadr, ArgVector); - InitHeap; (* Initailse heap varaibles neded for compiler generated *__inits *) - ModulesInit(); (* Our own __init code will run the Platform and Heap __init code. *) + InitHeap; (* Initialse heap variables needed for compiler generated *__inits *) + ModulesInit(); (* Our own __init code will run Platform__init and Heap__init. *) END Init; PROCEDURE GetArg*(n: INTEGER; VAR val: ARRAY OF CHAR); - TYPE - ArgPtr = POINTER TO ARRAY 1024 OF CHAR; - ArgVec = POINTER TO ARRAY 1024 OF ArgPtr; - VAR av: ArgVec; + TYPE argptr = POINTER TO ARRAY 1024 OF CHAR; + VAR arg: argptr; BEGIN IF n < ArgCount THEN - av := SYSTEM.VAL(ArgVec, ArgVector); - COPY(av[n]^, val) + SYSTEM.GET(ArgVector + n*SIZE(SYSTEM.ADDRESS), arg); (* Address of nth argument. *) + COPY(arg^, val); END END GetArg; @@ -94,16 +91,140 @@ MODULE Modules; (* jt 6.1.96 *) RETURN i END ArgPos; +(* Determine directory from which this executable was loaded *) - - PROCEDURE Append(VAR a: ARRAY OF CHAR; b: ARRAY OF CHAR); - VAR i, j: INTEGER; + PROCEDURE CharCount(s: ARRAY OF CHAR): INTEGER; + VAR i: INTEGER; BEGIN - i := 0; WHILE a[i] # 0X DO INC(i) END; - j := 0; WHILE b[j] # 0X DO a[i] := b[j]; INC(i); INC(j) END; - a[i] := 0X + i := 0; WHILE (i < LEN(s)) & (s[i] # 0X) DO INC(i) END; + RETURN i; + END CharCount; + + PROCEDURE Append(s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); + VAR i,j: INTEGER; + BEGIN + i := 0; j := CharCount(d); + WHILE s[i] # 0X DO d[j] := s[i]; INC(i); INC(j) END; + d[j] := 0X; END Append; + PROCEDURE AppendPart(c: CHAR; s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); + VAR i,j: INTEGER; + BEGIN + i := 0; j := CharCount(d); + IF (j > 0) & (d[j-1] # c) THEN d[j] := c; INC(j) END; + WHILE s[i] # 0X DO d[j] := s[i]; INC(i); INC(j) END; + d[j] := 0X; + END AppendPart; + + PROCEDURE IsOneOf(c: CHAR; s: ARRAY OF CHAR): BOOLEAN; + VAR i: INTEGER; + BEGIN + IF c = 0X THEN RETURN FALSE END; + i := 0; WHILE (s[i] # c) & (s[i] # 0X) DO INC(i) END; + RETURN s[i] = c + END IsOneOf; + + PROCEDURE IsAbsolute(d: ARRAY OF CHAR): BOOLEAN; + BEGIN + IF d = '' THEN RETURN FALSE END; + IF IsOneOf(d[0], '/\') THEN RETURN TRUE END; + IF d[1] = ':' THEN RETURN TRUE END; + RETURN FALSE; + END IsAbsolute; + + PROCEDURE Canonify(s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); + BEGIN + IF IsAbsolute(s) THEN + COPY(s, d) + ELSE + COPY(Platform.CWD, d); AppendPart('/', s, d); + END; + END Canonify; + + PROCEDURE IsFilePresent(s: ARRAY OF CHAR): BOOLEAN; + VAR identity: Platform.FileIdentity; + BEGIN RETURN Platform.IdentifyByName(s, identity) = 0 + END IsFilePresent; + + PROCEDURE ExtractPart(s: ARRAY OF CHAR; VAR i: INTEGER; p: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); + (* Extracts from s starting at i up to any character in p. + Result string in d. + Returns i skipped passed found string and any number of delimiters from p. + *) + VAR j: INTEGER; + BEGIN + j := 0; + WHILE (s[i] # 0X) & ~IsOneOf(s[i], p) DO + d[j] := s[i]; INC(i); INC(j) + END; + d[j] := 0X; + WHILE IsOneOf(s[i], p) DO INC(i) END + END ExtractPart; + + PROCEDURE Trim(s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); + (* Remove redundant '.'s and '/'s. + Note, does not remove 'x/..'. This cannot safely be removed because if + x is a link then 'x/..' means the parent of what x links to rather than + the directory containing link x. + *) + VAR i,j: INTEGER; part: ARRAY 1024 OF CHAR; + BEGIN + i := 0; j := 0; + (* Retain any leading single or pair of '/' (filesystem root or network root). *) + WHILE (i<2) & IsOneOf(s[i], "/\") DO INC(i); d[j] := '/'; INC(j) END; + d[j] := 0X; + (* Append path parts omitting empty or '.' parts. *) + WHILE s[i] # 0X DO + ExtractPart(s, i, "/\", part); + IF (part # '') & (part # '.') THEN AppendPart('/', part, d) END + END; + END Trim; + + PROCEDURE FindBinaryDir(VAR d: ARRAY OF CHAR); + TYPE pathstring = ARRAY 4096 OF CHAR; + VAR + executable: pathstring; + dir: pathstring; + testpath: pathstring; + pathlist: pathstring; + i, j, k: INTEGER; + present: BOOLEAN; + BEGIN + IF ArgCount < 1 THEN + (* Shells and GUIs always pass the command as ARGV[0]. *) + d[0] := 0X; + RETURN; + END; + + (* First try ARGV[0] without looking at the PATH environment variable. *) + GetArg(0, testpath); Trim(testpath, executable); + Canonify(executable, d); present := IsFilePresent(d); + + IF (~present) & (~IsAbsolute(testpath)) THEN + (* ARGV[0] alone didn't work, try non-absolute ARGV[0] with every entry in path. *) + Platform.GetEnv("PATH", pathlist); + i := 0; + WHILE (~present) & (pathlist[i] # 0X) DO + ExtractPart(pathlist, i, ":;", dir); Trim(dir, testpath); + AppendPart('/', executable, testpath); + Canonify(testpath, d); present := IsFilePresent(d) + END + END; + + IF present THEN + (* Remove trailing executable file name *) + k := CharCount(d); + WHILE (k > 0) & ~IsOneOf(d[k-1], '/\') DO DEC(k) END; + (* Chop off executable file name *) + IF k = 0 THEN d[k] := 0X ELSE d[k-1] := 0X END; + ELSE + d[0] := 0X (* Couldn't determine binary directory. *) + END + END FindBinaryDir; + + +(* Module and command lookup by name *) PROCEDURE -modules(): Module "(Modules_Module)Heap_modules"; PROCEDURE -setmodules(m: Module) "Heap_modules = m"; @@ -114,7 +235,7 @@ MODULE Modules; (* jt 6.1.96 *) WHILE (m # NIL) & (m.name # name) DO m := m.next END ; IF m # NIL THEN res := 0; resMsg := "" ELSE res := 1; COPY(name, importing); - resMsg := ' module "'; Append(resMsg, name); Append(resMsg, '" not found'); + resMsg := ' module "'; Append(name, resMsg); Append('" not found', resMsg); END ; RETURN m END ThisMod; @@ -125,7 +246,7 @@ MODULE Modules; (* jt 6.1.96 *) WHILE (c # NIL) & (c.name # name) DO c := c.next END ; IF c # NIL THEN res := 0; resMsg := ""; RETURN c.cmd ELSE res := 2; resMsg := ' command "'; COPY(name, importing); - Append(resMsg, mod.name); Append(resMsg, "."); Append(resMsg, name); Append(resMsg, '" not found'); + Append(mod.name, resMsg); Append(".", resMsg); Append(name, resMsg); Append('" not found', resMsg); RETURN NIL END END ThisCommand; @@ -212,4 +333,6 @@ MODULE Modules; (* jt 6.1.96 *) IF code > 0 THEN Platform.Exit(code) ELSE Platform.Exit(-1) END; END AssertFail; +BEGIN + FindBinaryDir(BinaryDir); END Modules. diff --git a/src/test/confidence/intsyntax/test.sh b/src/test/confidence/intsyntax/test.sh index 3929cc8c..932ea13d 100644 --- a/src/test/confidence/intsyntax/test.sh +++ b/src/test/confidence/intsyntax/test.sh @@ -1,5 +1,5 @@ #!/bin/sh . ../testenv.sh # Generate mixed source and assembly code listing -$OBECOMP IntSyntax.mod -fm >result +$OBECOMP IntSyntax.mod -fm | fgrep -v "Testing. Binary directory is: '" >result . ../testresult.sh From a6049e7b8266caf164d813e80e686a224ec1f400 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 3 Dec 2016 18:44:22 +0000 Subject: [PATCH 029/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 229 +++++++++++++++++++++++---- bootstrap/unix-44/Modules.h | 3 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 6 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 229 +++++++++++++++++++++++---- bootstrap/unix-48/Modules.h | 3 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 6 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 229 +++++++++++++++++++++++---- bootstrap/unix-88/Modules.h | 3 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 6 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 229 +++++++++++++++++++++++---- bootstrap/windows-48/Modules.h | 3 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 6 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 229 +++++++++++++++++++++++---- bootstrap/windows-88/Modules.h | 3 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 6 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 1215 insertions(+), 345 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 9322477d..4eac6b2e 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index f30fe61f..c7d8b4a8 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 39dd27b9..38963a37 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 96dd911c..30a596c2 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index c97d14a6..aa5fec57 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 95b746d7..752ece9b 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 86033649..0126c839 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 73c918d9..7eb1cd6e 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -46,21 +46,31 @@ export Modules_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; +export CHAR Modules_BinaryDir[1024]; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); export void Modules_Init (INT32 argc, INT32 argvadr); +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); @@ -72,32 +82,24 @@ extern void *Modules__init(void); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -typedef - INT32 (*ArgVecPtr__14)[1]; - void Modules_Init (INT32 argc, INT32 argvadr) { - ArgVecPtr__14 av = NIL; Modules_MainStackFrame = argvadr; Modules_ArgCount = __VAL(INT16, argc); - av = (ArgVecPtr__14)(ADDRESS)argvadr; - Modules_ArgVector = (*av)[0]; + __GET(argvadr, Modules_ArgVector, INT32); Modules_InitHeap(); Modules_ModulesInit(); } typedef - CHAR (*ArgPtr__9)[1024]; - -typedef - ArgPtr__9 (*ArgVec__10)[1024]; + CHAR (*argptr__15)[1024]; void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { - ArgVec__10 av = NIL; + argptr__15 arg = NIL; if (n < Modules_ArgCount) { - av = (ArgVec__10)(ADDRESS)Modules_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); + __GET(Modules_ArgVector + __ASHL(n, 2), arg, argptr__15); + __COPY(*arg, val, val__len); } } @@ -142,22 +144,188 @@ INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) return i; } -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len) { - INT16 i, j; - __DUP(b, b__len, CHAR); + INT16 i; + __DUP(s, s__len, CHAR); i = 0; - while (a[__X(i, a__len)] != 0x00) { + while ((i < s__len && s[__X(i, s__len)] != 0x00)) { i += 1; } - j = 0; - while (b[__X(j, b__len)] != 0x00) { - a[__X(i, a__len)] = b[__X(j, b__len)]; + __DEL(s); + return i; +} + +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; i += 1; j += 1; } - a[__X(i, a__len)] = 0x00; - __DEL(b); + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + if ((j > 0 && d[__X(j - 1, d__len)] != c)) { + d[__X(j, d__len)] = c; + j += 1; + } + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; + i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len) +{ + INT16 i; + __DUP(s, s__len, CHAR); + if (c == 0x00) { + __DEL(s); + return 0; + } + i = 0; + while ((s[__X(i, s__len)] != c && s[__X(i, s__len)] != 0x00)) { + i += 1; + } + __DEL(s); + return s[__X(i, s__len)] == c; +} + +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len) +{ + __DUP(d, d__len, CHAR); + if (d[0] == 0x00) { + __DEL(d); + return 0; + } + if (Modules_IsOneOf(d[0], (CHAR*)"/\\", 3)) { + __DEL(d); + return 1; + } + if (d[__X(1, d__len)] == ':') { + __DEL(d); + return 1; + } + __DEL(d); + return 0; +} + +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + __DUP(s, s__len, CHAR); + if (Modules_IsAbsolute(s, s__len)) { + __COPY(s, d, d__len); + } else { + __COPY(Platform_CWD, d, d__len); + Modules_AppendPart('/', s, s__len, (void*)d, d__len); + } + __DEL(s); +} + +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len) +{ + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __DEL(s); + return Platform_IdentifyByName(s, s__len, &identity, Platform_FileIdentity__typ) == 0; +} + +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len) +{ + INT16 j; + __DUP(s, s__len, CHAR); + __DUP(p, p__len, CHAR); + j = 0; + while ((s[__X(*i, s__len)] != 0x00 && !Modules_IsOneOf(s[__X(*i, s__len)], p, p__len))) { + d[__X(j, d__len)] = s[__X(*i, s__len)]; + *i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (Modules_IsOneOf(s[__X(*i, s__len)], p, p__len)) { + *i += 1; + } + __DEL(s); + __DEL(p); +} + +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + CHAR part[1024]; + __DUP(s, s__len, CHAR); + i = 0; + j = 0; + while ((i < 2 && Modules_IsOneOf(s[__X(i, s__len)], (CHAR*)"/\\", 3))) { + i += 1; + d[__X(j, d__len)] = '/'; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (s[__X(i, s__len)] != 0x00) { + Modules_ExtractPart(s, s__len, &i, (CHAR*)"/\\", 3, (void*)part, 1024); + if ((part[0] != 0x00 && __STRCMP(part, ".") != 0)) { + Modules_AppendPart('/', part, 1024, (void*)d, d__len); + } + } + __DEL(s); +} + +typedef + CHAR pathstring__12[4096]; + +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +{ + pathstring__12 executable, dir, testpath, pathlist; + INT16 i, j, k; + BOOLEAN present; + if (Modules_ArgCount < 1) { + d[0] = 0x00; + return; + } + Modules_GetArg(0, (void*)testpath, 4096); + Modules_Trim(testpath, 4096, (void*)executable, 4096); + Modules_Canonify(executable, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); + i = 0; + while ((!present && pathlist[__X(i, 4096)] != 0x00)) { + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); + Modules_Trim(dir, 4096, (void*)testpath, 4096); + Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); + Modules_Canonify(testpath, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + } + } + if (present) { + k = Modules_CharCount(d, d__len); + while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k -= 1; + } + if (k == 0) { + d[__X(k, d__len)] = 0x00; + } else { + d[__X(k - 1, d__len)] = 0x00; + } + } else { + d[0] = 0x00; + } } Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) @@ -177,8 +345,8 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) Modules_res = 1; __COPY(name, Modules_importing, 20); __MOVE(" module \"", Modules_resMsg, 10); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); } __DEL(name); return m; @@ -201,10 +369,10 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam Modules_res = 2; __MOVE(" command \"", Modules_resMsg, 11); __COPY(name, Modules_importing, 20); - Modules_Append((void*)Modules_resMsg, 256, mod->name, 20); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)".", 2); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(mod->name, 20, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)".", 2, (void*)Modules_resMsg, 256); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); __DEL(name); return NIL; } @@ -371,5 +539,6 @@ export void *Modules__init(void) __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ + Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; } diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 92ebb074..e114cae2 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -42,6 +42,7 @@ import Modules_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; +import CHAR Modules_BinaryDir[1024]; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 57fde3a0..0b1509bc 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index e841f317..d6b81543 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index d3e4eaf5..620dd88e 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 06fa9996..20ac9ae8 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 9aca428d..330d8fde 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,6 +267,10 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; + Out_String((CHAR*)"Testing. Binary directory is: '", 32); + Out_String(Modules_BinaryDir, 1024); + Out_String((CHAR*)"'.", 3); + Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 6ea722dc..ec6947a6 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 24a04912..e6d8b614 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index b6d59055..da746402 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 311cbe15..2c97a4d0 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 28618fe1..0b780918 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index dcaf0156..c12b6ffd 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index ab443dff..0a26e546 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 5a44f258..950e0e36 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index d26a1b3e..1afcee74 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 73f0311a..2558adfa 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index a4eb7cb6..62f9d414 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 95c8d97b..2de4df02 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 1f183fc5..798f6253 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 33c286b7..8668f3be 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 6fc2dd5c..a864fcae 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 42190367..697accbd 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 1806a7cc..30317939 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 489acce0..28b11c5a 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 00add2ac..a9c20822 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index c6c421f9..ea43623a 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index b1771722..70c0dfa9 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index e89705a7..f08daa40 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e92a4c5f..e736dc46 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 9322477d..4eac6b2e 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index f30fe61f..c7d8b4a8 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 39dd27b9..38963a37 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 96dd911c..30a596c2 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index c97d14a6..aa5fec57 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 95b746d7..752ece9b 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 86033649..0126c839 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 73c918d9..7eb1cd6e 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -46,21 +46,31 @@ export Modules_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; +export CHAR Modules_BinaryDir[1024]; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); export void Modules_Init (INT32 argc, INT32 argvadr); +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); @@ -72,32 +82,24 @@ extern void *Modules__init(void); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -typedef - INT32 (*ArgVecPtr__14)[1]; - void Modules_Init (INT32 argc, INT32 argvadr) { - ArgVecPtr__14 av = NIL; Modules_MainStackFrame = argvadr; Modules_ArgCount = __VAL(INT16, argc); - av = (ArgVecPtr__14)(ADDRESS)argvadr; - Modules_ArgVector = (*av)[0]; + __GET(argvadr, Modules_ArgVector, INT32); Modules_InitHeap(); Modules_ModulesInit(); } typedef - CHAR (*ArgPtr__9)[1024]; - -typedef - ArgPtr__9 (*ArgVec__10)[1024]; + CHAR (*argptr__15)[1024]; void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { - ArgVec__10 av = NIL; + argptr__15 arg = NIL; if (n < Modules_ArgCount) { - av = (ArgVec__10)(ADDRESS)Modules_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); + __GET(Modules_ArgVector + __ASHL(n, 2), arg, argptr__15); + __COPY(*arg, val, val__len); } } @@ -142,22 +144,188 @@ INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) return i; } -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len) { - INT16 i, j; - __DUP(b, b__len, CHAR); + INT16 i; + __DUP(s, s__len, CHAR); i = 0; - while (a[__X(i, a__len)] != 0x00) { + while ((i < s__len && s[__X(i, s__len)] != 0x00)) { i += 1; } - j = 0; - while (b[__X(j, b__len)] != 0x00) { - a[__X(i, a__len)] = b[__X(j, b__len)]; + __DEL(s); + return i; +} + +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; i += 1; j += 1; } - a[__X(i, a__len)] = 0x00; - __DEL(b); + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + if ((j > 0 && d[__X(j - 1, d__len)] != c)) { + d[__X(j, d__len)] = c; + j += 1; + } + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; + i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len) +{ + INT16 i; + __DUP(s, s__len, CHAR); + if (c == 0x00) { + __DEL(s); + return 0; + } + i = 0; + while ((s[__X(i, s__len)] != c && s[__X(i, s__len)] != 0x00)) { + i += 1; + } + __DEL(s); + return s[__X(i, s__len)] == c; +} + +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len) +{ + __DUP(d, d__len, CHAR); + if (d[0] == 0x00) { + __DEL(d); + return 0; + } + if (Modules_IsOneOf(d[0], (CHAR*)"/\\", 3)) { + __DEL(d); + return 1; + } + if (d[__X(1, d__len)] == ':') { + __DEL(d); + return 1; + } + __DEL(d); + return 0; +} + +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + __DUP(s, s__len, CHAR); + if (Modules_IsAbsolute(s, s__len)) { + __COPY(s, d, d__len); + } else { + __COPY(Platform_CWD, d, d__len); + Modules_AppendPart('/', s, s__len, (void*)d, d__len); + } + __DEL(s); +} + +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len) +{ + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __DEL(s); + return Platform_IdentifyByName(s, s__len, &identity, Platform_FileIdentity__typ) == 0; +} + +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len) +{ + INT16 j; + __DUP(s, s__len, CHAR); + __DUP(p, p__len, CHAR); + j = 0; + while ((s[__X(*i, s__len)] != 0x00 && !Modules_IsOneOf(s[__X(*i, s__len)], p, p__len))) { + d[__X(j, d__len)] = s[__X(*i, s__len)]; + *i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (Modules_IsOneOf(s[__X(*i, s__len)], p, p__len)) { + *i += 1; + } + __DEL(s); + __DEL(p); +} + +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + CHAR part[1024]; + __DUP(s, s__len, CHAR); + i = 0; + j = 0; + while ((i < 2 && Modules_IsOneOf(s[__X(i, s__len)], (CHAR*)"/\\", 3))) { + i += 1; + d[__X(j, d__len)] = '/'; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (s[__X(i, s__len)] != 0x00) { + Modules_ExtractPart(s, s__len, &i, (CHAR*)"/\\", 3, (void*)part, 1024); + if ((part[0] != 0x00 && __STRCMP(part, ".") != 0)) { + Modules_AppendPart('/', part, 1024, (void*)d, d__len); + } + } + __DEL(s); +} + +typedef + CHAR pathstring__12[4096]; + +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +{ + pathstring__12 executable, dir, testpath, pathlist; + INT16 i, j, k; + BOOLEAN present; + if (Modules_ArgCount < 1) { + d[0] = 0x00; + return; + } + Modules_GetArg(0, (void*)testpath, 4096); + Modules_Trim(testpath, 4096, (void*)executable, 4096); + Modules_Canonify(executable, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); + i = 0; + while ((!present && pathlist[__X(i, 4096)] != 0x00)) { + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); + Modules_Trim(dir, 4096, (void*)testpath, 4096); + Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); + Modules_Canonify(testpath, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + } + } + if (present) { + k = Modules_CharCount(d, d__len); + while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k -= 1; + } + if (k == 0) { + d[__X(k, d__len)] = 0x00; + } else { + d[__X(k - 1, d__len)] = 0x00; + } + } else { + d[0] = 0x00; + } } Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) @@ -177,8 +345,8 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) Modules_res = 1; __COPY(name, Modules_importing, 20); __MOVE(" module \"", Modules_resMsg, 10); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); } __DEL(name); return m; @@ -201,10 +369,10 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam Modules_res = 2; __MOVE(" command \"", Modules_resMsg, 11); __COPY(name, Modules_importing, 20); - Modules_Append((void*)Modules_resMsg, 256, mod->name, 20); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)".", 2); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(mod->name, 20, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)".", 2, (void*)Modules_resMsg, 256); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); __DEL(name); return NIL; } @@ -371,5 +539,6 @@ export void *Modules__init(void) __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ + Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; } diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 92ebb074..e114cae2 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -42,6 +42,7 @@ import Modules_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; +import CHAR Modules_BinaryDir[1024]; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 57fde3a0..0b1509bc 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index e841f317..d6b81543 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index d3e4eaf5..620dd88e 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 06fa9996..20ac9ae8 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 9aca428d..330d8fde 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,6 +267,10 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; + Out_String((CHAR*)"Testing. Binary directory is: '", 32); + Out_String(Modules_BinaryDir, 1024); + Out_String((CHAR*)"'.", 3); + Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 6ea722dc..ec6947a6 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 24a04912..e6d8b614 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index b6d59055..da746402 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 311cbe15..2c97a4d0 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 28618fe1..0b780918 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 7284592a..719dab04 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index ab443dff..0a26e546 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 5a44f258..950e0e36 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index d26a1b3e..1afcee74 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 73f0311a..2558adfa 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index a4eb7cb6..62f9d414 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 95c8d97b..2de4df02 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 1f183fc5..798f6253 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 33c286b7..8668f3be 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 6fc2dd5c..a864fcae 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 42190367..697accbd 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 1806a7cc..30317939 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index cc68acd9..0ccbbbd1 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 9aed03da..ceb5355e 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index c6c421f9..ea43623a 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index b1771722..70c0dfa9 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index e89705a7..f08daa40 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e92a4c5f..e736dc46 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 9322477d..4eac6b2e 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index f30fe61f..c7d8b4a8 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 39dd27b9..38963a37 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index a2d72b8e..161a30a4 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 4dab2431..52d281d9 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 5f4cd2f3..34ef3786 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index da41e4b8..648265c8 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index fcf1bb3a..01e9bcbd 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -46,21 +46,31 @@ export Modules_ModuleName Modules_imported, Modules_importing; export INT64 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT64 Modules_ArgVector; +export CHAR Modules_BinaryDir[1024]; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); export void Modules_Init (INT32 argc, INT64 argvadr); +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); @@ -72,32 +82,24 @@ extern void *Modules__init(void); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -typedef - INT64 (*ArgVecPtr__14)[1]; - void Modules_Init (INT32 argc, INT64 argvadr) { - ArgVecPtr__14 av = NIL; Modules_MainStackFrame = argvadr; Modules_ArgCount = __VAL(INT16, argc); - av = (ArgVecPtr__14)(ADDRESS)argvadr; - Modules_ArgVector = (*av)[0]; + __GET(argvadr, Modules_ArgVector, INT64); Modules_InitHeap(); Modules_ModulesInit(); } typedef - CHAR (*ArgPtr__9)[1024]; - -typedef - ArgPtr__9 (*ArgVec__10)[1024]; + CHAR (*argptr__15)[1024]; void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { - ArgVec__10 av = NIL; + argptr__15 arg = NIL; if (n < Modules_ArgCount) { - av = (ArgVec__10)(ADDRESS)Modules_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); + __GET(Modules_ArgVector + (INT64)__ASHL(n, 3), arg, argptr__15); + __COPY(*arg, val, val__len); } } @@ -142,22 +144,188 @@ INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) return i; } -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len) { - INT16 i, j; - __DUP(b, b__len, CHAR); + INT16 i; + __DUP(s, s__len, CHAR); i = 0; - while (a[__X(i, a__len)] != 0x00) { + while ((i < s__len && s[__X(i, s__len)] != 0x00)) { i += 1; } - j = 0; - while (b[__X(j, b__len)] != 0x00) { - a[__X(i, a__len)] = b[__X(j, b__len)]; + __DEL(s); + return i; +} + +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; i += 1; j += 1; } - a[__X(i, a__len)] = 0x00; - __DEL(b); + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + if ((j > 0 && d[__X(j - 1, d__len)] != c)) { + d[__X(j, d__len)] = c; + j += 1; + } + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; + i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len) +{ + INT16 i; + __DUP(s, s__len, CHAR); + if (c == 0x00) { + __DEL(s); + return 0; + } + i = 0; + while ((s[__X(i, s__len)] != c && s[__X(i, s__len)] != 0x00)) { + i += 1; + } + __DEL(s); + return s[__X(i, s__len)] == c; +} + +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len) +{ + __DUP(d, d__len, CHAR); + if (d[0] == 0x00) { + __DEL(d); + return 0; + } + if (Modules_IsOneOf(d[0], (CHAR*)"/\\", 3)) { + __DEL(d); + return 1; + } + if (d[__X(1, d__len)] == ':') { + __DEL(d); + return 1; + } + __DEL(d); + return 0; +} + +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + __DUP(s, s__len, CHAR); + if (Modules_IsAbsolute(s, s__len)) { + __COPY(s, d, d__len); + } else { + __COPY(Platform_CWD, d, d__len); + Modules_AppendPart('/', s, s__len, (void*)d, d__len); + } + __DEL(s); +} + +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len) +{ + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __DEL(s); + return Platform_IdentifyByName(s, s__len, &identity, Platform_FileIdentity__typ) == 0; +} + +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len) +{ + INT16 j; + __DUP(s, s__len, CHAR); + __DUP(p, p__len, CHAR); + j = 0; + while ((s[__X(*i, s__len)] != 0x00 && !Modules_IsOneOf(s[__X(*i, s__len)], p, p__len))) { + d[__X(j, d__len)] = s[__X(*i, s__len)]; + *i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (Modules_IsOneOf(s[__X(*i, s__len)], p, p__len)) { + *i += 1; + } + __DEL(s); + __DEL(p); +} + +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + CHAR part[1024]; + __DUP(s, s__len, CHAR); + i = 0; + j = 0; + while ((i < 2 && Modules_IsOneOf(s[__X(i, s__len)], (CHAR*)"/\\", 3))) { + i += 1; + d[__X(j, d__len)] = '/'; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (s[__X(i, s__len)] != 0x00) { + Modules_ExtractPart(s, s__len, &i, (CHAR*)"/\\", 3, (void*)part, 1024); + if ((part[0] != 0x00 && __STRCMP(part, ".") != 0)) { + Modules_AppendPart('/', part, 1024, (void*)d, d__len); + } + } + __DEL(s); +} + +typedef + CHAR pathstring__12[4096]; + +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +{ + pathstring__12 executable, dir, testpath, pathlist; + INT16 i, j, k; + BOOLEAN present; + if (Modules_ArgCount < 1) { + d[0] = 0x00; + return; + } + Modules_GetArg(0, (void*)testpath, 4096); + Modules_Trim(testpath, 4096, (void*)executable, 4096); + Modules_Canonify(executable, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); + i = 0; + while ((!present && pathlist[__X(i, 4096)] != 0x00)) { + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); + Modules_Trim(dir, 4096, (void*)testpath, 4096); + Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); + Modules_Canonify(testpath, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + } + } + if (present) { + k = Modules_CharCount(d, d__len); + while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k -= 1; + } + if (k == 0) { + d[__X(k, d__len)] = 0x00; + } else { + d[__X(k - 1, d__len)] = 0x00; + } + } else { + d[0] = 0x00; + } } Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) @@ -177,8 +345,8 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) Modules_res = 1; __COPY(name, Modules_importing, 20); __MOVE(" module \"", Modules_resMsg, 10); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); } __DEL(name); return m; @@ -201,10 +369,10 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam Modules_res = 2; __MOVE(" command \"", Modules_resMsg, 11); __COPY(name, Modules_importing, 20); - Modules_Append((void*)Modules_resMsg, 256, mod->name, 20); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)".", 2); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(mod->name, 20, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)".", 2, (void*)Modules_resMsg, 256); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); __DEL(name); return NIL; } @@ -371,5 +539,6 @@ export void *Modules__init(void) __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ + Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; } diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 327f139b..6cad66e4 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -42,6 +42,7 @@ import Modules_ModuleName Modules_imported, Modules_importing; import INT64 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT64 Modules_ArgVector; +import CHAR Modules_BinaryDir[1024]; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 57fde3a0..0b1509bc 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index e841f317..d6b81543 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index d3e4eaf5..620dd88e 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 06fa9996..20ac9ae8 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 0533cbfc..39f36504 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,6 +267,10 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; + Out_String((CHAR*)"Testing. Binary directory is: '", 32); + Out_String(Modules_BinaryDir, 1024); + Out_String((CHAR*)"'.", 3); + Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 6ea722dc..ec6947a6 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index a7630159..34d1f0e4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index b6d59055..da746402 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 311cbe15..2c97a4d0 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 28618fe1..0b780918 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 0dd110b2..63667f88 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index ab443dff..0a26e546 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 6a1d23a7..5520370e 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index d26a1b3e..1afcee74 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 73f0311a..2558adfa 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index a4eb7cb6..62f9d414 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 11b9bd14..e1be57b0 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index f84abacb..37d890d8 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 33c286b7..8668f3be 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 6fc2dd5c..a864fcae 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 42190367..697accbd 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 1806a7cc..30317939 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 627eb31d..9a2c7cb4 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index ac4a8157..def1eeef 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index c6c421f9..ea43623a 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index b1771722..70c0dfa9 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index e89705a7..f08daa40 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e92a4c5f..e736dc46 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 9322477d..4eac6b2e 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index f30fe61f..c7d8b4a8 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 39dd27b9..38963a37 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index c0bb12ed..8d916fc1 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index b2973453..dafb5071 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 95b746d7..752ece9b 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 86033649..0126c839 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 85b323b2..e83c0383 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -46,21 +46,31 @@ export Modules_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; +export CHAR Modules_BinaryDir[1024]; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); export void Modules_Init (INT32 argc, INT32 argvadr); +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); @@ -72,32 +82,24 @@ extern void *Modules__init(void); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -typedef - INT32 (*ArgVecPtr__14)[1]; - void Modules_Init (INT32 argc, INT32 argvadr) { - ArgVecPtr__14 av = NIL; Modules_MainStackFrame = argvadr; Modules_ArgCount = __VAL(INT16, argc); - av = (ArgVecPtr__14)(ADDRESS)argvadr; - Modules_ArgVector = (*av)[0]; + __GET(argvadr, Modules_ArgVector, INT32); Modules_InitHeap(); Modules_ModulesInit(); } typedef - CHAR (*ArgPtr__9)[1024]; - -typedef - ArgPtr__9 (*ArgVec__10)[1024]; + CHAR (*argptr__15)[1024]; void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { - ArgVec__10 av = NIL; + argptr__15 arg = NIL; if (n < Modules_ArgCount) { - av = (ArgVec__10)(ADDRESS)Modules_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); + __GET(Modules_ArgVector + __ASHL(n, 2), arg, argptr__15); + __COPY(*arg, val, val__len); } } @@ -142,22 +144,188 @@ INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) return i; } -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len) { - INT16 i, j; - __DUP(b, b__len, CHAR); + INT16 i; + __DUP(s, s__len, CHAR); i = 0; - while (a[__X(i, a__len)] != 0x00) { + while ((i < s__len && s[__X(i, s__len)] != 0x00)) { i += 1; } - j = 0; - while (b[__X(j, b__len)] != 0x00) { - a[__X(i, a__len)] = b[__X(j, b__len)]; + __DEL(s); + return i; +} + +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; i += 1; j += 1; } - a[__X(i, a__len)] = 0x00; - __DEL(b); + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + if ((j > 0 && d[__X(j - 1, d__len)] != c)) { + d[__X(j, d__len)] = c; + j += 1; + } + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; + i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len) +{ + INT16 i; + __DUP(s, s__len, CHAR); + if (c == 0x00) { + __DEL(s); + return 0; + } + i = 0; + while ((s[__X(i, s__len)] != c && s[__X(i, s__len)] != 0x00)) { + i += 1; + } + __DEL(s); + return s[__X(i, s__len)] == c; +} + +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len) +{ + __DUP(d, d__len, CHAR); + if (d[0] == 0x00) { + __DEL(d); + return 0; + } + if (Modules_IsOneOf(d[0], (CHAR*)"/\\", 3)) { + __DEL(d); + return 1; + } + if (d[__X(1, d__len)] == ':') { + __DEL(d); + return 1; + } + __DEL(d); + return 0; +} + +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + __DUP(s, s__len, CHAR); + if (Modules_IsAbsolute(s, s__len)) { + __COPY(s, d, d__len); + } else { + __COPY(Platform_CWD, d, d__len); + Modules_AppendPart('/', s, s__len, (void*)d, d__len); + } + __DEL(s); +} + +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len) +{ + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __DEL(s); + return Platform_IdentifyByName(s, s__len, &identity, Platform_FileIdentity__typ) == 0; +} + +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len) +{ + INT16 j; + __DUP(s, s__len, CHAR); + __DUP(p, p__len, CHAR); + j = 0; + while ((s[__X(*i, s__len)] != 0x00 && !Modules_IsOneOf(s[__X(*i, s__len)], p, p__len))) { + d[__X(j, d__len)] = s[__X(*i, s__len)]; + *i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (Modules_IsOneOf(s[__X(*i, s__len)], p, p__len)) { + *i += 1; + } + __DEL(s); + __DEL(p); +} + +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + CHAR part[1024]; + __DUP(s, s__len, CHAR); + i = 0; + j = 0; + while ((i < 2 && Modules_IsOneOf(s[__X(i, s__len)], (CHAR*)"/\\", 3))) { + i += 1; + d[__X(j, d__len)] = '/'; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (s[__X(i, s__len)] != 0x00) { + Modules_ExtractPart(s, s__len, &i, (CHAR*)"/\\", 3, (void*)part, 1024); + if ((part[0] != 0x00 && __STRCMP(part, ".") != 0)) { + Modules_AppendPart('/', part, 1024, (void*)d, d__len); + } + } + __DEL(s); +} + +typedef + CHAR pathstring__12[4096]; + +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +{ + pathstring__12 executable, dir, testpath, pathlist; + INT16 i, j, k; + BOOLEAN present; + if (Modules_ArgCount < 1) { + d[0] = 0x00; + return; + } + Modules_GetArg(0, (void*)testpath, 4096); + Modules_Trim(testpath, 4096, (void*)executable, 4096); + Modules_Canonify(executable, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); + i = 0; + while ((!present && pathlist[__X(i, 4096)] != 0x00)) { + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); + Modules_Trim(dir, 4096, (void*)testpath, 4096); + Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); + Modules_Canonify(testpath, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + } + } + if (present) { + k = Modules_CharCount(d, d__len); + while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k -= 1; + } + if (k == 0) { + d[__X(k, d__len)] = 0x00; + } else { + d[__X(k - 1, d__len)] = 0x00; + } + } else { + d[0] = 0x00; + } } Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) @@ -177,8 +345,8 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) Modules_res = 1; __COPY(name, Modules_importing, 20); __MOVE(" module \"", Modules_resMsg, 10); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); } __DEL(name); return m; @@ -201,10 +369,10 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam Modules_res = 2; __MOVE(" command \"", Modules_resMsg, 11); __COPY(name, Modules_importing, 20); - Modules_Append((void*)Modules_resMsg, 256, mod->name, 20); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)".", 2); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(mod->name, 20, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)".", 2, (void*)Modules_resMsg, 256); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); __DEL(name); return NIL; } @@ -371,5 +539,6 @@ export void *Modules__init(void) __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ + Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; } diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 92ebb074..e114cae2 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -42,6 +42,7 @@ import Modules_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; +import CHAR Modules_BinaryDir[1024]; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 57fde3a0..0b1509bc 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index e841f317..d6b81543 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index d3e4eaf5..620dd88e 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 06fa9996..20ac9ae8 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 9aca428d..330d8fde 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,6 +267,10 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; + Out_String((CHAR*)"Testing. Binary directory is: '", 32); + Out_String(Modules_BinaryDir, 1024); + Out_String((CHAR*)"'.", 3); + Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 6ea722dc..ec6947a6 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 24a04912..e6d8b614 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index b6d59055..da746402 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 311cbe15..2c97a4d0 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 28618fe1..0b780918 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 7284592a..719dab04 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index ab443dff..0a26e546 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 5a44f258..950e0e36 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index d26a1b3e..1afcee74 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index b5ccb18b..d1ff2558 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index a4eb7cb6..62f9d414 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 20c5ca89..4a1e30b8 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index f53d70ed..a1fad287 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 33c286b7..8668f3be 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 6fc2dd5c..a864fcae 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 42190367..697accbd 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 1806a7cc..30317939 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index cc68acd9..0ccbbbd1 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 9aed03da..ceb5355e 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index c6c421f9..ea43623a 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index b1771722..70c0dfa9 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index e89705a7..f08daa40 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e92a4c5f..e736dc46 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 9322477d..4eac6b2e 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index f30fe61f..c7d8b4a8 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 39dd27b9..38963a37 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 27810f46..da080e3e 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 8d9e7acc..969643b0 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 5f4cd2f3..34ef3786 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index da41e4b8..648265c8 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index d3b0e7ec..9d8d2534 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -46,21 +46,31 @@ export Modules_ModuleName Modules_imported, Modules_importing; export INT64 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT64 Modules_ArgVector; +export CHAR Modules_BinaryDir[1024]; export ADDRESS *Modules_ModuleDesc__typ; export ADDRESS *Modules_CmdDesc__typ; -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len); +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); export INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); export void Modules_AssertFail (INT32 code); +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); export void Modules_Halt (INT32 code); export void Modules_Init (INT32 argc, INT64 argvadr); +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); static void Modules_errstring (CHAR *s, ADDRESS s__len); @@ -72,32 +82,24 @@ extern void *Modules__init(void); #define Modules_modules() (Modules_Module)Heap_modules #define Modules_setmodules(m) Heap_modules = m -typedef - INT64 (*ArgVecPtr__14)[1]; - void Modules_Init (INT32 argc, INT64 argvadr) { - ArgVecPtr__14 av = NIL; Modules_MainStackFrame = argvadr; Modules_ArgCount = __VAL(INT16, argc); - av = (ArgVecPtr__14)(ADDRESS)argvadr; - Modules_ArgVector = (*av)[0]; + __GET(argvadr, Modules_ArgVector, INT64); Modules_InitHeap(); Modules_ModulesInit(); } typedef - CHAR (*ArgPtr__9)[1024]; - -typedef - ArgPtr__9 (*ArgVec__10)[1024]; + CHAR (*argptr__15)[1024]; void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len) { - ArgVec__10 av = NIL; + argptr__15 arg = NIL; if (n < Modules_ArgCount) { - av = (ArgVec__10)(ADDRESS)Modules_ArgVector; - __COPY(*(*av)[__X(n, 1024)], val, val__len); + __GET(Modules_ArgVector + (INT64)__ASHL(n, 3), arg, argptr__15); + __COPY(*arg, val, val__len); } } @@ -142,22 +144,188 @@ INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len) return i; } -static void Modules_Append (CHAR *a, ADDRESS a__len, CHAR *b, ADDRESS b__len) +static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len) { - INT16 i, j; - __DUP(b, b__len, CHAR); + INT16 i; + __DUP(s, s__len, CHAR); i = 0; - while (a[__X(i, a__len)] != 0x00) { + while ((i < s__len && s[__X(i, s__len)] != 0x00)) { i += 1; } - j = 0; - while (b[__X(j, b__len)] != 0x00) { - a[__X(i, a__len)] = b[__X(j, b__len)]; + __DEL(s); + return i; +} + +static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; i += 1; j += 1; } - a[__X(i, a__len)] = 0x00; - __DEL(b); + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + __DUP(s, s__len, CHAR); + i = 0; + j = Modules_CharCount(d, d__len); + if ((j > 0 && d[__X(j - 1, d__len)] != c)) { + d[__X(j, d__len)] = c; + j += 1; + } + while (s[__X(i, s__len)] != 0x00) { + d[__X(j, d__len)] = s[__X(i, s__len)]; + i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + __DEL(s); +} + +static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len) +{ + INT16 i; + __DUP(s, s__len, CHAR); + if (c == 0x00) { + __DEL(s); + return 0; + } + i = 0; + while ((s[__X(i, s__len)] != c && s[__X(i, s__len)] != 0x00)) { + i += 1; + } + __DEL(s); + return s[__X(i, s__len)] == c; +} + +static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len) +{ + __DUP(d, d__len, CHAR); + if (d[0] == 0x00) { + __DEL(d); + return 0; + } + if (Modules_IsOneOf(d[0], (CHAR*)"/\\", 3)) { + __DEL(d); + return 1; + } + if (d[__X(1, d__len)] == ':') { + __DEL(d); + return 1; + } + __DEL(d); + return 0; +} + +static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + __DUP(s, s__len, CHAR); + if (Modules_IsAbsolute(s, s__len)) { + __COPY(s, d, d__len); + } else { + __COPY(Platform_CWD, d, d__len); + Modules_AppendPart('/', s, s__len, (void*)d, d__len); + } + __DEL(s); +} + +static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len) +{ + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __DEL(s); + return Platform_IdentifyByName(s, s__len, &identity, Platform_FileIdentity__typ) == 0; +} + +static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len) +{ + INT16 j; + __DUP(s, s__len, CHAR); + __DUP(p, p__len, CHAR); + j = 0; + while ((s[__X(*i, s__len)] != 0x00 && !Modules_IsOneOf(s[__X(*i, s__len)], p, p__len))) { + d[__X(j, d__len)] = s[__X(*i, s__len)]; + *i += 1; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (Modules_IsOneOf(s[__X(*i, s__len)], p, p__len)) { + *i += 1; + } + __DEL(s); + __DEL(p); +} + +static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) +{ + INT16 i, j; + CHAR part[1024]; + __DUP(s, s__len, CHAR); + i = 0; + j = 0; + while ((i < 2 && Modules_IsOneOf(s[__X(i, s__len)], (CHAR*)"/\\", 3))) { + i += 1; + d[__X(j, d__len)] = '/'; + j += 1; + } + d[__X(j, d__len)] = 0x00; + while (s[__X(i, s__len)] != 0x00) { + Modules_ExtractPart(s, s__len, &i, (CHAR*)"/\\", 3, (void*)part, 1024); + if ((part[0] != 0x00 && __STRCMP(part, ".") != 0)) { + Modules_AppendPart('/', part, 1024, (void*)d, d__len); + } + } + __DEL(s); +} + +typedef + CHAR pathstring__12[4096]; + +static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +{ + pathstring__12 executable, dir, testpath, pathlist; + INT16 i, j, k; + BOOLEAN present; + if (Modules_ArgCount < 1) { + d[0] = 0x00; + return; + } + Modules_GetArg(0, (void*)testpath, 4096); + Modules_Trim(testpath, 4096, (void*)executable, 4096); + Modules_Canonify(executable, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); + i = 0; + while ((!present && pathlist[__X(i, 4096)] != 0x00)) { + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); + Modules_Trim(dir, 4096, (void*)testpath, 4096); + Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); + Modules_Canonify(testpath, 4096, (void*)d, d__len); + present = Modules_IsFilePresent(d, d__len); + } + } + if (present) { + k = Modules_CharCount(d, d__len); + while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k -= 1; + } + if (k == 0) { + d[__X(k, d__len)] = 0x00; + } else { + d[__X(k - 1, d__len)] = 0x00; + } + } else { + d[0] = 0x00; + } } Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) @@ -177,8 +345,8 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) Modules_res = 1; __COPY(name, Modules_importing, 20); __MOVE(" module \"", Modules_resMsg, 10); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); } __DEL(name); return m; @@ -201,10 +369,10 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam Modules_res = 2; __MOVE(" command \"", Modules_resMsg, 11); __COPY(name, Modules_importing, 20); - Modules_Append((void*)Modules_resMsg, 256, mod->name, 20); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)".", 2); - Modules_Append((void*)Modules_resMsg, 256, name, name__len); - Modules_Append((void*)Modules_resMsg, 256, (CHAR*)"\" not found", 12); + Modules_Append(mod->name, 20, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)".", 2, (void*)Modules_resMsg, 256); + Modules_Append(name, name__len, (void*)Modules_resMsg, 256); + Modules_Append((CHAR*)"\" not found", 12, (void*)Modules_resMsg, 256); __DEL(name); return NIL; } @@ -371,5 +539,6 @@ export void *Modules__init(void) __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ + Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; } diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 327f139b..6cad66e4 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h @@ -42,6 +42,7 @@ import Modules_ModuleName Modules_imported, Modules_importing; import INT64 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT64 Modules_ArgVector; +import CHAR Modules_BinaryDir[1024]; import ADDRESS *Modules_ModuleDesc__typ; import ADDRESS *Modules_CmdDesc__typ; diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 57fde3a0..0b1509bc 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index e841f317..d6b81543 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index d3e4eaf5..620dd88e 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 06fa9996..20ac9ae8 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 0533cbfc..39f36504 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,6 +267,10 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; + Out_String((CHAR*)"Testing. Binary directory is: '", 32); + Out_String(Modules_BinaryDir, 1024); + Out_String((CHAR*)"'.", 3); + Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 6ea722dc..ec6947a6 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index a7630159..34d1f0e4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index b6d59055..da746402 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 311cbe15..2c97a4d0 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 28618fe1..0b780918 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 0dd110b2..63667f88 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index ab443dff..0a26e546 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 6a1d23a7..5520370e 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index d26a1b3e..1afcee74 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index b5ccb18b..d1ff2558 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index a4eb7cb6..62f9d414 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index ca463179..be0400e8 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 03b75dc0..6926740d 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 33c286b7..8668f3be 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 6fc2dd5c..a864fcae 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 42190367..697accbd 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 1806a7cc..30317939 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 627eb31d..9a2c7cb4 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index ac4a8157..def1eeef 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index c6c421f9..ea43623a 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index b1771722..70c0dfa9 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index e89705a7..f08daa40 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("x86_64-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e92a4c5f..e736dc46 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From e6c858e6e78f0677d1862f99ad1d8d91b488b160 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 4 Dec 2016 17:56:06 +0000 Subject: [PATCH 030/241] Prototype for finding installation based on binary name. --- src/compiler/Compiler.Mod | 2 +- src/compiler/OPM.Mod | 58 +++++++++++++++++++++------ src/test/confidence/intsyntax/test.sh | 2 +- 3 files changed, 48 insertions(+), 14 deletions(-) diff --git a/src/compiler/Compiler.Mod b/src/compiler/Compiler.Mod index 0a373e7a..4e9c5c10 100644 --- a/src/compiler/Compiler.Mod +++ b/src/compiler/Compiler.Mod @@ -96,7 +96,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) OPM.Init(done, mname); (* Get next module name from command line *) IF ~done THEN RETURN END ; - OPM.InitOptions; (* Get options ofr this module *) + OPM.InitOptions; (* Get options for this module *) PropagateElementaryTypeSizes; (* Compile source to .c and .h files *) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 4145a1fc..6cf7dcfc 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -119,6 +119,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) S: INTEGER; + InstallDir*: ARRAY 1024 OF CHAR; ResourceDir*: ARRAY 1024 OF CHAR; @@ -206,16 +207,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) AddressSize := ORD(s[i+1]) - ORD('0'); Alignment := ORD(s[i+2]) - ORD('0'); INC(i, 2) END - - (* Temporary build control option - remove when makefile updated to new options. *) - | "B": IF s[i+1] # 0X THEN INC(i); IntegerSize := ORD(s[i]) - ORD('0') END; - IF s[i+1] # 0X THEN INC(i); AddressSize := ORD(s[i]) - ORD('0') END; - IF s[i+1] # 0X THEN INC(i); Alignment := ORD(s[i]) - ORD('0') END; - ASSERT((IntegerSize = 2) OR (IntegerSize = 4)); - ASSERT((AddressSize = 4) OR (AddressSize = 8)); - ASSERT((Alignment = 4) OR (Alignment = 8)); - IF IntegerSize = 2 THEN LongintSize := 4 ELSE LongintSize := 8 END; - Files.SetSearchPath("") ELSE LogWStr(" warning: option "); LogW(OptionChar); @@ -233,7 +224,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) PROCEDURE OpenPar*(): BOOLEAN; (* prepare for a sequence of translations *) VAR s: ARRAY 256 OF CHAR; BEGIN - Out.String("Testing. Binary directory is: '"); Out.String(Modules.BinaryDir); Out.String("'."); Out.Ln; IF Modules.ArgCount = 1 THEN LogWLn; LogWStr("Oberon-2 compiler v"); LogWStr(Configuration.versionLong); LogW("."); LogWLn; @@ -347,7 +337,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) IF verbose IN Options THEN VerboseListSizes END; - ResourceDir := Configuration.installdir; + ResourceDir := InstallDir; Strings.Append("/", ResourceDir); Strings.Append(Model, ResourceDir); @@ -777,6 +767,49 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END CloseFiles; + PROCEDURE IsProbablyInstallDir(s: ARRAY OF CHAR): BOOLEAN; + VAR testpath: ARRAY 1024 OF CHAR; identity: Platform.FileIdentity; + BEGIN + COPY(InstallDir, testpath); + Strings.Append("/lib/lib", testpath); + Strings.Append(Configuration.name, testpath); + Strings.Append("-O2.a", testpath); + IF Platform.IdentifyByName(testpath, identity) # 0 THEN RETURN FALSE END; + + COPY(InstallDir, testpath); + Strings.Append("/2/include/Oberon.h", testpath); + IF Platform.IdentifyByName(testpath, identity) # 0 THEN RETURN FALSE END; + + COPY(InstallDir, testpath); + Strings.Append("/2/sym/Files.sym", testpath); + IF Platform.IdentifyByName(testpath, identity) # 0 THEN RETURN FALSE END; + + RETURN TRUE; + END IsProbablyInstallDir; + + PROCEDURE FindInstallDir; + VAR i: INTEGER; + BEGIN + (* First try location of binary (with -parts appended) *) + COPY(Modules.BinaryDir, InstallDir); + Strings.Append("/", InstallDir); + Strings.Append(Configuration.name, InstallDir); + Strings.Append("-parts", InstallDir); + IF IsProbablyInstallDir(InstallDir) THEN RETURN END; + + (* Now test whether binary is in bin directory under install dir. *) + COPY(Modules.BinaryDir, InstallDir); + i := Strings.Length(InstallDir); + WHILE (i > 0) & (InstallDir[i-1] # '/') DO DEC(i) END; + IF (i > 0) & (InstallDir[i-1] = '/') THEN + InstallDir[i-1] := 0X; + IF IsProbablyInstallDir(InstallDir) THEN RETURN END + END; + + (* Give up! Use install directory from configuration. *) + COPY(Configuration.installdir, InstallDir) + END FindInstallDir; + BEGIN @@ -784,4 +817,5 @@ BEGIN MaxLReal := 1.7976931348623157D307 * 9.999999; (* LONGREAL is 8 bytes, should be 1.7976931348623157D308 *) MinReal := -MaxReal; MinLReal := -MaxLReal; + FindInstallDir; END OPM. diff --git a/src/test/confidence/intsyntax/test.sh b/src/test/confidence/intsyntax/test.sh index 932ea13d..3929cc8c 100644 --- a/src/test/confidence/intsyntax/test.sh +++ b/src/test/confidence/intsyntax/test.sh @@ -1,5 +1,5 @@ #!/bin/sh . ../testenv.sh # Generate mixed source and assembly code listing -$OBECOMP IntSyntax.mod -fm | fgrep -v "Testing. Binary directory is: '" >result +$OBECOMP IntSyntax.mod -fm >result . ../testresult.sh From c7e88f4634b77eb9e9584527026fe49496a870cb Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 5 Dec 2016 12:07:40 +0000 Subject: [PATCH 031/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 88 +++++++++++++++++++--------- bootstrap/unix-44/OPM.h | 3 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 88 +++++++++++++++++++--------- bootstrap/unix-48/OPM.h | 3 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 88 +++++++++++++++++++--------- bootstrap/unix-88/OPM.h | 3 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 88 +++++++++++++++++++--------- bootstrap/windows-48/OPM.h | 3 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 88 +++++++++++++++++++--------- bootstrap/windows-88/OPM.h | 3 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPM.Mod | 6 +- 186 files changed, 489 insertions(+), 332 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 4eac6b2e..ed567be7 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index c7d8b4a8..8f8e5783 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 38963a37..8a2a656b 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 30a596c2..0faeb4d3 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index aa5fec57..2c89f82e 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 752ece9b..e6ac7523 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 0126c839..a4b879fe 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 7eb1cd6e..3e00c05c 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index e114cae2..445d1eae 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 0b1509bc..792e292b 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index d6b81543..fb07f6b2 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 620dd88e..49ddd0ab 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 20ac9ae8..b0142b20 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 330d8fde..94394339 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -42,6 +42,7 @@ static Files_Rider OPM_oldSF, OPM_newSF; static Files_Rider OPM_R[3]; static Files_File OPM_oldSFile, OPM_newSFile, OPM_HFile, OPM_BFile, OPM_HIFile; static INT16 OPM_S; +export CHAR OPM_InstallDir[1024]; export CHAR OPM_ResourceDir[1024]; @@ -53,12 +54,14 @@ export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); +static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -228,29 +231,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) i += 2; } break; - case 'B': - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_IntegerSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_AddressSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_Alignment = (INT16)s[__X(i, s__len)] - 48; - } - __ASSERT(OPM_IntegerSize == 2 || OPM_IntegerSize == 4, 0); - __ASSERT(OPM_AddressSize == 4 || OPM_AddressSize == 8, 0); - __ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0); - if (OPM_IntegerSize == 2) { - OPM_LongintSize = 4; - } else { - OPM_LongintSize = 8; - } - Files_SetSearchPath((CHAR*)"", 1); - break; default: OPM_LogWStr((CHAR*)" warning: option ", 19); OPM_LogW('-'); @@ -267,10 +247,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - Out_String((CHAR*)"Testing. Binary directory is: '", 32); - Out_String(Modules_BinaryDir, 1024); - Out_String((CHAR*)"'.", 3); - Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); @@ -455,7 +431,7 @@ void OPM_InitOptions (void) if (__IN(18, OPM_Options, 32)) { OPM_VerboseListSizes(); } - OPM_ResourceDir[0] = 0x00; + __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); modules[0] = 0x00; @@ -1060,6 +1036,59 @@ void OPM_CloseFiles (void) Files_Set(&OPM_oldSF, Files_Rider__typ, NIL, 0); } +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) +{ + CHAR testpath[1024]; + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __DEL(s); + return 1; +} + +static void OPM_FindInstallDir (void) +{ + INT16 i; + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024); + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + i = Strings_Length(OPM_InstallDir, 1024); + while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) { + i -= 1; + } + if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) { + OPM_InstallDir[__X(i - 1, 1024)] = 0x00; + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + } + __COPY("", OPM_InstallDir, 1024); +} + static void EnumPtrs(void (*P)(void*)) { __ENUMR(&OPM_inR, Texts_Reader__typ, 48, 1, P); @@ -1100,5 +1129,6 @@ export void *OPM__init(void) OPM_MaxLReal = 1.79769296342094e+308; OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; + OPM_FindInstallDir(); __ENDMOD; } diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index ec6947a6..4d6101bb 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -17,6 +17,7 @@ import INT32 OPM_curpos, OPM_errpos, OPM_breakpc; import INT16 OPM_currFile, OPM_level, OPM_pc, OPM_entno; import CHAR OPM_modName[32]; import CHAR OPM_objname[64]; +import CHAR OPM_InstallDir[1024]; import CHAR OPM_ResourceDir[1024]; diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index e6d8b614..561e1feb 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index da746402..a88a16ee 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 2c97a4d0..0918b14d 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 0b780918..08db3b29 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index c12b6ffd..941329b4 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 0a26e546..e3f23baf 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 950e0e36..7d93389c 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 1afcee74..c1eb098f 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 2558adfa..ab37e758 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 62f9d414..1cac588c 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 2de4df02..89286d2c 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 798f6253..69667994 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 8668f3be..fde141c5 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index a864fcae..1576c7ee 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 697accbd..c4d2419d 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 30317939..471c85c8 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 28b11c5a..f4d8eef3 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index a9c20822..950703aa 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index ea43623a..b446063e 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 70c0dfa9..0fd1e5d3 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index f08daa40..858c9514 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e736dc46..724db7ae 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 4eac6b2e..ed567be7 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index c7d8b4a8..8f8e5783 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 38963a37..8a2a656b 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 30a596c2..0faeb4d3 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index aa5fec57..2c89f82e 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 752ece9b..e6ac7523 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 0126c839..a4b879fe 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 7eb1cd6e..3e00c05c 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index e114cae2..445d1eae 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 0b1509bc..792e292b 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index d6b81543..fb07f6b2 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 620dd88e..49ddd0ab 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 20ac9ae8..b0142b20 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 330d8fde..94394339 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -42,6 +42,7 @@ static Files_Rider OPM_oldSF, OPM_newSF; static Files_Rider OPM_R[3]; static Files_File OPM_oldSFile, OPM_newSFile, OPM_HFile, OPM_BFile, OPM_HIFile; static INT16 OPM_S; +export CHAR OPM_InstallDir[1024]; export CHAR OPM_ResourceDir[1024]; @@ -53,12 +54,14 @@ export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); +static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -228,29 +231,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) i += 2; } break; - case 'B': - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_IntegerSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_AddressSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_Alignment = (INT16)s[__X(i, s__len)] - 48; - } - __ASSERT(OPM_IntegerSize == 2 || OPM_IntegerSize == 4, 0); - __ASSERT(OPM_AddressSize == 4 || OPM_AddressSize == 8, 0); - __ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0); - if (OPM_IntegerSize == 2) { - OPM_LongintSize = 4; - } else { - OPM_LongintSize = 8; - } - Files_SetSearchPath((CHAR*)"", 1); - break; default: OPM_LogWStr((CHAR*)" warning: option ", 19); OPM_LogW('-'); @@ -267,10 +247,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - Out_String((CHAR*)"Testing. Binary directory is: '", 32); - Out_String(Modules_BinaryDir, 1024); - Out_String((CHAR*)"'.", 3); - Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); @@ -455,7 +431,7 @@ void OPM_InitOptions (void) if (__IN(18, OPM_Options, 32)) { OPM_VerboseListSizes(); } - OPM_ResourceDir[0] = 0x00; + __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); modules[0] = 0x00; @@ -1060,6 +1036,59 @@ void OPM_CloseFiles (void) Files_Set(&OPM_oldSF, Files_Rider__typ, NIL, 0); } +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) +{ + CHAR testpath[1024]; + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __DEL(s); + return 1; +} + +static void OPM_FindInstallDir (void) +{ + INT16 i; + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024); + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + i = Strings_Length(OPM_InstallDir, 1024); + while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) { + i -= 1; + } + if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) { + OPM_InstallDir[__X(i - 1, 1024)] = 0x00; + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + } + __COPY("", OPM_InstallDir, 1024); +} + static void EnumPtrs(void (*P)(void*)) { __ENUMR(&OPM_inR, Texts_Reader__typ, 48, 1, P); @@ -1100,5 +1129,6 @@ export void *OPM__init(void) OPM_MaxLReal = 1.79769296342094e+308; OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; + OPM_FindInstallDir(); __ENDMOD; } diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index ec6947a6..4d6101bb 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -17,6 +17,7 @@ import INT32 OPM_curpos, OPM_errpos, OPM_breakpc; import INT16 OPM_currFile, OPM_level, OPM_pc, OPM_entno; import CHAR OPM_modName[32]; import CHAR OPM_objname[64]; +import CHAR OPM_InstallDir[1024]; import CHAR OPM_ResourceDir[1024]; diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index e6d8b614..561e1feb 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index da746402..a88a16ee 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 2c97a4d0..0918b14d 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 0b780918..08db3b29 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 719dab04..78acd9c1 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 0a26e546..e3f23baf 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 950e0e36..7d93389c 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 1afcee74..c1eb098f 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 2558adfa..ab37e758 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 62f9d414..1cac588c 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 2de4df02..89286d2c 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 798f6253..69667994 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 8668f3be..fde141c5 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index a864fcae..1576c7ee 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 697accbd..c4d2419d 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 30317939..471c85c8 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 0ccbbbd1..762fce4d 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index ceb5355e..b900b772 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index ea43623a..b446063e 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 70c0dfa9..0fd1e5d3 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index f08daa40..858c9514 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e736dc46..724db7ae 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 4eac6b2e..ed567be7 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index c7d8b4a8..8f8e5783 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 38963a37..8a2a656b 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 161a30a4..f7d08102 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 52d281d9..8a41c280 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 34ef3786..3566f3c0 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 648265c8..99c63bea 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 01e9bcbd..6dfb1d86 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 6cad66e4..bbb36879 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 0b1509bc..792e292b 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index d6b81543..fb07f6b2 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 620dd88e..49ddd0ab 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 20ac9ae8..b0142b20 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 39f36504..7eb94291 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -42,6 +42,7 @@ static Files_Rider OPM_oldSF, OPM_newSF; static Files_Rider OPM_R[3]; static Files_File OPM_oldSFile, OPM_newSFile, OPM_HFile, OPM_BFile, OPM_HIFile; static INT16 OPM_S; +export CHAR OPM_InstallDir[1024]; export CHAR OPM_ResourceDir[1024]; @@ -53,12 +54,14 @@ export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); +static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -228,29 +231,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) i += 2; } break; - case 'B': - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_IntegerSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_AddressSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_Alignment = (INT16)s[__X(i, s__len)] - 48; - } - __ASSERT(OPM_IntegerSize == 2 || OPM_IntegerSize == 4, 0); - __ASSERT(OPM_AddressSize == 4 || OPM_AddressSize == 8, 0); - __ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0); - if (OPM_IntegerSize == 2) { - OPM_LongintSize = 4; - } else { - OPM_LongintSize = 8; - } - Files_SetSearchPath((CHAR*)"", 1); - break; default: OPM_LogWStr((CHAR*)" warning: option ", 19); OPM_LogW('-'); @@ -267,10 +247,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - Out_String((CHAR*)"Testing. Binary directory is: '", 32); - Out_String(Modules_BinaryDir, 1024); - Out_String((CHAR*)"'.", 3); - Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); @@ -455,7 +431,7 @@ void OPM_InitOptions (void) if (__IN(18, OPM_Options, 32)) { OPM_VerboseListSizes(); } - OPM_ResourceDir[0] = 0x00; + __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); modules[0] = 0x00; @@ -1060,6 +1036,59 @@ void OPM_CloseFiles (void) Files_Set(&OPM_oldSF, Files_Rider__typ, NIL, 0); } +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) +{ + CHAR testpath[1024]; + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __DEL(s); + return 1; +} + +static void OPM_FindInstallDir (void) +{ + INT16 i; + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024); + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + i = Strings_Length(OPM_InstallDir, 1024); + while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) { + i -= 1; + } + if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) { + OPM_InstallDir[__X(i - 1, 1024)] = 0x00; + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + } + __COPY("", OPM_InstallDir, 1024); +} + static void EnumPtrs(void (*P)(void*)) { __ENUMR(&OPM_inR, Texts_Reader__typ, 72, 1, P); @@ -1100,5 +1129,6 @@ export void *OPM__init(void) OPM_MaxLReal = 1.79769296342094e+308; OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; + OPM_FindInstallDir(); __ENDMOD; } diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index ec6947a6..4d6101bb 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -17,6 +17,7 @@ import INT32 OPM_curpos, OPM_errpos, OPM_breakpc; import INT16 OPM_currFile, OPM_level, OPM_pc, OPM_entno; import CHAR OPM_modName[32]; import CHAR OPM_objname[64]; +import CHAR OPM_InstallDir[1024]; import CHAR OPM_ResourceDir[1024]; diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 34d1f0e4..e3ffa285 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index da746402..a88a16ee 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 2c97a4d0..0918b14d 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 0b780918..08db3b29 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 63667f88..eb19830e 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 0a26e546..e3f23baf 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 5520370e..c8d92d32 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 1afcee74..c1eb098f 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 2558adfa..ab37e758 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 62f9d414..1cac588c 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index e1be57b0..f04609c5 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 37d890d8..a57b5dc4 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 8668f3be..fde141c5 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index a864fcae..1576c7ee 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 697accbd..c4d2419d 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 30317939..471c85c8 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 9a2c7cb4..bad01c09 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index def1eeef..fbc12082 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index ea43623a..b446063e 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 70c0dfa9..0fd1e5d3 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index f08daa40..858c9514 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e736dc46..724db7ae 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 4eac6b2e..ed567be7 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index c7d8b4a8..8f8e5783 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 38963a37..8a2a656b 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 8d916fc1..d7434dbd 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dafb5071..36208e21 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 752ece9b..e6ac7523 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 0126c839..a4b879fe 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index e83c0383..648dde85 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index e114cae2..445d1eae 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 0b1509bc..792e292b 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index d6b81543..fb07f6b2 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 620dd88e..49ddd0ab 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 20ac9ae8..b0142b20 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 330d8fde..94394339 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -42,6 +42,7 @@ static Files_Rider OPM_oldSF, OPM_newSF; static Files_Rider OPM_R[3]; static Files_File OPM_oldSFile, OPM_newSFile, OPM_HFile, OPM_BFile, OPM_HIFile; static INT16 OPM_S; +export CHAR OPM_InstallDir[1024]; export CHAR OPM_ResourceDir[1024]; @@ -53,12 +54,14 @@ export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); +static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -228,29 +231,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) i += 2; } break; - case 'B': - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_IntegerSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_AddressSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_Alignment = (INT16)s[__X(i, s__len)] - 48; - } - __ASSERT(OPM_IntegerSize == 2 || OPM_IntegerSize == 4, 0); - __ASSERT(OPM_AddressSize == 4 || OPM_AddressSize == 8, 0); - __ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0); - if (OPM_IntegerSize == 2) { - OPM_LongintSize = 4; - } else { - OPM_LongintSize = 8; - } - Files_SetSearchPath((CHAR*)"", 1); - break; default: OPM_LogWStr((CHAR*)" warning: option ", 19); OPM_LogW('-'); @@ -267,10 +247,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - Out_String((CHAR*)"Testing. Binary directory is: '", 32); - Out_String(Modules_BinaryDir, 1024); - Out_String((CHAR*)"'.", 3); - Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); @@ -455,7 +431,7 @@ void OPM_InitOptions (void) if (__IN(18, OPM_Options, 32)) { OPM_VerboseListSizes(); } - OPM_ResourceDir[0] = 0x00; + __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); modules[0] = 0x00; @@ -1060,6 +1036,59 @@ void OPM_CloseFiles (void) Files_Set(&OPM_oldSF, Files_Rider__typ, NIL, 0); } +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) +{ + CHAR testpath[1024]; + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __DEL(s); + return 1; +} + +static void OPM_FindInstallDir (void) +{ + INT16 i; + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024); + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + i = Strings_Length(OPM_InstallDir, 1024); + while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) { + i -= 1; + } + if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) { + OPM_InstallDir[__X(i - 1, 1024)] = 0x00; + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + } + __COPY("", OPM_InstallDir, 1024); +} + static void EnumPtrs(void (*P)(void*)) { __ENUMR(&OPM_inR, Texts_Reader__typ, 48, 1, P); @@ -1100,5 +1129,6 @@ export void *OPM__init(void) OPM_MaxLReal = 1.79769296342094e+308; OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; + OPM_FindInstallDir(); __ENDMOD; } diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index ec6947a6..4d6101bb 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -17,6 +17,7 @@ import INT32 OPM_curpos, OPM_errpos, OPM_breakpc; import INT16 OPM_currFile, OPM_level, OPM_pc, OPM_entno; import CHAR OPM_modName[32]; import CHAR OPM_objname[64]; +import CHAR OPM_InstallDir[1024]; import CHAR OPM_ResourceDir[1024]; diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index e6d8b614..561e1feb 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index da746402..a88a16ee 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 2c97a4d0..0918b14d 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 0b780918..08db3b29 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 719dab04..78acd9c1 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 0a26e546..e3f23baf 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 950e0e36..7d93389c 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 1afcee74..c1eb098f 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index d1ff2558..8c0292d1 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 62f9d414..1cac588c 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 4a1e30b8..6604baf0 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index a1fad287..1bdda6f9 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 8668f3be..fde141c5 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index a864fcae..1576c7ee 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 697accbd..c4d2419d 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 30317939..471c85c8 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 0ccbbbd1..762fce4d 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index ceb5355e..b900b772 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index ea43623a..b446063e 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 70c0dfa9..0fd1e5d3 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index f08daa40..858c9514 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e736dc46..724db7ae 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 4eac6b2e..ed567be7 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index c7d8b4a8..8f8e5783 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 38963a37..8a2a656b 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index da080e3e..b104d085 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 969643b0..95736721 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 34ef3786..3566f3c0 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 648265c8..99c63bea 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 9d8d2534..ce1297f7 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 6cad66e4..bbb36879 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 0b1509bc..792e292b 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index d6b81543..fb07f6b2 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 620dd88e..49ddd0ab 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 20ac9ae8..b0142b20 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 39f36504..7eb94291 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -42,6 +42,7 @@ static Files_Rider OPM_oldSF, OPM_newSF; static Files_Rider OPM_R[3]; static Files_File OPM_oldSFile, OPM_newSFile, OPM_HFile, OPM_BFile, OPM_HIFile; static INT16 OPM_S; +export CHAR OPM_InstallDir[1024]; export CHAR OPM_ResourceDir[1024]; @@ -53,12 +54,14 @@ export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); export void OPM_FPrintSet (INT32 *fp, UINT64 val); +static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -228,29 +231,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) i += 2; } break; - case 'B': - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_IntegerSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_AddressSize = (INT16)s[__X(i, s__len)] - 48; - } - if (s[__X(i + 1, s__len)] != 0x00) { - i += 1; - OPM_Alignment = (INT16)s[__X(i, s__len)] - 48; - } - __ASSERT(OPM_IntegerSize == 2 || OPM_IntegerSize == 4, 0); - __ASSERT(OPM_AddressSize == 4 || OPM_AddressSize == 8, 0); - __ASSERT(OPM_Alignment == 4 || OPM_Alignment == 8, 0); - if (OPM_IntegerSize == 2) { - OPM_LongintSize = 4; - } else { - OPM_LongintSize = 8; - } - Files_SetSearchPath((CHAR*)"", 1); - break; default: OPM_LogWStr((CHAR*)" warning: option ", 19); OPM_LogW('-'); @@ -267,10 +247,6 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len) BOOLEAN OPM_OpenPar (void) { CHAR s[256]; - Out_String((CHAR*)"Testing. Binary directory is: '", 32); - Out_String(Modules_BinaryDir, 1024); - Out_String((CHAR*)"'.", 3); - Out_Ln(); if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); @@ -455,7 +431,7 @@ void OPM_InitOptions (void) if (__IN(18, OPM_Options, 32)) { OPM_VerboseListSizes(); } - OPM_ResourceDir[0] = 0x00; + __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); modules[0] = 0x00; @@ -1060,6 +1036,59 @@ void OPM_CloseFiles (void) Files_Set(&OPM_oldSF, Files_Rider__typ, NIL, 0); } +static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) +{ + CHAR testpath[1024]; + Platform_FileIdentity identity; + __DUP(s, s__len, CHAR); + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __COPY(OPM_InstallDir, testpath, 1024); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); + if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __DEL(s); + return 0; + } + __DEL(s); + return 1; +} + +static void OPM_FindInstallDir (void) +{ + INT16 i; + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024); + Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024); + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + __COPY(Modules_BinaryDir, OPM_InstallDir, 1024); + i = Strings_Length(OPM_InstallDir, 1024); + while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) { + i -= 1; + } + if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) { + OPM_InstallDir[__X(i - 1, 1024)] = 0x00; + if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) { + return; + } + } + __COPY("", OPM_InstallDir, 1024); +} + static void EnumPtrs(void (*P)(void*)) { __ENUMR(&OPM_inR, Texts_Reader__typ, 72, 1, P); @@ -1100,5 +1129,6 @@ export void *OPM__init(void) OPM_MaxLReal = 1.79769296342094e+308; OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; + OPM_FindInstallDir(); __ENDMOD; } diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index ec6947a6..4d6101bb 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -17,6 +17,7 @@ import INT32 OPM_curpos, OPM_errpos, OPM_breakpc; import INT16 OPM_currFile, OPM_level, OPM_pc, OPM_entno; import CHAR OPM_modName[32]; import CHAR OPM_objname[64]; +import CHAR OPM_InstallDir[1024]; import CHAR OPM_ResourceDir[1024]; diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 34d1f0e4..e3ffa285 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index da746402..a88a16ee 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 2c97a4d0..0918b14d 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 0b780918..08db3b29 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 63667f88..eb19830e 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 0a26e546..e3f23baf 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 5520370e..c8d92d32 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 1afcee74..c1eb098f 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d1ff2558..8c0292d1 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 62f9d414..1cac588c 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index be0400e8..b725c6a2 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 6926740d..ef931d99 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 8668f3be..fde141c5 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index a864fcae..1576c7ee 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 697accbd..c4d2419d 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 30317939..471c85c8 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 9a2c7cb4..bad01c09 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index def1eeef..fbc12082 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index ea43623a..b446063e 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 70c0dfa9..0fd1e5d3 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index f08daa40..858c9514 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e736dc46..724db7ae 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/03]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 6cf7dcfc..2abce2c9 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -767,6 +767,8 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END CloseFiles; +(* === Installation directory discovery === *) + PROCEDURE IsProbablyInstallDir(s: ARRAY OF CHAR): BOOLEAN; VAR testpath: ARRAY 1024 OF CHAR; identity: Platform.FileIdentity; BEGIN @@ -790,11 +792,11 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) PROCEDURE FindInstallDir; VAR i: INTEGER; BEGIN - (* First try location of binary (with -parts appended) *) + (* First try location of binary (with .d appended) *) COPY(Modules.BinaryDir, InstallDir); Strings.Append("/", InstallDir); Strings.Append(Configuration.name, InstallDir); - Strings.Append("-parts", InstallDir); + Strings.Append(".d", InstallDir); IF IsProbablyInstallDir(InstallDir) THEN RETURN END; (* Now test whether binary is in bin directory under install dir. *) From cf2da3000fbca8df3603b2836e10fe9131011d30 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 5 Dec 2016 17:00:55 +0000 Subject: [PATCH 032/241] Record curpos on every inR.Read. Add more debug to catch OpenBSD read failure. --- bootstrap/unix-44/OPM.c | 10 ++++++---- bootstrap/unix-48/OPM.c | 10 ++++++---- bootstrap/unix-88/OPM.c | 10 ++++++---- bootstrap/windows-48/OPM.c | 10 ++++++---- bootstrap/windows-88/OPM.c | 10 ++++++---- src/compiler/OPM.Mod | 15 ++++++++++----- src/runtime/Texts.Mod | 2 +- src/test/confidence/intsyntax/expected | 12 ++++++------ 8 files changed, 47 insertions(+), 32 deletions(-) diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 94394339..04afccfa 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -484,11 +484,13 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) void OPM_Get (CHAR *ch) { + OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if (*ch == 0x0d) { - OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); - } else { - OPM_curpos += 1; + if ((OPM_curpos == 0 && OPM_inR.eot)) { + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); + OPM_LogWNum((INT16)*ch, 1); + OPM_LogW('.'); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 94394339..04afccfa 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -484,11 +484,13 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) void OPM_Get (CHAR *ch) { + OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if (*ch == 0x0d) { - OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); - } else { - OPM_curpos += 1; + if ((OPM_curpos == 0 && OPM_inR.eot)) { + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); + OPM_LogWNum((INT16)*ch, 1); + OPM_LogW('.'); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 7eb94291..a7014a53 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -484,11 +484,13 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) void OPM_Get (CHAR *ch) { + OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if (*ch == 0x0d) { - OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); - } else { - OPM_curpos += 1; + if ((OPM_curpos == 0 && OPM_inR.eot)) { + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); + OPM_LogWNum((INT16)*ch, 1); + OPM_LogW('.'); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 94394339..04afccfa 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -484,11 +484,13 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) void OPM_Get (CHAR *ch) { + OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if (*ch == 0x0d) { - OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); - } else { - OPM_curpos += 1; + if ((OPM_curpos == 0 && OPM_inR.eot)) { + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); + OPM_LogWNum((INT16)*ch, 1); + OPM_LogW('.'); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 7eb94291..a7014a53 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -484,11 +484,13 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) void OPM_Get (CHAR *ch) { + OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if (*ch == 0x0d) { - OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); - } else { - OPM_curpos += 1; + if ((OPM_curpos == 0 && OPM_inR.eot)) { + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); + OPM_LogWNum((INT16)*ch, 1); + OPM_LogW('.'); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 2abce2c9..de100717 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -387,12 +387,17 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) PROCEDURE Get*(VAR ch: CHAR); (* read next character from source text, 0X if eof *) BEGIN + curpos := Texts.Pos(inR); Texts.Read(inR, ch); - IF ch = 0DX THEN - curpos := Texts.Pos(inR); (* supports CR LF mapping *) - ELSE - INC(curpos) - END ; + + (* OpenBSD intermittent file read error debugging. *) + IF (curpos = 0) & inR.eot THEN + LogWLn; LogWStr("DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = "); + LogWNum(ORD(ch),1); LogW("."); + END; + (* TODO, remove curpos var, and provide fn returning Texts.Pos(inR) - 1. *) + (* Or, better still, record symbol position in OPS. *) + IF (ch < 09X) & ~inR.eot THEN ch := " " END END Get; diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 305b225d..f20750d9 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -341,7 +341,7 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** IF (ch = 0AX) & u(Piece).ascii THEN ch := CR (* << LF to CR *) ELSIF (ch = CR) & u(Piece).ascii THEN (* << CR LF to CR *) pos := Files.Pos(R.rider); Files.Read(R.rider, nextch); - IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END + IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END END ELSIF u IS Elem THEN ch := ElemChar; R.elem := u(Elem) ELSE ch := 0X; R.elem := NIL; R.eot := TRUE diff --git a/src/test/confidence/intsyntax/expected b/src/test/confidence/intsyntax/expected index 1abe43f9..94e29760 100644 --- a/src/test/confidence/intsyntax/expected +++ b/src/test/confidence/intsyntax/expected @@ -1,15 +1,15 @@ IntSyntax.mod compiling IntSyntax. 14: i := l; (* Bad, INTEGER shorter than LONGINT *) - ^ - pos 341 err 113 incompatible assignment + ^ + pos 340 err 113 incompatible assignment 15: s := l; (* Bad, SHORTINT shorter than LONGINT *) - ^ - pos 393 err 113 incompatible assignment + ^ + pos 392 err 113 incompatible assignment 16: i := l; (* Bad, SHORTINT shorter than INTEGER *) - ^ - pos 446 err 113 incompatible assignment + ^ + pos 445 err 113 incompatible assignment Module compilation failed. From de049dc80c4b2365cf5045509207922c90ffdd75 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 5 Dec 2016 17:23:34 +0000 Subject: [PATCH 033/241] Add OPM_InstallDir to ignored differences between bootstrap and installable builds. --- src/tools/make/ignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/make/ignore b/src/tools/make/ignore index 42554f00..8985991b 100644 --- a/src/tools/make/ignore +++ b/src/tools/make/ignore @@ -1,6 +1,7 @@ ^/\* voc + Configuration_ OPM_ResourceDir +OPM_InstallDir __MOVE.* cmd, OPM_(IntSize|PointerSize|Alignment) = Strings_Append.+void\*\)(cmd|OPM_OBERON|extTools_comp) From 711283cba5fece0fec3cef164b540e76307925f6 Mon Sep 17 00:00:00 2001 From: norayr Date: Mon, 5 Dec 2016 22:06:10 +0400 Subject: [PATCH 034/241] added type aliasing check and warning. -- noch --- src/compiler/OPP.Mod | 6 ++++++ src/runtime/Errors.Txt | 1 + 2 files changed, 7 insertions(+) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 826a60e6..06a271b8 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -922,6 +922,12 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPT.Insert(OPS.name, obj); obj^.mode := OPT.Typ; obj^.typ := OPT.undftyp; CheckMark(obj^.vis); IF sym = OPS.eql THEN + IF (obj^.name = "INTEGER") OR (obj^.name = "SHORTINT") OR + (obj^.name = "LONGINT") OR (obj^.name = "HUGEINT") OR + (obj^.name = "LONGREAL") OR (obj^.name = "REAL") OR + (obj^.name = "CHAR") THEN + OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) + END; OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) ELSIF (sym = OPS.becomes) OR (sym = OPS.colon) THEN err(OPS.eql); OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) diff --git a/src/runtime/Errors.Txt b/src/runtime/Errors.Txt index 5e608945..c9f98339 100644 --- a/src/runtime/Errors.Txt +++ b/src/runtime/Errors.Txt @@ -177,6 +177,7 @@ Compiler Warnings 307 no ELSE symbol after CASE statement sequence may lead to trap 308 SYSTEM.VAL result includes memory past end of source variable; use SYSTEM.GET 309 you should name this parameter type, or else no actual parameter will match +310 aliasing of predefined type Run-time Error Messages -1 assertion failed, cf. SYSTEM_assert From 836e26dd4722d57a9daa8c3c79010b3d2437c8d5 Mon Sep 17 00:00:00 2001 From: norayr Date: Mon, 5 Dec 2016 22:12:10 +0400 Subject: [PATCH 035/241] added TRUE, FALSE, SET to the check. -- noch --- src/compiler/OPP.Mod | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 06a271b8..33d70a76 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -922,10 +922,11 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPT.Insert(OPS.name, obj); obj^.mode := OPT.Typ; obj^.typ := OPT.undftyp; CheckMark(obj^.vis); IF sym = OPS.eql THEN - IF (obj^.name = "INTEGER") OR (obj^.name = "SHORTINT") OR - (obj^.name = "LONGINT") OR (obj^.name = "HUGEINT") OR - (obj^.name = "LONGREAL") OR (obj^.name = "REAL") OR - (obj^.name = "CHAR") THEN + IF (obj^.name = "INTEGER") OR (obj^.name = "SHORTINT") OR + (obj^.name = "LONGINT") OR (obj^.name = "HUGEINT") OR + (obj^.name = "LONGREAL") OR (obj^.name = "REAL") OR + (obj^.name = "CHAR") OR (obj^.name = "SET") OR + (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) END; OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) From 22c5977fe35f41a38379cc727edfae925ec8b873 Mon Sep 17 00:00:00 2001 From: norayr Date: Mon, 5 Dec 2016 22:13:29 +0400 Subject: [PATCH 036/241] updated bootstrap sources. -- noch --- bootstrap/unix-44/OPP.c | 3 +++ bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-48/OPP.c | 3 +++ bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-88/OPP.c | 3 +++ bootstrap/unix-88/extTools.c | 2 +- bootstrap/windows-48/OPP.c | 3 +++ bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-88/OPP.c | 3 +++ bootstrap/windows-88/extTools.c | 2 +- 10 files changed, 20 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 561e1feb..2357ee63 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1665,6 +1665,9 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { + if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + OPM_Mark(-310, OPM_curpos); + } OPS_Get(&OPP_sym); OPP_TypeDecl(&obj->typ, &obj->typ); } else if (OPP_sym == 34 || OPP_sym == 20) { diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 858c9514..1ed38a02 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 561e1feb..2357ee63 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1665,6 +1665,9 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { + if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + OPM_Mark(-310, OPM_curpos); + } OPS_Get(&OPP_sym); OPP_TypeDecl(&obj->typ, &obj->typ); } else if (OPP_sym == 34 || OPP_sym == 20) { diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 858c9514..1ed38a02 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index e3ffa285..5145e858 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1665,6 +1665,9 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { + if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + OPM_Mark(-310, OPM_curpos); + } OPS_Get(&OPP_sym); OPP_TypeDecl(&obj->typ, &obj->typ); } else if (OPP_sym == 34 || OPP_sym == 20) { diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 858c9514..1ed38a02 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 561e1feb..2357ee63 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1665,6 +1665,9 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { + if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + OPM_Mark(-310, OPM_curpos); + } OPS_Get(&OPP_sym); OPP_TypeDecl(&obj->typ, &obj->typ); } else if (OPP_sym == 34 || OPP_sym == 20) { diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 858c9514..1ed38a02 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index e3ffa285..5145e858 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1665,6 +1665,9 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { + if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + OPM_Mark(-310, OPM_curpos); + } OPS_Get(&OPP_sym); OPP_TypeDecl(&obj->typ, &obj->typ); } else if (OPP_sym == 34 || OPP_sym == 20) { diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 858c9514..1ed38a02 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); From 93eea47e54b18bfea16dbd0cc356e3760eb34b20 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 11:32:21 +0400 Subject: [PATCH 037/241] improved warning message. -- noch --- src/runtime/Errors.Txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Errors.Txt b/src/runtime/Errors.Txt index c9f98339..29ed7063 100644 --- a/src/runtime/Errors.Txt +++ b/src/runtime/Errors.Txt @@ -177,7 +177,7 @@ Compiler Warnings 307 no ELSE symbol after CASE statement sequence may lead to trap 308 SYSTEM.VAL result includes memory past end of source variable; use SYSTEM.GET 309 you should name this parameter type, or else no actual parameter will match -310 aliasing of predefined type +310 redefining standard predefined type Run-time Error Messages -1 assertion failed, cf. SYSTEM_assert From 6cd7727802bb6683953f64e1aa664172f4889fc5 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 13:11:44 +0400 Subject: [PATCH 038/241] removed tests. -- noch --- src/compiler/OPP.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 33d70a76..29c4fb2e 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -929,7 +929,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) END; - OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) + OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) ELSIF (sym = OPS.becomes) OR (sym = OPS.colon) THEN err(OPS.eql); OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) ELSE err(OPS.eql) From d009eb2e3447ca7dfd9d549304965cb5bdea5041 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 13:13:02 +0400 Subject: [PATCH 039/241] updated bootstrap c sources. -- noch --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 190 insertions(+), 190 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index ed567be7..97e4d8e3 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 8f8e5783..7fa2ad3f 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 8a2a656b..b477d97a 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 0faeb4d3..a177f3e6 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 2c89f82e..b69b0824 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index e6ac7523..0546fa61 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index a4b879fe..3d30d5d4 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 3e00c05c..c9741737 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 445d1eae..b9e63ee7 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 792e292b..99fd666d 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index fb07f6b2..3f6ee165 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 49ddd0ab..5e67ae16 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index b0142b20..41739672 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 04afccfa..a1587370 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 4d6101bb..7664cc0c 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 2357ee63..c4ce70c5 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index a88a16ee..ef56b929 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 0918b14d..52f0f328 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 08db3b29..54edc605 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 941329b4..23062347 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index e3f23baf..68edb67f 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 7d93389c..b266cb63 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index c1eb098f..00052c0b 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index ab37e758..a0ae3106 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 1cac588c..d2a230b3 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 89286d2c..e282a468 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 69667994..a3e32518 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index fde141c5..bfe15fff 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 1576c7ee..ff6ad391 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index c4d2419d..7f5a8fac 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 471c85c8..2a1ebd5f 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f4d8eef3..dd7eb163 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 950703aa..91fa31ed 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index b446063e..0d9d3163 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 0fd1e5d3..c552d82d 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 1ed38a02..38cd03d5 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 724db7ae..783d31fb 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index ed567be7..97e4d8e3 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 8f8e5783..7fa2ad3f 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 8a2a656b..b477d97a 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 0faeb4d3..a177f3e6 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 2c89f82e..b69b0824 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index e6ac7523..0546fa61 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index a4b879fe..3d30d5d4 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 3e00c05c..c9741737 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 445d1eae..b9e63ee7 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 792e292b..99fd666d 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index fb07f6b2..3f6ee165 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 49ddd0ab..5e67ae16 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index b0142b20..41739672 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 04afccfa..a1587370 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 4d6101bb..7664cc0c 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 2357ee63..c4ce70c5 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index a88a16ee..ef56b929 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 0918b14d..52f0f328 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 08db3b29..54edc605 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 78acd9c1..4f83d6ee 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index e3f23baf..68edb67f 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 7d93389c..b266cb63 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index c1eb098f..00052c0b 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index ab37e758..a0ae3106 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 1cac588c..d2a230b3 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 89286d2c..e282a468 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 69667994..a3e32518 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index fde141c5..bfe15fff 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 1576c7ee..ff6ad391 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index c4d2419d..7f5a8fac 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 471c85c8..2a1ebd5f 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 762fce4d..392a5579 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index b900b772..dff59e1e 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index b446063e..0d9d3163 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 0fd1e5d3..c552d82d 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 1ed38a02..38cd03d5 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 724db7ae..783d31fb 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index ed567be7..97e4d8e3 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 8f8e5783..7fa2ad3f 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 8a2a656b..b477d97a 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index f7d08102..819c6450 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 8a41c280..9332fd1c 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 3566f3c0..dbfe923d 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 99c63bea..b6d1c177 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 6dfb1d86..2ef36628 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index bbb36879..fbc2c47e 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 792e292b..99fd666d 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index fb07f6b2..3f6ee165 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 49ddd0ab..5e67ae16 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index b0142b20..41739672 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index a7014a53..f37a4f3e 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 4d6101bb..7664cc0c 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 5145e858..fbbb2c4a 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index a88a16ee..ef56b929 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 0918b14d..52f0f328 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 08db3b29..54edc605 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index eb19830e..e93361f7 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index e3f23baf..68edb67f 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index c8d92d32..548e85cf 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index c1eb098f..00052c0b 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index ab37e758..a0ae3106 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 1cac588c..d2a230b3 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index f04609c5..99d59a98 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index a57b5dc4..f1aa8a9d 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index fde141c5..bfe15fff 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 1576c7ee..ff6ad391 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index c4d2419d..7f5a8fac 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 471c85c8..2a1ebd5f 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index bad01c09..396b6e14 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index fbc12082..48899032 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index b446063e..0d9d3163 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 0fd1e5d3..c552d82d 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 1ed38a02..38cd03d5 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 724db7ae..783d31fb 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index ed567be7..97e4d8e3 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 8f8e5783..7fa2ad3f 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 8a2a656b..b477d97a 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index d7434dbd..d7b42e0e 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 36208e21..6d3141bd 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index e6ac7523..0546fa61 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index a4b879fe..3d30d5d4 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 648dde85..e98bb542 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 445d1eae..b9e63ee7 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 792e292b..99fd666d 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index fb07f6b2..3f6ee165 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 49ddd0ab..5e67ae16 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index b0142b20..41739672 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 04afccfa..a1587370 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 4d6101bb..7664cc0c 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 2357ee63..c4ce70c5 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index a88a16ee..ef56b929 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 0918b14d..52f0f328 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 08db3b29..54edc605 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 78acd9c1..4f83d6ee 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index e3f23baf..68edb67f 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 7d93389c..b266cb63 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index c1eb098f..00052c0b 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 8c0292d1..11c526ac 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 1cac588c..d2a230b3 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 6604baf0..5351882b 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 1bdda6f9..2e20d294 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index fde141c5..bfe15fff 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 1576c7ee..ff6ad391 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index c4d2419d..7f5a8fac 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 471c85c8..2a1ebd5f 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 762fce4d..392a5579 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index b900b772..dff59e1e 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index b446063e..0d9d3163 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 0fd1e5d3..c552d82d 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 1ed38a02..38cd03d5 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 724db7ae..783d31fb 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index ed567be7..97e4d8e3 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 8f8e5783..7fa2ad3f 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 8a2a656b..b477d97a 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index b104d085..5d6d6ffd 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 95736721..05a23b23 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 3566f3c0..dbfe923d 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 99c63bea..b6d1c177 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index ce1297f7..b7d898fc 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index bbb36879..fbc2c47e 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 792e292b..99fd666d 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index fb07f6b2..3f6ee165 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 49ddd0ab..5e67ae16 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index b0142b20..41739672 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index a7014a53..f37a4f3e 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 4d6101bb..7664cc0c 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 5145e858..fbbb2c4a 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index a88a16ee..ef56b929 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 0918b14d..52f0f328 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 08db3b29..54edc605 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index eb19830e..e93361f7 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index e3f23baf..68edb67f 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index c8d92d32..548e85cf 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index c1eb098f..00052c0b 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 8c0292d1..11c526ac 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 1cac588c..d2a230b3 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b725c6a2..b53acd53 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index ef931d99..825ee326 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index fde141c5..bfe15fff 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 1576c7ee..ff6ad391 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index c4d2419d..7f5a8fac 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 471c85c8..2a1ebd5f 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index bad01c09..396b6e14 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index fbc12082..48899032 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index b446063e..0d9d3163 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 0fd1e5d3..c552d82d 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 1ed38a02..38cd03d5 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 724db7ae..783d31fb 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/05]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 4fda478a28b1ac98751d4ec66e613a91a44f31c1 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 17:47:48 +0400 Subject: [PATCH 040/241] replaced most of string constants by OPT.sometyp.strobj.name. -- noch --- src/compiler/OPP.Mod | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 29c4fb2e..3dedb545 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -72,8 +72,8 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) VAR x: OPT.Node; sf: SYSTEM.INT64; BEGIN IF sym = OPS.lbrak THEN OPS.Get(sym); - IF ~OPT.SYSimported THEN err(135) END; - ConstExpression(x); + IF ~OPT.SYSimported THEN err(135) END; + ConstExpression(x); IF x^.typ^.form = OPT.Int THEN sf := x^.conval^.intval; IF (sf < 0) OR (sf > OPM.MaxSysFlag) THEN err(220); sf := 0 END ELSE err(51); sf := 0 @@ -737,7 +737,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) IF e THEN OPS.Get(sym); StatSeq(y) ELSE y := NIL; - OPM.Mark(-307, OPM.curpos); (* notice about no OPS.else symbol; -- noch *) + OPM.Mark(-307, OPM.curpos); (* notice about no OPS.else symbol; -- noch *) END ; OPB.Construct(OPT.Ncaselse, cases, y); OPB.Construct(OPT.Ncase, x, cases); cases^.conval := OPT.NewConst(); @@ -922,13 +922,17 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPT.Insert(OPS.name, obj); obj^.mode := OPT.Typ; obj^.typ := OPT.undftyp; CheckMark(obj^.vis); IF sym = OPS.eql THEN - IF (obj^.name = "INTEGER") OR (obj^.name = "SHORTINT") OR - (obj^.name = "LONGINT") OR (obj^.name = "HUGEINT") OR - (obj^.name = "LONGREAL") OR (obj^.name = "REAL") OR - (obj^.name = "CHAR") OR (obj^.name = "SET") OR - (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN + IF (obj^.name = OPT.sinttyp.strobj.name) OR + (obj^.name = OPT.inttyp.strobj.name) OR + (obj^.name = OPT.linttyp.strobj.name) OR + (obj^.name = OPT.hinttyp.strobj.name) OR + (obj^.name = OPT.realtyp.strobj.name) OR + (obj^.name = OPT.lrltyp.strobj.name) OR + (obj^.name = OPT.settyp.strobj.name) OR + (obj^.name = OPT.chartyp.strobj.name) OR + (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) - END; + END; OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) ELSIF (sym = OPS.becomes) OR (sym = OPS.colon) THEN err(OPS.eql); OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) From 8d28c1b1bbc95d2a85c35b5131b4f1e09aee0800 Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 17:52:15 +0400 Subject: [PATCH 041/241] updated bootstrap sources. -- noch --- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-88/OPP.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index c4ce70c5..9d510a11 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index c4ce70c5..9d510a11 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index fbbb2c4a..dc5f3a8b 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index c4ce70c5..9d510a11 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index fbbb2c4a..dc5f3a8b 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, "INTEGER") == 0 || __STRCMP(obj->name, "SHORTINT") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); From 58ea173d9446848578abc5b7757d1bf4e2750fae Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 18:28:33 +0400 Subject: [PATCH 042/241] added "showdef" related information to the readme. -- noch --- ReadMe.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ReadMe.md b/ReadMe.md index b5dbdb74..b7cfc40e 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -101,6 +101,27 @@ executable binary. Execute as usual on Linux ('./hello') or Windows ('hello'). +In order to know module's interface, use "showdef" program. + +``` + $ showdef Out.sym +DEFINITION Out; + + VAR + IsConsole-: BOOLEAN; + + PROCEDURE Char(ch: CHAR); + PROCEDURE Flush; + PROCEDURE Int(x: INT64; n: INT64); + PROCEDURE Ln; + PROCEDURE LongReal(x: LONGREAL; n: INT16); + PROCEDURE Open; + PROCEDURE Real(x: REAL; n: INT16); + PROCEDURE String(str: ARRAY OF CHAR); + PROCEDURE Ten(e: INT16): LONGREAL; + +END Out. +``` Also see [**Compiling**](/doc/Compiling.md). From d21037642107723c889efb8e768538db9edd229a Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 20:35:58 +0400 Subject: [PATCH 043/241] reverted back to using string literals. -- noch --- src/compiler/OPP.Mod | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 3dedb545..0ff9b7fb 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -922,14 +922,14 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPT.Insert(OPS.name, obj); obj^.mode := OPT.Typ; obj^.typ := OPT.undftyp; CheckMark(obj^.vis); IF sym = OPS.eql THEN - IF (obj^.name = OPT.sinttyp.strobj.name) OR - (obj^.name = OPT.inttyp.strobj.name) OR - (obj^.name = OPT.linttyp.strobj.name) OR - (obj^.name = OPT.hinttyp.strobj.name) OR - (obj^.name = OPT.realtyp.strobj.name) OR - (obj^.name = OPT.lrltyp.strobj.name) OR - (obj^.name = OPT.settyp.strobj.name) OR - (obj^.name = OPT.chartyp.strobj.name) OR + IF (obj^.name = "SHORTINT") OR + (obj^.name = "INTEGER") OR + (obj^.name = "LONGINT") OR + (obj^.name = "HUGEINT") OR + (obj^.name = "REAL") OR + (obj^.name = "LONGREAL") OR + (obj^.name = "SET") OR + (obj^.name = "CHAR") OR (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) END; From 576c57b39b06896d4db5f75384f39c7fef7710cf Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 6 Dec 2016 20:38:09 +0400 Subject: [PATCH 044/241] update of bootstrap sources. --- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-88/OPP.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 9d510a11..ebecc1ea 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, "SHORTINT") == 0 || __STRCMP(obj->name, "INTEGER") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 9d510a11..ebecc1ea 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, "SHORTINT") == 0 || __STRCMP(obj->name, "INTEGER") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index dc5f3a8b..4db27f7d 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, "SHORTINT") == 0 || __STRCMP(obj->name, "INTEGER") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 9d510a11..ebecc1ea 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, "SHORTINT") == 0 || __STRCMP(obj->name, "INTEGER") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index dc5f3a8b..4db27f7d 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1665,7 +1665,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) obj->typ = OPT_undftyp; OPP_CheckMark(&obj->vis); if (OPP_sym == 9) { - if (((((((((__STRCMP(obj->name, OPT_sinttyp->strobj->name) == 0 || __STRCMP(obj->name, OPT_inttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_linttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_hinttyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_realtyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_lrltyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_settyp->strobj->name) == 0) || __STRCMP(obj->name, OPT_chartyp->strobj->name) == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { + if (((((((((__STRCMP(obj->name, "SHORTINT") == 0 || __STRCMP(obj->name, "INTEGER") == 0) || __STRCMP(obj->name, "LONGINT") == 0) || __STRCMP(obj->name, "HUGEINT") == 0) || __STRCMP(obj->name, "REAL") == 0) || __STRCMP(obj->name, "LONGREAL") == 0) || __STRCMP(obj->name, "SET") == 0) || __STRCMP(obj->name, "CHAR") == 0) || __STRCMP(obj->name, "TRUE") == 0) || __STRCMP(obj->name, "FALSE") == 0) { OPM_Mark(-310, OPM_curpos); } OPS_Get(&OPP_sym); From 83d943297f099e8605b709d91fdc3389abb4ea4d Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 6 Dec 2016 18:46:37 +0000 Subject: [PATCH 045/241] Use single quote string dilimieters for printf in oberon.mk. --- src/tools/make/oberon.mk | 88 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 4d4b0b40..5c3af6be 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -32,7 +32,7 @@ usage: clean: - @printf "\n\n--- Cleaning branch $(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n" + @printf '\n\n--- Cleaning branch $(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n' rm -rf $(BUILDDIR) rm -f $(OBECOMP) @@ -42,22 +42,22 @@ clean: # Assemble: Generate the Vishap Oberon compiler binary by compiling the C sources in the build directory assemble: - @printf "\nmake assemble - compiling Oberon compiler c source:\n" - @printf " VERSION: %s\n" "$(VERSION)" - @printf " BRANCH: %s\n" "$(BRANCH)" - @printf " Target characteristics:\n" - @printf " PLATFORM: %s\n" "$(PLATFORM)" - @printf " OS: %s\n" "$(OS)" - @printf " BUILDDIR: %s\n" "$(BUILDDIR)" - @printf " INSTALLDIR: %s\n" "$(INSTALLDIR)" - @printf " Oberon characteristics:\n" - @printf " MODEL: %s\n" "$(MODEL)" - @printf " ADRSIZE: %s\n" "$(ADRSIZE)" - @printf " ALIGNMENT: %s\n" "$(ALIGNMENT)" - @printf " C compiler:\n" - @printf " COMPILER: %s\n" "$(COMPILER)" - @printf " COMPILE: %s\n" "$(COMPILE)" - @printf " DATAMODEL: %s\n" "$(DATAMODEL)" + @printf '\nmake assemble - compiling Oberon compiler c source:\n' + @printf ' VERSION: %s\n' "$(VERSION)" + @printf ' BRANCH: %s\n' "$(BRANCH)" + @printf ' Target characteristics:\n' + @printf ' PLATFORM: %s\n' "$(PLATFORM)" + @printf ' OS: %s\n' "$(OS)" + @printf ' BUILDDIR: %s\n' "$(BUILDDIR)" + @printf ' INSTALLDIR: %s\n' "$(INSTALLDIR)" + @printf ' Oberon characteristics:\n' + @printf ' MODEL: %s\n' "$(MODEL)" + @printf ' ADRSIZE: %s\n' "$(ADRSIZE)" + @printf ' ALIGNMENT: %s\n' "$(ALIGNMENT)" + @printf ' C compiler:\n' + @printf ' COMPILER: %s\n' "$(COMPILER)" + @printf ' COMPILE: %s\n' "$(COMPILE)" + @printf ' DATAMODEL: %s\n' "$(DATAMODEL)" cd $(BUILDDIR) && $(COMPILE) -c SYSTEM.c Configuration.c Platform.c Heap.c cd $(BUILDDIR) && $(COMPILE) -c Out.c Strings.c Modules.c Files.c @@ -73,7 +73,7 @@ assemble: cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) cp src/runtime/*.Txt $(ROOTDIR) - @printf "$(OBECOMP) created.\n" + @printf '$(OBECOMP) created.\n' @@ -95,11 +95,11 @@ translate: if [ ! -e $(OBECOMP) ]; then make -f src/tools/make/oberon.mk -s compilerfromsavedsource; fi - @printf "\nmake translate - translating compiler source from Oberon to C:\n" - @printf " PLATFORM: %s\n" $(PLATFORM) - @printf " MODEL: %s\n" $(MODEL) - @printf " ADRSIZE: %s\n" $(ADRSIZE) - @printf " ALIGNMENT: %s\n" $(ALIGNMENT) + @printf '\nmake translate - translating compiler source from Oberon to C:\n' + @printf ' PLATFORM: %s\n' $(PLATFORM) + @printf ' MODEL: %s\n' $(MODEL) + @printf ' ADRSIZE: %s\n' $(ADRSIZE) + @printf ' ALIGNMENT: %s\n' $(ALIGNMENT) @mkdir -p $(BUILDDIR) @rm -f $(BUILDDIR)/*.sym @@ -125,13 +125,13 @@ translate: cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) - @printf "$(BUILDDIR) filled with compiler C source.\n" + @printf '$(BUILDDIR) filled with compiler C source.\n' browsercmd: - @printf "\nMaking symbol browser\n" + @printf '\nMaking symbol browser\n' @cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ss -O$(MODEL) ../../src/runtime/Oberon.Mod @cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Sm -O$(MODEL) ../../src/tools/browser/BrowserCmd.Mod @cd $(BUILDDIR); $(COMPILE) BrowserCmd.c Oberon.c -o showdef \ @@ -148,7 +148,7 @@ FORCE: installable: @rm -rf "S(INSTALLDIR)/test-access-qqq" - @if ! mkdir -p "$(INSTALLDIR)/test-access-qqq";then echo "\\n\\n Cannot write to install directory.\\n Please use sudo or run as root/administrator.\\n\\n"; exit 1;fi + @if ! mkdir -p "$(INSTALLDIR)/test-access-qqq";then printf '\n\n Cannot write to install directory.\n Please use sudo or run as root/administrator.\n\n'; exit 1;fi @rm -rf "S(INSTALLDIR)/test-access-qqq" @@ -158,7 +158,7 @@ installable: # and libraries in /opt/$(ONAME). # May require root access. install: - @printf "\nInstalling into \"$(INSTALLDIR)\"\n" + @printf '\nInstalling into \"$(INSTALLDIR)\"\n' @rm -rf "$(INSTALLDIR)" @mkdir -p "$(INSTALLDIR)/bin" @@ -183,22 +183,22 @@ install: # showpath: Describe how to set the PATH variable showpath: - @printf "\nNow add $(INSTALLDIR)/bin to your path, for example with the command:\n" - @printf "export PATH=\"$(INSTALLDIR)/bin:\$$PATH\"\n" - @printf "\n" + @printf '\nNow add $(INSTALLDIR)/bin to your path, for example with the command:\n' + @printf 'export PATH=\"$(INSTALLDIR)/bin:\$$PATH\"\n' + @printf '\n' uninstall: - @printf "\nUninstalling from \"$(INSTALLDIR)\"\n" + @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' rm -rf "$(INSTALLDIR)" rm -f /etc/ld.so.conf/lib$(ONAME) if which ldconfig >/dev/null 2>&1; then ldconfig; fi runtime: - @printf "\nMaking run time library for -O$(MODEL)\n" + @printf '\nMaking run time library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Platform$(PLATFORM).Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod @@ -215,14 +215,14 @@ runtime: v4: - @printf "\nMaking v4 library for -O$(MODEL)\n" + @printf '\nMaking v4 library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Args.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Console.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Printer.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Sets.Mod ooc2: - @printf "\nMaking ooc2 library for -O$(MODEL)\n" + @printf '\nMaking ooc2 library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Strings.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Ascii.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2CharClass.Mod @@ -232,7 +232,7 @@ ooc2: cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Real0.Mod ooc: - @printf "\nMaking ooc library for -O$(MODEL)\n" + @printf '\nMaking ooc library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLowReal.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLowLReal.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocRealMath.Mod @@ -266,13 +266,13 @@ ooc: cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocC$(DATAMODEL).Mod oocX11: - @printf "\nMaking oocX11 library for -O$(MODEL)\n" + @printf '\nMaking oocX11 library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocX11.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocXutil.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocXYplane.Mod ulm: - @printf "\nMaking ulm library for -O$(MODEL)\n" + @printf '\nMaking ulm library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTypes.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmObjects.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPriorities.Mod @@ -329,11 +329,11 @@ ulm: cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmIntOperations.Mod pow32: - @printf "\nMaking pow library for -O$(MODEL)\n" + @printf '\nMaking pow library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/pow/powStrings.Mod misc: - @printf "\nMaking misc library for -O$(MODEL)\n" + @printf '\nMaking misc library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/crt.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/Listen.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/MersenneTwister.Mod @@ -341,7 +341,7 @@ misc: cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/MultiArrayRiders.Mod s3: - @printf "\nMaking s3 library for -O$(MODEL)\n" + @printf '\nMaking s3 library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethBTrees.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethMD5.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethSets.Mod @@ -368,14 +368,14 @@ O2library: runtime v4 ooc2 ooc ulm pow32 misc s3 OClibrary: runtime library: - @printf "\nCompiling lib$(ONAME)-O$(MODEL) sources\n" + @printf '\nCompiling lib$(ONAME)-O$(MODEL) sources\n' rm -rf $(BUILDDIR)/$(MODEL) mkdir -p $(BUILDDIR)/$(MODEL) cp $(BUILDDIR)/SYSTEM.[ho] $(BUILDDIR)/$(MODEL) cp src/runtime/*.Txt $(BUILDDIR)/$(MODEL) cp $(BUILDDIR)/WindowsWrapper.h $(BUILDDIR)/$(MODEL) @make -f src/tools/make/oberon.mk -s O$(MODEL)library MODEL=$(MODEL) - @printf "\nMaking lib$(ONAME)-O$(MODEL) .a and .so\n" + @printf '\nMaking lib$(ONAME)-O$(MODEL) .a and .so\n' ar rcs "$(BUILDDIR)/$(MODEL)/lib$(ONAME)-O$(MODEL).a" $(BUILDDIR)/$(MODEL)/*.o @cd $(BUILDDIR)/$(MODEL) && $(COMPILE) -shared -o lib$(ONAME)-O$(MODEL).so *.o @@ -390,7 +390,7 @@ sourcechanges: RUNTEST = COMPILER=$(COMPILER) OBECOMP="$(OBECOMP) -O$(MODEL)" FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(INSTALLDIR)" confidence: - @printf "\n\n--- Confidence tests ---\n\n" + @printf '\n\n--- Confidence tests ---\n\n' cd src/test/confidence/hello; $(RUNTEST) cd src/test/confidence/out; $(RUNTEST) cd src/test/confidence/in; $(RUNTEST) @@ -403,4 +403,4 @@ confidence: cd src/test/confidence/isptest; $(RUNTEST) cd src/test/confidence/lola; $(RUNTEST) if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; $(RUNTEST); fi - @printf "\n\n--- Confidence tests passed ---\n\n" + @printf '\n\n--- Confidence tests passed ---\n\n' From 4b0fb0d1fbd81dbecb27ba223d3da15c359f7494 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 13:07:21 +0000 Subject: [PATCH 046/241] Slightly simplify auto build repository sync. --- src/tools/make/buildall.pl | 9 ++++----- src/tools/make/getbranch.pl | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 src/tools/make/getbranch.pl diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index 0dbb0260..797e7220 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -14,13 +14,13 @@ my %machines = ( "darwin" => ['dave@dcb', "sudo", "projects/oberon/vishap/voc", "make full"], "cygwin" => ['-p5932 dave@wax', "", "oberon/cygwin/voc", "export CC=gcc && make full;" . "cd ~;" - . "sh start64.sh \\\"cd oberon/cygwin/voc && git reset --hard && git clean -dfx &&" - . "git pull && git checkout $branch && git pull;" + . "sh start64.sh \\\"cd oberon/cygwin/voc &&" + . "src/tools/make/getbranch $branch &&" . "export CC=gcc && make full;\\\""], "mingw" => ['-p5932 dave@wax', "", "oberon/mingw/voc", "export CC=i686-w64-mingw32-gcc && make full;" . "cd ~;" . "sh start64.sh \\\"cd oberon/mingw/voc && git reset --hard && git clean -dfx &&" - . "git pull && git checkout $branch && git pull;" + . "git pull && git checkout -f $branch && git pull;" . "export CC=x86_64-w64-mingw32-gcc && make full;\\\""], "android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"], "lub64" => ['dave@vim', "sudo", "oberon/voc", "make full"], @@ -62,8 +62,7 @@ unlink glob "log/*"; for my $machine (sort keys %machines) { my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && $sudo git reset --hard && $sudo git clean -dfx &&" - . "$sudo git pull && $sudo git checkout -f $branch && $sudo git pull && $sudo $mkcmd\" "; + my $cmd = "ssh $login \"cd $dir && src/tools/make/getbranch $branch && $sudo $mkcmd\" "; logged($cmd, $machine); } diff --git a/src/tools/make/getbranch.pl b/src/tools/make/getbranch.pl new file mode 100644 index 00000000..32ff1927 --- /dev/null +++ b/src/tools/make/getbranch.pl @@ -0,0 +1,14 @@ +#!perl -w +use strict; +use warnings; + +# Exit with a clean enlistrment in the named branch. + +my $branch = "master"; +if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} + +set -x +git reset --hard # Clear the staging area +git clean -dfx # Remove all untracked files +git pull # Update the local repository +git checkout -f $branch # Switch to requested branch From 72ba766a2dd55b71fbac6eb6471b5fc96f928d28 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 13:11:30 +0000 Subject: [PATCH 047/241] Slightly simplify auto build repository sync. --- src/tools/make/buildall.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index 797e7220..e8b6ac1c 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -19,8 +19,8 @@ my %machines = ( . "export CC=gcc && make full;\\\""], "mingw" => ['-p5932 dave@wax', "", "oberon/mingw/voc", "export CC=i686-w64-mingw32-gcc && make full;" . "cd ~;" - . "sh start64.sh \\\"cd oberon/mingw/voc && git reset --hard && git clean -dfx &&" - . "git pull && git checkout -f $branch && git pull;" + . "sh start64.sh \\\"cd oberon/mingw/voc &&" + . "src/tools/make/getbranch $branch &&" . "export CC=x86_64-w64-mingw32-gcc && make full;\\\""], "android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"], "lub64" => ['dave@vim', "sudo", "oberon/voc", "make full"], From c5f0e1e345d7f4444793c720cdcfc9c9c192e32a Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 17:43:09 +0400 Subject: [PATCH 048/241] added original Beautifier module. --- src/tools/beautifier/Beautifier.Mod | Bin 0 -> 36838 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/tools/beautifier/Beautifier.Mod diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/Beautifier.Mod new file mode 100644 index 0000000000000000000000000000000000000000..27abc010490318052e684530ba1f4311ab124f8d GIT binary patch literal 36838 zcmd6QUu;}inpdS~W@iev$Nw9{?dC#0y&Bfmg%>;tBBtk4Ol_)2?WKzwi6b zx#!%v<)pi(M-wHfI`{nh&Ue25=R3Fl*Oh~NjmDMzi{YgEeEC+k-y3Ed!%3sj_;dJo zx2BXXxzv59@-wW@yu{n8(-H!nrQNh zukJ_F{kqQccUa$O{CO?$Axdf8U(vds^5bgb?l;iHz`WW(fu(P1-5=rOYksoBFxl0{ zpVj)`L_2`Bpe0Pi(tjtQR~z5f(y!ww{{9&){XcDq7HqkprElQ_bMnLbmGJzg)=7t} z9EknCflsvjEquk_-_?GLTKAcjzV&sf`&(N2ms*F$jm97T^+u!pUVd>t8XvV=2Pgf) zjq@G~h3k#5iTz>W`orVV__RCekA|*$IGRq}XqdaF+9`9J6Ng^YB0oY)_o!Q(9AvFl zTSr{;gG^3B7uR{P{_f`XqTAiuSzCYjcyE2t<&$2vfL^^pwver3=?hpHues|FSL@~$Jy+1md4s!Qkbadg)`;!x=;Ov~`Lj|dG zzOV{39VXB|m}2o?A+(1t3+?v$hn>TP)mfi!6JnH2IHul){PP)S#FnfZE3Jiy%!O@q30R6W| zlm2l(A6GEoANz$x*c<1?WJH4R9+Oi{LIC}vvD@CH*V1j_`lCkMto z{5}!32{M{QW)iso?_h-|c^@L7l!Yb*r-kPolln`0BJZ=7%JI2EX-R|T&1HA5dI_!yl`Puy}`_a$c(mU>Fx3X;c z*3YpJ@DP+j{|QtP)?4H~PyvW&I6XZC-*F2;BCZ7iU_u!K8ZJa?6q7C_H^ph@4o>o- z>f&8)4bLE;ePk@ zY;Sb#-gdh?o7)HLd+uPz-QU~0|0CD=;qLmo@8AFE;pY46+xwe4+wP{@d-uWa=11#W z`a?D)Z8&4s ztwsYEISic=RIGn#nY4KZ_EAKd49cF3gTcKxVroAo*g7 z?S0^Kn2%ST*dcxo4q$++I&RBw#D4eOgPonN_50iUkOmF4**)V9qkZg|D>tp{*fWP6 zlrNnC3}7lt0iguuG7{Wy-Ja8f>Fv%zt=Iz^?^(;W95|k%V`;#9O?$8ZhIx;s7sLTH zwTjrT+GB*v8CM!6Cx2T z<~NsHD%74i15lX-)&&oOa6(=*KE# zEXstg+gEJ3_tZ6Xo&EO~O8(1-J($Fp76O9$qCc7zV&sjm(_`?;6LAA59^FL_j6sPM zkS3gdQ@pRuAvi946>b}QzEatyOfhP55UJ81?LSzmz%h1lh8#wnsNDRZF&km zRSU=C(Wx6}XCtvp3VwlYb&PG}Bt-aROxFm}|=rEt0Q`OBl&xE5txdBf`d}`Pne}E--AZYpCDvJmfhOfMkwh3q`AKR z(D}}*t%uXo(+dhOacjX5AQ{l3I4c04v{%g(fQ3LhIqDZ@gYE^$=={Vxjnpp|V^IH5 zC<=oiv_m6>2;1$Bi+t_$XiE&`xFk|)jy{RpUN4^n4RFN8NW++r7Q`v+B5on6ojUee zpDv47>v1);y{MGQxX+#=Fa_l8DSNTqgt|wRMjz5j7lQ?~yd`y(kNJ>hE1W^vU^=}h zFm)UmiDFTFyhMF*0%?e8VU?A3x=6nmOj!lxk#XgssmS2Wf-<@T$VdqVthRQ__ypFB zC1Q9O25<<01P)AHdDMkE<@`$?g$buwtbx{u8j9=}ZKvO4+U~L9@#~F+q<`k%+-mHh zVy&qbst_ zlptE>h_r)Q5&}yI*+5KrRx*o0O&qur2;e^@A5G6>V??CEFcHxskpRc=K0U=w6h>=_ zsrLTP!^d0e3kcT+0a!vQ5(@qgiJB;|z#B0m@vr=+(>{m>Bh#9VWo4`V`0S`V$rU~N zUCDYvcBlk=EMjcrqU{1fK~@$BU+L3gG#&TyrQQhMTbPl;xz*l~=oFL+`LPU_gs7GK z9rqLb^U)pBVc-|oXBJ7^L3Cp@Tv~DaG82r#qnxAf<){1kX}>pugMv_bX}~5Gv-=K_ zf)*pfPq>OOh7*%T_fVrP&;}5l78>E4v{d#H0ntw|t{n|gE7(5 z9nh49XfG!Zi=jd2=IzS{#Ch;Dl8s4gYIo-TbTZ-*3q|+^2x5Q(819nDB|20xwd@f{ zRAQ?a!V}ylv6j(=g1a)8ID(AL*qAs~!vf1um0T6@I)c@jS#)7P5R9#WTm$huWYJuQ z*c*2dL{4eAd_Ld6Kb%66YWTO~TxS+ax{x1VpNV(r($8ay-rf zAt}KV--G4`CNLvi4$>e^VVxZGE9}BkUxm4G+aRJ8j4zyWg^}%IXT5{^=P07 z{Q&-PYS;?15YJv#a5Ew8xiR}^IMUhiU1QoyYiik4J&IttxB`Q5CjfB?4P=BcYM71s z05;)iA{1n{P~$G0PTC@ppiwZWi_`7^=l~5Nc%Q>57%w3_L|Ys<9B@lHHzghyn@k%X z*3Rfs6)^>xjt8UZ6z-{vMEMui20Lz_p>;%t5sP6^fhMz@Lyp0D#EbQU1`y7QPr)=8 z8gK-Hn3X>QK1pRpT+hg#zMjvX_F))eV)Ga;5!Z}>KjNVZ4^q;AIAN6o0Jw`-(VPg?v3yTzB0`6e(^U7p5m@#)BfSp ztlP^FuWH{vgh<5!I(m`=x)4D@QN(r?wokCsXNb0xv&H0MkS{%%!V97=q4EoR1{#?3 zC)0@p!-@-p4o+P$I-Z=Lr$Qv@qgDFxXh80Ty z*5>mZ4l`Xzv66`s##bSFhokdF$6n*yPTYCg3S}|QrwAzYhjV5qgC;t9IXI@DosSm~m^+WUn1+6! zc_L)p0?q(}jk#+BWf~a3mo|`{PJk`Dz#8LOsw>J6)1)oDu4iBfuvwN8VoSONS`GL{ zh1Km3Aa|R~%ke5?5>OmW*kmTvB#a2k##B}!?w=8y2n=e{tkr%55+vPJrHyh?kTu@3 z$XZ}w=K0{?-{eOq{V6S33XzqprKLMr3A|sQV)Yj}g#3-hP5UD4h*?U%QPv;Cc#=WPFjn&)i)Px1VftBq?~{X;GN1ugxSek5~ntZB`2 zj&)ai%QCMv-T@{t@^`fHp4Q0*Ty6Z1nh`j%AivR&>@q7=*8WX2kyfFx>_#ZrLTsRQ zoyW-VyIQh3Cf{L7tNYVQ9TVYDH?wl<%5L!vbt6$73s1`C0;1h)&4>Mzh zR-}91s?qpMNy+xkAWcgt-0h^Fr3XsCnVB(N(%A57lRQZ3oR$o)e=Vs?ci>@ESDBKS zNjdmN)HozT8UR<5I!=Pwg?a?uWr0i7<$fVR3+Sr~GyE+SwoQDzP}wkEQfVIs-Q4W(2#L@hCx zw5$&H-DowiQIpd3q?EQaEX>G{N7^TOPP7QZ11H<=8GTrZ6j&nAs52Re0@TFVpP+)~ z_rLgOR~ldE`ATeoKmRYk#*wz?!19mr9CF)f^|wHfXgo8~Pv`XhhuYgH{dch`7|XVe z_(SP^?fS23Mu>F4O|6z)t;|1{kZfcz5*i*Cf)Z2xN(sQIsKe@Rr{d#t%WxteNEz3bHoLL4^)rGOc58T5EKM3d ztK3Gpo~+hP6zgYWTEA4-%CyLrXLsa^>nK(-ycjH2XQdQ_X4YB1RB1_vFvF|K4Btzj zPVpjxg?_bA8!Xn+FlZ&ii(!H#)L-X(RkCpj5Rp_t%XHdEe4#ESx0Ku4I??|G-~GYw zDIb3W&Sb*JrKe02z9DQaP?BM7F*d&~^t%eFl}yT8%ak-_p+OrNq}I=nUfWOL4zs5O zU|VOS7@n+@YO!<+j2vb}5cdTCQbm0`+Kd^o5eU?}eiSuMBn0YPNu90B`lZksjtw8y z&q@Znl^$SBe3d4FiVOqR&r0dO8M9cOjrnZ=gTHNs)9P$*tn~e)?k$~N1Z$XGP#wgZ zm0r_+R{D;Xgnz5{svsnY#gy99I@?nll>N%u?*+kaT0JOnuXu!w~u#$8S)L0=_W%ioOJ!a*G?Jyvc?sL`MV@0CP zY=lr-G9EFAA13_-vw>yJ^|F@V)0W@Tl{zh1T{@-0RvB z_t7}Pn_6ea@Lhm|er7q->MKY2ds;Hp{D)eyQC?3*`Q-AIn^c~+^1+;yb4^u@5L5p~ z=eD)3Y004cyINY&t^+L@%>Q0X*6%;efqC9uf2u`U(Y?&lo;PZYXLr+GVp z^+ZdyOSUfy+VbD(M*s1Ik>Z%mmy=YG+81&y1Ro^pdx^>=j0-v9t;X`=nimqCJFL3qwdS=} zYxDhGq}ocHTihoG;}ITRw6g?!PH_makGLx`$rsCv8vBk9&2Yn)_w(V@3b?4YwzIu| z&}!mj2+94o?tX*`w>J3o;YX{jCQ@+m70;SY*QJp4dUK)G++>?&X~QHtO{+{> zth33AAI4hXJej9gK7m$-dccOaD-92E!X}wEano(KT+(SV>-H#Q1S6?ZPO;=h6%#3V zl+E-Prm<<#KIbY=i)Dq$nXjyePxSDXu(w(VKiXYyH9ZV(yS??boxO+GTFoZYoBbI* z!tVZ<9yM~aq)fkUH6==q{X|+)t9kA-;q<;E@O|i?=ru(Ft+ygwR?S zBp^Y~xZO&SLD0DO|xIX(jVu zlo!miVDmg&Pv;>w`Qhy*2`-Wd4GErOtj^+_={a(jAjNk`=a-{xPj1B47rChscCETk zda;6AwQ+xIe;vrz4dL{if}4TGErC^eDPjp1t-+^drjFdAklT~~%wHB>-SNVx?`_*g zW`8V@6i|T;)EOx*wIXbT0m1zQAlPqqKq^-eI#osju`CEJU~l)4q*e-n>;eOJ45zqPr+{uBSE`ffN@J01kp_J%(KH zMWh`Z^(WarugAN6$wJB2aOp8`lO{z~N8R}~^kswN+3}?fOxatkH)4kwhE&c;j@-Gi z@qJYgt!WNNHn*qv>K)>jYV^cWe!$;Op_|+qy)`wqrL@0y~)V)gC74aT+8q*Tc zBC7~6G|VQbfFQ&-WD65OZE30kq>TK5xMto13=E{F_!I{boJ|ijv`r~8 zk7*a+4)IIqvYV#M#H24LDe?g>-C)9Ja)(9dk`0P^y7Th${N%EEm`Wn1l5H_k`S%3? zRCIv8loN?XqD|f|@(%2E)kz*%`~KtSlsH7l?u&hVKU!r0dsdBi|ga z$Y7>4u6F1xkyrp^yiWTB*^_*`4PQ8tfm7)`W?Mtf_2~ZALFew>$jSt@2ML?X-s<&> znk-ATDPM5^0?a4Uw|c*^)hx~bCT~9QiUlv(cJUq(e)sOn?Ul&q>d%TYvwZ-sq-L_~ zkcLfahfuHQ;|`ME1mPxvlt4u1qelG*F?Yt<@o)`TY5B1F<@bq!_1kS#9@Oj^)v_inu zVBYu^{Sj~e)p3C#FENlKx46_rmntKQJL4Tm5!Rb(z3!mrFR-eJRp?192#8QE{rJ|$ zG~8LbasP%$@1`s*Zc`BHH1B8IQjOW5l=foKTKO%va$CweUZtq5y|LdEw(14z2XnA{^Ybb02+d&_WFCHO3mYHe_%NhC&;pWV%zp@`K_vUQ&)mQkblpYn>`R$4Rq?ys^FogcwAB0IXYiuxD- z&Bv+edn#7se;wGnJnxD8E2TjyCdzzQ@kpwAO|I|Eii*@nKvpwiiscIyX725Kt=T)F zT3YdOGU2nWjYU^Ljg+#Z)vVEr8;C^+i!AdMH8dB36D$$Q4pOBN7#2K$LpUNCSXCmm zl$f{VB!rAn0bWKklNbj`dgpCHDplSYfhf~E{)ju6V(5<4iukPaMl*ZMQZ$yXc%}xP%2Yqzt4Lrr`mi4qd69S%?83<3o+b z7N`!$9tbJxWWWyvlK#PNZ49P(0hC<@OKl?CC}Vgof?(PXYb*(Omd<&FL|=8rJC|Z) z5hT6CZ7+E!2>`^v)b#;g@*ordWZMfPz^1m8>#`qS{^%m)RSG%11CN!kZV3_1HTAW- z60Ghsa8x4Za+)Y(8-cB>+#cQ|QDf);*>lX>8fzigyCf7Ccd-Bf|CH?P#d@$SR)Nm$ zkz7%NY#t*$U%r<;ynAbV_a5(-vkQ-4c)3dYumFZHe(*qFLP27{yyWd$*!Mb=nXQag zqzr9Q@*?(e)hx*4N?Jvj z7GW%yjHscCNAiN{IMMtPgP?UFRg?J|i=9vwd+GVGS~ZW^6Q|cN z)6wI~gZHTiiJj&2kH7~p;cKx)Tq0+T&j2>d*9xV20(Pvuf~Q7Jyzsp{UW?4yjiu5U zL1+o1lwzNEg(D>~^tZc8AJZ!aV@@3Qheo7A9I;DSL1YI{e!P&c=KdM*c>WMoz17OZCU_#q#Mg=30HKRH@L6x& z+bz5i1hE#b0aw7ez9qLJ8?uO3eE!_OeFPkr;f)sjcs4pdj@8+Gqz1yK_XE49=B(2D zMQ@whGymsad!cmXlD&lojw_{Hp1G8Bhqj@3v?fe}F3n^pA(MH-$bn$VimYZ+Buvgkk1|f0b zCr#BOX%gx=c4W!})3VbX;*1Fsc*7>iOTVzyRoe8kUrL>_Ve2k(Et*VV80UC>gO9~u zK2Xg2To=`j30F@Im+$Y4k56RAem_v^cO9U$$N3ZJ_Ho-@sDQH%*=`jRFXU|C9UEYr z{Q?B)(k{neYLQ5Qp;Q^ED$y&jH-l>-BF9HjIoE0&H1!q!yz>RRCY(3RsANew1B-&I z{#mOT9}Wb;SDv&|v_aqNKr)V(0`ZZ>NVP`*QgmiENDFpuz*yn|El0=kam0lXx0sPLBB*YPw6suVif`0Tq63sx*vFRZ1 zE-EbrmyZ$33a@bWsUAN5yz<)Rr!YDRX$QOw8kEslOkK-M?dnoX&srEDG-|*a-588O zZ2`;h#_EkyCrZd{e~qA2MUbfe)It!|BwLJA3W3Iasw14D;-wJbjS70cq)^%pSZoD=+8#(S3q=4fx)zg~ zCh`y9sm?sv+(;iu4wM(LT<$!Z&LbjKW(J(-GyN_+;TzADok3IBcG!N%LaHDN(WFo# z2AV$5w9fR|hnokF(kELxJG<$Vwfll2Pisy3PKsaAW2rTx7!GaeAjNHyAaapD8Qs$;wR`DP7_+?{wQa3Ny08NYr6{J8C1ir;ntKyR= z^v&>@B2^Am^rhu|(Rg50dAB&zdiVlFd&fWDg6Q#0D+F5=Z#jyy+wBeTavLq+8OXwq z*yJx9A(7YR*(qQAi7g3jG8n^q{U;}IH1h1jN)<@&Lq2~r`}~n1JI@ddJHq?Ml0iBA zBYBQr63DY>{i4rzlA#UFa&H{T(IjOAk0%MA;$N5H4QFf(kjSGoqq7&ShF17jw-`ZX zcG5q>QBi=H%)vuBAj4P8E?VhZm-tdEHyNF*{W2j6Or?&tS_1XCgjKm2ryP*1O=j9F zu=HniRBG0WKJf&&!V*9VKpfD*uQs_F35yrXNFAmcnNj)il}X510cmh9!*B-RP1C3nXdFquwh%p{Tsq*6G1L2>l?rIF!m zo-q3AWYI5Q6un?AUtAKs#8SSbAX2jVqH;)k*V_bM3@I4~Zz-jC1ZCn2J}>gOE8aE8 z+^D-k{hSm3D&}75&`>u~8ULy}G9JEPun*&hRd?Z+=EV4EB{4sQ{*#vk>urzP+$v~& z?~M4nm^H6V#)+CZq)5L+crXfcF{3IkeHFZ4nCawYZ=1qE@n>qHxk8$;$$!m$LK>8xPb9p_%lDaYW2rmx;$I}~ioy-KUC5Q+ zac|JbM>8ZY5?uMl6Y`J!F$AByDRsRQF-UFvt(=KHBm54k9imx0sRElNT<|1L^^bB` zx*j#L%cG7E{z&+gcR^=*Q$v|#FoSspK22+uTo#H6`N>iM?SEWIkV3Vj^WU)Gjg)S* zqiCSs?-P}nf&r2cLrL%Y>8^y+8mkofg1!cwW=I|5m6=7jO#G_jn|_&T!wY!+QXD)z zzMMKhiTz+eF_1pM_2`&m;+1q((HJZ&q1LDY7^#SeavRQnTFo#T2^_bN($ zt16IJf#Y#%Ip^a1j$*W>OHL#R2R6P)X;w(qsz4MT9)s^o$q41hydjKKxO$S%7h!_!I}iG+f_T(g>No z%q9b2>C@DEmUGSEL23({ZNx)zMFtHQ1Va%3qO9uPqwi-=MKZJNNuZy`_%;u5h>55UU|_`6zy zSt3?W8@$q#u#*Bz$$EJ=+*&XVW`QBh88dMmSn&iUTq?Q)tV|hH(L4uKtiOy#eZiH+ zkU(c#zSI@J)L3WZZbZaIbsJh9ETmjj!*M(T#fiY_=M7-b@L(|Wyir$DEPZkOreze0 zc_KGJSFcm-<m^s)9T!XWpV@NJvdKhbkN4Y3Tv_;-NDb;tWE=!$h;fQZX<=NRPZGrRRV~!K`J2Kf>d!ojiz~56BDHyLTk{1 zLc#i@@fToDgj(2**;f?kmIqnn@kUh7l5PoLu@J(2if^ro&@J*JJ`dCu7MrSYY2d_^ zOL_LCnN*)kCE~nepJz;^vjwtFyfF)J0)u6yg6Cb|J4B4VcB>`7h?}Fu*J>3AO|fU< z1EJN2&WIMUJ!EW9_fX}Xsl(D3e>ifd&mC|HZ0 zHa!@H+#-f^(3|H%i6RhWwCDR!O}Ilu41Gy3K>E&<2-)s3U&<>FG3P%GSoEA<6HvCB z0m&O$UND;~GJ$d?U~0orW3q0Ezr8ocYk=Ny%N_`m327!nNuo2k3A$~y zW`|403(S@BoN3MCS2aZC;rj)Ls8VAg3QvjvE`RuiD&sA z&iTSS#>_>S7IS{BH5{TtL5Dm1x@MTsUp`IGuj*wt^j9!ZkE9TOYNbLB!CbPOZm~~3 zKec@olm&rBX9E9x+T=xrw345EVx7i1%P^-`nr59K5fMKV#Cv&V^lW1~l%M?8xK!%D zudHaK50|SorpPS5CN5T6NdUy7WcWvTUELBcV&PDimS;NR9sD8=kMq?hgew^C49nZ* zbj5zWeVl^V1L`m-fI?^!3W%>RL}5h=d|4n02#TSGZzDtjZW{`G;~)weT6j$h%R0gx zD`~^mt%PU-y1k)Ot=y8*n_9P`{q9=HrY3fPoZHfpP@$lJ5GoXOd_skS4o|31FhB?v zOF9I>VyOg+r4lTb?iyHO6Lt~CwbujkSL1LGlPJawC)*E2`0~dYiKo-nguX?$x&9tW zUu#!-1O{wdfcpgsU;k-}m9~I)-~TFz^QWy=3Xdw>0v8I_X1ae8Z1w znRz;_uLX7tT)v+X5aD;&1F*{hTFK6<^t|nRGF5|Xc@TFE)0VE94jwNE)a_Tp+>EZ1 zpQk^{`Lnw6Ba7uSKqUsK Date: Wed, 7 Dec 2016 17:44:01 +0400 Subject: [PATCH 049/241] ocat fixed --- src/tools/ocat/OCatCmd.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/ocat/OCatCmd.Mod b/src/tools/ocat/OCatCmd.Mod index 030011a1..3d76a745 100644 --- a/src/tools/ocat/OCatCmd.Mod +++ b/src/tools/ocat/OCatCmd.Mod @@ -2,7 +2,7 @@ MODULE OCatCmd; (* J. Templ, 13-Jan-96 *) (* looks at the OBERON search path and writes one or more Oberon or ascii texts to standard out *) - IMPORT Args, Console, Files := Files0, Texts := Texts0; + IMPORT Args, Console, Files, Texts; PROCEDURE Cat*; VAR path: ARRAY 128 OF CHAR; i: INTEGER; T: Texts.Text; R: Texts.Reader; ch: CHAR; tab: BOOLEAN; From ada56e2770150a74484ed9da69b25e230382a4e1 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 17:44:45 +0400 Subject: [PATCH 050/241] Beautifier converted to plain ascii file. --- src/tools/beautifier/Beautifier.Mod | Bin 36838 -> 23291 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/Beautifier.Mod index 27abc010490318052e684530ba1f4311ab124f8d..0a822d43ed96fe02f2dd5bde0f10ac5ed5eff6fd 100644 GIT binary patch literal 23291 zcmd5^`%fEJ+WtL%#SxVnlY%#pq-|hZDRE3eA%K8vT2)!em~pUTJji20(eCDN|DNZ4 z-*cN8o6z0tw~<;r=lb4n=gho0eD!v}?_L&z>-l&zE@s<~{~kQpdvkPneCl?}$$5WL zTvluNIi2Ir;aM>&r}%q4Uvnq(*?9T^t*6Bw^PSn?vasLy^S5zvQ_S$=O)xB0{(klAHabpT^S8p`T<4KHDTecLId$vqb#Z%B&d%MV zRgBx?xD7v!1NWxq#dKa9)#tEHKP-+arsn{?Huxn6KWPp=n-znPjo}9zy&gco+6Sfk zXfUp?yX&ercQ+Ts)L}DMj@%qna^uQjwc$l^E@+(Il)a0=?C=U}0qc{i;fv9{m>o_h zw`jrQY?(|BuPQulf`F&L9rb~}r^Qe1xZgWGeuXCINS!VB;`sQ*Z*JqUJKS---51BC zs&m81psKdq$u9W1cR&{O4_oVPe&NHydMr&N=fzU*=_s4h-@@3Rf|8k_+9==iYLfA#jb?>gAhecbYWtKi&t?mB?30eT(m zRY3f*|I6M1;OiY8{nmkiee4qNRf7DnD`>i{pLF5_;3%tS`(J?)z4G!B(o!if*qS0- zb&rd|c`@TI&JoJt<$Nn(=!O?tMo|v~`nlN#H-ERg2VMGHb&GQDzI7e;{p=pEx>twj zg~*2;2=(wnAokOS7vS$oX9a^>2D-f+OyGz|EADi+e*ly14YO)XL1gEw2*{y8Mk>*#^DMHU#~K1)zQl^_zs&dE`?Nm}Dm+DiiyVY+IoLjt-E4slFbW zT4wtCW-$9$oU8M8omJIJ_48f%6YS)tE${HVI($2r=}%NP4I8@Yf*m0j1^g3;aj>^9 z>hY<2UJdKd-6`yV+dC14r~7AuFT9rdGQLC9v%x?;P{u?9+p^URR|;N6h=cN=M1XYb zIyKW&UM23~toX1-U%%z{4-ep@PGN|+HsS)Eo~?N_m{mpZ@_c_hEz}q;Fnx%@WIDn# zZx{VDEuH#rzxSG(k7*DM0&451g>Ptvq;Gk?0G9o6HRtHy3cW=}TaI+<%BdKnv+In; zlcL2ItD(*p5QE+VRkYi1&DT3EV7sQAxj)w2ZDc|aJ6VFFmx#eZal>ddz`EvE`sd?$ z_heqq3U_h~-+9^X!KD=|BAnvelllA^Cd-IXa|aoO;P|l&Fu_L%R}KgB;%!yTR6#nA z*93GKB|1XTEKu$O(vD!T=0<6F-DTsh%@k+rIRHrrxF-@r_#oulWOt&7U^tmgSgUT$ zx?yB@jt`%&yk;THZuCZ|(GT1bhzN}ZU1PG@iVG57t#nu7%HFj40ee#z)p=*-3}eP| zm;ex{&J}mKL-+JzTy-)i>kEx_p$t~ALAX|1CmAEwxGoNvth~KChYMIJC5a}q`FWpm zLbH;QtvZ${OER>nO)9HCkewA*lfe)yglAHngPl&5Ai|%a^`V&iYD7IeVhY^|C|so# zosi5Su=Hh#5Kw}Vqw%bov*0kmpD4`^9x28*&~t{aVXbXPBgAF>iw<@ym#NZjScq*#h%|~ z2>|fs@RfTeg$|l+p-*QF@!R-8cH++`&%)2A@=FRrzmMNbg$4;Ma8E*ZUB@EvFjSH| zaSiOZ5MYeSwt6MeeUH_U{TFwg;In16DF8Xa^34Mv z9;Bs_R014jN-GpA|MY=Qim>MY29+Pl0>rnR$23hCgEE!kTnjn`abJ34)*RqVV+Ws` zy%v)i%}Zu=)as+=tGQF%Z%U5QG(ELM1o1&?d(Mj?77Vr|dgb8-9p0v|{;8_&@2t5B z*?%-f5V1D5yMv;NDAsoLiR4z*3Jz~@Ze0SK_ksYX$I8c;=$@t)I^lZ(F2pf zfo6YBXE58WDx-Ai<|Pf}SS%3ACzi!&OsbYo5@W4fpd3_NEA?=C-T`ANI<|NHrQ3FCFH(3C5jzt8$qK%YnT&LZxT%EsEM3LQl!i3Vv&GC z$nQvT-=m{@<<)KHrh9gc-0Cdon)X>V0f2Rn=7>B*3Ijn&Y(#(QLt;Zu*X1k}(sf%9 zt?eK9xih(jGXZ3%xG$+dVOL>UA_ZDD8;{&gp#@4v!exmKd*pF)#(-y(_mw8ikUVO3!)`QfMu@-3Uxb*c#Q+tf z`g=bS49K>d0E?6PUGzvGOMv708p9#1ARhc)#9`Y7Wm=e%NHHqMm!e{Aw)LUUs1Su?KCPMYOQJ#eLNtMtemm4b_p9n8KT(wOp__m9v z{ECCGfQ3{8Aa*dA$7E_W7I2?+`>0ZpZ)?J7bVwNCNkTxDP%g}%i8Qs2b=8Q0w^O<4 z5CboiPNb$zWNJ0h`Wk6^-bJVWGio?%=Ln1yOr zoh(7HHE{rWa5}pN`iJG7;2%xz%rm4^v9J&QMEhttqTdzd7oslj| zQD`1$5&W5U$lDtrcmy**HJeM48ZYAu0rtx%=l9F0rNEkXe}qnK9l>&T(PBqTPv$s>Y51viW3kRMRsX=DRk$d zw;Xti1_@BEO`yb$(Q(#cMe(%AfYCvc`KOt?7fCT^wod?0Mu&?iKvtkhggBePb^sr- z{szP+(v5VNA&e{~vLw=UH7m~sXSl^vT_HQGQ1+kS6sYD%!Ih!i!$%MONdadmAH@$t zS;OrRc4Zm^fMVE`2TD3GwMuCW!jwFOSu5)Xu^}8G$elE07;#1#fg?|p?5#0#fjFn4 z42pt}QUq_8<_HI!YSZlk9(73^$bg4`TmM0!XT=SjOwebJTc$4Br=~@43@G|2!b|6J z$!JtUNcOZk0^&z`0iY|h;sYX&*$RbM&LmV!637*{1teA$fi`9_zJScj=#UWEBObyh zab*eyT~_AFB+IRS~>}?|NrK5R75-${psibR=bIqi{?c2b% z^t>k6)_9IC))NLqmy(rYbda7Uy{!fx;1uHpNgUVUo(M8!_fPkC{I_F=ncX+#c|1n~ z1Qbq@pZbx22d9Cpne=eyvfKaT3Wfql$9@V5^GQ?{x#0U3Ex8wyVIA7os#i`XgR81Y zHv2~e1jpi6`=}56%jU&{0Kap>1?nfo1^?m1g~Wo8B$@efad}c)j^WG7DX!lM3%o2) zNSK@J<-2A~!}7ujjszf~X)J>iKOTemn~1KMA*~NL#bAlETVk6}?>Z;bZ75E#bdXC~ zpO3X{yJ?>mME#isx0t8R$$_OvW$8&obV6(c=lO8^Vb-HH$dewyQe}>Y%SRyI+*!P0 zYbH9a0}T>-=q06Go2`4@5dj%Q>Au(%azGQ@hIqrf!z%Kq@?0uRNNs|^1e?fZj8Rsd zf@?HZNx2Y@u)5;%vAKCa-vI4wwCwHVO>%9{n`%S9rTCy>Eiv=-&V8r>DQ;AMn;OLl z3!Po+hJ=E$i;+-Js{<{fmg9l?bKam=hV!;}d#Ag3%l_fvQQp#fAyiA`6Wm0is8pxo z^IslqDe1E*Oa^OHd?DCNM{A%KSx`GZvEUhM57S`Up3oSQ@)>;^p(XH!BvTER!0rLb zO@Qp2Nj_SDnHagupk)pbJt)9NYe(0prmbQ1mb=D~jD0=7mSJ%Z_ZGdx9quaI;J@pJ z>U_u@5;5RmoL%s}pGT^+xSQVk!(FSz9;fD;Vr>~wMnXzl4Bp230^Tq7`5c5m1+m>` z+{*ziNU~r!%}h2@B~ft6Z)#KvX1RW}xl}h(%?#QtB(1x(=+ewHFjL}Tm%UpdXBz6U&1j^+{`Q0}23UjOWyaO*VZ3qtq1)2?|z1awt%dnBE~F87iQaLS5E zUYe&Y$$U!5OA$8Sjj7k zWkd$IVr3x>Ev-Vv|A)xhH)Rw^2PV_7M3WD4JhaAlbZ`PT|RoJtHHo6?d-a|GB#z)H_Sw9=)WJLtdb6bOWi?qzu{q7(*p5#%3_ zKU^T0D!T8;;-m{Q{EqFr&Gy}tF+~?e$MZ>TWiGTU?RXEP=zbbk<1-zj*Xfnca%4?| z#A9m$sm+Rz&j-Lo(3K~wiKO0%7julSjFwQgdoeyoF*d+XQ_8bhki~a2(N6^H9)vLe z&?JSf(Qd>+Js(WP&?No}0ajkk(-=BxXjT<7U4itG%MRJ<^`uyTS)SiU$!j&dk^&j- z5oQ`zoX(=)VD>$?N+#q>ZL}`dVxiSaeNFq^YMl+{9hQt}gm8I6sT2v6*-uO3NLWRs zmJ>DWcI_q2$S^gj$-1bos}jwvn8#os?&lI}`Ndlm@8by)+kTYZ;f00Iw#$COcVNrw zxj#0wYe~WDc_{6)iW(a{TPt>SQS>i*y5%pB28Wg@G~du}EMh~0DG3pO17yAMFBhz6 zSq4MA?+HAnuwmgHgcO*ERt6K$9?K?!OE`xM{bHMB5rbB* zu8knuRrmtHxA+>sV94uWd@FF^v>Up73G29{5);d^QLB{uvZ4STTxGK4h_&>*LzsKF(A5g|~)Yo~%&^&n?a zR{n~014UPU&Yp0Don~NOWgzd8(-=u|fTE&GxA`QM%kOOUPJkK}P`qa^#zZJ$0?Y%} z2o%J5)uj!8$-4cyyYBH#*7q%*lJaQ{gC>N0t2l1Fwsf|SBXj(Tn*RueN^g|TT)b7f zeJ?oTp$h>2n^qx$!4RAjiFg_ibAL7>aU=K;c{k_1H(SOA9R1CReo{~Ihdy_)J<-fu0h_wX zlW!c>T;BJDyP>T?3tL2+6$gAYB`L$)tNg#{k`)-bp#E>HTcVdy^lSHow1X6;LM8W` zEZ#XO1~VA*`Ngcf{=mOQQjg^aV;J^?`fH|qfEP3K4{A`UDOBno7=0%Gft|K3c%B#C2P(W;$Dg0-Yw#Kdz8-li{n?(n7c@gbs}4%yworzjC5-lUhE`jtpw5 zLj<~7jX-B0>yU&`-aOgiK^Uw9`bPPyO4>T5mFjas!2 zev}gIUU#zhD&FVYNC5I2%kRxZAzyF{CTe~|sC65aLhs$%G~Fw4(9}$S&B<5)%SAsA zXqmOLh{sdIs{57h8hS$HRYJSDdHbhX_@%c}5lDnD zgec-j7yctRPCa7x;PC(Ool{CjxXss)kXU`sy8fIXejSmcx$|bjOII#){G8=3KZS|= z{{_0Nv>dC-!Bv~P!}Z$vt%SU>9JzBnmG7RK@5@UXo14CvicdCZ`Btu`;!;gA5{Oy^_ojv=p+0aPw9{?dC#0y&Bfmg%>;tBBtk4Ol_)2?WKzwi6b zx#!%v<)pi(M-wHfI`{nh&Ue25=R3Fl*Oh~NjmDMzi{YgEeEC+k-y3Ed!%3sj_;dJo zx2BXXxzv59@-wW@yu{n8(-H!nrQNh zukJ_F{kqQccUa$O{CO?$Axdf8U(vds^5bgb?l;iHz`WW(fu(P1-5=rOYksoBFxl0{ zpVj)`L_2`Bpe0Pi(tjtQR~z5f(y!ww{{9&){XcDq7HqkprElQ_bMnLbmGJzg)=7t} z9EknCflsvjEquk_-_?GLTKAcjzV&sf`&(N2ms*F$jm97T^+u!pUVd>t8XvV=2Pgf) zjq@G~h3k#5iTz>W`orVV__RCekA|*$IGRq}XqdaF+9`9J6Ng^YB0oY)_o!Q(9AvFl zTSr{;gG^3B7uR{P{_f`XqTAiuSzCYjcyE2t<&$2vfL^^pwver3=?hpHues|FSL@~$Jy+1md4s!Qkbadg)`;!x=;Ov~`Lj|dG zzOV{39VXB|m}2o?A+(1t3+?v$hn>TP)mfi!6JnH2IHul){PP)S#FnfZE3Jiy%!O@q30R6W| zlm2l(A6GEoANz$x*c<1?WJH4R9+Oi{LIC}vvD@CH*V1j_`lCkMto z{5}!32{M{QW)iso?_h-|c^@L7l!Yb*r-kPolln`0BJZ=7%JI2EX-R|T&1HA5dI_!yl`Puy}`_a$c(mU>Fx3X;c z*3YpJ@DP+j{|QtP)?4H~PyvW&I6XZC-*F2;BCZ7iU_u!K8ZJa?6q7C_H^ph@4o>o- z>f&8)4bLE;ePk@ zY;Sb#-gdh?o7)HLd+uPz-QU~0|0CD=;qLmo@8AFE;pY46+xwe4+wP{@d-uWa=11#W z`a?D)Z8&4s ztwsYEISic=RIGn#nY4KZ_EAKd49cF3gTcKxVroAo*g7 z?S0^Kn2%ST*dcxo4q$++I&RBw#D4eOgPonN_50iUkOmF4**)V9qkZg|D>tp{*fWP6 zlrNnC3}7lt0iguuG7{Wy-Ja8f>Fv%zt=Iz^?^(;W95|k%V`;#9O?$8ZhIx;s7sLTH zwTjrT+GB*v8CM!6Cx2T z<~NsHD%74i15lX-)&&oOa6(=*KE# zEXstg+gEJ3_tZ6Xo&EO~O8(1-J($Fp76O9$qCc7zV&sjm(_`?;6LAA59^FL_j6sPM zkS3gdQ@pRuAvi946>b}QzEatyOfhP55UJ81?LSzmz%h1lh8#wnsNDRZF&km zRSU=C(Wx6}XCtvp3VwlYb&PG}Bt-aROxFm}|=rEt0Q`OBl&xE5txdBf`d}`Pne}E--AZYpCDvJmfhOfMkwh3q`AKR z(D}}*t%uXo(+dhOacjX5AQ{l3I4c04v{%g(fQ3LhIqDZ@gYE^$=={Vxjnpp|V^IH5 zC<=oiv_m6>2;1$Bi+t_$XiE&`xFk|)jy{RpUN4^n4RFN8NW++r7Q`v+B5on6ojUee zpDv47>v1);y{MGQxX+#=Fa_l8DSNTqgt|wRMjz5j7lQ?~yd`y(kNJ>hE1W^vU^=}h zFm)UmiDFTFyhMF*0%?e8VU?A3x=6nmOj!lxk#XgssmS2Wf-<@T$VdqVthRQ__ypFB zC1Q9O25<<01P)AHdDMkE<@`$?g$buwtbx{u8j9=}ZKvO4+U~L9@#~F+q<`k%+-mHh zVy&qbst_ zlptE>h_r)Q5&}yI*+5KrRx*o0O&qur2;e^@A5G6>V??CEFcHxskpRc=K0U=w6h>=_ zsrLTP!^d0e3kcT+0a!vQ5(@qgiJB;|z#B0m@vr=+(>{m>Bh#9VWo4`V`0S`V$rU~N zUCDYvcBlk=EMjcrqU{1fK~@$BU+L3gG#&TyrQQhMTbPl;xz*l~=oFL+`LPU_gs7GK z9rqLb^U)pBVc-|oXBJ7^L3Cp@Tv~DaG82r#qnxAf<){1kX}>pugMv_bX}~5Gv-=K_ zf)*pfPq>OOh7*%T_fVrP&;}5l78>E4v{d#H0ntw|t{n|gE7(5 z9nh49XfG!Zi=jd2=IzS{#Ch;Dl8s4gYIo-TbTZ-*3q|+^2x5Q(819nDB|20xwd@f{ zRAQ?a!V}ylv6j(=g1a)8ID(AL*qAs~!vf1um0T6@I)c@jS#)7P5R9#WTm$huWYJuQ z*c*2dL{4eAd_Ld6Kb%66YWTO~TxS+ax{x1VpNV(r($8ay-rf zAt}KV--G4`CNLvi4$>e^VVxZGE9}BkUxm4G+aRJ8j4zyWg^}%IXT5{^=P07 z{Q&-PYS;?15YJv#a5Ew8xiR}^IMUhiU1QoyYiik4J&IttxB`Q5CjfB?4P=BcYM71s z05;)iA{1n{P~$G0PTC@ppiwZWi_`7^=l~5Nc%Q>57%w3_L|Ys<9B@lHHzghyn@k%X z*3Rfs6)^>xjt8UZ6z-{vMEMui20Lz_p>;%t5sP6^fhMz@Lyp0D#EbQU1`y7QPr)=8 z8gK-Hn3X>QK1pRpT+hg#zMjvX_F))eV)Ga;5!Z}>KjNVZ4^q;AIAN6o0Jw`-(VPg?v3yTzB0`6e(^U7p5m@#)BfSp ztlP^FuWH{vgh<5!I(m`=x)4D@QN(r?wokCsXNb0xv&H0MkS{%%!V97=q4EoR1{#?3 zC)0@p!-@-p4o+P$I-Z=Lr$Qv@qgDFxXh80Ty z*5>mZ4l`Xzv66`s##bSFhokdF$6n*yPTYCg3S}|QrwAzYhjV5qgC;t9IXI@DosSm~m^+WUn1+6! zc_L)p0?q(}jk#+BWf~a3mo|`{PJk`Dz#8LOsw>J6)1)oDu4iBfuvwN8VoSONS`GL{ zh1Km3Aa|R~%ke5?5>OmW*kmTvB#a2k##B}!?w=8y2n=e{tkr%55+vPJrHyh?kTu@3 z$XZ}w=K0{?-{eOq{V6S33XzqprKLMr3A|sQV)Yj}g#3-hP5UD4h*?U%QPv;Cc#=WPFjn&)i)Px1VftBq?~{X;GN1ugxSek5~ntZB`2 zj&)ai%QCMv-T@{t@^`fHp4Q0*Ty6Z1nh`j%AivR&>@q7=*8WX2kyfFx>_#ZrLTsRQ zoyW-VyIQh3Cf{L7tNYVQ9TVYDH?wl<%5L!vbt6$73s1`C0;1h)&4>Mzh zR-}91s?qpMNy+xkAWcgt-0h^Fr3XsCnVB(N(%A57lRQZ3oR$o)e=Vs?ci>@ESDBKS zNjdmN)HozT8UR<5I!=Pwg?a?uWr0i7<$fVR3+Sr~GyE+SwoQDzP}wkEQfVIs-Q4W(2#L@hCx zw5$&H-DowiQIpd3q?EQaEX>G{N7^TOPP7QZ11H<=8GTrZ6j&nAs52Re0@TFVpP+)~ z_rLgOR~ldE`ATeoKmRYk#*wz?!19mr9CF)f^|wHfXgo8~Pv`XhhuYgH{dch`7|XVe z_(SP^?fS23Mu>F4O|6z)t;|1{kZfcz5*i*Cf)Z2xN(sQIsKe@Rr{d#t%WxteNEz3bHoLL4^)rGOc58T5EKM3d ztK3Gpo~+hP6zgYWTEA4-%CyLrXLsa^>nK(-ycjH2XQdQ_X4YB1RB1_vFvF|K4Btzj zPVpjxg?_bA8!Xn+FlZ&ii(!H#)L-X(RkCpj5Rp_t%XHdEe4#ESx0Ku4I??|G-~GYw zDIb3W&Sb*JrKe02z9DQaP?BM7F*d&~^t%eFl}yT8%ak-_p+OrNq}I=nUfWOL4zs5O zU|VOS7@n+@YO!<+j2vb}5cdTCQbm0`+Kd^o5eU?}eiSuMBn0YPNu90B`lZksjtw8y z&q@Znl^$SBe3d4FiVOqR&r0dO8M9cOjrnZ=gTHNs)9P$*tn~e)?k$~N1Z$XGP#wgZ zm0r_+R{D;Xgnz5{svsnY#gy99I@?nll>N%u?*+kaT0JOnuXu!w~u#$8S)L0=_W%ioOJ!a*G?Jyvc?sL`MV@0CP zY=lr-G9EFAA13_-vw>yJ^|F@V)0W@Tl{zh1T{@-0RvB z_t7}Pn_6ea@Lhm|er7q->MKY2ds;Hp{D)eyQC?3*`Q-AIn^c~+^1+;yb4^u@5L5p~ z=eD)3Y004cyINY&t^+L@%>Q0X*6%;efqC9uf2u`U(Y?&lo;PZYXLr+GVp z^+ZdyOSUfy+VbD(M*s1Ik>Z%mmy=YG+81&y1Ro^pdx^>=j0-v9t;X`=nimqCJFL3qwdS=} zYxDhGq}ocHTihoG;}ITRw6g?!PH_makGLx`$rsCv8vBk9&2Yn)_w(V@3b?4YwzIu| z&}!mj2+94o?tX*`w>J3o;YX{jCQ@+m70;SY*QJp4dUK)G++>?&X~QHtO{+{> zth33AAI4hXJej9gK7m$-dccOaD-92E!X}wEano(KT+(SV>-H#Q1S6?ZPO;=h6%#3V zl+E-Prm<<#KIbY=i)Dq$nXjyePxSDXu(w(VKiXYyH9ZV(yS??boxO+GTFoZYoBbI* z!tVZ<9yM~aq)fkUH6==q{X|+)t9kA-;q<;E@O|i?=ru(Ft+ygwR?S zBp^Y~xZO&SLD0DO|xIX(jVu zlo!miVDmg&Pv;>w`Qhy*2`-Wd4GErOtj^+_={a(jAjNk`=a-{xPj1B47rChscCETk zda;6AwQ+xIe;vrz4dL{if}4TGErC^eDPjp1t-+^drjFdAklT~~%wHB>-SNVx?`_*g zW`8V@6i|T;)EOx*wIXbT0m1zQAlPqqKq^-eI#osju`CEJU~l)4q*e-n>;eOJ45zqPr+{uBSE`ffN@J01kp_J%(KH zMWh`Z^(WarugAN6$wJB2aOp8`lO{z~N8R}~^kswN+3}?fOxatkH)4kwhE&c;j@-Gi z@qJYgt!WNNHn*qv>K)>jYV^cWe!$;Op_|+qy)`wqrL@0y~)V)gC74aT+8q*Tc zBC7~6G|VQbfFQ&-WD65OZE30kq>TK5xMto13=E{F_!I{boJ|ijv`r~8 zk7*a+4)IIqvYV#M#H24LDe?g>-C)9Ja)(9dk`0P^y7Th${N%EEm`Wn1l5H_k`S%3? zRCIv8loN?XqD|f|@(%2E)kz*%`~KtSlsH7l?u&hVKU!r0dsdBi|ga z$Y7>4u6F1xkyrp^yiWTB*^_*`4PQ8tfm7)`W?Mtf_2~ZALFew>$jSt@2ML?X-s<&> znk-ATDPM5^0?a4Uw|c*^)hx~bCT~9QiUlv(cJUq(e)sOn?Ul&q>d%TYvwZ-sq-L_~ zkcLfahfuHQ;|`ME1mPxvlt4u1qelG*F?Yt<@o)`TY5B1F<@bq!_1kS#9@Oj^)v_inu zVBYu^{Sj~e)p3C#FENlKx46_rmntKQJL4Tm5!Rb(z3!mrFR-eJRp?192#8QE{rJ|$ zG~8LbasP%$@1`s*Zc`BHH1B8IQjOW5l=foKTKO%va$CweUZtq5y|LdEw(14z2XnA{^Ybb02+d&_WFCHO3mYHe_%NhC&;pWV%zp@`K_vUQ&)mQkblpYn>`R$4Rq?ys^FogcwAB0IXYiuxD- z&Bv+edn#7se;wGnJnxD8E2TjyCdzzQ@kpwAO|I|Eii*@nKvpwiiscIyX725Kt=T)F zT3YdOGU2nWjYU^Ljg+#Z)vVEr8;C^+i!AdMH8dB36D$$Q4pOBN7#2K$LpUNCSXCmm zl$f{VB!rAn0bWKklNbj`dgpCHDplSYfhf~E{)ju6V(5<4iukPaMl*ZMQZ$yXc%}xP%2Yqzt4Lrr`mi4qd69S%?83<3o+b z7N`!$9tbJxWWWyvlK#PNZ49P(0hC<@OKl?CC}Vgof?(PXYb*(Omd<&FL|=8rJC|Z) z5hT6CZ7+E!2>`^v)b#;g@*ordWZMfPz^1m8>#`qS{^%m)RSG%11CN!kZV3_1HTAW- z60Ghsa8x4Za+)Y(8-cB>+#cQ|QDf);*>lX>8fzigyCf7Ccd-Bf|CH?P#d@$SR)Nm$ zkz7%NY#t*$U%r<;ynAbV_a5(-vkQ-4c)3dYumFZHe(*qFLP27{yyWd$*!Mb=nXQag zqzr9Q@*?(e)hx*4N?Jvj z7GW%yjHscCNAiN{IMMtPgP?UFRg?J|i=9vwd+GVGS~ZW^6Q|cN z)6wI~gZHTiiJj&2kH7~p;cKx)Tq0+T&j2>d*9xV20(Pvuf~Q7Jyzsp{UW?4yjiu5U zL1+o1lwzNEg(D>~^tZc8AJZ!aV@@3Qheo7A9I;DSL1YI{e!P&c=KdM*c>WMoz17OZCU_#q#Mg=30HKRH@L6x& z+bz5i1hE#b0aw7ez9qLJ8?uO3eE!_OeFPkr;f)sjcs4pdj@8+Gqz1yK_XE49=B(2D zMQ@whGymsad!cmXlD&lojw_{Hp1G8Bhqj@3v?fe}F3n^pA(MH-$bn$VimYZ+Buvgkk1|f0b zCr#BOX%gx=c4W!})3VbX;*1Fsc*7>iOTVzyRoe8kUrL>_Ve2k(Et*VV80UC>gO9~u zK2Xg2To=`j30F@Im+$Y4k56RAem_v^cO9U$$N3ZJ_Ho-@sDQH%*=`jRFXU|C9UEYr z{Q?B)(k{neYLQ5Qp;Q^ED$y&jH-l>-BF9HjIoE0&H1!q!yz>RRCY(3RsANew1B-&I z{#mOT9}Wb;SDv&|v_aqNKr)V(0`ZZ>NVP`*QgmiENDFpuz*yn|El0=kam0lXx0sPLBB*YPw6suVif`0Tq63sx*vFRZ1 zE-EbrmyZ$33a@bWsUAN5yz<)Rr!YDRX$QOw8kEslOkK-M?dnoX&srEDG-|*a-588O zZ2`;h#_EkyCrZd{e~qA2MUbfe)It!|BwLJA3W3Iasw14D;-wJbjS70cq)^%pSZoD=+8#(S3q=4fx)zg~ zCh`y9sm?sv+(;iu4wM(LT<$!Z&LbjKW(J(-GyN_+;TzADok3IBcG!N%LaHDN(WFo# z2AV$5w9fR|hnokF(kELxJG<$Vwfll2Pisy3PKsaAW2rTx7!GaeAjNHyAaapD8Qs$;wR`DP7_+?{wQa3Ny08NYr6{J8C1ir;ntKyR= z^v&>@B2^Am^rhu|(Rg50dAB&zdiVlFd&fWDg6Q#0D+F5=Z#jyy+wBeTavLq+8OXwq z*yJx9A(7YR*(qQAi7g3jG8n^q{U;}IH1h1jN)<@&Lq2~r`}~n1JI@ddJHq?Ml0iBA zBYBQr63DY>{i4rzlA#UFa&H{T(IjOAk0%MA;$N5H4QFf(kjSGoqq7&ShF17jw-`ZX zcG5q>QBi=H%)vuBAj4P8E?VhZm-tdEHyNF*{W2j6Or?&tS_1XCgjKm2ryP*1O=j9F zu=HniRBG0WKJf&&!V*9VKpfD*uQs_F35yrXNFAmcnNj)il}X510cmh9!*B-RP1C3nXdFquwh%p{Tsq*6G1L2>l?rIF!m zo-q3AWYI5Q6un?AUtAKs#8SSbAX2jVqH;)k*V_bM3@I4~Zz-jC1ZCn2J}>gOE8aE8 z+^D-k{hSm3D&}75&`>u~8ULy}G9JEPun*&hRd?Z+=EV4EB{4sQ{*#vk>urzP+$v~& z?~M4nm^H6V#)+CZq)5L+crXfcF{3IkeHFZ4nCawYZ=1qE@n>qHxk8$;$$!m$LK>8xPb9p_%lDaYW2rmx;$I}~ioy-KUC5Q+ zac|JbM>8ZY5?uMl6Y`J!F$AByDRsRQF-UFvt(=KHBm54k9imx0sRElNT<|1L^^bB` zx*j#L%cG7E{z&+gcR^=*Q$v|#FoSspK22+uTo#H6`N>iM?SEWIkV3Vj^WU)Gjg)S* zqiCSs?-P}nf&r2cLrL%Y>8^y+8mkofg1!cwW=I|5m6=7jO#G_jn|_&T!wY!+QXD)z zzMMKhiTz+eF_1pM_2`&m;+1q((HJZ&q1LDY7^#SeavRQnTFo#T2^_bN($ zt16IJf#Y#%Ip^a1j$*W>OHL#R2R6P)X;w(qsz4MT9)s^o$q41hydjKKxO$S%7h!_!I}iG+f_T(g>No z%q9b2>C@DEmUGSEL23({ZNx)zMFtHQ1Va%3qO9uPqwi-=MKZJNNuZy`_%;u5h>55UU|_`6zy zSt3?W8@$q#u#*Bz$$EJ=+*&XVW`QBh88dMmSn&iUTq?Q)tV|hH(L4uKtiOy#eZiH+ zkU(c#zSI@J)L3WZZbZaIbsJh9ETmjj!*M(T#fiY_=M7-b@L(|Wyir$DEPZkOreze0 zc_KGJSFcm-<m^s)9T!XWpV@NJvdKhbkN4Y3Tv_;-NDb;tWE=!$h;fQZX<=NRPZGrRRV~!K`J2Kf>d!ojiz~56BDHyLTk{1 zLc#i@@fToDgj(2**;f?kmIqnn@kUh7l5PoLu@J(2if^ro&@J*JJ`dCu7MrSYY2d_^ zOL_LCnN*)kCE~nepJz;^vjwtFyfF)J0)u6yg6Cb|J4B4VcB>`7h?}Fu*J>3AO|fU< z1EJN2&WIMUJ!EW9_fX}Xsl(D3e>ifd&mC|HZ0 zHa!@H+#-f^(3|H%i6RhWwCDR!O}Ilu41Gy3K>E&<2-)s3U&<>FG3P%GSoEA<6HvCB z0m&O$UND;~GJ$d?U~0orW3q0Ezr8ocYk=Ny%N_`m327!nNuo2k3A$~y zW`|403(S@BoN3MCS2aZC;rj)Ls8VAg3QvjvE`RuiD&sA z&iTSS#>_>S7IS{BH5{TtL5Dm1x@MTsUp`IGuj*wt^j9!ZkE9TOYNbLB!CbPOZm~~3 zKec@olm&rBX9E9x+T=xrw345EVx7i1%P^-`nr59K5fMKV#Cv&V^lW1~l%M?8xK!%D zudHaK50|SorpPS5CN5T6NdUy7WcWvTUELBcV&PDimS;NR9sD8=kMq?hgew^C49nZ* zbj5zWeVl^V1L`m-fI?^!3W%>RL}5h=d|4n02#TSGZzDtjZW{`G;~)weT6j$h%R0gx zD`~^mt%PU-y1k)Ot=y8*n_9P`{q9=HrY3fPoZHfpP@$lJ5GoXOd_skS4o|31FhB?v zOF9I>VyOg+r4lTb?iyHO6Lt~CwbujkSL1LGlPJawC)*E2`0~dYiKo-nguX?$x&9tW zUu#!-1O{wdfcpgsU;k-}m9~I)-~TFz^QWy=3Xdw>0v8I_X1ae8Z1w znRz;_uLX7tT)v+X5aD;&1F*{hTFK6<^t|nRGF5|Xc@TFE)0VE94jwNE)a_Tp+>EZ1 zpQk^{`Lnw6Ba7uSKqUsK Date: Wed, 7 Dec 2016 14:03:07 +0000 Subject: [PATCH 051/241] Silly me, it's a .sh, not a .pl., temporarily have buildall pick up the new .sh. --- src/tools/make/buildall.pl | 6 +++--- src/tools/make/getbranch.pl | 14 -------------- src/tools/make/getbranch.sh | 5 +++++ 3 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 src/tools/make/getbranch.pl create mode 100644 src/tools/make/getbranch.sh diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index e8b6ac1c..b1a022a0 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -15,12 +15,12 @@ my %machines = ( "cygwin" => ['-p5932 dave@wax', "", "oberon/cygwin/voc", "export CC=gcc && make full;" . "cd ~;" . "sh start64.sh \\\"cd oberon/cygwin/voc &&" - . "src/tools/make/getbranch $branch &&" + . "src/tools/make/getbranch.sh $branch &&" . "export CC=gcc && make full;\\\""], "mingw" => ['-p5932 dave@wax', "", "oberon/mingw/voc", "export CC=i686-w64-mingw32-gcc && make full;" . "cd ~;" . "sh start64.sh \\\"cd oberon/mingw/voc &&" - . "src/tools/make/getbranch $branch &&" + . "src/tools/make/getbranch.sh $branch &&" . "export CC=x86_64-w64-mingw32-gcc && make full;\\\""], "android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"], "lub64" => ['dave@vim', "sudo", "oberon/voc", "make full"], @@ -62,7 +62,7 @@ unlink glob "log/*"; for my $machine (sort keys %machines) { my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && src/tools/make/getbranch $branch && $sudo $mkcmd\" "; + my $cmd = "ssh $login \"cd $dir && git checkout -f && perl src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; logged($cmd, $machine); } diff --git a/src/tools/make/getbranch.pl b/src/tools/make/getbranch.pl deleted file mode 100644 index 32ff1927..00000000 --- a/src/tools/make/getbranch.pl +++ /dev/null @@ -1,14 +0,0 @@ -#!perl -w -use strict; -use warnings; - -# Exit with a clean enlistrment in the named branch. - -my $branch = "master"; -if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} - -set -x -git reset --hard # Clear the staging area -git clean -dfx # Remove all untracked files -git pull # Update the local repository -git checkout -f $branch # Switch to requested branch diff --git a/src/tools/make/getbranch.sh b/src/tools/make/getbranch.sh new file mode 100644 index 00000000..dc3b3ef4 --- /dev/null +++ b/src/tools/make/getbranch.sh @@ -0,0 +1,5 @@ +set -x +git reset --hard # Clear the staging area +git clean -dfx # Remove all untracked files +git pull # Update the local repository +git checkout -f $1 # Switch to requested branch From da1ad6e871f9450043f86fd0a54a00bc3cbeacba Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 14:05:04 +0000 Subject: [PATCH 052/241] I'm still making a mess of the auto build scripts. --- src/tools/make/buildall.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index b1a022a0..e16d277d 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -62,7 +62,7 @@ unlink glob "log/*"; for my $machine (sort keys %machines) { my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && git checkout -f && perl src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; + my $cmd = "ssh $login \"cd $dir && git checkout -f && src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; logged($cmd, $machine); } From 2e436a2d9e1f10a2f913a25984f6dad71db6db30 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 14:06:39 +0000 Subject: [PATCH 053/241] More fiddling with auto build scripts. --- src/tools/make/buildall.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index e16d277d..42733f1d 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -62,7 +62,7 @@ unlink glob "log/*"; for my $machine (sort keys %machines) { my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && git checkout -f && src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; + my $cmd = "ssh $login \"cd $dir && git pull && git checkout -f && src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; logged($cmd, $machine); } From d18008eafa32b81b015be515646b020165ed9950 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 18:57:55 +0400 Subject: [PATCH 054/241] Beautifier compiled --- src/tools/beautifier/Beautifier.Mod | 86 ++++++++++++++++------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/Beautifier.Mod index 0a822d43..c87712d6 100644 --- a/src/tools/beautifier/Beautifier.Mod +++ b/src/tools/beautifier/Beautifier.Mod @@ -1,6 +1,6 @@ MODULE Beautifier; -IMPORT FoldElems, Fonts, Oberon, Out, Strings, TextFrames, Texts, Viewers, MenuViewers; +IMPORT Oberon, Out, Strings, Texts; CONST Tab = 09X; LF = 0DX; @@ -23,7 +23,7 @@ VAR fC, lC: ARRAY 23 OF INTEGER; hashT: ARRAY 51 OF Keyword; -PROCEDURE (VAR k: Keyword) Init (s: ARRAY 10 OF CHAR; class: SHORTINT); +PROCEDURE (VAR k: Keyword) Init (s: ARRAY (*10*) OF CHAR; class: SHORTINT); BEGIN COPY(s, k.word); k.class := class @@ -66,7 +66,7 @@ BEGIN END END END passProcHead; - +(* PROCEDURE MarkedViewer (): TextFrames.Frame; VAR v: Viewers.Viewer; BEGIN @@ -77,17 +77,17 @@ BEGIN RETURN NIL END END MarkedViewer; - +*) PROCEDURE NoNotify (t: Texts.Text; op: INTEGER; beg, end: LONGINT); END NoNotify; PROCEDURE ParseCmdLine (VAR bText: Texts.Text; VAR oldNotifier: Texts.Notifier); VAR beg, end, time: LONGINT; - f: TextFrames.Frame; + (*f: TextFrames.Frame;*) par: Oberon.ParList; s: Texts.Scanner; t: Texts.Text; - +(* PROCEDURE OpenText (fileName: ARRAY OF CHAR; VAR t: Texts.Text; VAR f: TextFrames.Frame); VAR menuF: TextFrames.Frame; v: Viewers.Viewer; x, y: INTEGER; BEGIN @@ -97,13 +97,21 @@ BEGIN Oberon.AllocateUserViewer(0, x, y); v := MenuViewers.New(menuF, f, TextFrames.menuH, x, y) END OpenText; +*) +PROCEDURE OpenText (fileName: ARRAY OF CHAR; VAR t: Texts.Text); +BEGIN + NEW(t); + Texts.Open(t, fileName); +END OpenText; BEGIN oldNotifier := NIL; par := Oberon.Par; Texts.OpenScanner(s, par.text, par.pos); Texts.Scan(s); IF s.class = Texts.Name THEN (* Called by filename *) - OpenText(s.s, bText, f) + (*OpenText(s.s, bText, f)*) + OpenText(s.s, bText) + (* ELSIF (s.class = Texts.Char) & (s.c = "*") THEN (* Called by selected viewer *) f := MarkedViewer() ELSIF (s.class = Texts.Char) & (s.c = "^") THEN (* Called by selection *) @@ -114,17 +122,18 @@ BEGIN OpenText(s.s, bText, f) END END + *) (* commented out oberon system specific parts. -- noch *) END; - IF f # NIL THEN + (*IF f # NIL THEN bText := f.text; oldNotifier := f.text.notify; bText.notify := NoNotify ELSE Out.String("Could not find TextFrames.Frame. Program aborted."); Out.Ln; HALT(99) - END + END*) END ParseCmdLine; - +(* PROCEDURE GetFontsFromText (bText: Texts.Text; VAR expNamFnt, cmtFnt: Fonts.Font); VAR r: Texts.Reader; @@ -145,7 +154,7 @@ BEGIN Strings.Insert("i", i, italicfont); cmtFnt := Fonts.This(italicfont) END GetFontsFromText; - +*) PROCEDURE UpdateText (bText: Texts.Text; oldNotifier: Texts.Notifier); BEGIN IF oldNotifier # NIL THEN @@ -273,7 +282,7 @@ BEGIN END END END IndentCheck; - +(* PROCEDURE ChangeFont (bText: Texts.Text; expNamFnt, cmtFnt: Fonts.Font); VAR s: Texts.Scanner; ch: CHAR; oPos, pos: LONGINT; exp: BOOLEAN; noExpLine: INTEGER; @@ -316,21 +325,22 @@ BEGIN END END END ChangeFont; - +*) PROCEDURE Format*; VAR - bText: Texts.Text; oldNotifier: Texts.Notifier; expNamFnt, cmtFnt: Fonts.Font; + bText: Texts.Text; oldNotifier: Texts.Notifier;(* expNamFnt, cmtFnt: Fonts.Font;*) BEGIN bText := NIL; oldNotifier := NIL; ParseCmdLine(bText, oldNotifier); IF bText = NIL THEN - Out.String("Usage: Beautifier.Format * | ^ | Filename.Mod"); Out.Ln + (*Out.String("Usage: Beautifier.Format * | ^ | Filename.Mod"); Out.Ln*) + Out.String("Usage: beautifier Filename.Mod"); Out.Ln ELSE - GetFontsFromText(bText, expNamFnt, cmtFnt); + (*GetFontsFromText(bText, expNamFnt, cmtFnt); FoldElems.ExpandAll(bText, 0, TRUE); - ChangeFont(bText, expNamFnt, cmtFnt); + ChangeFont(bText, expNamFnt, cmtFnt);*) IndentCheck(bText); - FoldElems.CollapseAll(bText, {FoldElems.tempLeft}); + (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier) END END Format; @@ -384,16 +394,16 @@ BEGIN IF bText = NIL THEN Out.String("Usage: Beautifier.RemSemicolons * | ^ | Filename.Mod"); Out.Ln ELSE - FoldElems.ExpandAll(bText, 0, TRUE); + (*FoldElems.ExpandAll(bText, 0, TRUE);*) RemSemicolons(bText); - FoldElems.CollapseAll(bText, {FoldElems.tempLeft}); + (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier) END END RemoveSemicolons; PROCEDURE FoldProcedures (bText: Texts.Text); - VAR s: Texts.Scanner; start, end: LONGINT; procName: ARRAY 24 OF CHAR; err: BOOLEAN; ch: CHAR; e: FoldElems.Elem; te: Texts.Elem; + VAR s: Texts.Scanner; start, end: LONGINT; procName: ARRAY 24 OF CHAR; err: BOOLEAN; ch: CHAR; (*e: FoldElems.Elem;*) te: Texts.Elem; BEGIN Texts.OpenScanner(s, bText, 0); Texts.Scan(s); @@ -404,7 +414,7 @@ BEGIN start := Texts.Pos(s); (* --- Read to end of line *) Texts.Read(s, ch); - WHILE (ch # LF) & ((s.elem = NIL) OR ~(s.elem IS FoldElems.Elem)) DO Texts.Read(s, ch) END; + WHILE (ch # LF) & ((s.elem = NIL)(* OR ~(s.elem IS FoldElems.Elem)*)) DO Texts.Read(s, ch) END; te := s.elem; (* --- find end of procedure *) @@ -420,7 +430,7 @@ BEGIN END; (* --- Check, whether Procedure has not yet been folded *) - IF (te = NIL) OR ~(te IS FoldElems.Elem) THEN + (*IF (te = NIL) OR ~(te IS FoldElems.Elem) THEN (* --- Insert FoldElems *) NEW(e); e.mode := FoldElems.expRight; e.W := FoldElems.elemW; e.H := FoldElems.elemH; e.handle := FoldElems.FoldHandler; e.visible := TRUE; Texts.WriteElem(w, e); Texts.Insert(bText, end, w.buf); @@ -428,14 +438,14 @@ BEGIN e.handle := FoldElems.FoldHandler; NEW(e.hidden); Texts.OpenBuf(e.hidden); e.visible := TRUE; Texts.WriteElem(w, e); Texts.Insert(bText, start, w.buf); Texts.OpenScanner(s, bText, end) - END + END*) END ELSIF (s.class = Texts.Name) & (s.s = "BEGIN") THEN (* Fold Module-Body *) start := Texts.Pos(s) - 1; Texts.OpenReader(s, bText, start); (* --- Read to end of line *) Texts.Read(s, ch); - WHILE (ch # LF) & ((s.elem = NIL) OR ~(s.elem IS FoldElems.Elem)) DO Texts.Read(s, ch) END; + WHILE (ch # LF) & ((s.elem = NIL)(* OR ~(s.elem IS FoldElems.Elem)*)) DO Texts.Read(s, ch) END; te := s.elem; (* --- Find end of Module *) @@ -447,7 +457,7 @@ BEGIN END END; (* --- Check, whether Procedure has not yet been folded *) - IF (te = NIL) OR ~(te IS FoldElems.Elem) THEN + (*IF (te = NIL) OR ~(te IS FoldElems.Elem) THEN (* --- Insert FoldElems *) NEW(e); e.mode := FoldElems.expRight; e.W := FoldElems.elemW; e.H := FoldElems.elemH; e.handle := FoldElems.FoldHandler; e.visible := TRUE; Texts.WriteElem(w, e); Texts.Insert(bText, end, w.buf); @@ -455,7 +465,7 @@ BEGIN e.handle := FoldElems.FoldHandler; NEW(e.hidden); Texts.OpenBuf(e.hidden); e.visible := TRUE; Texts.WriteElem(w, e); Texts.Insert(bText, start, w.buf); Texts.OpenScanner(s, bText, end) - END + END*) ELSIF (s.class = Texts.Char) & (s.c = "(") & (s.nextCh = "*") THEN passComments(s) END; @@ -470,9 +480,9 @@ BEGIN IF bText = NIL THEN Out.String("Usage: Beautifier.FoldProc * | ^ | Filename.Mod"); Out.Ln ELSE - FoldElems.ExpandAll(bText, 0, TRUE); + (*FoldElems.ExpandAll(bText, 0, TRUE);*) FoldProcedures(bText); - FoldElems.CollapseAll(bText, {FoldElems.tempLeft}); + (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier) END END FoldProc; @@ -643,31 +653,32 @@ BEGIN IF bText = NIL THEN Out.String("Usage: Beautifier.SpaceOps * | ^ | Filename.Mod"); Out.Ln ELSE - FoldElems.ExpandAll(bText, 0, TRUE); + (*FoldElems.ExpandAll(bText, 0, TRUE);*) SpaceOperators(bText); SpaceFormParms(bText); RemSpaces(bText); - FoldElems.CollapseAll(bText, {FoldElems.tempLeft}); + (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier) END END SpaceOps; PROCEDURE Beautify*; - VAR bText: Texts.Text; oldNotifier: Texts.Notifier; expNamFnt, cmtFnt: Fonts.Font; + VAR bText: Texts.Text; oldNotifier: Texts.Notifier; (*expNamFnt, cmtFnt: Fonts.Font;*) BEGIN ParseCmdLine(bText, oldNotifier); IF bText = NIL THEN - Out.String("Usage: Beautifier.SpaceOps * | ^ | Filename.Mod"); Out.Ln + (*Out.String("Usage: Beautifier.SpaceOps * | ^ | Filename.Mod"); Out.Ln*) + Out.String("Usage: Beautifier Filename.Mod"); Out.Ln ELSE - GetFontsFromText(bText, expNamFnt, cmtFnt); + (*GetFontsFromText(bText, expNamFnt, cmtFnt); FoldElems.ExpandAll(bText, 0, TRUE); - ChangeFont(bText, expNamFnt, cmtFnt); + ChangeFont(bText, expNamFnt, cmtFnt);*) IndentCheck(bText); RemSemicolons(bText); FoldProcedures(bText); SpaceOperators(bText); SpaceFormParms(bText); - FoldElems.CollapseAll(bText, {FoldElems.tempLeft}); + (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier); END END Beautify; @@ -715,5 +726,6 @@ BEGIN Texts.OpenWriter(w); NEW(b); Texts.OpenBuf(b); - InitHashTable + InitHashTable; + Beautify END Beautifier. From 9f6c788219572da97e3aa0ab767a39ad5cc2e417 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 19:31:48 +0400 Subject: [PATCH 055/241] texts module can save plain ascii files with CloseAscii function. --- src/runtime/Texts.Mod | 80 +++++++++++++++++++++++++++++ src/tools/beautifier/Beautifier.Mod | 1 + 2 files changed, 81 insertions(+) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index f20750d9..d6af078e 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -877,5 +877,85 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Files.Rename(name, bak, res); Files.Register(f) END Close; + PROCEDURE StoreAscii* (VAR r: Files.Rider; T: Text); + VAR r1: Files.Rider; u, un: Run; e: Elem; org, pos, delta, hlen, rlen: LONGINT; ecnt, fcnt: SHORTINT; ch: CHAR; (* << *) + fno: SYSTEM.INT8; + msg: FileMsg; iden: IdentifyMsg; + mods, procs: ARRAY 64, 32 OF CHAR; + fnts: ARRAY 32 OF FontsFont; + block: ARRAY 1024 OF CHAR; + + PROCEDURE StoreElem (VAR r: Files.Rider; pos: LONGINT; e: Elem); + VAR r1: Files.Rider; org, span: LONGINT; eno: SYSTEM.INT8; + BEGIN COPY(iden.mod, mods[ecnt]); COPY(iden.proc, procs[ecnt]); eno := 1; + WHILE (mods[eno] # iden.mod) OR (procs[eno] # iden.proc) DO INC(eno) END; + Files.Set(r1, Files.Base(r), Files.Pos(r)); + Files.WriteLInt(r, 0); Files.WriteLInt(r, 0); Files.WriteLInt(r, 0); (*fixup slot*) + Files.Write(r, eno); + IF eno = ecnt THEN INC(ecnt); Files.WriteString(r, iden.mod); Files.WriteString(r, iden.proc) END; + msg.pos := pos; org := Files.Pos(r); e.handle(e, msg); span := Files.Pos(r) - org; + Files.WriteLInt(r1, -span); Files.WriteLInt(r1, e.W); Files.WriteLInt(r1, e.H) (*fixup*) + END StoreElem; + + BEGIN + org := Files.Pos(r); msg.id := store; msg.r := r; (*Files.WriteLInt(msg.r, 0)*); (*fixup slot*) + u := T.head.next; pos := 0; delta := 0; fcnt := 1; ecnt := 1; + (*WHILE u # T.head DO + IF u IS Elem THEN iden.mod[0] := 0X; u(Elem).handle(u(Elem), iden) ELSE iden.mod[0] := 1X END; + IF iden.mod[0] # 0X THEN + fnts[fcnt] := u.fnt; fno := 1; + WHILE fnts[fno].name # u.fnt.name DO INC(fno) END; + Files.Write(msg.r, fno); + IF fno = fcnt THEN INC(fcnt); Files.WriteString(msg.r, u.fnt.name) END; + Files.Write(msg.r, u.col); Files.Write(msg.r, u.voff) + END; + IF u IS Piece THEN rlen := u.len; un := u.next; + WHILE (un IS Piece) & (un.fnt = u.fnt) & (un.col = u.col) & (un.voff = u.voff) DO + INC(rlen, un.len); un := un.next + END; + Files.WriteLInt(msg.r, rlen); INC(pos, rlen); u := un + ELSIF iden.mod[0] # 0X THEN StoreElem(msg.r, pos, u(Elem)); INC(pos); u := u.next + ELSE INC(delta); u := u.next + END + END; + Files.Write(msg.r, 0); Files.WriteLInt(msg.r, T.len - delta); + (*!!!hlen := Files.Pos(msg.r) - org;*) hlen := Files.Pos(msg.r) - org + 2; + Files.Set(r1, Files.Base(msg.r), org); Files.WriteLInt(r1, hlen); (*fixup*) + *) + Files.Set(r1, Files.Base(msg.r), 0); + u := T.head.next; + WHILE u # T.head DO + IF u IS Piece THEN + WITH u: Piece DO + IF u.ascii THEN Files.Set(r1, u.file, u.org); delta := u.len; (* << LF to CR *) + WHILE delta > 0 DO Files.Read(r1, ch); DEC(delta); + (*IF ch = 0AX THEN Files.Write(msg.r, CR) ELSE*) Files.Write(msg.r, ch); (*END*) + END + ELSE Files.Set(r1, u.file, u.org); delta := u.len; + WHILE delta > LEN(block) DO Files.ReadBytes(r1, block, LEN(block)); + Files.WriteBytes(msg.r, block, LEN(block)); DEC(delta, LEN(block)) + END; + Files.ReadBytes(r1, block, delta); Files.WriteBytes(msg.r, block, delta) + END + END + ELSE iden.mod[0] := 0X; u(Elem).handle(u(Elem), iden); + IF iden.mod[0] # 0X THEN Files.Write(msg.r, ElemChar) END + END; + u := u.next + END; + r := msg.r; + IF T.notify # NIL THEN T.notify(T, unmark, 0, 0) END + END StoreAscii; + + PROCEDURE CloseAscii* (T: Text; name: ARRAY OF CHAR); + VAR f: Files.File; r: Files.Rider; i, res: INTEGER; bak: ARRAY 64 OF CHAR; + BEGIN + f := Files.New(name); Files.Set(r, f, 0); (*Files.Write(r, textTag); Files.Write(r, version);*) StoreAscii(r, T); + i := 0; WHILE name[i] # 0X DO INC(i) END; + COPY(name, bak); bak[i] := "."; bak[i+1] := "B"; bak[i+2] := "a"; bak[i+3] := "k"; bak[i+4] := 0X; + Files.Rename(name, bak, res); Files.Register(f) + END CloseAscii; + + BEGIN del := NIL; NEW(FontsDefault); FontsDefault.name := "Syntax10.Scn.Fnt" END Texts. diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/Beautifier.Mod index c87712d6..a8b53f2d 100644 --- a/src/tools/beautifier/Beautifier.Mod +++ b/src/tools/beautifier/Beautifier.Mod @@ -680,6 +680,7 @@ BEGIN SpaceFormParms(bText); (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier); + Texts.CloseAscii(bText, 'test'); END END Beautify; From 886c18303e77b7bde77276a4acc5f6fcae2b6b44 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 19:38:07 +0400 Subject: [PATCH 056/241] added dump text functions to beautifier. --- src/tools/beautifier/Beautifier.Mod | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/Beautifier.Mod index a8b53f2d..a949c5e4 100644 --- a/src/tools/beautifier/Beautifier.Mod +++ b/src/tools/beautifier/Beautifier.Mod @@ -662,6 +662,31 @@ BEGIN END END SpaceOps; +PROCEDURE TextToString(VAR T : Texts.Text; VAR string : ARRAY OF CHAR); + VAR R : Texts.Reader; + ch : CHAR; + i : LONGINT; +BEGIN + COPY("", string); + Texts.OpenReader(R, T, 0); + i := 0; + WHILE Texts.Pos(R) < T.len DO + Texts.Read(R, ch); + IF ch # 0DX THEN string[i] := ch ELSE string[i] := 0AX END; + INC(i); + END; + (*string[i] := 0X;*) +END TextToString; + +PROCEDURE DumpText(VAR t: Texts.Text); +VAR s : POINTER TO ARRAY OF CHAR; +BEGIN + NEW(s, t.len + 1); + COPY("", s^); + TextToString(t, s^); + Out.String(s^); Out.Ln; +END DumpText; + PROCEDURE Beautify*; VAR bText: Texts.Text; oldNotifier: Texts.Notifier; (*expNamFnt, cmtFnt: Fonts.Font;*) BEGIN @@ -680,7 +705,8 @@ BEGIN SpaceFormParms(bText); (*FoldElems.CollapseAll(bText, {FoldElems.tempLeft});*) UpdateText(bText, oldNotifier); - Texts.CloseAscii(bText, 'test'); + (*Texts.CloseAscii(bText, 'test');*) + DumpText(bText) END END Beautify; From e6532bfe234afa0095e1246a9b64fa0cd506ce9f Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 19:40:08 +0400 Subject: [PATCH 057/241] reverted back Texts module changes. --- src/runtime/Texts.Mod | 82 +------------------------------------------ 1 file changed, 1 insertion(+), 81 deletions(-) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index d6af078e..305b225d 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -341,7 +341,7 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** IF (ch = 0AX) & u(Piece).ascii THEN ch := CR (* << LF to CR *) ELSIF (ch = CR) & u(Piece).ascii THEN (* << CR LF to CR *) pos := Files.Pos(R.rider); Files.Read(R.rider, nextch); - IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END + IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END END ELSIF u IS Elem THEN ch := ElemChar; R.elem := u(Elem) ELSE ch := 0X; R.elem := NIL; R.eot := TRUE @@ -877,85 +877,5 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Files.Rename(name, bak, res); Files.Register(f) END Close; - PROCEDURE StoreAscii* (VAR r: Files.Rider; T: Text); - VAR r1: Files.Rider; u, un: Run; e: Elem; org, pos, delta, hlen, rlen: LONGINT; ecnt, fcnt: SHORTINT; ch: CHAR; (* << *) - fno: SYSTEM.INT8; - msg: FileMsg; iden: IdentifyMsg; - mods, procs: ARRAY 64, 32 OF CHAR; - fnts: ARRAY 32 OF FontsFont; - block: ARRAY 1024 OF CHAR; - - PROCEDURE StoreElem (VAR r: Files.Rider; pos: LONGINT; e: Elem); - VAR r1: Files.Rider; org, span: LONGINT; eno: SYSTEM.INT8; - BEGIN COPY(iden.mod, mods[ecnt]); COPY(iden.proc, procs[ecnt]); eno := 1; - WHILE (mods[eno] # iden.mod) OR (procs[eno] # iden.proc) DO INC(eno) END; - Files.Set(r1, Files.Base(r), Files.Pos(r)); - Files.WriteLInt(r, 0); Files.WriteLInt(r, 0); Files.WriteLInt(r, 0); (*fixup slot*) - Files.Write(r, eno); - IF eno = ecnt THEN INC(ecnt); Files.WriteString(r, iden.mod); Files.WriteString(r, iden.proc) END; - msg.pos := pos; org := Files.Pos(r); e.handle(e, msg); span := Files.Pos(r) - org; - Files.WriteLInt(r1, -span); Files.WriteLInt(r1, e.W); Files.WriteLInt(r1, e.H) (*fixup*) - END StoreElem; - - BEGIN - org := Files.Pos(r); msg.id := store; msg.r := r; (*Files.WriteLInt(msg.r, 0)*); (*fixup slot*) - u := T.head.next; pos := 0; delta := 0; fcnt := 1; ecnt := 1; - (*WHILE u # T.head DO - IF u IS Elem THEN iden.mod[0] := 0X; u(Elem).handle(u(Elem), iden) ELSE iden.mod[0] := 1X END; - IF iden.mod[0] # 0X THEN - fnts[fcnt] := u.fnt; fno := 1; - WHILE fnts[fno].name # u.fnt.name DO INC(fno) END; - Files.Write(msg.r, fno); - IF fno = fcnt THEN INC(fcnt); Files.WriteString(msg.r, u.fnt.name) END; - Files.Write(msg.r, u.col); Files.Write(msg.r, u.voff) - END; - IF u IS Piece THEN rlen := u.len; un := u.next; - WHILE (un IS Piece) & (un.fnt = u.fnt) & (un.col = u.col) & (un.voff = u.voff) DO - INC(rlen, un.len); un := un.next - END; - Files.WriteLInt(msg.r, rlen); INC(pos, rlen); u := un - ELSIF iden.mod[0] # 0X THEN StoreElem(msg.r, pos, u(Elem)); INC(pos); u := u.next - ELSE INC(delta); u := u.next - END - END; - Files.Write(msg.r, 0); Files.WriteLInt(msg.r, T.len - delta); - (*!!!hlen := Files.Pos(msg.r) - org;*) hlen := Files.Pos(msg.r) - org + 2; - Files.Set(r1, Files.Base(msg.r), org); Files.WriteLInt(r1, hlen); (*fixup*) - *) - Files.Set(r1, Files.Base(msg.r), 0); - u := T.head.next; - WHILE u # T.head DO - IF u IS Piece THEN - WITH u: Piece DO - IF u.ascii THEN Files.Set(r1, u.file, u.org); delta := u.len; (* << LF to CR *) - WHILE delta > 0 DO Files.Read(r1, ch); DEC(delta); - (*IF ch = 0AX THEN Files.Write(msg.r, CR) ELSE*) Files.Write(msg.r, ch); (*END*) - END - ELSE Files.Set(r1, u.file, u.org); delta := u.len; - WHILE delta > LEN(block) DO Files.ReadBytes(r1, block, LEN(block)); - Files.WriteBytes(msg.r, block, LEN(block)); DEC(delta, LEN(block)) - END; - Files.ReadBytes(r1, block, delta); Files.WriteBytes(msg.r, block, delta) - END - END - ELSE iden.mod[0] := 0X; u(Elem).handle(u(Elem), iden); - IF iden.mod[0] # 0X THEN Files.Write(msg.r, ElemChar) END - END; - u := u.next - END; - r := msg.r; - IF T.notify # NIL THEN T.notify(T, unmark, 0, 0) END - END StoreAscii; - - PROCEDURE CloseAscii* (T: Text; name: ARRAY OF CHAR); - VAR f: Files.File; r: Files.Rider; i, res: INTEGER; bak: ARRAY 64 OF CHAR; - BEGIN - f := Files.New(name); Files.Set(r, f, 0); (*Files.Write(r, textTag); Files.Write(r, version);*) StoreAscii(r, T); - i := 0; WHILE name[i] # 0X DO INC(i) END; - COPY(name, bak); bak[i] := "."; bak[i+1] := "B"; bak[i+2] := "a"; bak[i+3] := "k"; bak[i+4] := 0X; - Files.Rename(name, bak, res); Files.Register(f) - END CloseAscii; - - BEGIN del := NIL; NEW(FontsDefault); FontsDefault.name := "Syntax10.Scn.Fnt" END Texts. From 1e15d47936a3cdfc2f21fe5a54cc3148b014e443 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 19:43:45 +0400 Subject: [PATCH 058/241] renamed to vbeautify, added makefile. -- noch --- src/tools/beautifier/makefile | 4 ++++ src/tools/beautifier/{Beautifier.Mod => vbeautify.Mod} | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 src/tools/beautifier/makefile rename src/tools/beautifier/{Beautifier.Mod => vbeautify.Mod} (99%) diff --git a/src/tools/beautifier/makefile b/src/tools/beautifier/makefile new file mode 100644 index 00000000..2108b547 --- /dev/null +++ b/src/tools/beautifier/makefile @@ -0,0 +1,4 @@ +VOC = /opt/voc/bin/voc + +all: + $(VOC) -m vbeautify.Mod diff --git a/src/tools/beautifier/Beautifier.Mod b/src/tools/beautifier/vbeautify.Mod similarity index 99% rename from src/tools/beautifier/Beautifier.Mod rename to src/tools/beautifier/vbeautify.Mod index a949c5e4..6480dbcf 100644 --- a/src/tools/beautifier/Beautifier.Mod +++ b/src/tools/beautifier/vbeautify.Mod @@ -1,4 +1,4 @@ -MODULE Beautifier; +MODULE vbeautify; IMPORT Oberon, Out, Strings, Texts; @@ -755,4 +755,4 @@ BEGIN Texts.OpenBuf(b); InitHashTable; Beautify -END Beautifier. +END vbeautify. From fd27239b2d10bec24536b5288126ee65a1184851 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 7 Dec 2016 19:47:51 +0400 Subject: [PATCH 059/241] changed help to conform to the binary name. -- noch --- src/tools/beautifier/vbeautify.Mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/beautifier/vbeautify.Mod b/src/tools/beautifier/vbeautify.Mod index 6480dbcf..ef38edba 100644 --- a/src/tools/beautifier/vbeautify.Mod +++ b/src/tools/beautifier/vbeautify.Mod @@ -334,7 +334,7 @@ BEGIN ParseCmdLine(bText, oldNotifier); IF bText = NIL THEN (*Out.String("Usage: Beautifier.Format * | ^ | Filename.Mod"); Out.Ln*) - Out.String("Usage: beautifier Filename.Mod"); Out.Ln + Out.String("Usage: vbeautify Filename.Mod"); Out.Ln ELSE (*GetFontsFromText(bText, expNamFnt, cmtFnt); FoldElems.ExpandAll(bText, 0, TRUE); @@ -693,7 +693,7 @@ BEGIN ParseCmdLine(bText, oldNotifier); IF bText = NIL THEN (*Out.String("Usage: Beautifier.SpaceOps * | ^ | Filename.Mod"); Out.Ln*) - Out.String("Usage: Beautifier Filename.Mod"); Out.Ln + Out.String("Usage: vbeautify Filename.Mod"); Out.Ln ELSE (*GetFontsFromText(bText, expNamFnt, cmtFnt); FoldElems.ExpandAll(bText, 0, TRUE); From 442f377b7e606a7bbd661c4944d54f19c7de824b Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 16:29:01 +0000 Subject: [PATCH 060/241] New autobuild process --- src/tools/autobuild/build-oberon.sh | 23 +++++++++++++ src/tools/{make => autobuild}/buildall.pl | 39 ++++++++++------------- src/tools/{make => autobuild}/postpush.pl | 4 +-- src/tools/autobuild/update-webserver.sh | 9 ++++++ src/tools/make/getbranch.sh | 5 --- 5 files changed, 50 insertions(+), 30 deletions(-) create mode 100644 src/tools/autobuild/build-oberon.sh rename src/tools/{make => autobuild}/buildall.pl (74%) mode change 100755 => 100644 rename src/tools/{make => autobuild}/postpush.pl (84%) mode change 100755 => 100644 create mode 100644 src/tools/autobuild/update-webserver.sh delete mode 100644 src/tools/make/getbranch.sh diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh new file mode 100644 index 00000000..90a37d1b --- /dev/null +++ b/src/tools/autobuild/build-oberon.sh @@ -0,0 +1,23 @@ +# Build Oberon +# +# Args +# +# $1 - whether to use sudo +# $2 - build directory +# $3 - CC + +if test "$1" = "sudo"; then sudo=sudo; else sudo=""; fi + +echo Testing: \$1="$1", \$2="$2", \$3="$3", \$sudo="$sudo" +exit + +set -x +cd $2 + +$sudo git reset --hard # Clear the staging area +$sudo git clean -dfx # Remove all untracked files +$sudo git pull # Update the local repository +$sudo git checkout -f $1 # Switch to requested branch + +export CC=$3 +$sudo make full \ No newline at end of file diff --git a/src/tools/make/buildall.pl b/src/tools/autobuild/buildall.pl old mode 100755 new mode 100644 similarity index 74% rename from src/tools/make/buildall.pl rename to src/tools/autobuild/buildall.pl index 42733f1d..f14b07ca --- a/src/tools/make/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -10,26 +10,20 @@ my $branch = "master"; if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['pi@pie', "sudo", "projects/oberon/vishap/voc", "make full"], - "darwin" => ['dave@dcb', "sudo", "projects/oberon/vishap/voc", "make full"], - "cygwin" => ['-p5932 dave@wax', "", "oberon/cygwin/voc", "export CC=gcc && make full;" - . "cd ~;" - . "sh start64.sh \\\"cd oberon/cygwin/voc &&" - . "src/tools/make/getbranch.sh $branch &&" - . "export CC=gcc && make full;\\\""], - "mingw" => ['-p5932 dave@wax', "", "oberon/mingw/voc", "export CC=i686-w64-mingw32-gcc && make full;" - . "cd ~;" - . "sh start64.sh \\\"cd oberon/mingw/voc &&" - . "src/tools/make/getbranch.sh $branch &&" - . "export CC=x86_64-w64-mingw32-gcc && make full;\\\""], - "android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"], - "lub64" => ['dave@vim', "sudo", "oberon/voc", "make full"], - "lub32" => ['dave@vim-lub32', "sudo", "oberon/voc", "make full"], - "fed64" => ['dave@vim-fed64', "sudo", "oberon/voc", "make full"], - "osu64" => ['dave@vim-osu64', "sudo", "oberon/voc", "make full"], - "ob32" => ['root@nas-ob32', "", "vishap/voc", "make full"], - "ce64" => ['-p5922 obe@www', "sudo", "vishap/voc", "make full"], - "fb64" => ['root@oberon', "", "vishap/voc", "make full"] + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc'], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang'], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc'], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc\''], + "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc'], + "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc\''], + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc'], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc'], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc'], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc'], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc'], + "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc'], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc'], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc'] ); @@ -61,8 +55,9 @@ sub logged { unlink glob "log/*"; for my $machine (sort keys %machines) { - my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && git pull && git checkout -f && src/tools/make/getbranch.sh $branch && $sudo $mkcmd\" "; + my ($port, $login, $cmd) = @{$machines{$machine}}; + my $cmd = "scp -P $port build-oberon.sh $login:build-oberon.sh &&" + . "ssh -p $port $login \"$cmd\""; logged($cmd, $machine); } diff --git a/src/tools/make/postpush.pl b/src/tools/autobuild/postpush.pl old mode 100755 new mode 100644 similarity index 84% rename from src/tools/make/postpush.pl rename to src/tools/autobuild/postpush.pl index 5bfe0ffb..07397517 --- a/src/tools/make/postpush.pl +++ b/src/tools/autobuild/postpush.pl @@ -41,9 +41,7 @@ if ($buildneeded) { writelog "Started buildall, pid = $child."; # parent process } else { close(STDIN); close(STDOUT); close(STDERR); # child process - system 'echo Syncing voc>postpush.log'; - system '(cd voc; git reset --hard; git clean -dfx; git pull; git checkout -f ' . $branch . '; git pull; git checkout -f) >>postpush.log'; - exec 'perl voc/src/tools/make/buildall.pl ' . $branch . ' >/tmp/buildall.log'; + exec 'perl buildall.pl ' . $branch . ' >/tmp/buildall.log'; exit; } } else { diff --git a/src/tools/autobuild/update-webserver.sh b/src/tools/autobuild/update-webserver.sh new file mode 100644 index 00000000..e4fe79dc --- /dev/null +++ b/src/tools/autobuild/update-webserver.sh @@ -0,0 +1,9 @@ +# Push buildall and postpush to postpush server + +set -x +for f in postpush.pl buildall.pl; do + scp -P 5922 $f root@www:/var/lib/nethserver/ibay/githubhook/$f + ssh -p 5922 root@www "chmod +x /var/lib/nethserver/ibay/githubhook/$f" +done; +ssh -p 5922 root@www "ls -lap /var/lib/nethserver/ibay/githubhook" + diff --git a/src/tools/make/getbranch.sh b/src/tools/make/getbranch.sh deleted file mode 100644 index dc3b3ef4..00000000 --- a/src/tools/make/getbranch.sh +++ /dev/null @@ -1,5 +0,0 @@ -set -x -git reset --hard # Clear the staging area -git clean -dfx # Remove all untracked files -git pull # Update the local repository -git checkout -f $1 # Switch to requested branch From 0313c3030715ee89f0b508c869fcbd48fef72f36 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 16:42:59 +0000 Subject: [PATCH 061/241] Working on build system --- src/tools/autobuild/update-webserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/autobuild/update-webserver.sh b/src/tools/autobuild/update-webserver.sh index e4fe79dc..b55144ca 100644 --- a/src/tools/autobuild/update-webserver.sh +++ b/src/tools/autobuild/update-webserver.sh @@ -1,7 +1,7 @@ # Push buildall and postpush to postpush server set -x -for f in postpush.pl buildall.pl; do +for f in postpush.pl buildall.pl build-oberon.sh; do scp -P 5922 $f root@www:/var/lib/nethserver/ibay/githubhook/$f ssh -p 5922 root@www "chmod +x /var/lib/nethserver/ibay/githubhook/$f" done; From 2ec543867bf0c4bb1888d04f954eec3e2e963cd9 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 17:03:36 +0000 Subject: [PATCH 062/241] Working on build system --- src/tools/autobuild/build-oberon.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index 90a37d1b..5f26c409 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -8,8 +8,9 @@ if test "$1" = "sudo"; then sudo=sudo; else sudo=""; fi -echo Testing: \$1="$1", \$2="$2", \$3="$3", \$sudo="$sudo" -exit +echo "" +echo === build-oberon.sh: \$1="$1", \$2="$2", \$3="$3", \$sudo="$sudo" === +echo """ set -x cd $2 From 06be24f32f45b4dd7cd492ef49a700f63071d07c Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 17:06:52 +0000 Subject: [PATCH 063/241] Working on build system --- src/tools/autobuild/build-oberon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index 5f26c409..a2925bbc 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -10,7 +10,7 @@ if test "$1" = "sudo"; then sudo=sudo; else sudo=""; fi echo "" echo === build-oberon.sh: \$1="$1", \$2="$2", \$3="$3", \$sudo="$sudo" === -echo """ +echo "" set -x cd $2 From f3ff731794d9c539c222e8606b5336752c6e3cf9 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 17:18:00 +0000 Subject: [PATCH 064/241] Working on autobuild. --- src/tools/autobuild/build-oberon.sh | 5 +++-- src/tools/autobuild/buildall.pl | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index a2925bbc..7dc5096a 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -5,11 +5,12 @@ # $1 - whether to use sudo # $2 - build directory # $3 - CC +# $4 - branch if test "$1" = "sudo"; then sudo=sudo; else sudo=""; fi echo "" -echo === build-oberon.sh: \$1="$1", \$2="$2", \$3="$3", \$sudo="$sudo" === +echo === build-oberon.sh: \$1="$1", \$2="$2", \$3="$3", \$4="$4", \$sudo="$sudo" === echo "" set -x @@ -18,7 +19,7 @@ cd $2 $sudo git reset --hard # Clear the staging area $sudo git clean -dfx # Remove all untracked files $sudo git pull # Update the local repository -$sudo git checkout -f $1 # Switch to requested branch +$sudo git checkout -f $4 # Switch to requested branch export CC=$3 $sudo make full \ No newline at end of file diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index f14b07ca..417fc07c 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -10,20 +10,20 @@ my $branch = "master"; if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc'], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang'], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc'], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc\''], - "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc'], - "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc'], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc'], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc'], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc'], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc'], - "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc'], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc'], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc'] + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc $branch'], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang $branch'], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc $branch'], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc $branch\''], + "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc $branch'], + "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc $branch\''], + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc $branch'], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], + "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc $branch'], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc $branch'], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc $branch'] ); From dab579bdd51766658c16ce6ded2a6addf03f9240 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 17:29:18 +0000 Subject: [PATCH 065/241] Working on autobuild. --- src/tools/autobuild/buildall.pl | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 417fc07c..8ec83d05 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -5,25 +5,23 @@ use POSIX "strftime"; use Cwd; my $branch = "master"; - - if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc $branch'], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang $branch'], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc $branch'], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc $branch\''], - "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc $branch'], - "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc $branch\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc $branch'], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc $branch'], - "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc $branch'], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc $branch'], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc $branch'] + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], + "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], + "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch . '\''], + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); From c41cb011b6cf866a5dbab86b5a4596671cd1a6f3 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 7 Dec 2016 17:39:17 +0000 Subject: [PATCH 066/241] Working on autobuild. --- src/tools/autobuild/buildall.pl | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 8ec83d05..323a19d3 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -8,23 +8,22 @@ my $branch = "master"; if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], - "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], - "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch . '\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], + "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], + "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc x86_64-w64-mingw32-gcc ' . $branch . '\''], + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); - sub logged { my ($cmd, $id) = @_; my $child = fork; From d12393cc8cfa483ac64c7c4dedd7c96846529d34 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 9 Dec 2016 17:47:48 +0000 Subject: [PATCH 067/241] Build to local directory and install as separate optional step. --- .gitignore | 1 + ReadMe.md | 76 +++++++--- doc/Installation.md | 35 +++-- makefile | 20 +-- src/compiler/OPM.Mod | 1 + src/compiler/extTools.Mod | 2 +- src/runtime/Modules.Mod | 58 ++++---- src/tools/autobuild/buildall.pl | 166 +--------------------- src/tools/autobuild/report.pl | 176 ++++++++++++++++++++++++ src/tools/autobuild/update-webserver.sh | 2 +- src/tools/make/addlibrary.sh | 28 ++++ src/tools/make/oberon.mk | 87 ++++++------ 12 files changed, 383 insertions(+), 269 deletions(-) create mode 100644 src/tools/autobuild/report.pl create mode 100644 src/tools/make/addlibrary.sh diff --git a/.gitignore b/.gitignore index 1c2d92dd..cce16916 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /Configuration.Mod /Configuration.Make /build/* +/install/* /*.exe /*.obj /*.[cho] diff --git a/ReadMe.md b/ReadMe.md index b7cfc40e..a3f55f77 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -27,8 +27,16 @@ default libraries complying with the Oakwood Guidelines for Oberon-2 compilers. ## Installation -While pre-built packages are not provided, it is easy to install the Oberon compiler and libraries -with the following simple steps. +It is easy to install the Oberon compiler and libraries +with the following simple steps: + + 1. Install pre-requisites such as git, gcc, static C libraries, diff utils. + 2. Clone the repository and run 'make full'. + 3. Optionally install to a system directory such as /opt or /usr/local/share. + 4. Set your PATH variable to include the compiler binary. + +These are detailed below: + #### 1. Install prerequisites @@ -43,28 +51,57 @@ with the following simple steps. More details, including for MingW and MS C, in [**Installation**](/doc/Installation.md). -#### 2. Build and install the compiler and libraries + +#### 2. Clone and build the compiler and libraries 1. `git clone https://github.com/vishaps/voc` 2. `cd voc` -3. `[sudo] make full` +3. `make full` -Since 'make full' will install the compiler and libraries, it needs root (unix) or administrator (windows) privileges. +`make full` will create an installation directory under your local repository at voc/install. -#### 3. Set your PATH environment variable +`mmake full` runs `ldconfig` to configure the linker to find libraries in voc/install, but you +need to update your program search PATH yourself (see step 4 below). -Set your path to the installed compiler binary location as reported -by make full, e.g. -| System | Set path | -| --------- | -------------------------------------- | -| Linux | `export PATH="/opt/voc/bin:$PATH"` | -| BSD | `export PATH="/usr/local/share/voc/bin:$PATH"` | -| Windows | See [Installation](/doc/Installation.md) | -| Termux | `export PATH="/data/data/com.termux/files/opt/voc/bin:$PATH"` | + +#### 3. Optionally install to a system directory + +Run `make install` as root to copy the voc/install directory to the appropriate directory +for your OS as follows: + +| System | Where `make install` puts the installation | +| ------- | -------------------------------------- | +| Linux | `/opt/voc` | +| BSD | `/usr/local/share/voc` | +| Windows | See [**Windows installation**](/doc/WInstallation.md) | +| Termux | `/data/data/com.termux/files/opt/voc` | + +`make install` updates `ldconfg` with the new library locations. + + +#### 4. Set your PATH environment variable + +Since there are so many ways that different systems and users manage their PATHs, we leave +it to you to update your path to include the compiler binary. + +Both `make full` and `make install` display instructions on setting the path specific to your +system. + +For reference this will be: + +| Installation choice | Set path | +| --------- | -------------------------------------- | +| Just `make full` | `export PATH="your-repository-clone/install/bin:$PATH"` | +| `make install` on Linux | `export PATH="/opt/voc/bin:$PATH"` | +| `make install` on BSD | `export PATH="/usr/local/share/voc/bin:$PATH"` | +| `make install` on Windows | See [**Windows installation**](/doc/WInstallation.md) | +| `make install` on Termux | `export PATH="/data/data/com.termux/files/opt/voc/bin:$PATH"` | Also see [**Installation**](/doc/Installation.md). +The compiler finds the rest of the installation based on the location from which it is loaded. + ## A 'Hello' application @@ -99,12 +136,15 @@ Compile as follows: The -m parameter tells voc that this is a main module, and to generate an executable binary. -Execute as usual on Linux ('./hello') or Windows ('hello'). +Execute as usual on Linux (`./hello`) or Windows (`hello`). -In order to know module's interface, use "showdef" program. + +### Viewing the interfaces of included modules. + +In order to see the definition of a module's interface, use the "showdef" program. ``` - $ showdef Out.sym +$ showdef Out.sym DEFINITION Out; VAR @@ -118,12 +158,10 @@ DEFINITION Out; PROCEDURE Open; PROCEDURE Real(x: REAL; n: INT16); PROCEDURE String(str: ARRAY OF CHAR); - PROCEDURE Ten(e: INT16): LONGREAL; END Out. ``` -Also see [**Compiling**](/doc/Compiling.md). ## Licensing diff --git a/doc/Installation.md b/doc/Installation.md index 7c131005..37840f74 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -2,10 +2,7 @@ The Oberon compiler and libraries may be built and installed on Linux based, BSD based or Windows based systems. -Building on Linux and BSD based systems is reasonably straightforward. First make sure you have the right pre-requites like a C compiler and static libraries installed, then clone the repository and run `make full`. - -Full instructions for a Linux/BSD based build follow in the next section. - +### Windows systems Bulding on Windows is not so simple largely because there is more than one way to do it: @@ -30,8 +27,6 @@ Bulding on Windows is not so simple largely because there is more than one way t For full details about building with Cygwin or native Microsoft C environments see [**Cygwin and MSC Installation**](/doc/Winstallation.md) -The following sections provide more details for Linux based builds. - ### Building the Oberon compiler and libraries on a Linux or BSD based system @@ -42,6 +37,7 @@ This approach is for - All BSD based systems - includes macOS (Darwin) + #### 1. Install pre-requisites The build process has the following pre-requisites: @@ -63,6 +59,7 @@ Example pre-requisite installation commands: On Mac OS (Darwin) just type the git command. OS/X will tell you that it is not installed and ask if you want to install it (say yes). Note that Darwin builds always use clang, the OS will redirect attempts to use gcc to clang. + #### 2. Clone the Oberon compiler repository Create and change to a directory in which to make the compiler and clone with this command: @@ -79,8 +76,8 @@ This will create a subdirectory 'voc' which includes the following files and dir | makefile | Makefile for all BSD- and Linux- like environments. Includes tests. | | make.cmd | Makefile specifically for native Microsoft C builds. No tests. | -#### 3. Build and install the Oberon compiler and library +#### 3. Build and install the Oberon compiler and library ``` cd voc @@ -96,12 +93,9 @@ The makefile will: link the final Oberon compiler. This compiler is then used for the remaining steps. - Build the .sym file browser command `showdef`. - Build all the libraries in -O2 mode, and a subset in -OC mode. - - Install the compiler and libraries by copying them to an appropriate location for your OS. + - Create an installation directory structure local to your copy of the repository. - Run a set of confidence tests. -Since installation directories are not generally write accessible to normal users, is is necessary to run -the `make full` command from a root shell, or by using `sudo`. - The makefile will use either gcc or clang, whichever is installed. If you have both installed you can specify which to use by running either `export CC=gcc` or `export CC=clang` before the `make full` command. @@ -110,15 +104,28 @@ The makefile will use either gcc or clang, whichever is installed. If you have b If the makefile succeeds it will end with instructions on how to set your path variable so that the compiler (voc) is found. -The installation will be found at: + +#### Installing to system directories + +You may optionally install to system directories such as /opt or /usr/local/share. + +First be sure to have completed `make full` successfully. + +Then from a root prompt, or using sudo, run `make install` + +The installation will be made to: | System | Install dir | | ----------------------- | -------------------------------------- | | All types of Linux | /opt/voc | | BSD (including Darwin) | /usr/local/share/voc | -| Termux (android) | /data/data/com.termux/files/opt/voc | | +| Termux (android) | /data/data/com.termux/files/opt/voc | -The installation directory contains: +As with `make full`, `make install` will exit with instructions on how to set +your PATH. + + +#### Installation directory contentains: | Directory | Content | | --- | --- | diff --git a/makefile b/makefile index 12924600..8186e175 100644 --- a/makefile +++ b/makefile @@ -73,8 +73,8 @@ usage: @echo "" @echo " make full" @echo "" - @echo " Does a full, clean build, installs it, and runs confidence tests." - @echo " Requires root access (for the install) except on cygwin." + @echo " Does a full, clean build, and runs confidence tests." + @echo " An installation directory image is left in the local repository install directory." @echo "" @echo "Targets for building and installation:" @echo " make clean - Clean out the build directory" @@ -134,8 +134,6 @@ clean: configuration # full: Full build of compiler and libarary. full: configuration - @make -f src/tools/make/oberon.mk -s installable - @-make -f src/tools/make/oberon.mk -s uninstall @make -f src/tools/make/oberon.mk -s clean # Make bootstrap compiler from source suitable for current data model @printf "\n\n--- Compiler build started ---\n\n" @@ -153,10 +151,10 @@ full: configuration @make -f src/tools/make/oberon.mk -s library MODEL=C @printf "\n\n--- Library build successfull ---\n\n" @make -f src/tools/make/oberon.mk -s sourcechanges - @make -f src/tools/make/oberon.mk -s install + @make -f src/tools/make/oberon.mk -s makeinstalldir @printf "\n\n--- Confidence tests started ---\n\n" @make -f src/tools/make/oberon.mk -s confidence MODEL=2 - @make -f src/tools/make/oberon.mk -s showpath + @make -f src/tools/make/oberon.mk -s instructions assemble: @@ -221,14 +219,16 @@ s3: configuration +# makeinstalldir: Copy built files to local install directory +makeinstalldir: + @make -f src/tools/make/oberon.mk -s makeinstalldir + + # install: Copy built files to install directory install: configuration - @make -f src/tools/make/oberon.mk -s installable - @make -f src/tools/make/oberon.mk -s install MODEL=2 - @make -f src/tools/make/oberon.mk -s showpath MODEL=2 + @make -f src/tools/make/oberon.mk -s install uninstall: configuration - @make -f src/tools/make/oberon.mk -s installable @make -f src/tools/make/oberon.mk -s uninstall diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index de100717..e3383840 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -229,6 +229,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) LogWStr("Oberon-2 compiler v"); LogWStr(Configuration.versionLong); LogW("."); LogWLn; LogWStr("Based on Ofront by J. Templ and Software Templ OEG."); LogWLn; LogWStr("Further development by Norayr Chilingarian, David Brown and others."); LogWLn; + LogWStr("Loaded from "); LogWStr(Modules.BinaryDir); LogWLn; LogWLn; LogWStr("Usage:"); LogWLn; LogWLn; diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 2847768e..d4bb7f84 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -67,7 +67,7 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition Strings.Append(Configuration.objflag, cmd); Strings.Append(moduleName, cmd); Strings.Append(Configuration.linkflags, cmd); - Strings.Append(Configuration.installdir, cmd); + Strings.Append(OPM.InstallDir, cmd); Strings.Append('/lib"', cmd); Strings.Append(Configuration.libspec, cmd); Strings.Append('-O', cmd); diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 15896d21..cfa4bd77 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -112,7 +112,10 @@ MODULE Modules; (* jt 6.1.96 *) VAR i,j: INTEGER; BEGIN i := 0; j := CharCount(d); + (* Append delimiter c to d only if d is either empty or doesn not + already end in c. *) IF (j > 0) & (d[j-1] # c) THEN d[j] := c; INC(j) END; + (* Append s to d *) WHILE s[i] # 0X DO d[j] := s[i]; INC(i); INC(j) END; d[j] := 0X; END AppendPart; @@ -144,7 +147,9 @@ MODULE Modules; (* jt 6.1.96 *) PROCEDURE IsFilePresent(s: ARRAY OF CHAR): BOOLEAN; VAR identity: Platform.FileIdentity; - BEGIN RETURN Platform.IdentifyByName(s, identity) = 0 + BEGIN + (*Out.String("IsFilePresent("); Out.String(s); Out.String(")."); Out.Ln;*) + RETURN Platform.IdentifyByName(s, identity) = 0 END IsFilePresent; PROCEDURE ExtractPart(s: ARRAY OF CHAR; VAR i: INTEGER; p: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); @@ -181,45 +186,50 @@ MODULE Modules; (* jt 6.1.96 *) END; END Trim; - PROCEDURE FindBinaryDir(VAR d: ARRAY OF CHAR); + PROCEDURE FindBinaryDir(VAR binarydir: ARRAY OF CHAR); TYPE pathstring = ARRAY 4096 OF CHAR; VAR - executable: pathstring; - dir: pathstring; - testpath: pathstring; - pathlist: pathstring; + arg0: pathstring; (* The command exactly as passed by the shell *) + pathlist: pathstring; (* The whole PATH environment variable *) + pathdir: pathstring; (* A single directory from the PATH *) + tempstr: pathstring; i, j, k: INTEGER; present: BOOLEAN; BEGIN IF ArgCount < 1 THEN - (* Shells and GUIs always pass the command as ARGV[0]. *) - d[0] := 0X; + (* The caller is misbehaving: Shells and GUIs always pass the command + as ARGV[0]. *) + binarydir[0] := 0X; RETURN; END; - (* First try ARGV[0] without looking at the PATH environment variable. *) - GetArg(0, testpath); Trim(testpath, executable); - Canonify(executable, d); present := IsFilePresent(d); - - IF (~present) & (~IsAbsolute(testpath)) THEN - (* ARGV[0] alone didn't work, try non-absolute ARGV[0] with every entry in path. *) + GetArg(0, arg0); (* arg0 is the command binary file name passed by the shell. *) + i := 0; WHILE (arg0[i] # 0X) & (arg0[i] # '/') DO INC(i) END; + IF arg0[i] = '/' THEN + (* The argument contains a '/', we expect it to work without reference + to the path. *) + Trim(arg0, tempstr); Canonify(tempstr, binarydir); + present := IsFilePresent(binarydir) + ELSE + (* There are no '/'s in arg0, so search through the path. *) Platform.GetEnv("PATH", pathlist); - i := 0; + i := 0; present := FALSE; WHILE (~present) & (pathlist[i] # 0X) DO - ExtractPart(pathlist, i, ":;", dir); Trim(dir, testpath); - AppendPart('/', executable, testpath); - Canonify(testpath, d); present := IsFilePresent(d) + ExtractPart(pathlist, i, ":;", pathdir); + AppendPart('/', arg0, pathdir); + Trim(pathdir, tempstr); Canonify(tempstr, binarydir); + present := IsFilePresent(binarydir) END END; IF present THEN - (* Remove trailing executable file name *) - k := CharCount(d); - WHILE (k > 0) & ~IsOneOf(d[k-1], '/\') DO DEC(k) END; - (* Chop off executable file name *) - IF k = 0 THEN d[k] := 0X ELSE d[k-1] := 0X END; + (* Remove trailing binarydir file name *) + k := CharCount(binarydir); + WHILE (k > 0) & ~IsOneOf(binarydir[k-1], '/\') DO DEC(k) END; + (* Chop off binarydir file name *) + IF k = 0 THEN binarydir[k] := 0X ELSE binarydir[k-1] := 0X END; ELSE - d[0] := 0X (* Couldn't determine binary directory. *) + binarydir[0] := 0X (* Couldn't determine binary directory. *) END END FindBinaryDir; diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 323a19d3..7e74e3b7 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -44,6 +44,7 @@ sub logged { print $log strftime("%H.%M.%S", localtime), " ", $line; } close($pipe); + print $log strftime("%H.%M.%S", localtime), " --- Make completed ---\n"; close($log); exit; } @@ -58,165 +59,8 @@ for my $machine (sort keys %machines) { logged($cmd, $machine); } -while ((my $pid = wait) > 0) {print "Child pid $pid completed.\n";} - - -# # All builds have completed. Now scan the logs for pass/fail and build the passing report. - - -my %status = (); - -my $fn; -my $date; -my $time; -my $os; -my $compiler; -my $datamodel; -my $compilerok; -my $libraryok; -my $sourcechange; -my $asmchange; -my $tests; -my $key; -my $ver; - -sub clearvars { - $time = ""; $branch = ""; $os = ""; $compiler = ""; - $datamodel = ""; $compilerok = ""; $libraryok = ""; $sourcechange = ""; - $asmchange = ""; $tests = ""; $key = ""; $ver = ""; +system("perl report.pl $branch"); +while ((my $pid = wait) > 0) { + print "Child pid $pid completed.\n"; + system("perl report.pl $branch"); } - -sub logstatus { - my ($fn) = @_; - if ($compiler ne "") { - $status{"$os-$compiler-$datamodel"} = - [$fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $asmchange, $tests]; - } - clearvars(); -} - -sub parselog { - ($fn) = @_; - clearvars(); - open(my $log, $fn) // die "Couldn't open build log $fn."; - while (<$log>) { - if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1} - if (/^([0-9.]+) /) {$time = $1} - # 19.39.58 Configuration: 1.95 [2016/07/14] for gcc LP64 on centos - if (/^[^ ]+ Configuration: ([0-9a-zA-Z.]+) \[[0-9\/]+\] for (.+) *$/) { - logstatus($fn); - $ver = $1; - printf "--- Config for $fn: $1 for $2.\n"; - } - if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) { - ($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5); - } - if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Failed";} - if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";} - - if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Failed";} - if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";} - - if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";} - if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";} - - if (/^([0-9.]+) --- Generated code unchanged ---$/) {if ($asmchange eq "") {$asmchange = "Unchanged"}} - if (/^([0-9.]+) --- Generated code changed ---$/) {$asmchange = "Changed"} - - if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Failed";} - if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";} - } - close($log); - logstatus($fn); -} - -opendir DIR, "log" // die "Could not open log directory."; -my @logs = readdir DIR; -closedir DIR; - -for my $logname (sort @logs) { - $logname = "log/" . $logname; - #print "Consider $logname\n"; - if (-f $logname) {parselog($logname);} -} - -my $fontheight = 12; -my $lineheight = 15; - -sub svgtext { - my ($f, $x, $y, $colour, $msg) = @_; - print $f ''; - print $f $msg; - print $f "\n"; -} - -sub colourfor { - my ($str) = @_; - if ($str eq "Failed") {return "#e03030";} - if ($str eq "Changed") {return "#ff9d4d";} - return "#5adb5a"; -} - -my $rows = keys %status; - -my $width = 710; -my $height = ($rows+2.2) * $lineheight; - -open(my $svg, ">build-status.svg") // die "Could not create build-status.svg."; -print $svg '\n"; -print $svg '', "\n"; - -my $col1 = 20; -my $col2 = 97; -my $col3 = 160; -my $col4 = 220; -my $col5 = 280; -my $col6 = 330; -my $col7 = 380; -my $col8 = 440; -my $col9 = 490; -my $col10 = 570; -my $col11 = 650; - -svgtext($svg, $col1, 0, "#e0e0e0", "Date"); -svgtext($svg, $col3, 0, "#e0e0e0", "Branch"); -svgtext($svg, $col4, 0, "#e0e0e0", "Platform"); -svgtext($svg, $col7, 0, "#e0e0e0", "Compiler"); -svgtext($svg, $col8, 0, "#e0e0e0", "Library"); -svgtext($svg, $col9, 0, "#e0e0e0", "C Source"); -svgtext($svg, $col10, 0, "#e0e0e0", "Assembler"); -svgtext($svg, $col11, 0, "#e0e0e0", "Tests"); - -my $i=1; -for my $key (sort keys %status) { - my ($fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, - $sourcechange, $asmchange, $tests) = @{$status{$key}}; - print $svg ''; - svgtext($svg, $col1, $i, "#c0c0c0", $date); - svgtext($svg, $col2, $i, "#c0c0c0", $time); - svgtext($svg, $col3, $i, "#c0c0c0", $branch); - svgtext($svg, $col4, $i, "#c0c0c0", $os); - svgtext($svg, $col5, $i, "#c0c0c0", $compiler); - svgtext($svg, $col6, $i, "#c0c0c0", $datamodel); - svgtext($svg, $col7, $i, colourfor($compilerok), $compilerok); - svgtext($svg, $col8, $i, colourfor($libraryok), $libraryok); - svgtext($svg, $col9, $i, colourfor($sourcechange), $sourcechange); - svgtext($svg, $col10, $i, colourfor($asmchange), $asmchange); - svgtext($svg, $col11, $i, colourfor($tests), $tests); - print $svg ''; - $i++; -} - -print $svg "\n"; - -system 'chmod +r log/*'; -system 'scp build-status.svg dave@hub:/var/www'; -system 'scp log/* dave@hub:/var/www/log'; diff --git a/src/tools/autobuild/report.pl b/src/tools/autobuild/report.pl new file mode 100644 index 00000000..ba457a75 --- /dev/null +++ b/src/tools/autobuild/report.pl @@ -0,0 +1,176 @@ +#!perl -w +use strict; +use warnings; +use POSIX "strftime"; +use Cwd; + +my $branch = "master"; +if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} + +print "--- Running build status report on branch $branch.\n"; + +my %status = (); + +my $fn; +my $date; +my $time; +my $os; +my $compiler; +my $datamodel; +my $compilerok; +my $libraryok; +my $sourcechange; +my $asmchange; +my $tests; +my $key; +my $ver; + +sub clearvars { + $time = ""; $branch = ""; $os = ""; $compiler = ""; + $datamodel = ""; $compilerok = ""; $libraryok = ""; $sourcechange = ""; + $asmchange = ""; $tests = ""; $key = ""; $ver = ""; +} + +sub logstatus { + my ($fn) = @_; + if ($compiler ne "") { + $status{"$os-$compiler-$datamodel"} = + [$fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $asmchange, $tests]; + } + clearvars(); +} + +sub parselog { + ($fn) = @_; + clearvars(); + open(my $log, $fn) // die "Couldn't open build log $fn."; + $branch = "Build on $fn started"; + while (<$log>) { + if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1} + if (/^([0-9.]+) /) {$time = $1} + # 19.39.58 Configuration: 1.95 [2016/07/14] for gcc LP64 on centos + if (/^[^ ]+ Configuration: ([0-9a-zA-Z.]+) \[[0-9\/]+\] for (.+) *$/) { + logstatus($fn); + $ver = $1; + printf "--- Config for $fn: $1 for $2.\n"; + } + if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) { + ($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5); + } + if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Started";} + if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";} + + if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Started";} + if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";} + + if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";} + if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";} + + if (/^([0-9.]+) --- Generated code unchanged ---$/) {if ($asmchange eq "") {$asmchange = "Unchanged"}} + if (/^([0-9.]+) --- Generated code changed ---$/) {$asmchange = "Changed"} + + if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Started";} + if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";} + + if (/^([0-9.]+) --- Make completed ---$/) { + # Go back and convert 'Started' status to 'Failed'. + if ($branch =~ m/^Build on/) {$branch = "Build on $fn failed to start.";} + if ($compilerok eq "Started") {$compilerok = "Failed.";} + if ($libraryok eq "Started") {$libraryok = "Failed.";} + if ($tests eq "Started") {$tests = "Failed.";} + } + } + close($log); + logstatus($fn); +} + +opendir DIR, "log" // die "Could not open log directory."; +my @logs = readdir DIR; +closedir DIR; + +for my $logname (sort @logs) { + $logname = "log/" . $logname; + #print "Consider $logname\n"; + if (-f $logname) {parselog($logname);} +} + +my $fontheight = 12; +my $lineheight = 15; + +sub svgtext { + my ($f, $x, $y, $colour, $msg) = @_; + print $f ''; + print $f $msg; + print $f "\n"; +} + +sub colourfor { + my ($str) = @_; + if ($str eq "Failed") {return "#e03030";} + if ($str eq "Changed") {return "#ff9d4d";} + return "#5adb5a"; +} + +my $rows = keys %status; + +my $width = 710; +my $height = ($rows+2.2) * $lineheight; + +open(my $svg, ">build-status.svg") // die "Could not create build-status.svg."; +print $svg '\n"; +print $svg '', "\n"; + +my $col1 = 20; +my $col2 = 97; +my $col3 = 160; +my $col4 = 220; +my $col5 = 280; +my $col6 = 330; +my $col7 = 380; +my $col8 = 440; +my $col9 = 490; +my $col10 = 570; +my $col11 = 650; + +svgtext($svg, $col1, 0, "#e0e0e0", "Date"); +svgtext($svg, $col3, 0, "#e0e0e0", "Branch"); +svgtext($svg, $col4, 0, "#e0e0e0", "Platform"); +svgtext($svg, $col7, 0, "#e0e0e0", "Compiler"); +svgtext($svg, $col8, 0, "#e0e0e0", "Library"); +svgtext($svg, $col9, 0, "#e0e0e0", "C Source"); +svgtext($svg, $col10, 0, "#e0e0e0", "Assembler"); +svgtext($svg, $col11, 0, "#e0e0e0", "Tests"); + +my $i=1; +for my $key (sort keys %status) { + my ($fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, + $sourcechange, $asmchange, $tests) = @{$status{$key}}; + print $svg ''; + svgtext($svg, $col1, $i, "#c0c0c0", $date); + svgtext($svg, $col2, $i, "#c0c0c0", $time); + svgtext($svg, $col3, $i, "#c0c0c0", $branch); + svgtext($svg, $col4, $i, "#c0c0c0", $os); + svgtext($svg, $col5, $i, "#c0c0c0", $compiler); + svgtext($svg, $col6, $i, "#c0c0c0", $datamodel); + svgtext($svg, $col7, $i, colourfor($compilerok), $compilerok); + svgtext($svg, $col8, $i, colourfor($libraryok), $libraryok); + svgtext($svg, $col9, $i, colourfor($sourcechange), $sourcechange); + svgtext($svg, $col10, $i, colourfor($asmchange), $asmchange); + svgtext($svg, $col11, $i, colourfor($tests), $tests); + print $svg ''; + $i++; +} + +print $svg "\n"; + +system 'chmod +r log/*'; +system 'scp build-status.svg dave@hub:/var/www'; +system 'scp log/* dave@hub:/var/www/log'; diff --git a/src/tools/autobuild/update-webserver.sh b/src/tools/autobuild/update-webserver.sh index b55144ca..58a5e439 100644 --- a/src/tools/autobuild/update-webserver.sh +++ b/src/tools/autobuild/update-webserver.sh @@ -1,7 +1,7 @@ # Push buildall and postpush to postpush server set -x -for f in postpush.pl buildall.pl build-oberon.sh; do +for f in *.pl build-oberon.sh; do scp -P 5922 $f root@www:/var/lib/nethserver/ibay/githubhook/$f ssh -p 5922 root@www "chmod +x /var/lib/nethserver/ibay/githubhook/$f" done; diff --git a/src/tools/make/addlibrary.sh b/src/tools/make/addlibrary.sh new file mode 100644 index 00000000..46e6e3e4 --- /dev/null +++ b/src/tools/make/addlibrary.sh @@ -0,0 +1,28 @@ +# addlibrary - shell script to install/uninstall oberon libraries +# +# $1 - "install" or "uninstall" +# $2 - location containing .so's +# $3 - oberon name + + +if ! which ldconfig >/dev/null 2>&1; then exit 0; fi + +if test -d /etc/ld.so.conf.d; then + + # Linux-like system + # Need to update the ldconfig configuration in the /etc/ld.so.conf.d dir. + if test "$1" = "install"; then + echo $2>/etc/ld.so.conf.d/lib$3.conf + else + rm -f /etc/ld.so.conf.d/lib$3.conf + fi + ldconfig + +else + + # BSD-like system + # Just run ldconfig -m to update the cache. It'll add-to/update/reove-from + # the cache appropraitely for whether they are present opt not. + ldconfig -m "$2" + +fi diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 5c3af6be..553b02f6 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -33,7 +33,7 @@ usage: clean: @printf '\n\n--- Cleaning branch $(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n' - rm -rf $(BUILDDIR) + rm -rf $(BUILDDIR) $(ROOTDIR)/install rm -f $(OBECOMP) @@ -142,68 +142,77 @@ browsercmd: +# makeinstalldir: Use only after a successful full build. Creates an +# installation directory image in $(BUILDDOR)/install +makeinstalldir: + @printf '\nCreating installation image at $(ROOTDIR)/install\n' + @rm -rf "$(ROOTDIR)/install" + + @mkdir -p "$(ROOTDIR)/install/bin" + @cp $(OBECOMP) "$(ROOTDIR)/install/bin/$(OBECOMP)" + @-cp $(BUILDDIR)/showdef$(BINEXT) "$(ROOTDIR)/install/bin" + + @mkdir -p "$(ROOTDIR)/install/2/include" && cp $(BUILDDIR)/2/*.h "$(ROOTDIR)/install/2/include/" + @mkdir -p "$(ROOTDIR)/install/2/sym" && cp $(BUILDDIR)/2/*.sym "$(ROOTDIR)/install/2/sym/" + @mkdir -p "$(ROOTDIR)/install/C/include" && cp $(BUILDDIR)/C/*.h "$(ROOTDIR)/install/C/include/" + @mkdir -p "$(ROOTDIR)/install/C/sym" && cp $(BUILDDIR)/C/*.sym "$(ROOTDIR)/install/C/sym/" + + @cp $(BUILDDIR)/*.Txt "$(ROOTDIR)/install/2/sym/" + @cp $(BUILDDIR)/*.Txt "$(ROOTDIR)/install/C/sym/" + + @mkdir -p "$(ROOTDIR)/install/lib" + @cp $(BUILDDIR)/2/lib$(ONAME)* "$(ROOTDIR)/install/lib/" + @cp $(BUILDDIR)/C/lib$(ONAME)* "$(ROOTDIR)/install/lib/" + + +# instructions: Advice on completion of local build +instructions: FORCE + @printf '\nOberon build and test complete, result is in $(ROOTDIR)/install\n' + @printf '\nYou can use the new compiler by running $(ROOTDIR)/install/bin/$(ONAME),\n' + @printf 'Or add it to your path as follows:\n' + @printf 'export PATH=\"$(ROOTDIR)/install/bin:$$PATH\"\n' + @printf '\n' + + + + FORCE: -# installable: Check for access to the installation directory +# installable: Check for access to the installation directory installable: @rm -rf "S(INSTALLDIR)/test-access-qqq" @if ! mkdir -p "$(INSTALLDIR)/test-access-qqq";then printf '\n\n Cannot write to install directory.\n Please use sudo or run as root/administrator.\n\n'; exit 1;fi @rm -rf "S(INSTALLDIR)/test-access-qqq" +uninstall: installable + @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' + rm -rf "$(INSTALLDIR)" + @sh src/tools/make/addlibrary.sh uninstall \""$(INSTALLDIR)/lib"\" $(oname) # install: Use only after a successful full build. Installs the compiler # and libraries in /opt/$(ONAME). # May require root access. -install: +install: uninstall @printf '\nInstalling into \"$(INSTALLDIR)\"\n' @rm -rf "$(INSTALLDIR)" - - @mkdir -p "$(INSTALLDIR)/bin" - @cp $(OBECOMP) "$(INSTALLDIR)/bin/$(OBECOMP)" - @-cp $(BUILDDIR)/showdef$(BINEXT) "$(INSTALLDIR)/bin" - - @mkdir -p "$(INSTALLDIR)/2/include" && cp $(BUILDDIR)/2/*.h "$(INSTALLDIR)/2/include/" - @mkdir -p "$(INSTALLDIR)/2/sym" && cp $(BUILDDIR)/2/*.sym "$(INSTALLDIR)/2/sym/" - @mkdir -p "$(INSTALLDIR)/C/include" && cp $(BUILDDIR)/C/*.h "$(INSTALLDIR)/C/include/" - @mkdir -p "$(INSTALLDIR)/C/sym" && cp $(BUILDDIR)/C/*.sym "$(INSTALLDIR)/C/sym/" - - @cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/2/sym/" - @cp $(BUILDDIR)/*.Txt "$(INSTALLDIR)/C/sym/" - - @mkdir -p "$(INSTALLDIR)/lib" - @cp $(BUILDDIR)/2/lib$(ONAME)* "$(INSTALLDIR)/lib/" - @cp $(BUILDDIR)/C/lib$(ONAME)* "$(INSTALLDIR)/lib/" - @if which ldconfig >/dev/null 2>&1; then $(LDCONFIG); fi - - - - -# showpath: Describe how to set the PATH variable -showpath: + @cp -rf "$(ROOTDIR)/install/" "$(INSTALLDIR)" + @sh src/tools/make/addlibrary.sh install \""$(INSTALLDIR)/lib"\" $(ONAME) + @printf '\nOberon compiler installed to $(INSTALLDIR)\n' @printf '\nNow add $(INSTALLDIR)/bin to your path, for example with the command:\n' - @printf 'export PATH=\"$(INSTALLDIR)/bin:\$$PATH\"\n' + @printf 'export PATH=\"$(INSTALLDIR)/bin:$$PATH\"\n' @printf '\n' - - -uninstall: - @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' - rm -rf "$(INSTALLDIR)" - rm -f /etc/ld.so.conf/lib$(ONAME) - if which ldconfig >/dev/null 2>&1; then ldconfig; fi - - -runtime: +runtime: FORCE @printf '\nMaking run time library for -O$(MODEL)\n' cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Platform$(PLATFORM).Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod + cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Strings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/In.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/VT100.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Files.Mod @@ -387,7 +396,7 @@ sourcechanges: -RUNTEST = COMPILER=$(COMPILER) OBECOMP="$(OBECOMP) -O$(MODEL)" FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(INSTALLDIR)" +RUNTEST = COMPILER=$(COMPILER) OBECOMP="$(OBECOMP) -O$(MODEL)" FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(ROOTDIR)/install" confidence: @printf '\n\n--- Confidence tests ---\n\n' From c3fc777f6ff4c3421032e08973e91767793897eb Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 9 Dec 2016 17:50:59 +0000 Subject: [PATCH 068/241] Update bootsrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 46 ++++++++++++++++------------ bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 5 ++- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 ++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 46 ++++++++++++++++------------ bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 5 ++- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 ++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 46 ++++++++++++++++------------ bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 5 ++- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 ++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 46 ++++++++++++++++------------ bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 5 ++- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 ++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 46 ++++++++++++++++------------ bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 5 ++- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 ++-- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 340 insertions(+), 295 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 97e4d8e3..2c7543fe 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 7fa2ad3f..aa8e2c43 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index b477d97a..aae60644 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index a177f3e6..e2b5f99d 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index b69b0824..db989ca0 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 0546fa61..fd4d0fc0 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 3d30d5d4..8e773e89 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index c9741737..6b2d80be 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -59,7 +59,7 @@ static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); @@ -289,42 +289,48 @@ static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) typedef CHAR pathstring__12[4096]; -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) { - pathstring__12 executable, dir, testpath, pathlist; + pathstring__12 arg0, pathlist, pathdir, tempstr; INT16 i, j, k; BOOLEAN present; if (Modules_ArgCount < 1) { - d[0] = 0x00; + binarydir[0] = 0x00; return; } - Modules_GetArg(0, (void*)testpath, 4096); - Modules_Trim(testpath, 4096, (void*)executable, 4096); - Modules_Canonify(executable, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); - if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Modules_GetArg(0, (void*)arg0, 4096); + i = 0; + while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + i += 1; + } + if (arg0[__X(i, 4096)] == '/') { + Modules_Trim(arg0, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); + } else { Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); i = 0; + present = 0; while ((!present && pathlist[__X(i, 4096)] != 0x00)) { - Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); - Modules_Trim(dir, 4096, (void*)testpath, 4096); - Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); - Modules_Canonify(testpath, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)pathdir, 4096); + Modules_AppendPart('/', arg0, 4096, (void*)pathdir, 4096); + Modules_Trim(pathdir, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); } } if (present) { - k = Modules_CharCount(d, d__len); - while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k = Modules_CharCount(binarydir, binarydir__len); + while ((k > 0 && !Modules_IsOneOf(binarydir[__X(k - 1, binarydir__len)], (CHAR*)"/\\", 3))) { k -= 1; } if (k == 0) { - d[__X(k, d__len)] = 0x00; + binarydir[__X(k, binarydir__len)] = 0x00; } else { - d[__X(k - 1, d__len)] = 0x00; + binarydir[__X(k - 1, binarydir__len)] = 0x00; } } else { - d[0] = 0x00; + binarydir[0] = 0x00; } } diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index b9e63ee7..e7f2b10f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 99fd666d..6f2b5545 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 3f6ee165..589e67db 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 5e67ae16..bf503129 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 41739672..59d5e057 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index a1587370..ca3cffc1 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -257,6 +257,9 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)"Further development by Norayr Chilingarian, David Brown and others.", 68); OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Loaded from ", 13); + OPM_LogWStr(Modules_BinaryDir, 1024); + OPM_LogWLn(); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Usage:", 7); OPM_LogWLn(); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 7664cc0c..4bd19104 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index ebecc1ea..8a07b672 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index ef56b929..aeb70b16 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 52f0f328..6820f239 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 54edc605..815f29a7 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 23062347..33e6189e 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 68edb67f..f3af656f 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index b266cb63..c1062b81 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 00052c0b..6807e936 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index a0ae3106..87afc49d 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index d2a230b3..20d983e1 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index e282a468..c7d45501 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index a3e32518..ed09ed5c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index bfe15fff..35ecc020 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index ff6ad391..be278393 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 7f5a8fac..b0c053b8 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 2a1ebd5f..3d53c582 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index dd7eb163..e3cefcdc 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 91fa31ed..8be25bb5 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 0d9d3163..8d349c3e 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index c552d82d..494b7318 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 38cd03d5..f9e7e802 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -100,7 +100,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 783d31fb..ee0ea191 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 97e4d8e3..2c7543fe 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 7fa2ad3f..aa8e2c43 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index b477d97a..aae60644 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index a177f3e6..e2b5f99d 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index b69b0824..db989ca0 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 0546fa61..fd4d0fc0 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 3d30d5d4..8e773e89 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index c9741737..6b2d80be 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -59,7 +59,7 @@ static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); @@ -289,42 +289,48 @@ static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) typedef CHAR pathstring__12[4096]; -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) { - pathstring__12 executable, dir, testpath, pathlist; + pathstring__12 arg0, pathlist, pathdir, tempstr; INT16 i, j, k; BOOLEAN present; if (Modules_ArgCount < 1) { - d[0] = 0x00; + binarydir[0] = 0x00; return; } - Modules_GetArg(0, (void*)testpath, 4096); - Modules_Trim(testpath, 4096, (void*)executable, 4096); - Modules_Canonify(executable, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); - if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Modules_GetArg(0, (void*)arg0, 4096); + i = 0; + while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + i += 1; + } + if (arg0[__X(i, 4096)] == '/') { + Modules_Trim(arg0, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); + } else { Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); i = 0; + present = 0; while ((!present && pathlist[__X(i, 4096)] != 0x00)) { - Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); - Modules_Trim(dir, 4096, (void*)testpath, 4096); - Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); - Modules_Canonify(testpath, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)pathdir, 4096); + Modules_AppendPart('/', arg0, 4096, (void*)pathdir, 4096); + Modules_Trim(pathdir, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); } } if (present) { - k = Modules_CharCount(d, d__len); - while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k = Modules_CharCount(binarydir, binarydir__len); + while ((k > 0 && !Modules_IsOneOf(binarydir[__X(k - 1, binarydir__len)], (CHAR*)"/\\", 3))) { k -= 1; } if (k == 0) { - d[__X(k, d__len)] = 0x00; + binarydir[__X(k, binarydir__len)] = 0x00; } else { - d[__X(k - 1, d__len)] = 0x00; + binarydir[__X(k - 1, binarydir__len)] = 0x00; } } else { - d[0] = 0x00; + binarydir[0] = 0x00; } } diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index b9e63ee7..e7f2b10f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 99fd666d..6f2b5545 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 3f6ee165..589e67db 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 5e67ae16..bf503129 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 41739672..59d5e057 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index a1587370..ca3cffc1 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -257,6 +257,9 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)"Further development by Norayr Chilingarian, David Brown and others.", 68); OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Loaded from ", 13); + OPM_LogWStr(Modules_BinaryDir, 1024); + OPM_LogWLn(); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Usage:", 7); OPM_LogWLn(); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 7664cc0c..4bd19104 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index ebecc1ea..8a07b672 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index ef56b929..aeb70b16 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 52f0f328..6820f239 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 54edc605..815f29a7 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 4f83d6ee..8237bf8d 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 68edb67f..f3af656f 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index b266cb63..c1062b81 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 00052c0b..6807e936 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index a0ae3106..87afc49d 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index d2a230b3..20d983e1 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index e282a468..c7d45501 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index a3e32518..ed09ed5c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index bfe15fff..35ecc020 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index ff6ad391..be278393 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 7f5a8fac..b0c053b8 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 2a1ebd5f..3d53c582 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 392a5579..1cca7d56 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index dff59e1e..e36cbaf0 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 0d9d3163..8d349c3e 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index c552d82d..494b7318 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 38cd03d5..f9e7e802 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -100,7 +100,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 783d31fb..ee0ea191 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 97e4d8e3..2c7543fe 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 7fa2ad3f..aa8e2c43 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index b477d97a..aae60644 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 819c6450..ccb4a812 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 9332fd1c..068c1d9a 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index dbfe923d..faed3f24 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index b6d1c177..becc1414 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 2ef36628..e9637cdf 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -59,7 +59,7 @@ static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); @@ -289,42 +289,48 @@ static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) typedef CHAR pathstring__12[4096]; -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) { - pathstring__12 executable, dir, testpath, pathlist; + pathstring__12 arg0, pathlist, pathdir, tempstr; INT16 i, j, k; BOOLEAN present; if (Modules_ArgCount < 1) { - d[0] = 0x00; + binarydir[0] = 0x00; return; } - Modules_GetArg(0, (void*)testpath, 4096); - Modules_Trim(testpath, 4096, (void*)executable, 4096); - Modules_Canonify(executable, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); - if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Modules_GetArg(0, (void*)arg0, 4096); + i = 0; + while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + i += 1; + } + if (arg0[__X(i, 4096)] == '/') { + Modules_Trim(arg0, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); + } else { Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); i = 0; + present = 0; while ((!present && pathlist[__X(i, 4096)] != 0x00)) { - Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); - Modules_Trim(dir, 4096, (void*)testpath, 4096); - Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); - Modules_Canonify(testpath, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)pathdir, 4096); + Modules_AppendPart('/', arg0, 4096, (void*)pathdir, 4096); + Modules_Trim(pathdir, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); } } if (present) { - k = Modules_CharCount(d, d__len); - while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k = Modules_CharCount(binarydir, binarydir__len); + while ((k > 0 && !Modules_IsOneOf(binarydir[__X(k - 1, binarydir__len)], (CHAR*)"/\\", 3))) { k -= 1; } if (k == 0) { - d[__X(k, d__len)] = 0x00; + binarydir[__X(k, binarydir__len)] = 0x00; } else { - d[__X(k - 1, d__len)] = 0x00; + binarydir[__X(k - 1, binarydir__len)] = 0x00; } } else { - d[0] = 0x00; + binarydir[0] = 0x00; } } diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index fbc2c47e..ce643d9b 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 99fd666d..6f2b5545 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 3f6ee165..589e67db 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 5e67ae16..bf503129 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 41739672..59d5e057 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index f37a4f3e..8122e208 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -257,6 +257,9 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)"Further development by Norayr Chilingarian, David Brown and others.", 68); OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Loaded from ", 13); + OPM_LogWStr(Modules_BinaryDir, 1024); + OPM_LogWLn(); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Usage:", 7); OPM_LogWLn(); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 7664cc0c..4bd19104 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 4db27f7d..cddb65e4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index ef56b929..aeb70b16 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 52f0f328..6820f239 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 54edc605..815f29a7 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index e93361f7..3bab2d83 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 68edb67f..f3af656f 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 548e85cf..6405cdff 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 00052c0b..6807e936 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a0ae3106..87afc49d 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index d2a230b3..20d983e1 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 99d59a98..dd0f0b96 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index f1aa8a9d..aba5632f 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index bfe15fff..35ecc020 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index ff6ad391..be278393 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 7f5a8fac..b0c053b8 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 2a1ebd5f..3d53c582 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 396b6e14..95d0173a 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 48899032..c4766a47 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 0d9d3163..8d349c3e 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index c552d82d..494b7318 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 38cd03d5..f9e7e802 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -100,7 +100,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 783d31fb..ee0ea191 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 97e4d8e3..2c7543fe 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 7fa2ad3f..aa8e2c43 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index b477d97a..aae60644 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index d7b42e0e..30b3eaa6 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 6d3141bd..dcbb51f3 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 0546fa61..fd4d0fc0 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 3d30d5d4..8e773e89 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index e98bb542..b7d174ef 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -59,7 +59,7 @@ static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); @@ -289,42 +289,48 @@ static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) typedef CHAR pathstring__12[4096]; -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) { - pathstring__12 executable, dir, testpath, pathlist; + pathstring__12 arg0, pathlist, pathdir, tempstr; INT16 i, j, k; BOOLEAN present; if (Modules_ArgCount < 1) { - d[0] = 0x00; + binarydir[0] = 0x00; return; } - Modules_GetArg(0, (void*)testpath, 4096); - Modules_Trim(testpath, 4096, (void*)executable, 4096); - Modules_Canonify(executable, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); - if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Modules_GetArg(0, (void*)arg0, 4096); + i = 0; + while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + i += 1; + } + if (arg0[__X(i, 4096)] == '/') { + Modules_Trim(arg0, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); + } else { Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); i = 0; + present = 0; while ((!present && pathlist[__X(i, 4096)] != 0x00)) { - Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); - Modules_Trim(dir, 4096, (void*)testpath, 4096); - Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); - Modules_Canonify(testpath, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)pathdir, 4096); + Modules_AppendPart('/', arg0, 4096, (void*)pathdir, 4096); + Modules_Trim(pathdir, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); } } if (present) { - k = Modules_CharCount(d, d__len); - while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k = Modules_CharCount(binarydir, binarydir__len); + while ((k > 0 && !Modules_IsOneOf(binarydir[__X(k - 1, binarydir__len)], (CHAR*)"/\\", 3))) { k -= 1; } if (k == 0) { - d[__X(k, d__len)] = 0x00; + binarydir[__X(k, binarydir__len)] = 0x00; } else { - d[__X(k - 1, d__len)] = 0x00; + binarydir[__X(k - 1, binarydir__len)] = 0x00; } } else { - d[0] = 0x00; + binarydir[0] = 0x00; } } diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index b9e63ee7..e7f2b10f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 99fd666d..6f2b5545 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 3f6ee165..589e67db 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 5e67ae16..bf503129 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 41739672..59d5e057 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index a1587370..ca3cffc1 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -257,6 +257,9 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)"Further development by Norayr Chilingarian, David Brown and others.", 68); OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Loaded from ", 13); + OPM_LogWStr(Modules_BinaryDir, 1024); + OPM_LogWLn(); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Usage:", 7); OPM_LogWLn(); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 7664cc0c..4bd19104 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index ebecc1ea..8a07b672 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index ef56b929..aeb70b16 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 52f0f328..6820f239 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 54edc605..815f29a7 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 4f83d6ee..8237bf8d 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 68edb67f..f3af656f 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index b266cb63..c1062b81 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 00052c0b..6807e936 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 11c526ac..d7d446f8 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index d2a230b3..20d983e1 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 5351882b..b71e4f1d 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 2e20d294..79babae7 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index bfe15fff..35ecc020 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index ff6ad391..be278393 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 7f5a8fac..b0c053b8 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 2a1ebd5f..3d53c582 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 392a5579..1cca7d56 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index dff59e1e..e36cbaf0 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 0d9d3163..8d349c3e 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index c552d82d..494b7318 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 38cd03d5..f9e7e802 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -100,7 +100,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 783d31fb..ee0ea191 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 97e4d8e3..2c7543fe 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 7fa2ad3f..aa8e2c43 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index b477d97a..aae60644 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 5d6d6ffd..5a7119c8 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 05a23b23..a68e0ac1 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index dbfe923d..faed3f24 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index b6d1c177..becc1414 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index b7d898fc..14d48bb8 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -59,7 +59,7 @@ static void Modules_Canonify (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static INT16 Modules_CharCount (CHAR *s, ADDRESS s__len); static void Modules_DisplayHaltCode (INT32 code); static void Modules_ExtractPart (CHAR *s, ADDRESS s__len, INT16 *i, CHAR *p, ADDRESS p__len, CHAR *d, ADDRESS d__len); -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len); +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len); export void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all); export void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); export void Modules_GetIntArg (INT16 n, INT32 *val); @@ -289,42 +289,48 @@ static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len) typedef CHAR pathstring__12[4096]; -static void Modules_FindBinaryDir (CHAR *d, ADDRESS d__len) +static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) { - pathstring__12 executable, dir, testpath, pathlist; + pathstring__12 arg0, pathlist, pathdir, tempstr; INT16 i, j, k; BOOLEAN present; if (Modules_ArgCount < 1) { - d[0] = 0x00; + binarydir[0] = 0x00; return; } - Modules_GetArg(0, (void*)testpath, 4096); - Modules_Trim(testpath, 4096, (void*)executable, 4096); - Modules_Canonify(executable, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); - if ((!present && !Modules_IsAbsolute(testpath, 4096))) { + Modules_GetArg(0, (void*)arg0, 4096); + i = 0; + while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + i += 1; + } + if (arg0[__X(i, 4096)] == '/') { + Modules_Trim(arg0, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); + } else { Platform_GetEnv((CHAR*)"PATH", 5, (void*)pathlist, 4096); i = 0; + present = 0; while ((!present && pathlist[__X(i, 4096)] != 0x00)) { - Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)dir, 4096); - Modules_Trim(dir, 4096, (void*)testpath, 4096); - Modules_AppendPart('/', executable, 4096, (void*)testpath, 4096); - Modules_Canonify(testpath, 4096, (void*)d, d__len); - present = Modules_IsFilePresent(d, d__len); + Modules_ExtractPart(pathlist, 4096, &i, (CHAR*)":;", 3, (void*)pathdir, 4096); + Modules_AppendPart('/', arg0, 4096, (void*)pathdir, 4096); + Modules_Trim(pathdir, 4096, (void*)tempstr, 4096); + Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); + present = Modules_IsFilePresent(binarydir, binarydir__len); } } if (present) { - k = Modules_CharCount(d, d__len); - while ((k > 0 && !Modules_IsOneOf(d[__X(k - 1, d__len)], (CHAR*)"/\\", 3))) { + k = Modules_CharCount(binarydir, binarydir__len); + while ((k > 0 && !Modules_IsOneOf(binarydir[__X(k - 1, binarydir__len)], (CHAR*)"/\\", 3))) { k -= 1; } if (k == 0) { - d[__X(k, d__len)] = 0x00; + binarydir[__X(k, binarydir__len)] = 0x00; } else { - d[__X(k - 1, d__len)] = 0x00; + binarydir[__X(k - 1, binarydir__len)] = 0x00; } } else { - d[0] = 0x00; + binarydir[0] = 0x00; } } diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index fbc2c47e..ce643d9b 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 99fd666d..6f2b5545 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 3f6ee165..589e67db 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 5e67ae16..bf503129 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 41739672..59d5e057 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index f37a4f3e..8122e208 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -257,6 +257,9 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)"Further development by Norayr Chilingarian, David Brown and others.", 68); OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Loaded from ", 13); + OPM_LogWStr(Modules_BinaryDir, 1024); + OPM_LogWLn(); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Usage:", 7); OPM_LogWLn(); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 7664cc0c..4bd19104 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 4db27f7d..cddb65e4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index ef56b929..aeb70b16 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 52f0f328..6820f239 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 54edc605..815f29a7 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index e93361f7..3bab2d83 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 68edb67f..f3af656f 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 548e85cf..6405cdff 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 00052c0b..6807e936 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 11c526ac..d7d446f8 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index d2a230b3..20d983e1 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b53acd53..b042778e 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 825ee326..eaa8d20e 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index bfe15fff..35ecc020 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index ff6ad391..be278393 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 7f5a8fac..b0c053b8 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 2a1ebd5f..3d53c582 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 396b6e14..95d0173a 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 48899032..c4766a47 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 0d9d3163..8d349c3e 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index c552d82d..494b7318 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 38cd03d5..f9e7e802 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -100,7 +100,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 783d31fb..ee0ea191 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 18a365429b74abebd7399fc671c9ec25d71bdf59 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 10 Dec 2016 18:44:59 +0000 Subject: [PATCH 069/241] Add dubug dump to Texts.Mod to help catch OpenBSD specific read failure. --- src/compiler/OPM.Mod | 1 + src/runtime/Texts.Mod | 56 +++++++++++++++++++++++++++++++++-- src/tools/autobuild/report.pl | 6 ++-- 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index e3383840..7ccf49c5 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -395,6 +395,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) IF (curpos = 0) & inR.eot THEN LogWLn; LogWStr("DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = "); LogWNum(ORD(ch),1); LogW("."); + Texts.DumpReader(inR); END; (* TODO, remove curpos var, and provide fn returning Texts.Pos(inR) - 1. *) (* Or, better still, record symbol position in OPS. *) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 305b225d..f0658657 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -1,6 +1,6 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91**) (* << RC, MB, JT *) IMPORT - Files, Modules, Reals, SYSTEM; + Files, Modules, Reals, SYSTEM, Out; (*--- insert field e: Elem into Texts.Scanner and change Texts.Scan to set it in case of class=6 *) @@ -120,6 +120,56 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** del: Buffer; FontsDefault: FontsFont; +(* Debugging OpenBSD failure *) + + PROCEDURE DumpText(t: Text); + BEGIN + Out.String(" len: "); Out.Int(t.len,1); Out.Ln; + Out.String(" notify: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.notify),1); Out.Ln; + Out.String(" head: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.head),1); Out.Ln; + Out.String(" cache: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.cache),1); Out.Ln; + Out.String(" corg: "); Out.Int(t.corg,1); Out.Ln; + END DumpText; + + PROCEDURE DumpElem(e: Elem); + BEGIN + Out.String(" W: "); Out.Int(e.W,1); Out.Ln; + Out.String(" H: "); Out.Int(e.H,1); Out.Ln; + Out.String(" handle: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; + Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; + END DumpElem; + + PROCEDURE DumpRider(ri: Files.Rider); + BEGIN + Out.String(" res: "); Out.Int(ri.res,1); Out.Ln; + Out.String(" eof: "); IF ri.eof THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + END DumpRider; + + PROCEDURE DumpRun(ru: Run); + BEGIN + Out.String(" prev: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; + Out.String(" next: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, ru.next),1); Out.Ln; + Out.String(" len: "); Out.Int(ru.len,1); Out.Ln; + Out.String(" fnt: "); IF ru.fnt # NIL THEN Out.String(ru.fnt.name) ELSE Out.String("") END; Out.Ln; + Out.String(" col: "); Out.Int(ru.col,1); Out.Ln; + Out.String(" voff: "); Out.Int(ru.voff,1); Out.Ln; + Out.String(" ascii: "); IF ru.ascii THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + END DumpRun; + + PROCEDURE DumpReader*(re: Reader); + BEGIN + Out.String("Reader:"); Out.Ln; + Out.String(" eot: "); IF re.eot THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + Out.String(" fnt: "); IF re.fnt # NIL THEN Out.String(re.fnt.name) ELSE Out.String("") END; Out.Ln; + Out.String(" col: "); Out.Int(re.col,1); Out.Ln; + Out.String(" voff: "); Out.Int(re.voff,1); Out.Ln; + Out.String(" org: "); Out.Int(re.org,1); Out.Ln; + Out.String(" off: "); Out.Int(re.off,1); Out.Ln; + Out.String(" elem: "); IF re.elem = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpElem(re.elem) END; + Out.String(" rider: "); Out.Ln; DumpRider(re.rider); + Out.String(" run: "); IF re.run = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpRun(re.run) END; + END DumpReader; + PROCEDURE FontsThis(VAR name: ARRAY OF CHAR): FontsFont; VAR F: FontsFont; @@ -340,8 +390,8 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** IF u IS Piece THEN Files.Read(R.rider, ch); R.elem := NIL; IF (ch = 0AX) & u(Piece).ascii THEN ch := CR (* << LF to CR *) ELSIF (ch = CR) & u(Piece).ascii THEN (* << CR LF to CR *) - pos := Files.Pos(R.rider); Files.Read(R.rider, nextch); - IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END + pos := Files.Pos(R.rider); Files.Read(R.rider, nextch); + IF nextch = 0AX THEN INC(R.off) ELSE Files.Set(R.rider, u(Piece).file, pos) END END ELSIF u IS Elem THEN ch := ElemChar; R.elem := u(Elem) ELSE ch := 0X; R.elem := NIL; R.eot := TRUE diff --git a/src/tools/autobuild/report.pl b/src/tools/autobuild/report.pl index ba457a75..459603e4 100644 --- a/src/tools/autobuild/report.pl +++ b/src/tools/autobuild/report.pl @@ -75,9 +75,9 @@ sub parselog { if (/^([0-9.]+) --- Make completed ---$/) { # Go back and convert 'Started' status to 'Failed'. if ($branch =~ m/^Build on/) {$branch = "Build on $fn failed to start.";} - if ($compilerok eq "Started") {$compilerok = "Failed.";} - if ($libraryok eq "Started") {$libraryok = "Failed.";} - if ($tests eq "Started") {$tests = "Failed.";} + if ($compilerok eq "Started") {$compilerok = "Failed";} + if ($libraryok eq "Started") {$libraryok = "Failed";} + if ($tests eq "Started") {$tests = "Failed";} } } close($log); From 7aad84604b1464a1ba93fdea6c40eea5f8f8d0c0 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sat, 10 Dec 2016 18:45:47 +0000 Subject: [PATCH 070/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 3 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 357 +++++++++++++++++++-------- bootstrap/unix-44/Texts.h | 3 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 3 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 357 +++++++++++++++++++-------- bootstrap/unix-48/Texts.h | 3 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 3 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 357 +++++++++++++++++++-------- bootstrap/unix-88/Texts.h | 3 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 3 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 357 +++++++++++++++++++-------- bootstrap/windows-48/Texts.h | 3 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 3 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 357 +++++++++++++++++++-------- bootstrap/windows-88/Texts.h | 3 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 1450 insertions(+), 715 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 2c7543fe..3b84a5bd 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index aa8e2c43..319659fe 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index aae60644..d438eca9 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index e2b5f99d..c300b039 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index db989ca0..258422d6 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index fd4d0fc0..a3bcc604 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 8e773e89..b5a1e4c3 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 6b2d80be..d2183857 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index e7f2b10f..4cecc8b9 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 6f2b5545..a7d429eb 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 589e67db..a49077b0 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index bf503129..89ef22dc 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 59d5e057..b30a2315 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index ca3cffc1..0c8ab9b3 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -494,6 +494,7 @@ void OPM_Get (CHAR *ch) OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); + Texts_DumpReader(OPM_inR); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 4bd19104..d1c71f13 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 8a07b672..dfca5a85 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index aeb70b16..c82b4d80 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 6820f239..a3b32b0c 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 815f29a7..99c62664 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 33e6189e..59059803 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index f3af656f..1aec7cad 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index c1062b81..1e66dbde 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 6807e936..9ad5508d 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 87afc49d..fd578128 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 20d983e1..a3f5db4d 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index c7d45501..da9669d9 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index ed09ed5c..d68c4ae0 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 35ecc020..8ba81525 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index be278393..0fe868e0 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index b0c053b8..a6a802c4 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 3d53c582..bec035c4 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index e3cefcdc..0696f4d7 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" +#include "Out.h" #include "Reals.h" typedef @@ -191,6 +192,11 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +static void Texts_DumpElem (Texts_Elem e); +export void Texts_DumpReader (Texts_Reader re); +static void Texts_DumpRider (Files_Rider ri); +static void Texts_DumpRun (Texts_Run ru); +static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -232,6 +238,144 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); +static void Texts_DumpText (Texts_Text t) +{ + Out_String((CHAR*)" len: ", 15); + Out_Int(t->len, 1); + Out_Ln(); + Out_String((CHAR*)" notify: ", 15); + Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Ln(); + Out_String((CHAR*)" head: ", 15); + Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Ln(); + Out_String((CHAR*)" cache: ", 15); + Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Ln(); + Out_String((CHAR*)" corg: ", 15); + Out_Int(t->corg, 1); + Out_Ln(); +} + +static void Texts_DumpElem (Texts_Elem e) +{ + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpRider (Files_Rider ri) +{ + Out_String((CHAR*)" res: ", 10); + Out_Int(ri.res, 1); + Out_Ln(); + Out_String((CHAR*)" eof: ", 10); + if (ri.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +static void Texts_DumpRun (Texts_Run ru) +{ + Out_String((CHAR*)" prev: ", 12); + Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 12); + Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Ln(); + Out_String((CHAR*)" len: ", 12); + Out_Int(ru->len, 1); + Out_Ln(); + Out_String((CHAR*)" fnt: ", 12); + if (ru->fnt != NIL) { + Out_String(ru->fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 12); + Out_Int(ru->col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 12); + Out_Int(ru->voff, 1); + Out_Ln(); + Out_String((CHAR*)" ascii: ", 12); + if (ru->ascii) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +void Texts_DumpReader (Texts_Reader re) +{ + Out_String((CHAR*)"Reader:", 8); + Out_Ln(); + Out_String((CHAR*)" eot: ", 10); + if (re.eot) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Out_String((CHAR*)" fnt: ", 10); + if (re.fnt != NIL) { + Out_String(re.fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 10); + Out_Int(re.col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 10); + Out_Int(re.voff, 1); + Out_Ln(); + Out_String((CHAR*)" org: ", 10); + Out_Int(re.org, 1); + Out_Ln(); + Out_String((CHAR*)" off: ", 10); + Out_Int(re.off, 1); + Out_Ln(); + Out_String((CHAR*)" elem: ", 10); + if (re.elem == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpElem(re.elem); + } + Out_String((CHAR*)" rider: ", 10); + Out_Ln(); + Texts_DumpRider(re.rider); + Out_String((CHAR*)" run: ", 10); + if (re.run == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpRun(re.run); + } +} + static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -716,32 +860,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__31 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__31 *lnk; -} *Scan__31_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__32 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__32 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); - if (*Scan__31_s->ch == '-') { - *Scan__31_s->negE = 1; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__31_s->negE = 0; - if (*Scan__31_s->ch == '+') { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { - *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -755,13 +899,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__31 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__31_s; - Scan__31_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -862,7 +1006,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__32(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -895,7 +1039,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__32(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -948,7 +1092,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__31_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1167,30 +1311,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__53 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__53 *lnk; -} *WriteRealFix__53_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__54 (INT16 n); -static void seq__56 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__56 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__54 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__53_s->i -= 1; - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1201,23 +1345,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__53 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__53_s; - WriteRealFix__53_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__56(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__56(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__56(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1250,21 +1394,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__56(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__54(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__54(k); + dig__59(k); } else { - seq__56(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__56('0', -e); - dig__54(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__53_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1363,48 +1507,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__43 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__43 *lnk; -} *WriteDate__43_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__44 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__44 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__43 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__43_s; - WriteDate__43_s = &_s; - WritePair__44(' ', __MASK(d, -32)); - WritePair__44('.', __MASK(__ASHR(d, 5), -16)); - WritePair__44('.', __MASK(__ASHR(d, 9), -128)); - WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__44(':', __MASK(__ASHR(t, 6), -64)); - WritePair__44(':', __MASK(t, -64)); - WriteDate__43_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__16 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__16 *lnk; -} *Load0__16_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1415,15 +1559,15 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__16_s->ecnt) { - *Load0__16_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1432,25 +1576,25 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__16_s->T; - (*Load0__16_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__16_s->T; - a->file = *Load0__16_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1467,15 +1611,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__16 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__16_s; - Load0__16_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1508,7 +1652,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1526,7 +1670,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__16_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1595,25 +1739,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__39 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__39 *lnk; -} *Store__39_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); - __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1621,14 +1765,14 @@ static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__39_s->ecnt) { - *Store__39_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__39_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1649,14 +1793,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__39 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__39_s; - Store__39_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1698,7 +1842,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1752,7 +1896,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__39_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) @@ -1809,6 +1953,7 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); + __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 8be25bb5..9c320190 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -134,6 +134,7 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 8d349c3e..669a337a 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 494b7318..809a6082 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index f9e7e802..b9ca8d5a 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index ee0ea191..6a31ee74 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 2c7543fe..3b84a5bd 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index aa8e2c43..319659fe 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index aae60644..d438eca9 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index e2b5f99d..c300b039 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index db989ca0..258422d6 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index fd4d0fc0..a3bcc604 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 8e773e89..b5a1e4c3 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 6b2d80be..d2183857 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index e7f2b10f..4cecc8b9 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 6f2b5545..a7d429eb 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 589e67db..a49077b0 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index bf503129..89ef22dc 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 59d5e057..b30a2315 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index ca3cffc1..0c8ab9b3 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -494,6 +494,7 @@ void OPM_Get (CHAR *ch) OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); + Texts_DumpReader(OPM_inR); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 4bd19104..d1c71f13 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 8a07b672..dfca5a85 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index aeb70b16..c82b4d80 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 6820f239..a3b32b0c 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 815f29a7..99c62664 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 8237bf8d..6edc4b6a 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index f3af656f..1aec7cad 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index c1062b81..1e66dbde 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 6807e936..9ad5508d 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 87afc49d..fd578128 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 20d983e1..a3f5db4d 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index c7d45501..da9669d9 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index ed09ed5c..d68c4ae0 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 35ecc020..8ba81525 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index be278393..0fe868e0 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index b0c053b8..a6a802c4 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 3d53c582..bec035c4 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 1cca7d56..d1a7f696 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" +#include "Out.h" #include "Reals.h" typedef @@ -191,6 +192,11 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +static void Texts_DumpElem (Texts_Elem e); +export void Texts_DumpReader (Texts_Reader re); +static void Texts_DumpRider (Files_Rider ri); +static void Texts_DumpRun (Texts_Run ru); +static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -232,6 +238,144 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); +static void Texts_DumpText (Texts_Text t) +{ + Out_String((CHAR*)" len: ", 15); + Out_Int(t->len, 1); + Out_Ln(); + Out_String((CHAR*)" notify: ", 15); + Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Ln(); + Out_String((CHAR*)" head: ", 15); + Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Ln(); + Out_String((CHAR*)" cache: ", 15); + Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Ln(); + Out_String((CHAR*)" corg: ", 15); + Out_Int(t->corg, 1); + Out_Ln(); +} + +static void Texts_DumpElem (Texts_Elem e) +{ + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpRider (Files_Rider ri) +{ + Out_String((CHAR*)" res: ", 10); + Out_Int(ri.res, 1); + Out_Ln(); + Out_String((CHAR*)" eof: ", 10); + if (ri.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +static void Texts_DumpRun (Texts_Run ru) +{ + Out_String((CHAR*)" prev: ", 12); + Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 12); + Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Ln(); + Out_String((CHAR*)" len: ", 12); + Out_Int(ru->len, 1); + Out_Ln(); + Out_String((CHAR*)" fnt: ", 12); + if (ru->fnt != NIL) { + Out_String(ru->fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 12); + Out_Int(ru->col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 12); + Out_Int(ru->voff, 1); + Out_Ln(); + Out_String((CHAR*)" ascii: ", 12); + if (ru->ascii) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +void Texts_DumpReader (Texts_Reader re) +{ + Out_String((CHAR*)"Reader:", 8); + Out_Ln(); + Out_String((CHAR*)" eot: ", 10); + if (re.eot) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Out_String((CHAR*)" fnt: ", 10); + if (re.fnt != NIL) { + Out_String(re.fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 10); + Out_Int(re.col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 10); + Out_Int(re.voff, 1); + Out_Ln(); + Out_String((CHAR*)" org: ", 10); + Out_Int(re.org, 1); + Out_Ln(); + Out_String((CHAR*)" off: ", 10); + Out_Int(re.off, 1); + Out_Ln(); + Out_String((CHAR*)" elem: ", 10); + if (re.elem == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpElem(re.elem); + } + Out_String((CHAR*)" rider: ", 10); + Out_Ln(); + Texts_DumpRider(re.rider); + Out_String((CHAR*)" run: ", 10); + if (re.run == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpRun(re.run); + } +} + static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -716,32 +860,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__31 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__31 *lnk; -} *Scan__31_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__32 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__32 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); - if (*Scan__31_s->ch == '-') { - *Scan__31_s->negE = 1; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__31_s->negE = 0; - if (*Scan__31_s->ch == '+') { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { - *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -755,13 +899,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__31 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__31_s; - Scan__31_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -862,7 +1006,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__32(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -895,7 +1039,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__32(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -948,7 +1092,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__31_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1167,30 +1311,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__53 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__53 *lnk; -} *WriteRealFix__53_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__54 (INT16 n); -static void seq__56 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__56 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__54 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__53_s->i -= 1; - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1201,23 +1345,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__53 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__53_s; - WriteRealFix__53_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__56(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__56(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__56(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1250,21 +1394,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__56(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__54(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__54(k); + dig__59(k); } else { - seq__56(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__56('0', -e); - dig__54(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__53_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1363,48 +1507,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__43 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__43 *lnk; -} *WriteDate__43_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__44 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__44 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__43 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__43_s; - WriteDate__43_s = &_s; - WritePair__44(' ', __MASK(d, -32)); - WritePair__44('.', __MASK(__ASHR(d, 5), -16)); - WritePair__44('.', __MASK(__ASHR(d, 9), -128)); - WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__44(':', __MASK(__ASHR(t, 6), -64)); - WritePair__44(':', __MASK(t, -64)); - WriteDate__43_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__16 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__16 *lnk; -} *Load0__16_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1415,15 +1559,15 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__16_s->ecnt) { - *Load0__16_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1432,25 +1576,25 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__16_s->T; - (*Load0__16_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__16_s->T; - a->file = *Load0__16_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1467,15 +1611,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__16 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__16_s; - Load0__16_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1508,7 +1652,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1526,7 +1670,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__16_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1595,25 +1739,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__39 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__39 *lnk; -} *Store__39_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); - __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1621,14 +1765,14 @@ static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__39_s->ecnt) { - *Store__39_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__39_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1649,14 +1793,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__39 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__39_s; - Store__39_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1698,7 +1842,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1752,7 +1896,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__39_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) @@ -1809,6 +1953,7 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); + __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index e36cbaf0..dc149133 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,6 +135,7 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 8d349c3e..669a337a 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 494b7318..809a6082 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index f9e7e802..b9ca8d5a 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index ee0ea191..6a31ee74 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 2c7543fe..3b84a5bd 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index aa8e2c43..319659fe 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index aae60644..d438eca9 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index ccb4a812..29fc1e9a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 068c1d9a..187a00f5 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index faed3f24..79d83cee 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index becc1414..29a878c2 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index e9637cdf..10aa7f62 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index ce643d9b..162947ee 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 6f2b5545..a7d429eb 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 589e67db..a49077b0 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index bf503129..89ef22dc 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 59d5e057..b30a2315 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 8122e208..5b3cc3c5 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -494,6 +494,7 @@ void OPM_Get (CHAR *ch) OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); + Texts_DumpReader(OPM_inR); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 4bd19104..d1c71f13 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index cddb65e4..a529c16e 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index aeb70b16..c82b4d80 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 6820f239..a3b32b0c 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 815f29a7..99c62664 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 3bab2d83..0bca4ab5 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index f3af656f..1aec7cad 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 6405cdff..097c0a7c 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 6807e936..9ad5508d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 87afc49d..fd578128 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 20d983e1..a3f5db4d 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index dd0f0b96..5a5984c0 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index aba5632f..9ea581aa 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 35ecc020..8ba81525 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index be278393..0fe868e0 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index b0c053b8..a6a802c4 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 3d53c582..bec035c4 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 95d0173a..eba58f8f 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" +#include "Out.h" #include "Reals.h" typedef @@ -191,6 +192,11 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +static void Texts_DumpElem (Texts_Elem e); +export void Texts_DumpReader (Texts_Reader re); +static void Texts_DumpRider (Files_Rider ri); +static void Texts_DumpRun (Texts_Run ru); +static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -232,6 +238,144 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); +static void Texts_DumpText (Texts_Text t) +{ + Out_String((CHAR*)" len: ", 15); + Out_Int(t->len, 1); + Out_Ln(); + Out_String((CHAR*)" notify: ", 15); + Out_Int((INT64)(ADDRESS)t->notify, 1); + Out_Ln(); + Out_String((CHAR*)" head: ", 15); + Out_Int((INT64)(ADDRESS)t->head, 1); + Out_Ln(); + Out_String((CHAR*)" cache: ", 15); + Out_Int((INT64)(ADDRESS)t->cache, 1); + Out_Ln(); + Out_String((CHAR*)" corg: ", 15); + Out_Int(t->corg, 1); + Out_Ln(); +} + +static void Texts_DumpElem (Texts_Elem e) +{ + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Int((INT64)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpRider (Files_Rider ri) +{ + Out_String((CHAR*)" res: ", 10); + Out_Int(ri.res, 1); + Out_Ln(); + Out_String((CHAR*)" eof: ", 10); + if (ri.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +static void Texts_DumpRun (Texts_Run ru) +{ + Out_String((CHAR*)" prev: ", 12); + Out_Int((INT64)(ADDRESS)ru->prev, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 12); + Out_Int((INT64)(ADDRESS)ru->next, 1); + Out_Ln(); + Out_String((CHAR*)" len: ", 12); + Out_Int(ru->len, 1); + Out_Ln(); + Out_String((CHAR*)" fnt: ", 12); + if (ru->fnt != NIL) { + Out_String(ru->fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 12); + Out_Int(ru->col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 12); + Out_Int(ru->voff, 1); + Out_Ln(); + Out_String((CHAR*)" ascii: ", 12); + if (ru->ascii) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +void Texts_DumpReader (Texts_Reader re) +{ + Out_String((CHAR*)"Reader:", 8); + Out_Ln(); + Out_String((CHAR*)" eot: ", 10); + if (re.eot) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Out_String((CHAR*)" fnt: ", 10); + if (re.fnt != NIL) { + Out_String(re.fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 10); + Out_Int(re.col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 10); + Out_Int(re.voff, 1); + Out_Ln(); + Out_String((CHAR*)" org: ", 10); + Out_Int(re.org, 1); + Out_Ln(); + Out_String((CHAR*)" off: ", 10); + Out_Int(re.off, 1); + Out_Ln(); + Out_String((CHAR*)" elem: ", 10); + if (re.elem == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpElem(re.elem); + } + Out_String((CHAR*)" rider: ", 10); + Out_Ln(); + Texts_DumpRider(re.rider); + Out_String((CHAR*)" run: ", 10); + if (re.run == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpRun(re.run); + } +} + static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -716,32 +860,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__31 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__31 *lnk; -} *Scan__31_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__32 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__32 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); - if (*Scan__31_s->ch == '-') { - *Scan__31_s->negE = 1; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__31_s->negE = 0; - if (*Scan__31_s->ch == '+') { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { - *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -755,13 +899,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__31 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__31_s; - Scan__31_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -862,7 +1006,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__32(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -895,7 +1039,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__32(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -948,7 +1092,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__31_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1167,30 +1311,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__53 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__53 *lnk; -} *WriteRealFix__53_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__54 (INT16 n); -static void seq__56 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__56 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__54 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__53_s->i -= 1; - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1201,23 +1345,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__53 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__53_s; - WriteRealFix__53_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__56(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__56(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__56(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1250,21 +1394,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__56(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__54(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__54(k); + dig__59(k); } else { - seq__56(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__56('0', -e); - dig__54(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__53_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1363,48 +1507,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__43 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__43 *lnk; -} *WriteDate__43_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__44 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__44 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__43 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__43_s; - WriteDate__43_s = &_s; - WritePair__44(' ', __MASK(d, -32)); - WritePair__44('.', __MASK(__ASHR(d, 5), -16)); - WritePair__44('.', __MASK(__ASHR(d, 9), -128)); - WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__44(':', __MASK(__ASHR(t, 6), -64)); - WritePair__44(':', __MASK(t, -64)); - WriteDate__43_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__16 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__16 *lnk; -} *Load0__16_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1415,15 +1559,15 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__16_s->ecnt) { - *Load0__16_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1432,25 +1576,25 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__16_s->T; - (*Load0__16_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__16_s->T; - a->file = *Load0__16_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1467,15 +1611,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__16 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__16_s; - Load0__16_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1508,7 +1652,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1526,7 +1670,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__16_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1595,25 +1739,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__39 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__39 *lnk; -} *Store__39_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); - __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1621,14 +1765,14 @@ static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__39_s->ecnt) { - *Store__39_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__39_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1649,14 +1793,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__39 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__39_s; - Store__39_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1698,7 +1842,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1752,7 +1896,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__39_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) @@ -1809,6 +1953,7 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); + __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index c4766a47..55558804 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,6 +135,7 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 8d349c3e..669a337a 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 494b7318..809a6082 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index f9e7e802..b9ca8d5a 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index ee0ea191..6a31ee74 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 2c7543fe..3b84a5bd 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index aa8e2c43..319659fe 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index aae60644..d438eca9 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 30b3eaa6..6db7dd4d 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dcbb51f3..aa177fb4 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index fd4d0fc0..a3bcc604 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 8e773e89..b5a1e4c3 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index b7d174ef..4a04e15a 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index e7f2b10f..4cecc8b9 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 6f2b5545..a7d429eb 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 589e67db..a49077b0 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index bf503129..89ef22dc 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 59d5e057..b30a2315 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index ca3cffc1..0c8ab9b3 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -494,6 +494,7 @@ void OPM_Get (CHAR *ch) OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); + Texts_DumpReader(OPM_inR); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 4bd19104..d1c71f13 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 8a07b672..dfca5a85 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index aeb70b16..c82b4d80 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 6820f239..a3b32b0c 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 815f29a7..99c62664 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 8237bf8d..6edc4b6a 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index f3af656f..1aec7cad 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index c1062b81..1e66dbde 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 6807e936..9ad5508d 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index d7d446f8..1f466dc9 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 20d983e1..a3f5db4d 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index b71e4f1d..eb23ff1d 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 79babae7..ce0d19ba 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 35ecc020..8ba81525 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index be278393..0fe868e0 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index b0c053b8..a6a802c4 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 3d53c582..bec035c4 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 1cca7d56..d1a7f696 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" +#include "Out.h" #include "Reals.h" typedef @@ -191,6 +192,11 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +static void Texts_DumpElem (Texts_Elem e); +export void Texts_DumpReader (Texts_Reader re); +static void Texts_DumpRider (Files_Rider ri); +static void Texts_DumpRun (Texts_Run ru); +static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -232,6 +238,144 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); +static void Texts_DumpText (Texts_Text t) +{ + Out_String((CHAR*)" len: ", 15); + Out_Int(t->len, 1); + Out_Ln(); + Out_String((CHAR*)" notify: ", 15); + Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Ln(); + Out_String((CHAR*)" head: ", 15); + Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Ln(); + Out_String((CHAR*)" cache: ", 15); + Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Ln(); + Out_String((CHAR*)" corg: ", 15); + Out_Int(t->corg, 1); + Out_Ln(); +} + +static void Texts_DumpElem (Texts_Elem e) +{ + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpRider (Files_Rider ri) +{ + Out_String((CHAR*)" res: ", 10); + Out_Int(ri.res, 1); + Out_Ln(); + Out_String((CHAR*)" eof: ", 10); + if (ri.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +static void Texts_DumpRun (Texts_Run ru) +{ + Out_String((CHAR*)" prev: ", 12); + Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 12); + Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Ln(); + Out_String((CHAR*)" len: ", 12); + Out_Int(ru->len, 1); + Out_Ln(); + Out_String((CHAR*)" fnt: ", 12); + if (ru->fnt != NIL) { + Out_String(ru->fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 12); + Out_Int(ru->col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 12); + Out_Int(ru->voff, 1); + Out_Ln(); + Out_String((CHAR*)" ascii: ", 12); + if (ru->ascii) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +void Texts_DumpReader (Texts_Reader re) +{ + Out_String((CHAR*)"Reader:", 8); + Out_Ln(); + Out_String((CHAR*)" eot: ", 10); + if (re.eot) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Out_String((CHAR*)" fnt: ", 10); + if (re.fnt != NIL) { + Out_String(re.fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 10); + Out_Int(re.col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 10); + Out_Int(re.voff, 1); + Out_Ln(); + Out_String((CHAR*)" org: ", 10); + Out_Int(re.org, 1); + Out_Ln(); + Out_String((CHAR*)" off: ", 10); + Out_Int(re.off, 1); + Out_Ln(); + Out_String((CHAR*)" elem: ", 10); + if (re.elem == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpElem(re.elem); + } + Out_String((CHAR*)" rider: ", 10); + Out_Ln(); + Texts_DumpRider(re.rider); + Out_String((CHAR*)" run: ", 10); + if (re.run == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpRun(re.run); + } +} + static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -716,32 +860,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__31 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__31 *lnk; -} *Scan__31_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__32 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__32 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); - if (*Scan__31_s->ch == '-') { - *Scan__31_s->negE = 1; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__31_s->negE = 0; - if (*Scan__31_s->ch == '+') { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { - *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -755,13 +899,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__31 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__31_s; - Scan__31_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -862,7 +1006,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__32(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -895,7 +1039,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__32(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -948,7 +1092,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__31_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1167,30 +1311,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__53 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__53 *lnk; -} *WriteRealFix__53_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__54 (INT16 n); -static void seq__56 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__56 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__54 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__53_s->i -= 1; - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1201,23 +1345,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__53 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__53_s; - WriteRealFix__53_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__56(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__56(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__56(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1250,21 +1394,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__56(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__54(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__54(k); + dig__59(k); } else { - seq__56(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__56('0', -e); - dig__54(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__53_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1363,48 +1507,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__43 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__43 *lnk; -} *WriteDate__43_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__44 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__44 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__43 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__43_s; - WriteDate__43_s = &_s; - WritePair__44(' ', __MASK(d, -32)); - WritePair__44('.', __MASK(__ASHR(d, 5), -16)); - WritePair__44('.', __MASK(__ASHR(d, 9), -128)); - WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__44(':', __MASK(__ASHR(t, 6), -64)); - WritePair__44(':', __MASK(t, -64)); - WriteDate__43_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__16 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__16 *lnk; -} *Load0__16_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1415,15 +1559,15 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__16_s->ecnt) { - *Load0__16_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1432,25 +1576,25 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__16_s->T; - (*Load0__16_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__16_s->T; - a->file = *Load0__16_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1467,15 +1611,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__16 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__16_s; - Load0__16_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1508,7 +1652,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1526,7 +1670,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__16_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1595,25 +1739,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__39 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__39 *lnk; -} *Store__39_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); - __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1621,14 +1765,14 @@ static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__39_s->ecnt) { - *Store__39_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__39_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1649,14 +1793,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__39 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__39_s; - Store__39_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1698,7 +1842,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1752,7 +1896,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__39_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) @@ -1809,6 +1953,7 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); + __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index e36cbaf0..dc149133 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,6 +135,7 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 8d349c3e..669a337a 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 494b7318..809a6082 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index f9e7e802..b9ca8d5a 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index ee0ea191..6a31ee74 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 2c7543fe..3b84a5bd 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index aa8e2c43..319659fe 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index aae60644..d438eca9 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 5a7119c8..1f47f261 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index a68e0ac1..683cb78a 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index faed3f24..79d83cee 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index becc1414..29a878c2 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 14d48bb8..83b46a4a 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index ce643d9b..162947ee 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 6f2b5545..a7d429eb 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 589e67db..a49077b0 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index bf503129..89ef22dc 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 59d5e057..b30a2315 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 8122e208..5b3cc3c5 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -494,6 +494,7 @@ void OPM_Get (CHAR *ch) OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); + Texts_DumpReader(OPM_inR); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 4bd19104..d1c71f13 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index cddb65e4..a529c16e 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index aeb70b16..c82b4d80 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 6820f239..a3b32b0c 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 815f29a7..99c62664 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 3bab2d83..0bca4ab5 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index f3af656f..1aec7cad 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 6405cdff..097c0a7c 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 6807e936..9ad5508d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d7d446f8..1f466dc9 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 20d983e1..a3f5db4d 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b042778e..7a37d42c 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index eaa8d20e..369ea02a 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 35ecc020..8ba81525 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index be278393..0fe868e0 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index b0c053b8..a6a802c4 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 3d53c582..bec035c4 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 95d0173a..eba58f8f 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,6 +8,7 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" +#include "Out.h" #include "Reals.h" typedef @@ -191,6 +192,11 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +static void Texts_DumpElem (Texts_Elem e); +export void Texts_DumpReader (Texts_Reader re); +static void Texts_DumpRider (Files_Rider ri); +static void Texts_DumpRun (Texts_Run ru); +static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -232,6 +238,144 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); +static void Texts_DumpText (Texts_Text t) +{ + Out_String((CHAR*)" len: ", 15); + Out_Int(t->len, 1); + Out_Ln(); + Out_String((CHAR*)" notify: ", 15); + Out_Int((INT64)(ADDRESS)t->notify, 1); + Out_Ln(); + Out_String((CHAR*)" head: ", 15); + Out_Int((INT64)(ADDRESS)t->head, 1); + Out_Ln(); + Out_String((CHAR*)" cache: ", 15); + Out_Int((INT64)(ADDRESS)t->cache, 1); + Out_Ln(); + Out_String((CHAR*)" corg: ", 15); + Out_Int(t->corg, 1); + Out_Ln(); +} + +static void Texts_DumpElem (Texts_Elem e) +{ + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Int((INT64)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpRider (Files_Rider ri) +{ + Out_String((CHAR*)" res: ", 10); + Out_Int(ri.res, 1); + Out_Ln(); + Out_String((CHAR*)" eof: ", 10); + if (ri.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +static void Texts_DumpRun (Texts_Run ru) +{ + Out_String((CHAR*)" prev: ", 12); + Out_Int((INT64)(ADDRESS)ru->prev, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 12); + Out_Int((INT64)(ADDRESS)ru->next, 1); + Out_Ln(); + Out_String((CHAR*)" len: ", 12); + Out_Int(ru->len, 1); + Out_Ln(); + Out_String((CHAR*)" fnt: ", 12); + if (ru->fnt != NIL) { + Out_String(ru->fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 12); + Out_Int(ru->col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 12); + Out_Int(ru->voff, 1); + Out_Ln(); + Out_String((CHAR*)" ascii: ", 12); + if (ru->ascii) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); +} + +void Texts_DumpReader (Texts_Reader re) +{ + Out_String((CHAR*)"Reader:", 8); + Out_Ln(); + Out_String((CHAR*)" eot: ", 10); + if (re.eot) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Out_String((CHAR*)" fnt: ", 10); + if (re.fnt != NIL) { + Out_String(re.fnt->name, 32); + } else { + Out_String((CHAR*)"", 6); + } + Out_Ln(); + Out_String((CHAR*)" col: ", 10); + Out_Int(re.col, 1); + Out_Ln(); + Out_String((CHAR*)" voff: ", 10); + Out_Int(re.voff, 1); + Out_Ln(); + Out_String((CHAR*)" org: ", 10); + Out_Int(re.org, 1); + Out_Ln(); + Out_String((CHAR*)" off: ", 10); + Out_Int(re.off, 1); + Out_Ln(); + Out_String((CHAR*)" elem: ", 10); + if (re.elem == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpElem(re.elem); + } + Out_String((CHAR*)" rider: ", 10); + Out_Ln(); + Texts_DumpRider(re.rider); + Out_String((CHAR*)" run: ", 10); + if (re.run == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpRun(re.run); + } +} + static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -716,32 +860,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__31 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__31 *lnk; -} *Scan__31_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__32 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__32 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); - if (*Scan__31_s->ch == '-') { - *Scan__31_s->negE = 1; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__31_s->negE = 0; - if (*Scan__31_s->ch == '+') { - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { - *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; - Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -755,13 +899,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__31 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__31_s; - Scan__31_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -862,7 +1006,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__32(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -895,7 +1039,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__32(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -948,7 +1092,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__31_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1167,30 +1311,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__53 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__53 *lnk; -} *WriteRealFix__53_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__54 (INT16 n); -static void seq__56 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__56 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__54 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__53_s->i -= 1; - Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1201,23 +1345,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__53 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__53_s; - WriteRealFix__53_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__56(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__56(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__56(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1250,21 +1394,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__56(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__54(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__54(k); + dig__59(k); } else { - seq__56(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__56('0', -e); - dig__54(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__53_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1363,48 +1507,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__43 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__43 *lnk; -} *WriteDate__43_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__44 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__44 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__43 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__43_s; - WriteDate__43_s = &_s; - WritePair__44(' ', __MASK(d, -32)); - WritePair__44('.', __MASK(__ASHR(d, 5), -16)); - WritePair__44('.', __MASK(__ASHR(d, 9), -128)); - WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__44(':', __MASK(__ASHR(t, 6), -64)); - WritePair__44(':', __MASK(t, -64)); - WriteDate__43_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__16 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__16 *lnk; -} *Load0__16_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1415,15 +1559,15 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__16_s->ecnt) { - *Load0__16_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1432,25 +1576,25 @@ static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__16_s->T; - (*Load0__16_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__16_s->T; - a->file = *Load0__16_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1467,15 +1611,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__16 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__16_s; - Load0__16_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1508,7 +1652,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1526,7 +1670,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__16_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1595,25 +1739,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__39 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__39 *lnk; -} *Store__39_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); - __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1621,14 +1765,14 @@ static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__39_s->ecnt) { - *Store__39_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__39_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1649,14 +1793,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__39 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__39_s; - Store__39_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1698,7 +1842,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1752,7 +1896,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__39_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) @@ -1809,6 +1953,7 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); + __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index c4766a47..55558804 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,6 +135,7 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); +import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 8d349c3e..669a337a 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 494b7318..809a6082 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index f9e7e802..b9ca8d5a 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index ee0ea191..6a31ee74 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/09]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From a1ac23a09fbc4b6480e8ff081863df60f171c54f Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 14:10:46 +0000 Subject: [PATCH 071/241] More debug to catch OpenBSD intermittent text read failure. --- src/runtime/Files.Mod | 57 ++++++++++++++++++++++++++++++++++++------- src/runtime/Texts.Mod | 10 ++------ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 7bbecbf7..9caa22a9 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -55,7 +55,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files END; Rider* = RECORD - res*: LONGINT; + res*: LONGINT; (* Residue (byte count not read) at eof of ReadBytes *) eof*: BOOLEAN; buf: Buffer; org: LONGINT; (* File offset of block containing current position *) @@ -70,10 +70,45 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files SearchPath: POINTER TO ARRAY OF CHAR; +(* Debugging intermittent OpenBSD failure. *) + + PROCEDURE Spaces(i: INTEGER); BEGIN WHILE i>0 DO Out.String(" "); DEC(i) END END Spaces; + + PROCEDURE DumpFile*(f: File; indent: INTEGER); + BEGIN + Spaces(indent); Out.String("workName: "); Out.String(f.workName); Out.Ln; + Spaces(indent); Out.String("registerName: "); Out.String(f.registerName); Out.Ln; + Spaces(indent); Out.String("tempFile: "); IF f.tempFile THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + Spaces(indent); Out.String("identity: "); Out.String("..."); Out.Ln; (* TBD *) + Spaces(indent); Out.String("fd: "); Out.Int(f.fd,1); Out.Ln; + Spaces(indent); Out.String("len, "); Out.Int(f.len,1); Out.Ln; + Spaces(indent); Out.String("pos: "); Out.Int(f.pos,1); Out.Ln; + Spaces(indent); Out.String("bufs: "); Out.String("..."); Out.Ln; (* TBD *) + Spaces(indent); Out.String("swapper: "); Out.Int(f.swapper,1); Out.Ln; + Spaces(indent); Out.String("state: "); Out.Int(f.state,1); Out.Ln; + Spaces(indent); Out.String("next: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS,f.next),1); Out.Ln; + END DumpFile; + + PROCEDURE DumpBuffer*(b: Buffer; indent: INTEGER); + BEGIN + Spaces(indent); Out.String("chg: "); IF b.chg THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + Spaces(indent); Out.String("org: "); Out.Int(b.org,1); Out.Ln; + Spaces(indent); Out.String("size: "); Out.Int(b.size,1); Out.Ln; + Spaces(indent); Out.String("data: "); Out.String("..."); Out.Ln; + Spaces(indent); Out.String("f: "); IF b.f = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpFile(b.f, indent+1) END; + END DumpBuffer; + + PROCEDURE DumpRider*(r: Rider; indent: INTEGER); + BEGIN + Spaces(indent); Out.String("res: "); Out.Int(r.res,1); Out.Ln; + Spaces(indent); Out.String("eof: "); IF r.eof THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; + Spaces(indent); Out.String("org: "); Out.Int(r.org,1); Out.Ln; + Spaces(indent); Out.String("offset: "); Out.Int(r.offset,1); Out.Ln; + Spaces(indent); Out.String("buf: "); IF r.buf = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpBuffer(r.buf, indent+1) END; + END DumpRider; PROCEDURE -IdxTrap "__HALT(-1)"; - PROCEDURE -ToAdr(x: SYSTEM.INT64): SYSTEM.ADDRESS "(ADDRESS)x"; PROCEDURE^ Finalize(o: SYSTEM.PTR); @@ -405,7 +440,8 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files offset := pos MOD BufSize; org := pos - offset; i := 0; WHILE (i < NumBufs) & (f.bufs[i] # NIL) & (org # f.bufs[i].org) DO INC(i) END; IF i < NumBufs THEN - IF f.bufs[i] = NIL THEN NEW(buf); buf.chg := FALSE; buf.org := -1; buf.f := f; f.bufs[i] := buf + IF f.bufs[i] = NIL THEN + NEW(buf); buf.chg := FALSE; buf.org := -1; buf.f := f; f.bufs[i] := buf ELSE buf := f.bufs[i] END ELSE @@ -434,7 +470,9 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR offset: LONGINT; buf: Buffer; BEGIN buf := r.buf; offset := r.offset; - IF r.org # buf.org THEN Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END; + IF r.org # buf.org THEN + Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset + END; Assert(offset <= buf.size); IF (offset < buf.size) THEN x := buf.data[offset]; r.offset := offset + 1 @@ -450,16 +488,17 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; BEGIN IF n > LEN(x) THEN IdxTrap END; - xpos := 0; buf := r.buf; offset := r.offset; + xpos := 0; + buf := r.buf; + offset := r.offset; (* Offset within buffer r.buf *) WHILE n > 0 DO IF (r.org # buf.org) OR (offset >= BufSize) THEN - Set(r, buf.f, r.org + offset); - buf := r.buf; offset := r.offset + Set(r, buf.f, r.org + offset); buf := r.buf; offset := r.offset END; restInBuf := buf.size - offset; IF restInBuf = 0 THEN r.res := n; r.eof := TRUE; RETURN ELSIF n > restInBuf THEN min := restInBuf ELSE min := n END; - SYSTEM.MOVE(SYSTEM.ADR(buf.data) + ToAdr(offset), SYSTEM.ADR(x) + ToAdr(xpos), min); + SYSTEM.MOVE(SYSTEM.ADR(buf.data[offset]), SYSTEM.ADR(x[xpos]), min); INC(offset, min); r.offset := offset; INC(xpos, min); DEC(n, min); Assert(offset <= BufSize) END; @@ -502,7 +541,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files Assert(offset <= BufSize); restInBuf := BufSize - offset; IF n > restInBuf THEN min := restInBuf ELSE min := n END; - SYSTEM.MOVE(SYSTEM.ADR(x) + ToAdr(xpos), SYSTEM.ADR(buf.data) + ToAdr(offset), min); + SYSTEM.MOVE(SYSTEM.ADR(x[xpos]), SYSTEM.ADR(buf.data[offset]), min); INC(offset, min); r.offset := offset; Assert(offset <= BufSize); IF offset > buf.size THEN INC(buf.f.len, offset - buf.size); buf.size := offset END; diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index f0658657..760f805c 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -120,7 +120,7 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** del: Buffer; FontsDefault: FontsFont; -(* Debugging OpenBSD failure *) +(* Debugging intermittent OpenBSD failure. *) PROCEDURE DumpText(t: Text); BEGIN @@ -139,12 +139,6 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; END DumpElem; - PROCEDURE DumpRider(ri: Files.Rider); - BEGIN - Out.String(" res: "); Out.Int(ri.res,1); Out.Ln; - Out.String(" eof: "); IF ri.eof THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - END DumpRider; - PROCEDURE DumpRun(ru: Run); BEGIN Out.String(" prev: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; @@ -166,7 +160,7 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Out.String(" org: "); Out.Int(re.org,1); Out.Ln; Out.String(" off: "); Out.Int(re.off,1); Out.Ln; Out.String(" elem: "); IF re.elem = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpElem(re.elem) END; - Out.String(" rider: "); Out.Ln; DumpRider(re.rider); + Out.String(" rider: "); Out.Ln; Files.DumpRider(re.rider,2); Out.String(" run: "); IF re.run = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpRun(re.run) END; END DumpReader; From 7d0cc741aec83765ea25bbc31466868328870220 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 14:11:33 +0000 Subject: [PATCH 072/241] Update bootstrap C source --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 137 +++++++++++++++- bootstrap/unix-44/Files.h | 15 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 229 +++++++++++++-------------- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 137 +++++++++++++++- bootstrap/unix-48/Files.h | 15 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 229 +++++++++++++-------------- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 137 +++++++++++++++- bootstrap/unix-88/Files.h | 15 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 229 +++++++++++++-------------- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 137 +++++++++++++++- bootstrap/windows-48/Files.h | 15 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 229 +++++++++++++-------------- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 137 +++++++++++++++- bootstrap/windows-88/Files.h | 15 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 229 +++++++++++++-------------- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 1445 insertions(+), 810 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 3b84a5bd..ffd8b03e 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 319659fe..6db13d09 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index d438eca9..4259cfef 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index c300b039..c9994206 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,6 +69,9 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); +export void Files_DumpBuffer (Files_Buffer b, INT16 indent); +export void Files_DumpFile (Files_File f, INT16 indent); +export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -99,6 +102,7 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); +static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -111,7 +115,132 @@ export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) -#define Files_ToAdr(x) (ADDRESS)x + +static void Files_Spaces (INT16 i) +{ + while (i > 0) { + Out_String((CHAR*)" ", 3); + i -= 1; + } +} + +void Files_DumpFile (Files_File f, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"workName: ", 15); + Out_String(f->workName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"registerName: ", 15); + Out_String(f->registerName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"tempFile: ", 15); + if (f->tempFile) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"identity: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"fd: ", 15); + Out_Int(f->fd, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"len, ", 15); + Out_Int(f->len, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"pos: ", 15); + Out_Int(f->pos, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"bufs: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"swapper: ", 15); + Out_Int(f->swapper, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"state: ", 15); + Out_Int(f->state, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"next: ", 15); + Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Ln(); +} + +void Files_DumpBuffer (Files_Buffer b, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"chg: ", 7); + if (b->chg) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 7); + Out_Int(b->org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"size: ", 7); + Out_Int(b->size, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"data: ", 7); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"f: ", 7); + if (b->f == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(b->f, indent + 1); + } +} + +void Files_DumpRider (Files_Rider r, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"res: ", 9); + Out_Int(r.res, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"eof: ", 9); + if (r.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 9); + Out_Int(r.org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"offset: ", 9); + Out_Int(r.offset, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"buf: ", 9); + if (r.buf == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpBuffer(r.buf, indent + 1); + } +} static void Files_Assert (BOOLEAN truth) { @@ -661,7 +790,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)buf->data + Files_ToAdr(offset), (ADDRESS)x + Files_ToAdr(xpos), min); + __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); offset += min; (*r).offset = offset; xpos += min; @@ -724,7 +853,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); + __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 258422d6..c548dae1 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,10 +1,19 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" +typedef + struct Files_BufDesc { + INT32 _prvt0; + char _prvt1[4108]; + } Files_BufDesc; + +typedef + Files_BufDesc *Files_Buffer; + typedef struct Files_FileDesc *Files_File; @@ -24,12 +33,16 @@ typedef import ADDRESS *Files_FileDesc__typ; +import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +import void Files_DumpBuffer (Files_Buffer b, INT16 indent); +import void Files_DumpFile (Files_File f, INT16 indent); +import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index a3bcc604..125a2854 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index b5a1e4c3..e794a4a3 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index d2183857..b27930e7 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 4cecc8b9..553f80ed 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index a7d429eb..d83386eb 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index a49077b0..feb85d73 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 89ef22dc..ab01642c 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index b30a2315..f742f265 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 0c8ab9b3..a6c7a5cd 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index d1c71f13..621dfb51 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index dfca5a85..383b6d65 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index c82b4d80..c1fe21fb 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index a3b32b0c..4569c80d 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 99c62664..c0707c34 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 59059803..9bc66090 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 1aec7cad..6b2b0929 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 1e66dbde..42081077 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 9ad5508d..d363f022 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index fd578128..a647f77d 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index a3f5db4d..8c7a5774 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index da9669d9..22eb3138 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index d68c4ae0..cd9d9890 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 8ba81525..f5ee1490 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 0fe868e0..6d0ec38b 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index a6a802c4..4ee2fc23 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index bec035c4..ae281477 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 0696f4d7..35e17988 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -194,7 +194,6 @@ export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRider (Files_Rider ri); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); @@ -278,20 +277,6 @@ static void Texts_DumpElem (Texts_Elem e) } } -static void Texts_DumpRider (Files_Rider ri) -{ - Out_String((CHAR*)" res: ", 10); - Out_Int(ri.res, 1); - Out_Ln(); - Out_String((CHAR*)" eof: ", 10); - if (ri.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - static void Texts_DumpRun (Texts_Run ru) { Out_String((CHAR*)" prev: ", 12); @@ -365,7 +350,7 @@ void Texts_DumpReader (Texts_Reader re) } Out_String((CHAR*)" rider: ", 10); Out_Ln(); - Texts_DumpRider(re.rider); + Files_DumpRider(re.rider, 2); Out_String((CHAR*)" run: ", 10); if (re.run == NIL) { Out_String((CHAR*)"", 6); @@ -860,32 +845,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__35 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__35 *lnk; +} *Scan__35_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__36 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__36 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + if (*Scan__35_s->ch == '-') { + *Scan__35_s->negE = 1; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__35_s->negE = 0; + if (*Scan__35_s->ch == '+') { + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { + *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } @@ -899,13 +884,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__35 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__35_s; + Scan__35_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1006,7 +991,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__36(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1039,7 +1024,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__36(); } if (negE) { if (e <= 38) { @@ -1092,7 +1077,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__35_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1311,30 +1296,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__57 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__57 *lnk; +} *WriteRealFix__57_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__58 (INT16 n); +static void seq__60 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__60 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__58 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__57_s->i -= 1; + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); n -= 1; } } @@ -1345,23 +1330,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__57 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__57_s; + WriteRealFix__57_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__60(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__60(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__60(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1394,21 +1379,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__60(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__58(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__58(k); } else { - seq__61(' ', (n - k) - 3); + seq__60(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__60('0', -e); + dig__58(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__57_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1507,48 +1492,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__47 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__47 *lnk; +} *WriteDate__47_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__48 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__48 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__47 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__47_s; + WriteDate__47_s = &_s; + WritePair__48(' ', __MASK(d, -32)); + WritePair__48('.', __MASK(__ASHR(d, 5), -16)); + WritePair__48('.', __MASK(__ASHR(d, 9), -128)); + WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__48(':', __MASK(__ASHR(t, 6), -64)); + WritePair__48(':', __MASK(t, -64)); + WriteDate__47_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__20 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__20 *lnk; +} *Load0__20_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1559,15 +1544,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__20_s->ecnt) { + *Load0__20_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1576,25 +1561,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__20_s->T; + (*Load0__20_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__20_s->T; + a->file = *Load0__20_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1611,15 +1596,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__20 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__20_s; + Load0__20_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1652,7 +1637,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1670,7 +1655,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__20_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1739,25 +1724,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__43 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__43 *lnk; +} *Store__43_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1765,14 +1750,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__43_s->ecnt) { + *Store__43_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__43_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1793,14 +1778,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__43 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__43_s; + Store__43_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1842,7 +1827,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1896,7 +1881,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__43_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 9c320190..dfe60b54 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 669a337a..9ab993c9 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 809a6082..3de3605c 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index b9ca8d5a..213abf27 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 6a31ee74..4278a34c 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 3b84a5bd..ffd8b03e 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 319659fe..6db13d09 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index d438eca9..4259cfef 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index c300b039..c9994206 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,6 +69,9 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); +export void Files_DumpBuffer (Files_Buffer b, INT16 indent); +export void Files_DumpFile (Files_File f, INT16 indent); +export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -99,6 +102,7 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); +static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -111,7 +115,132 @@ export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) -#define Files_ToAdr(x) (ADDRESS)x + +static void Files_Spaces (INT16 i) +{ + while (i > 0) { + Out_String((CHAR*)" ", 3); + i -= 1; + } +} + +void Files_DumpFile (Files_File f, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"workName: ", 15); + Out_String(f->workName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"registerName: ", 15); + Out_String(f->registerName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"tempFile: ", 15); + if (f->tempFile) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"identity: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"fd: ", 15); + Out_Int(f->fd, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"len, ", 15); + Out_Int(f->len, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"pos: ", 15); + Out_Int(f->pos, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"bufs: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"swapper: ", 15); + Out_Int(f->swapper, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"state: ", 15); + Out_Int(f->state, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"next: ", 15); + Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Ln(); +} + +void Files_DumpBuffer (Files_Buffer b, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"chg: ", 7); + if (b->chg) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 7); + Out_Int(b->org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"size: ", 7); + Out_Int(b->size, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"data: ", 7); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"f: ", 7); + if (b->f == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(b->f, indent + 1); + } +} + +void Files_DumpRider (Files_Rider r, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"res: ", 9); + Out_Int(r.res, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"eof: ", 9); + if (r.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 9); + Out_Int(r.org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"offset: ", 9); + Out_Int(r.offset, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"buf: ", 9); + if (r.buf == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpBuffer(r.buf, indent + 1); + } +} static void Files_Assert (BOOLEAN truth) { @@ -661,7 +790,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)buf->data + Files_ToAdr(offset), (ADDRESS)x + Files_ToAdr(xpos), min); + __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); offset += min; (*r).offset = offset; xpos += min; @@ -724,7 +853,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); + __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 258422d6..c548dae1 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,10 +1,19 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" +typedef + struct Files_BufDesc { + INT32 _prvt0; + char _prvt1[4108]; + } Files_BufDesc; + +typedef + Files_BufDesc *Files_Buffer; + typedef struct Files_FileDesc *Files_File; @@ -24,12 +33,16 @@ typedef import ADDRESS *Files_FileDesc__typ; +import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +import void Files_DumpBuffer (Files_Buffer b, INT16 indent); +import void Files_DumpFile (Files_File f, INT16 indent); +import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index a3bcc604..125a2854 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index b5a1e4c3..e794a4a3 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index d2183857..b27930e7 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 4cecc8b9..553f80ed 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index a7d429eb..d83386eb 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index a49077b0..feb85d73 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 89ef22dc..ab01642c 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index b30a2315..f742f265 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 0c8ab9b3..a6c7a5cd 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index d1c71f13..621dfb51 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index dfca5a85..383b6d65 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index c82b4d80..c1fe21fb 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index a3b32b0c..4569c80d 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 99c62664..c0707c34 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 6edc4b6a..0d32553a 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 1aec7cad..6b2b0929 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 1e66dbde..42081077 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 9ad5508d..d363f022 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index fd578128..a647f77d 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index a3f5db4d..8c7a5774 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index da9669d9..22eb3138 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index d68c4ae0..cd9d9890 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 8ba81525..f5ee1490 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 0fe868e0..6d0ec38b 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index a6a802c4..4ee2fc23 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index bec035c4..ae281477 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index d1a7f696..9016dbc8 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -194,7 +194,6 @@ export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRider (Files_Rider ri); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); @@ -278,20 +277,6 @@ static void Texts_DumpElem (Texts_Elem e) } } -static void Texts_DumpRider (Files_Rider ri) -{ - Out_String((CHAR*)" res: ", 10); - Out_Int(ri.res, 1); - Out_Ln(); - Out_String((CHAR*)" eof: ", 10); - if (ri.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - static void Texts_DumpRun (Texts_Run ru) { Out_String((CHAR*)" prev: ", 12); @@ -365,7 +350,7 @@ void Texts_DumpReader (Texts_Reader re) } Out_String((CHAR*)" rider: ", 10); Out_Ln(); - Texts_DumpRider(re.rider); + Files_DumpRider(re.rider, 2); Out_String((CHAR*)" run: ", 10); if (re.run == NIL) { Out_String((CHAR*)"", 6); @@ -860,32 +845,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__35 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__35 *lnk; +} *Scan__35_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__36 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__36 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + if (*Scan__35_s->ch == '-') { + *Scan__35_s->negE = 1; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__35_s->negE = 0; + if (*Scan__35_s->ch == '+') { + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { + *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } @@ -899,13 +884,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__35 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__35_s; + Scan__35_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1006,7 +991,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__36(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1039,7 +1024,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__36(); } if (negE) { if (e <= 38) { @@ -1092,7 +1077,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__35_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1311,30 +1296,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__57 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__57 *lnk; +} *WriteRealFix__57_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__58 (INT16 n); +static void seq__60 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__60 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__58 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__57_s->i -= 1; + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); n -= 1; } } @@ -1345,23 +1330,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__57 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__57_s; + WriteRealFix__57_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__60(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__60(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__60(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1394,21 +1379,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__60(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__58(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__58(k); } else { - seq__61(' ', (n - k) - 3); + seq__60(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__60('0', -e); + dig__58(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__57_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1507,48 +1492,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__47 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__47 *lnk; +} *WriteDate__47_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__48 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__48 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__47 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__47_s; + WriteDate__47_s = &_s; + WritePair__48(' ', __MASK(d, -32)); + WritePair__48('.', __MASK(__ASHR(d, 5), -16)); + WritePair__48('.', __MASK(__ASHR(d, 9), -128)); + WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__48(':', __MASK(__ASHR(t, 6), -64)); + WritePair__48(':', __MASK(t, -64)); + WriteDate__47_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__20 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__20 *lnk; +} *Load0__20_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1559,15 +1544,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__20_s->ecnt) { + *Load0__20_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1576,25 +1561,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__20_s->T; + (*Load0__20_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__20_s->T; + a->file = *Load0__20_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1611,15 +1596,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__20 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__20_s; + Load0__20_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1652,7 +1637,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1670,7 +1655,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__20_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1739,25 +1724,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__43 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__43 *lnk; +} *Store__43_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1765,14 +1750,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__43_s->ecnt) { + *Store__43_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__43_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1793,14 +1778,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__43 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__43_s; + Store__43_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1842,7 +1827,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1896,7 +1881,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__43_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index dc149133..c7c8d20f 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 669a337a..9ab993c9 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 809a6082..3de3605c 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index b9ca8d5a..213abf27 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 6a31ee74..4278a34c 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 3b84a5bd..ffd8b03e 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 319659fe..6db13d09 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index d438eca9..4259cfef 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 29fc1e9a..2d13a80b 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,6 +69,9 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); +export void Files_DumpBuffer (Files_Buffer b, INT16 indent); +export void Files_DumpFile (Files_File f, INT16 indent); +export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -99,6 +102,7 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); +static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -111,7 +115,132 @@ export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) -#define Files_ToAdr(x) (ADDRESS)x + +static void Files_Spaces (INT16 i) +{ + while (i > 0) { + Out_String((CHAR*)" ", 3); + i -= 1; + } +} + +void Files_DumpFile (Files_File f, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"workName: ", 15); + Out_String(f->workName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"registerName: ", 15); + Out_String(f->registerName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"tempFile: ", 15); + if (f->tempFile) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"identity: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"fd: ", 15); + Out_Int(f->fd, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"len, ", 15); + Out_Int(f->len, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"pos: ", 15); + Out_Int(f->pos, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"bufs: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"swapper: ", 15); + Out_Int(f->swapper, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"state: ", 15); + Out_Int(f->state, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"next: ", 15); + Out_Int((INT64)(ADDRESS)f->next, 1); + Out_Ln(); +} + +void Files_DumpBuffer (Files_Buffer b, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"chg: ", 7); + if (b->chg) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 7); + Out_Int(b->org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"size: ", 7); + Out_Int(b->size, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"data: ", 7); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"f: ", 7); + if (b->f == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(b->f, indent + 1); + } +} + +void Files_DumpRider (Files_Rider r, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"res: ", 9); + Out_Int(r.res, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"eof: ", 9); + if (r.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 9); + Out_Int(r.org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"offset: ", 9); + Out_Int(r.offset, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"buf: ", 9); + if (r.buf == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpBuffer(r.buf, indent + 1); + } +} static void Files_Assert (BOOLEAN truth) { @@ -661,7 +790,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)buf->data + Files_ToAdr(offset), (ADDRESS)x + Files_ToAdr(xpos), min); + __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); offset += min; (*r).offset = offset; xpos += min; @@ -724,7 +853,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); + __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 187a00f5..bb6e46df 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,10 +1,19 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" +typedef + struct Files_BufDesc { + INT64 _prvt0; + char _prvt1[4108]; + } Files_BufDesc; + +typedef + Files_BufDesc *Files_Buffer; + typedef struct Files_FileDesc *Files_File; @@ -25,12 +34,16 @@ typedef import ADDRESS *Files_FileDesc__typ; +import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +import void Files_DumpBuffer (Files_Buffer b, INT16 indent); +import void Files_DumpFile (Files_File f, INT16 indent); +import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 79d83cee..4554feac 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 29a878c2..0fb80f05 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 10aa7f62..eb227d08 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 162947ee..3ee70401 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index a7d429eb..d83386eb 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index a49077b0..feb85d73 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 89ef22dc..ab01642c 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index b30a2315..f742f265 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 5b3cc3c5..1335c494 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index d1c71f13..621dfb51 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index a529c16e..3f9dfde3 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index c82b4d80..c1fe21fb 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index a3b32b0c..4569c80d 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 99c62664..c0707c34 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 0bca4ab5..07f8f535 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 1aec7cad..6b2b0929 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 097c0a7c..4506267a 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 9ad5508d..d363f022 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index fd578128..a647f77d 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index a3f5db4d..8c7a5774 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 5a5984c0..51a8fde7 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 9ea581aa..56fab736 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 8ba81525..f5ee1490 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 0fe868e0..6d0ec38b 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index a6a802c4..4ee2fc23 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index bec035c4..ae281477 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index eba58f8f..1afb5eba 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -194,7 +194,6 @@ export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRider (Files_Rider ri); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); @@ -278,20 +277,6 @@ static void Texts_DumpElem (Texts_Elem e) } } -static void Texts_DumpRider (Files_Rider ri) -{ - Out_String((CHAR*)" res: ", 10); - Out_Int(ri.res, 1); - Out_Ln(); - Out_String((CHAR*)" eof: ", 10); - if (ri.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - static void Texts_DumpRun (Texts_Run ru) { Out_String((CHAR*)" prev: ", 12); @@ -365,7 +350,7 @@ void Texts_DumpReader (Texts_Reader re) } Out_String((CHAR*)" rider: ", 10); Out_Ln(); - Texts_DumpRider(re.rider); + Files_DumpRider(re.rider, 2); Out_String((CHAR*)" run: ", 10); if (re.run == NIL) { Out_String((CHAR*)"", 6); @@ -860,32 +845,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__35 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__35 *lnk; +} *Scan__35_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__36 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__36 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + if (*Scan__35_s->ch == '-') { + *Scan__35_s->negE = 1; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__35_s->negE = 0; + if (*Scan__35_s->ch == '+') { + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { + *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } @@ -899,13 +884,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__35 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__35_s; + Scan__35_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1006,7 +991,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__36(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1039,7 +1024,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__36(); } if (negE) { if (e <= 38) { @@ -1092,7 +1077,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__35_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1311,30 +1296,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__57 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__57 *lnk; +} *WriteRealFix__57_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__58 (INT16 n); +static void seq__60 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__60 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__58 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__57_s->i -= 1; + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); n -= 1; } } @@ -1345,23 +1330,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__57 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__57_s; + WriteRealFix__57_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__60(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__60(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__60(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1394,21 +1379,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__60(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__58(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__58(k); } else { - seq__61(' ', (n - k) - 3); + seq__60(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__60('0', -e); + dig__58(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__57_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1507,48 +1492,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__47 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__47 *lnk; +} *WriteDate__47_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__48 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__48 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__47 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__47_s; + WriteDate__47_s = &_s; + WritePair__48(' ', __MASK(d, -32)); + WritePair__48('.', __MASK(__ASHR(d, 5), -16)); + WritePair__48('.', __MASK(__ASHR(d, 9), -128)); + WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__48(':', __MASK(__ASHR(t, 6), -64)); + WritePair__48(':', __MASK(t, -64)); + WriteDate__47_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__20 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__20 *lnk; +} *Load0__20_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1559,15 +1544,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__20_s->ecnt) { + *Load0__20_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1576,25 +1561,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__20_s->T; + (*Load0__20_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__20_s->T; + a->file = *Load0__20_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1611,15 +1596,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__20 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__20_s; + Load0__20_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1652,7 +1637,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1670,7 +1655,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__20_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1739,25 +1724,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__43 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__43 *lnk; +} *Store__43_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1765,14 +1750,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__43_s->ecnt) { + *Store__43_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__43_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1793,14 +1778,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__43 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__43_s; + Store__43_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1842,7 +1827,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1896,7 +1881,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__43_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 55558804..e14afb26 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 669a337a..9ab993c9 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 809a6082..3de3605c 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index b9ca8d5a..213abf27 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 6a31ee74..4278a34c 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 3b84a5bd..ffd8b03e 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 319659fe..6db13d09 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index d438eca9..4259cfef 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 6db7dd4d..3e1b5ecd 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,6 +69,9 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); +export void Files_DumpBuffer (Files_Buffer b, INT16 indent); +export void Files_DumpFile (Files_File f, INT16 indent); +export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -99,6 +102,7 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); +static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -111,7 +115,132 @@ export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) -#define Files_ToAdr(x) (ADDRESS)x + +static void Files_Spaces (INT16 i) +{ + while (i > 0) { + Out_String((CHAR*)" ", 3); + i -= 1; + } +} + +void Files_DumpFile (Files_File f, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"workName: ", 15); + Out_String(f->workName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"registerName: ", 15); + Out_String(f->registerName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"tempFile: ", 15); + if (f->tempFile) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"identity: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"fd: ", 15); + Out_Int(f->fd, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"len, ", 15); + Out_Int(f->len, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"pos: ", 15); + Out_Int(f->pos, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"bufs: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"swapper: ", 15); + Out_Int(f->swapper, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"state: ", 15); + Out_Int(f->state, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"next: ", 15); + Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Ln(); +} + +void Files_DumpBuffer (Files_Buffer b, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"chg: ", 7); + if (b->chg) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 7); + Out_Int(b->org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"size: ", 7); + Out_Int(b->size, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"data: ", 7); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"f: ", 7); + if (b->f == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(b->f, indent + 1); + } +} + +void Files_DumpRider (Files_Rider r, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"res: ", 9); + Out_Int(r.res, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"eof: ", 9); + if (r.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 9); + Out_Int(r.org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"offset: ", 9); + Out_Int(r.offset, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"buf: ", 9); + if (r.buf == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpBuffer(r.buf, indent + 1); + } +} static void Files_Assert (BOOLEAN truth) { @@ -661,7 +790,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)buf->data + Files_ToAdr(offset), (ADDRESS)x + Files_ToAdr(xpos), min); + __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); offset += min; (*r).offset = offset; xpos += min; @@ -724,7 +853,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); + __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index aa177fb4..dfeeebb3 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,10 +1,19 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" +typedef + struct Files_BufDesc { + INT32 _prvt0; + char _prvt1[4108]; + } Files_BufDesc; + +typedef + Files_BufDesc *Files_Buffer; + typedef struct Files_FileDesc *Files_File; @@ -24,12 +33,16 @@ typedef import ADDRESS *Files_FileDesc__typ; +import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +import void Files_DumpBuffer (Files_Buffer b, INT16 indent); +import void Files_DumpFile (Files_File f, INT16 indent); +import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index a3bcc604..125a2854 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index b5a1e4c3..e794a4a3 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 4a04e15a..ab668fec 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 4cecc8b9..553f80ed 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index a7d429eb..d83386eb 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index a49077b0..feb85d73 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 89ef22dc..ab01642c 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index b30a2315..f742f265 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 0c8ab9b3..a6c7a5cd 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index d1c71f13..621dfb51 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index dfca5a85..383b6d65 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index c82b4d80..c1fe21fb 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index a3b32b0c..4569c80d 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 99c62664..c0707c34 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 6edc4b6a..0d32553a 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 1aec7cad..6b2b0929 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 1e66dbde..42081077 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 9ad5508d..d363f022 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 1f466dc9..52896b61 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index a3f5db4d..8c7a5774 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index eb23ff1d..43a2c695 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index ce0d19ba..ddc997ca 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 8ba81525..f5ee1490 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 0fe868e0..6d0ec38b 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index a6a802c4..4ee2fc23 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index bec035c4..ae281477 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index d1a7f696..9016dbc8 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -194,7 +194,6 @@ export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRider (Files_Rider ri); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); @@ -278,20 +277,6 @@ static void Texts_DumpElem (Texts_Elem e) } } -static void Texts_DumpRider (Files_Rider ri) -{ - Out_String((CHAR*)" res: ", 10); - Out_Int(ri.res, 1); - Out_Ln(); - Out_String((CHAR*)" eof: ", 10); - if (ri.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - static void Texts_DumpRun (Texts_Run ru) { Out_String((CHAR*)" prev: ", 12); @@ -365,7 +350,7 @@ void Texts_DumpReader (Texts_Reader re) } Out_String((CHAR*)" rider: ", 10); Out_Ln(); - Texts_DumpRider(re.rider); + Files_DumpRider(re.rider, 2); Out_String((CHAR*)" run: ", 10); if (re.run == NIL) { Out_String((CHAR*)"", 6); @@ -860,32 +845,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__35 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__35 *lnk; +} *Scan__35_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__36 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__36 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + if (*Scan__35_s->ch == '-') { + *Scan__35_s->negE = 1; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__35_s->negE = 0; + if (*Scan__35_s->ch == '+') { + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { + *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } @@ -899,13 +884,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__35 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__35_s; + Scan__35_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1006,7 +991,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__36(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1039,7 +1024,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__36(); } if (negE) { if (e <= 38) { @@ -1092,7 +1077,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__35_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1311,30 +1296,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__57 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__57 *lnk; +} *WriteRealFix__57_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__58 (INT16 n); +static void seq__60 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__60 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__58 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__57_s->i -= 1; + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); n -= 1; } } @@ -1345,23 +1330,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__57 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__57_s; + WriteRealFix__57_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__60(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__60(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__60(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1394,21 +1379,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__60(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__58(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__58(k); } else { - seq__61(' ', (n - k) - 3); + seq__60(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__60('0', -e); + dig__58(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__57_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1507,48 +1492,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__47 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__47 *lnk; +} *WriteDate__47_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__48 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__48 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__47 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__47_s; + WriteDate__47_s = &_s; + WritePair__48(' ', __MASK(d, -32)); + WritePair__48('.', __MASK(__ASHR(d, 5), -16)); + WritePair__48('.', __MASK(__ASHR(d, 9), -128)); + WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__48(':', __MASK(__ASHR(t, 6), -64)); + WritePair__48(':', __MASK(t, -64)); + WriteDate__47_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__20 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__20 *lnk; +} *Load0__20_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1559,15 +1544,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__20_s->ecnt) { + *Load0__20_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1576,25 +1561,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__20_s->T; + (*Load0__20_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__20_s->T; + a->file = *Load0__20_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1611,15 +1596,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__20 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__20_s; + Load0__20_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1652,7 +1637,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1670,7 +1655,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__20_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1739,25 +1724,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__43 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__43 *lnk; +} *Store__43_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1765,14 +1750,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__43_s->ecnt) { + *Store__43_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__43_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1793,14 +1778,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__43 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__43_s; + Store__43_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1842,7 +1827,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1896,7 +1881,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__43_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index dc149133..c7c8d20f 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 669a337a..9ab993c9 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 809a6082..3de3605c 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index b9ca8d5a..213abf27 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 6a31ee74..4278a34c 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 3b84a5bd..ffd8b03e 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 319659fe..6db13d09 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index d438eca9..4259cfef 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 1f47f261..072b15ba 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -70,6 +70,9 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); +export void Files_DumpBuffer (Files_Buffer b, INT16 indent); +export void Files_DumpFile (Files_File f, INT16 indent); +export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -100,6 +103,7 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); +static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -112,7 +116,132 @@ export void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x); export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len); #define Files_IdxTrap() __HALT(-1) -#define Files_ToAdr(x) (ADDRESS)x + +static void Files_Spaces (INT16 i) +{ + while (i > 0) { + Out_String((CHAR*)" ", 3); + i -= 1; + } +} + +void Files_DumpFile (Files_File f, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"workName: ", 15); + Out_String(f->workName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"registerName: ", 15); + Out_String(f->registerName, 101); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"tempFile: ", 15); + if (f->tempFile) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"identity: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"fd: ", 15); + Out_Int(f->fd, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"len, ", 15); + Out_Int(f->len, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"pos: ", 15); + Out_Int(f->pos, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"bufs: ", 15); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"swapper: ", 15); + Out_Int(f->swapper, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"state: ", 15); + Out_Int(f->state, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"next: ", 15); + Out_Int((INT64)(ADDRESS)f->next, 1); + Out_Ln(); +} + +void Files_DumpBuffer (Files_Buffer b, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"chg: ", 7); + if (b->chg) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 7); + Out_Int(b->org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"size: ", 7); + Out_Int(b->size, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"data: ", 7); + Out_String((CHAR*)"...", 4); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"f: ", 7); + if (b->f == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(b->f, indent + 1); + } +} + +void Files_DumpRider (Files_Rider r, INT16 indent) +{ + Files_Spaces(indent); + Out_String((CHAR*)"res: ", 9); + Out_Int(r.res, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"eof: ", 9); + if (r.eof) { + Out_String((CHAR*)"TRUE", 5); + } else { + Out_String((CHAR*)"FALSE", 6); + } + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"org: ", 9); + Out_Int(r.org, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"offset: ", 9); + Out_Int(r.offset, 1); + Out_Ln(); + Files_Spaces(indent); + Out_String((CHAR*)"buf: ", 9); + if (r.buf == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpBuffer(r.buf, indent + 1); + } +} static void Files_Assert (BOOLEAN truth) { @@ -662,7 +791,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)buf->data + Files_ToAdr(offset), (ADDRESS)x + Files_ToAdr(xpos), min); + __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); offset += min; (*r).offset = offset; xpos += min; @@ -725,7 +854,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)x + Files_ToAdr(xpos), (ADDRESS)buf->data + Files_ToAdr(offset), min); + __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 683cb78a..49df83be 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,10 +1,19 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" +typedef + struct Files_BufDesc { + INT64 _prvt0; + char _prvt1[4108]; + } Files_BufDesc; + +typedef + Files_BufDesc *Files_Buffer; + typedef struct Files_FileDesc *Files_File; @@ -25,12 +34,16 @@ typedef import ADDRESS *Files_FileDesc__typ; +import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); +import void Files_DumpBuffer (Files_Buffer b, INT16 indent); +import void Files_DumpFile (Files_File f, INT16 indent); +import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 79d83cee..4554feac 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 29a878c2..0fb80f05 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 83b46a4a..37cfa0cd 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 162947ee..3ee70401 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index a7d429eb..d83386eb 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index a49077b0..feb85d73 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 89ef22dc..ab01642c 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index b30a2315..f742f265 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 5b3cc3c5..1335c494 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index d1c71f13..621dfb51 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index a529c16e..3f9dfde3 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index c82b4d80..c1fe21fb 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index a3b32b0c..4569c80d 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 99c62664..c0707c34 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 0bca4ab5..07f8f535 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 1aec7cad..6b2b0929 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 097c0a7c..4506267a 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 9ad5508d..d363f022 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 1f466dc9..52896b61 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index a3f5db4d..8c7a5774 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 7a37d42c..44691d4d 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 369ea02a..751980ad 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 8ba81525..f5ee1490 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 0fe868e0..6d0ec38b 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index a6a802c4..4ee2fc23 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index bec035c4..ae281477 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index eba58f8f..1afb5eba 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -194,7 +194,6 @@ export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRider (Files_Rider ri); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); @@ -278,20 +277,6 @@ static void Texts_DumpElem (Texts_Elem e) } } -static void Texts_DumpRider (Files_Rider ri) -{ - Out_String((CHAR*)" res: ", 10); - Out_Int(ri.res, 1); - Out_Ln(); - Out_String((CHAR*)" eof: ", 10); - if (ri.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - static void Texts_DumpRun (Texts_Run ru) { Out_String((CHAR*)" prev: ", 12); @@ -365,7 +350,7 @@ void Texts_DumpReader (Texts_Reader re) } Out_String((CHAR*)" rider: ", 10); Out_Ln(); - Texts_DumpRider(re.rider); + Files_DumpRider(re.rider, 2); Out_String((CHAR*)" run: ", 10); if (re.run == NIL) { Out_String((CHAR*)"", 6); @@ -860,32 +845,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__35 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__35 *lnk; +} *Scan__35_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__36 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__36 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + if (*Scan__35_s->ch == '-') { + *Scan__35_s->negE = 1; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__35_s->negE = 0; + if (*Scan__35_s->ch == '+') { + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { + *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; + Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); } } @@ -899,13 +884,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__35 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__35_s; + Scan__35_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1006,7 +991,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__36(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1039,7 +1024,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__36(); } if (negE) { if (e <= 38) { @@ -1092,7 +1077,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__35_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1311,30 +1296,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__57 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__57 *lnk; +} *WriteRealFix__57_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__58 (INT16 n); +static void seq__60 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__60 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__58 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__57_s->i -= 1; + Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); n -= 1; } } @@ -1345,23 +1330,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__57 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__57_s; + WriteRealFix__57_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__60(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__60(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__60(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1394,21 +1379,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__60(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__58(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__58(k); } else { - seq__61(' ', (n - k) - 3); + seq__60(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__60('0', -e); + dig__58(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__57_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1507,48 +1492,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__47 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__47 *lnk; +} *WriteDate__47_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__48 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__48 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__47 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__47_s; + WriteDate__47_s = &_s; + WritePair__48(' ', __MASK(d, -32)); + WritePair__48('.', __MASK(__ASHR(d, 5), -16)); + WritePair__48('.', __MASK(__ASHR(d, 9), -128)); + WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__48(':', __MASK(__ASHR(t, 6), -64)); + WritePair__48(':', __MASK(t, -64)); + WriteDate__47_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__20 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__20 *lnk; +} *Load0__20_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1559,15 +1544,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__20_s->ecnt) { + *Load0__20_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1576,25 +1561,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__20_s->T; + (*Load0__20_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__20_s->T; + a->file = *Load0__20_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1611,15 +1596,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__20 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__20_s; + Load0__20_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1652,7 +1637,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1670,7 +1655,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__20_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1739,25 +1724,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__43 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__43 *lnk; +} *Store__43_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1765,14 +1750,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__43_s->ecnt) { + *Store__43_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__43_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1793,14 +1778,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__43 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__43_s; + Store__43_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1842,7 +1827,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1896,7 +1881,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__43_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 55558804..e14afb26 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 669a337a..9ab993c9 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 809a6082..3de3605c 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index b9ca8d5a..213abf27 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 6a31ee74..4278a34c 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From a2d98748b60170281c618c576f2310f414f1369f Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:18:24 +0000 Subject: [PATCH 073/241] Add hex and hexdump to Out.Mod, more debugging for OpenBSD. --- src/runtime/Files.Mod | 4 ++-- src/runtime/Out.Mod | 41 +++++++++++++++++++++++++++++++++++++++++ src/runtime/Texts.Mod | 13 +++++++------ 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 9caa22a9..76fbdf77 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -86,7 +86,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files Spaces(indent); Out.String("bufs: "); Out.String("..."); Out.Ln; (* TBD *) Spaces(indent); Out.String("swapper: "); Out.Int(f.swapper,1); Out.Ln; Spaces(indent); Out.String("state: "); Out.Int(f.state,1); Out.Ln; - Spaces(indent); Out.String("next: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS,f.next),1); Out.Ln; + Spaces(indent); Out.String("next: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS,f.next),1); Out.Ln; END DumpFile; PROCEDURE DumpBuffer*(b: Buffer; indent: INTEGER); @@ -94,7 +94,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files Spaces(indent); Out.String("chg: "); IF b.chg THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; Spaces(indent); Out.String("org: "); Out.Int(b.org,1); Out.Ln; Spaces(indent); Out.String("size: "); Out.Int(b.size,1); Out.Ln; - Spaces(indent); Out.String("data: "); Out.String("..."); Out.Ln; + Spaces(indent); Out.String("data: "); Out.Ln; Out.HexDump(b.data); Spaces(indent); Out.String("f: "); IF b.f = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpFile(b.f, indent+1) END; END DumpBuffer; diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 9564f275..9aaa961c 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -68,10 +68,51 @@ BEGIN WHILE i > 0 DO DEC(i); Char(s[i]) END END Int; +PROCEDURE Hex*(x, n: HUGEINT); +BEGIN + IF n < 1 THEN n := 1 ELSIF n > 16 THEN n := 16 END; + WHILE (n < 16) & (SYSTEM.LSH(x, -4*n) # 0) DO INC(n) END; + x := SYSTEM.ROT(x, 4*(16-n)); + WHILE n > 0 DO + x := SYSTEM.ROT(x,4); DEC(n); + IF x MOD 16 < 10 THEN Char(CHR((x MOD 16) + ORD('0'))) + ELSE Char(CHR((x MOD 16) - 10 + ORD('A'))) END + END +END Hex; + PROCEDURE Ln*; BEGIN String(Platform.NL); Flush; END Ln; +PROCEDURE HexDumpAdr*(a, o, l: SYSTEM.ADDRESS); +VAR i, n, lim: SYSTEM.ADDRESS; c: CHAR; +BEGIN + lim := a+l; + WHILE a < lim DO + IF a+16 < lim THEN n := 16 ELSE n := lim-a END; + Hex(o,8); Char(" "); + i := 0; WHILE i < n DO + IF i MOD 4 = 0 THEN Char(" ") END; + SYSTEM.GET(a+i, c); Hex(ORD(c), 2); Char(" "); + INC(i) + END; + WHILE i < 16 DO + IF i MOD 4 = 0 THEN Char(" ") END; String(" "); + INC(i) + END; + String(" "); + i := 0; WHILE i < n DO + SYSTEM.GET(a+i, c); + IF (ORD(c) < 32) OR (ORD(c) > 126) THEN Char(".") ELSE Char(c) END; + INC(i) + END; + INC(a,n); INC(o,n); Ln + END +END HexDumpAdr; + +PROCEDURE HexDump*(VAR m: ARRAY OF SYSTEM.BYTE); +BEGIN HexDumpAdr(SYSTEM.ADR(m), 0, LEN(m)) +END HexDump; (* Real and Longreal display *) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 760f805c..1712411c 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -125,9 +125,9 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** PROCEDURE DumpText(t: Text); BEGIN Out.String(" len: "); Out.Int(t.len,1); Out.Ln; - Out.String(" notify: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.notify),1); Out.Ln; - Out.String(" head: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.head),1); Out.Ln; - Out.String(" cache: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, t.cache),1); Out.Ln; + Out.String(" notify: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.notify),1); Out.Ln; + Out.String(" head: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.head),1); Out.Ln; + Out.String(" cache: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.cache),1); Out.Ln; Out.String(" corg: "); Out.Int(t.corg,1); Out.Ln; END DumpText; @@ -135,14 +135,15 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** BEGIN Out.String(" W: "); Out.Int(e.W,1); Out.Ln; Out.String(" H: "); Out.Int(e.H,1); Out.Ln; - Out.String(" handle: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; + Out.String(" handle: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; END DumpElem; PROCEDURE DumpRun(ru: Run); BEGIN - Out.String(" prev: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; - Out.String(" next: "); Out.Int(SYSTEM.VAL(SYSTEM.ADDRESS, ru.next),1); Out.Ln; + Out.String(" Run at "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru),1); Out.Ln; + Out.String(" prev: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; + Out.String(" next: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.next),1); Out.Ln; Out.String(" len: "); Out.Int(ru.len,1); Out.Ln; Out.String(" fnt: "); IF ru.fnt # NIL THEN Out.String(ru.fnt.name) ELSE Out.String("") END; Out.Ln; Out.String(" col: "); Out.Int(ru.col,1); Out.Ln; From fb3017e3e231f88bcc50265b17343edb919dae5c Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:19:18 +0000 Subject: [PATCH 074/241] Update bootstrap C source. --- bootstrap/unix-44/Files.c | 4 +- bootstrap/unix-44/Out.c | 77 ++++++++++++++++++++++++++++++++++++ bootstrap/unix-44/Out.h | 3 ++ bootstrap/unix-44/Texts.c | 15 ++++--- bootstrap/unix-48/Files.c | 4 +- bootstrap/unix-48/Out.c | 77 ++++++++++++++++++++++++++++++++++++ bootstrap/unix-48/Out.h | 3 ++ bootstrap/unix-48/Texts.c | 15 ++++--- bootstrap/unix-88/Files.c | 4 +- bootstrap/unix-88/Out.c | 77 ++++++++++++++++++++++++++++++++++++ bootstrap/unix-88/Out.h | 3 ++ bootstrap/unix-88/Texts.c | 15 ++++--- bootstrap/windows-48/Files.c | 4 +- bootstrap/windows-48/Out.c | 77 ++++++++++++++++++++++++++++++++++++ bootstrap/windows-48/Out.h | 3 ++ bootstrap/windows-48/Texts.c | 15 ++++--- bootstrap/windows-88/Files.c | 4 +- bootstrap/windows-88/Out.c | 77 ++++++++++++++++++++++++++++++++++++ bootstrap/windows-88/Out.h | 3 ++ bootstrap/windows-88/Texts.c | 15 ++++--- 20 files changed, 455 insertions(+), 40 deletions(-) diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index c9994206..652cb128 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -172,7 +172,7 @@ void Files_DumpFile (Files_File f, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"next: ", 15); - Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Hex((INT32)(ADDRESS)f->next, 1); Out_Ln(); } @@ -196,8 +196,8 @@ void Files_DumpBuffer (Files_Buffer b, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"data: ", 7); - Out_String((CHAR*)"...", 4); Out_Ln(); + Out_HexDump((void*)b->data, 4096); Files_Spaces(indent); Out_String((CHAR*)"f: ", 7); if (b->f == NIL) { diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index a647f77d..38e680ae 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -16,6 +16,9 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); +export void Out_Hex (INT64 x, INT64 n); +export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -119,12 +122,86 @@ void Out_Int (INT64 x, INT64 n) } } +void Out_Hex (INT64 x, INT64 n) +{ + if (n < 1) { + n = 1; + } else if (n > 16) { + n = 16; + } + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } + x = __ROT(x, __ASHL(16 - n, 2), 64); + while (n > 0) { + x = __ROTL(x, 4, 64); + n -= 1; + if (__MASK(x, -16) < 10) { + Out_Char((CHAR)(__MASK(x, -16) + 48)); + } else { + Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + } + } +} + void Out_Ln (void) { Out_String(Platform_NL, 3); Out_Flush(); } +void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +{ + INT32 i, n, lim; + CHAR c; + lim = a + l; + while (a < lim) { + if (a + 16 < lim) { + n = 16; + } else { + n = lim - a; + } + Out_Hex(o, 8); + Out_Char(' '); + i = 0; + while (i < n) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + __GET(a + i, c, CHAR); + Out_Hex((INT16)c, 2); + Out_Char(' '); + i += 1; + } + while (i < 16) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + Out_String((CHAR*)" ", 4); + i += 1; + } + Out_String((CHAR*)" ", 2); + i = 0; + while (i < n) { + __GET(a + i, c, CHAR); + if ((INT16)c < 32 || (INT16)c > 126) { + Out_Char('.'); + } else { + Out_Char(c); + } + i += 1; + } + a += n; + o += n; + Out_Ln(); + } +} + +void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) +{ + Out_HexDumpAdr((ADDRESS)m, 0, m__len); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 8c7a5774..bae3e220 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -11,6 +11,9 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); import void Out_Flush (void); +import void Out_Hex (INT64 x, INT64 n); +import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 35e17988..d86402c1 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -243,13 +243,13 @@ static void Texts_DumpText (Texts_Text t) Out_Int(t->len, 1); Out_Ln(); Out_String((CHAR*)" notify: ", 15); - Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Hex((INT32)(ADDRESS)t->notify, 1); Out_Ln(); Out_String((CHAR*)" head: ", 15); - Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Hex((INT32)(ADDRESS)t->head, 1); Out_Ln(); Out_String((CHAR*)" cache: ", 15); - Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Hex((INT32)(ADDRESS)t->cache, 1); Out_Ln(); Out_String((CHAR*)" corg: ", 15); Out_Int(t->corg, 1); @@ -265,7 +265,7 @@ static void Texts_DumpElem (Texts_Elem e) Out_Int(e->H, 1); Out_Ln(); Out_String((CHAR*)" handle: ", 13); - Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Hex((INT32)(ADDRESS)e->handle, 1); Out_Ln(); Out_String((CHAR*)" base: ", 13); if (e->base == NIL) { @@ -279,11 +279,14 @@ static void Texts_DumpElem (Texts_Elem e) static void Texts_DumpRun (Texts_Run ru) { + Out_String((CHAR*)" Run at ", 10); + Out_Hex((INT32)(ADDRESS)ru, 1); + Out_Ln(); Out_String((CHAR*)" prev: ", 12); - Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Hex((INT32)(ADDRESS)ru->prev, 1); Out_Ln(); Out_String((CHAR*)" next: ", 12); - Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Hex((INT32)(ADDRESS)ru->next, 1); Out_Ln(); Out_String((CHAR*)" len: ", 12); Out_Int(ru->len, 1); diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index c9994206..652cb128 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -172,7 +172,7 @@ void Files_DumpFile (Files_File f, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"next: ", 15); - Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Hex((INT32)(ADDRESS)f->next, 1); Out_Ln(); } @@ -196,8 +196,8 @@ void Files_DumpBuffer (Files_Buffer b, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"data: ", 7); - Out_String((CHAR*)"...", 4); Out_Ln(); + Out_HexDump((void*)b->data, 4096); Files_Spaces(indent); Out_String((CHAR*)"f: ", 7); if (b->f == NIL) { diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index a647f77d..38e680ae 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -16,6 +16,9 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); +export void Out_Hex (INT64 x, INT64 n); +export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -119,12 +122,86 @@ void Out_Int (INT64 x, INT64 n) } } +void Out_Hex (INT64 x, INT64 n) +{ + if (n < 1) { + n = 1; + } else if (n > 16) { + n = 16; + } + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } + x = __ROT(x, __ASHL(16 - n, 2), 64); + while (n > 0) { + x = __ROTL(x, 4, 64); + n -= 1; + if (__MASK(x, -16) < 10) { + Out_Char((CHAR)(__MASK(x, -16) + 48)); + } else { + Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + } + } +} + void Out_Ln (void) { Out_String(Platform_NL, 3); Out_Flush(); } +void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +{ + INT32 i, n, lim; + CHAR c; + lim = a + l; + while (a < lim) { + if (a + 16 < lim) { + n = 16; + } else { + n = lim - a; + } + Out_Hex(o, 8); + Out_Char(' '); + i = 0; + while (i < n) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + __GET(a + i, c, CHAR); + Out_Hex((INT16)c, 2); + Out_Char(' '); + i += 1; + } + while (i < 16) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + Out_String((CHAR*)" ", 4); + i += 1; + } + Out_String((CHAR*)" ", 2); + i = 0; + while (i < n) { + __GET(a + i, c, CHAR); + if ((INT16)c < 32 || (INT16)c > 126) { + Out_Char('.'); + } else { + Out_Char(c); + } + i += 1; + } + a += n; + o += n; + Out_Ln(); + } +} + +void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) +{ + Out_HexDumpAdr((ADDRESS)m, 0, m__len); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 8c7a5774..bae3e220 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -11,6 +11,9 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); import void Out_Flush (void); +import void Out_Hex (INT64 x, INT64 n); +import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 9016dbc8..5450b303 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -243,13 +243,13 @@ static void Texts_DumpText (Texts_Text t) Out_Int(t->len, 1); Out_Ln(); Out_String((CHAR*)" notify: ", 15); - Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Hex((INT32)(ADDRESS)t->notify, 1); Out_Ln(); Out_String((CHAR*)" head: ", 15); - Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Hex((INT32)(ADDRESS)t->head, 1); Out_Ln(); Out_String((CHAR*)" cache: ", 15); - Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Hex((INT32)(ADDRESS)t->cache, 1); Out_Ln(); Out_String((CHAR*)" corg: ", 15); Out_Int(t->corg, 1); @@ -265,7 +265,7 @@ static void Texts_DumpElem (Texts_Elem e) Out_Int(e->H, 1); Out_Ln(); Out_String((CHAR*)" handle: ", 13); - Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Hex((INT32)(ADDRESS)e->handle, 1); Out_Ln(); Out_String((CHAR*)" base: ", 13); if (e->base == NIL) { @@ -279,11 +279,14 @@ static void Texts_DumpElem (Texts_Elem e) static void Texts_DumpRun (Texts_Run ru) { + Out_String((CHAR*)" Run at ", 10); + Out_Hex((INT32)(ADDRESS)ru, 1); + Out_Ln(); Out_String((CHAR*)" prev: ", 12); - Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Hex((INT32)(ADDRESS)ru->prev, 1); Out_Ln(); Out_String((CHAR*)" next: ", 12); - Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Hex((INT32)(ADDRESS)ru->next, 1); Out_Ln(); Out_String((CHAR*)" len: ", 12); Out_Int(ru->len, 1); diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 2d13a80b..92ada350 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -172,7 +172,7 @@ void Files_DumpFile (Files_File f, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"next: ", 15); - Out_Int((INT64)(ADDRESS)f->next, 1); + Out_Hex((INT64)(ADDRESS)f->next, 1); Out_Ln(); } @@ -196,8 +196,8 @@ void Files_DumpBuffer (Files_Buffer b, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"data: ", 7); - Out_String((CHAR*)"...", 4); Out_Ln(); + Out_HexDump((void*)b->data, 4096); Files_Spaces(indent); Out_String((CHAR*)"f: ", 7); if (b->f == NIL) { diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a647f77d..64345041 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -16,6 +16,9 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); +export void Out_Hex (INT64 x, INT64 n); +export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +export void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -119,12 +122,86 @@ void Out_Int (INT64 x, INT64 n) } } +void Out_Hex (INT64 x, INT64 n) +{ + if (n < 1) { + n = 1; + } else if (n > 16) { + n = 16; + } + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } + x = __ROT(x, __ASHL(16 - n, 2), 64); + while (n > 0) { + x = __ROTL(x, 4, 64); + n -= 1; + if (__MASK(x, -16) < 10) { + Out_Char((CHAR)(__MASK(x, -16) + 48)); + } else { + Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + } + } +} + void Out_Ln (void) { Out_String(Platform_NL, 3); Out_Flush(); } +void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) +{ + INT64 i, n, lim; + CHAR c; + lim = a + l; + while (a < lim) { + if (a + 16 < lim) { + n = 16; + } else { + n = lim - a; + } + Out_Hex(o, 8); + Out_Char(' '); + i = 0; + while (i < n) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + __GET(a + i, c, CHAR); + Out_Hex((INT16)c, 2); + Out_Char(' '); + i += 1; + } + while (i < 16) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + Out_String((CHAR*)" ", 4); + i += 1; + } + Out_String((CHAR*)" ", 2); + i = 0; + while (i < n) { + __GET(a + i, c, CHAR); + if ((INT16)c < 32 || (INT16)c > 126) { + Out_Char('.'); + } else { + Out_Char(c); + } + i += 1; + } + a += n; + o += n; + Out_Ln(); + } +} + +void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) +{ + Out_HexDumpAdr((ADDRESS)m, 0, m__len); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 8c7a5774..6962abdc 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -11,6 +11,9 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); import void Out_Flush (void); +import void Out_Hex (INT64 x, INT64 n); +import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +import void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 1afb5eba..c7301f23 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -243,13 +243,13 @@ static void Texts_DumpText (Texts_Text t) Out_Int(t->len, 1); Out_Ln(); Out_String((CHAR*)" notify: ", 15); - Out_Int((INT64)(ADDRESS)t->notify, 1); + Out_Hex((INT64)(ADDRESS)t->notify, 1); Out_Ln(); Out_String((CHAR*)" head: ", 15); - Out_Int((INT64)(ADDRESS)t->head, 1); + Out_Hex((INT64)(ADDRESS)t->head, 1); Out_Ln(); Out_String((CHAR*)" cache: ", 15); - Out_Int((INT64)(ADDRESS)t->cache, 1); + Out_Hex((INT64)(ADDRESS)t->cache, 1); Out_Ln(); Out_String((CHAR*)" corg: ", 15); Out_Int(t->corg, 1); @@ -265,7 +265,7 @@ static void Texts_DumpElem (Texts_Elem e) Out_Int(e->H, 1); Out_Ln(); Out_String((CHAR*)" handle: ", 13); - Out_Int((INT64)(ADDRESS)e->handle, 1); + Out_Hex((INT64)(ADDRESS)e->handle, 1); Out_Ln(); Out_String((CHAR*)" base: ", 13); if (e->base == NIL) { @@ -279,11 +279,14 @@ static void Texts_DumpElem (Texts_Elem e) static void Texts_DumpRun (Texts_Run ru) { + Out_String((CHAR*)" Run at ", 10); + Out_Hex((INT64)(ADDRESS)ru, 1); + Out_Ln(); Out_String((CHAR*)" prev: ", 12); - Out_Int((INT64)(ADDRESS)ru->prev, 1); + Out_Hex((INT64)(ADDRESS)ru->prev, 1); Out_Ln(); Out_String((CHAR*)" next: ", 12); - Out_Int((INT64)(ADDRESS)ru->next, 1); + Out_Hex((INT64)(ADDRESS)ru->next, 1); Out_Ln(); Out_String((CHAR*)" len: ", 12); Out_Int(ru->len, 1); diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 3e1b5ecd..2b8c7919 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -172,7 +172,7 @@ void Files_DumpFile (Files_File f, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"next: ", 15); - Out_Int((INT32)(ADDRESS)f->next, 1); + Out_Hex((INT32)(ADDRESS)f->next, 1); Out_Ln(); } @@ -196,8 +196,8 @@ void Files_DumpBuffer (Files_Buffer b, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"data: ", 7); - Out_String((CHAR*)"...", 4); Out_Ln(); + Out_HexDump((void*)b->data, 4096); Files_Spaces(indent); Out_String((CHAR*)"f: ", 7); if (b->f == NIL) { diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 52896b61..f5e37537 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -16,6 +16,9 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); +export void Out_Hex (INT64 x, INT64 n); +export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -119,12 +122,86 @@ void Out_Int (INT64 x, INT64 n) } } +void Out_Hex (INT64 x, INT64 n) +{ + if (n < 1) { + n = 1; + } else if (n > 16) { + n = 16; + } + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } + x = __ROT(x, __ASHL(16 - n, 2), 64); + while (n > 0) { + x = __ROTL(x, 4, 64); + n -= 1; + if (__MASK(x, -16) < 10) { + Out_Char((CHAR)(__MASK(x, -16) + 48)); + } else { + Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + } + } +} + void Out_Ln (void) { Out_String(Platform_NL, 3); Out_Flush(); } +void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +{ + INT32 i, n, lim; + CHAR c; + lim = a + l; + while (a < lim) { + if (a + 16 < lim) { + n = 16; + } else { + n = lim - a; + } + Out_Hex(o, 8); + Out_Char(' '); + i = 0; + while (i < n) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + __GET(a + i, c, CHAR); + Out_Hex((INT16)c, 2); + Out_Char(' '); + i += 1; + } + while (i < 16) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + Out_String((CHAR*)" ", 4); + i += 1; + } + Out_String((CHAR*)" ", 2); + i = 0; + while (i < n) { + __GET(a + i, c, CHAR); + if ((INT16)c < 32 || (INT16)c > 126) { + Out_Char('.'); + } else { + Out_Char(c); + } + i += 1; + } + a += n; + o += n; + Out_Ln(); + } +} + +void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) +{ + Out_HexDumpAdr((ADDRESS)m, 0, m__len); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 8c7a5774..bae3e220 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -11,6 +11,9 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); import void Out_Flush (void); +import void Out_Hex (INT64 x, INT64 n); +import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 9016dbc8..5450b303 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -243,13 +243,13 @@ static void Texts_DumpText (Texts_Text t) Out_Int(t->len, 1); Out_Ln(); Out_String((CHAR*)" notify: ", 15); - Out_Int((INT32)(ADDRESS)t->notify, 1); + Out_Hex((INT32)(ADDRESS)t->notify, 1); Out_Ln(); Out_String((CHAR*)" head: ", 15); - Out_Int((INT32)(ADDRESS)t->head, 1); + Out_Hex((INT32)(ADDRESS)t->head, 1); Out_Ln(); Out_String((CHAR*)" cache: ", 15); - Out_Int((INT32)(ADDRESS)t->cache, 1); + Out_Hex((INT32)(ADDRESS)t->cache, 1); Out_Ln(); Out_String((CHAR*)" corg: ", 15); Out_Int(t->corg, 1); @@ -265,7 +265,7 @@ static void Texts_DumpElem (Texts_Elem e) Out_Int(e->H, 1); Out_Ln(); Out_String((CHAR*)" handle: ", 13); - Out_Int((INT32)(ADDRESS)e->handle, 1); + Out_Hex((INT32)(ADDRESS)e->handle, 1); Out_Ln(); Out_String((CHAR*)" base: ", 13); if (e->base == NIL) { @@ -279,11 +279,14 @@ static void Texts_DumpElem (Texts_Elem e) static void Texts_DumpRun (Texts_Run ru) { + Out_String((CHAR*)" Run at ", 10); + Out_Hex((INT32)(ADDRESS)ru, 1); + Out_Ln(); Out_String((CHAR*)" prev: ", 12); - Out_Int((INT32)(ADDRESS)ru->prev, 1); + Out_Hex((INT32)(ADDRESS)ru->prev, 1); Out_Ln(); Out_String((CHAR*)" next: ", 12); - Out_Int((INT32)(ADDRESS)ru->next, 1); + Out_Hex((INT32)(ADDRESS)ru->next, 1); Out_Ln(); Out_String((CHAR*)" len: ", 12); Out_Int(ru->len, 1); diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 072b15ba..fc649cf8 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -173,7 +173,7 @@ void Files_DumpFile (Files_File f, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"next: ", 15); - Out_Int((INT64)(ADDRESS)f->next, 1); + Out_Hex((INT64)(ADDRESS)f->next, 1); Out_Ln(); } @@ -197,8 +197,8 @@ void Files_DumpBuffer (Files_Buffer b, INT16 indent) Out_Ln(); Files_Spaces(indent); Out_String((CHAR*)"data: ", 7); - Out_String((CHAR*)"...", 4); Out_Ln(); + Out_HexDump((void*)b->data, 4096); Files_Spaces(indent); Out_String((CHAR*)"f: ", 7); if (b->f == NIL) { diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 52896b61..b0d58957 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -16,6 +16,9 @@ static INT16 Out_in; export void Out_Char (CHAR ch); export void Out_Flush (void); +export void Out_Hex (INT64 x, INT64 n); +export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +export void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -119,12 +122,86 @@ void Out_Int (INT64 x, INT64 n) } } +void Out_Hex (INT64 x, INT64 n) +{ + if (n < 1) { + n = 1; + } else if (n > 16) { + n = 16; + } + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } + x = __ROT(x, __ASHL(16 - n, 2), 64); + while (n > 0) { + x = __ROTL(x, 4, 64); + n -= 1; + if (__MASK(x, -16) < 10) { + Out_Char((CHAR)(__MASK(x, -16) + 48)); + } else { + Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + } + } +} + void Out_Ln (void) { Out_String(Platform_NL, 3); Out_Flush(); } +void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) +{ + INT64 i, n, lim; + CHAR c; + lim = a + l; + while (a < lim) { + if (a + 16 < lim) { + n = 16; + } else { + n = lim - a; + } + Out_Hex(o, 8); + Out_Char(' '); + i = 0; + while (i < n) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + __GET(a + i, c, CHAR); + Out_Hex((INT16)c, 2); + Out_Char(' '); + i += 1; + } + while (i < 16) { + if (__MASK(i, -4) == 0) { + Out_Char(' '); + } + Out_String((CHAR*)" ", 4); + i += 1; + } + Out_String((CHAR*)" ", 2); + i = 0; + while (i < n) { + __GET(a + i, c, CHAR); + if ((INT16)c < 32 || (INT16)c > 126) { + Out_Char('.'); + } else { + Out_Char(c); + } + i += 1; + } + a += n; + o += n; + Out_Ln(); + } +} + +void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) +{ + Out_HexDumpAdr((ADDRESS)m, 0, m__len); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 8c7a5774..6962abdc 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -11,6 +11,9 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); import void Out_Flush (void); +import void Out_Hex (INT64 x, INT64 n); +import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); +import void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 1afb5eba..c7301f23 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -243,13 +243,13 @@ static void Texts_DumpText (Texts_Text t) Out_Int(t->len, 1); Out_Ln(); Out_String((CHAR*)" notify: ", 15); - Out_Int((INT64)(ADDRESS)t->notify, 1); + Out_Hex((INT64)(ADDRESS)t->notify, 1); Out_Ln(); Out_String((CHAR*)" head: ", 15); - Out_Int((INT64)(ADDRESS)t->head, 1); + Out_Hex((INT64)(ADDRESS)t->head, 1); Out_Ln(); Out_String((CHAR*)" cache: ", 15); - Out_Int((INT64)(ADDRESS)t->cache, 1); + Out_Hex((INT64)(ADDRESS)t->cache, 1); Out_Ln(); Out_String((CHAR*)" corg: ", 15); Out_Int(t->corg, 1); @@ -265,7 +265,7 @@ static void Texts_DumpElem (Texts_Elem e) Out_Int(e->H, 1); Out_Ln(); Out_String((CHAR*)" handle: ", 13); - Out_Int((INT64)(ADDRESS)e->handle, 1); + Out_Hex((INT64)(ADDRESS)e->handle, 1); Out_Ln(); Out_String((CHAR*)" base: ", 13); if (e->base == NIL) { @@ -279,11 +279,14 @@ static void Texts_DumpElem (Texts_Elem e) static void Texts_DumpRun (Texts_Run ru) { + Out_String((CHAR*)" Run at ", 10); + Out_Hex((INT64)(ADDRESS)ru, 1); + Out_Ln(); Out_String((CHAR*)" prev: ", 12); - Out_Int((INT64)(ADDRESS)ru->prev, 1); + Out_Hex((INT64)(ADDRESS)ru->prev, 1); Out_Ln(); Out_String((CHAR*)" next: ", 12); - Out_Int((INT64)(ADDRESS)ru->next, 1); + Out_Hex((INT64)(ADDRESS)ru->next, 1); Out_Ln(); Out_String((CHAR*)" len: ", 12); Out_Int(ru->len, 1); From 3c1e64375e7488c0166d4fac4ca27e001bc08b2b Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:31:25 +0000 Subject: [PATCH 075/241] Fix hexdump on 32 bit builds. --- src/runtime/Out.Mod | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 9aaa961c..40b2bee7 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -84,16 +84,16 @@ PROCEDURE Ln*; BEGIN String(Platform.NL); Flush; END Ln; -PROCEDURE HexDumpAdr*(a, o, l: SYSTEM.ADDRESS); -VAR i, n, lim: SYSTEM.ADDRESS; c: CHAR; +PROCEDURE HexDumpAdr*(adr: SYSTEM.ADDRESS; offset: HUGEINT; length: LONGINT); +VAR i: INTEGER; n, lim: SYSTEM.ADDRESS; c: CHAR; BEGIN - lim := a+l; - WHILE a < lim DO - IF a+16 < lim THEN n := 16 ELSE n := lim-a END; - Hex(o,8); Char(" "); + lim := adr+length; + WHILE adr < lim DO + IF adr+16 < lim THEN n := 16 ELSE n := lim-adr END; + Hex(offset,8); Char(" "); i := 0; WHILE i < n DO IF i MOD 4 = 0 THEN Char(" ") END; - SYSTEM.GET(a+i, c); Hex(ORD(c), 2); Char(" "); + SYSTEM.GET(adr+i, c); Hex(ORD(c), 2); Char(" "); INC(i) END; WHILE i < 16 DO @@ -102,11 +102,11 @@ BEGIN END; String(" "); i := 0; WHILE i < n DO - SYSTEM.GET(a+i, c); + SYSTEM.GET(adr+i, c); IF (ORD(c) < 32) OR (ORD(c) > 126) THEN Char(".") ELSE Char(c) END; INC(i) END; - INC(a,n); INC(o,n); Ln + INC(adr,n); INC(offset,n); Ln END END HexDumpAdr; From c409b84e68c54d6b4920a910e99ef5e369e2564c Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:32:23 +0000 Subject: [PATCH 076/241] Update bootstrap sources. --- bootstrap/unix-44/Out.c | 25 +++++++++++++------------ bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-48/Out.c | 25 +++++++++++++------------ bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-88/Out.c | 29 +++++++++++++++-------------- bootstrap/unix-88/Out.h | 2 +- bootstrap/windows-48/Out.c | 25 +++++++++++++------------ bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-88/Out.c | 29 +++++++++++++++-------------- bootstrap/windows-88/Out.h | 2 +- 10 files changed, 74 insertions(+), 69 deletions(-) diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 38e680ae..4c3982b5 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -18,7 +18,7 @@ export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -150,25 +150,26 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) { - INT32 i, n, lim; + INT16 i; + INT32 n, lim; CHAR c; - lim = a + l; - while (a < lim) { - if (a + 16 < lim) { + lim = adr + length; + while (adr < lim) { + if (adr + 16 < lim) { n = 16; } else { - n = lim - a; + n = lim - adr; } - Out_Hex(o, 8); + Out_Hex(offset, 8); Out_Char(' '); i = 0; while (i < n) { if (__MASK(i, -4) == 0) { Out_Char(' '); } - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); Out_Hex((INT16)c, 2); Out_Char(' '); i += 1; @@ -183,7 +184,7 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) Out_String((CHAR*)" ", 2); i = 0; while (i < n) { - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); if ((INT16)c < 32 || (INT16)c > 126) { Out_Char('.'); } else { @@ -191,8 +192,8 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) } i += 1; } - a += n; - o += n; + adr += n; + offset += (INT64)n; Out_Ln(); } } diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index bae3e220..1db1f1b3 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -13,7 +13,7 @@ import void Out_Char (CHAR ch); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 38e680ae..4c3982b5 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -18,7 +18,7 @@ export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -150,25 +150,26 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) { - INT32 i, n, lim; + INT16 i; + INT32 n, lim; CHAR c; - lim = a + l; - while (a < lim) { - if (a + 16 < lim) { + lim = adr + length; + while (adr < lim) { + if (adr + 16 < lim) { n = 16; } else { - n = lim - a; + n = lim - adr; } - Out_Hex(o, 8); + Out_Hex(offset, 8); Out_Char(' '); i = 0; while (i < n) { if (__MASK(i, -4) == 0) { Out_Char(' '); } - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); Out_Hex((INT16)c, 2); Out_Char(' '); i += 1; @@ -183,7 +184,7 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) Out_String((CHAR*)" ", 2); i = 0; while (i < n) { - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); if ((INT16)c < 32 || (INT16)c > 126) { Out_Char('.'); } else { @@ -191,8 +192,8 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) } i += 1; } - a += n; - o += n; + adr += n; + offset += (INT64)n; Out_Ln(); } } diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index bae3e220..1db1f1b3 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -13,7 +13,7 @@ import void Out_Char (CHAR ch); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 64345041..c9c42bdb 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -18,7 +18,7 @@ export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); +export void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -150,25 +150,26 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) +void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) { - INT64 i, n, lim; + INT16 i; + INT64 n, lim; CHAR c; - lim = a + l; - while (a < lim) { - if (a + 16 < lim) { + lim = adr + (INT64)length; + while (adr < lim) { + if (adr + 16 < lim) { n = 16; } else { - n = lim - a; + n = lim - adr; } - Out_Hex(o, 8); + Out_Hex(offset, 8); Out_Char(' '); i = 0; - while (i < n) { + while ((INT64)i < n) { if (__MASK(i, -4) == 0) { Out_Char(' '); } - __GET(a + i, c, CHAR); + __GET(adr + (INT64)i, c, CHAR); Out_Hex((INT16)c, 2); Out_Char(' '); i += 1; @@ -182,8 +183,8 @@ void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) } Out_String((CHAR*)" ", 2); i = 0; - while (i < n) { - __GET(a + i, c, CHAR); + while ((INT64)i < n) { + __GET(adr + (INT64)i, c, CHAR); if ((INT16)c < 32 || (INT16)c > 126) { Out_Char('.'); } else { @@ -191,8 +192,8 @@ void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) } i += 1; } - a += n; - o += n; + adr += n; + offset += n; Out_Ln(); } } diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 6962abdc..24829244 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -13,7 +13,7 @@ import void Out_Char (CHAR ch); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); +import void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index f5e37537..767779ee 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -18,7 +18,7 @@ export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -150,25 +150,26 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) +void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) { - INT32 i, n, lim; + INT16 i; + INT32 n, lim; CHAR c; - lim = a + l; - while (a < lim) { - if (a + 16 < lim) { + lim = adr + length; + while (adr < lim) { + if (adr + 16 < lim) { n = 16; } else { - n = lim - a; + n = lim - adr; } - Out_Hex(o, 8); + Out_Hex(offset, 8); Out_Char(' '); i = 0; while (i < n) { if (__MASK(i, -4) == 0) { Out_Char(' '); } - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); Out_Hex((INT16)c, 2); Out_Char(' '); i += 1; @@ -183,7 +184,7 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) Out_String((CHAR*)" ", 2); i = 0; while (i < n) { - __GET(a + i, c, CHAR); + __GET(adr + i, c, CHAR); if ((INT16)c < 32 || (INT16)c > 126) { Out_Char('.'); } else { @@ -191,8 +192,8 @@ void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l) } i += 1; } - a += n; - o += n; + adr += n; + offset += (INT64)n; Out_Ln(); } } diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index bae3e220..1db1f1b3 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -13,7 +13,7 @@ import void Out_Char (CHAR ch); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 a, INT32 o, INT32 l); +import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index b0d58957..4e33a095 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -18,7 +18,7 @@ export void Out_Char (CHAR ch); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); +export void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -150,25 +150,26 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) +void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) { - INT64 i, n, lim; + INT16 i; + INT64 n, lim; CHAR c; - lim = a + l; - while (a < lim) { - if (a + 16 < lim) { + lim = adr + (INT64)length; + while (adr < lim) { + if (adr + 16 < lim) { n = 16; } else { - n = lim - a; + n = lim - adr; } - Out_Hex(o, 8); + Out_Hex(offset, 8); Out_Char(' '); i = 0; - while (i < n) { + while ((INT64)i < n) { if (__MASK(i, -4) == 0) { Out_Char(' '); } - __GET(a + i, c, CHAR); + __GET(adr + (INT64)i, c, CHAR); Out_Hex((INT16)c, 2); Out_Char(' '); i += 1; @@ -182,8 +183,8 @@ void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) } Out_String((CHAR*)" ", 2); i = 0; - while (i < n) { - __GET(a + i, c, CHAR); + while ((INT64)i < n) { + __GET(adr + (INT64)i, c, CHAR); if ((INT16)c < 32 || (INT16)c > 126) { Out_Char('.'); } else { @@ -191,8 +192,8 @@ void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l) } i += 1; } - a += n; - o += n; + adr += n; + offset += n; Out_Ln(); } } diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 6962abdc..24829244 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -13,7 +13,7 @@ import void Out_Char (CHAR ch); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT64 a, INT64 o, INT64 l); +import void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); From 6e28d3f2fdb90a154d5f987d2928deeef58af506 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:43:05 +0000 Subject: [PATCH 077/241] Ha! Now fix hexdump for -OC build. --- src/runtime/Out.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 40b2bee7..23d30be4 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -87,7 +87,7 @@ END Ln; PROCEDURE HexDumpAdr*(adr: SYSTEM.ADDRESS; offset: HUGEINT; length: LONGINT); VAR i: INTEGER; n, lim: SYSTEM.ADDRESS; c: CHAR; BEGIN - lim := adr+length; + lim := SYSTEM.VAL(SYSTEM.ADDRESS, adr+length); WHILE adr < lim DO IF adr+16 < lim THEN n := 16 ELSE n := lim-adr END; Hex(offset,8); Char(" "); From 27e3b576160edb91869cee253a7b862a66ac5c1f Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 17:43:47 +0000 Subject: [PATCH 078/241] Update bootstrap sources. --- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-88/Out.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 4c3982b5..65e2e307 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -155,7 +155,7 @@ void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) INT16 i; INT32 n, lim; CHAR c; - lim = adr + length; + lim = (INT32)(adr + length); while (adr < lim) { if (adr + 16 < lim) { n = 16; diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 4c3982b5..65e2e307 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -155,7 +155,7 @@ void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) INT16 i; INT32 n, lim; CHAR c; - lim = adr + length; + lim = (INT32)(adr + length); while (adr < lim) { if (adr + 16 < lim) { n = 16; diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index c9c42bdb..d4d8e5f4 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -155,7 +155,7 @@ void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) INT16 i; INT64 n, lim; CHAR c; - lim = adr + (INT64)length; + lim = (INT64)(adr + (INT64)length); while (adr < lim) { if (adr + 16 < lim) { n = 16; diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 767779ee..7e1c7459 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -155,7 +155,7 @@ void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) INT16 i; INT32 n, lim; CHAR c; - lim = adr + length; + lim = (INT32)(adr + length); while (adr < lim) { if (adr + 16 < lim) { n = 16; diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 4e33a095..66c81d4e 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -155,7 +155,7 @@ void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) INT16 i; INT64 n, lim; CHAR c; - lim = adr + (INT64)length; + lim = (INT64)(adr + (INT64)length); while (adr < lim) { if (adr + 16 < lim) { n = 16; From f75a98d3dc5a45e130c300d8168a82c2b8b0f056 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 20:18:34 +0000 Subject: [PATCH 079/241] Display text run dump according to its dynamic type. --- src/runtime/Texts.Mod | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 1712411c..ae7440a0 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -131,17 +131,9 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Out.String(" corg: "); Out.Int(t.corg,1); Out.Ln; END DumpText; - PROCEDURE DumpElem(e: Elem); - BEGIN - Out.String(" W: "); Out.Int(e.W,1); Out.Ln; - Out.String(" H: "); Out.Int(e.H,1); Out.Ln; - Out.String(" handle: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; - Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; - END DumpElem; - PROCEDURE DumpRun(ru: Run); BEGIN - Out.String(" Run at "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru),1); Out.Ln; + Out.String(" Run at "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru),1); Out.Ln; Out.String(" prev: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; Out.String(" next: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.next),1); Out.Ln; Out.String(" len: "); Out.Int(ru.len,1); Out.Ln; @@ -151,6 +143,24 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Out.String(" ascii: "); IF ru.ascii THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; END DumpRun; + PROCEDURE DumpElem(e: Elem); + BEGIN + DumpRun(e); + Out.String(" -- Elem --"); Out.Ln; + Out.String(" W: "); Out.Int(e.W,1); Out.Ln; + Out.String(" H: "); Out.Int(e.H,1); Out.Ln; + Out.String(" handle: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; + Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; + END DumpElem; + + PROCEDURE DumpPiece(p: Piece); + BEGIN + DumpRun(p); + Out.String(" -- Piece --"); Out.Ln; + Out.String(" file: "); IF p.file = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; Files.DumpFile(p.file, 3) END; + Out.String(" org: "); Out.Int(p.org,1); Out.Ln; + END DumpPiece; + PROCEDURE DumpReader*(re: Reader); BEGIN Out.String("Reader:"); Out.Ln; @@ -162,7 +172,14 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** Out.String(" off: "); Out.Int(re.off,1); Out.Ln; Out.String(" elem: "); IF re.elem = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpElem(re.elem) END; Out.String(" rider: "); Out.Ln; Files.DumpRider(re.rider,2); - Out.String(" run: "); IF re.run = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpRun(re.run) END; + Out.String(" run: "); + IF re.run = NIL THEN Out.String(""); Out.Ln + ELSE Out.Ln; + IF re.run IS Piece THEN DumpPiece(re.run(Piece)) + ELSIF re.run IS Elem THEN DumpElem(re.run(Elem)) + ELSE DumpRun(re.run) + END + END; END DumpReader; From 80512b6eccf3c7bcd4eb6109f05ed6fc99a3b278 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 11 Dec 2016 20:19:08 +0000 Subject: [PATCH 080/241] Update bootstrap sources. --- bootstrap/unix-44/Texts.c | 284 +++++++++++++++++++---------------- bootstrap/unix-48/Texts.c | 284 +++++++++++++++++++---------------- bootstrap/unix-88/Texts.c | 284 +++++++++++++++++++---------------- bootstrap/windows-48/Texts.c | 284 +++++++++++++++++++---------------- bootstrap/windows-88/Texts.c | 284 +++++++++++++++++++---------------- 5 files changed, 780 insertions(+), 640 deletions(-) diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index d86402c1..8c4ccea8 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -193,6 +193,7 @@ export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); +static void Texts_DumpPiece (Texts_Piece p); export void Texts_DumpReader (Texts_Reader re); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); @@ -256,30 +257,9 @@ static void Texts_DumpText (Texts_Text t) Out_Ln(); } -static void Texts_DumpElem (Texts_Elem e) -{ - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - static void Texts_DumpRun (Texts_Run ru) { - Out_String((CHAR*)" Run at ", 10); + Out_String((CHAR*)" Run at ", 12); Out_Hex((INT32)(ADDRESS)ru, 1); Out_Ln(); Out_String((CHAR*)" prev: ", 12); @@ -313,6 +293,48 @@ static void Texts_DumpRun (Texts_Run ru) Out_Ln(); } +static void Texts_DumpElem (Texts_Elem e) +{ + Texts_DumpRun((void*)e); + Out_String((CHAR*)" -- Elem --", 15); + Out_Ln(); + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Hex((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpPiece (Texts_Piece p) +{ + Texts_DumpRun((void*)p); + Out_String((CHAR*)" -- Piece --", 16); + Out_Ln(); + Out_String((CHAR*)" file: ", 12); + if (p->file == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(p->file, 3); + } + Out_String((CHAR*)" org: ", 12); + Out_Int(p->org, 1); + Out_Ln(); +} + void Texts_DumpReader (Texts_Reader re) { Out_String((CHAR*)"Reader:", 8); @@ -360,7 +382,13 @@ void Texts_DumpReader (Texts_Reader re) Out_Ln(); } else { Out_Ln(); - Texts_DumpRun(re.run); + if (__ISP(re.run, Texts_PieceDesc, 1)) { + Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); + } else if (__ISP(re.run, Texts_ElemDesc, 1)) { + Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); + } else { + Texts_DumpRun(re.run); + } } } @@ -848,32 +876,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__35 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__35 *lnk; -} *Scan__35_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__36 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__36 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); - if (*Scan__35_s->ch == '-') { - *Scan__35_s->negE = 1; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__35_s->negE = 0; - if (*Scan__35_s->ch == '+') { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { - *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -887,13 +915,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__35 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__35_s; - Scan__35_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -994,7 +1022,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__36(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1027,7 +1055,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__36(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -1080,7 +1108,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__35_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1299,30 +1327,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__57 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__57 *lnk; -} *WriteRealFix__57_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__58 (INT16 n); -static void seq__60 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__60 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__58 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__57_s->i -= 1; - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1333,23 +1361,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__57 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__57_s; - WriteRealFix__57_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__60(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__60(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__60(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1382,21 +1410,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__60(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__58(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__58(k); + dig__59(k); } else { - seq__60(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__60('0', -e); - dig__58(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__57_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1495,48 +1523,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__47 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__47 *lnk; -} *WriteDate__47_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__48 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__48 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__47 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__47_s; - WriteDate__47_s = &_s; - WritePair__48(' ', __MASK(d, -32)); - WritePair__48('.', __MASK(__ASHR(d, 5), -16)); - WritePair__48('.', __MASK(__ASHR(d, 9), -128)); - WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__48(':', __MASK(__ASHR(t, 6), -64)); - WritePair__48(':', __MASK(t, -64)); - WriteDate__47_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__20 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__20 *lnk; -} *Load0__20_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1547,15 +1575,15 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__20_s->ecnt) { - *Load0__20_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1564,25 +1592,25 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__20_s->T; - (*Load0__20_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__20_s->T; - a->file = *Load0__20_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1599,15 +1627,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__20 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__20_s; - Load0__20_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1640,7 +1668,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1658,7 +1686,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__20_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1727,25 +1755,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__43 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__43 *lnk; -} *Store__43_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); - __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1753,14 +1781,14 @@ static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__43_s->ecnt) { - *Store__43_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__43_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1781,14 +1809,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__43 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__43_s; - Store__43_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1830,7 +1858,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1884,7 +1912,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__43_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 5450b303..4825ab70 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -193,6 +193,7 @@ export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); +static void Texts_DumpPiece (Texts_Piece p); export void Texts_DumpReader (Texts_Reader re); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); @@ -256,30 +257,9 @@ static void Texts_DumpText (Texts_Text t) Out_Ln(); } -static void Texts_DumpElem (Texts_Elem e) -{ - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - static void Texts_DumpRun (Texts_Run ru) { - Out_String((CHAR*)" Run at ", 10); + Out_String((CHAR*)" Run at ", 12); Out_Hex((INT32)(ADDRESS)ru, 1); Out_Ln(); Out_String((CHAR*)" prev: ", 12); @@ -313,6 +293,48 @@ static void Texts_DumpRun (Texts_Run ru) Out_Ln(); } +static void Texts_DumpElem (Texts_Elem e) +{ + Texts_DumpRun((void*)e); + Out_String((CHAR*)" -- Elem --", 15); + Out_Ln(); + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Hex((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpPiece (Texts_Piece p) +{ + Texts_DumpRun((void*)p); + Out_String((CHAR*)" -- Piece --", 16); + Out_Ln(); + Out_String((CHAR*)" file: ", 12); + if (p->file == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(p->file, 3); + } + Out_String((CHAR*)" org: ", 12); + Out_Int(p->org, 1); + Out_Ln(); +} + void Texts_DumpReader (Texts_Reader re) { Out_String((CHAR*)"Reader:", 8); @@ -360,7 +382,13 @@ void Texts_DumpReader (Texts_Reader re) Out_Ln(); } else { Out_Ln(); - Texts_DumpRun(re.run); + if (__ISP(re.run, Texts_PieceDesc, 1)) { + Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); + } else if (__ISP(re.run, Texts_ElemDesc, 1)) { + Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); + } else { + Texts_DumpRun(re.run); + } } } @@ -848,32 +876,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__35 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__35 *lnk; -} *Scan__35_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__36 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__36 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); - if (*Scan__35_s->ch == '-') { - *Scan__35_s->negE = 1; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__35_s->negE = 0; - if (*Scan__35_s->ch == '+') { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { - *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -887,13 +915,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__35 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__35_s; - Scan__35_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -994,7 +1022,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__36(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1027,7 +1055,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__36(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -1080,7 +1108,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__35_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1299,30 +1327,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__57 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__57 *lnk; -} *WriteRealFix__57_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__58 (INT16 n); -static void seq__60 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__60 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__58 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__57_s->i -= 1; - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1333,23 +1361,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__57 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__57_s; - WriteRealFix__57_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__60(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__60(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__60(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1382,21 +1410,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__60(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__58(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__58(k); + dig__59(k); } else { - seq__60(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__60('0', -e); - dig__58(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__57_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1495,48 +1523,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__47 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__47 *lnk; -} *WriteDate__47_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__48 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__48 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__47 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__47_s; - WriteDate__47_s = &_s; - WritePair__48(' ', __MASK(d, -32)); - WritePair__48('.', __MASK(__ASHR(d, 5), -16)); - WritePair__48('.', __MASK(__ASHR(d, 9), -128)); - WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__48(':', __MASK(__ASHR(t, 6), -64)); - WritePair__48(':', __MASK(t, -64)); - WriteDate__47_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__20 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__20 *lnk; -} *Load0__20_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1547,15 +1575,15 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__20_s->ecnt) { - *Load0__20_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1564,25 +1592,25 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__20_s->T; - (*Load0__20_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__20_s->T; - a->file = *Load0__20_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1599,15 +1627,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__20 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__20_s; - Load0__20_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1640,7 +1668,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1658,7 +1686,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__20_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1727,25 +1755,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__43 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__43 *lnk; -} *Store__43_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); - __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1753,14 +1781,14 @@ static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__43_s->ecnt) { - *Store__43_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__43_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1781,14 +1809,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__43 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__43_s; - Store__43_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1830,7 +1858,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1884,7 +1912,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__43_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index c7301f23..9887162e 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -193,6 +193,7 @@ export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); +static void Texts_DumpPiece (Texts_Piece p); export void Texts_DumpReader (Texts_Reader re); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); @@ -256,30 +257,9 @@ static void Texts_DumpText (Texts_Text t) Out_Ln(); } -static void Texts_DumpElem (Texts_Elem e) -{ - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT64)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - static void Texts_DumpRun (Texts_Run ru) { - Out_String((CHAR*)" Run at ", 10); + Out_String((CHAR*)" Run at ", 12); Out_Hex((INT64)(ADDRESS)ru, 1); Out_Ln(); Out_String((CHAR*)" prev: ", 12); @@ -313,6 +293,48 @@ static void Texts_DumpRun (Texts_Run ru) Out_Ln(); } +static void Texts_DumpElem (Texts_Elem e) +{ + Texts_DumpRun((void*)e); + Out_String((CHAR*)" -- Elem --", 15); + Out_Ln(); + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Hex((INT64)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpPiece (Texts_Piece p) +{ + Texts_DumpRun((void*)p); + Out_String((CHAR*)" -- Piece --", 16); + Out_Ln(); + Out_String((CHAR*)" file: ", 12); + if (p->file == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(p->file, 3); + } + Out_String((CHAR*)" org: ", 12); + Out_Int(p->org, 1); + Out_Ln(); +} + void Texts_DumpReader (Texts_Reader re) { Out_String((CHAR*)"Reader:", 8); @@ -360,7 +382,13 @@ void Texts_DumpReader (Texts_Reader re) Out_Ln(); } else { Out_Ln(); - Texts_DumpRun(re.run); + if (__ISP(re.run, Texts_PieceDesc, 1)) { + Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); + } else if (__ISP(re.run, Texts_ElemDesc, 1)) { + Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); + } else { + Texts_DumpRun(re.run); + } } } @@ -848,32 +876,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__35 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__35 *lnk; -} *Scan__35_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__36 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__36 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); - if (*Scan__35_s->ch == '-') { - *Scan__35_s->negE = 1; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__35_s->negE = 0; - if (*Scan__35_s->ch == '+') { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { - *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -887,13 +915,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__35 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__35_s; - Scan__35_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -994,7 +1022,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__36(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1027,7 +1055,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__36(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -1080,7 +1108,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__35_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1299,30 +1327,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__57 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__57 *lnk; -} *WriteRealFix__57_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__58 (INT16 n); -static void seq__60 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__60 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__58 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__57_s->i -= 1; - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1333,23 +1361,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__57 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__57_s; - WriteRealFix__57_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__60(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__60(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__60(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1382,21 +1410,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__60(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__58(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__58(k); + dig__59(k); } else { - seq__60(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__60('0', -e); - dig__58(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__57_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1495,48 +1523,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__47 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__47 *lnk; -} *WriteDate__47_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__48 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__48 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__47 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__47_s; - WriteDate__47_s = &_s; - WritePair__48(' ', __MASK(d, -32)); - WritePair__48('.', __MASK(__ASHR(d, 5), -16)); - WritePair__48('.', __MASK(__ASHR(d, 9), -128)); - WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__48(':', __MASK(__ASHR(t, 6), -64)); - WritePair__48(':', __MASK(t, -64)); - WriteDate__47_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__20 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__20 *lnk; -} *Load0__20_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1547,15 +1575,15 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__20_s->ecnt) { - *Load0__20_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1564,25 +1592,25 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__20_s->T; - (*Load0__20_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__20_s->T; - a->file = *Load0__20_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1599,15 +1627,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__20 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__20_s; - Load0__20_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1640,7 +1668,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1658,7 +1686,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__20_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1727,25 +1755,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__43 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__43 *lnk; -} *Store__43_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); - __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1753,14 +1781,14 @@ static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__43_s->ecnt) { - *Store__43_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__43_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1781,14 +1809,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__43 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__43_s; - Store__43_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1830,7 +1858,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1884,7 +1912,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__43_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 5450b303..4825ab70 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -193,6 +193,7 @@ export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); +static void Texts_DumpPiece (Texts_Piece p); export void Texts_DumpReader (Texts_Reader re); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); @@ -256,30 +257,9 @@ static void Texts_DumpText (Texts_Text t) Out_Ln(); } -static void Texts_DumpElem (Texts_Elem e) -{ - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - static void Texts_DumpRun (Texts_Run ru) { - Out_String((CHAR*)" Run at ", 10); + Out_String((CHAR*)" Run at ", 12); Out_Hex((INT32)(ADDRESS)ru, 1); Out_Ln(); Out_String((CHAR*)" prev: ", 12); @@ -313,6 +293,48 @@ static void Texts_DumpRun (Texts_Run ru) Out_Ln(); } +static void Texts_DumpElem (Texts_Elem e) +{ + Texts_DumpRun((void*)e); + Out_String((CHAR*)" -- Elem --", 15); + Out_Ln(); + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Hex((INT32)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpPiece (Texts_Piece p) +{ + Texts_DumpRun((void*)p); + Out_String((CHAR*)" -- Piece --", 16); + Out_Ln(); + Out_String((CHAR*)" file: ", 12); + if (p->file == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(p->file, 3); + } + Out_String((CHAR*)" org: ", 12); + Out_Int(p->org, 1); + Out_Ln(); +} + void Texts_DumpReader (Texts_Reader re) { Out_String((CHAR*)"Reader:", 8); @@ -360,7 +382,13 @@ void Texts_DumpReader (Texts_Reader re) Out_Ln(); } else { Out_Ln(); - Texts_DumpRun(re.run); + if (__ISP(re.run, Texts_PieceDesc, 1)) { + Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); + } else if (__ISP(re.run, Texts_ElemDesc, 1)) { + Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); + } else { + Texts_DumpRun(re.run); + } } } @@ -848,32 +876,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__35 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__35 *lnk; -} *Scan__35_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__36 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__36 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); - if (*Scan__35_s->ch == '-') { - *Scan__35_s->negE = 1; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__35_s->negE = 0; - if (*Scan__35_s->ch == '+') { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { - *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -887,13 +915,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__35 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__35_s; - Scan__35_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -994,7 +1022,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__36(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1027,7 +1055,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__36(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -1080,7 +1108,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__35_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1299,30 +1327,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__57 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__57 *lnk; -} *WriteRealFix__57_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__58 (INT16 n); -static void seq__60 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__60 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__58 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__57_s->i -= 1; - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1333,23 +1361,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__57 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__57_s; - WriteRealFix__57_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__60(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__60(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__60(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1382,21 +1410,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__60(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__58(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__58(k); + dig__59(k); } else { - seq__60(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__60('0', -e); - dig__58(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__57_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1495,48 +1523,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__47 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__47 *lnk; -} *WriteDate__47_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__48 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__48 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__47 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__47_s; - WriteDate__47_s = &_s; - WritePair__48(' ', __MASK(d, -32)); - WritePair__48('.', __MASK(__ASHR(d, 5), -16)); - WritePair__48('.', __MASK(__ASHR(d, 9), -128)); - WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__48(':', __MASK(__ASHR(t, 6), -64)); - WritePair__48(':', __MASK(t, -64)); - WriteDate__47_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__20 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__20 *lnk; -} *Load0__20_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1547,15 +1575,15 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__20_s->ecnt) { - *Load0__20_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1564,25 +1592,25 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__20_s->T; - (*Load0__20_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__20_s->T; - a->file = *Load0__20_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1599,15 +1627,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__20 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__20_s; - Load0__20_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1640,7 +1668,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1658,7 +1686,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__20_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1727,25 +1755,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__43 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__43 *lnk; -} *Store__43_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); - __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1753,14 +1781,14 @@ static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__43_s->ecnt) { - *Store__43_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__43_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1781,14 +1809,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__43 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__43_s; - Store__43_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1830,7 +1858,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1884,7 +1912,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__43_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index c7301f23..9887162e 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -193,6 +193,7 @@ export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); static void Texts_DumpElem (Texts_Elem e); +static void Texts_DumpPiece (Texts_Piece p); export void Texts_DumpReader (Texts_Reader re); static void Texts_DumpRun (Texts_Run ru); static void Texts_DumpText (Texts_Text t); @@ -256,30 +257,9 @@ static void Texts_DumpText (Texts_Text t) Out_Ln(); } -static void Texts_DumpElem (Texts_Elem e) -{ - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT64)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - static void Texts_DumpRun (Texts_Run ru) { - Out_String((CHAR*)" Run at ", 10); + Out_String((CHAR*)" Run at ", 12); Out_Hex((INT64)(ADDRESS)ru, 1); Out_Ln(); Out_String((CHAR*)" prev: ", 12); @@ -313,6 +293,48 @@ static void Texts_DumpRun (Texts_Run ru) Out_Ln(); } +static void Texts_DumpElem (Texts_Elem e) +{ + Texts_DumpRun((void*)e); + Out_String((CHAR*)" -- Elem --", 15); + Out_Ln(); + Out_String((CHAR*)" W: ", 13); + Out_Int(e->W, 1); + Out_Ln(); + Out_String((CHAR*)" H: ", 13); + Out_Int(e->H, 1); + Out_Ln(); + Out_String((CHAR*)" handle: ", 13); + Out_Hex((INT64)(ADDRESS)e->handle, 1); + Out_Ln(); + Out_String((CHAR*)" base: ", 13); + if (e->base == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Texts_DumpText(e->base); + } +} + +static void Texts_DumpPiece (Texts_Piece p) +{ + Texts_DumpRun((void*)p); + Out_String((CHAR*)" -- Piece --", 16); + Out_Ln(); + Out_String((CHAR*)" file: ", 12); + if (p->file == NIL) { + Out_String((CHAR*)"", 6); + Out_Ln(); + } else { + Out_Ln(); + Files_DumpFile(p->file, 3); + } + Out_String((CHAR*)" org: ", 12); + Out_Int(p->org, 1); + Out_Ln(); +} + void Texts_DumpReader (Texts_Reader re) { Out_String((CHAR*)"Reader:", 8); @@ -360,7 +382,13 @@ void Texts_DumpReader (Texts_Reader re) Out_Ln(); } else { Out_Ln(); - Texts_DumpRun(re.run); + if (__ISP(re.run, Texts_PieceDesc, 1)) { + Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); + } else if (__ISP(re.run, Texts_ElemDesc, 1)) { + Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); + } else { + Texts_DumpRun(re.run); + } } } @@ -848,32 +876,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__35 { +static struct Scan__36 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__35 *lnk; -} *Scan__35_s; + struct Scan__36 *lnk; +} *Scan__36_s; -static void ReadScaleFactor__36 (void); +static void ReadScaleFactor__37 (void); -static void ReadScaleFactor__36 (void) +static void ReadScaleFactor__37 (void) { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); - if (*Scan__35_s->ch == '-') { - *Scan__35_s->negE = 1; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + if (*Scan__36_s->ch == '-') { + *Scan__36_s->negE = 1; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } else { - *Scan__35_s->negE = 0; - if (*Scan__35_s->ch == '+') { - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + *Scan__36_s->negE = 0; + if (*Scan__36_s->ch == '+') { + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } - while (('0' <= *Scan__35_s->ch && *Scan__35_s->ch <= '9')) { - *Scan__35_s->e = (*Scan__35_s->e * 10 + (INT16)*Scan__35_s->ch) - 48; - Texts_Read((void*)&*Scan__35_s->S, Scan__35_s->S__typ, &*Scan__35_s->ch); + while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { + *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; + Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); } } @@ -887,13 +915,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__35 _s; + struct Scan__36 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__35_s; - Scan__35_s = &_s; + _s.lnk = Scan__36_s; + Scan__36_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -994,7 +1022,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__36(); + ReadScaleFactor__37(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1027,7 +1055,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__36(); + ReadScaleFactor__37(); } if (negE) { if (e <= 38) { @@ -1080,7 +1108,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__35_s = _s.lnk; + Scan__36_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1299,30 +1327,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__57 { +static struct WriteRealFix__58 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__57 *lnk; -} *WriteRealFix__57_s; + struct WriteRealFix__58 *lnk; +} *WriteRealFix__58_s; -static void dig__58 (INT16 n); -static void seq__60 (CHAR ch, INT16 n); +static void dig__59 (INT16 n); +static void seq__61 (CHAR ch, INT16 n); -static void seq__60 (CHAR ch, INT16 n) +static void seq__61 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, ch); + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); n -= 1; } } -static void dig__58 (INT16 n) +static void dig__59 (INT16 n) { while (n > 0) { - *WriteRealFix__57_s->i -= 1; - Texts_Write(&*WriteRealFix__57_s->W, WriteRealFix__57_s->W__typ, (*WriteRealFix__57_s->d)[__X(*WriteRealFix__57_s->i, 9)]); + *WriteRealFix__58_s->i -= 1; + Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); n -= 1; } } @@ -1333,23 +1361,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__57 _s; + struct WriteRealFix__58 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__57_s; - WriteRealFix__57_s = &_s; + _s.lnk = WriteRealFix__58_s; + WriteRealFix__58_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__60(' ', (n - k) - 2); + seq__61(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__60(' ', k + 1); + seq__61(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__60(' ', n - 4); + seq__61(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1382,21 +1410,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__60(' ', ((n - e) - k) - 2); + seq__61(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__58(e); + dig__59(e); Texts_Write(&*W, W__typ, '.'); - dig__58(k); + dig__59(k); } else { - seq__60(' ', (n - k) - 3); + seq__61(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__60('0', -e); - dig__58(k + e); + seq__61('0', -e); + dig__59(k + e); } } - WriteRealFix__57_s = _s.lnk; + WriteRealFix__58_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1495,48 +1523,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__47 { +static struct WriteDate__48 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__47 *lnk; -} *WriteDate__47_s; + struct WriteDate__48 *lnk; +} *WriteDate__48_s; -static void WritePair__48 (CHAR ch, INT32 x); +static void WritePair__49 (CHAR ch, INT32 x); -static void WritePair__48 (CHAR ch, INT32 x) +static void WritePair__49 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, ch); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__47_s->W, WriteDate__47_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__47 _s; + struct WriteDate__48 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__47_s; - WriteDate__47_s = &_s; - WritePair__48(' ', __MASK(d, -32)); - WritePair__48('.', __MASK(__ASHR(d, 5), -16)); - WritePair__48('.', __MASK(__ASHR(d, 9), -128)); - WritePair__48(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__48(':', __MASK(__ASHR(t, 6), -64)); - WritePair__48(':', __MASK(t, -64)); - WriteDate__47_s = _s.lnk; + _s.lnk = WriteDate__48_s; + WriteDate__48_s = &_s; + WritePair__49(' ', __MASK(d, -32)); + WritePair__49('.', __MASK(__ASHR(d, 5), -16)); + WritePair__49('.', __MASK(__ASHR(d, 9), -128)); + WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__49(':', __MASK(__ASHR(t, 6), -64)); + WritePair__49(':', __MASK(t, -64)); + WriteDate__48_s = _s.lnk; } -static struct Load0__20 { +static struct Load0__21 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__20 *lnk; -} *Load0__20_s; + struct Load0__21 *lnk; +} *Load0__21_s; -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Modules_Module M = NIL; Modules_Command Cmd; @@ -1547,15 +1575,15 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__20_s->ecnt) { - *Load0__20_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__20_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__21_s->ecnt) { + *Load0__21_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__20_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__20_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1564,25 +1592,25 @@ static void LoadElem__21 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__20_s->T; - (*Load0__20_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__20_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__21_s->T; + (*Load0__21_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__20_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__20_s->T; - a->file = *Load0__20_s->f; + a->base = *Load0__21_s->T; + a->file = *Load0__21_s->f; a->org = org; a->span = span; - __COPY((*Load0__20_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__20_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1599,15 +1627,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__20 _s; + struct Load0__21 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__20_s; - Load0__20_s = &_s; + _s.lnk = Load0__21_s; + Load0__21_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1640,7 +1668,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__21(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1658,7 +1686,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__20_s = _s.lnk; + Load0__21_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1727,25 +1755,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__43 { +static struct Store__44 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__43 *lnk; -} *Store__43_s; + struct Store__44 *lnk; +} *Store__44_s; -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__43_s->iden).mod, (*Store__43_s->mods)[__X(*Store__43_s->ecnt, 64)], 32); - __COPY((*Store__43_s->iden).proc, (*Store__43_s->procs)[__X(*Store__43_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__43_s->mods)[__X(eno, 64)], (*Store__43_s->iden).mod) != 0 || __STRCMP((*Store__43_s->procs)[__X(eno, 64)], (*Store__43_s->iden).proc) != 0) { + while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1753,14 +1781,14 @@ static void StoreElem__44 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__43_s->ecnt) { - *Store__43_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__43_s->iden).proc, 32); + if (eno == *Store__44_s->ecnt) { + *Store__44_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); } - (*Store__43_s->msg).pos = pos; + (*Store__44_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__43_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1781,14 +1809,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__43 _s; + struct Store__44 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__43_s; - Store__43_s = &_s; + _s.lnk = Store__44_s; + Store__44_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1830,7 +1858,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__44(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1884,7 +1912,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__43_s = _s.lnk; + Store__44_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) From 4444d06e4e984ca1727daf368377f4007279a984 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 12 Dec 2016 18:42:36 +0000 Subject: [PATCH 081/241] Remove duplocate ModuleDesc in Modules. Add type descriptor dumping. --- src/runtime/Heap.Mod | 55 +++++++++++++++++++++++++++-------------- src/runtime/Modules.Mod | 46 +++++++++++----------------------- src/runtime/Out.Mod | 55 ++++++++++++++++++++++++++++++++++++++++- src/runtime/Texts.Mod | 1 + 4 files changed, 105 insertions(+), 52 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 6407f27d..ad9d6424 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -33,30 +33,31 @@ MODULE Heap; AddressZero = S.VAL(S.ADDRESS, 0); TYPE - ModuleName = ARRAY ModNameLen OF CHAR; - CmdName = ARRAY CmdNameLen OF CHAR; + ModuleName- = ARRAY ModNameLen OF CHAR; + CmdName- = ARRAY CmdNameLen OF CHAR; - Module = POINTER TO ModuleDesc; - Cmd = POINTER TO CmdDesc; + Module- = POINTER TO ModuleDesc; + Cmd- = POINTER TO CmdDesc; - EnumProc = PROCEDURE(P: PROCEDURE(p: S.PTR)); + EnumProc- = PROCEDURE(P: PROCEDURE(p: S.PTR)); - ModuleDesc = RECORD - next: Module; - name: ModuleName; - refcnt: LONGINT; - cmds: Cmd; - types: S.ADDRESS; - enumPtrs: EnumProc; - reserved1, reserved2: LONGINT + ModuleDesc- = RECORD + next-: Module; + name-: ModuleName; + refcnt-: LONGINT; + cmds-: Cmd; + types-: S.ADDRESS; + enumPtrs-: EnumProc; + reserved1, + reserved2: LONGINT END ; - Command = PROCEDURE; + Command- = PROCEDURE; - CmdDesc = RECORD - next: Cmd; - name: CmdName; - cmd: Command + CmdDesc- = RECORD + next-: Cmd; + name-: CmdName; + cmd-: Command END ; Finalizer = PROCEDURE(obj: S.PTR); @@ -71,7 +72,7 @@ MODULE Heap; VAR (* the list of loaded (=initialization started) modules *) - modules*: S.PTR; + modules-: S.PTR; (*POINTER [1] TO ModuleDesc;*) freeList: ARRAY nofLists + 1 OF S.ADDRESS; (* dummy, 16, 32, 48, 64, 80, 96, 112, 128, sentinel *) bigBlocks: S.ADDRESS; @@ -141,6 +142,22 @@ MODULE Heap; RETURN m END REGMOD; + PROCEDURE FreeModule*(name: ARRAY OF CHAR): LONGINT; + (* Returns 0 if freed, -1 if not found, refcount if found and refcount > 0. *) + VAR m, p: Module; + BEGIN m := S.VAL(Module, modules); + WHILE (m # NIL) & (m.name # name) DO p := m; m := m.next END; + IF (m # NIL) & (m.refcnt = 0) THEN + IF m = S.VAL(Module, modules) THEN modules := m.next + ELSE p.next := m.next + END; + RETURN 0 + ELSE + IF m = NIL THEN RETURN -1 ELSE RETURN m.refcnt END + END + END FreeModule; + + PROCEDURE REGCMD*(m: Module; VAR name: CmdName; cmd: Command); VAR c: Cmd; BEGIN diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index cfa4bd77..0b9f5fd0 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -9,27 +9,10 @@ MODULE Modules; (* jt 6.1.96 *) ModNameLen* = 20; TYPE - ModuleName* = ARRAY ModNameLen OF CHAR; - Module* = POINTER TO ModuleDesc; - Cmd* = POINTER TO CmdDesc; - ModuleDesc* = RECORD (* cf. SYSTEM.Mod *) - next-: Module; - name-: ModuleName; - refcnt-: LONGINT; - cmds-: Cmd; - types-: LONGINT; - enumPtrs-: PROCEDURE (P: PROCEDURE(p: LONGINT)); - reserved1, reserved2: LONGINT; - END ; - - Command* = PROCEDURE; - - CmdDesc* = RECORD - next-: Cmd; - name-: ARRAY 24 OF CHAR; - cmd-: Command - END ; - + ModuleName* = Heap.ModuleName; + Module* = Heap.Module; + Cmd* = Heap.Cmd; + Command* = Heap.Command; VAR res*: INTEGER; resMsg*: ARRAY 256 OF CHAR; @@ -236,8 +219,8 @@ MODULE Modules; (* jt 6.1.96 *) (* Module and command lookup by name *) - PROCEDURE -modules(): Module "(Modules_Module)Heap_modules"; - PROCEDURE -setmodules(m: Module) "Heap_modules = m"; + PROCEDURE -modules(): Module "(Heap_Module)Heap_modules"; + (*PROCEDURE -setmodules(m: Module) "Heap_modules = m";*) PROCEDURE ThisMod* (name: ARRAY OF CHAR): Module; VAR m: Module; bodyname: ARRAY 64 OF CHAR; body: Command; @@ -262,26 +245,25 @@ MODULE Modules; (* jt 6.1.96 *) END ThisCommand; PROCEDURE Free*(name: ARRAY OF CHAR; all: BOOLEAN); - VAR m, p: Module; + VAR m, p: Module; refcount: LONGINT; BEGIN m := modules(); IF all THEN res := 1; resMsg := 'unloading "all" not yet supported' ELSE - WHILE (m # NIL) & (m.name # name) DO p := m; m := m.next END ; - IF (m # NIL) & (m.refcnt = 0) THEN - IF m = modules() THEN setmodules(m.next) - ELSE p.next := m.next - END ; + refcount := Heap.FreeModule(name); + IF refcount = 0 THEN res := 0 - ELSE res := 1; - IF m = NIL THEN resMsg := "module not found" + ELSE + IF refcount < 0 THEN resMsg := "module not found" ELSE resMsg := "clients of this module exist" - END + END; + res := 1 END END END Free; + (* Run time error reporting. *) PROCEDURE errch(c: CHAR); (* Here we favour simplicity over efficiency, so no buffering. *) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 23d30be4..37c928a4 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -1,6 +1,6 @@ MODULE Out; (* DCW Brown. 2016-09-27 *) -IMPORT SYSTEM, Platform; +IMPORT SYSTEM, Platform, Heap; VAR IsConsole-: BOOLEAN; @@ -114,6 +114,59 @@ PROCEDURE HexDump*(VAR m: ARRAY OF SYSTEM.BYTE); BEGIN HexDumpAdr(SYSTEM.ADR(m), 0, LEN(m)) END HexDump; + +PROCEDURE DumpModule(m: Heap.Module); +BEGIN + String(" next: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.next),1); Ln; + String(" name: "); String(m.name); Ln; + String(" refcnt: "); Hex(m.refcnt,1); Ln; + String(" cmds: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.cmds),1); Ln; + String(" types: "); Hex(m.types,1); Ln; + String(" enumPtrs: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.enumPtrs),1); Ln; +END DumpModule; + +PROCEDURE DumpType*(VAR o: ARRAY OF SYSTEM.BYTE); +TYPE + typedesc = RECORD + (* Array of type bound procedure addresses preceeds this. *) + tag: SYSTEM.ADDRESS; + next: SYSTEM.ADDRESS; + level: SYSTEM.ADDRESS; + module: SYSTEM.ADDRESS; + name: ARRAY 24 OF CHAR; + bases: ARRAY 16 OF SYSTEM.ADDRESS; + reserved: SYSTEM.ADDRESS; + blksz: SYSTEM.ADDRESS; + ptr0: SYSTEM.ADDRESS; (* Offset of first pointer. Others follow this. *) + END; + tag = POINTER [1] TO typedesc; +VAR + addr: SYSTEM.ADDRESS; + desc: tag; + i: INTEGER; +BEGIN + SYSTEM.GET(SYSTEM.ADR(o) - SIZE(SYSTEM.ADDRESS), addr); + String("obj tag: "); Hex(addr,1); Ln; + desc := SYSTEM.VAL(tag, addr - (21*SIZE(SYSTEM.ADDRESS) + 24)); + String("desc at: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, desc),1); Ln; + String("desc contains:"); Ln; + String("tag: "); Hex(desc.tag, 1); Ln; + String("next: "); Hex(desc.next, 1); Ln; + String("level: "); Hex(desc.level, 1); Ln; + String("module: "); Hex(desc.module, 1); Ln; + DumpModule(SYSTEM.VAL(Heap.Module, desc.module)); + String("name: "); String(desc.name); Ln; + String("bases: "); + i := 0; WHILE i < 16 DO + Hex(desc.bases[i], SIZE(SYSTEM.ADDRESS) * 2); + IF i MOD 4 = 3 THEN Ln; String(" ") ELSE Char(" ") END; + INC(i) + END; Ln; + String("reserved: "); Hex(desc.reserved, 1); Ln; + String("blksz: "); Hex(desc.blksz, 1); Ln; + String("ptr0: "); Hex(desc.ptr0, 1); Ln; +END DumpType; + (* Real and Longreal display *) PROCEDURE digit(n: HUGEINT; VAR s: ARRAY OF CHAR; VAR i: INTEGER); diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index ae7440a0..55ab429f 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -180,6 +180,7 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** ELSE DumpRun(re.run) END END; + Out.DumpType(re.run^); END DumpReader; From d9fb831fcf2270d123117c9052b022193bcf3892 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 12 Dec 2016 18:43:32 +0000 Subject: [PATCH 082/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 32 ++++++++- bootstrap/unix-44/Heap.h | 29 +++++++-- bootstrap/unix-44/Modules.c | 76 +++++----------------- bootstrap/unix-44/Modules.h | 41 ++---------- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 97 +++++++++++++++++++++++++++- bootstrap/unix-44/Out.h | 3 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 7 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 32 ++++++++- bootstrap/unix-48/Heap.h | 29 +++++++-- bootstrap/unix-48/Modules.c | 76 +++++----------------- bootstrap/unix-48/Modules.h | 41 ++---------- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 97 +++++++++++++++++++++++++++- bootstrap/unix-48/Out.h | 3 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 7 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 32 ++++++++- bootstrap/unix-88/Heap.h | 29 +++++++-- bootstrap/unix-88/Modules.c | 76 +++++----------------- bootstrap/unix-88/Modules.h | 41 ++---------- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 97 +++++++++++++++++++++++++++- bootstrap/unix-88/Out.h | 3 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 7 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 32 ++++++++- bootstrap/windows-48/Heap.h | 29 +++++++-- bootstrap/windows-48/Modules.c | 76 +++++----------------- bootstrap/windows-48/Modules.h | 41 ++---------- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 97 +++++++++++++++++++++++++++- bootstrap/windows-48/Out.h | 3 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 7 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 32 ++++++++- bootstrap/windows-88/Heap.h | 29 +++++++-- bootstrap/windows-88/Modules.c | 76 +++++----------------- bootstrap/windows-88/Modules.h | 41 ++---------- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 97 +++++++++++++++++++++++++++- bootstrap/windows-88/Out.h | 3 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 7 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 1040 insertions(+), 695 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index ffd8b03e..65da2216 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 6db13d09..77782293 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 4259cfef..438fec28 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 652cb128..02716878 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index c548dae1..2270fec0 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 125a2854..c9adb169 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -84,6 +84,7 @@ static void Heap_CheckFin (void); static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); +export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); @@ -143,6 +144,35 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs) return (void*)m; } +INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len) +{ + Heap_Module m, p; + __DUP(name, name__len, CHAR); + m = (Heap_Module)(ADDRESS)Heap_modules; + while ((m != NIL && __STRCMP(m->name, name) != 0)) { + p = m; + m = m->next; + } + if ((m != NIL && m->refcnt == 0)) { + if (m == (Heap_Module)(ADDRESS)Heap_modules) { + Heap_modules = (SYSTEM_PTR)m->next; + } else { + p->next = m->next; + } + __DEL(name); + return 0; + } else { + if (m == NIL) { + __DEL(name); + return -1; + } else { + __DEL(name); + return m->refcnt; + } + } + __RETCHK; +} + void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd) { Heap_Cmd c; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index e794a4a3..0df71d54 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,16 +1,26 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h #include "SYSTEM.h" +typedef + struct Heap_CmdDesc *Heap_Cmd; + typedef CHAR Heap_CmdName[24]; typedef void (*Heap_Command)(void); +typedef + struct Heap_CmdDesc { + Heap_Cmd next; + Heap_CmdName name; + Heap_Command cmd; + } Heap_CmdDesc; + typedef void (*Heap_EnumProc)(void(*)(SYSTEM_PTR)); @@ -21,13 +31,18 @@ typedef struct Heap_ModuleDesc *Heap_Module; typedef - struct Heap_ModuleDesc { - INT32 _prvt0; - char _prvt1[44]; - } Heap_ModuleDesc; + CHAR Heap_ModuleName[20]; typedef - CHAR Heap_ModuleName[20]; + struct Heap_ModuleDesc { + Heap_Module next; + Heap_ModuleName name; + INT32 refcnt; + Heap_Cmd cmds; + INT32 types; + Heap_EnumProc enumPtrs; + char _prvt0[8]; + } Heap_ModuleDesc; import SYSTEM_PTR Heap_modules; @@ -35,8 +50,10 @@ import INT32 Heap_allocated, Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; +import ADDRESS *Heap_CmdDesc__typ; import void Heap_FINALL (void); +import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); import void Heap_GC (BOOLEAN markStack); import void Heap_INCREF (Heap_Module m); import void Heap_InitHeap (void); diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index b27930e7..03d205e0 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -9,47 +9,15 @@ #include "Heap.h" #include "Platform.h" -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - INT32 reserved1, reserved2; - } Modules_ModuleDesc; - export INT16 Modules_res; export CHAR Modules_resMsg[256]; -export Modules_ModuleName Modules_imported, Modules_importing; +export Heap_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; export CHAR Modules_BinaryDir[1024]; -export ADDRESS *Modules_ModuleDesc__typ; -export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); @@ -68,8 +36,8 @@ export void Modules_Init (INT32 argc, INT32 argvadr); static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +export Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +export Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); @@ -79,8 +47,7 @@ extern void Heap_InitHeap(); extern void *Modules__init(void); #define Modules_InitHeap() Heap_InitHeap() #define Modules_ModulesInit() Modules__init() -#define Modules_modules() (Modules_Module)Heap_modules -#define Modules_setmodules(m) Heap_modules = m +#define Modules_modules() (Heap_Module)Heap_modules void Modules_Init (INT32 argc, INT32 argvadr) { @@ -334,11 +301,11 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } } -Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) +Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { - Modules_Module m = NIL; + Heap_Module m = NIL; CHAR bodyname[64]; - Modules_Command body; + Heap_Command body; __DUP(name, name__len, CHAR); m = Modules_modules(); while ((m != NIL && __STRCMP(m->name, name) != 0)) { @@ -358,9 +325,9 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) +Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len) { - Modules_Cmd c = NIL; + Heap_Cmd c = NIL; __DUP(name, name__len, CHAR); c = mod->cmds; while ((c != NIL && __STRCMP(c->name, name) != 0)) { @@ -387,31 +354,24 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { - Modules_Module m = NIL, p = NIL; + Heap_Module m = NIL, p = NIL; + INT32 refcount; __DUP(name, name__len, CHAR); m = Modules_modules(); if (all) { Modules_res = 1; __MOVE("unloading \"all\" not yet supported", Modules_resMsg, 34); } else { - while ((m != NIL && __STRCMP(m->name, name) != 0)) { - p = m; - m = m->next; - } - if ((m != NIL && m->refcnt == 0)) { - if (m == Modules_modules()) { - Modules_setmodules(m->next); - } else { - p->next = m->next; - } + refcount = Heap_FreeModule(name, name__len); + if (refcount == 0) { Modules_res = 0; } else { - Modules_res = 1; - if (m == NIL) { + if (refcount < 0) { __MOVE("module not found", Modules_resMsg, 17); } else { __MOVE("clients of this module exist", Modules_resMsg, 29); } + Modules_res = 1; } } __DEL(name); @@ -533,8 +493,6 @@ void Modules_AssertFail (INT32 code) } } -__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; -__TDESC(Modules_CmdDesc, 1, 1) = {__TDFLDS("CmdDesc", 32), {0, -8}}; export void *Modules__init(void) { @@ -542,8 +500,6 @@ export void *Modules__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Modules", 0); - __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); - __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 553f80ed..3c1c580d 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,51 +1,20 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h #include "SYSTEM.h" - -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - char _prvt0[8]; - } Modules_ModuleDesc; +#include "Heap.h" import INT16 Modules_res; import CHAR Modules_resMsg[256]; -import Modules_ModuleName Modules_imported, Modules_importing; +import Heap_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; import CHAR Modules_BinaryDir[1024]; -import ADDRESS *Modules_ModuleDesc__typ; -import ADDRESS *Modules_CmdDesc__typ; import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); @@ -54,8 +23,8 @@ import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); import void Modules_Init (INT32 argc, INT32 argvadr); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +import Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +import Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d83386eb..7e558357 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index feb85d73..b6d457bd 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index ab01642c..c09d2e6a 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f742f265..7c47ed18 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index a6c7a5cd..a3718f79 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 621dfb51..6d2755d8 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 383b6d65..5924f42f 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index c1fe21fb..c13a4e91 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 4569c80d..ed3ea3a1 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index c0707c34..6dae098c 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 9bc66090..e929a6e0 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 6b2b0929..00094b66 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 42081077..7e829aa2 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index d363f022..f83e65fb 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 65e2e307..39900621 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Heap.h" #include "Platform.h" @@ -13,8 +14,11 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; +static ADDRESS *typedesc__5__typ; export void Out_Char (CHAR ch); +static void Out_DumpModule (Heap_Module m); +export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); @@ -203,6 +207,94 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) Out_HexDumpAdr((ADDRESS)m, 0, m__len); } +static void Out_DumpModule (Heap_Module m) +{ + Out_String((CHAR*)" next: ", 13); + Out_Hex((INT32)(ADDRESS)m->next, 1); + Out_Ln(); + Out_String((CHAR*)" name: ", 13); + Out_String(m->name, 20); + Out_Ln(); + Out_String((CHAR*)" refcnt: ", 13); + Out_Hex(m->refcnt, 1); + Out_Ln(); + Out_String((CHAR*)" cmds: ", 13); + Out_Hex((INT32)(ADDRESS)m->cmds, 1); + Out_Ln(); + Out_String((CHAR*)" types: ", 13); + Out_Hex(m->types, 1); + Out_Ln(); + Out_String((CHAR*)" enumPtrs: ", 13); + Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); + Out_Ln(); +} + +typedef + struct typedesc__5 *tag__4; + +typedef + struct typedesc__5 { + INT32 tag, next, level, module; + CHAR name[24]; + INT32 bases[16]; + INT32 reserved, blksz, ptr0; + } typedesc__5; + +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + tag__4 desc = NIL; + INT16 i; + __GET((ADDRESS)o - 4, addr, INT32); + Out_String((CHAR*)"obj tag: ", 11); + Out_Hex(addr, 1); + Out_Ln(); + desc = (tag__4)(ADDRESS)(addr - 108); + Out_String((CHAR*)"desc at: ", 11); + Out_Hex((INT32)(ADDRESS)desc, 1); + Out_Ln(); + Out_String((CHAR*)"desc contains:", 15); + Out_Ln(); + Out_String((CHAR*)"tag: ", 11); + Out_Hex(desc->tag, 1); + Out_Ln(); + Out_String((CHAR*)"next: ", 11); + Out_Hex(desc->next, 1); + Out_Ln(); + Out_String((CHAR*)"level: ", 11); + Out_Hex(desc->level, 1); + Out_Ln(); + Out_String((CHAR*)"module: ", 11); + Out_Hex(desc->module, 1); + Out_Ln(); + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + Out_String((CHAR*)"name: ", 11); + Out_String(desc->name, 24); + Out_Ln(); + Out_String((CHAR*)"bases: ", 11); + i = 0; + while (i < 16) { + Out_Hex(desc->bases[__X(i, 16)], 8); + if (__MASK(i, -4) == 3) { + Out_Ln(); + Out_String((CHAR*)" ", 11); + } else { + Out_Char(' '); + } + i += 1; + } + Out_Ln(); + Out_String((CHAR*)"reserved: ", 11); + Out_Hex(desc->reserved, 1); + Out_Ln(); + Out_String((CHAR*)"blksz: ", 11); + Out_Hex(desc->blksz, 1); + Out_Ln(); + Out_String((CHAR*)"ptr0: ", 11); + Out_Hex(desc->ptr0, 1); + Out_Ln(); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -380,15 +472,18 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } +__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; export void *Out__init(void) { __DEFMOD; + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); + __INITYP(typedesc__5, typedesc__5, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 1db1f1b3..0b3a93df 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,7 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 22eb3138..a825b8ec 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index cd9d9890..5d752192 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index f5ee1490..0a2d220b 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 6d0ec38b..0c564f0e 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 4ee2fc23..ed806db0 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index ae281477..93b62826 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 8c4ccea8..bbca112c 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,6 +390,7 @@ void Texts_DumpReader (Texts_Reader re) Texts_DumpRun(re.run); } } + Out_DumpType((void*)&*re.run, 20); } static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) @@ -1566,8 +1567,8 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { - Modules_Module M = NIL; - Modules_Command Cmd; + Heap_Module M = NIL; + Heap_Command Cmd; Texts_Alien a = NIL; INT32 org, ew, eh; INT8 eno; diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index dfe60b54..04c8767a 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 9ab993c9..ed38e4dc 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 3de3605c..69601701 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 213abf27..0b3a981e 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 4278a34c..36571c99 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index ffd8b03e..65da2216 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 6db13d09..77782293 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 4259cfef..438fec28 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 652cb128..02716878 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index c548dae1..2270fec0 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 125a2854..c9adb169 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -84,6 +84,7 @@ static void Heap_CheckFin (void); static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); +export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); @@ -143,6 +144,35 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs) return (void*)m; } +INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len) +{ + Heap_Module m, p; + __DUP(name, name__len, CHAR); + m = (Heap_Module)(ADDRESS)Heap_modules; + while ((m != NIL && __STRCMP(m->name, name) != 0)) { + p = m; + m = m->next; + } + if ((m != NIL && m->refcnt == 0)) { + if (m == (Heap_Module)(ADDRESS)Heap_modules) { + Heap_modules = (SYSTEM_PTR)m->next; + } else { + p->next = m->next; + } + __DEL(name); + return 0; + } else { + if (m == NIL) { + __DEL(name); + return -1; + } else { + __DEL(name); + return m->refcnt; + } + } + __RETCHK; +} + void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd) { Heap_Cmd c; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index e794a4a3..0df71d54 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,16 +1,26 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h #include "SYSTEM.h" +typedef + struct Heap_CmdDesc *Heap_Cmd; + typedef CHAR Heap_CmdName[24]; typedef void (*Heap_Command)(void); +typedef + struct Heap_CmdDesc { + Heap_Cmd next; + Heap_CmdName name; + Heap_Command cmd; + } Heap_CmdDesc; + typedef void (*Heap_EnumProc)(void(*)(SYSTEM_PTR)); @@ -21,13 +31,18 @@ typedef struct Heap_ModuleDesc *Heap_Module; typedef - struct Heap_ModuleDesc { - INT32 _prvt0; - char _prvt1[44]; - } Heap_ModuleDesc; + CHAR Heap_ModuleName[20]; typedef - CHAR Heap_ModuleName[20]; + struct Heap_ModuleDesc { + Heap_Module next; + Heap_ModuleName name; + INT32 refcnt; + Heap_Cmd cmds; + INT32 types; + Heap_EnumProc enumPtrs; + char _prvt0[8]; + } Heap_ModuleDesc; import SYSTEM_PTR Heap_modules; @@ -35,8 +50,10 @@ import INT32 Heap_allocated, Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; +import ADDRESS *Heap_CmdDesc__typ; import void Heap_FINALL (void); +import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); import void Heap_GC (BOOLEAN markStack); import void Heap_INCREF (Heap_Module m); import void Heap_InitHeap (void); diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index b27930e7..03d205e0 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -9,47 +9,15 @@ #include "Heap.h" #include "Platform.h" -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - INT32 reserved1, reserved2; - } Modules_ModuleDesc; - export INT16 Modules_res; export CHAR Modules_resMsg[256]; -export Modules_ModuleName Modules_imported, Modules_importing; +export Heap_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; export CHAR Modules_BinaryDir[1024]; -export ADDRESS *Modules_ModuleDesc__typ; -export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); @@ -68,8 +36,8 @@ export void Modules_Init (INT32 argc, INT32 argvadr); static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +export Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +export Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); @@ -79,8 +47,7 @@ extern void Heap_InitHeap(); extern void *Modules__init(void); #define Modules_InitHeap() Heap_InitHeap() #define Modules_ModulesInit() Modules__init() -#define Modules_modules() (Modules_Module)Heap_modules -#define Modules_setmodules(m) Heap_modules = m +#define Modules_modules() (Heap_Module)Heap_modules void Modules_Init (INT32 argc, INT32 argvadr) { @@ -334,11 +301,11 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } } -Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) +Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { - Modules_Module m = NIL; + Heap_Module m = NIL; CHAR bodyname[64]; - Modules_Command body; + Heap_Command body; __DUP(name, name__len, CHAR); m = Modules_modules(); while ((m != NIL && __STRCMP(m->name, name) != 0)) { @@ -358,9 +325,9 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) +Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len) { - Modules_Cmd c = NIL; + Heap_Cmd c = NIL; __DUP(name, name__len, CHAR); c = mod->cmds; while ((c != NIL && __STRCMP(c->name, name) != 0)) { @@ -387,31 +354,24 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { - Modules_Module m = NIL, p = NIL; + Heap_Module m = NIL, p = NIL; + INT32 refcount; __DUP(name, name__len, CHAR); m = Modules_modules(); if (all) { Modules_res = 1; __MOVE("unloading \"all\" not yet supported", Modules_resMsg, 34); } else { - while ((m != NIL && __STRCMP(m->name, name) != 0)) { - p = m; - m = m->next; - } - if ((m != NIL && m->refcnt == 0)) { - if (m == Modules_modules()) { - Modules_setmodules(m->next); - } else { - p->next = m->next; - } + refcount = Heap_FreeModule(name, name__len); + if (refcount == 0) { Modules_res = 0; } else { - Modules_res = 1; - if (m == NIL) { + if (refcount < 0) { __MOVE("module not found", Modules_resMsg, 17); } else { __MOVE("clients of this module exist", Modules_resMsg, 29); } + Modules_res = 1; } } __DEL(name); @@ -533,8 +493,6 @@ void Modules_AssertFail (INT32 code) } } -__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; -__TDESC(Modules_CmdDesc, 1, 1) = {__TDFLDS("CmdDesc", 32), {0, -8}}; export void *Modules__init(void) { @@ -542,8 +500,6 @@ export void *Modules__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Modules", 0); - __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); - __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 553f80ed..3c1c580d 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,51 +1,20 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h #include "SYSTEM.h" - -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - char _prvt0[8]; - } Modules_ModuleDesc; +#include "Heap.h" import INT16 Modules_res; import CHAR Modules_resMsg[256]; -import Modules_ModuleName Modules_imported, Modules_importing; +import Heap_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; import CHAR Modules_BinaryDir[1024]; -import ADDRESS *Modules_ModuleDesc__typ; -import ADDRESS *Modules_CmdDesc__typ; import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); @@ -54,8 +23,8 @@ import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); import void Modules_Init (INT32 argc, INT32 argvadr); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +import Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +import Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d83386eb..7e558357 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index feb85d73..b6d457bd 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index ab01642c..c09d2e6a 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f742f265..7c47ed18 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index a6c7a5cd..a3718f79 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 621dfb51..6d2755d8 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 383b6d65..5924f42f 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index c1fe21fb..c13a4e91 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 4569c80d..ed3ea3a1 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index c0707c34..6dae098c 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 0d32553a..6b6144fc 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 6b2b0929..00094b66 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 42081077..7e829aa2 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index d363f022..f83e65fb 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 65e2e307..39900621 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Heap.h" #include "Platform.h" @@ -13,8 +14,11 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; +static ADDRESS *typedesc__5__typ; export void Out_Char (CHAR ch); +static void Out_DumpModule (Heap_Module m); +export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); @@ -203,6 +207,94 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) Out_HexDumpAdr((ADDRESS)m, 0, m__len); } +static void Out_DumpModule (Heap_Module m) +{ + Out_String((CHAR*)" next: ", 13); + Out_Hex((INT32)(ADDRESS)m->next, 1); + Out_Ln(); + Out_String((CHAR*)" name: ", 13); + Out_String(m->name, 20); + Out_Ln(); + Out_String((CHAR*)" refcnt: ", 13); + Out_Hex(m->refcnt, 1); + Out_Ln(); + Out_String((CHAR*)" cmds: ", 13); + Out_Hex((INT32)(ADDRESS)m->cmds, 1); + Out_Ln(); + Out_String((CHAR*)" types: ", 13); + Out_Hex(m->types, 1); + Out_Ln(); + Out_String((CHAR*)" enumPtrs: ", 13); + Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); + Out_Ln(); +} + +typedef + struct typedesc__5 *tag__4; + +typedef + struct typedesc__5 { + INT32 tag, next, level, module; + CHAR name[24]; + INT32 bases[16]; + INT32 reserved, blksz, ptr0; + } typedesc__5; + +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + tag__4 desc = NIL; + INT16 i; + __GET((ADDRESS)o - 4, addr, INT32); + Out_String((CHAR*)"obj tag: ", 11); + Out_Hex(addr, 1); + Out_Ln(); + desc = (tag__4)(ADDRESS)(addr - 108); + Out_String((CHAR*)"desc at: ", 11); + Out_Hex((INT32)(ADDRESS)desc, 1); + Out_Ln(); + Out_String((CHAR*)"desc contains:", 15); + Out_Ln(); + Out_String((CHAR*)"tag: ", 11); + Out_Hex(desc->tag, 1); + Out_Ln(); + Out_String((CHAR*)"next: ", 11); + Out_Hex(desc->next, 1); + Out_Ln(); + Out_String((CHAR*)"level: ", 11); + Out_Hex(desc->level, 1); + Out_Ln(); + Out_String((CHAR*)"module: ", 11); + Out_Hex(desc->module, 1); + Out_Ln(); + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + Out_String((CHAR*)"name: ", 11); + Out_String(desc->name, 24); + Out_Ln(); + Out_String((CHAR*)"bases: ", 11); + i = 0; + while (i < 16) { + Out_Hex(desc->bases[__X(i, 16)], 8); + if (__MASK(i, -4) == 3) { + Out_Ln(); + Out_String((CHAR*)" ", 11); + } else { + Out_Char(' '); + } + i += 1; + } + Out_Ln(); + Out_String((CHAR*)"reserved: ", 11); + Out_Hex(desc->reserved, 1); + Out_Ln(); + Out_String((CHAR*)"blksz: ", 11); + Out_Hex(desc->blksz, 1); + Out_Ln(); + Out_String((CHAR*)"ptr0: ", 11); + Out_Hex(desc->ptr0, 1); + Out_Ln(); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -380,15 +472,18 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } +__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; export void *Out__init(void) { __DEFMOD; + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); + __INITYP(typedesc__5, typedesc__5, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 1db1f1b3..0b3a93df 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,7 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 22eb3138..a825b8ec 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index cd9d9890..5d752192 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index f5ee1490..0a2d220b 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 6d0ec38b..0c564f0e 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 4ee2fc23..ed806db0 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index ae281477..93b62826 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 4825ab70..a91fe173 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,6 +390,7 @@ void Texts_DumpReader (Texts_Reader re) Texts_DumpRun(re.run); } } + Out_DumpType((void*)&*re.run, 20); } static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) @@ -1566,8 +1567,8 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { - Modules_Module M = NIL; - Modules_Command Cmd; + Heap_Module M = NIL; + Heap_Command Cmd; Texts_Alien a = NIL; INT32 org, ew, eh; INT8 eno; diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index c7c8d20f..24dacf51 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 9ab993c9..ed38e4dc 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 3de3605c..69601701 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 213abf27..0b3a981e 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 4278a34c..36571c99 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index ffd8b03e..65da2216 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 6db13d09..77782293 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 4259cfef..438fec28 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 92ada350..bed555a5 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index bb6e46df..ba436b23 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 4554feac..3e929c3a 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -84,6 +84,7 @@ static void Heap_CheckFin (void); static void Heap_ExtendHeap (INT64 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); +export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); @@ -143,6 +144,35 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs) return (void*)m; } +INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len) +{ + Heap_Module m, p; + __DUP(name, name__len, CHAR); + m = (Heap_Module)(ADDRESS)Heap_modules; + while ((m != NIL && __STRCMP(m->name, name) != 0)) { + p = m; + m = m->next; + } + if ((m != NIL && m->refcnt == 0)) { + if (m == (Heap_Module)(ADDRESS)Heap_modules) { + Heap_modules = (SYSTEM_PTR)m->next; + } else { + p->next = m->next; + } + __DEL(name); + return 0; + } else { + if (m == NIL) { + __DEL(name); + return -1; + } else { + __DEL(name); + return m->refcnt; + } + } + __RETCHK; +} + void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd) { Heap_Cmd c; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 0fb80f05..b2018428 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,16 +1,26 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h #include "SYSTEM.h" +typedef + struct Heap_CmdDesc *Heap_Cmd; + typedef CHAR Heap_CmdName[24]; typedef void (*Heap_Command)(void); +typedef + struct Heap_CmdDesc { + Heap_Cmd next; + Heap_CmdName name; + Heap_Command cmd; + } Heap_CmdDesc; + typedef void (*Heap_EnumProc)(void(*)(SYSTEM_PTR)); @@ -21,13 +31,18 @@ typedef struct Heap_ModuleDesc *Heap_Module; typedef - struct Heap_ModuleDesc { - INT64 _prvt0; - char _prvt1[56]; - } Heap_ModuleDesc; + CHAR Heap_ModuleName[20]; typedef - CHAR Heap_ModuleName[20]; + struct Heap_ModuleDesc { + Heap_Module next; + Heap_ModuleName name; + INT32 refcnt; + Heap_Cmd cmds; + INT64 types; + Heap_EnumProc enumPtrs; + char _prvt0[8]; + } Heap_ModuleDesc; import SYSTEM_PTR Heap_modules; @@ -35,8 +50,10 @@ import INT64 Heap_allocated, Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; +import ADDRESS *Heap_CmdDesc__typ; import void Heap_FINALL (void); +import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); import void Heap_GC (BOOLEAN markStack); import void Heap_INCREF (Heap_Module m); import void Heap_InitHeap (void); diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index eb227d08..884c7b0e 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -9,47 +9,15 @@ #include "Heap.h" #include "Platform.h" -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - INT32 reserved1, reserved2; - } Modules_ModuleDesc; - export INT16 Modules_res; export CHAR Modules_resMsg[256]; -export Modules_ModuleName Modules_imported, Modules_importing; +export Heap_ModuleName Modules_imported, Modules_importing; export INT64 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT64 Modules_ArgVector; export CHAR Modules_BinaryDir[1024]; -export ADDRESS *Modules_ModuleDesc__typ; -export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); @@ -68,8 +36,8 @@ export void Modules_Init (INT32 argc, INT64 argvadr); static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +export Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +export Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); @@ -79,8 +47,7 @@ extern void Heap_InitHeap(); extern void *Modules__init(void); #define Modules_InitHeap() Heap_InitHeap() #define Modules_ModulesInit() Modules__init() -#define Modules_modules() (Modules_Module)Heap_modules -#define Modules_setmodules(m) Heap_modules = m +#define Modules_modules() (Heap_Module)Heap_modules void Modules_Init (INT32 argc, INT64 argvadr) { @@ -334,11 +301,11 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } } -Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) +Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { - Modules_Module m = NIL; + Heap_Module m = NIL; CHAR bodyname[64]; - Modules_Command body; + Heap_Command body; __DUP(name, name__len, CHAR); m = Modules_modules(); while ((m != NIL && __STRCMP(m->name, name) != 0)) { @@ -358,9 +325,9 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) +Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len) { - Modules_Cmd c = NIL; + Heap_Cmd c = NIL; __DUP(name, name__len, CHAR); c = mod->cmds; while ((c != NIL && __STRCMP(c->name, name) != 0)) { @@ -387,31 +354,24 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { - Modules_Module m = NIL, p = NIL; + Heap_Module m = NIL, p = NIL; + INT32 refcount; __DUP(name, name__len, CHAR); m = Modules_modules(); if (all) { Modules_res = 1; __MOVE("unloading \"all\" not yet supported", Modules_resMsg, 34); } else { - while ((m != NIL && __STRCMP(m->name, name) != 0)) { - p = m; - m = m->next; - } - if ((m != NIL && m->refcnt == 0)) { - if (m == Modules_modules()) { - Modules_setmodules(m->next); - } else { - p->next = m->next; - } + refcount = Heap_FreeModule(name, name__len); + if (refcount == 0) { Modules_res = 0; } else { - Modules_res = 1; - if (m == NIL) { + if (refcount < 0) { __MOVE("module not found", Modules_resMsg, 17); } else { __MOVE("clients of this module exist", Modules_resMsg, 29); } + Modules_res = 1; } } __DEL(name); @@ -533,8 +493,6 @@ void Modules_AssertFail (INT32 code) } } -__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}}; -__TDESC(Modules_CmdDesc, 1, 1) = {__TDFLDS("CmdDesc", 40), {0, -16}}; export void *Modules__init(void) { @@ -542,8 +500,6 @@ export void *Modules__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Modules", 0); - __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); - __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 3ee70401..e5803d29 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,51 +1,20 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h #include "SYSTEM.h" - -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - char _prvt0[8]; - } Modules_ModuleDesc; +#include "Heap.h" import INT16 Modules_res; import CHAR Modules_resMsg[256]; -import Modules_ModuleName Modules_imported, Modules_importing; +import Heap_ModuleName Modules_imported, Modules_importing; import INT64 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT64 Modules_ArgVector; import CHAR Modules_BinaryDir[1024]; -import ADDRESS *Modules_ModuleDesc__typ; -import ADDRESS *Modules_CmdDesc__typ; import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); @@ -54,8 +23,8 @@ import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); import void Modules_Init (INT32 argc, INT64 argvadr); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +import Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +import Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d83386eb..7e558357 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index feb85d73..b6d457bd 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index ab01642c..c09d2e6a 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f742f265..7c47ed18 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 1335c494..e3e6f1fe 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 621dfb51..6d2755d8 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 3f9dfde3..dc87be62 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index c1fe21fb..c13a4e91 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 4569c80d..ed3ea3a1 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index c0707c34..6dae098c 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 07f8f535..25e2e7c2 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 6b2b0929..00094b66 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 4506267a..c88953f2 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index d363f022..f83e65fb 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index d4d8e5f4..3129c109 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Heap.h" #include "Platform.h" @@ -13,8 +14,11 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; +static ADDRESS *typedesc__5__typ; export void Out_Char (CHAR ch); +static void Out_DumpModule (Heap_Module m); +export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); @@ -203,6 +207,94 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) Out_HexDumpAdr((ADDRESS)m, 0, m__len); } +static void Out_DumpModule (Heap_Module m) +{ + Out_String((CHAR*)" next: ", 13); + Out_Hex((INT64)(ADDRESS)m->next, 1); + Out_Ln(); + Out_String((CHAR*)" name: ", 13); + Out_String(m->name, 20); + Out_Ln(); + Out_String((CHAR*)" refcnt: ", 13); + Out_Hex(m->refcnt, 1); + Out_Ln(); + Out_String((CHAR*)" cmds: ", 13); + Out_Hex((INT64)(ADDRESS)m->cmds, 1); + Out_Ln(); + Out_String((CHAR*)" types: ", 13); + Out_Hex(m->types, 1); + Out_Ln(); + Out_String((CHAR*)" enumPtrs: ", 13); + Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); + Out_Ln(); +} + +typedef + struct typedesc__5 *tag__4; + +typedef + struct typedesc__5 { + INT64 tag, next, level, module; + CHAR name[24]; + INT64 bases[16]; + INT64 reserved, blksz, ptr0; + } typedesc__5; + +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT64 addr; + tag__4 desc = NIL; + INT16 i; + __GET((ADDRESS)o - 8, addr, INT64); + Out_String((CHAR*)"obj tag: ", 11); + Out_Hex(addr, 1); + Out_Ln(); + desc = (tag__4)(ADDRESS)(addr - 192); + Out_String((CHAR*)"desc at: ", 11); + Out_Hex((INT64)(ADDRESS)desc, 1); + Out_Ln(); + Out_String((CHAR*)"desc contains:", 15); + Out_Ln(); + Out_String((CHAR*)"tag: ", 11); + Out_Hex(desc->tag, 1); + Out_Ln(); + Out_String((CHAR*)"next: ", 11); + Out_Hex(desc->next, 1); + Out_Ln(); + Out_String((CHAR*)"level: ", 11); + Out_Hex(desc->level, 1); + Out_Ln(); + Out_String((CHAR*)"module: ", 11); + Out_Hex(desc->module, 1); + Out_Ln(); + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + Out_String((CHAR*)"name: ", 11); + Out_String(desc->name, 24); + Out_Ln(); + Out_String((CHAR*)"bases: ", 11); + i = 0; + while (i < 16) { + Out_Hex(desc->bases[__X(i, 16)], 16); + if (__MASK(i, -4) == 3) { + Out_Ln(); + Out_String((CHAR*)" ", 11); + } else { + Out_Char(' '); + } + i += 1; + } + Out_Ln(); + Out_String((CHAR*)"reserved: ", 11); + Out_Hex(desc->reserved, 1); + Out_Ln(); + Out_String((CHAR*)"blksz: ", 11); + Out_Hex(desc->blksz, 1); + Out_Ln(); + Out_String((CHAR*)"ptr0: ", 11); + Out_Hex(desc->ptr0, 1); + Out_Ln(); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -380,15 +472,18 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } +__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 208), {-8}}; export void *Out__init(void) { __DEFMOD; + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); + __INITYP(typedesc__5, typedesc__5, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 24829244..0126ef62 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,7 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 51a8fde7..d695bda2 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 56fab736..741cf3f7 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index f5ee1490..0a2d220b 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 6d0ec38b..0c564f0e 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 4ee2fc23..ed806db0 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index ae281477..93b62826 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 9887162e..bd19d27b 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,6 +390,7 @@ void Texts_DumpReader (Texts_Reader re) Texts_DumpRun(re.run); } } + Out_DumpType((void*)&*re.run, 40); } static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) @@ -1566,8 +1567,8 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { - Modules_Module M = NIL; - Modules_Command Cmd; + Heap_Module M = NIL; + Heap_Command Cmd; Texts_Alien a = NIL; INT32 org, ew, eh; INT8 eno; diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index e14afb26..2cf87339 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 9ab993c9..ed38e4dc 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 3de3605c..69601701 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 213abf27..0b3a981e 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 4278a34c..36571c99 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index ffd8b03e..65da2216 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 6db13d09..77782293 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 4259cfef..438fec28 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 2b8c7919..b4133ede 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dfeeebb3..7aaa4f5a 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 125a2854..c9adb169 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -84,6 +84,7 @@ static void Heap_CheckFin (void); static void Heap_ExtendHeap (INT32 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); +export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); @@ -143,6 +144,35 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs) return (void*)m; } +INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len) +{ + Heap_Module m, p; + __DUP(name, name__len, CHAR); + m = (Heap_Module)(ADDRESS)Heap_modules; + while ((m != NIL && __STRCMP(m->name, name) != 0)) { + p = m; + m = m->next; + } + if ((m != NIL && m->refcnt == 0)) { + if (m == (Heap_Module)(ADDRESS)Heap_modules) { + Heap_modules = (SYSTEM_PTR)m->next; + } else { + p->next = m->next; + } + __DEL(name); + return 0; + } else { + if (m == NIL) { + __DEL(name); + return -1; + } else { + __DEL(name); + return m->refcnt; + } + } + __RETCHK; +} + void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd) { Heap_Cmd c; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index e794a4a3..0df71d54 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,16 +1,26 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h #include "SYSTEM.h" +typedef + struct Heap_CmdDesc *Heap_Cmd; + typedef CHAR Heap_CmdName[24]; typedef void (*Heap_Command)(void); +typedef + struct Heap_CmdDesc { + Heap_Cmd next; + Heap_CmdName name; + Heap_Command cmd; + } Heap_CmdDesc; + typedef void (*Heap_EnumProc)(void(*)(SYSTEM_PTR)); @@ -21,13 +31,18 @@ typedef struct Heap_ModuleDesc *Heap_Module; typedef - struct Heap_ModuleDesc { - INT32 _prvt0; - char _prvt1[44]; - } Heap_ModuleDesc; + CHAR Heap_ModuleName[20]; typedef - CHAR Heap_ModuleName[20]; + struct Heap_ModuleDesc { + Heap_Module next; + Heap_ModuleName name; + INT32 refcnt; + Heap_Cmd cmds; + INT32 types; + Heap_EnumProc enumPtrs; + char _prvt0[8]; + } Heap_ModuleDesc; import SYSTEM_PTR Heap_modules; @@ -35,8 +50,10 @@ import INT32 Heap_allocated, Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; +import ADDRESS *Heap_CmdDesc__typ; import void Heap_FINALL (void); +import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); import void Heap_GC (BOOLEAN markStack); import void Heap_INCREF (Heap_Module m); import void Heap_InitHeap (void); diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index ab668fec..6d8570ec 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -9,47 +9,15 @@ #include "Heap.h" #include "Platform.h" -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - INT32 reserved1, reserved2; - } Modules_ModuleDesc; - export INT16 Modules_res; export CHAR Modules_resMsg[256]; -export Modules_ModuleName Modules_imported, Modules_importing; +export Heap_ModuleName Modules_imported, Modules_importing; export INT32 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT32 Modules_ArgVector; export CHAR Modules_BinaryDir[1024]; -export ADDRESS *Modules_ModuleDesc__typ; -export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); @@ -68,8 +36,8 @@ export void Modules_Init (INT32 argc, INT32 argvadr); static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +export Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +export Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); @@ -79,8 +47,7 @@ extern void Heap_InitHeap(); extern void *Modules__init(void); #define Modules_InitHeap() Heap_InitHeap() #define Modules_ModulesInit() Modules__init() -#define Modules_modules() (Modules_Module)Heap_modules -#define Modules_setmodules(m) Heap_modules = m +#define Modules_modules() (Heap_Module)Heap_modules void Modules_Init (INT32 argc, INT32 argvadr) { @@ -334,11 +301,11 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } } -Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) +Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { - Modules_Module m = NIL; + Heap_Module m = NIL; CHAR bodyname[64]; - Modules_Command body; + Heap_Command body; __DUP(name, name__len, CHAR); m = Modules_modules(); while ((m != NIL && __STRCMP(m->name, name) != 0)) { @@ -358,9 +325,9 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) +Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len) { - Modules_Cmd c = NIL; + Heap_Cmd c = NIL; __DUP(name, name__len, CHAR); c = mod->cmds; while ((c != NIL && __STRCMP(c->name, name) != 0)) { @@ -387,31 +354,24 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { - Modules_Module m = NIL, p = NIL; + Heap_Module m = NIL, p = NIL; + INT32 refcount; __DUP(name, name__len, CHAR); m = Modules_modules(); if (all) { Modules_res = 1; __MOVE("unloading \"all\" not yet supported", Modules_resMsg, 34); } else { - while ((m != NIL && __STRCMP(m->name, name) != 0)) { - p = m; - m = m->next; - } - if ((m != NIL && m->refcnt == 0)) { - if (m == Modules_modules()) { - Modules_setmodules(m->next); - } else { - p->next = m->next; - } + refcount = Heap_FreeModule(name, name__len); + if (refcount == 0) { Modules_res = 0; } else { - Modules_res = 1; - if (m == NIL) { + if (refcount < 0) { __MOVE("module not found", Modules_resMsg, 17); } else { __MOVE("clients of this module exist", Modules_resMsg, 29); } + Modules_res = 1; } } __DEL(name); @@ -533,8 +493,6 @@ void Modules_AssertFail (INT32 code) } } -__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 48), {0, 28, -12}}; -__TDESC(Modules_CmdDesc, 1, 1) = {__TDFLDS("CmdDesc", 32), {0, -8}}; export void *Modules__init(void) { @@ -542,8 +500,6 @@ export void *Modules__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Modules", 0); - __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); - __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 553f80ed..3c1c580d 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,51 +1,20 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h #include "SYSTEM.h" - -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - char _prvt0[8]; - } Modules_ModuleDesc; +#include "Heap.h" import INT16 Modules_res; import CHAR Modules_resMsg[256]; -import Modules_ModuleName Modules_imported, Modules_importing; +import Heap_ModuleName Modules_imported, Modules_importing; import INT32 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT32 Modules_ArgVector; import CHAR Modules_BinaryDir[1024]; -import ADDRESS *Modules_ModuleDesc__typ; -import ADDRESS *Modules_CmdDesc__typ; import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); @@ -54,8 +23,8 @@ import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); import void Modules_Init (INT32 argc, INT32 argvadr); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +import Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +import Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d83386eb..7e558357 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index feb85d73..b6d457bd 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index ab01642c..c09d2e6a 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f742f265..7c47ed18 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index a6c7a5cd..a3718f79 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 621dfb51..6d2755d8 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 383b6d65..5924f42f 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index c1fe21fb..c13a4e91 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 4569c80d..ed3ea3a1 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index c0707c34..6dae098c 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 0d32553a..6b6144fc 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 6b2b0929..00094b66 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 42081077..7e829aa2 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index d363f022..f83e65fb 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 7e1c7459..21e029bd 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Heap.h" #include "Platform.h" @@ -13,8 +14,11 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; +static ADDRESS *typedesc__5__typ; export void Out_Char (CHAR ch); +static void Out_DumpModule (Heap_Module m); +export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); @@ -203,6 +207,94 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) Out_HexDumpAdr((ADDRESS)m, 0, m__len); } +static void Out_DumpModule (Heap_Module m) +{ + Out_String((CHAR*)" next: ", 13); + Out_Hex((INT32)(ADDRESS)m->next, 1); + Out_Ln(); + Out_String((CHAR*)" name: ", 13); + Out_String(m->name, 20); + Out_Ln(); + Out_String((CHAR*)" refcnt: ", 13); + Out_Hex(m->refcnt, 1); + Out_Ln(); + Out_String((CHAR*)" cmds: ", 13); + Out_Hex((INT32)(ADDRESS)m->cmds, 1); + Out_Ln(); + Out_String((CHAR*)" types: ", 13); + Out_Hex(m->types, 1); + Out_Ln(); + Out_String((CHAR*)" enumPtrs: ", 13); + Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); + Out_Ln(); +} + +typedef + struct typedesc__5 *tag__4; + +typedef + struct typedesc__5 { + INT32 tag, next, level, module; + CHAR name[24]; + INT32 bases[16]; + INT32 reserved, blksz, ptr0; + } typedesc__5; + +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + tag__4 desc = NIL; + INT16 i; + __GET((ADDRESS)o - 4, addr, INT32); + Out_String((CHAR*)"obj tag: ", 11); + Out_Hex(addr, 1); + Out_Ln(); + desc = (tag__4)(ADDRESS)(addr - 108); + Out_String((CHAR*)"desc at: ", 11); + Out_Hex((INT32)(ADDRESS)desc, 1); + Out_Ln(); + Out_String((CHAR*)"desc contains:", 15); + Out_Ln(); + Out_String((CHAR*)"tag: ", 11); + Out_Hex(desc->tag, 1); + Out_Ln(); + Out_String((CHAR*)"next: ", 11); + Out_Hex(desc->next, 1); + Out_Ln(); + Out_String((CHAR*)"level: ", 11); + Out_Hex(desc->level, 1); + Out_Ln(); + Out_String((CHAR*)"module: ", 11); + Out_Hex(desc->module, 1); + Out_Ln(); + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + Out_String((CHAR*)"name: ", 11); + Out_String(desc->name, 24); + Out_Ln(); + Out_String((CHAR*)"bases: ", 11); + i = 0; + while (i < 16) { + Out_Hex(desc->bases[__X(i, 16)], 8); + if (__MASK(i, -4) == 3) { + Out_Ln(); + Out_String((CHAR*)" ", 11); + } else { + Out_Char(' '); + } + i += 1; + } + Out_Ln(); + Out_String((CHAR*)"reserved: ", 11); + Out_Hex(desc->reserved, 1); + Out_Ln(); + Out_String((CHAR*)"blksz: ", 11); + Out_Hex(desc->blksz, 1); + Out_Ln(); + Out_String((CHAR*)"ptr0: ", 11); + Out_Hex(desc->ptr0, 1); + Out_Ln(); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -380,15 +472,18 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } +__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; export void *Out__init(void) { __DEFMOD; + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); + __INITYP(typedesc__5, typedesc__5, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 1db1f1b3..0b3a93df 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,7 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 43a2c695..661a3ff4 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index ddc997ca..68347c6c 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index f5ee1490..0a2d220b 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 6d0ec38b..0c564f0e 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 4ee2fc23..ed806db0 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index ae281477..93b62826 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 4825ab70..a91fe173 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,6 +390,7 @@ void Texts_DumpReader (Texts_Reader re) Texts_DumpRun(re.run); } } + Out_DumpType((void*)&*re.run, 20); } static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) @@ -1566,8 +1567,8 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { - Modules_Module M = NIL; - Modules_Command Cmd; + Heap_Module M = NIL; + Heap_Command Cmd; Texts_Alien a = NIL; INT32 org, ew, eh; INT8 eno; diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index c7c8d20f..24dacf51 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 9ab993c9..ed38e4dc 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 3de3605c..69601701 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 213abf27..0b3a981e 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 4278a34c..36571c99 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index ffd8b03e..65da2216 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 6db13d09..77782293 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 4259cfef..438fec28 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index fc649cf8..1c505c07 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 49df83be..337b30b5 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 4554feac..3e929c3a 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -84,6 +84,7 @@ static void Heap_CheckFin (void); static void Heap_ExtendHeap (INT64 blksz); export void Heap_FINALL (void); static void Heap_Finalize (void); +export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); @@ -143,6 +144,35 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs) return (void*)m; } +INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len) +{ + Heap_Module m, p; + __DUP(name, name__len, CHAR); + m = (Heap_Module)(ADDRESS)Heap_modules; + while ((m != NIL && __STRCMP(m->name, name) != 0)) { + p = m; + m = m->next; + } + if ((m != NIL && m->refcnt == 0)) { + if (m == (Heap_Module)(ADDRESS)Heap_modules) { + Heap_modules = (SYSTEM_PTR)m->next; + } else { + p->next = m->next; + } + __DEL(name); + return 0; + } else { + if (m == NIL) { + __DEL(name); + return -1; + } else { + __DEL(name); + return m->refcnt; + } + } + __RETCHK; +} + void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd) { Heap_Cmd c; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 0fb80f05..b2018428 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,16 +1,26 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h #include "SYSTEM.h" +typedef + struct Heap_CmdDesc *Heap_Cmd; + typedef CHAR Heap_CmdName[24]; typedef void (*Heap_Command)(void); +typedef + struct Heap_CmdDesc { + Heap_Cmd next; + Heap_CmdName name; + Heap_Command cmd; + } Heap_CmdDesc; + typedef void (*Heap_EnumProc)(void(*)(SYSTEM_PTR)); @@ -21,13 +31,18 @@ typedef struct Heap_ModuleDesc *Heap_Module; typedef - struct Heap_ModuleDesc { - INT64 _prvt0; - char _prvt1[56]; - } Heap_ModuleDesc; + CHAR Heap_ModuleName[20]; typedef - CHAR Heap_ModuleName[20]; + struct Heap_ModuleDesc { + Heap_Module next; + Heap_ModuleName name; + INT32 refcnt; + Heap_Cmd cmds; + INT64 types; + Heap_EnumProc enumPtrs; + char _prvt0[8]; + } Heap_ModuleDesc; import SYSTEM_PTR Heap_modules; @@ -35,8 +50,10 @@ import INT64 Heap_allocated, Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; +import ADDRESS *Heap_CmdDesc__typ; import void Heap_FINALL (void); +import INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); import void Heap_GC (BOOLEAN markStack); import void Heap_INCREF (Heap_Module m); import void Heap_InitHeap (void); diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 37cfa0cd..6e92bf1e 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -9,47 +9,15 @@ #include "Heap.h" #include "Platform.h" -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - INT32 reserved1, reserved2; - } Modules_ModuleDesc; - export INT16 Modules_res; export CHAR Modules_resMsg[256]; -export Modules_ModuleName Modules_imported, Modules_importing; +export Heap_ModuleName Modules_imported, Modules_importing; export INT64 Modules_MainStackFrame; export INT16 Modules_ArgCount; export INT64 Modules_ArgVector; export CHAR Modules_BinaryDir[1024]; -export ADDRESS *Modules_ModuleDesc__typ; -export ADDRESS *Modules_CmdDesc__typ; static void Modules_Append (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_AppendPart (CHAR c, CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); @@ -68,8 +36,8 @@ export void Modules_Init (INT32 argc, INT64 argvadr); static BOOLEAN Modules_IsAbsolute (CHAR *d, ADDRESS d__len); static BOOLEAN Modules_IsFilePresent (CHAR *s, ADDRESS s__len); static BOOLEAN Modules_IsOneOf (CHAR c, CHAR *s, ADDRESS s__len); -export Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -export Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +export Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +export Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); static void Modules_Trim (CHAR *s, ADDRESS s__len, CHAR *d, ADDRESS d__len); static void Modules_errch (CHAR c); static void Modules_errint (INT32 l); @@ -79,8 +47,7 @@ extern void Heap_InitHeap(); extern void *Modules__init(void); #define Modules_InitHeap() Heap_InitHeap() #define Modules_ModulesInit() Modules__init() -#define Modules_modules() (Modules_Module)Heap_modules -#define Modules_setmodules(m) Heap_modules = m +#define Modules_modules() (Heap_Module)Heap_modules void Modules_Init (INT32 argc, INT64 argvadr) { @@ -334,11 +301,11 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } } -Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) +Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) { - Modules_Module m = NIL; + Heap_Module m = NIL; CHAR bodyname[64]; - Modules_Command body; + Heap_Command body; __DUP(name, name__len, CHAR); m = Modules_modules(); while ((m != NIL && __STRCMP(m->name, name) != 0)) { @@ -358,9 +325,9 @@ Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len) return m; } -Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len) +Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len) { - Modules_Cmd c = NIL; + Heap_Cmd c = NIL; __DUP(name, name__len, CHAR); c = mod->cmds; while ((c != NIL && __STRCMP(c->name, name) != 0)) { @@ -387,31 +354,24 @@ Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS nam void Modules_Free (CHAR *name, ADDRESS name__len, BOOLEAN all) { - Modules_Module m = NIL, p = NIL; + Heap_Module m = NIL, p = NIL; + INT32 refcount; __DUP(name, name__len, CHAR); m = Modules_modules(); if (all) { Modules_res = 1; __MOVE("unloading \"all\" not yet supported", Modules_resMsg, 34); } else { - while ((m != NIL && __STRCMP(m->name, name) != 0)) { - p = m; - m = m->next; - } - if ((m != NIL && m->refcnt == 0)) { - if (m == Modules_modules()) { - Modules_setmodules(m->next); - } else { - p->next = m->next; - } + refcount = Heap_FreeModule(name, name__len); + if (refcount == 0) { Modules_res = 0; } else { - Modules_res = 1; - if (m == NIL) { + if (refcount < 0) { __MOVE("module not found", Modules_resMsg, 17); } else { __MOVE("clients of this module exist", Modules_resMsg, 29); } + Modules_res = 1; } } __DEL(name); @@ -533,8 +493,6 @@ void Modules_AssertFail (INT32 code) } } -__TDESC(Modules_ModuleDesc, 1, 2) = {__TDFLDS("ModuleDesc", 64), {0, 32, -24}}; -__TDESC(Modules_CmdDesc, 1, 1) = {__TDFLDS("CmdDesc", 40), {0, -16}}; export void *Modules__init(void) { @@ -542,8 +500,6 @@ export void *Modules__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Modules", 0); - __INITYP(Modules_ModuleDesc, Modules_ModuleDesc, 0); - __INITYP(Modules_CmdDesc, Modules_CmdDesc, 0); /* BEGIN */ Modules_FindBinaryDir((void*)Modules_BinaryDir, 1024); __ENDMOD; diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 3ee70401..e5803d29 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,51 +1,20 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h #include "SYSTEM.h" - -typedef - struct Modules_CmdDesc *Modules_Cmd; - -typedef - void (*Modules_Command)(void); - -typedef - struct Modules_CmdDesc { - Modules_Cmd next; - CHAR name[24]; - Modules_Command cmd; - } Modules_CmdDesc; - -typedef - struct Modules_ModuleDesc *Modules_Module; - -typedef - CHAR Modules_ModuleName[20]; - -typedef - struct Modules_ModuleDesc { - Modules_Module next; - Modules_ModuleName name; - INT32 refcnt; - Modules_Cmd cmds; - INT32 types; - void (*enumPtrs)(void(*)(INT32)); - char _prvt0[8]; - } Modules_ModuleDesc; +#include "Heap.h" import INT16 Modules_res; import CHAR Modules_resMsg[256]; -import Modules_ModuleName Modules_imported, Modules_importing; +import Heap_ModuleName Modules_imported, Modules_importing; import INT64 Modules_MainStackFrame; import INT16 Modules_ArgCount; import INT64 Modules_ArgVector; import CHAR Modules_BinaryDir[1024]; -import ADDRESS *Modules_ModuleDesc__typ; -import ADDRESS *Modules_CmdDesc__typ; import INT16 Modules_ArgPos (CHAR *s, ADDRESS s__len); import void Modules_AssertFail (INT32 code); @@ -54,8 +23,8 @@ import void Modules_GetArg (INT16 n, CHAR *val, ADDRESS val__len); import void Modules_GetIntArg (INT16 n, INT32 *val); import void Modules_Halt (INT32 code); import void Modules_Init (INT32 argc, INT64 argvadr); -import Modules_Command Modules_ThisCommand (Modules_Module mod, CHAR *name, ADDRESS name__len); -import Modules_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); +import Heap_Command Modules_ThisCommand (Heap_Module mod, CHAR *name, ADDRESS name__len); +import Heap_Module Modules_ThisMod (CHAR *name, ADDRESS name__len); import void *Modules__init(void); diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d83386eb..7e558357 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index feb85d73..b6d457bd 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index ab01642c..c09d2e6a 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f742f265..7c47ed18 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 1335c494..e3e6f1fe 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 621dfb51..6d2755d8 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 3f9dfde3..dc87be62 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index c1fe21fb..c13a4e91 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 4569c80d..ed3ea3a1 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index c0707c34..6dae098c 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 07f8f535..25e2e7c2 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 6b2b0929..00094b66 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 4506267a..c88953f2 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index d363f022..f83e65fb 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 66c81d4e..cbf124ca 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Heap.h" #include "Platform.h" @@ -13,8 +14,11 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; +static ADDRESS *typedesc__5__typ; export void Out_Char (CHAR ch); +static void Out_DumpModule (Heap_Module m); +export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); @@ -203,6 +207,94 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) Out_HexDumpAdr((ADDRESS)m, 0, m__len); } +static void Out_DumpModule (Heap_Module m) +{ + Out_String((CHAR*)" next: ", 13); + Out_Hex((INT64)(ADDRESS)m->next, 1); + Out_Ln(); + Out_String((CHAR*)" name: ", 13); + Out_String(m->name, 20); + Out_Ln(); + Out_String((CHAR*)" refcnt: ", 13); + Out_Hex(m->refcnt, 1); + Out_Ln(); + Out_String((CHAR*)" cmds: ", 13); + Out_Hex((INT64)(ADDRESS)m->cmds, 1); + Out_Ln(); + Out_String((CHAR*)" types: ", 13); + Out_Hex(m->types, 1); + Out_Ln(); + Out_String((CHAR*)" enumPtrs: ", 13); + Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); + Out_Ln(); +} + +typedef + struct typedesc__5 *tag__4; + +typedef + struct typedesc__5 { + INT64 tag, next, level, module; + CHAR name[24]; + INT64 bases[16]; + INT64 reserved, blksz, ptr0; + } typedesc__5; + +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT64 addr; + tag__4 desc = NIL; + INT16 i; + __GET((ADDRESS)o - 8, addr, INT64); + Out_String((CHAR*)"obj tag: ", 11); + Out_Hex(addr, 1); + Out_Ln(); + desc = (tag__4)(ADDRESS)(addr - 192); + Out_String((CHAR*)"desc at: ", 11); + Out_Hex((INT64)(ADDRESS)desc, 1); + Out_Ln(); + Out_String((CHAR*)"desc contains:", 15); + Out_Ln(); + Out_String((CHAR*)"tag: ", 11); + Out_Hex(desc->tag, 1); + Out_Ln(); + Out_String((CHAR*)"next: ", 11); + Out_Hex(desc->next, 1); + Out_Ln(); + Out_String((CHAR*)"level: ", 11); + Out_Hex(desc->level, 1); + Out_Ln(); + Out_String((CHAR*)"module: ", 11); + Out_Hex(desc->module, 1); + Out_Ln(); + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + Out_String((CHAR*)"name: ", 11); + Out_String(desc->name, 24); + Out_Ln(); + Out_String((CHAR*)"bases: ", 11); + i = 0; + while (i < 16) { + Out_Hex(desc->bases[__X(i, 16)], 16); + if (__MASK(i, -4) == 3) { + Out_Ln(); + Out_String((CHAR*)" ", 11); + } else { + Out_Char(' '); + } + i += 1; + } + Out_Ln(); + Out_String((CHAR*)"reserved: ", 11); + Out_Hex(desc->reserved, 1); + Out_Ln(); + Out_String((CHAR*)"blksz: ", 11); + Out_Hex(desc->blksz, 1); + Out_Ln(); + Out_String((CHAR*)"ptr0: ", 11); + Out_Hex(desc->ptr0, 1); + Out_Ln(); +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -380,15 +472,18 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } +__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 208), {-8}}; export void *Out__init(void) { __DEFMOD; + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); + __INITYP(typedesc__5, typedesc__5, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 24829244..0126ef62 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,7 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 44691d4d..59a4d3a4 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 751980ad..787e2dc2 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index f5ee1490..0a2d220b 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 6d0ec38b..0c564f0e 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 4ee2fc23..ed806db0 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index ae281477..93b62826 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 9887162e..bd19d27b 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -390,6 +390,7 @@ void Texts_DumpReader (Texts_Reader re) Texts_DumpRun(re.run); } } + Out_DumpType((void*)&*re.run, 40); } static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) @@ -1566,8 +1567,8 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { - Modules_Module M = NIL; - Modules_Command Cmd; + Heap_Module M = NIL; + Heap_Command Cmd; Texts_Alien a = NIL; INT32 org, ew, eh; INT8 eno; diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index e14afb26..2cf87339 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 9ab993c9..ed38e4dc 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 3de3605c..69601701 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 213abf27..0b3a981e 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 4278a34c..36571c99 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/11]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From c5561dd0e0d753df57ac3c2ba3691a498ba8db1d Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 12 Dec 2016 20:06:00 +0000 Subject: [PATCH 083/241] Make type descriptor dump resilient to increments (mid-GC) tags. --- src/runtime/Out.Mod | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 37c928a4..9dcb6b7f 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -147,6 +147,7 @@ VAR BEGIN SYSTEM.GET(SYSTEM.ADR(o) - SIZE(SYSTEM.ADDRESS), addr); String("obj tag: "); Hex(addr,1); Ln; + DEC(addr, addr MOD 2); (* Work OK with incremented tags. *) desc := SYSTEM.VAL(tag, addr - (21*SIZE(SYSTEM.ADDRESS) + 24)); String("desc at: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, desc),1); Ln; String("desc contains:"); Ln; From 13241fabba042aaa3c5b95af0e2169f1c2f35b5e Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 12 Dec 2016 20:06:40 +0000 Subject: [PATCH 084/241] Update bootstrap C sources. --- bootstrap/unix-44/Out.c | 1 + bootstrap/unix-48/Out.c | 1 + bootstrap/unix-88/Out.c | 1 + bootstrap/windows-48/Out.c | 1 + bootstrap/windows-88/Out.c | 1 + 5 files changed, 5 insertions(+) diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 39900621..6d72148a 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -249,6 +249,7 @@ void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) Out_String((CHAR*)"obj tag: ", 11); Out_Hex(addr, 1); Out_Ln(); + addr -= __MASK(addr, -2); desc = (tag__4)(ADDRESS)(addr - 108); Out_String((CHAR*)"desc at: ", 11); Out_Hex((INT32)(ADDRESS)desc, 1); diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 39900621..6d72148a 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -249,6 +249,7 @@ void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) Out_String((CHAR*)"obj tag: ", 11); Out_Hex(addr, 1); Out_Ln(); + addr -= __MASK(addr, -2); desc = (tag__4)(ADDRESS)(addr - 108); Out_String((CHAR*)"desc at: ", 11); Out_Hex((INT32)(ADDRESS)desc, 1); diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 3129c109..67eaad85 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -249,6 +249,7 @@ void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) Out_String((CHAR*)"obj tag: ", 11); Out_Hex(addr, 1); Out_Ln(); + addr -= __MASK(addr, -2); desc = (tag__4)(ADDRESS)(addr - 192); Out_String((CHAR*)"desc at: ", 11); Out_Hex((INT64)(ADDRESS)desc, 1); diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 21e029bd..f792315a 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -249,6 +249,7 @@ void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) Out_String((CHAR*)"obj tag: ", 11); Out_Hex(addr, 1); Out_Ln(); + addr -= __MASK(addr, -2); desc = (tag__4)(ADDRESS)(addr - 108); Out_String((CHAR*)"desc at: ", 11); Out_Hex((INT32)(ADDRESS)desc, 1); diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index cbf124ca..d0afc5be 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -249,6 +249,7 @@ void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) Out_String((CHAR*)"obj tag: ", 11); Out_Hex(addr, 1); Out_Ln(); + addr -= __MASK(addr, -2); desc = (tag__4)(ADDRESS)(addr - 192); Out_String((CHAR*)"desc at: ", 11); Out_Hex((INT64)(ADDRESS)desc, 1); From a377c7c3bf06765a6f6ff5b2370c48975e27b8b3 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:25:50 +0000 Subject: [PATCH 085/241] Still chasing OpenBSD issue. Add heap dump. Looks like a GC fault. --- src/compiler/OPM.Mod | 2 + src/runtime/Heap.Mod | 2 +- src/runtime/Out.Mod | 112 ++++++++++++++++++++++++++++++++++--------- 3 files changed, 92 insertions(+), 24 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 7ccf49c5..583c4318 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -396,6 +396,8 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) LogWLn; LogWStr("DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = "); LogWNum(ORD(ch),1); LogW("."); Texts.DumpReader(inR); + LogWLn; LogWStr("Heap dump:"); LogWLn; + Out.DumpHeap END; (* TODO, remove curpos var, and provide fn returning Texts.Pos(inR) - 1. *) (* Or, better still, record symbol position in OPS. *) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index ad9d6424..bdb0bc59 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -80,7 +80,7 @@ MODULE Heap; firstTry: BOOLEAN; (* extensible heap *) - heap: S.ADDRESS; (* the sorted list of heap chunks *) + heap-: S.ADDRESS; (* the sorted list of heap chunks *) heapNegMin: S.ADDRESS; (* Range of pointer values, used for stack collection *) heapNegMax: S.ADDRESS; heapPosMin: S.ADDRESS; diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 9dcb6b7f..63a22ada 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -117,15 +117,15 @@ END HexDump; PROCEDURE DumpModule(m: Heap.Module); BEGIN - String(" next: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.next),1); Ln; - String(" name: "); String(m.name); Ln; - String(" refcnt: "); Hex(m.refcnt,1); Ln; - String(" cmds: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.cmds),1); Ln; - String(" types: "); Hex(m.types,1); Ln; - String(" enumPtrs: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.enumPtrs),1); Ln; + String(" next: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.next),1); Ln; + String(" name: "); String(m.name); Ln; + String(" refcnt: "); Hex(m.refcnt,1); Ln; + String(" cmds: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.cmds),1); Ln; + String(" types: "); Hex(m.types,1); Ln; + String(" enumPtrs: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.enumPtrs),1); Ln; END DumpModule; -PROCEDURE DumpType*(VAR o: ARRAY OF SYSTEM.BYTE); +PROCEDURE DumpTag*(addr: SYSTEM.ADDRESS); TYPE typedesc = RECORD (* Array of type bound procedure addresses preceeds this. *) @@ -141,33 +141,98 @@ TYPE END; tag = POINTER [1] TO typedesc; VAR - addr: SYSTEM.ADDRESS; desc: tag; i: INTEGER; BEGIN - SYSTEM.GET(SYSTEM.ADR(o) - SIZE(SYSTEM.ADDRESS), addr); - String("obj tag: "); Hex(addr,1); Ln; + String(" obj tag: "); Hex(addr,1); Ln; DEC(addr, addr MOD 2); (* Work OK with incremented tags. *) desc := SYSTEM.VAL(tag, addr - (21*SIZE(SYSTEM.ADDRESS) + 24)); - String("desc at: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, desc),1); Ln; - String("desc contains:"); Ln; - String("tag: "); Hex(desc.tag, 1); Ln; - String("next: "); Hex(desc.next, 1); Ln; - String("level: "); Hex(desc.level, 1); Ln; - String("module: "); Hex(desc.module, 1); Ln; - DumpModule(SYSTEM.VAL(Heap.Module, desc.module)); - String("name: "); String(desc.name); Ln; - String("bases: "); + String(" desc at: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, desc),1); Ln; + String(" desc contains:"); Ln; + String(" tag: "); Hex(desc.tag, 1); Ln; + String(" next: "); Hex(desc.next, 1); Ln; + String(" level: "); Hex(desc.level, 1); Ln; + String(" module: "); Hex(desc.module, 1); Ln; + IF desc.module # 0 THEN DumpModule(SYSTEM.VAL(Heap.Module, desc.module)) END; + String(" name: "); String(desc.name); Ln; + String(" bases: "); i := 0; WHILE i < 16 DO Hex(desc.bases[i], SIZE(SYSTEM.ADDRESS) * 2); - IF i MOD 4 = 3 THEN Ln; String(" ") ELSE Char(" ") END; + IF i MOD 4 = 3 THEN Ln; String(" ") ELSE Char(" ") END; INC(i) END; Ln; - String("reserved: "); Hex(desc.reserved, 1); Ln; - String("blksz: "); Hex(desc.blksz, 1); Ln; - String("ptr0: "); Hex(desc.ptr0, 1); Ln; + String(" reserved: "); Hex(desc.reserved, 1); Ln; + String(" blksz: "); Hex(desc.blksz, 1); Ln; + String(" ptr0: "); Hex(desc.ptr0, 1); Ln; +END DumpTag; + +PROCEDURE DumpType*(VAR o: ARRAY OF SYSTEM.BYTE); +VAR addr: SYSTEM.ADDRESS; +BEGIN + SYSTEM.GET(SYSTEM.ADR(o) - SIZE(SYSTEM.ADDRESS), addr); + DumpTag(addr); END DumpType; + +PROCEDURE -externheap "extern ADDRESS Heap_heap;"; +PROCEDURE -getheap(): SYSTEM.ADDRESS "Heap_heap"; + +PROCEDURE DumpHeap*; +TYPE + adrptr = POINTER [1] TO ARRAY 1 OF SYSTEM.ADDRESS; + + block = POINTER [1] TO blockdesc; + blockdesc = RECORD + tag: SYSTEM.ADDRESS; + size: SYSTEM.ADDRESS; + sentinel: SYSTEM.ADDRESS; + next: SYSTEM.ADDRESS; + END; + + chunk = POINTER [1] TO chunkdesc; + chunkdesc = RECORD + next: SYSTEM.ADDRESS; + end: SYSTEM.ADDRESS; + reserved: SYSTEM.ADDRESS; + firstblock: blockdesc; + END; +VAR + caddr: SYSTEM.ADDRESS; c: chunk; + baddr: SYSTEM.ADDRESS; b: block; + tag: adrptr; +BEGIN + caddr := Heap.heap; + WHILE caddr # 0 DO + String("Chunk at: "); Hex(caddr, 1); Ln; + c := SYSTEM.VAL(chunk, caddr); + String(" next: "); Hex(c.next, 1); Ln; + String(" end: "); Hex(c.end, 1); String(" => size: "); Hex(c.end - caddr,1 ); Ln; + String(" rsvd: "); Hex(c.reserved, 1); Ln; + + baddr := SYSTEM.ADR(c.firstblock); + WHILE baddr < c.end DO + String(" Block at: "); Hex(baddr, 1); Ln; + b := SYSTEM.VAL(block, baddr); + tag := SYSTEM.VAL(adrptr, b.tag); + String(" tag: "); Hex(b.tag, 1); IF b.tag MOD 2 # 0 THEN String(" <--- ODD! ---") END; Ln; + String(" tag^: "); Hex(tag^[0], 1); Ln; + String(" size: "); Hex(b.size, 1); Ln; + String(" sentinel: "); Hex(b.sentinel, 1); Ln; + String(" next: "); Hex(b.next, 1); Ln; + IF b.tag # SYSTEM.ADR(b.size) THEN + (* There is a type descriptor. *) + DumpTag(b.tag) + END; + INC(baddr, tag^[0]); + Ln; + END; + + caddr := c.next; + Ln; + END +END DumpHeap; + + (* Real and Longreal display *) PROCEDURE digit(n: HUGEINT; VAR s: ARRAY OF CHAR; VAR i: INTEGER); @@ -184,6 +249,7 @@ BEGIN END prepend; + PROCEDURE Ten*(e: INTEGER): LONGREAL; VAR r, power: LONGREAL; BEGIN r := 1.0D0; power := 1.0D1; From d7de5701777c329e0798fa9e779d50ed63ef205a Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:27:35 +0000 Subject: [PATCH 086/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 5 +- bootstrap/unix-44/Heap.h | 6 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 6 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 162 +++++++++++++++++++++------ bootstrap/unix-44/Out.h | 4 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 5 +- bootstrap/unix-48/Heap.h | 6 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 6 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 162 +++++++++++++++++++++------ bootstrap/unix-48/Out.h | 4 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 5 +- bootstrap/unix-88/Heap.h | 6 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 6 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 162 +++++++++++++++++++++------ bootstrap/unix-88/Out.h | 4 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 5 +- bootstrap/windows-48/Heap.h | 6 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 6 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 162 +++++++++++++++++++++------ bootstrap/windows-48/Out.h | 4 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 5 +- bootstrap/windows-88/Heap.h | 6 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 6 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 162 +++++++++++++++++++++------ bootstrap/windows-88/Out.h | 4 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 890 insertions(+), 355 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 65da2216..39819e0a 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 77782293..e391cd31 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 438fec28..5d106305 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 02716878..fb2ee9ee 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 2270fec0..5b6e66ef 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index c9adb169..0e9118e3 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,8 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +export INT32 Heap_heap; +static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 0df71d54..62f61978 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -46,7 +46,9 @@ typedef import SYSTEM_PTR Heap_modules; -import INT32 Heap_allocated, Heap_heapsize; +import INT32 Heap_allocated; +import INT32 Heap_heap; +import INT32 Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 03d205e0..529aeee2 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 3c1c580d..89339f66 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 7e558357..b5c4fd7d 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index b6d457bd..20372132 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index c09d2e6a..7848592a 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 7c47ed18..dff5b7ca 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index a3718f79..8017c2e7 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch) OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); Texts_DumpReader(OPM_inR); + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Heap dump:", 11); + OPM_LogWLn(); + Out_DumpHeap(); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 6d2755d8..59190332 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 5924f42f..d8d05354 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index c13a4e91..efff1781 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index ed3ea3a1..2d0304d5 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 6dae098c..e54474bc 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index e929a6e0..4d978eb5 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 00094b66..d2ca1fae 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 7e829aa2..5597b3e3 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index f83e65fb..4e3573c7 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 6d72148a..dc9ab60c 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__5__typ; +static ADDRESS *typedesc__11__typ; +static ADDRESS *blockdesc__5__typ; +static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); +export void Out_DumpHeap (void); static void Out_DumpModule (Heap_Module m); +export void Out_DumpTag (INT32 addr); export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); @@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) +extern ADDRESS Heap_heap; +#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) static void Out_DumpModule (Heap_Module m) { - Out_String((CHAR*)" next: ", 13); + Out_String((CHAR*)" next: ", 19); Out_Hex((INT32)(ADDRESS)m->next, 1); Out_Ln(); - Out_String((CHAR*)" name: ", 13); + Out_String((CHAR*)" name: ", 19); Out_String(m->name, 20); Out_Ln(); - Out_String((CHAR*)" refcnt: ", 13); + Out_String((CHAR*)" refcnt: ", 19); Out_Hex(m->refcnt, 1); Out_Ln(); - Out_String((CHAR*)" cmds: ", 13); + Out_String((CHAR*)" cmds: ", 19); Out_Hex((INT32)(ADDRESS)m->cmds, 1); Out_Ln(); - Out_String((CHAR*)" types: ", 13); + Out_String((CHAR*)" types: ", 19); Out_Hex(m->types, 1); Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 13); + Out_String((CHAR*)" enumPtrs: ", 19); Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); Out_Ln(); } typedef - struct typedesc__5 *tag__4; + struct typedesc__11 *tag__10; typedef - struct typedesc__5 { + struct typedesc__11 { INT32 tag, next, level, module; CHAR name[24]; INT32 bases[16]; INT32 reserved, blksz, ptr0; - } typedesc__5; + } typedesc__11; -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +void Out_DumpTag (INT32 addr) { - INT32 addr; - tag__4 desc = NIL; + tag__10 desc = NIL; INT16 i; - __GET((ADDRESS)o - 4, addr, INT32); - Out_String((CHAR*)"obj tag: ", 11); + Out_String((CHAR*)" obj tag: ", 17); Out_Hex(addr, 1); Out_Ln(); addr -= __MASK(addr, -2); - desc = (tag__4)(ADDRESS)(addr - 108); - Out_String((CHAR*)"desc at: ", 11); + desc = (tag__10)(ADDRESS)(addr - 108); + Out_String((CHAR*)" desc at: ", 17); Out_Hex((INT32)(ADDRESS)desc, 1); Out_Ln(); - Out_String((CHAR*)"desc contains:", 15); + Out_String((CHAR*)" desc contains:", 21); Out_Ln(); - Out_String((CHAR*)"tag: ", 11); + Out_String((CHAR*)" tag: ", 17); Out_Hex(desc->tag, 1); Out_Ln(); - Out_String((CHAR*)"next: ", 11); + Out_String((CHAR*)" next: ", 17); Out_Hex(desc->next, 1); Out_Ln(); - Out_String((CHAR*)"level: ", 11); + Out_String((CHAR*)" level: ", 17); Out_Hex(desc->level, 1); Out_Ln(); - Out_String((CHAR*)"module: ", 11); + Out_String((CHAR*)" module: ", 17); Out_Hex(desc->module, 1); Out_Ln(); - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - Out_String((CHAR*)"name: ", 11); + if (desc->module != 0) { + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + } + Out_String((CHAR*)" name: ", 17); Out_String(desc->name, 24); Out_Ln(); - Out_String((CHAR*)"bases: ", 11); + Out_String((CHAR*)" bases: ", 17); i = 0; while (i < 16) { Out_Hex(desc->bases[__X(i, 16)], 8); if (__MASK(i, -4) == 3) { Out_Ln(); - Out_String((CHAR*)" ", 11); + Out_String((CHAR*)" ", 17); } else { Out_Char(' '); } i += 1; } Out_Ln(); - Out_String((CHAR*)"reserved: ", 11); + Out_String((CHAR*)" reserved: ", 17); Out_Hex(desc->reserved, 1); Out_Ln(); - Out_String((CHAR*)"blksz: ", 11); + Out_String((CHAR*)" blksz: ", 17); Out_Hex(desc->blksz, 1); Out_Ln(); - Out_String((CHAR*)"ptr0: ", 11); + Out_String((CHAR*)" ptr0: ", 17); Out_Hex(desc->ptr0, 1); Out_Ln(); } +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + __GET((ADDRESS)o - 4, addr, INT32); + Out_DumpTag(addr); +} + +typedef + INT32 (*adrptr__3)[1]; + +typedef + struct blockdesc__5 *block__4; + +typedef + struct blockdesc__5 { + INT32 tag, size, sentinel, next; + } blockdesc__5; + +typedef + struct chunkdesc__7 *chunk__6; + +typedef + struct chunkdesc__7 { + INT32 next, end, reserved; + blockdesc__5 firstblock; + } chunkdesc__7; + +void Out_DumpHeap (void) +{ + INT32 caddr; + chunk__6 c = NIL; + INT32 baddr; + block__4 b = NIL; + adrptr__3 tag = NIL; + caddr = Heap_heap; + while (caddr != 0) { + Out_String((CHAR*)"Chunk at: ", 11); + Out_Hex(caddr, 1); + Out_Ln(); + c = (chunk__6)(ADDRESS)caddr; + Out_String((CHAR*)" next: ", 11); + Out_Hex(c->next, 1); + Out_Ln(); + Out_String((CHAR*)" end: ", 11); + Out_Hex(c->end, 1); + Out_String((CHAR*)" => size: ", 11); + Out_Hex(c->end - caddr, 1); + Out_Ln(); + Out_String((CHAR*)" rsvd: ", 11); + Out_Hex(c->reserved, 1); + Out_Ln(); + baddr = (ADDRESS)&c->firstblock; + while (baddr < c->end) { + Out_String((CHAR*)" Block at: ", 15); + Out_Hex(baddr, 1); + Out_Ln(); + b = (block__4)(ADDRESS)baddr; + tag = (adrptr__3)(ADDRESS)b->tag; + Out_String((CHAR*)" tag: ", 15); + Out_Hex(b->tag, 1); + if (__MASK(b->tag, -2) != 0) { + Out_String((CHAR*)" <--- ODD! ---", 15); + } + Out_Ln(); + Out_String((CHAR*)" tag^: ", 15); + Out_Hex((*tag)[0], 1); + Out_Ln(); + Out_String((CHAR*)" size: ", 15); + Out_Hex(b->size, 1); + Out_Ln(); + Out_String((CHAR*)" sentinel: ", 15); + Out_Hex(b->sentinel, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 15); + Out_Hex(b->next, 1); + Out_Ln(); + if (b->tag != (ADDRESS)&b->size) { + Out_DumpTag(b->tag); + } + baddr += (*tag)[0]; + Out_Ln(); + } + caddr = c->next; + Out_Ln(); + } +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; +__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; +__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; +__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -481,10 +576,13 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); + __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__5, typedesc__5, 0); + __INITYP(typedesc__11, typedesc__11, 0); + __INITYP(blockdesc__5, blockdesc__5, 0); + __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0b3a93df..80673194 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpHeap (void); +import void Out_DumpTag (INT32 addr); import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index a825b8ec..9b35ef5a 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 5d752192..2b2fba4b 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 0a2d220b..55de7323 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 0c564f0e..0af8a733 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index ed806db0..909f5e88 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 93b62826..54ccc184 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index bbca112c..bc3411f2 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 04c8767a..208d1fe8 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index ed38e4dc..451af631 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 69601701..d4387f75 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 0b3a981e..83030d15 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 36571c99..0a7aceb7 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 65da2216..39819e0a 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 77782293..e391cd31 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 438fec28..5d106305 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 02716878..fb2ee9ee 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 2270fec0..5b6e66ef 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index c9adb169..0e9118e3 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,8 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +export INT32 Heap_heap; +static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 0df71d54..62f61978 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -46,7 +46,9 @@ typedef import SYSTEM_PTR Heap_modules; -import INT32 Heap_allocated, Heap_heapsize; +import INT32 Heap_allocated; +import INT32 Heap_heap; +import INT32 Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 03d205e0..529aeee2 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 3c1c580d..89339f66 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 7e558357..b5c4fd7d 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index b6d457bd..20372132 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index c09d2e6a..7848592a 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 7c47ed18..dff5b7ca 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index a3718f79..8017c2e7 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch) OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); Texts_DumpReader(OPM_inR); + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Heap dump:", 11); + OPM_LogWLn(); + Out_DumpHeap(); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 6d2755d8..59190332 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 5924f42f..d8d05354 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index c13a4e91..efff1781 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index ed3ea3a1..2d0304d5 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 6dae098c..e54474bc 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 6b6144fc..c9f40056 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 00094b66..d2ca1fae 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 7e829aa2..5597b3e3 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index f83e65fb..4e3573c7 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 6d72148a..dc9ab60c 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__5__typ; +static ADDRESS *typedesc__11__typ; +static ADDRESS *blockdesc__5__typ; +static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); +export void Out_DumpHeap (void); static void Out_DumpModule (Heap_Module m); +export void Out_DumpTag (INT32 addr); export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); @@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) +extern ADDRESS Heap_heap; +#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) static void Out_DumpModule (Heap_Module m) { - Out_String((CHAR*)" next: ", 13); + Out_String((CHAR*)" next: ", 19); Out_Hex((INT32)(ADDRESS)m->next, 1); Out_Ln(); - Out_String((CHAR*)" name: ", 13); + Out_String((CHAR*)" name: ", 19); Out_String(m->name, 20); Out_Ln(); - Out_String((CHAR*)" refcnt: ", 13); + Out_String((CHAR*)" refcnt: ", 19); Out_Hex(m->refcnt, 1); Out_Ln(); - Out_String((CHAR*)" cmds: ", 13); + Out_String((CHAR*)" cmds: ", 19); Out_Hex((INT32)(ADDRESS)m->cmds, 1); Out_Ln(); - Out_String((CHAR*)" types: ", 13); + Out_String((CHAR*)" types: ", 19); Out_Hex(m->types, 1); Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 13); + Out_String((CHAR*)" enumPtrs: ", 19); Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); Out_Ln(); } typedef - struct typedesc__5 *tag__4; + struct typedesc__11 *tag__10; typedef - struct typedesc__5 { + struct typedesc__11 { INT32 tag, next, level, module; CHAR name[24]; INT32 bases[16]; INT32 reserved, blksz, ptr0; - } typedesc__5; + } typedesc__11; -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +void Out_DumpTag (INT32 addr) { - INT32 addr; - tag__4 desc = NIL; + tag__10 desc = NIL; INT16 i; - __GET((ADDRESS)o - 4, addr, INT32); - Out_String((CHAR*)"obj tag: ", 11); + Out_String((CHAR*)" obj tag: ", 17); Out_Hex(addr, 1); Out_Ln(); addr -= __MASK(addr, -2); - desc = (tag__4)(ADDRESS)(addr - 108); - Out_String((CHAR*)"desc at: ", 11); + desc = (tag__10)(ADDRESS)(addr - 108); + Out_String((CHAR*)" desc at: ", 17); Out_Hex((INT32)(ADDRESS)desc, 1); Out_Ln(); - Out_String((CHAR*)"desc contains:", 15); + Out_String((CHAR*)" desc contains:", 21); Out_Ln(); - Out_String((CHAR*)"tag: ", 11); + Out_String((CHAR*)" tag: ", 17); Out_Hex(desc->tag, 1); Out_Ln(); - Out_String((CHAR*)"next: ", 11); + Out_String((CHAR*)" next: ", 17); Out_Hex(desc->next, 1); Out_Ln(); - Out_String((CHAR*)"level: ", 11); + Out_String((CHAR*)" level: ", 17); Out_Hex(desc->level, 1); Out_Ln(); - Out_String((CHAR*)"module: ", 11); + Out_String((CHAR*)" module: ", 17); Out_Hex(desc->module, 1); Out_Ln(); - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - Out_String((CHAR*)"name: ", 11); + if (desc->module != 0) { + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + } + Out_String((CHAR*)" name: ", 17); Out_String(desc->name, 24); Out_Ln(); - Out_String((CHAR*)"bases: ", 11); + Out_String((CHAR*)" bases: ", 17); i = 0; while (i < 16) { Out_Hex(desc->bases[__X(i, 16)], 8); if (__MASK(i, -4) == 3) { Out_Ln(); - Out_String((CHAR*)" ", 11); + Out_String((CHAR*)" ", 17); } else { Out_Char(' '); } i += 1; } Out_Ln(); - Out_String((CHAR*)"reserved: ", 11); + Out_String((CHAR*)" reserved: ", 17); Out_Hex(desc->reserved, 1); Out_Ln(); - Out_String((CHAR*)"blksz: ", 11); + Out_String((CHAR*)" blksz: ", 17); Out_Hex(desc->blksz, 1); Out_Ln(); - Out_String((CHAR*)"ptr0: ", 11); + Out_String((CHAR*)" ptr0: ", 17); Out_Hex(desc->ptr0, 1); Out_Ln(); } +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + __GET((ADDRESS)o - 4, addr, INT32); + Out_DumpTag(addr); +} + +typedef + INT32 (*adrptr__3)[1]; + +typedef + struct blockdesc__5 *block__4; + +typedef + struct blockdesc__5 { + INT32 tag, size, sentinel, next; + } blockdesc__5; + +typedef + struct chunkdesc__7 *chunk__6; + +typedef + struct chunkdesc__7 { + INT32 next, end, reserved; + blockdesc__5 firstblock; + } chunkdesc__7; + +void Out_DumpHeap (void) +{ + INT32 caddr; + chunk__6 c = NIL; + INT32 baddr; + block__4 b = NIL; + adrptr__3 tag = NIL; + caddr = Heap_heap; + while (caddr != 0) { + Out_String((CHAR*)"Chunk at: ", 11); + Out_Hex(caddr, 1); + Out_Ln(); + c = (chunk__6)(ADDRESS)caddr; + Out_String((CHAR*)" next: ", 11); + Out_Hex(c->next, 1); + Out_Ln(); + Out_String((CHAR*)" end: ", 11); + Out_Hex(c->end, 1); + Out_String((CHAR*)" => size: ", 11); + Out_Hex(c->end - caddr, 1); + Out_Ln(); + Out_String((CHAR*)" rsvd: ", 11); + Out_Hex(c->reserved, 1); + Out_Ln(); + baddr = (ADDRESS)&c->firstblock; + while (baddr < c->end) { + Out_String((CHAR*)" Block at: ", 15); + Out_Hex(baddr, 1); + Out_Ln(); + b = (block__4)(ADDRESS)baddr; + tag = (adrptr__3)(ADDRESS)b->tag; + Out_String((CHAR*)" tag: ", 15); + Out_Hex(b->tag, 1); + if (__MASK(b->tag, -2) != 0) { + Out_String((CHAR*)" <--- ODD! ---", 15); + } + Out_Ln(); + Out_String((CHAR*)" tag^: ", 15); + Out_Hex((*tag)[0], 1); + Out_Ln(); + Out_String((CHAR*)" size: ", 15); + Out_Hex(b->size, 1); + Out_Ln(); + Out_String((CHAR*)" sentinel: ", 15); + Out_Hex(b->sentinel, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 15); + Out_Hex(b->next, 1); + Out_Ln(); + if (b->tag != (ADDRESS)&b->size) { + Out_DumpTag(b->tag); + } + baddr += (*tag)[0]; + Out_Ln(); + } + caddr = c->next; + Out_Ln(); + } +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; +__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; +__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; +__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -481,10 +576,13 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); + __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__5, typedesc__5, 0); + __INITYP(typedesc__11, typedesc__11, 0); + __INITYP(blockdesc__5, blockdesc__5, 0); + __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0b3a93df..80673194 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpHeap (void); +import void Out_DumpTag (INT32 addr); import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index a825b8ec..9b35ef5a 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 5d752192..2b2fba4b 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 0a2d220b..55de7323 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 0c564f0e..0af8a733 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index ed806db0..909f5e88 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 93b62826..54ccc184 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index a91fe173..5df0abaa 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 24dacf51..d7570ee1 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index ed38e4dc..451af631 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 69601701..d4387f75 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 0b3a981e..83030d15 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 36571c99..0a7aceb7 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 65da2216..39819e0a 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 77782293..e391cd31 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 438fec28..5d106305 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index bed555a5..ead3b170 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index ba436b23..6ff0de64 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 3e929c3a..769d2d6b 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,8 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +export INT64 Heap_heap; +static INT64 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index b2018428..26424f29 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -46,7 +46,9 @@ typedef import SYSTEM_PTR Heap_modules; -import INT64 Heap_allocated, Heap_heapsize; +import INT64 Heap_allocated; +import INT64 Heap_heap; +import INT64 Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 884c7b0e..82b56235 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index e5803d29..f82ccfd0 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 7e558357..b5c4fd7d 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index b6d457bd..20372132 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index c09d2e6a..7848592a 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 7c47ed18..dff5b7ca 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index e3e6f1fe..faf1ba5e 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch) OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); Texts_DumpReader(OPM_inR); + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Heap dump:", 11); + OPM_LogWLn(); + Out_DumpHeap(); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 6d2755d8..59190332 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index dc87be62..94982bd2 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index c13a4e91..efff1781 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index ed3ea3a1..2d0304d5 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 6dae098c..e54474bc 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 25e2e7c2..46bd1072 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 00094b66..d2ca1fae 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index c88953f2..a3223212 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index f83e65fb..4e3573c7 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 67eaad85..5b315327 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__5__typ; +static ADDRESS *typedesc__11__typ; +static ADDRESS *blockdesc__5__typ; +static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); +export void Out_DumpHeap (void); static void Out_DumpModule (Heap_Module m); +export void Out_DumpTag (INT64 addr); export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); @@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) +extern ADDRESS Heap_heap; +#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) static void Out_DumpModule (Heap_Module m) { - Out_String((CHAR*)" next: ", 13); + Out_String((CHAR*)" next: ", 19); Out_Hex((INT64)(ADDRESS)m->next, 1); Out_Ln(); - Out_String((CHAR*)" name: ", 13); + Out_String((CHAR*)" name: ", 19); Out_String(m->name, 20); Out_Ln(); - Out_String((CHAR*)" refcnt: ", 13); + Out_String((CHAR*)" refcnt: ", 19); Out_Hex(m->refcnt, 1); Out_Ln(); - Out_String((CHAR*)" cmds: ", 13); + Out_String((CHAR*)" cmds: ", 19); Out_Hex((INT64)(ADDRESS)m->cmds, 1); Out_Ln(); - Out_String((CHAR*)" types: ", 13); + Out_String((CHAR*)" types: ", 19); Out_Hex(m->types, 1); Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 13); + Out_String((CHAR*)" enumPtrs: ", 19); Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); Out_Ln(); } typedef - struct typedesc__5 *tag__4; + struct typedesc__11 *tag__10; typedef - struct typedesc__5 { + struct typedesc__11 { INT64 tag, next, level, module; CHAR name[24]; INT64 bases[16]; INT64 reserved, blksz, ptr0; - } typedesc__5; + } typedesc__11; -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +void Out_DumpTag (INT64 addr) { - INT64 addr; - tag__4 desc = NIL; + tag__10 desc = NIL; INT16 i; - __GET((ADDRESS)o - 8, addr, INT64); - Out_String((CHAR*)"obj tag: ", 11); + Out_String((CHAR*)" obj tag: ", 17); Out_Hex(addr, 1); Out_Ln(); addr -= __MASK(addr, -2); - desc = (tag__4)(ADDRESS)(addr - 192); - Out_String((CHAR*)"desc at: ", 11); + desc = (tag__10)(ADDRESS)(addr - 192); + Out_String((CHAR*)" desc at: ", 17); Out_Hex((INT64)(ADDRESS)desc, 1); Out_Ln(); - Out_String((CHAR*)"desc contains:", 15); + Out_String((CHAR*)" desc contains:", 21); Out_Ln(); - Out_String((CHAR*)"tag: ", 11); + Out_String((CHAR*)" tag: ", 17); Out_Hex(desc->tag, 1); Out_Ln(); - Out_String((CHAR*)"next: ", 11); + Out_String((CHAR*)" next: ", 17); Out_Hex(desc->next, 1); Out_Ln(); - Out_String((CHAR*)"level: ", 11); + Out_String((CHAR*)" level: ", 17); Out_Hex(desc->level, 1); Out_Ln(); - Out_String((CHAR*)"module: ", 11); + Out_String((CHAR*)" module: ", 17); Out_Hex(desc->module, 1); Out_Ln(); - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - Out_String((CHAR*)"name: ", 11); + if (desc->module != 0) { + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + } + Out_String((CHAR*)" name: ", 17); Out_String(desc->name, 24); Out_Ln(); - Out_String((CHAR*)"bases: ", 11); + Out_String((CHAR*)" bases: ", 17); i = 0; while (i < 16) { Out_Hex(desc->bases[__X(i, 16)], 16); if (__MASK(i, -4) == 3) { Out_Ln(); - Out_String((CHAR*)" ", 11); + Out_String((CHAR*)" ", 17); } else { Out_Char(' '); } i += 1; } Out_Ln(); - Out_String((CHAR*)"reserved: ", 11); + Out_String((CHAR*)" reserved: ", 17); Out_Hex(desc->reserved, 1); Out_Ln(); - Out_String((CHAR*)"blksz: ", 11); + Out_String((CHAR*)" blksz: ", 17); Out_Hex(desc->blksz, 1); Out_Ln(); - Out_String((CHAR*)"ptr0: ", 11); + Out_String((CHAR*)" ptr0: ", 17); Out_Hex(desc->ptr0, 1); Out_Ln(); } +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT64 addr; + __GET((ADDRESS)o - 8, addr, INT64); + Out_DumpTag(addr); +} + +typedef + INT64 (*adrptr__3)[1]; + +typedef + struct blockdesc__5 *block__4; + +typedef + struct blockdesc__5 { + INT64 tag, size, sentinel, next; + } blockdesc__5; + +typedef + struct chunkdesc__7 *chunk__6; + +typedef + struct chunkdesc__7 { + INT64 next, end, reserved; + blockdesc__5 firstblock; + } chunkdesc__7; + +void Out_DumpHeap (void) +{ + INT64 caddr; + chunk__6 c = NIL; + INT64 baddr; + block__4 b = NIL; + adrptr__3 tag = NIL; + caddr = Heap_heap; + while (caddr != 0) { + Out_String((CHAR*)"Chunk at: ", 11); + Out_Hex(caddr, 1); + Out_Ln(); + c = (chunk__6)(ADDRESS)caddr; + Out_String((CHAR*)" next: ", 11); + Out_Hex(c->next, 1); + Out_Ln(); + Out_String((CHAR*)" end: ", 11); + Out_Hex(c->end, 1); + Out_String((CHAR*)" => size: ", 11); + Out_Hex(c->end - caddr, 1); + Out_Ln(); + Out_String((CHAR*)" rsvd: ", 11); + Out_Hex(c->reserved, 1); + Out_Ln(); + baddr = (ADDRESS)&c->firstblock; + while (baddr < c->end) { + Out_String((CHAR*)" Block at: ", 15); + Out_Hex(baddr, 1); + Out_Ln(); + b = (block__4)(ADDRESS)baddr; + tag = (adrptr__3)(ADDRESS)b->tag; + Out_String((CHAR*)" tag: ", 15); + Out_Hex(b->tag, 1); + if (__MASK(b->tag, -2) != 0) { + Out_String((CHAR*)" <--- ODD! ---", 15); + } + Out_Ln(); + Out_String((CHAR*)" tag^: ", 15); + Out_Hex((*tag)[0], 1); + Out_Ln(); + Out_String((CHAR*)" size: ", 15); + Out_Hex(b->size, 1); + Out_Ln(); + Out_String((CHAR*)" sentinel: ", 15); + Out_Hex(b->sentinel, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 15); + Out_Hex(b->next, 1); + Out_Ln(); + if (b->tag != (ADDRESS)&b->size) { + Out_DumpTag(b->tag); + } + baddr += (*tag)[0]; + Out_Ln(); + } + caddr = c->next; + Out_Ln(); + } +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 208), {-8}}; +__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 208), {-8}}; +__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 32), {-8}}; +__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 56), {-8}}; export void *Out__init(void) { @@ -481,10 +576,13 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); + __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__5, typedesc__5, 0); + __INITYP(typedesc__11, typedesc__11, 0); + __INITYP(blockdesc__5, blockdesc__5, 0); + __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0126ef62..42ae59ed 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpHeap (void); +import void Out_DumpTag (INT64 addr); import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index d695bda2..ef72c3b2 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 741cf3f7..fbc0ebdd 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 0a2d220b..55de7323 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 0c564f0e..0af8a733 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index ed806db0..909f5e88 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 93b62826..54ccc184 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index bd19d27b..6447e8ae 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 2cf87339..ff036fdd 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index ed38e4dc..451af631 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 69601701..d4387f75 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 0b3a981e..83030d15 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 36571c99..0a7aceb7 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 65da2216..39819e0a 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 77782293..e391cd31 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 438fec28..5d106305 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index b4133ede..1193b13c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 7aaa4f5a..7571e510 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index c9adb169..0e9118e3 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,8 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT32 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +export INT32 Heap_heap; +static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 0df71d54..62f61978 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -46,7 +46,9 @@ typedef import SYSTEM_PTR Heap_modules; -import INT32 Heap_allocated, Heap_heapsize; +import INT32 Heap_allocated; +import INT32 Heap_heap; +import INT32 Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 6d8570ec..e5fe836e 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 3c1c580d..89339f66 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 7e558357..b5c4fd7d 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index b6d457bd..20372132 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index c09d2e6a..7848592a 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 7c47ed18..dff5b7ca 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index a3718f79..8017c2e7 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch) OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); Texts_DumpReader(OPM_inR); + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Heap dump:", 11); + OPM_LogWLn(); + Out_DumpHeap(); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 6d2755d8..59190332 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 5924f42f..d8d05354 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index c13a4e91..efff1781 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index ed3ea3a1..2d0304d5 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 6dae098c..e54474bc 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 6b6144fc..c9f40056 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 00094b66..d2ca1fae 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 7e829aa2..5597b3e3 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index f83e65fb..4e3573c7 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index f792315a..f215ffaf 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__5__typ; +static ADDRESS *typedesc__11__typ; +static ADDRESS *blockdesc__5__typ; +static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); +export void Out_DumpHeap (void); static void Out_DumpModule (Heap_Module m); +export void Out_DumpTag (INT32 addr); export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); @@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) +extern ADDRESS Heap_heap; +#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) static void Out_DumpModule (Heap_Module m) { - Out_String((CHAR*)" next: ", 13); + Out_String((CHAR*)" next: ", 19); Out_Hex((INT32)(ADDRESS)m->next, 1); Out_Ln(); - Out_String((CHAR*)" name: ", 13); + Out_String((CHAR*)" name: ", 19); Out_String(m->name, 20); Out_Ln(); - Out_String((CHAR*)" refcnt: ", 13); + Out_String((CHAR*)" refcnt: ", 19); Out_Hex(m->refcnt, 1); Out_Ln(); - Out_String((CHAR*)" cmds: ", 13); + Out_String((CHAR*)" cmds: ", 19); Out_Hex((INT32)(ADDRESS)m->cmds, 1); Out_Ln(); - Out_String((CHAR*)" types: ", 13); + Out_String((CHAR*)" types: ", 19); Out_Hex(m->types, 1); Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 13); + Out_String((CHAR*)" enumPtrs: ", 19); Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); Out_Ln(); } typedef - struct typedesc__5 *tag__4; + struct typedesc__11 *tag__10; typedef - struct typedesc__5 { + struct typedesc__11 { INT32 tag, next, level, module; CHAR name[24]; INT32 bases[16]; INT32 reserved, blksz, ptr0; - } typedesc__5; + } typedesc__11; -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +void Out_DumpTag (INT32 addr) { - INT32 addr; - tag__4 desc = NIL; + tag__10 desc = NIL; INT16 i; - __GET((ADDRESS)o - 4, addr, INT32); - Out_String((CHAR*)"obj tag: ", 11); + Out_String((CHAR*)" obj tag: ", 17); Out_Hex(addr, 1); Out_Ln(); addr -= __MASK(addr, -2); - desc = (tag__4)(ADDRESS)(addr - 108); - Out_String((CHAR*)"desc at: ", 11); + desc = (tag__10)(ADDRESS)(addr - 108); + Out_String((CHAR*)" desc at: ", 17); Out_Hex((INT32)(ADDRESS)desc, 1); Out_Ln(); - Out_String((CHAR*)"desc contains:", 15); + Out_String((CHAR*)" desc contains:", 21); Out_Ln(); - Out_String((CHAR*)"tag: ", 11); + Out_String((CHAR*)" tag: ", 17); Out_Hex(desc->tag, 1); Out_Ln(); - Out_String((CHAR*)"next: ", 11); + Out_String((CHAR*)" next: ", 17); Out_Hex(desc->next, 1); Out_Ln(); - Out_String((CHAR*)"level: ", 11); + Out_String((CHAR*)" level: ", 17); Out_Hex(desc->level, 1); Out_Ln(); - Out_String((CHAR*)"module: ", 11); + Out_String((CHAR*)" module: ", 17); Out_Hex(desc->module, 1); Out_Ln(); - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - Out_String((CHAR*)"name: ", 11); + if (desc->module != 0) { + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + } + Out_String((CHAR*)" name: ", 17); Out_String(desc->name, 24); Out_Ln(); - Out_String((CHAR*)"bases: ", 11); + Out_String((CHAR*)" bases: ", 17); i = 0; while (i < 16) { Out_Hex(desc->bases[__X(i, 16)], 8); if (__MASK(i, -4) == 3) { Out_Ln(); - Out_String((CHAR*)" ", 11); + Out_String((CHAR*)" ", 17); } else { Out_Char(' '); } i += 1; } Out_Ln(); - Out_String((CHAR*)"reserved: ", 11); + Out_String((CHAR*)" reserved: ", 17); Out_Hex(desc->reserved, 1); Out_Ln(); - Out_String((CHAR*)"blksz: ", 11); + Out_String((CHAR*)" blksz: ", 17); Out_Hex(desc->blksz, 1); Out_Ln(); - Out_String((CHAR*)"ptr0: ", 11); + Out_String((CHAR*)" ptr0: ", 17); Out_Hex(desc->ptr0, 1); Out_Ln(); } +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT32 addr; + __GET((ADDRESS)o - 4, addr, INT32); + Out_DumpTag(addr); +} + +typedef + INT32 (*adrptr__3)[1]; + +typedef + struct blockdesc__5 *block__4; + +typedef + struct blockdesc__5 { + INT32 tag, size, sentinel, next; + } blockdesc__5; + +typedef + struct chunkdesc__7 *chunk__6; + +typedef + struct chunkdesc__7 { + INT32 next, end, reserved; + blockdesc__5 firstblock; + } chunkdesc__7; + +void Out_DumpHeap (void) +{ + INT32 caddr; + chunk__6 c = NIL; + INT32 baddr; + block__4 b = NIL; + adrptr__3 tag = NIL; + caddr = Heap_heap; + while (caddr != 0) { + Out_String((CHAR*)"Chunk at: ", 11); + Out_Hex(caddr, 1); + Out_Ln(); + c = (chunk__6)(ADDRESS)caddr; + Out_String((CHAR*)" next: ", 11); + Out_Hex(c->next, 1); + Out_Ln(); + Out_String((CHAR*)" end: ", 11); + Out_Hex(c->end, 1); + Out_String((CHAR*)" => size: ", 11); + Out_Hex(c->end - caddr, 1); + Out_Ln(); + Out_String((CHAR*)" rsvd: ", 11); + Out_Hex(c->reserved, 1); + Out_Ln(); + baddr = (ADDRESS)&c->firstblock; + while (baddr < c->end) { + Out_String((CHAR*)" Block at: ", 15); + Out_Hex(baddr, 1); + Out_Ln(); + b = (block__4)(ADDRESS)baddr; + tag = (adrptr__3)(ADDRESS)b->tag; + Out_String((CHAR*)" tag: ", 15); + Out_Hex(b->tag, 1); + if (__MASK(b->tag, -2) != 0) { + Out_String((CHAR*)" <--- ODD! ---", 15); + } + Out_Ln(); + Out_String((CHAR*)" tag^: ", 15); + Out_Hex((*tag)[0], 1); + Out_Ln(); + Out_String((CHAR*)" size: ", 15); + Out_Hex(b->size, 1); + Out_Ln(); + Out_String((CHAR*)" sentinel: ", 15); + Out_Hex(b->sentinel, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 15); + Out_Hex(b->next, 1); + Out_Ln(); + if (b->tag != (ADDRESS)&b->size) { + Out_DumpTag(b->tag); + } + baddr += (*tag)[0]; + Out_Ln(); + } + caddr = c->next; + Out_Ln(); + } +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 116), {-4}}; +__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; +__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; +__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -481,10 +576,13 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); + __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__5, typedesc__5, 0); + __INITYP(typedesc__11, typedesc__11, 0); + __INITYP(blockdesc__5, blockdesc__5, 0); + __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0b3a93df..80673194 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpHeap (void); +import void Out_DumpTag (INT32 addr); import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 661a3ff4..1e35e805 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 68347c6c..3362fba3 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 0a2d220b..55de7323 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 0c564f0e..0af8a733 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index ed806db0..909f5e88 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 93b62826..54ccc184 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index a91fe173..5df0abaa 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 24dacf51..d7570ee1 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index ed38e4dc..451af631 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 69601701..d4387f75 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 0b3a981e..83030d15 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 36571c99..0a7aceb7 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 65da2216..39819e0a 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 77782293..e391cd31 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 438fec28..5d106305 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 1c505c07..8dce3c01 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 337b30b5..32786d38 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 3e929c3a..769d2d6b 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,7 +68,8 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; -static INT64 Heap_heap, Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +export INT64 Heap_heap; +static INT64 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index b2018428..26424f29 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -46,7 +46,9 @@ typedef import SYSTEM_PTR Heap_modules; -import INT64 Heap_allocated, Heap_heapsize; +import INT64 Heap_allocated; +import INT64 Heap_heap; +import INT64 Heap_heapsize; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 6e92bf1e..d3c5d8d1 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index e5803d29..f82ccfd0 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 7e558357..b5c4fd7d 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index b6d457bd..20372132 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index c09d2e6a..7848592a 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 7c47ed18..dff5b7ca 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index e3e6f1fe..faf1ba5e 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -495,6 +495,10 @@ void OPM_Get (CHAR *ch) OPM_LogWNum((INT16)*ch, 1); OPM_LogW('.'); Texts_DumpReader(OPM_inR); + OPM_LogWLn(); + OPM_LogWStr((CHAR*)"Heap dump:", 11); + OPM_LogWLn(); + Out_DumpHeap(); } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 6d2755d8..59190332 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index dc87be62..94982bd2 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index c13a4e91..efff1781 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index ed3ea3a1..2d0304d5 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 6dae098c..e54474bc 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 25e2e7c2..46bd1072 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 00094b66..d2ca1fae 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index c88953f2..a3223212 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index f83e65fb..4e3573c7 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d0afc5be..e8d8713a 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,10 +14,14 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__5__typ; +static ADDRESS *typedesc__11__typ; +static ADDRESS *blockdesc__5__typ; +static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); +export void Out_DumpHeap (void); static void Out_DumpModule (Heap_Module m); +export void Out_DumpTag (INT64 addr); export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); @@ -36,6 +40,8 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) +extern ADDRESS Heap_heap; +#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -209,93 +215,180 @@ void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) static void Out_DumpModule (Heap_Module m) { - Out_String((CHAR*)" next: ", 13); + Out_String((CHAR*)" next: ", 19); Out_Hex((INT64)(ADDRESS)m->next, 1); Out_Ln(); - Out_String((CHAR*)" name: ", 13); + Out_String((CHAR*)" name: ", 19); Out_String(m->name, 20); Out_Ln(); - Out_String((CHAR*)" refcnt: ", 13); + Out_String((CHAR*)" refcnt: ", 19); Out_Hex(m->refcnt, 1); Out_Ln(); - Out_String((CHAR*)" cmds: ", 13); + Out_String((CHAR*)" cmds: ", 19); Out_Hex((INT64)(ADDRESS)m->cmds, 1); Out_Ln(); - Out_String((CHAR*)" types: ", 13); + Out_String((CHAR*)" types: ", 19); Out_Hex(m->types, 1); Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 13); + Out_String((CHAR*)" enumPtrs: ", 19); Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); Out_Ln(); } typedef - struct typedesc__5 *tag__4; + struct typedesc__11 *tag__10; typedef - struct typedesc__5 { + struct typedesc__11 { INT64 tag, next, level, module; CHAR name[24]; INT64 bases[16]; INT64 reserved, blksz, ptr0; - } typedesc__5; + } typedesc__11; -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +void Out_DumpTag (INT64 addr) { - INT64 addr; - tag__4 desc = NIL; + tag__10 desc = NIL; INT16 i; - __GET((ADDRESS)o - 8, addr, INT64); - Out_String((CHAR*)"obj tag: ", 11); + Out_String((CHAR*)" obj tag: ", 17); Out_Hex(addr, 1); Out_Ln(); addr -= __MASK(addr, -2); - desc = (tag__4)(ADDRESS)(addr - 192); - Out_String((CHAR*)"desc at: ", 11); + desc = (tag__10)(ADDRESS)(addr - 192); + Out_String((CHAR*)" desc at: ", 17); Out_Hex((INT64)(ADDRESS)desc, 1); Out_Ln(); - Out_String((CHAR*)"desc contains:", 15); + Out_String((CHAR*)" desc contains:", 21); Out_Ln(); - Out_String((CHAR*)"tag: ", 11); + Out_String((CHAR*)" tag: ", 17); Out_Hex(desc->tag, 1); Out_Ln(); - Out_String((CHAR*)"next: ", 11); + Out_String((CHAR*)" next: ", 17); Out_Hex(desc->next, 1); Out_Ln(); - Out_String((CHAR*)"level: ", 11); + Out_String((CHAR*)" level: ", 17); Out_Hex(desc->level, 1); Out_Ln(); - Out_String((CHAR*)"module: ", 11); + Out_String((CHAR*)" module: ", 17); Out_Hex(desc->module, 1); Out_Ln(); - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - Out_String((CHAR*)"name: ", 11); + if (desc->module != 0) { + Out_DumpModule((Heap_Module)(ADDRESS)desc->module); + } + Out_String((CHAR*)" name: ", 17); Out_String(desc->name, 24); Out_Ln(); - Out_String((CHAR*)"bases: ", 11); + Out_String((CHAR*)" bases: ", 17); i = 0; while (i < 16) { Out_Hex(desc->bases[__X(i, 16)], 16); if (__MASK(i, -4) == 3) { Out_Ln(); - Out_String((CHAR*)" ", 11); + Out_String((CHAR*)" ", 17); } else { Out_Char(' '); } i += 1; } Out_Ln(); - Out_String((CHAR*)"reserved: ", 11); + Out_String((CHAR*)" reserved: ", 17); Out_Hex(desc->reserved, 1); Out_Ln(); - Out_String((CHAR*)"blksz: ", 11); + Out_String((CHAR*)" blksz: ", 17); Out_Hex(desc->blksz, 1); Out_Ln(); - Out_String((CHAR*)"ptr0: ", 11); + Out_String((CHAR*)" ptr0: ", 17); Out_Hex(desc->ptr0, 1); Out_Ln(); } +void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) +{ + INT64 addr; + __GET((ADDRESS)o - 8, addr, INT64); + Out_DumpTag(addr); +} + +typedef + INT64 (*adrptr__3)[1]; + +typedef + struct blockdesc__5 *block__4; + +typedef + struct blockdesc__5 { + INT64 tag, size, sentinel, next; + } blockdesc__5; + +typedef + struct chunkdesc__7 *chunk__6; + +typedef + struct chunkdesc__7 { + INT64 next, end, reserved; + blockdesc__5 firstblock; + } chunkdesc__7; + +void Out_DumpHeap (void) +{ + INT64 caddr; + chunk__6 c = NIL; + INT64 baddr; + block__4 b = NIL; + adrptr__3 tag = NIL; + caddr = Heap_heap; + while (caddr != 0) { + Out_String((CHAR*)"Chunk at: ", 11); + Out_Hex(caddr, 1); + Out_Ln(); + c = (chunk__6)(ADDRESS)caddr; + Out_String((CHAR*)" next: ", 11); + Out_Hex(c->next, 1); + Out_Ln(); + Out_String((CHAR*)" end: ", 11); + Out_Hex(c->end, 1); + Out_String((CHAR*)" => size: ", 11); + Out_Hex(c->end - caddr, 1); + Out_Ln(); + Out_String((CHAR*)" rsvd: ", 11); + Out_Hex(c->reserved, 1); + Out_Ln(); + baddr = (ADDRESS)&c->firstblock; + while (baddr < c->end) { + Out_String((CHAR*)" Block at: ", 15); + Out_Hex(baddr, 1); + Out_Ln(); + b = (block__4)(ADDRESS)baddr; + tag = (adrptr__3)(ADDRESS)b->tag; + Out_String((CHAR*)" tag: ", 15); + Out_Hex(b->tag, 1); + if (__MASK(b->tag, -2) != 0) { + Out_String((CHAR*)" <--- ODD! ---", 15); + } + Out_Ln(); + Out_String((CHAR*)" tag^: ", 15); + Out_Hex((*tag)[0], 1); + Out_Ln(); + Out_String((CHAR*)" size: ", 15); + Out_Hex(b->size, 1); + Out_Ln(); + Out_String((CHAR*)" sentinel: ", 15); + Out_Hex(b->sentinel, 1); + Out_Ln(); + Out_String((CHAR*)" next: ", 15); + Out_Hex(b->next, 1); + Out_Ln(); + if (b->tag != (ADDRESS)&b->size) { + Out_DumpTag(b->tag); + } + baddr += (*tag)[0]; + Out_Ln(); + } + caddr = c->next; + Out_Ln(); + } +} + static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -473,7 +566,9 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__5, 1, 0) = {__TDFLDS("typedesc__5", 208), {-8}}; +__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 208), {-8}}; +__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 32), {-8}}; +__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 56), {-8}}; export void *Out__init(void) { @@ -481,10 +576,13 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); + __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__5, typedesc__5, 0); + __INITYP(typedesc__11, typedesc__11, 0); + __INITYP(blockdesc__5, blockdesc__5, 0); + __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0126ef62..42ae59ed 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,6 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); +import void Out_DumpHeap (void); +import void Out_DumpTag (INT64 addr); import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 59a4d3a4..53d2232c 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 787e2dc2..e2b27d76 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 0a2d220b..55de7323 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 0c564f0e..0af8a733 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index ed806db0..909f5e88 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 93b62826..54ccc184 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index bd19d27b..6447e8ae 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 2cf87339..ff036fdd 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index ed38e4dc..451af631 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 69601701..d4387f75 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 0b3a981e..83030d15 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 36571c99..0a7aceb7 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/12]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 30bae1a62271f4c4a131d75d8f0675c2778c308c Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:42:16 +0000 Subject: [PATCH 087/241] Fix dump of chunk that crosses +ve to -ve address. Could this be the underlying issue in Heap? --- src/runtime/Out.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 63a22ada..c338fb16 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -210,7 +210,7 @@ BEGIN String(" rsvd: "); Hex(c.reserved, 1); Ln; baddr := SYSTEM.ADR(c.firstblock); - WHILE baddr < c.end DO + WHILE c.end - baddr > 0 DO String(" Block at: "); Hex(baddr, 1); Ln; b := SYSTEM.VAL(block, baddr); tag := SYSTEM.VAL(adrptr, b.tag); From d4c5d6397892813003822f28890a77be73b4ed47 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:43:20 +0000 Subject: [PATCH 088/241] Update bootstrap C sources. --- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-88/Out.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index dc9ab60c..090b2c81 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -354,7 +354,7 @@ void Out_DumpHeap (void) Out_Hex(c->reserved, 1); Out_Ln(); baddr = (ADDRESS)&c->firstblock; - while (baddr < c->end) { + while (c->end - baddr > 0) { Out_String((CHAR*)" Block at: ", 15); Out_Hex(baddr, 1); Out_Ln(); diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index dc9ab60c..090b2c81 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -354,7 +354,7 @@ void Out_DumpHeap (void) Out_Hex(c->reserved, 1); Out_Ln(); baddr = (ADDRESS)&c->firstblock; - while (baddr < c->end) { + while (c->end - baddr > 0) { Out_String((CHAR*)" Block at: ", 15); Out_Hex(baddr, 1); Out_Ln(); diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 5b315327..d0223799 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -354,7 +354,7 @@ void Out_DumpHeap (void) Out_Hex(c->reserved, 1); Out_Ln(); baddr = (ADDRESS)&c->firstblock; - while (baddr < c->end) { + while (c->end - baddr > 0) { Out_String((CHAR*)" Block at: ", 15); Out_Hex(baddr, 1); Out_Ln(); diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index f215ffaf..ef5d74e5 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -354,7 +354,7 @@ void Out_DumpHeap (void) Out_Hex(c->reserved, 1); Out_Ln(); baddr = (ADDRESS)&c->firstblock; - while (baddr < c->end) { + while (c->end - baddr > 0) { Out_String((CHAR*)" Block at: ", 15); Out_Hex(baddr, 1); Out_Ln(); diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index e8d8713a..bbb5de28 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -354,7 +354,7 @@ void Out_DumpHeap (void) Out_Hex(c->reserved, 1); Out_Ln(); baddr = (ADDRESS)&c->firstblock; - while (baddr < c->end) { + while (c->end - baddr > 0) { Out_String((CHAR*)" Block at: ", 15); Out_Hex(baddr, 1); Out_Ln(); From 85eeef6ae408f8fc80e58feb57ec6ea401649f46 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:52:42 +0000 Subject: [PATCH 089/241] Supportix dump of block with uncleared GC flag in bit 0 of tag. --- src/runtime/Out.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index c338fb16..26decdb1 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -213,7 +213,7 @@ BEGIN WHILE c.end - baddr > 0 DO String(" Block at: "); Hex(baddr, 1); Ln; b := SYSTEM.VAL(block, baddr); - tag := SYSTEM.VAL(adrptr, b.tag); + tag := SYSTEM.VAL(adrptr, b.tag - (b.tag MOD 2)); (* mask out heap management flag in bit 0. *) String(" tag: "); Hex(b.tag, 1); IF b.tag MOD 2 # 0 THEN String(" <--- ODD! ---") END; Ln; String(" tag^: "); Hex(tag^[0], 1); Ln; String(" size: "); Hex(b.size, 1); Ln; From 6507b4ede37e6e9704cc37299034c2fe48478d56 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 18:53:34 +0000 Subject: [PATCH 090/241] Update bootstrap C sources. --- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-88/Out.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 090b2c81..b877f0bd 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -359,7 +359,7 @@ void Out_DumpHeap (void) Out_Hex(baddr, 1); Out_Ln(); b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)b->tag; + tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); Out_String((CHAR*)" tag: ", 15); Out_Hex(b->tag, 1); if (__MASK(b->tag, -2) != 0) { diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 090b2c81..b877f0bd 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -359,7 +359,7 @@ void Out_DumpHeap (void) Out_Hex(baddr, 1); Out_Ln(); b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)b->tag; + tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); Out_String((CHAR*)" tag: ", 15); Out_Hex(b->tag, 1); if (__MASK(b->tag, -2) != 0) { diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index d0223799..1087252f 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -359,7 +359,7 @@ void Out_DumpHeap (void) Out_Hex(baddr, 1); Out_Ln(); b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)b->tag; + tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); Out_String((CHAR*)" tag: ", 15); Out_Hex(b->tag, 1); if (__MASK(b->tag, -2) != 0) { diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index ef5d74e5..4c3ea533 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -359,7 +359,7 @@ void Out_DumpHeap (void) Out_Hex(baddr, 1); Out_Ln(); b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)b->tag; + tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); Out_String((CHAR*)" tag: ", 15); Out_Hex(b->tag, 1); if (__MASK(b->tag, -2) != 0) { diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index bbb5de28..39c1e9f9 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -359,7 +359,7 @@ void Out_DumpHeap (void) Out_Hex(baddr, 1); Out_Ln(); b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)b->tag; + tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); Out_String((CHAR*)" tag: ", 15); Out_Hex(b->tag, 1); if (__MASK(b->tag, -2) != 0) { From 41a239c5aabb807d888ed3b9a93fba887660735c Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 20:15:29 +0000 Subject: [PATCH 091/241] Fix heap address comparisons for sign crossing. --- src/runtime/Heap.Mod | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index bdb0bc59..11b1b116 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -224,7 +224,7 @@ MODULE Heap; S.PUT(chnk, heap); heap := chnk ELSE j := heap; S.GET(j, next); - WHILE (next # 0) & (chnk > next) DO + WHILE (next # 0) & (chnk - next > 0) DO j := next; S.GET(j, next) END; @@ -311,7 +311,7 @@ MODULE Heap; INC(adr, restsize) END ; i := adr + 4*SZA; end := adr + blksz; - WHILE i < end DO (*deliberately unrolled*) + WHILE end - i > 0 DO (*deliberately unrolled*) S.PUT(i, AddressZero); S.PUT(i + SZA, AddressZero); S.PUT(i + 2*SZA, AddressZero); @@ -393,7 +393,7 @@ MODULE Heap; WHILE chnk # 0 DO adr := chnk + blkOff; S.GET(chnk + endOff, end); - WHILE adr < end DO + WHILE end - adr > 0 DO S.GET(adr, tag); IF ODD(tag) THEN (*marked*) IF freesize > 0 THEN @@ -453,21 +453,21 @@ MODULE Heap; VAR chnk, adr, tag, next, lim, lim1, i, ptr, size: S.ADDRESS; BEGIN chnk := heap; i := 0; lim := cand[n-1]; - WHILE (chnk # 0 ) & (chnk < lim) DO + WHILE (chnk # 0 ) & (lim - chnk > 0) DO adr := chnk + blkOff; S.GET(chnk + endOff, lim1); - IF lim < lim1 THEN lim1 := lim END ; - WHILE adr < lim1 DO + IF lim1 - lim > 0 THEN lim1 := lim END ; + WHILE lim1 - adr > 0 DO S.GET(adr, tag); IF ODD(tag) THEN (*already marked*) S.GET(tag-1, size); INC(adr, size) ELSE S.GET(tag, size); ptr := adr + SZA; - WHILE cand[i] < ptr DO INC(i) END ; + WHILE ptr - cand[i] > 0 DO INC(i) END ; IF i = n THEN RETURN END ; next := adr + size; - IF cand[i] < next THEN Mark(ptr) END ; + IF next - cand[i] > 0 THEN Mark(ptr) END ; adr := next END END ; @@ -530,7 +530,7 @@ MODULE Heap; stack0 := ModulesMainStackFrame(); (* check for minimum alignment of pointers *) inc := S.ADR(align.p) - S.ADR(align); - IF sp > stack0 THEN inc := -inc END ; + IF sp - stack0 > 0 THEN inc := -inc END ; WHILE sp # stack0 DO S.GET(sp, p); IF (p > 0) & (p >= heapPosMin) & (p < heapPosMax) From 1e9c1af8ef97c3105ceceb42e234fd4b3386e042 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 13 Dec 2016 20:16:38 +0000 Subject: [PATCH 092/241] Update bootstrap C sources. --- bootstrap/unix-44/Heap.c | 18 +++++++++--------- bootstrap/unix-48/Heap.c | 18 +++++++++--------- bootstrap/unix-88/Heap.c | 18 +++++++++--------- bootstrap/windows-48/Heap.c | 18 +++++++++--------- bootstrap/windows-88/Heap.c | 18 +++++++++--------- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 0e9118e3..6728cb4d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz) } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk > next)) { + while ((next != 0 && chnk - next > 0)) { j = next; __GET(j, next, INT32); } @@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (i < end) { + while (end - i > 0) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,7 +442,7 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (adr < end) { + while (end - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { if (freesize > 0) { @@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) chnk = Heap_heap; i = 0; lim = cand[n - 1]; - while ((chnk != 0 && chnk < lim)) { + while ((chnk != 0 && lim - chnk > 0)) { adr = chnk + 12; __GET(chnk + 4, lim1, INT32); - if (lim < lim1) { + if (lim1 - lim > 0) { lim1 = lim; } - while (adr < lim1) { + while (lim1 - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); @@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) } else { __GET(tag, size, INT32); ptr = adr + 4; - while (cand[i] < ptr) { + while (ptr - cand[i] > 0) { i += 1; } if (i == n) { return; } next = adr + size; - if (cand[i] < next) { + if (next - cand[i] > 0) { Heap_Mark(ptr); } adr = next; @@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp > stack0) { + if (sp - stack0 > 0) { inc = -inc; } while (sp != stack0) { diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 0e9118e3..6728cb4d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz) } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk > next)) { + while ((next != 0 && chnk - next > 0)) { j = next; __GET(j, next, INT32); } @@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (i < end) { + while (end - i > 0) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,7 +442,7 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (adr < end) { + while (end - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { if (freesize > 0) { @@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) chnk = Heap_heap; i = 0; lim = cand[n - 1]; - while ((chnk != 0 && chnk < lim)) { + while ((chnk != 0 && lim - chnk > 0)) { adr = chnk + 12; __GET(chnk + 4, lim1, INT32); - if (lim < lim1) { + if (lim1 - lim > 0) { lim1 = lim; } - while (adr < lim1) { + while (lim1 - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); @@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) } else { __GET(tag, size, INT32); ptr = adr + 4; - while (cand[i] < ptr) { + while (ptr - cand[i] > 0) { i += 1; } if (i == n) { return; } next = adr + size; - if (cand[i] < next) { + if (next - cand[i] > 0) { Heap_Mark(ptr); } adr = next; @@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp > stack0) { + if (sp - stack0 > 0) { inc = -inc; } while (sp != stack0) { diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 769d2d6b..6246dc9c 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT64 blksz) } else { j = Heap_heap; __GET(j, next, INT64); - while ((next != 0 && chnk > next)) { + while ((next != 0 && chnk - next > 0)) { j = next; __GET(j, next, INT64); } @@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } i = adr + 32; end = adr + blksz; - while (i < end) { + while (end - i > 0) { __PUT(i, 0, INT64); __PUT(i + 8, 0, INT64); __PUT(i + 16, 0, INT64); @@ -442,7 +442,7 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 24; __GET(chnk + 8, end, INT64); - while (adr < end) { + while (end - adr > 0) { __GET(adr, tag, INT64); if (__ODD(tag)) { if (freesize > 0) { @@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) chnk = Heap_heap; i = 0; lim = cand[n - 1]; - while ((chnk != 0 && chnk < lim)) { + while ((chnk != 0 && lim - chnk > 0)) { adr = chnk + 24; __GET(chnk + 8, lim1, INT64); - if (lim < lim1) { + if (lim1 - lim > 0) { lim1 = lim; } - while (adr < lim1) { + while (lim1 - adr > 0) { __GET(adr, tag, INT64); if (__ODD(tag)) { __GET(tag - 1, size, INT64); @@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) } else { __GET(tag, size, INT64); ptr = adr + 8; - while (cand[i] < ptr) { + while (ptr - cand[i] > 0) { i += 1; } if (i == n) { return; } next = adr + size; - if (cand[i] < next) { + if (next - cand[i] > 0) { Heap_Mark(ptr); } adr = next; @@ -632,7 +632,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp > stack0) { + if (sp - stack0 > 0) { inc = -inc; } while (sp != stack0) { diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 0e9118e3..6728cb4d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz) } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk > next)) { + while ((next != 0 && chnk - next > 0)) { j = next; __GET(j, next, INT32); } @@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (i < end) { + while (end - i > 0) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,7 +442,7 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (adr < end) { + while (end - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { if (freesize > 0) { @@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) chnk = Heap_heap; i = 0; lim = cand[n - 1]; - while ((chnk != 0 && chnk < lim)) { + while ((chnk != 0 && lim - chnk > 0)) { adr = chnk + 12; __GET(chnk + 4, lim1, INT32); - if (lim < lim1) { + if (lim1 - lim > 0) { lim1 = lim; } - while (adr < lim1) { + while (lim1 - adr > 0) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); @@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) } else { __GET(tag, size, INT32); ptr = adr + 4; - while (cand[i] < ptr) { + while (ptr - cand[i] > 0) { i += 1; } if (i == n) { return; } next = adr + size; - if (cand[i] < next) { + if (next - cand[i] > 0) { Heap_Mark(ptr); } adr = next; @@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp > stack0) { + if (sp - stack0 > 0) { inc = -inc; } while (sp != stack0) { diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 769d2d6b..6246dc9c 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT64 blksz) } else { j = Heap_heap; __GET(j, next, INT64); - while ((next != 0 && chnk > next)) { + while ((next != 0 && chnk - next > 0)) { j = next; __GET(j, next, INT64); } @@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } i = adr + 32; end = adr + blksz; - while (i < end) { + while (end - i > 0) { __PUT(i, 0, INT64); __PUT(i + 8, 0, INT64); __PUT(i + 16, 0, INT64); @@ -442,7 +442,7 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 24; __GET(chnk + 8, end, INT64); - while (adr < end) { + while (end - adr > 0) { __GET(adr, tag, INT64); if (__ODD(tag)) { if (freesize > 0) { @@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) chnk = Heap_heap; i = 0; lim = cand[n - 1]; - while ((chnk != 0 && chnk < lim)) { + while ((chnk != 0 && lim - chnk > 0)) { adr = chnk + 24; __GET(chnk + 8, lim1, INT64); - if (lim < lim1) { + if (lim1 - lim > 0) { lim1 = lim; } - while (adr < lim1) { + while (lim1 - adr > 0) { __GET(adr, tag, INT64); if (__ODD(tag)) { __GET(tag - 1, size, INT64); @@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) } else { __GET(tag, size, INT64); ptr = adr + 8; - while (cand[i] < ptr) { + while (ptr - cand[i] > 0) { i += 1; } if (i == n) { return; } next = adr + size; - if (cand[i] < next) { + if (next - cand[i] > 0) { Heap_Mark(ptr); } adr = next; @@ -632,7 +632,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp > stack0) { + if (sp - stack0 > 0) { inc = -inc; } while (sp != stack0) { From e85091289e20a18fcb6de7f0d30d6ef25ffca73f Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 14 Dec 2016 16:55:16 +0000 Subject: [PATCH 093/241] Fix array assignment size validation to accept equal sizes. --- src/compiler/OPV.Mod | 2 +- src/tools/make/configure.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index c2099cc5..31e07fd9 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -790,7 +790,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPM.WriteString("__X("); OPC.Len(r.obj, r.typ, 0); OPM.WriteString(" * "); OPM.WriteInt(r.typ.BaseTyp.size); OPM.WriteString(", "); - OPM.WriteInt(l.typ.size); + OPM.WriteInt(l.typ.size+1); (* _X vaidates 0 .. n-1 so we need to +1. *) OPM.Write(")") ELSE (* Array to array copy. *) ASSERT(r.typ.comp = OPT.Array); ASSERT(r.typ.size <= l.typ.size); diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 5865e3e0..4fde13a3 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -106,7 +106,7 @@ void determineOS() { #ifdef _WIN32 os = "windows"; platform = "windows"; binext = ".exe"; staticlink = ""; #else - os = "unknown"; platform = "unix"; binext = ""; staticlink = "-static"; + os = "unknown"; platform = "unix"; binext = ""; staticlink = " -static"; struct utsname sys; if (uname(&sys)<0) fail("Couldn't get sys name - uname() failed."); From 4a71f43e72389f46454ded01a3d820ce9ac0e6aa Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 14 Dec 2016 16:56:57 +0000 Subject: [PATCH 094/241] Update bootstrap C source files. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 4 ++-- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 ++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 4 ++-- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 ++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 4 ++-- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 ++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 4 ++-- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 ++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 4 ++-- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 ++-- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 200 insertions(+), 200 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 39819e0a..454ea490 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index e391cd31..abf165f3 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 5d106305..eb712e53 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index fb2ee9ee..d29c5510 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 5b6e66ef..e0812a5b 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 6728cb4d..495e451c 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 62f61978..7429d8c8 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 529aeee2..34c15ece 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 89339f66..42f06075 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index b5c4fd7d..c163c77e 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 20372132..7b8e9d38 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 7848592a..fef86e9e 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index dff5b7ca..a2b14bdc 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 8017c2e7..d09d6a7a 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 59190332..dc86bc49 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index d8d05354..24e6b221 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index efff1781..bf0f96d7 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 2d0304d5..807c0ce5 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index e54474bc..a15d8712 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 4d978eb5..b028aa53 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index d2ca1fae..9a187fc7 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 5597b3e3..96252046 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1292,7 +1292,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(l->typ->size); + OPM_WriteInt(l->typ->size + 1); OPM_Write(')'); } else { __ASSERT(r->typ->comp == 2, 0); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 4e3573c7..5654d36e 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index b877f0bd..9248cfc5 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 80673194..ffbd6894 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 9b35ef5a..027176ed 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 2b2fba4b..79d88e9d 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 55de7323..2ecd8371 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 0af8a733..570e7d72 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 909f5e88..f911a688 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 54ccc184..7645aa6e 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index bc3411f2..f73006a8 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 208d1fe8..d1e65c70 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 451af631..1e0fffa9 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index d4387f75..7522f9d1 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 83030d15..d2c67400 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 0a7aceb7..fb167591 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 39819e0a..454ea490 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index e391cd31..abf165f3 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 5d106305..eb712e53 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index fb2ee9ee..d29c5510 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 5b6e66ef..e0812a5b 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 6728cb4d..495e451c 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 62f61978..7429d8c8 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 529aeee2..34c15ece 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 89339f66..42f06075 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index b5c4fd7d..c163c77e 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 20372132..7b8e9d38 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 7848592a..fef86e9e 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index dff5b7ca..a2b14bdc 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 8017c2e7..d09d6a7a 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 59190332..dc86bc49 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index d8d05354..24e6b221 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index efff1781..bf0f96d7 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 2d0304d5..807c0ce5 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index e54474bc..a15d8712 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index c9f40056..e9db362e 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index d2ca1fae..9a187fc7 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 5597b3e3..96252046 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1292,7 +1292,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(l->typ->size); + OPM_WriteInt(l->typ->size + 1); OPM_Write(')'); } else { __ASSERT(r->typ->comp == 2, 0); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 4e3573c7..5654d36e 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index b877f0bd..9248cfc5 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 80673194..ffbd6894 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 9b35ef5a..027176ed 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 2b2fba4b..79d88e9d 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 55de7323..2ecd8371 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 0af8a733..570e7d72 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 909f5e88..f911a688 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 54ccc184..7645aa6e 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 5df0abaa..c0bfc16a 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index d7570ee1..cd0f72ee 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 451af631..1e0fffa9 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index d4387f75..7522f9d1 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 83030d15..d2c67400 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 0a7aceb7..fb167591 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 39819e0a..454ea490 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index e391cd31..abf165f3 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 5d106305..eb712e53 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index ead3b170..3aeb5911 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 6ff0de64..b67b65f7 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 6246dc9c..3f4e96ee 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 26424f29..aac7c8fe 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 82b56235..821e6801 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index f82ccfd0..c7f011df 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index b5c4fd7d..c163c77e 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 20372132..7b8e9d38 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 7848592a..fef86e9e 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index dff5b7ca..a2b14bdc 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index faf1ba5e..cb39afd5 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 59190332..dc86bc49 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 94982bd2..25c453d1 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index efff1781..bf0f96d7 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 2d0304d5..807c0ce5 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index e54474bc..a15d8712 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 46bd1072..8fb5d86e 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index d2ca1fae..9a187fc7 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index a3223212..ab98ed73 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1292,7 +1292,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(l->typ->size); + OPM_WriteInt(l->typ->size + 1); OPM_Write(')'); } else { __ASSERT(r->typ->comp == 2, 0); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 4e3573c7..5654d36e 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 1087252f..a55f91eb 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 42ae59ed..b846b299 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index ef72c3b2..56d7144c 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index fbc0ebdd..000bcc79 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 55de7323..2ecd8371 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 0af8a733..570e7d72 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 909f5e88..f911a688 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 54ccc184..7645aa6e 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 6447e8ae..74cd62c7 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index ff036fdd..be7b64a2 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 451af631..1e0fffa9 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index d4387f75..7522f9d1 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 83030d15..d2c67400 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 0a7aceb7..fb167591 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 39819e0a..454ea490 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index e391cd31..abf165f3 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 5d106305..eb712e53 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 1193b13c..38d67ccf 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 7571e510..e1da6139 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 6728cb4d..495e451c 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 62f61978..7429d8c8 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index e5fe836e..9cd53060 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 89339f66..42f06075 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index b5c4fd7d..c163c77e 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 20372132..7b8e9d38 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 7848592a..fef86e9e 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index dff5b7ca..a2b14bdc 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 8017c2e7..d09d6a7a 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 59190332..dc86bc49 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index d8d05354..24e6b221 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index efff1781..bf0f96d7 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 2d0304d5..807c0ce5 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index e54474bc..a15d8712 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index c9f40056..e9db362e 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index d2ca1fae..9a187fc7 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 5597b3e3..96252046 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1292,7 +1292,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(l->typ->size); + OPM_WriteInt(l->typ->size + 1); OPM_Write(')'); } else { __ASSERT(r->typ->comp == 2, 0); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 4e3573c7..5654d36e 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 4c3ea533..932297a3 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 80673194..ffbd6894 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 1e35e805..cc0bd221 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 3362fba3..f74a75bf 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 55de7323..2ecd8371 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 0af8a733..570e7d72 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 909f5e88..f911a688 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 54ccc184..7645aa6e 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 5df0abaa..c0bfc16a 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index d7570ee1..cd0f72ee 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 451af631..1e0fffa9 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index d4387f75..7522f9d1 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 83030d15..d2c67400 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 0a7aceb7..fb167591 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 39819e0a..454ea490 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index e391cd31..abf165f3 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 5d106305..eb712e53 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 8dce3c01..b9056935 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 32786d38..616c3fe1 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 6246dc9c..3f4e96ee 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 26424f29..aac7c8fe 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index d3c5d8d1..50348111 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index f82ccfd0..c7f011df 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index b5c4fd7d..c163c77e 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 20372132..7b8e9d38 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 7848592a..fef86e9e 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index dff5b7ca..a2b14bdc 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index faf1ba5e..cb39afd5 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 59190332..dc86bc49 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 94982bd2..25c453d1 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index efff1781..bf0f96d7 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 2d0304d5..807c0ce5 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index e54474bc..a15d8712 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 46bd1072..8fb5d86e 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index d2ca1fae..9a187fc7 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index a3223212..ab98ed73 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1292,7 +1292,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(l->typ->size); + OPM_WriteInt(l->typ->size + 1); OPM_Write(')'); } else { __ASSERT(r->typ->comp == 2, 0); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 4e3573c7..5654d36e 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 39c1e9f9..87f59955 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 42ae59ed..b846b299 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 53d2232c..b47b0d82 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index e2b27d76..76ed0ffb 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 55de7323..2ecd8371 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 0af8a733..570e7d72 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 909f5e88..f911a688 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 54ccc184..7645aa6e 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 6447e8ae..74cd62c7 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index ff036fdd..be7b64a2 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 451af631..1e0fffa9 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index d4387f75..7522f9d1 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 83030d15..d2c67400 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"-static", 8, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 0a7aceb7..fb167591 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/13]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 460b879829f8ddac3a7efccc6d7724d1f4f2998e Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 13:03:59 +0000 Subject: [PATCH 095/241] Build link list based on imports, not on modules compiled by compiler instance. --- ReadMe.md | 4 +-- src/compiler/Compiler.Mod | 53 +++++++++++++++++++++++++++++---------- src/compiler/OPM.Mod | 20 +++++++++------ src/compiler/OPP.Mod | 16 +++--------- src/compiler/OPT.Mod | 46 +++++++++++++++++++++++++++++---- src/compiler/OPV.Mod | 2 +- src/runtime/Files.Mod | 10 -------- 7 files changed, 100 insertions(+), 51 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index a3f55f77..95732f0d 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -125,7 +125,7 @@ Alternatively the Oakwood module Out can be used to write directly to stdout: MODULE hello; IMPORT Out; BEGIN - Out.String("Hello."); Out.Ln; + Out.String("Hello."); Out.Ln END hello. ``` @@ -144,7 +144,7 @@ Execute as usual on Linux (`./hello`) or Windows (`hello`). In order to see the definition of a module's interface, use the "showdef" program. ``` -$ showdef Out.sym +$ showdef Out DEFINITION Out; VAR diff --git a/src/compiler/Compiler.Mod b/src/compiler/Compiler.Mod index 4e9c5c10..c9f454cf 100644 --- a/src/compiler/Compiler.Mod +++ b/src/compiler/Compiler.Mod @@ -6,9 +6,6 @@ MODULE Compiler; (* J. Templ 3.2.95 *) OPV, OPC, OPM, extTools, Strings, VT100; - VAR mname: ARRAY 256 OF CHAR; (* noch *) - - PROCEDURE Module*(VAR done: BOOLEAN); VAR ext, new: BOOLEAN; p: OPT.Node; BEGIN @@ -20,11 +17,12 @@ MODULE Compiler; (* J. Templ 3.2.95 *) OPT.Export(ext, new); IF OPM.noerr THEN OPM.OpenFiles(OPT.SelfName); + OPM.DeleteObj(OPT.SelfName); (* Make sure old object file isn't left hanging around. *) OPC.Init; OPV.Module(p); IF OPM.noerr THEN IF (OPM.mainprog IN OPM.Options) & (OPM.modName # "SYSTEM") THEN - OPM.DeleteNewSym; + OPM.DeleteNewSym(OPT.SelfName); OPM.LogVT100(VT100.Green); OPM.LogWStr(" Main program."); OPM.LogVT100(VT100.ResetAll); ELSE IF new THEN @@ -36,7 +34,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) END END; ELSE - OPM.DeleteNewSym + OPM.DeleteNewSym(OPT.SelfName) END END END; @@ -83,17 +81,48 @@ MODULE Compiler; (* J. Templ 3.2.95 *) END PropagateElementaryTypeSizes; + PROCEDURE FindLocalObjectFiles(VAR objectnames: ARRAY OF CHAR); + VAR + l: OPT.Link; + fn: ARRAY 64 OF CHAR; + id: Platform.FileIdentity; + BEGIN + objectnames[0] := 0X; + l := OPT.Links; WHILE l # NIL DO + (* Tell linker to link this module as an object file if both a symbol + and an object file exist in the current directory. *) + COPY(l.name, fn); Strings.Append('.sym', fn); + IF Platform.IdentifyByName(fn, id) = 0 THEN + COPY(l.name, fn); Strings.Append(Configuration.objext, fn); + IF Platform.IdentifyByName(fn, id) = 0 THEN + Strings.Append(' ', objectnames); + Strings.Append(fn, objectnames) + ELSE + (* Found symbol file but no object file. *) + OPM.LogVT100(VT100.Yellow); + OPM.LogWStr("Link warning: a local symbol file is present for module "); OPM.LogWStr(l.name); + OPM.LogWStr(", but local object file '"); OPM.LogWStr(fn); OPM.LogWStr("' is missing."); + OPM.LogVT100(VT100.ResetAll); OPM.LogWLn + END + ELSE + (* No symbol file present in current directory. + Assume this referenced module is in a library. *) + END; + l := l.next + END + END FindLocalObjectFiles; + + PROCEDURE Translate*; VAR - done: BOOLEAN; - modulesobj: ARRAY 2048 OF CHAR; (* here we hold all modules name given on the command line, to add corresponding .o files to the external compiler options *) + done: BOOLEAN; + linkfiles: ARRAY 2048 OF CHAR; (* Object files to be linked into main program. *) BEGIN - modulesobj := ""; IF OPM.OpenPar() THEN (* gclock(); slightly faster translation but may lead to opening "too many files" *) LOOP - OPM.Init(done, mname); (* Get next module name from command line *) + OPM.Init(done); (* Get next module name from command line *) IF ~done THEN RETURN END ; OPM.InitOptions; (* Get options for this module *) @@ -116,12 +145,10 @@ MODULE Compiler; (* J. Templ 3.2.95 *) IF ~(OPM.mainprog IN OPM.Options) THEN (* Assemble non main program and add object name to link list *) extTools.Assemble(OPM.modName); - Strings.Append(" ", modulesobj); - Strings.Append(OPM.modName, modulesobj); - Strings.Append(Configuration.objext, modulesobj) ELSE (* Assemble and link main program *) - extTools.LinkMain(OPM.modName, OPM.mainlinkstat IN OPM.Options, modulesobj) + FindLocalObjectFiles(linkfiles); + extTools.LinkMain(OPM.modName, OPM.mainlinkstat IN OPM.Options, linkfiles) END END END diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 583c4318..a5a3df1a 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -76,7 +76,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) BFext = ".c"; (* body file extension *) HFext = ".h"; (* header file extension *) SFtag = 0F7X; (* symbol file tag *) - SFver = 082X; (* symbol file version. Increment if symbol file format is changed. *) + SFver = 083X; (* symbol file version. Increment if symbol file format is changed. *) @@ -353,7 +353,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END InitOptions; - PROCEDURE Init*(VAR done: BOOLEAN; VAR mname : ARRAY OF CHAR); (* get the source for one translation *) + PROCEDURE Init*(VAR done: BOOLEAN); (* get the source for one translation *) VAR T: Texts.Text; beg, end, time: LONGINT; @@ -367,7 +367,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) NEW(T); Texts.Open(T, s); LogWStr(s); LogWStr(" "); - COPY(s, mname); COPY(s, SourceFileName); (* to keep it also in this module -- noch *) IF T.len = 0 THEN @@ -636,9 +635,16 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) IF (modName # "SYSTEM") OR (mainprog IN Options) THEN Files.Register(newSFile) END END RegisterNewSym; - PROCEDURE DeleteNewSym*; + PROCEDURE DeleteNewSym*(VAR modulename: ARRAY OF CHAR); + VAR fn: FileName; res: INTEGER; + BEGIN MakeFileName(modulename, fn, SFext); Files.Delete(fn, res) END DeleteNewSym; + PROCEDURE DeleteObj*(VAR modulename: ARRAY OF CHAR); + VAR fn: FileName; res: INTEGER; + BEGIN MakeFileName(modulename, fn, Configuration.objext); Files.Delete(fn, res) + END DeleteObj; + PROCEDURE NewSym*(VAR modName: ARRAY OF CHAR); VAR fileName: FileName; BEGIN MakeFileName(modName, fileName, SFext); @@ -742,7 +748,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END Append; PROCEDURE OpenFiles*(VAR moduleName: ARRAY OF CHAR); - VAR FName: ARRAY 32 OF CHAR; + VAR FName: FileName; BEGIN COPY(moduleName, modName); HFile := Files.New(""); @@ -756,7 +762,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END OpenFiles; PROCEDURE CloseFiles*; - VAR FName: ARRAY 32 OF CHAR; res: INTEGER; + VAR FName: FileName; res: INTEGER; BEGIN IF noerr THEN LogWStr(" "); LogWNum(Files.Pos(R[BodyFile]), 0); LogWStr(" chars.") END; IF noerr THEN @@ -779,7 +785,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) (* === Installation directory discovery === *) PROCEDURE IsProbablyInstallDir(s: ARRAY OF CHAR): BOOLEAN; - VAR testpath: ARRAY 1024 OF CHAR; identity: Platform.FileIdentity; + VAR testpath: ARRAY 4096 OF CHAR; identity: Platform.FileIdentity; BEGIN COPY(InstallDir, testpath); Strings.Append("/lib/lib", testpath); diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 0ff9b7fb..8cfc5a55 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -922,7 +922,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPT.Insert(OPS.name, obj); obj^.mode := OPT.Typ; obj^.typ := OPT.undftyp; CheckMark(obj^.vis); IF sym = OPS.eql THEN - IF (obj^.name = "SHORTINT") OR + IF (obj^.name = "SHORTINT") OR (obj^.name = "INTEGER") OR (obj^.name = "LONGINT") OR (obj^.name = "HUGEINT") OR @@ -931,7 +931,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) (obj^.name = "SET") OR (obj^.name = "CHAR") OR (obj^.name = "TRUE") OR (obj^.name = "FALSE") THEN - OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) + OPM.Mark(-310, OPM.curpos); (* notice about aliasing of predefined type *) END; OPS.Get(sym); TypeDecl(obj^.typ, obj^.typ) ELSIF (sym = OPS.becomes) OR (sym = OPS.colon) THEN @@ -1005,17 +1005,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) c: LONGINT; done: BOOLEAN; BEGIN OPS.Init; LoopLevel := 0; level := 0; OPS.Get(sym); - IF sym = OPS.module THEN OPS.Get(sym) ELSE - (* Debug intermittent failure only found on OpenBSD *) - OPM.LogWLn; - OPM.LogWStr("Unexpected symbol found when MODULE expected:"); OPM.LogWLn; - OPM.LogWStr(" sym: "); OPM.LogWNum(sym,1); OPM.LogWLn; - OPM.LogWStr(" OPS.name: "); OPM.LogWStr(OPS.name); OPM.LogWLn; - OPM.LogWStr(" OPS.str: "); OPM.LogWStr(OPS.str); OPM.LogWLn; - OPM.LogWStr(" OPS.numtyp: "); OPM.LogWNum(OPS.numtyp,1); OPM.LogWLn; - OPM.LogWStr(" OPS.intval: "); OPM.LogWNum(OPS.intval,1); OPM.LogWLn; - err(16) - END; + IF sym = OPS.module THEN OPS.Get(sym) ELSE err(16) END; IF sym = OPS.ident THEN OPM.LogWStr("compiling "); OPM.LogWStr(OPS.name); OPM.LogW("."); OPT.Init(OPS.name, opt); OPS.Get(sym); CheckSym(OPS.semicolon); diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index 54975745..2c54d11f 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -176,7 +176,7 @@ CONST Srvar* = 22; Svalpar* = 23; Svarpar* = 24; Sfld* = 25; Srfld* = 26; Shdptr* = 27; Shdpro* = 28; Stpro* = 29; Shdtpro* = 30; Sxpro* = 31; Sipro* = 32; Scpro* = 33; Sstruct* = 34; Ssys* = 35; Sptr* = 36; - Sarr* = 37; Sdarr* = 38; Srec* = 39; Spro* = 40; + Sarr* = 37; Sdarr* = 38; Srec* = 39; Spro* = 40; Slink* = 37; TYPE ImpCtxt = RECORD @@ -207,6 +207,18 @@ VAR recno: LONGINT; (* number of anonymous record types *) +(* Linking control - modules whose object files will be required to link a module. *) + +TYPE + Link* = POINTER TO LinkDesc; + LinkDesc* = RECORD + name-: OPS.Name; + next-: Link + END; + +VAR + Links-: Link; + PROCEDURE InitRecno*; BEGIN recno := 0 END InitRecno; PROCEDURE err(n: INTEGER); BEGIN OPM.err(n) END err; @@ -392,7 +404,8 @@ BEGIN topScope := universe; OpenScope(0, NIL); SYSimported := FALSE; SelfName := name; topScope^.name := name; GlbMod[0] := topScope; nofGmod := 1; - newsf := nsf IN opt; findpc := fpc IN opt; extsf := newsf OR (esf IN opt); sfpresent := TRUE + newsf := nsf IN opt; findpc := fpc IN opt; extsf := newsf OR (esf IN opt); sfpresent := TRUE; + NEW(Links); Links.name := name END Init; PROCEDURE Close*; @@ -733,6 +746,20 @@ BEGIN END END InMod; +PROCEDURE InLinks; (* Load a list of all modules whose object files we will need to link with *) + VAR linkname: OPS.Name; l: Link; +BEGIN + InName(linkname); + WHILE linkname[0] # 0X DO + l := Links; WHILE (l # NIL) & (l.name # linkname) DO l := l.next END; + IF l = NIL THEN + l := Links; NEW(Links); + Links.next := l; Links.name := linkname + END; + InName(linkname) + END +END InLinks; + PROCEDURE InConstant(f: LONGINT; conval: Const); VAR ch: CHAR; i: INTEGER; ext: ConstExt; rval: REAL; BEGIN @@ -1022,7 +1049,7 @@ BEGIN impCtxt.self := aliasName = "@self"; impCtxt.reffp := 0; OPM.OldSym(name, done); IF done THEN - InMod(mno); + InMod(mno); InLinks; impCtxt.nextTag := OPM.SymRInt(); WHILE ~OPM.eofSF() DO obj := InObj(mno); impCtxt.nextTag := OPM.SymRInt() @@ -1057,6 +1084,13 @@ END Import; END END OutMod; + PROCEDURE OutLinks; + VAR l: Link; + BEGIN + l := Links; WHILE l # NIL DO OutName(l.name); l := l.next END; + OPM.SymWCh(0X) + END OutLinks; + PROCEDURE ^OutStr(typ: Struct); PROCEDURE ^OutFlds(fld: Object; adr: LONGINT; visible: BOOLEAN); @@ -1235,7 +1269,7 @@ END Import; IF OPM.noerr THEN (* ~OPM.noerr => ~done *) OPM.NewSym(SelfName); IF OPM.noerr THEN - OPM.SymWInt(Smname); OutName(SelfName); + OPM.SymWInt(Smname); OutName(SelfName); OutLinks; expCtxt.reffp := 0; expCtxt.ref := FirstRef(*Comp+1*); expCtxt.nofm := 1; expCtxt.locmno[0] := 0; i := 1; WHILE i < maxImps DO expCtxt.locmno[i] := -1; INC(i) END; @@ -1248,7 +1282,7 @@ END Import; END; newsf := FALSE; symNew := FALSE; (* because of call to FPrintErr from OPL *) IF ~OPM.noerr OR findpc THEN - OPM.DeleteNewSym + OPM.DeleteNewSym(SelfName) END (* OPM.RegisterNewSym is called in OP2 after writing the object file *) END @@ -1256,6 +1290,8 @@ END Import; END Export; (* no new symbol file if ~OPM.noerr or findpc *) +(*------------------------- Initialise types --------------------------*) + PROCEDURE InitStruct(VAR typ: Struct; form: SHORTINT); BEGIN typ := NewStr(form, Basic); typ^.ref := form; typ^.size := 1; typ^.allocated := TRUE; diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 31e07fd9..d0cbde89 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -790,7 +790,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPM.WriteString("__X("); OPC.Len(r.obj, r.typ, 0); OPM.WriteString(" * "); OPM.WriteInt(r.typ.BaseTyp.size); OPM.WriteString(", "); - OPM.WriteInt(l.typ.size+1); (* _X vaidates 0 .. n-1 so we need to +1. *) + OPM.WriteInt(l.typ.size+1); (* _X validates 0 .. n-1 so we need top+1. *) OPM.Write(")") ELSE (* Array to array copy. *) ASSERT(r.typ.comp = OPT.Array); ASSERT(r.typ.size <= l.typ.size); diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 76fbdf77..f60e67bb 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -645,21 +645,11 @@ Especially Length would become fairly complex. PROCEDURE Register* (f: File); VAR idx, errcode: INTEGER; f1: File; BEGIN - (* - Out.String("Files.Register f.registerName = "); Out.String(f.registerName); - Out.String(", fd = "); Out.Int(f.fd,1); Out.Ln; - *) IF (f.state = create) & (f.registerName # "") THEN f.state := close (* shortcut renaming *) END; Close(f); IF f.registerName # "" THEN Deregister(f.registerName); Rename(f.workName, f.registerName, errcode); - (* - Out.String("Renamed (for register) f.fd = "); Out.Int(f.fd,1); - Out.String(" from workname "); Out.String(f.workName); - Out.String(" to registerName "); Out.String(f.registerName); - Out.String(" errorcode = "); Out.Int(errcode,1); Out.Ln; - *) IF errcode # 0 THEN Err("Couldn't rename temp name as register name", f, errcode) END; f.workName := f.registerName; f.registerName := ""; f.tempFile := FALSE END From 4c7aa1720a2009a634a57564ebcc8d0a3fdb5627 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 13:05:05 +0000 Subject: [PATCH 096/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 51 +++++++++++++++++++------ bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 57 +++++++++++++++++----------- bootstrap/unix-44/OPM.h | 7 ++-- bootstrap/unix-44/OPP.c | 20 +--------- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 55 ++++++++++++++++++++++++++- bootstrap/unix-44/OPT.h | 13 ++++++- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 51 +++++++++++++++++++------ bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 57 +++++++++++++++++----------- bootstrap/unix-48/OPM.h | 7 ++-- bootstrap/unix-48/OPP.c | 20 +--------- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 55 ++++++++++++++++++++++++++- bootstrap/unix-48/OPT.h | 13 ++++++- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 51 +++++++++++++++++++------ bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 57 +++++++++++++++++----------- bootstrap/unix-88/OPM.h | 7 ++-- bootstrap/unix-88/OPP.c | 20 +--------- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 55 ++++++++++++++++++++++++++- bootstrap/unix-88/OPT.h | 13 ++++++- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 51 +++++++++++++++++++------ bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 57 +++++++++++++++++----------- bootstrap/windows-48/OPM.h | 7 ++-- bootstrap/windows-48/OPP.c | 20 +--------- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 55 ++++++++++++++++++++++++++- bootstrap/windows-48/OPT.h | 13 ++++++- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 51 +++++++++++++++++++------ bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 57 +++++++++++++++++----------- bootstrap/windows-88/OPM.h | 7 ++-- bootstrap/windows-88/OPP.c | 20 +--------- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 55 ++++++++++++++++++++++++++- bootstrap/windows-88/OPT.h | 13 ++++++- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 880 insertions(+), 455 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 454ea490..f26c1a32 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -20,9 +20,9 @@ #include "extTools.h" -static CHAR Compiler_mname[256]; +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len); export void Compiler_Module (BOOLEAN *done); static void Compiler_PropagateElementaryTypeSizes (void); export void Compiler_Translate (void); @@ -41,11 +41,12 @@ void Compiler_Module (BOOLEAN *done) OPT_Export(&ext, &new); if (OPM_noerr) { OPM_OpenFiles((void*)OPT_SelfName, 256); + OPM_DeleteObj((void*)OPT_SelfName, 256); OPC_Init(); OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -61,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -104,14 +105,44 @@ static void Compiler_PropagateElementaryTypeSizes (void) } } +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len) +{ + OPT_Link l = NIL; + CHAR fn[64]; + Platform_FileIdentity id; + objectnames[0] = 0x00; + l = OPT_Links; + while (l != NIL) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".sym", 5, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".o", 3, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); + Strings_Append(fn, 64, (void*)objectnames, objectnames__len); + } else { + OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); + OPM_LogWStr(l->name, 256); + OPM_LogWStr((CHAR*)", but local object file '", 26); + OPM_LogWStr(fn, 64); + OPM_LogWStr((CHAR*)"' is missing.", 14); + OPM_LogVT100((CHAR*)"0m", 3); + OPM_LogWLn(); + } + } + l = l->next; + } +} + void Compiler_Translate (void) { BOOLEAN done; - CHAR modulesobj[2048]; - modulesobj[0] = 0x00; + CHAR linkfiles[2048]; if (OPM_OpenPar()) { for (;;) { - OPM_Init(&done, (void*)Compiler_mname, 256); + OPM_Init(&done); if (!done) { return; } @@ -131,11 +162,9 @@ void Compiler_Translate (void) } else { if (!__IN(10, OPM_Options, 32)) { extTools_Assemble(OPM_modName, 32); - Strings_Append((CHAR*)" ", 2, (void*)modulesobj, 2048); - Strings_Append(OPM_modName, 32, (void*)modulesobj, 2048); - Strings_Append((CHAR*)".o", 3, (void*)modulesobj, 2048); } else { - extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), modulesobj, 2048); + Compiler_FindLocalObjectFiles((void*)linkfiles, 2048); + extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), linkfiles, 2048); } } } diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index abf165f3..18ec858a 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index eb712e53..efd4ae6e 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index d29c5510..dac5c5ff 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index e0812a5b..2291d7d8 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 495e451c..df3d086b 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 7429d8c8..7a464dbf 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 34c15ece..76891be3 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 42f06075..9f691749 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index c163c77e..3933cee1 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 7b8e9d38..9f8518b8 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index fef86e9e..24cd4f3f 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index a2b14bdc..99b9afb4 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index d09d6a7a..3411635b 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,7 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (void); +export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -58,7 +59,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); @@ -449,7 +450,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) +void OPM_Init (BOOLEAN *done) { Texts_Text T = NIL; INT32 beg, end, time; @@ -465,7 +466,6 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) Texts_Open(T, s, 256); OPM_LogWStr(s, 256); OPM_LogWStr((CHAR*)" ", 3); - __COPY(s, mname, mname__len); __COPY(s, OPM_SourceFileName, 256); if (T->len == 0) { OPM_LogWStr(s, 256); @@ -773,7 +773,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x82) { + if (tag != 0xf7 || ver != 0x83) { OPM_err(-306); OPM_CloseOldSym(); *done = 0; @@ -818,8 +818,20 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (void) +void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) { + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".sym", 5); + Files_Delete(fn, 32, &res); +} + +void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len) +{ + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".o", 3); + Files_Delete(fn, 32, &res); } void OPM_NewSym (CHAR *modName, ADDRESS modName__len) @@ -830,7 +842,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x82); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); } else { OPM_err(153); } @@ -984,7 +996,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR FName[32]; + OPM_FileName FName; __COPY(moduleName, OPM_modName, 32); OPM_HFile = Files_New((CHAR*)"", 1); if (OPM_HFile != NIL) { @@ -1010,7 +1022,7 @@ void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) void OPM_CloseFiles (void) { - CHAR FName[32]; + OPM_FileName FName; INT16 res; if (OPM_noerr) { OPM_LogWStr((CHAR*)" ", 3); @@ -1048,26 +1060,26 @@ void OPM_CloseFiles (void) static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) { - CHAR testpath[1024]; + CHAR testpath[4096]; Platform_FileIdentity identity; __DUP(s, s__len, CHAR); - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); - Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); - Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } @@ -1129,7 +1141,6 @@ export void *OPM__init(void) __REGMOD("OPM", EnumPtrs); __REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseOldSym", OPM_CloseOldSym); - __REGCMD("DeleteNewSym", OPM_DeleteNewSym); __REGCMD("InitOptions", OPM_InitOptions); __REGCMD("LogWLn", OPM_LogWLn); __REGCMD("RegisterNewSym", OPM_RegisterNewSym); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index dc86bc49..da0a48ee 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -23,13 +23,14 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (void); +import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 24e6b221..aad8367d 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1793,24 +1793,6 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) if (OPP_sym == 63) { OPS_Get(&OPP_sym); } else { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Unexpected symbol found when MODULE expected:", 46); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" sym: ", 15); - OPM_LogWNum(OPP_sym, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.name: ", 15); - OPM_LogWStr(OPS_name, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.str: ", 15); - OPM_LogWStr(OPS_str, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.numtyp: ", 15); - OPM_LogWNum(OPS_numtyp, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.intval: ", 15); - OPM_LogWNum(OPS_intval, 1); - OPM_LogWLn(); OPP_err(16); } if (OPP_sym == 38) { diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index bf0f96d7..dc8aa405 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 807c0ce5..d0a1851a 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index a15d8712..608979a8 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index b028aa53..02532034 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,6 +49,15 @@ typedef INT8 glbmno[64]; } OPT_ImpCtxt; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -101,6 +110,7 @@ static OPT_ExpCtxt OPT_expCtxt; static INT32 OPT_nofhdfld; static BOOLEAN OPT_newsf, OPT_findpc, OPT_extsf, OPT_sfpresent, OPT_symExtended, OPT_symNew; static INT32 OPT_recno; +export OPT_Link OPT_Links; export ADDRESS *OPT_ConstDesc__typ; export ADDRESS *OPT_ObjDesc__typ; @@ -108,6 +118,7 @@ export ADDRESS *OPT_StrDesc__typ; export ADDRESS *OPT_NodeDesc__typ; export ADDRESS *OPT_ImpCtxt__typ; export ADDRESS *OPT_ExpCtxt__typ; +export ADDRESS *OPT_LinkDesc__typ; export void OPT_Align (INT32 *adr, INT32 base); export INT32 OPT_BaseAlignment (OPT_Struct typ); @@ -131,6 +142,7 @@ export void OPT_IdFPrint (OPT_Struct typ); export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); +static void OPT_InLinks (void); static void OPT_InMod (INT8 *mno); static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); @@ -154,6 +166,7 @@ export void OPT_OpenScope (INT8 level, OPT_Object owner); static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); +static void OPT_OutLinks (void); static void OPT_OutMod (INT16 mno); static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); @@ -442,6 +455,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_findpc = __IN(8, opt, 32); OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; + __NEW(OPT_Links, OPT_LinkDesc); + __MOVE(name, OPT_Links->name, 256); } void OPT_Close (void) @@ -1011,6 +1026,26 @@ static void OPT_InMod (INT8 *mno) } } +static void OPT_InLinks (void) +{ + OPS_Name linkname; + OPT_Link l = NIL; + OPT_InName((void*)linkname, 256); + while (linkname[0] != 0x00) { + l = OPT_Links; + while ((l != NIL && __STRCMP(l->name, linkname) != 0)) { + l = l->next; + } + if (l == NIL) { + l = OPT_Links; + __NEW(OPT_Links, OPT_LinkDesc); + OPT_Links->next = l; + __MOVE(linkname, OPT_Links->name, 256); + } + OPT_InName((void*)linkname, 256); + } +} + static void OPT_InConstant (INT32 f, OPT_Const conval) { CHAR ch; @@ -1461,6 +1496,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPM_OldSym((void*)name, 256, &*done); if (*done) { OPT_InMod(&mno); + OPT_InLinks(); OPT_impCtxt.nextTag = OPM_SymRInt(); while (!OPM_eofSF()) { obj = OPT_InObj(mno); @@ -1507,6 +1543,17 @@ static void OPT_OutMod (INT16 mno) } } +static void OPT_OutLinks (void) +{ + OPT_Link l = NIL; + l = OPT_Links; + while (l != NIL) { + OPT_OutName((void*)l->name, 256); + l = l->next; + } + OPM_SymWCh(0x00); +} + static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr) { INT32 i, j, n; @@ -1833,6 +1880,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) if (OPM_noerr) { OPM_SymWInt(16); OPT_OutName((void*)OPT_SelfName, 256); + OPT_OutLinks(); OPT_expCtxt.reffp = 0; OPT_expCtxt.ref = 14; OPT_expCtxt.nofm = 1; @@ -1854,7 +1902,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -1969,6 +2017,7 @@ static void EnumPtrs(void (*P)(void*)) P(OPT_universe); P(OPT_syslink); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P); + P(OPT_Links); } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 32), {0, -8}}; @@ -2008,6 +2057,7 @@ __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 1936, 1940, 1944, 1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, -2044}}; __TDESC(OPT_ExpCtxt, 1, 0) = {__TDFLDS("ExpCtxt", 72), {-4}}; +__TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 260), {256, -8}}; export void *OPT__init(void) { @@ -2024,6 +2074,7 @@ export void *OPT__init(void) __INITYP(OPT_NodeDesc, OPT_NodeDesc, 0); __INITYP(OPT_ImpCtxt, OPT_ImpCtxt, 0); __INITYP(OPT_ExpCtxt, OPT_ExpCtxt, 0); + __INITYP(OPT_LinkDesc, OPT_LinkDesc, 0); /* BEGIN */ OPT_topScope = NIL; OPT_OpenScope(0, NIL); diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 9a187fc7..7483f169 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h @@ -21,6 +21,15 @@ typedef LONGREAL realval; } OPT_ConstDesc; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -75,11 +84,13 @@ import INT8 OPT_nofGmod; import OPT_Object OPT_GlbMod[64]; import OPS_Name OPT_SelfName; import BOOLEAN OPT_SYSimported; +import OPT_Link OPT_Links; import ADDRESS *OPT_ConstDesc__typ; import ADDRESS *OPT_ObjDesc__typ; import ADDRESS *OPT_StrDesc__typ; import ADDRESS *OPT_NodeDesc__typ; +import ADDRESS *OPT_LinkDesc__typ; import void OPT_Align (INT32 *adr, INT32 base); import INT32 OPT_BaseAlignment (OPT_Struct typ); diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 96252046..152db225 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 5654d36e..7c94fced 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 9248cfc5..d1fba01a 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index ffbd6894..a7195e3a 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 027176ed..6117b38b 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 79d88e9d..521594dc 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 2ecd8371..11ad01bd 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 570e7d72..bf708519 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index f911a688..06972c90 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 7645aa6e..fd7f283d 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f73006a8..fe342ae1 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index d1e65c70..a8edeb78 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 1e0fffa9..baa92092 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 7522f9d1..4c0087ac 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index d2c67400..75768aca 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index fb167591..fb870961 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 454ea490..f26c1a32 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -20,9 +20,9 @@ #include "extTools.h" -static CHAR Compiler_mname[256]; +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len); export void Compiler_Module (BOOLEAN *done); static void Compiler_PropagateElementaryTypeSizes (void); export void Compiler_Translate (void); @@ -41,11 +41,12 @@ void Compiler_Module (BOOLEAN *done) OPT_Export(&ext, &new); if (OPM_noerr) { OPM_OpenFiles((void*)OPT_SelfName, 256); + OPM_DeleteObj((void*)OPT_SelfName, 256); OPC_Init(); OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -61,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -104,14 +105,44 @@ static void Compiler_PropagateElementaryTypeSizes (void) } } +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len) +{ + OPT_Link l = NIL; + CHAR fn[64]; + Platform_FileIdentity id; + objectnames[0] = 0x00; + l = OPT_Links; + while (l != NIL) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".sym", 5, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".o", 3, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); + Strings_Append(fn, 64, (void*)objectnames, objectnames__len); + } else { + OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); + OPM_LogWStr(l->name, 256); + OPM_LogWStr((CHAR*)", but local object file '", 26); + OPM_LogWStr(fn, 64); + OPM_LogWStr((CHAR*)"' is missing.", 14); + OPM_LogVT100((CHAR*)"0m", 3); + OPM_LogWLn(); + } + } + l = l->next; + } +} + void Compiler_Translate (void) { BOOLEAN done; - CHAR modulesobj[2048]; - modulesobj[0] = 0x00; + CHAR linkfiles[2048]; if (OPM_OpenPar()) { for (;;) { - OPM_Init(&done, (void*)Compiler_mname, 256); + OPM_Init(&done); if (!done) { return; } @@ -131,11 +162,9 @@ void Compiler_Translate (void) } else { if (!__IN(10, OPM_Options, 32)) { extTools_Assemble(OPM_modName, 32); - Strings_Append((CHAR*)" ", 2, (void*)modulesobj, 2048); - Strings_Append(OPM_modName, 32, (void*)modulesobj, 2048); - Strings_Append((CHAR*)".o", 3, (void*)modulesobj, 2048); } else { - extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), modulesobj, 2048); + Compiler_FindLocalObjectFiles((void*)linkfiles, 2048); + extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), linkfiles, 2048); } } } diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index abf165f3..18ec858a 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index eb712e53..efd4ae6e 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index d29c5510..dac5c5ff 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index e0812a5b..2291d7d8 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 495e451c..df3d086b 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 7429d8c8..7a464dbf 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 34c15ece..76891be3 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 42f06075..9f691749 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index c163c77e..3933cee1 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 7b8e9d38..9f8518b8 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index fef86e9e..24cd4f3f 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index a2b14bdc..99b9afb4 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index d09d6a7a..3411635b 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,7 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (void); +export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -58,7 +59,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); @@ -449,7 +450,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) +void OPM_Init (BOOLEAN *done) { Texts_Text T = NIL; INT32 beg, end, time; @@ -465,7 +466,6 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) Texts_Open(T, s, 256); OPM_LogWStr(s, 256); OPM_LogWStr((CHAR*)" ", 3); - __COPY(s, mname, mname__len); __COPY(s, OPM_SourceFileName, 256); if (T->len == 0) { OPM_LogWStr(s, 256); @@ -773,7 +773,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x82) { + if (tag != 0xf7 || ver != 0x83) { OPM_err(-306); OPM_CloseOldSym(); *done = 0; @@ -818,8 +818,20 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (void) +void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) { + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".sym", 5); + Files_Delete(fn, 32, &res); +} + +void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len) +{ + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".o", 3); + Files_Delete(fn, 32, &res); } void OPM_NewSym (CHAR *modName, ADDRESS modName__len) @@ -830,7 +842,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x82); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); } else { OPM_err(153); } @@ -984,7 +996,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR FName[32]; + OPM_FileName FName; __COPY(moduleName, OPM_modName, 32); OPM_HFile = Files_New((CHAR*)"", 1); if (OPM_HFile != NIL) { @@ -1010,7 +1022,7 @@ void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) void OPM_CloseFiles (void) { - CHAR FName[32]; + OPM_FileName FName; INT16 res; if (OPM_noerr) { OPM_LogWStr((CHAR*)" ", 3); @@ -1048,26 +1060,26 @@ void OPM_CloseFiles (void) static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) { - CHAR testpath[1024]; + CHAR testpath[4096]; Platform_FileIdentity identity; __DUP(s, s__len, CHAR); - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); - Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); - Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } @@ -1129,7 +1141,6 @@ export void *OPM__init(void) __REGMOD("OPM", EnumPtrs); __REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseOldSym", OPM_CloseOldSym); - __REGCMD("DeleteNewSym", OPM_DeleteNewSym); __REGCMD("InitOptions", OPM_InitOptions); __REGCMD("LogWLn", OPM_LogWLn); __REGCMD("RegisterNewSym", OPM_RegisterNewSym); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index dc86bc49..da0a48ee 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -23,13 +23,14 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (void); +import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 24e6b221..aad8367d 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1793,24 +1793,6 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) if (OPP_sym == 63) { OPS_Get(&OPP_sym); } else { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Unexpected symbol found when MODULE expected:", 46); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" sym: ", 15); - OPM_LogWNum(OPP_sym, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.name: ", 15); - OPM_LogWStr(OPS_name, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.str: ", 15); - OPM_LogWStr(OPS_str, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.numtyp: ", 15); - OPM_LogWNum(OPS_numtyp, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.intval: ", 15); - OPM_LogWNum(OPS_intval, 1); - OPM_LogWLn(); OPP_err(16); } if (OPP_sym == 38) { diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index bf0f96d7..dc8aa405 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 807c0ce5..d0a1851a 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index a15d8712..608979a8 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index e9db362e..b95c2810 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,6 +49,15 @@ typedef INT8 glbmno[64]; } OPT_ImpCtxt; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -101,6 +110,7 @@ static OPT_ExpCtxt OPT_expCtxt; static INT32 OPT_nofhdfld; static BOOLEAN OPT_newsf, OPT_findpc, OPT_extsf, OPT_sfpresent, OPT_symExtended, OPT_symNew; static INT32 OPT_recno; +export OPT_Link OPT_Links; export ADDRESS *OPT_ConstDesc__typ; export ADDRESS *OPT_ObjDesc__typ; @@ -108,6 +118,7 @@ export ADDRESS *OPT_StrDesc__typ; export ADDRESS *OPT_NodeDesc__typ; export ADDRESS *OPT_ImpCtxt__typ; export ADDRESS *OPT_ExpCtxt__typ; +export ADDRESS *OPT_LinkDesc__typ; export void OPT_Align (INT32 *adr, INT32 base); export INT32 OPT_BaseAlignment (OPT_Struct typ); @@ -131,6 +142,7 @@ export void OPT_IdFPrint (OPT_Struct typ); export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); +static void OPT_InLinks (void); static void OPT_InMod (INT8 *mno); static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); @@ -154,6 +166,7 @@ export void OPT_OpenScope (INT8 level, OPT_Object owner); static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); +static void OPT_OutLinks (void); static void OPT_OutMod (INT16 mno); static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); @@ -442,6 +455,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_findpc = __IN(8, opt, 32); OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; + __NEW(OPT_Links, OPT_LinkDesc); + __MOVE(name, OPT_Links->name, 256); } void OPT_Close (void) @@ -1011,6 +1026,26 @@ static void OPT_InMod (INT8 *mno) } } +static void OPT_InLinks (void) +{ + OPS_Name linkname; + OPT_Link l = NIL; + OPT_InName((void*)linkname, 256); + while (linkname[0] != 0x00) { + l = OPT_Links; + while ((l != NIL && __STRCMP(l->name, linkname) != 0)) { + l = l->next; + } + if (l == NIL) { + l = OPT_Links; + __NEW(OPT_Links, OPT_LinkDesc); + OPT_Links->next = l; + __MOVE(linkname, OPT_Links->name, 256); + } + OPT_InName((void*)linkname, 256); + } +} + static void OPT_InConstant (INT32 f, OPT_Const conval) { CHAR ch; @@ -1461,6 +1496,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPM_OldSym((void*)name, 256, &*done); if (*done) { OPT_InMod(&mno); + OPT_InLinks(); OPT_impCtxt.nextTag = OPM_SymRInt(); while (!OPM_eofSF()) { obj = OPT_InObj(mno); @@ -1507,6 +1543,17 @@ static void OPT_OutMod (INT16 mno) } } +static void OPT_OutLinks (void) +{ + OPT_Link l = NIL; + l = OPT_Links; + while (l != NIL) { + OPT_OutName((void*)l->name, 256); + l = l->next; + } + OPM_SymWCh(0x00); +} + static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr) { INT32 i, j, n; @@ -1833,6 +1880,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) if (OPM_noerr) { OPM_SymWInt(16); OPT_OutName((void*)OPT_SelfName, 256); + OPT_OutLinks(); OPT_expCtxt.reffp = 0; OPT_expCtxt.ref = 14; OPT_expCtxt.nofm = 1; @@ -1854,7 +1902,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -1969,6 +2017,7 @@ static void EnumPtrs(void (*P)(void*)) P(OPT_universe); P(OPT_syslink); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P); + P(OPT_Links); } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -8}}; @@ -2008,6 +2057,7 @@ __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 1936, 1940, 1944, 1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, -2044}}; __TDESC(OPT_ExpCtxt, 1, 0) = {__TDFLDS("ExpCtxt", 72), {-4}}; +__TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 260), {256, -8}}; export void *OPT__init(void) { @@ -2024,6 +2074,7 @@ export void *OPT__init(void) __INITYP(OPT_NodeDesc, OPT_NodeDesc, 0); __INITYP(OPT_ImpCtxt, OPT_ImpCtxt, 0); __INITYP(OPT_ExpCtxt, OPT_ExpCtxt, 0); + __INITYP(OPT_LinkDesc, OPT_LinkDesc, 0); /* BEGIN */ OPT_topScope = NIL; OPT_OpenScope(0, NIL); diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 9a187fc7..7483f169 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h @@ -21,6 +21,15 @@ typedef LONGREAL realval; } OPT_ConstDesc; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -75,11 +84,13 @@ import INT8 OPT_nofGmod; import OPT_Object OPT_GlbMod[64]; import OPS_Name OPT_SelfName; import BOOLEAN OPT_SYSimported; +import OPT_Link OPT_Links; import ADDRESS *OPT_ConstDesc__typ; import ADDRESS *OPT_ObjDesc__typ; import ADDRESS *OPT_StrDesc__typ; import ADDRESS *OPT_NodeDesc__typ; +import ADDRESS *OPT_LinkDesc__typ; import void OPT_Align (INT32 *adr, INT32 base); import INT32 OPT_BaseAlignment (OPT_Struct typ); diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 96252046..152db225 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 5654d36e..7c94fced 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 9248cfc5..d1fba01a 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index ffbd6894..a7195e3a 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 027176ed..6117b38b 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 79d88e9d..521594dc 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 2ecd8371..11ad01bd 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 570e7d72..bf708519 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index f911a688..06972c90 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 7645aa6e..fd7f283d 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index c0bfc16a..285e7ac0 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index cd0f72ee..7f7d6562 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 1e0fffa9..baa92092 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 7522f9d1..4c0087ac 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index d2c67400..75768aca 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index fb167591..fb870961 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 454ea490..f26c1a32 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -20,9 +20,9 @@ #include "extTools.h" -static CHAR Compiler_mname[256]; +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len); export void Compiler_Module (BOOLEAN *done); static void Compiler_PropagateElementaryTypeSizes (void); export void Compiler_Translate (void); @@ -41,11 +41,12 @@ void Compiler_Module (BOOLEAN *done) OPT_Export(&ext, &new); if (OPM_noerr) { OPM_OpenFiles((void*)OPT_SelfName, 256); + OPM_DeleteObj((void*)OPT_SelfName, 256); OPC_Init(); OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -61,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -104,14 +105,44 @@ static void Compiler_PropagateElementaryTypeSizes (void) } } +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len) +{ + OPT_Link l = NIL; + CHAR fn[64]; + Platform_FileIdentity id; + objectnames[0] = 0x00; + l = OPT_Links; + while (l != NIL) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".sym", 5, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".o", 3, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); + Strings_Append(fn, 64, (void*)objectnames, objectnames__len); + } else { + OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); + OPM_LogWStr(l->name, 256); + OPM_LogWStr((CHAR*)", but local object file '", 26); + OPM_LogWStr(fn, 64); + OPM_LogWStr((CHAR*)"' is missing.", 14); + OPM_LogVT100((CHAR*)"0m", 3); + OPM_LogWLn(); + } + } + l = l->next; + } +} + void Compiler_Translate (void) { BOOLEAN done; - CHAR modulesobj[2048]; - modulesobj[0] = 0x00; + CHAR linkfiles[2048]; if (OPM_OpenPar()) { for (;;) { - OPM_Init(&done, (void*)Compiler_mname, 256); + OPM_Init(&done); if (!done) { return; } @@ -131,11 +162,9 @@ void Compiler_Translate (void) } else { if (!__IN(10, OPM_Options, 32)) { extTools_Assemble(OPM_modName, 32); - Strings_Append((CHAR*)" ", 2, (void*)modulesobj, 2048); - Strings_Append(OPM_modName, 32, (void*)modulesobj, 2048); - Strings_Append((CHAR*)".o", 3, (void*)modulesobj, 2048); } else { - extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), modulesobj, 2048); + Compiler_FindLocalObjectFiles((void*)linkfiles, 2048); + extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), linkfiles, 2048); } } } diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index abf165f3..18ec858a 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index eb712e53..efd4ae6e 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 3aeb5911..4a5cec7c 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index b67b65f7..987ffaf2 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 3f4e96ee..ba215672 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index aac7c8fe..bbd83594 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 821e6801..037d74d0 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index c7f011df..be3fd68b 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index c163c77e..3933cee1 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 7b8e9d38..9f8518b8 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index fef86e9e..24cd4f3f 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index a2b14bdc..99b9afb4 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index cb39afd5..2bc2c145 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,7 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (void); +export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -58,7 +59,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); @@ -449,7 +450,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) +void OPM_Init (BOOLEAN *done) { Texts_Text T = NIL; INT32 beg, end, time; @@ -465,7 +466,6 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) Texts_Open(T, s, 256); OPM_LogWStr(s, 256); OPM_LogWStr((CHAR*)" ", 3); - __COPY(s, mname, mname__len); __COPY(s, OPM_SourceFileName, 256); if (T->len == 0) { OPM_LogWStr(s, 256); @@ -773,7 +773,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x82) { + if (tag != 0xf7 || ver != 0x83) { OPM_err(-306); OPM_CloseOldSym(); *done = 0; @@ -818,8 +818,20 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (void) +void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) { + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".sym", 5); + Files_Delete(fn, 32, &res); +} + +void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len) +{ + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".o", 3); + Files_Delete(fn, 32, &res); } void OPM_NewSym (CHAR *modName, ADDRESS modName__len) @@ -830,7 +842,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x82); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); } else { OPM_err(153); } @@ -984,7 +996,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR FName[32]; + OPM_FileName FName; __COPY(moduleName, OPM_modName, 32); OPM_HFile = Files_New((CHAR*)"", 1); if (OPM_HFile != NIL) { @@ -1010,7 +1022,7 @@ void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) void OPM_CloseFiles (void) { - CHAR FName[32]; + OPM_FileName FName; INT16 res; if (OPM_noerr) { OPM_LogWStr((CHAR*)" ", 3); @@ -1048,26 +1060,26 @@ void OPM_CloseFiles (void) static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) { - CHAR testpath[1024]; + CHAR testpath[4096]; Platform_FileIdentity identity; __DUP(s, s__len, CHAR); - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); - Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); - Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } @@ -1129,7 +1141,6 @@ export void *OPM__init(void) __REGMOD("OPM", EnumPtrs); __REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseOldSym", OPM_CloseOldSym); - __REGCMD("DeleteNewSym", OPM_DeleteNewSym); __REGCMD("InitOptions", OPM_InitOptions); __REGCMD("LogWLn", OPM_LogWLn); __REGCMD("RegisterNewSym", OPM_RegisterNewSym); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index dc86bc49..da0a48ee 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -23,13 +23,14 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (void); +import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 25c453d1..0a6a6796 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1793,24 +1793,6 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) if (OPP_sym == 63) { OPS_Get(&OPP_sym); } else { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Unexpected symbol found when MODULE expected:", 46); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" sym: ", 15); - OPM_LogWNum(OPP_sym, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.name: ", 15); - OPM_LogWStr(OPS_name, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.str: ", 15); - OPM_LogWStr(OPS_str, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.numtyp: ", 15); - OPM_LogWNum(OPS_numtyp, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.intval: ", 15); - OPM_LogWNum(OPS_intval, 1); - OPM_LogWLn(); OPP_err(16); } if (OPP_sym == 38) { diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index bf0f96d7..dc8aa405 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 807c0ce5..d0a1851a 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index a15d8712..608979a8 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 8fb5d86e..1a106cda 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,6 +49,15 @@ typedef INT8 glbmno[64]; } OPT_ImpCtxt; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -101,6 +110,7 @@ static OPT_ExpCtxt OPT_expCtxt; static INT32 OPT_nofhdfld; static BOOLEAN OPT_newsf, OPT_findpc, OPT_extsf, OPT_sfpresent, OPT_symExtended, OPT_symNew; static INT32 OPT_recno; +export OPT_Link OPT_Links; export ADDRESS *OPT_ConstDesc__typ; export ADDRESS *OPT_ObjDesc__typ; @@ -108,6 +118,7 @@ export ADDRESS *OPT_StrDesc__typ; export ADDRESS *OPT_NodeDesc__typ; export ADDRESS *OPT_ImpCtxt__typ; export ADDRESS *OPT_ExpCtxt__typ; +export ADDRESS *OPT_LinkDesc__typ; export void OPT_Align (INT32 *adr, INT32 base); export INT32 OPT_BaseAlignment (OPT_Struct typ); @@ -131,6 +142,7 @@ export void OPT_IdFPrint (OPT_Struct typ); export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); +static void OPT_InLinks (void); static void OPT_InMod (INT8 *mno); static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); @@ -154,6 +166,7 @@ export void OPT_OpenScope (INT8 level, OPT_Object owner); static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); +static void OPT_OutLinks (void); static void OPT_OutMod (INT16 mno); static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); @@ -442,6 +455,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_findpc = __IN(8, opt, 32); OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; + __NEW(OPT_Links, OPT_LinkDesc); + __MOVE(name, OPT_Links->name, 256); } void OPT_Close (void) @@ -1011,6 +1026,26 @@ static void OPT_InMod (INT8 *mno) } } +static void OPT_InLinks (void) +{ + OPS_Name linkname; + OPT_Link l = NIL; + OPT_InName((void*)linkname, 256); + while (linkname[0] != 0x00) { + l = OPT_Links; + while ((l != NIL && __STRCMP(l->name, linkname) != 0)) { + l = l->next; + } + if (l == NIL) { + l = OPT_Links; + __NEW(OPT_Links, OPT_LinkDesc); + OPT_Links->next = l; + __MOVE(linkname, OPT_Links->name, 256); + } + OPT_InName((void*)linkname, 256); + } +} + static void OPT_InConstant (INT32 f, OPT_Const conval) { CHAR ch; @@ -1461,6 +1496,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPM_OldSym((void*)name, 256, &*done); if (*done) { OPT_InMod(&mno); + OPT_InLinks(); OPT_impCtxt.nextTag = OPM_SymRInt(); while (!OPM_eofSF()) { obj = OPT_InObj(mno); @@ -1507,6 +1543,17 @@ static void OPT_OutMod (INT16 mno) } } +static void OPT_OutLinks (void) +{ + OPT_Link l = NIL; + l = OPT_Links; + while (l != NIL) { + OPT_OutName((void*)l->name, 256); + l = l->next; + } + OPM_SymWCh(0x00); +} + static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr) { INT32 i, j, n; @@ -1833,6 +1880,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) if (OPM_noerr) { OPM_SymWInt(16); OPT_OutName((void*)OPT_SelfName, 256); + OPT_OutLinks(); OPT_expCtxt.reffp = 0; OPT_expCtxt.ref = 14; OPT_expCtxt.nofm = 1; @@ -1854,7 +1902,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -1969,6 +2017,7 @@ static void EnumPtrs(void (*P)(void*)) P(OPT_universe); P(OPT_syslink); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 5184, 1, P); + P(OPT_Links); } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -16}}; @@ -2008,6 +2057,7 @@ __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 5184), {16, 24, 32, 40, 48, 3856, 3864, 3872, 3880, 3888, 3896, 3904, 3912, 3920, 3928, 3936, 3944, 3952, 3960, 3968, 3976, 3984, 3992, 4000, 4008, 4016, 4024, 4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088, -4088}}; __TDESC(OPT_ExpCtxt, 1, 0) = {__TDFLDS("ExpCtxt", 72), {-8}}; +__TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 264), {256, -16}}; export void *OPT__init(void) { @@ -2024,6 +2074,7 @@ export void *OPT__init(void) __INITYP(OPT_NodeDesc, OPT_NodeDesc, 0); __INITYP(OPT_ImpCtxt, OPT_ImpCtxt, 0); __INITYP(OPT_ExpCtxt, OPT_ExpCtxt, 0); + __INITYP(OPT_LinkDesc, OPT_LinkDesc, 0); /* BEGIN */ OPT_topScope = NIL; OPT_OpenScope(0, NIL); diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 9a187fc7..7483f169 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h @@ -21,6 +21,15 @@ typedef LONGREAL realval; } OPT_ConstDesc; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -75,11 +84,13 @@ import INT8 OPT_nofGmod; import OPT_Object OPT_GlbMod[64]; import OPS_Name OPT_SelfName; import BOOLEAN OPT_SYSimported; +import OPT_Link OPT_Links; import ADDRESS *OPT_ConstDesc__typ; import ADDRESS *OPT_ObjDesc__typ; import ADDRESS *OPT_StrDesc__typ; import ADDRESS *OPT_NodeDesc__typ; +import ADDRESS *OPT_LinkDesc__typ; import void OPT_Align (INT32 *adr, INT32 base); import INT32 OPT_BaseAlignment (OPT_Struct typ); diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index ab98ed73..4d29b076 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 5654d36e..7c94fced 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a55f91eb..e24a77fc 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index b846b299..311e737d 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 56d7144c..7ed88d75 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 000bcc79..9b911314 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 2ecd8371..11ad01bd 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 570e7d72..bf708519 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index f911a688..06972c90 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 7645aa6e..fd7f283d 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 74cd62c7..2bfa4511 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index be7b64a2..21401f61 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 1e0fffa9..baa92092 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 7522f9d1..4c0087ac 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index d2c67400..75768aca 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index fb167591..fb870961 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 454ea490..f26c1a32 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -20,9 +20,9 @@ #include "extTools.h" -static CHAR Compiler_mname[256]; +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len); export void Compiler_Module (BOOLEAN *done); static void Compiler_PropagateElementaryTypeSizes (void); export void Compiler_Translate (void); @@ -41,11 +41,12 @@ void Compiler_Module (BOOLEAN *done) OPT_Export(&ext, &new); if (OPM_noerr) { OPM_OpenFiles((void*)OPT_SelfName, 256); + OPM_DeleteObj((void*)OPT_SelfName, 256); OPC_Init(); OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -61,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -104,14 +105,44 @@ static void Compiler_PropagateElementaryTypeSizes (void) } } +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len) +{ + OPT_Link l = NIL; + CHAR fn[64]; + Platform_FileIdentity id; + objectnames[0] = 0x00; + l = OPT_Links; + while (l != NIL) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".sym", 5, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".o", 3, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); + Strings_Append(fn, 64, (void*)objectnames, objectnames__len); + } else { + OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); + OPM_LogWStr(l->name, 256); + OPM_LogWStr((CHAR*)", but local object file '", 26); + OPM_LogWStr(fn, 64); + OPM_LogWStr((CHAR*)"' is missing.", 14); + OPM_LogVT100((CHAR*)"0m", 3); + OPM_LogWLn(); + } + } + l = l->next; + } +} + void Compiler_Translate (void) { BOOLEAN done; - CHAR modulesobj[2048]; - modulesobj[0] = 0x00; + CHAR linkfiles[2048]; if (OPM_OpenPar()) { for (;;) { - OPM_Init(&done, (void*)Compiler_mname, 256); + OPM_Init(&done); if (!done) { return; } @@ -131,11 +162,9 @@ void Compiler_Translate (void) } else { if (!__IN(10, OPM_Options, 32)) { extTools_Assemble(OPM_modName, 32); - Strings_Append((CHAR*)" ", 2, (void*)modulesobj, 2048); - Strings_Append(OPM_modName, 32, (void*)modulesobj, 2048); - Strings_Append((CHAR*)".o", 3, (void*)modulesobj, 2048); } else { - extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), modulesobj, 2048); + Compiler_FindLocalObjectFiles((void*)linkfiles, 2048); + extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), linkfiles, 2048); } } } diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index abf165f3..18ec858a 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index eb712e53..efd4ae6e 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 38d67ccf..a5c597ca 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index e1da6139..63eaa089 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 495e451c..df3d086b 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 7429d8c8..7a464dbf 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 9cd53060..859d31ba 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 42f06075..9f691749 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index c163c77e..3933cee1 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 7b8e9d38..9f8518b8 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index fef86e9e..24cd4f3f 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index a2b14bdc..99b9afb4 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index d09d6a7a..3411635b 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,7 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (void); +export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -58,7 +59,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); @@ -449,7 +450,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) +void OPM_Init (BOOLEAN *done) { Texts_Text T = NIL; INT32 beg, end, time; @@ -465,7 +466,6 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) Texts_Open(T, s, 256); OPM_LogWStr(s, 256); OPM_LogWStr((CHAR*)" ", 3); - __COPY(s, mname, mname__len); __COPY(s, OPM_SourceFileName, 256); if (T->len == 0) { OPM_LogWStr(s, 256); @@ -773,7 +773,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x82) { + if (tag != 0xf7 || ver != 0x83) { OPM_err(-306); OPM_CloseOldSym(); *done = 0; @@ -818,8 +818,20 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (void) +void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) { + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".sym", 5); + Files_Delete(fn, 32, &res); +} + +void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len) +{ + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".o", 3); + Files_Delete(fn, 32, &res); } void OPM_NewSym (CHAR *modName, ADDRESS modName__len) @@ -830,7 +842,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x82); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); } else { OPM_err(153); } @@ -984,7 +996,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR FName[32]; + OPM_FileName FName; __COPY(moduleName, OPM_modName, 32); OPM_HFile = Files_New((CHAR*)"", 1); if (OPM_HFile != NIL) { @@ -1010,7 +1022,7 @@ void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) void OPM_CloseFiles (void) { - CHAR FName[32]; + OPM_FileName FName; INT16 res; if (OPM_noerr) { OPM_LogWStr((CHAR*)" ", 3); @@ -1048,26 +1060,26 @@ void OPM_CloseFiles (void) static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) { - CHAR testpath[1024]; + CHAR testpath[4096]; Platform_FileIdentity identity; __DUP(s, s__len, CHAR); - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); - Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); - Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } @@ -1129,7 +1141,6 @@ export void *OPM__init(void) __REGMOD("OPM", EnumPtrs); __REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseOldSym", OPM_CloseOldSym); - __REGCMD("DeleteNewSym", OPM_DeleteNewSym); __REGCMD("InitOptions", OPM_InitOptions); __REGCMD("LogWLn", OPM_LogWLn); __REGCMD("RegisterNewSym", OPM_RegisterNewSym); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index dc86bc49..da0a48ee 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -23,13 +23,14 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (void); +import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 24e6b221..aad8367d 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1793,24 +1793,6 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) if (OPP_sym == 63) { OPS_Get(&OPP_sym); } else { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Unexpected symbol found when MODULE expected:", 46); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" sym: ", 15); - OPM_LogWNum(OPP_sym, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.name: ", 15); - OPM_LogWStr(OPS_name, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.str: ", 15); - OPM_LogWStr(OPS_str, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.numtyp: ", 15); - OPM_LogWNum(OPS_numtyp, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.intval: ", 15); - OPM_LogWNum(OPS_intval, 1); - OPM_LogWLn(); OPP_err(16); } if (OPP_sym == 38) { diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index bf0f96d7..dc8aa405 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 807c0ce5..d0a1851a 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index a15d8712..608979a8 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index e9db362e..b95c2810 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,6 +49,15 @@ typedef INT8 glbmno[64]; } OPT_ImpCtxt; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -101,6 +110,7 @@ static OPT_ExpCtxt OPT_expCtxt; static INT32 OPT_nofhdfld; static BOOLEAN OPT_newsf, OPT_findpc, OPT_extsf, OPT_sfpresent, OPT_symExtended, OPT_symNew; static INT32 OPT_recno; +export OPT_Link OPT_Links; export ADDRESS *OPT_ConstDesc__typ; export ADDRESS *OPT_ObjDesc__typ; @@ -108,6 +118,7 @@ export ADDRESS *OPT_StrDesc__typ; export ADDRESS *OPT_NodeDesc__typ; export ADDRESS *OPT_ImpCtxt__typ; export ADDRESS *OPT_ExpCtxt__typ; +export ADDRESS *OPT_LinkDesc__typ; export void OPT_Align (INT32 *adr, INT32 base); export INT32 OPT_BaseAlignment (OPT_Struct typ); @@ -131,6 +142,7 @@ export void OPT_IdFPrint (OPT_Struct typ); export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); +static void OPT_InLinks (void); static void OPT_InMod (INT8 *mno); static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); @@ -154,6 +166,7 @@ export void OPT_OpenScope (INT8 level, OPT_Object owner); static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); +static void OPT_OutLinks (void); static void OPT_OutMod (INT16 mno); static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); @@ -442,6 +455,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_findpc = __IN(8, opt, 32); OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; + __NEW(OPT_Links, OPT_LinkDesc); + __MOVE(name, OPT_Links->name, 256); } void OPT_Close (void) @@ -1011,6 +1026,26 @@ static void OPT_InMod (INT8 *mno) } } +static void OPT_InLinks (void) +{ + OPS_Name linkname; + OPT_Link l = NIL; + OPT_InName((void*)linkname, 256); + while (linkname[0] != 0x00) { + l = OPT_Links; + while ((l != NIL && __STRCMP(l->name, linkname) != 0)) { + l = l->next; + } + if (l == NIL) { + l = OPT_Links; + __NEW(OPT_Links, OPT_LinkDesc); + OPT_Links->next = l; + __MOVE(linkname, OPT_Links->name, 256); + } + OPT_InName((void*)linkname, 256); + } +} + static void OPT_InConstant (INT32 f, OPT_Const conval) { CHAR ch; @@ -1461,6 +1496,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPM_OldSym((void*)name, 256, &*done); if (*done) { OPT_InMod(&mno); + OPT_InLinks(); OPT_impCtxt.nextTag = OPM_SymRInt(); while (!OPM_eofSF()) { obj = OPT_InObj(mno); @@ -1507,6 +1543,17 @@ static void OPT_OutMod (INT16 mno) } } +static void OPT_OutLinks (void) +{ + OPT_Link l = NIL; + l = OPT_Links; + while (l != NIL) { + OPT_OutName((void*)l->name, 256); + l = l->next; + } + OPM_SymWCh(0x00); +} + static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr) { INT32 i, j, n; @@ -1833,6 +1880,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) if (OPM_noerr) { OPM_SymWInt(16); OPT_OutName((void*)OPT_SelfName, 256); + OPT_OutLinks(); OPT_expCtxt.reffp = 0; OPT_expCtxt.ref = 14; OPT_expCtxt.nofm = 1; @@ -1854,7 +1902,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -1969,6 +2017,7 @@ static void EnumPtrs(void (*P)(void*)) P(OPT_universe); P(OPT_syslink); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 3140, 1, P); + P(OPT_Links); } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -8}}; @@ -2008,6 +2057,7 @@ __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 1936, 1940, 1944, 1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, -2044}}; __TDESC(OPT_ExpCtxt, 1, 0) = {__TDFLDS("ExpCtxt", 72), {-4}}; +__TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 260), {256, -8}}; export void *OPT__init(void) { @@ -2024,6 +2074,7 @@ export void *OPT__init(void) __INITYP(OPT_NodeDesc, OPT_NodeDesc, 0); __INITYP(OPT_ImpCtxt, OPT_ImpCtxt, 0); __INITYP(OPT_ExpCtxt, OPT_ExpCtxt, 0); + __INITYP(OPT_LinkDesc, OPT_LinkDesc, 0); /* BEGIN */ OPT_topScope = NIL; OPT_OpenScope(0, NIL); diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 9a187fc7..7483f169 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h @@ -21,6 +21,15 @@ typedef LONGREAL realval; } OPT_ConstDesc; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -75,11 +84,13 @@ import INT8 OPT_nofGmod; import OPT_Object OPT_GlbMod[64]; import OPS_Name OPT_SelfName; import BOOLEAN OPT_SYSimported; +import OPT_Link OPT_Links; import ADDRESS *OPT_ConstDesc__typ; import ADDRESS *OPT_ObjDesc__typ; import ADDRESS *OPT_StrDesc__typ; import ADDRESS *OPT_NodeDesc__typ; +import ADDRESS *OPT_LinkDesc__typ; import void OPT_Align (INT32 *adr, INT32 base); import INT32 OPT_BaseAlignment (OPT_Struct typ); diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 96252046..152db225 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 5654d36e..7c94fced 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 932297a3..b5ffb6ae 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index ffbd6894..a7195e3a 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index cc0bd221..73b65c9d 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index f74a75bf..95a1066e 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 2ecd8371..11ad01bd 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 570e7d72..bf708519 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index f911a688..06972c90 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 7645aa6e..fd7f283d 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index c0bfc16a..285e7ac0 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index cd0f72ee..7f7d6562 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 1e0fffa9..baa92092 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 7522f9d1..4c0087ac 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index d2c67400..75768aca 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index fb167591..fb870961 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 454ea490..f26c1a32 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -20,9 +20,9 @@ #include "extTools.h" -static CHAR Compiler_mname[256]; +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len); export void Compiler_Module (BOOLEAN *done); static void Compiler_PropagateElementaryTypeSizes (void); export void Compiler_Translate (void); @@ -41,11 +41,12 @@ void Compiler_Module (BOOLEAN *done) OPT_Export(&ext, &new); if (OPM_noerr) { OPM_OpenFiles((void*)OPT_SelfName, 256); + OPM_DeleteObj((void*)OPT_SelfName, 256); OPC_Init(); OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -61,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -104,14 +105,44 @@ static void Compiler_PropagateElementaryTypeSizes (void) } } +static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectnames__len) +{ + OPT_Link l = NIL; + CHAR fn[64]; + Platform_FileIdentity id; + objectnames[0] = 0x00; + l = OPT_Links; + while (l != NIL) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".sym", 5, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + __COPY(l->name, fn, 64); + Strings_Append((CHAR*)".o", 3, (void*)fn, 64); + if (Platform_IdentifyByName(fn, 64, &id, Platform_FileIdentity__typ) == 0) { + Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); + Strings_Append(fn, 64, (void*)objectnames, objectnames__len); + } else { + OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); + OPM_LogWStr(l->name, 256); + OPM_LogWStr((CHAR*)", but local object file '", 26); + OPM_LogWStr(fn, 64); + OPM_LogWStr((CHAR*)"' is missing.", 14); + OPM_LogVT100((CHAR*)"0m", 3); + OPM_LogWLn(); + } + } + l = l->next; + } +} + void Compiler_Translate (void) { BOOLEAN done; - CHAR modulesobj[2048]; - modulesobj[0] = 0x00; + CHAR linkfiles[2048]; if (OPM_OpenPar()) { for (;;) { - OPM_Init(&done, (void*)Compiler_mname, 256); + OPM_Init(&done); if (!done) { return; } @@ -131,11 +162,9 @@ void Compiler_Translate (void) } else { if (!__IN(10, OPM_Options, 32)) { extTools_Assemble(OPM_modName, 32); - Strings_Append((CHAR*)" ", 2, (void*)modulesobj, 2048); - Strings_Append(OPM_modName, 32, (void*)modulesobj, 2048); - Strings_Append((CHAR*)".o", 3, (void*)modulesobj, 2048); } else { - extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), modulesobj, 2048); + Compiler_FindLocalObjectFiles((void*)linkfiles, 2048); + extTools_LinkMain((void*)OPM_modName, 32, __IN(15, OPM_Options, 32), linkfiles, 2048); } } } diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index abf165f3..18ec858a 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index eb712e53..efd4ae6e 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index b9056935..206de2b2 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 616c3fe1..ef890edf 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 3f4e96ee..ba215672 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index aac7c8fe..bbd83594 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 50348111..16daab43 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index c7f011df..be3fd68b 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index c163c77e..3933cee1 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 7b8e9d38..9f8518b8 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index fef86e9e..24cd4f3f 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index a2b14bdc..99b9afb4 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index cb39afd5..2bc2c145 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,7 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (void); +export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -58,7 +59,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); -export void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); @@ -449,7 +450,7 @@ void OPM_InitOptions (void) Files_SetSearchPath(searchpath, 1024); } -void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) +void OPM_Init (BOOLEAN *done) { Texts_Text T = NIL; INT32 beg, end, time; @@ -465,7 +466,6 @@ void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len) Texts_Open(T, s, 256); OPM_LogWStr(s, 256); OPM_LogWStr((CHAR*)" ", 3); - __COPY(s, mname, mname__len); __COPY(s, OPM_SourceFileName, 256); if (T->len == 0) { OPM_LogWStr(s, 256); @@ -773,7 +773,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x82) { + if (tag != 0xf7 || ver != 0x83) { OPM_err(-306); OPM_CloseOldSym(); *done = 0; @@ -818,8 +818,20 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (void) +void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) { + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".sym", 5); + Files_Delete(fn, 32, &res); +} + +void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len) +{ + OPM_FileName fn; + INT16 res; + OPM_MakeFileName((void*)modulename, modulename__len, (void*)fn, 32, (CHAR*)".o", 3); + Files_Delete(fn, 32, &res); } void OPM_NewSym (CHAR *modName, ADDRESS modName__len) @@ -830,7 +842,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x82); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); } else { OPM_err(153); } @@ -984,7 +996,7 @@ static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F) void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR FName[32]; + OPM_FileName FName; __COPY(moduleName, OPM_modName, 32); OPM_HFile = Files_New((CHAR*)"", 1); if (OPM_HFile != NIL) { @@ -1010,7 +1022,7 @@ void OPM_OpenFiles (CHAR *moduleName, ADDRESS moduleName__len) void OPM_CloseFiles (void) { - CHAR FName[32]; + OPM_FileName FName; INT16 res; if (OPM_noerr) { OPM_LogWStr((CHAR*)" ", 3); @@ -1048,26 +1060,26 @@ void OPM_CloseFiles (void) static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len) { - CHAR testpath[1024]; + CHAR testpath[4096]; Platform_FileIdentity identity; __DUP(s, s__len, CHAR); - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 1024); - Strings_Append((CHAR*)"voc", 4, (void*)testpath, 1024); - Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096); + Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096); + Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } - __COPY(OPM_InstallDir, testpath, 1024); - Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 1024); - if (Platform_IdentifyByName(testpath, 1024, &identity, Platform_FileIdentity__typ) != 0) { + __COPY(OPM_InstallDir, testpath, 4096); + Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096); + if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) { __DEL(s); return 0; } @@ -1129,7 +1141,6 @@ export void *OPM__init(void) __REGMOD("OPM", EnumPtrs); __REGCMD("CloseFiles", OPM_CloseFiles); __REGCMD("CloseOldSym", OPM_CloseOldSym); - __REGCMD("DeleteNewSym", OPM_DeleteNewSym); __REGCMD("InitOptions", OPM_InitOptions); __REGCMD("LogWLn", OPM_LogWLn); __REGCMD("RegisterNewSym", OPM_RegisterNewSym); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index dc86bc49..da0a48ee 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -23,13 +23,14 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (void); +import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); -import void OPM_Init (BOOLEAN *done, CHAR *mname, ADDRESS mname__len); +import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 25c453d1..0a6a6796 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1793,24 +1793,6 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) if (OPP_sym == 63) { OPS_Get(&OPP_sym); } else { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Unexpected symbol found when MODULE expected:", 46); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" sym: ", 15); - OPM_LogWNum(OPP_sym, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.name: ", 15); - OPM_LogWStr(OPS_name, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.str: ", 15); - OPM_LogWStr(OPS_str, 256); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.numtyp: ", 15); - OPM_LogWNum(OPS_numtyp, 1); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)" OPS.intval: ", 15); - OPM_LogWNum(OPS_intval, 1); - OPM_LogWLn(); OPP_err(16); } if (OPP_sym == 38) { diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index bf0f96d7..dc8aa405 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 807c0ce5..d0a1851a 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index a15d8712..608979a8 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 8fb5d86e..1a106cda 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -49,6 +49,15 @@ typedef INT8 glbmno[64]; } OPT_ImpCtxt; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -101,6 +110,7 @@ static OPT_ExpCtxt OPT_expCtxt; static INT32 OPT_nofhdfld; static BOOLEAN OPT_newsf, OPT_findpc, OPT_extsf, OPT_sfpresent, OPT_symExtended, OPT_symNew; static INT32 OPT_recno; +export OPT_Link OPT_Links; export ADDRESS *OPT_ConstDesc__typ; export ADDRESS *OPT_ObjDesc__typ; @@ -108,6 +118,7 @@ export ADDRESS *OPT_StrDesc__typ; export ADDRESS *OPT_NodeDesc__typ; export ADDRESS *OPT_ImpCtxt__typ; export ADDRESS *OPT_ExpCtxt__typ; +export ADDRESS *OPT_LinkDesc__typ; export void OPT_Align (INT32 *adr, INT32 base); export INT32 OPT_BaseAlignment (OPT_Struct typ); @@ -131,6 +142,7 @@ export void OPT_IdFPrint (OPT_Struct typ); export void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); static void OPT_InConstant (INT32 f, OPT_Const conval); static OPT_Object OPT_InFld (void); +static void OPT_InLinks (void); static void OPT_InMod (INT8 *mno); static void OPT_InName (CHAR *name, ADDRESS name__len); static OPT_Object OPT_InObj (INT8 mno); @@ -154,6 +166,7 @@ export void OPT_OpenScope (INT8 level, OPT_Object owner); static void OPT_OutConstant (OPT_Object obj); static void OPT_OutFlds (OPT_Object fld, INT32 adr, BOOLEAN visible); static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr); +static void OPT_OutLinks (void); static void OPT_OutMod (INT16 mno); static void OPT_OutName (CHAR *name, ADDRESS name__len); static void OPT_OutObj (OPT_Object obj); @@ -442,6 +455,8 @@ void OPT_Init (OPS_Name name, UINT32 opt) OPT_findpc = __IN(8, opt, 32); OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; + __NEW(OPT_Links, OPT_LinkDesc); + __MOVE(name, OPT_Links->name, 256); } void OPT_Close (void) @@ -1011,6 +1026,26 @@ static void OPT_InMod (INT8 *mno) } } +static void OPT_InLinks (void) +{ + OPS_Name linkname; + OPT_Link l = NIL; + OPT_InName((void*)linkname, 256); + while (linkname[0] != 0x00) { + l = OPT_Links; + while ((l != NIL && __STRCMP(l->name, linkname) != 0)) { + l = l->next; + } + if (l == NIL) { + l = OPT_Links; + __NEW(OPT_Links, OPT_LinkDesc); + OPT_Links->next = l; + __MOVE(linkname, OPT_Links->name, 256); + } + OPT_InName((void*)linkname, 256); + } +} + static void OPT_InConstant (INT32 f, OPT_Const conval) { CHAR ch; @@ -1461,6 +1496,7 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPM_OldSym((void*)name, 256, &*done); if (*done) { OPT_InMod(&mno); + OPT_InLinks(); OPT_impCtxt.nextTag = OPM_SymRInt(); while (!OPM_eofSF()) { obj = OPT_InObj(mno); @@ -1507,6 +1543,17 @@ static void OPT_OutMod (INT16 mno) } } +static void OPT_OutLinks (void) +{ + OPT_Link l = NIL; + l = OPT_Links; + while (l != NIL) { + OPT_OutName((void*)l->name, 256); + l = l->next; + } + OPM_SymWCh(0x00); +} + static void OPT_OutHdFld (OPT_Struct typ, OPT_Object fld, INT32 adr) { INT32 i, j, n; @@ -1833,6 +1880,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) if (OPM_noerr) { OPM_SymWInt(16); OPT_OutName((void*)OPT_SelfName, 256); + OPT_OutLinks(); OPT_expCtxt.reffp = 0; OPT_expCtxt.ref = 14; OPT_expCtxt.nofm = 1; @@ -1854,7 +1902,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym(); + OPM_DeleteNewSym((void*)OPT_SelfName, 256); } } } @@ -1969,6 +2017,7 @@ static void EnumPtrs(void (*P)(void*)) P(OPT_universe); P(OPT_syslink); __ENUMR(&OPT_impCtxt, OPT_ImpCtxt__typ, 5184, 1, P); + P(OPT_Links); } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -16}}; @@ -2008,6 +2057,7 @@ __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 5184), {16, 24, 32, 40, 48, 3856, 3864, 3872, 3880, 3888, 3896, 3904, 3912, 3920, 3928, 3936, 3944, 3952, 3960, 3968, 3976, 3984, 3992, 4000, 4008, 4016, 4024, 4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088, -4088}}; __TDESC(OPT_ExpCtxt, 1, 0) = {__TDFLDS("ExpCtxt", 72), {-8}}; +__TDESC(OPT_LinkDesc, 1, 1) = {__TDFLDS("LinkDesc", 264), {256, -16}}; export void *OPT__init(void) { @@ -2024,6 +2074,7 @@ export void *OPT__init(void) __INITYP(OPT_NodeDesc, OPT_NodeDesc, 0); __INITYP(OPT_ImpCtxt, OPT_ImpCtxt, 0); __INITYP(OPT_ExpCtxt, OPT_ExpCtxt, 0); + __INITYP(OPT_LinkDesc, OPT_LinkDesc, 0); /* BEGIN */ OPT_topScope = NIL; OPT_OpenScope(0, NIL); diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 9a187fc7..7483f169 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h @@ -21,6 +21,15 @@ typedef LONGREAL realval; } OPT_ConstDesc; +typedef + struct OPT_LinkDesc *OPT_Link; + +typedef + struct OPT_LinkDesc { + OPS_Name name; + OPT_Link next; + } OPT_LinkDesc; + typedef struct OPT_NodeDesc *OPT_Node; @@ -75,11 +84,13 @@ import INT8 OPT_nofGmod; import OPT_Object OPT_GlbMod[64]; import OPS_Name OPT_SelfName; import BOOLEAN OPT_SYSimported; +import OPT_Link OPT_Links; import ADDRESS *OPT_ConstDesc__typ; import ADDRESS *OPT_ObjDesc__typ; import ADDRESS *OPT_StrDesc__typ; import ADDRESS *OPT_NodeDesc__typ; +import ADDRESS *OPT_LinkDesc__typ; import void OPT_Align (INT32 *adr, INT32 base); import INT32 OPT_BaseAlignment (OPT_Struct typ); diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index ab98ed73..4d29b076 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 5654d36e..7c94fced 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 87f59955..01c22546 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index b846b299..311e737d 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b47b0d82..944c4407 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 76ed0ffb..4311c64a 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 2ecd8371..11ad01bd 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 570e7d72..bf708519 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index f911a688..06972c90 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 7645aa6e..fd7f283d 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 74cd62c7..2bfa4511 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index be7b64a2..21401f61 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 1e0fffa9..baa92092 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 7522f9d1..4c0087ac 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index d2c67400..75768aca 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index fb167591..fb870961 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/14]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 28d4bc8219f2be9645b8e5657ad5ca590bd9dc7f Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 14:51:27 +0000 Subject: [PATCH 097/241] -F doesn'teven try opening existing sym file. -s silently replaces old version sym file. --- src/compiler/OPM.Mod | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index a5a3df1a..eb41b52c 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -588,15 +588,22 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END CloseOldSym; PROCEDURE OldSym*(VAR modName: ARRAY OF CHAR; VAR done: BOOLEAN); - VAR tag, ver: CHAR; fileName: FileName; + VAR tag, ver: CHAR; fileName: FileName; res: INTEGER; BEGIN + oldSFile := NIL; done := FALSE; MakeFileName(modName, fileName, SFext); - oldSFile := Files.Old(fileName); done := oldSFile # NIL; - IF done THEN - Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver); - IF (tag # SFtag) OR (ver # SFver) THEN - err(-306); (*possibly a symbol file from another Oberon implementation, e.g. HP-Oberon*) - CloseOldSym; done := FALSE + IF forcenewsym IN Options THEN + Files.Delete(fileName, res) + ELSE + oldSFile := Files.Old(fileName); done := oldSFile # NIL; + IF done THEN + Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver); + IF (tag # SFtag) OR (ver # SFver) THEN + (* Possibly a symbol file from another Oberon implementation, e.g. HP-Oberon, + or from a symbol incompatible version of this Oberon. *) + IF ~(newsf IN Options) THEN err(-306) END; + CloseOldSym; done := FALSE + END END END END OldSym; From 5c5ca01dbc144475eba295db18b3d122c3238dc9 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 16:33:41 +0000 Subject: [PATCH 098/241] Fix overenthusiastic deletion of .sym files for -F forcenewym. Whoops. --- src/compiler/Compiler.Mod | 4 ++-- src/compiler/OPM.Mod | 30 ++++++++++++++---------------- src/compiler/OPT.Mod | 8 ++++++-- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/compiler/Compiler.Mod b/src/compiler/Compiler.Mod index c9f454cf..9e44a180 100644 --- a/src/compiler/Compiler.Mod +++ b/src/compiler/Compiler.Mod @@ -22,7 +22,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) OPV.Module(p); IF OPM.noerr THEN IF (OPM.mainprog IN OPM.Options) & (OPM.modName # "SYSTEM") THEN - OPM.DeleteNewSym(OPT.SelfName); + OPM.DeleteSym(OPT.SelfName); OPM.LogVT100(VT100.Green); OPM.LogWStr(" Main program."); OPM.LogVT100(VT100.ResetAll); ELSE IF new THEN @@ -34,7 +34,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) END END; ELSE - OPM.DeleteNewSym(OPT.SelfName) + OPM.DeleteSym(OPT.SelfName) END END END; diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index eb41b52c..ecfe4ac3 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -339,8 +339,10 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) IF verbose IN Options THEN VerboseListSizes END; ResourceDir := InstallDir; - Strings.Append("/", ResourceDir); - Strings.Append(Model, ResourceDir); + IF ResourceDir[0] # 0X THEN + Strings.Append("/", ResourceDir); + Strings.Append(Model, ResourceDir); + END; modules := ""; Platform.GetEnv("MODULES", modules); searchpath := "."; Platform.GetEnv("OBERON", searchpath); @@ -592,18 +594,14 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) BEGIN oldSFile := NIL; done := FALSE; MakeFileName(modName, fileName, SFext); - IF forcenewsym IN Options THEN - Files.Delete(fileName, res) - ELSE - oldSFile := Files.Old(fileName); done := oldSFile # NIL; - IF done THEN - Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver); - IF (tag # SFtag) OR (ver # SFver) THEN - (* Possibly a symbol file from another Oberon implementation, e.g. HP-Oberon, - or from a symbol incompatible version of this Oberon. *) - IF ~(newsf IN Options) THEN err(-306) END; - CloseOldSym; done := FALSE - END + oldSFile := Files.Old(fileName); done := oldSFile # NIL; + IF done THEN + Files.Set(oldSF, oldSFile, 0); Files.Read(oldSF, tag); Files.Read(oldSF, ver); + IF (tag # SFtag) OR (ver # SFver) THEN + (* Possibly a symbol file from another Oberon implementation, e.g. HP-Oberon, + or from a symbol incompatible version of this Oberon. *) + IF ~(newsf IN Options) THEN err(-306) END; + CloseOldSym; done := FALSE END END END OldSym; @@ -642,10 +640,10 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) IF (modName # "SYSTEM") OR (mainprog IN Options) THEN Files.Register(newSFile) END END RegisterNewSym; - PROCEDURE DeleteNewSym*(VAR modulename: ARRAY OF CHAR); + PROCEDURE DeleteSym*(VAR modulename: ARRAY OF CHAR); VAR fn: FileName; res: INTEGER; BEGIN MakeFileName(modulename, fn, SFext); Files.Delete(fn, res) - END DeleteNewSym; + END DeleteSym; PROCEDURE DeleteObj*(VAR modulename: ARRAY OF CHAR); VAR fn: FileName; res: INTEGER; diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index 2c54d11f..2641703e 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -1047,7 +1047,11 @@ BEGIN ELSE impCtxt.nofr := FirstRef(*Comp+1*); impCtxt.minr := maxStruct; impCtxt.nofm := 0; impCtxt.self := aliasName = "@self"; impCtxt.reffp := 0; - OPM.OldSym(name, done); + IF impCtxt.self & (OPM.forcenewsym IN OPM.Options) THEN + OPM.DeleteSym(name); done := FALSE + ELSE + OPM.OldSym(name, done) + END; IF done THEN InMod(mno); InLinks; impCtxt.nextTag := OPM.SymRInt(); @@ -1282,7 +1286,7 @@ END Import; END; newsf := FALSE; symNew := FALSE; (* because of call to FPrintErr from OPL *) IF ~OPM.noerr OR findpc THEN - OPM.DeleteNewSym(SelfName) + OPM.DeleteSym(SelfName) END (* OPM.RegisterNewSym is called in OP2 after writing the object file *) END From fc385eca3c19ea03391d00a7d4004637432aa4d2 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 16:34:33 +0000 Subject: [PATCH 099/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 4 ++-- bootstrap/unix-44/OPM.c | 17 ++++++++++++----- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPT.c | 9 +++++++-- bootstrap/unix-48/Compiler.c | 4 ++-- bootstrap/unix-48/OPM.c | 17 ++++++++++++----- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPT.c | 9 +++++++-- bootstrap/unix-88/Compiler.c | 4 ++-- bootstrap/unix-88/OPM.c | 17 ++++++++++++----- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPT.c | 9 +++++++-- bootstrap/windows-48/Compiler.c | 4 ++-- bootstrap/windows-48/OPM.c | 17 ++++++++++++----- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPT.c | 9 +++++++-- bootstrap/windows-88/Compiler.c | 4 ++-- bootstrap/windows-88/OPM.c | 17 ++++++++++++----- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPT.c | 9 +++++++-- 20 files changed, 110 insertions(+), 50 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index f26c1a32..ed38ce7b 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -46,7 +46,7 @@ void Compiler_Module (BOOLEAN *done) OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -62,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 3411635b..11aa9008 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -49,8 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -436,8 +436,10 @@ void OPM_InitOptions (void) OPM_VerboseListSizes(); } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); - Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); - Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + if (OPM_ResourceDir[0] != 0x00) { + Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); + Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + } modules[0] = 0x00; Platform_GetEnv((CHAR*)"MODULES", 8, (void*)modules, 1024); __MOVE(".", searchpath, 2); @@ -766,6 +768,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; + INT16 res; + OPM_oldSFile = NIL; + *done = 0; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); OPM_oldSFile = Files_Old(fileName, 32); *done = OPM_oldSFile != NIL; @@ -774,7 +779,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); if (tag != 0xf7 || ver != 0x83) { - OPM_err(-306); + if (!__IN(4, OPM_Options, 32)) { + OPM_err(-306); + } OPM_CloseOldSym(); *done = 0; } @@ -818,7 +825,7 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) +void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len) { OPM_FileName fn; INT16 res; diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index da0a48ee..51f64007 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -23,8 +23,8 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 02532034..3f58d991 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1493,7 +1493,12 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPT_impCtxt.nofm = 0; OPT_impCtxt.self = __STRCMP(aliasName, "@self") == 0; OPT_impCtxt.reffp = 0; - OPM_OldSym((void*)name, 256, &*done); + if ((OPT_impCtxt.self && __IN(17, OPM_Options, 32))) { + OPM_DeleteSym((void*)name, 256); + *done = 0; + } else { + OPM_OldSym((void*)name, 256, &*done); + } if (*done) { OPT_InMod(&mno); OPT_InLinks(); @@ -1902,7 +1907,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index f26c1a32..ed38ce7b 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -46,7 +46,7 @@ void Compiler_Module (BOOLEAN *done) OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -62,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 3411635b..11aa9008 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -49,8 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -436,8 +436,10 @@ void OPM_InitOptions (void) OPM_VerboseListSizes(); } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); - Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); - Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + if (OPM_ResourceDir[0] != 0x00) { + Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); + Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + } modules[0] = 0x00; Platform_GetEnv((CHAR*)"MODULES", 8, (void*)modules, 1024); __MOVE(".", searchpath, 2); @@ -766,6 +768,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; + INT16 res; + OPM_oldSFile = NIL; + *done = 0; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); OPM_oldSFile = Files_Old(fileName, 32); *done = OPM_oldSFile != NIL; @@ -774,7 +779,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); if (tag != 0xf7 || ver != 0x83) { - OPM_err(-306); + if (!__IN(4, OPM_Options, 32)) { + OPM_err(-306); + } OPM_CloseOldSym(); *done = 0; } @@ -818,7 +825,7 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) +void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len) { OPM_FileName fn; INT16 res; diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index da0a48ee..51f64007 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -23,8 +23,8 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index b95c2810..85113943 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1493,7 +1493,12 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPT_impCtxt.nofm = 0; OPT_impCtxt.self = __STRCMP(aliasName, "@self") == 0; OPT_impCtxt.reffp = 0; - OPM_OldSym((void*)name, 256, &*done); + if ((OPT_impCtxt.self && __IN(17, OPM_Options, 32))) { + OPM_DeleteSym((void*)name, 256); + *done = 0; + } else { + OPM_OldSym((void*)name, 256, &*done); + } if (*done) { OPT_InMod(&mno); OPT_InLinks(); @@ -1902,7 +1907,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index f26c1a32..ed38ce7b 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -46,7 +46,7 @@ void Compiler_Module (BOOLEAN *done) OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -62,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 2bc2c145..874cf058 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -49,8 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -436,8 +436,10 @@ void OPM_InitOptions (void) OPM_VerboseListSizes(); } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); - Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); - Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + if (OPM_ResourceDir[0] != 0x00) { + Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); + Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + } modules[0] = 0x00; Platform_GetEnv((CHAR*)"MODULES", 8, (void*)modules, 1024); __MOVE(".", searchpath, 2); @@ -766,6 +768,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; + INT16 res; + OPM_oldSFile = NIL; + *done = 0; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); OPM_oldSFile = Files_Old(fileName, 32); *done = OPM_oldSFile != NIL; @@ -774,7 +779,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); if (tag != 0xf7 || ver != 0x83) { - OPM_err(-306); + if (!__IN(4, OPM_Options, 32)) { + OPM_err(-306); + } OPM_CloseOldSym(); *done = 0; } @@ -818,7 +825,7 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) +void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len) { OPM_FileName fn; INT16 res; diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index da0a48ee..51f64007 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -23,8 +23,8 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 1a106cda..f9c49d00 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1493,7 +1493,12 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPT_impCtxt.nofm = 0; OPT_impCtxt.self = __STRCMP(aliasName, "@self") == 0; OPT_impCtxt.reffp = 0; - OPM_OldSym((void*)name, 256, &*done); + if ((OPT_impCtxt.self && __IN(17, OPM_Options, 32))) { + OPM_DeleteSym((void*)name, 256); + *done = 0; + } else { + OPM_OldSym((void*)name, 256, &*done); + } if (*done) { OPT_InMod(&mno); OPT_InLinks(); @@ -1902,7 +1907,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index f26c1a32..ed38ce7b 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -46,7 +46,7 @@ void Compiler_Module (BOOLEAN *done) OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -62,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 3411635b..11aa9008 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -49,8 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -436,8 +436,10 @@ void OPM_InitOptions (void) OPM_VerboseListSizes(); } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); - Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); - Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + if (OPM_ResourceDir[0] != 0x00) { + Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); + Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + } modules[0] = 0x00; Platform_GetEnv((CHAR*)"MODULES", 8, (void*)modules, 1024); __MOVE(".", searchpath, 2); @@ -766,6 +768,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; + INT16 res; + OPM_oldSFile = NIL; + *done = 0; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); OPM_oldSFile = Files_Old(fileName, 32); *done = OPM_oldSFile != NIL; @@ -774,7 +779,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); if (tag != 0xf7 || ver != 0x83) { - OPM_err(-306); + if (!__IN(4, OPM_Options, 32)) { + OPM_err(-306); + } OPM_CloseOldSym(); *done = 0; } @@ -818,7 +825,7 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) +void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len) { OPM_FileName fn; INT16 res; diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index da0a48ee..51f64007 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -23,8 +23,8 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index b95c2810..85113943 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1493,7 +1493,12 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPT_impCtxt.nofm = 0; OPT_impCtxt.self = __STRCMP(aliasName, "@self") == 0; OPT_impCtxt.reffp = 0; - OPM_OldSym((void*)name, 256, &*done); + if ((OPT_impCtxt.self && __IN(17, OPM_Options, 32))) { + OPM_DeleteSym((void*)name, 256); + *done = 0; + } else { + OPM_OldSym((void*)name, 256, &*done); + } if (*done) { OPT_InMod(&mno); OPT_InLinks(); @@ -1902,7 +1907,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index f26c1a32..ed38ce7b 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -46,7 +46,7 @@ void Compiler_Module (BOOLEAN *done) OPV_Module(p); if (OPM_noerr) { if ((__IN(10, OPM_Options, 32) && __STRCMP(OPM_modName, "SYSTEM") != 0)) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); OPM_LogVT100((CHAR*)"32m", 4); OPM_LogWStr((CHAR*)" Main program.", 16); OPM_LogVT100((CHAR*)"0m", 3); @@ -62,7 +62,7 @@ void Compiler_Module (BOOLEAN *done) } } } else { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 2bc2c145..874cf058 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -49,8 +49,8 @@ export CHAR OPM_ResourceDir[1024]; static void OPM_Append (Files_Rider *R, ADDRESS *R__typ, Files_File F); export void OPM_CloseFiles (void); export void OPM_CloseOldSym (void); -export void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +export void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); export void OPM_FPrint (INT32 *fp, INT64 val); export void OPM_FPrintLReal (INT32 *fp, LONGREAL val); export void OPM_FPrintReal (INT32 *fp, REAL val); @@ -436,8 +436,10 @@ void OPM_InitOptions (void) OPM_VerboseListSizes(); } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); - Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); - Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + if (OPM_ResourceDir[0] != 0x00) { + Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); + Strings_Append(OPM_Model, 10, (void*)OPM_ResourceDir, 1024); + } modules[0] = 0x00; Platform_GetEnv((CHAR*)"MODULES", 8, (void*)modules, 1024); __MOVE(".", searchpath, 2); @@ -766,6 +768,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) { CHAR tag, ver; OPM_FileName fileName; + INT16 res; + OPM_oldSFile = NIL; + *done = 0; OPM_MakeFileName((void*)modName, modName__len, (void*)fileName, 32, (CHAR*)".sym", 5); OPM_oldSFile = Files_Old(fileName, 32); *done = OPM_oldSFile != NIL; @@ -774,7 +779,9 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); if (tag != 0xf7 || ver != 0x83) { - OPM_err(-306); + if (!__IN(4, OPM_Options, 32)) { + OPM_err(-306); + } OPM_CloseOldSym(); *done = 0; } @@ -818,7 +825,7 @@ void OPM_RegisterNewSym (void) } } -void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len) +void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len) { OPM_FileName fn; INT16 res; diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index da0a48ee..51f64007 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -23,8 +23,8 @@ import CHAR OPM_ResourceDir[1024]; import void OPM_CloseFiles (void); import void OPM_CloseOldSym (void); -import void OPM_DeleteNewSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_DeleteObj (CHAR *modulename, ADDRESS modulename__len); +import void OPM_DeleteSym (CHAR *modulename, ADDRESS modulename__len); import void OPM_FPrint (INT32 *fp, INT64 val); import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 1a106cda..f9c49d00 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1493,7 +1493,12 @@ void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done) OPT_impCtxt.nofm = 0; OPT_impCtxt.self = __STRCMP(aliasName, "@self") == 0; OPT_impCtxt.reffp = 0; - OPM_OldSym((void*)name, 256, &*done); + if ((OPT_impCtxt.self && __IN(17, OPM_Options, 32))) { + OPM_DeleteSym((void*)name, 256); + *done = 0; + } else { + OPM_OldSym((void*)name, 256, &*done); + } if (*done) { OPT_InMod(&mno); OPT_InLinks(); @@ -1902,7 +1907,7 @@ void OPT_Export (BOOLEAN *ext, BOOLEAN *new) OPT_newsf = 0; OPT_symNew = 0; if (!OPM_noerr || OPT_findpc) { - OPM_DeleteNewSym((void*)OPT_SelfName, 256); + OPM_DeleteSym((void*)OPT_SelfName, 256); } } } From 7386767d8464f2b5839e4d972d706583a7d41fcb Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 17:12:00 +0000 Subject: [PATCH 100/241] Fix binary dir determination for mingw/msc. --- src/runtime/Modules.Mod | 7 ++++--- src/test/confidence/planned-binary-change | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 0b9f5fd0..350e036b 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -74,6 +74,7 @@ MODULE Modules; (* jt 6.1.96 *) RETURN i END ArgPos; + (* Determine directory from which this executable was loaded *) PROCEDURE CharCount(s: ARRAY OF CHAR): INTEGER; @@ -151,7 +152,7 @@ MODULE Modules; (* jt 6.1.96 *) END ExtractPart; PROCEDURE Trim(s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); - (* Remove redundant '.'s and '/'s. + (* Remove redundant '.'s and '/'s. Convert '\'s to '/'. *) Note, does not remove 'x/..'. This cannot safely be removed because if x is a link then 'x/..' means the parent of what x links to rather than the directory containing link x. @@ -187,8 +188,8 @@ MODULE Modules; (* jt 6.1.96 *) END; GetArg(0, arg0); (* arg0 is the command binary file name passed by the shell. *) - i := 0; WHILE (arg0[i] # 0X) & (arg0[i] # '/') DO INC(i) END; - IF arg0[i] = '/' THEN + i := 0; WHILE (arg0[i] # 0X) & (arg0[i] # '/') & (arg0[i] # '\') DO INC(i) END; + IF (arg0[i] = '/') OR (arg0[i] = '\') THEN (* The argument contains a '/', we expect it to work without reference to the path. *) Trim(arg0, tempstr); Canonify(tempstr, binarydir); diff --git a/src/test/confidence/planned-binary-change b/src/test/confidence/planned-binary-change index d7a05d09..9135bbd2 100644 --- a/src/test/confidence/planned-binary-change +++ b/src/test/confidence/planned-binary-change @@ -1 +1 @@ -18 Oct 2016 18:12:01 +18 Dec 2016 16:55:53 From 6f43c272c9b98c83f86a5cf982d4fdf4f888941f Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 18 Dec 2016 17:13:46 +0000 Subject: [PATCH 101/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 6 +++--- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +++--- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 6 +++--- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +++--- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 6 +++--- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +++--- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 6 +++--- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +++--- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 6 +++--- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +++--- bootstrap/windows-88/extTools.h | 2 +- src/runtime/Modules.Mod | 2 +- 186 files changed, 211 insertions(+), 211 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index ed38ce7b..c828f47d 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 18ec858a..5fa885ca 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index efd4ae6e..af5f5580 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index dac5c5ff..9d302c54 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 2291d7d8..dd99850c 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index df3d086b..a5b7cd03 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 7a464dbf..8a81aea1 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 76891be3..881bee5a 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,10 +267,10 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } Modules_GetArg(0, (void*)arg0, 4096); i = 0; - while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + while ((((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) && arg0[__X(i, 4096)] != '\\')) { i += 1; } - if (arg0[__X(i, 4096)] == '/') { + if (arg0[__X(i, 4096)] == '/' || arg0[__X(i, 4096)] == '\\') { Modules_Trim(arg0, 4096, (void*)tempstr, 4096); Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); present = Modules_IsFilePresent(binarydir, binarydir__len); diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 9f691749..9e1502d5 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 3933cee1..c8ffb553 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 9f8518b8..587f5ca2 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 24cd4f3f..556ff058 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 99b9afb4..377385f1 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 11aa9008..5ec11c6f 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 51f64007..d52e3f0f 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index aad8367d..3199e877 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index dc8aa405..c168cbe7 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index d0a1851a..b554bf21 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 608979a8..6e983459 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 3f58d991..fb5288f9 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 7483f169..bc21d626 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 152db225..adffc7a4 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 7c94fced..5d34109a 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index d1fba01a..5f70ffca 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index a7195e3a..4f49bfa7 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 6117b38b..5900abf5 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 521594dc..c628a89b 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 11ad01bd..2b39fcf1 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index bf708519..016451be 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 06972c90..b7456c5c 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index fd7f283d..be22ef18 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index fe342ae1..c6e6c87a 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index a8edeb78..f3849ea7 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index baa92092..9b5da2b4 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 4c0087ac..2c94eb2a 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 75768aca..fd65edea 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("i686-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index fb870961..7d8a92d3 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index ed38ce7b..c828f47d 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 18ec858a..5fa885ca 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index efd4ae6e..af5f5580 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index dac5c5ff..9d302c54 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 2291d7d8..dd99850c 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index df3d086b..a5b7cd03 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 7a464dbf..8a81aea1 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 76891be3..881bee5a 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,10 +267,10 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } Modules_GetArg(0, (void*)arg0, 4096); i = 0; - while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + while ((((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) && arg0[__X(i, 4096)] != '\\')) { i += 1; } - if (arg0[__X(i, 4096)] == '/') { + if (arg0[__X(i, 4096)] == '/' || arg0[__X(i, 4096)] == '\\') { Modules_Trim(arg0, 4096, (void*)tempstr, 4096); Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); present = Modules_IsFilePresent(binarydir, binarydir__len); diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 9f691749..9e1502d5 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 3933cee1..c8ffb553 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 9f8518b8..587f5ca2 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 24cd4f3f..556ff058 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 99b9afb4..377385f1 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 11aa9008..5ec11c6f 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 51f64007..d52e3f0f 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index aad8367d..3199e877 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index dc8aa405..c168cbe7 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index d0a1851a..b554bf21 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 608979a8..6e983459 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 85113943..13794d5f 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 7483f169..bc21d626 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 152db225..adffc7a4 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 7c94fced..5d34109a 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index d1fba01a..5f70ffca 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index a7195e3a..4f49bfa7 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 6117b38b..5900abf5 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 521594dc..c628a89b 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 11ad01bd..2b39fcf1 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index bf708519..016451be 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 06972c90..b7456c5c 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index fd7f283d..be22ef18 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 285e7ac0..2182dda5 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 7f7d6562..fad4ca32 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index baa92092..9b5da2b4 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 4c0087ac..2c94eb2a 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 75768aca..fd65edea 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("i686-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index fb870961..7d8a92d3 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index ed38ce7b..c828f47d 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 18ec858a..5fa885ca 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index efd4ae6e..af5f5580 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 4a5cec7c..915b50ff 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 987ffaf2..90be7986 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index ba215672..c618f3ef 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index bbd83594..cd281d35 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 037d74d0..95117c1d 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,10 +267,10 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } Modules_GetArg(0, (void*)arg0, 4096); i = 0; - while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + while ((((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) && arg0[__X(i, 4096)] != '\\')) { i += 1; } - if (arg0[__X(i, 4096)] == '/') { + if (arg0[__X(i, 4096)] == '/' || arg0[__X(i, 4096)] == '\\') { Modules_Trim(arg0, 4096, (void*)tempstr, 4096); Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); present = Modules_IsFilePresent(binarydir, binarydir__len); diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index be3fd68b..98b2aa47 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 3933cee1..c8ffb553 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 9f8518b8..587f5ca2 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 24cd4f3f..556ff058 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 99b9afb4..377385f1 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 874cf058..4b66e7f1 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 51f64007..d52e3f0f 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 0a6a6796..06c6a681 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index dc8aa405..c168cbe7 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index d0a1851a..b554bf21 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 608979a8..6e983459 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index f9c49d00..cd38533c 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 7483f169..bc21d626 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 4d29b076..327f244d 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 7c94fced..5d34109a 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index e24a77fc..a5f08778 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 311e737d..26039116 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 7ed88d75..3c0223f6 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 9b911314..34af667e 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 11ad01bd..2b39fcf1 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index bf708519..016451be 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 06972c90..b7456c5c 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index fd7f283d..be22ef18 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 2bfa4511..09c54393 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 21401f61..cc880f07 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index baa92092..9b5da2b4 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 4c0087ac..2c94eb2a 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 75768aca..fd65edea 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("i686-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index fb870961..7d8a92d3 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index ed38ce7b..c828f47d 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 18ec858a..5fa885ca 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index efd4ae6e..af5f5580 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index a5c597ca..6557a312 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 63eaa089..8fbe56ca 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index df3d086b..a5b7cd03 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 7a464dbf..8a81aea1 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 859d31ba..bda8ec0b 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,10 +267,10 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } Modules_GetArg(0, (void*)arg0, 4096); i = 0; - while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + while ((((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) && arg0[__X(i, 4096)] != '\\')) { i += 1; } - if (arg0[__X(i, 4096)] == '/') { + if (arg0[__X(i, 4096)] == '/' || arg0[__X(i, 4096)] == '\\') { Modules_Trim(arg0, 4096, (void*)tempstr, 4096); Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); present = Modules_IsFilePresent(binarydir, binarydir__len); diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 9f691749..9e1502d5 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 3933cee1..c8ffb553 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 9f8518b8..587f5ca2 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 24cd4f3f..556ff058 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 99b9afb4..377385f1 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 11aa9008..5ec11c6f 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 51f64007..d52e3f0f 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index aad8367d..3199e877 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index dc8aa405..c168cbe7 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index d0a1851a..b554bf21 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 608979a8..6e983459 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 85113943..13794d5f 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 7483f169..bc21d626 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 152db225..adffc7a4 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 7c94fced..5d34109a 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index b5ffb6ae..07ed2f75 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index a7195e3a..4f49bfa7 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 73b65c9d..bf9c1b7f 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 95a1066e..99ea737f 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 11ad01bd..2b39fcf1 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index bf708519..016451be 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 06972c90..b7456c5c 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index fd7f283d..be22ef18 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 285e7ac0..2182dda5 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 7f7d6562..fad4ca32 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index baa92092..9b5da2b4 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 4c0087ac..2c94eb2a 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 75768aca..fd65edea 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("i686-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index fb870961..7d8a92d3 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index ed38ce7b..c828f47d 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 18ec858a..5fa885ca 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index efd4ae6e..af5f5580 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 206de2b2..097b5552 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index ef890edf..6ef831df 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index ba215672..c618f3ef 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index bbd83594..cd281d35 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 16daab43..c210b7d7 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -267,10 +267,10 @@ static void Modules_FindBinaryDir (CHAR *binarydir, ADDRESS binarydir__len) } Modules_GetArg(0, (void*)arg0, 4096); i = 0; - while ((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) { + while ((((arg0[__X(i, 4096)] != 0x00 && arg0[__X(i, 4096)] != '/')) && arg0[__X(i, 4096)] != '\\')) { i += 1; } - if (arg0[__X(i, 4096)] == '/') { + if (arg0[__X(i, 4096)] == '/' || arg0[__X(i, 4096)] == '\\') { Modules_Trim(arg0, 4096, (void*)tempstr, 4096); Modules_Canonify(tempstr, 4096, (void*)binarydir, binarydir__len); present = Modules_IsFilePresent(binarydir, binarydir__len); diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index be3fd68b..98b2aa47 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 3933cee1..c8ffb553 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 9f8518b8..587f5ca2 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 24cd4f3f..556ff058 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 99b9afb4..377385f1 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 874cf058..4b66e7f1 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 51f64007..d52e3f0f 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 0a6a6796..06c6a681 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index dc8aa405..c168cbe7 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index d0a1851a..b554bf21 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 608979a8..6e983459 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index f9c49d00..cd38533c 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 7483f169..bc21d626 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 4d29b076..327f244d 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 7c94fced..5d34109a 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 01c22546..6ad86a73 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 311e737d..26039116 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 944c4407..aa0f4ff3 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 4311c64a..7699502f 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 11ad01bd..2b39fcf1 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index bf708519..016451be 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 06972c90..b7456c5c 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index fd7f283d..be22ef18 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 2bfa4511..09c54393 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 21401f61..cc880f07 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index baa92092..9b5da2b4 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 4c0087ac..2c94eb2a 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 75768aca..fd65edea 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("i686-w64-mingw32-gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index fb870961..7d8a92d3 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/runtime/Modules.Mod b/src/runtime/Modules.Mod index 350e036b..cf398304 100644 --- a/src/runtime/Modules.Mod +++ b/src/runtime/Modules.Mod @@ -152,7 +152,7 @@ MODULE Modules; (* jt 6.1.96 *) END ExtractPart; PROCEDURE Trim(s: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); - (* Remove redundant '.'s and '/'s. Convert '\'s to '/'. *) + (* Remove redundant '.'s and '/'s. Convert '\'s to '/'. Note, does not remove 'x/..'. This cannot safely be removed because if x is a link then 'x/..' means the parent of what x links to rather than the directory containing link x. From 43117e79f77a9fc2024fb0c91dda0b7d74dc11f1 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 19 Dec 2016 16:00:57 +0000 Subject: [PATCH 102/241] Integrate JTempl's new OFront heap implementation using unsigned address arithmetic. --- src/runtime/Heap.Mod | 182 +++++++++++++++++++++---------------------- 1 file changed, 87 insertions(+), 95 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 11b1b116..33d16f7b 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -8,7 +8,7 @@ MODULE Heap; CmdNameLen = 24; SZA = SIZE(S.ADDRESS); (* Size of address *) Unit = 4*SZA; (* smallest possible heap block *) - nofLists = 9; (* number of free_lists *) + nofLists = 9; (* number of freelist entries excluding sentinel *) heapSize0 = 8000*Unit; (* startup heap size *) (* all blocks look the same: @@ -50,7 +50,7 @@ MODULE Heap; enumPtrs-: EnumProc; reserved1, reserved2: LONGINT - END ; + END; Command- = PROCEDURE; @@ -58,7 +58,7 @@ MODULE Heap; next-: Cmd; name-: CmdName; cmd-: Command - END ; + END; Finalizer = PROCEDURE(obj: S.PTR); @@ -68,7 +68,7 @@ MODULE Heap; obj: S.ADDRESS; (* weak pointer *) marked: BOOLEAN; finalize: Finalizer; - END ; + END; VAR (* the list of loaded (=initialization started) modules *) @@ -81,10 +81,8 @@ MODULE Heap; (* extensible heap *) heap-: S.ADDRESS; (* the sorted list of heap chunks *) - heapNegMin: S.ADDRESS; (* Range of pointer values, used for stack collection *) - heapNegMax: S.ADDRESS; - heapPosMin: S.ADDRESS; - heapPosMax: S.ADDRESS; + heapMin: S.ADDRESS; (* Range of valid pointer values, used for stack collection *) + heapMax: S.ADDRESS; heapsize*: S.ADDRESS; (* the sum of all heap chunk sizes *) (* finalization candidates *) @@ -114,6 +112,9 @@ MODULE Heap; END Unlock; + PROCEDURE -uLT(x, y: S.ADDRESS): BOOLEAN "((size_t)x < (size_t)y)"; + PROCEDURE -uLE(x, y: S.ADDRESS): BOOLEAN "((size_t)x <= (size_t)y)"; + (* PROCEDURE TAS*(VAR flag:BOOLEAN): BOOLEAN; (* added for compatibility with ulmSYSTEM module; noch *) VAR oldflag : BOOLEAN; @@ -200,13 +201,8 @@ MODULE Heap; bigBlocks := blk; (* Prepend block to list of big blocks *) INC(heapsize, blksz); (* Maintain heap range limits *) - IF chnk > 0 THEN - IF chnk < heapPosMin THEN heapPosMin := blk + SZA END; - IF end > heapPosMax THEN heapPosMax := end END - ELSE (* chnk < 0 *) - IF chnk < heapNegMin THEN heapNegMin := blk + SZA END; - IF end > heapNegMax THEN heapNegMax := end END - END + IF uLT(blk + SZA, heapMin) THEN heapMin := blk + SZA END; + IF uLT(heapMax, end) THEN heapMax := end END END; RETURN chnk END NewChunk; @@ -214,17 +210,17 @@ MODULE Heap; PROCEDURE ExtendHeap(blksz: S.ADDRESS); VAR size, chnk, j, next: S.ADDRESS; BEGIN - IF blksz > 10000*Unit THEN size := blksz + IF uLT(10000*Unit, blksz) THEN size := blksz ELSE size := 10000*Unit (* additional heuristics *) - END ; + END; chnk := NewChunk(size); IF chnk # 0 THEN (*sorted insertion*) - IF chnk < heap THEN + IF uLT(chnk, heap) THEN S.PUT(chnk, heap); heap := chnk ELSE j := heap; S.GET(j, next); - WHILE (next # 0) & (chnk - next > 0) DO + WHILE (next # 0) & uLT(next, chnk) DO j := next; S.GET(j, next) END; @@ -248,13 +244,13 @@ MODULE Heap; ASSERT(blksz MOD Unit = 0); i0 := blksz DIV Unit; i := i0; - IF i < nofLists THEN adr := freeList[i]; + IF uLT(i, nofLists) THEN adr := freeList[i]; WHILE adr = 0 DO INC(i); adr := freeList[i] END - END ; - IF i < nofLists THEN (* unlink *) + END; + IF uLT(i, nofLists) THEN (* Unlink from freelist[i] *) S.GET(adr + nextOff, next); freeList[i] := next; - IF i # i0 THEN (* split *) + IF i # i0 THEN (* Split *) di := i - i0; restsize := di * Unit; end := adr + restsize; S.PUT(end + sizeOff, blksz); S.PUT(end + sntlOff, NoPtrSntl); @@ -264,60 +260,61 @@ MODULE Heap; freeList[di] := adr; INC(adr, restsize) END - ELSE + ELSE (* Search in bigBlocks *) adr := bigBlocks; prev := 0; LOOP - IF adr = 0 THEN + IF adr = 0 THEN (* Nothing free *) IF firstTry THEN GC(TRUE); INC(blksz, Unit); - IF (heapsize - allocated - blksz) * 4 < heapsize THEN - (* heap is still almost full; expand to avoid thrashing *) + IF uLT(heapsize - allocated, blksz) + OR uLT((heapsize - allocated - blksz) * 4, heapsize) THEN + (* heap would still be more than 3/4 full; expand to avoid thrashing *) ExtendHeap((allocated + blksz) DIV (3*Unit) * (4*Unit) - heapsize) - END ; + END; firstTry := FALSE; new := NEWREC(tag); firstTry := TRUE; IF new = NIL THEN (* depending on the fragmentation, the heap may not have been extended by the anti-thrashing heuristics above *) ExtendHeap((allocated + blksz) DIV (3*Unit) * (4*Unit) - heapsize); new := NEWREC(tag); (* will find a free block if heap has been expanded properly *) - END ; + END; Unlock(); RETURN new ELSE Unlock(); RETURN NIL END - END ; + END; S.GET(adr+sizeOff, t); - IF t >= blksz THEN EXIT END ; + IF uLE(blksz, t) THEN EXIT END; prev := adr; S.GET(adr + nextOff, adr) - END ; + END; restsize := t - blksz; end := adr + restsize; S.PUT(end + sizeOff, blksz); S.PUT(end + sntlOff, NoPtrSntl); S.PUT(end, end + sizeOff); - IF restsize > nofLists * Unit THEN (*resize*) + IF uLT(nofLists * Unit, restsize) THEN (* Resize *) S.PUT(adr + sizeOff, restsize) - ELSE (*unlink*) + ELSE (* Unlink *) S.GET(adr + nextOff, next); IF prev = 0 THEN bigBlocks := next ELSE S.PUT(prev + nextOff, next); - END ; - IF restsize > 0 THEN (*move*) + END; + IF restsize # 0 THEN (* Move *) di := restsize DIV Unit; S.PUT(adr + sizeOff, restsize); S.PUT(adr + nextOff, freeList[di]); freeList[di] := adr END - END ; + END; INC(adr, restsize) - END ; + END; i := adr + 4*SZA; end := adr + blksz; - WHILE end - i > 0 DO (*deliberately unrolled*) + WHILE uLT(i, end) DO (* Deliberately unrolled *) S.PUT(i, AddressZero); S.PUT(i + SZA, AddressZero); S.PUT(i + 2*SZA, AddressZero); S.PUT(i + 3*SZA, AddressZero); INC(i, 4*SZA) - END ; + END; S.PUT(adr + nextOff, AddressZero); S.PUT(adr, tag); S.PUT(adr + sizeOff, AddressZero); @@ -355,7 +352,7 @@ MODULE Heap; S.GET(tag, offset); (* Get next ptr field offset *) IF offset < 0 THEN (* Sentinel reached: Value is -8*(#fields+1) *) S.PUT(q - SZA, tag + offset + 1); (* Rotate base ptr into tag *) - IF p = 0 THEN EXIT END ; + IF p = 0 THEN EXIT END; n := q; q := p; S.GET(q - SZA, tag); DEC(tag, 1); S.GET(tag, offset); fld := q + offset; @@ -373,7 +370,7 @@ MODULE Heap; tag := tagbits END END - END ; + END; INC(tag, SZA) END END @@ -388,24 +385,24 @@ MODULE Heap; PROCEDURE Scan; VAR chnk, adr, end, start, tag, i, size, freesize: S.ADDRESS; BEGIN bigBlocks := 0; i := 1; - WHILE i < nofLists DO freeList[i] := 0; INC(i) END ; + WHILE i < nofLists DO freeList[i] := 0; INC(i) END; freesize := 0; allocated := 0; chnk := heap; WHILE chnk # 0 DO adr := chnk + blkOff; S.GET(chnk + endOff, end); - WHILE end - adr > 0 DO + WHILE uLT(adr, end) DO S.GET(adr, tag); - IF ODD(tag) THEN (*marked*) - IF freesize > 0 THEN + IF ODD(tag) THEN (* Marked *) + IF freesize # 0 THEN start := adr - freesize; S.PUT(start, start+SZA); S.PUT(start+sizeOff, freesize); S.PUT(start+sntlOff, NoPtrSntl); i := freesize DIV Unit; freesize := 0; - IF i < nofLists THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start - ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start + IF uLT(i, nofLists) THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start + ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start END - END ; + END; DEC(tag, 1); S.PUT(adr, tag); S.GET(tag, size); @@ -416,17 +413,17 @@ MODULE Heap; INC(freesize, size); INC(adr, size) END - END ; - IF freesize > 0 THEN (*collect last block*) + END; + IF freesize # 0 THEN (* Collect last block *) start := adr - freesize; S.PUT(start, start+SZA); S.PUT(start+sizeOff, freesize); S.PUT(start+sntlOff, NoPtrSntl); i := freesize DIV Unit; freesize := 0; - IF i < nofLists THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start - ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start + IF uLT(i, nofLists) THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start + ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start END - END ; + END; S.GET(chnk, chnk) END END Scan; @@ -435,8 +432,8 @@ MODULE Heap; VAR i, j, x: S.ADDRESS; BEGIN j := l; x := a[j]; LOOP i := j; j := 2*j + 1; - IF (j < r) & (a[j] < a[j+1]) THEN INC(j) END; - IF (j > r) OR (a[j] <= x) THEN EXIT END; + IF (j < r) & uLT(a[j], a[j+1]) THEN INC(j) END; + IF (j > r) OR uLE(a[j], x) THEN EXIT END; a[i] := a[j] END; a[i] := x @@ -449,29 +446,27 @@ MODULE Heap; WHILE r > 0 DO x := a[0]; a[0] := a[r]; a[r] := x; DEC(r); Sift(l, r, a) END END HeapSort; - PROCEDURE MarkCandidates(n: S.ADDRESS; VAR cand: ARRAY OF S.ADDRESS); - VAR chnk, adr, tag, next, lim, lim1, i, ptr, size: S.ADDRESS; + PROCEDURE MarkCandidates(n: LONGINT; VAR cand: ARRAY OF S.ADDRESS); + VAR chnk, end, adr, tag, next, i, ptr, size: S.ADDRESS; BEGIN - chnk := heap; i := 0; lim := cand[n-1]; - WHILE (chnk # 0 ) & (lim - chnk > 0) DO + ASSERT(n > 0); + chnk := heap; i := 0; + WHILE chnk # 0 DO + S.GET(chnk + endOff, end); adr := chnk + blkOff; - S.GET(chnk + endOff, lim1); - IF lim1 - lim > 0 THEN lim1 := lim END ; - WHILE lim1 - adr > 0 DO + WHILE uLT(adr, end) DO S.GET(adr, tag); IF ODD(tag) THEN (*already marked*) - S.GET(tag-1, size); INC(adr, size) + S.GET(tag-1, size); INC(adr, size); ptr := adr + SZA; + WHILE uLT(cand[i], ptr) DO INC(i); IF i = n THEN RETURN END END ; ELSE - S.GET(tag, size); - ptr := adr + SZA; - WHILE ptr - cand[i] > 0 DO INC(i) END ; - IF i = n THEN RETURN END ; - next := adr + size; - IF next - cand[i] > 0 THEN Mark(ptr) END ; - adr := next - END + S.GET(tag, size); ptr := adr + SZA; INC(adr, size); + WHILE uLT(cand[i], ptr) DO INC(i); IF i = n THEN RETURN END END ; + IF uLT(cand[i], adr) THEN Mark(ptr) END + END ; + IF uLE(end, cand[i]) THEN (*skip rest of this heap chunk*) adr := end END END ; - S.GET(chnk, chnk) + S.GET(chnk + nextChnkOff, chnk) END END MarkCandidates; @@ -483,7 +478,7 @@ MODULE Heap; S.GET(n.obj - SZA, tag); IF ~ODD(tag) THEN n.marked := FALSE; Mark(n.obj) ELSE n.marked := TRUE - END ; + END; n := n.next END END CheckFin; @@ -493,7 +488,7 @@ MODULE Heap; BEGIN n := fin; prev := NIL; WHILE n # NIL DO IF ~n.marked THEN - IF n = fin THEN fin := fin.next ELSE prev.next := n.next END ; + IF n = fin THEN fin := fin.next ELSE prev.next := n.next END; n.finalize(S.VAL(S.PTR, n.obj)); (* new nodes may have been pushed in n.finalize, therefore: *) IF prev = NIL THEN n := fin ELSE n := n.next END @@ -518,28 +513,27 @@ MODULE Heap; PROCEDURE MarkStack(n: S.ADDRESS; VAR cand: ARRAY OF S.ADDRESS); VAR frame: S.PTR; - inc, nofcand: S.ADDRESS; - sp, p, stack0: S.ADDRESS; - align: RECORD ch: CHAR; p: S.PTR END ; + nofcand: LONGINT; + inc, sp, p, stack0: S.ADDRESS; + align: RECORD ch: CHAR; p: S.PTR END; BEGIN IF n > 0 THEN MarkStack(n-1, cand); (* flush register windows by means of recursive calls *) IF n > 100 THEN RETURN END (* prevent tail recursion optimization *) - END ; + END; IF n = 0 THEN nofcand := 0; sp := S.ADR(frame); stack0 := ModulesMainStackFrame(); (* check for minimum alignment of pointers *) inc := S.ADR(align.p) - S.ADR(align); - IF sp - stack0 > 0 THEN inc := -inc END ; + IF uLT(stack0, sp) THEN inc := -inc END; WHILE sp # stack0 DO S.GET(sp, p); - IF (p > 0) & (p >= heapPosMin) & (p < heapPosMax) - OR (p < 0) & (p >= heapNegMin) & (p < heapNegMax) THEN - IF nofcand = LEN(cand) THEN HeapSort(nofcand, cand); MarkCandidates(nofcand, cand); nofcand := 0 END ; + IF uLE(heapMin, p) & uLT(p, heapMax) THEN + IF nofcand = LEN(cand) THEN HeapSort(nofcand, cand); MarkCandidates(nofcand, cand); nofcand := 0 END; cand[nofcand] := p; INC(nofcand) - END ; + END; INC(sp, inc) - END ; + END; IF nofcand > 0 THEN HeapSort(nofcand, cand); MarkCandidates(nofcand, cand) END END END MarkStack; @@ -555,9 +549,9 @@ MODULE Heap; Lock(); m := S.VAL(Module, modules); WHILE m # NIL DO - IF m.enumPtrs # NIL THEN m.enumPtrs(MarkP) END ; + IF m.enumPtrs # NIL THEN m.enumPtrs(MarkP) END; m := m^.next - END ; + END; IF markStack THEN (* generate register pressure to force callee saved registers to memory; may be simplified by inlining OS calls or processor specific instructions @@ -569,10 +563,10 @@ MODULE Heap; INC(i8, 9); INC(i9, 10); INC(i10, 11); INC(i11, 12); INC(i12, 13); INC(i13, 14); INC(i14, 15); INC(i15, 16); INC(i16, 17); INC(i17, 18); INC(i18, 19); INC(i19, 20); INC(i20, 21); INC(i21, 22); INC(i22, 23); INC(i23, 24); IF (i0 = -99) & (i15 = 24) THEN MarkStack(32, cand); EXIT END - END ; + END; IF i0 + i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + i10 + i11 + i12 + i13 + i14 + i15 + i16 + i17 + i18 + i19 + i20 + i21 + i22 + i23 > 10000 THEN RETURN (* use all variables *) - END ; + END; END; CheckFin; Scan; @@ -600,20 +594,18 @@ MODULE Heap; heapsize := 0; allocated := 0; lockdepth := 0; - heapPosMin := MAX(S.ADDRESS); - heapPosMax := 0; - heapNegMin := 0; - heapNegMax := MIN(S.ADDRESS); + heapMin := -1; (* all bits set *) + heapMax := 0; + bigBlocks := 0; heap := NewChunk(heapSize0); S.PUT(heap + nextChnkOff, AddressZero); firstTry := TRUE; - freeList[nofLists] := 1; + freeList[nofLists] := 1; (* Sentinel, # 0 *) FileCount := 0; modules := NIL; - bigBlocks := 0; fin := NIL; interrupted := FALSE; From 8220c4e8078b23a6df375354a332fd1a52071990 Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 19 Dec 2016 16:11:32 +0000 Subject: [PATCH 103/241] Fix heap for -OC build on 32 bit systems. --- src/runtime/Heap.Mod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 33d16f7b..c5a5a977 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -428,8 +428,8 @@ MODULE Heap; END END Scan; - PROCEDURE Sift (l, r: S.ADDRESS; VAR a: ARRAY OF S.ADDRESS); - VAR i, j, x: S.ADDRESS; + PROCEDURE Sift (l, r: LONGINT; VAR a: ARRAY OF S.ADDRESS); + VAR i, j: LONGINT; x: S.ADDRESS; BEGIN j := l; x := a[j]; LOOP i := j; j := 2*j + 1; IF (j < r) & uLT(a[j], a[j+1]) THEN INC(j) END; @@ -439,8 +439,8 @@ MODULE Heap; a[i] := x END Sift; - PROCEDURE HeapSort (n: S.ADDRESS; VAR a: ARRAY OF S.ADDRESS); - VAR l, r, x: S.ADDRESS; + PROCEDURE HeapSort (n: LONGINT; VAR a: ARRAY OF S.ADDRESS); + VAR l, r: LONGINT; x: S.ADDRESS; BEGIN l := n DIV 2; r := n - 1; WHILE l > 0 DO DEC(l); Sift(l, r, a) END; WHILE r > 0 DO x := a[0]; a[0] := a[r]; a[r] := x; DEC(r); Sift(l, r, a) END From c6388006b987d57b19114986712b115700bd55fe Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 19 Dec 2016 16:12:09 +0000 Subject: [PATCH 104/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 117 ++++++++++++------------ bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 117 ++++++++++++------------ bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 131 +++++++++++++-------------- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 117 ++++++++++++------------ bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 131 +++++++++++++-------------- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 499 insertions(+), 504 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index c828f47d..d13ed803 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 5fa885ca..eb305bbe 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index af5f5580..d10b5011 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 9d302c54..94faa2a1 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index dd99850c..d0b6716f 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index a5b7cd03..d6b6560d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,7 +69,7 @@ static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; export INT32 Heap_heap; -static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -113,6 +113,8 @@ extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_ModulesHalt(code) Modules_Halt(code) #define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) +#define Heap_uLE(x, y) ((size_t)x <= (size_t)y) +#define Heap_uLT(x, y) ((size_t)x < (size_t)y) void Heap_Lock (void) { @@ -213,20 +215,11 @@ static INT32 Heap_NewChunk (INT32 blksz) __PUT(blk + 12, Heap_bigBlocks, INT32); Heap_bigBlocks = blk; Heap_heapsize += blksz; - if (chnk > 0) { - if (chnk < Heap_heapPosMin) { - Heap_heapPosMin = blk + 4; - } - if (end > Heap_heapPosMax) { - Heap_heapPosMax = end; - } - } else { - if (chnk < Heap_heapNegMin) { - Heap_heapNegMin = blk + 4; - } - if (end > Heap_heapNegMax) { - Heap_heapNegMax = end; - } + if (Heap_uLT(blk + 4, Heap_heapMin)) { + Heap_heapMin = blk + 4; + } + if (Heap_uLT(Heap_heapMax, end)) { + Heap_heapMax = end; } } return chnk; @@ -235,20 +228,20 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (blksz > 160000) { + if (Heap_uLT(160000, blksz)) { size = blksz; } else { size = 160000; } chnk = Heap_NewChunk(size); if (chnk != 0) { - if (chnk < Heap_heap) { + if (Heap_uLT(chnk, Heap_heap)) { __PUT(chnk, Heap_heap, INT32); Heap_heap = chnk; } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk - next > 0)) { + while ((next != 0 && Heap_uLT(next, chnk))) { j = next; __GET(j, next, INT32); } @@ -266,14 +259,14 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __GET(tag, blksz, INT32); i0 = __ASHR(blksz, 4); i = i0; - if (i < 9) { + if (Heap_uLT(i, 9)) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (i < 9) { + if (Heap_uLT(i, 9)) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -296,7 +289,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2) < Heap_heapsize) { + if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); } Heap_firstTry = 0; @@ -314,7 +307,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } } __GET(adr + 4, t, INT32); - if (t >= blksz) { + if (Heap_uLE(blksz, t)) { break; } prev = adr; @@ -325,7 +318,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __PUT(end + 4, blksz, INT32); __PUT(end + 8, -4, INT32); __PUT(end, end + 4, INT32); - if (restsize > 144) { + if (Heap_uLT(144, restsize)) { __PUT(adr + 4, restsize, INT32); } else { __GET(adr + 12, next, INT32); @@ -334,7 +327,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } else { __PUT(prev + 12, next, INT32); } - if (restsize > 0) { + if (restsize != 0) { di = __ASHR(restsize, 4); __PUT(adr + 4, restsize, INT32); __PUT(adr + 12, Heap_freeList[di], INT32); @@ -345,7 +338,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (end - i > 0) { + while (Heap_uLT(i, end)) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,17 +435,17 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (end - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -471,14 +464,14 @@ static void Heap_Scan (void) adr += size; } } - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -492,16 +485,17 @@ static void Heap_Scan (void) static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { - INT32 i, j, x; + INT32 i, j; + INT32 x; j = l; x = a[j]; for (;;) { i = j; j = __ASHL(j, 1) + 1; - if ((j < r && a[j] < a[j + 1])) { + if ((j < r && Heap_uLT(a[j], a[j + 1]))) { j += 1; } - if (j > r || a[j] <= x) { + if (j > r || Heap_uLE(a[j], x)) { break; } a[i] = a[j]; @@ -511,7 +505,8 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { - INT32 l, r, x; + INT32 l, r; + INT32 x; l = __ASHR(n, 1); r = n - 1; while (l > 0) { @@ -529,35 +524,40 @@ static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { - INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; - chnk = Heap_heap; + INT32 chnk, end, adr, tag, next, i, ptr, size; + chnk = Heap_heap; i = 0; - lim = cand[n - 1]; - while ((chnk != 0 && lim - chnk > 0)) { + while (chnk != 0) { + __GET(chnk + 4, end, INT32); adr = chnk + 12; - __GET(chnk + 4, lim1, INT32); - if (lim1 - lim > 0) { - lim1 = lim; - } - while (lim1 - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); adr += size; + ptr = adr + 4; + while (Heap_uLT(cand[i], ptr)) { + i += 1; + if (i == n) { + return; + } + } } else { __GET(tag, size, INT32); ptr = adr + 4; - while (ptr - cand[i] > 0) { + adr += size; + while (Heap_uLT(cand[i], ptr)) { i += 1; + if (i == n) { + return; + } } - if (i == n) { - return; - } - next = adr + size; - if (next - cand[i] > 0) { + if (Heap_uLT(cand[i], adr)) { Heap_Mark(ptr); } - adr = next; + } + if (Heap_uLE(end, cand[i])) { + adr = end; } } __GET(chnk, chnk, INT32); @@ -619,7 +619,8 @@ void Heap_FINALL (void) static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; - INT32 inc, nofcand, sp, p, stack0; + INT32 nofcand; + INT32 inc, sp, p, stack0; struct Heap__1 align; if (n > 0) { Heap_MarkStack(n - 1, cand, cand__len); @@ -632,12 +633,12 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp - stack0 > 0) { + if (Heap_uLT(stack0, sp)) { inc = -inc; } while (sp != stack0) { __GET(sp, p, INT32); - if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { + if ((Heap_uLE(Heap_heapMin, p) && Heap_uLT(p, Heap_heapMax))) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -752,17 +753,15 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 2147483647; - Heap_heapPosMax = 0; - Heap_heapNegMin = 0; - Heap_heapNegMax = (-2147483647-1); + Heap_heapMin = -1; + Heap_heapMax = 0; + Heap_bigBlocks = 0; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; Heap_FileCount = 0; Heap_modules = NIL; - Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; Heap_HeapModuleInit(); diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 8a81aea1..87732bb9 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 881bee5a..c498f106 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 9e1502d5..f52b30af 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index c8ffb553..bb4ea138 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 587f5ca2..6757803a 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 556ff058..093bb886 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 377385f1..a32c29e0 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 5ec11c6f..0fd45dec 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index d52e3f0f..f246eacb 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 3199e877..c3e79413 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index c168cbe7..913d2eef 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index b554bf21..abfcd4b8 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 6e983459..9e15ba4e 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index fb5288f9..7bfd4abc 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index bc21d626..228191bf 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index adffc7a4..e44854e3 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 5d34109a..ea04b5b8 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 5f70ffca..fc487d97 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 4f49bfa7..cbb4de1a 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 5900abf5..b646e8b7 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index c628a89b..957af90d 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 2b39fcf1..9b449f98 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 016451be..3e83af42 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index b7456c5c..f9b5310a 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index be22ef18..58f9b546 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index c6e6c87a..bb00d7d0 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index f3849ea7..cab12269 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 9b5da2b4..80457921 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 2c94eb2a..1a589c43 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index fd65edea..46b1acc2 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("i686-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 7d8a92d3..4201df04 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index c828f47d..d13ed803 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 5fa885ca..eb305bbe 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index af5f5580..d10b5011 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 9d302c54..94faa2a1 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index dd99850c..d0b6716f 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index a5b7cd03..d6b6560d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,7 +69,7 @@ static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; export INT32 Heap_heap; -static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -113,6 +113,8 @@ extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_ModulesHalt(code) Modules_Halt(code) #define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) +#define Heap_uLE(x, y) ((size_t)x <= (size_t)y) +#define Heap_uLT(x, y) ((size_t)x < (size_t)y) void Heap_Lock (void) { @@ -213,20 +215,11 @@ static INT32 Heap_NewChunk (INT32 blksz) __PUT(blk + 12, Heap_bigBlocks, INT32); Heap_bigBlocks = blk; Heap_heapsize += blksz; - if (chnk > 0) { - if (chnk < Heap_heapPosMin) { - Heap_heapPosMin = blk + 4; - } - if (end > Heap_heapPosMax) { - Heap_heapPosMax = end; - } - } else { - if (chnk < Heap_heapNegMin) { - Heap_heapNegMin = blk + 4; - } - if (end > Heap_heapNegMax) { - Heap_heapNegMax = end; - } + if (Heap_uLT(blk + 4, Heap_heapMin)) { + Heap_heapMin = blk + 4; + } + if (Heap_uLT(Heap_heapMax, end)) { + Heap_heapMax = end; } } return chnk; @@ -235,20 +228,20 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (blksz > 160000) { + if (Heap_uLT(160000, blksz)) { size = blksz; } else { size = 160000; } chnk = Heap_NewChunk(size); if (chnk != 0) { - if (chnk < Heap_heap) { + if (Heap_uLT(chnk, Heap_heap)) { __PUT(chnk, Heap_heap, INT32); Heap_heap = chnk; } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk - next > 0)) { + while ((next != 0 && Heap_uLT(next, chnk))) { j = next; __GET(j, next, INT32); } @@ -266,14 +259,14 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __GET(tag, blksz, INT32); i0 = __ASHR(blksz, 4); i = i0; - if (i < 9) { + if (Heap_uLT(i, 9)) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (i < 9) { + if (Heap_uLT(i, 9)) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -296,7 +289,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2) < Heap_heapsize) { + if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); } Heap_firstTry = 0; @@ -314,7 +307,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } } __GET(adr + 4, t, INT32); - if (t >= blksz) { + if (Heap_uLE(blksz, t)) { break; } prev = adr; @@ -325,7 +318,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __PUT(end + 4, blksz, INT32); __PUT(end + 8, -4, INT32); __PUT(end, end + 4, INT32); - if (restsize > 144) { + if (Heap_uLT(144, restsize)) { __PUT(adr + 4, restsize, INT32); } else { __GET(adr + 12, next, INT32); @@ -334,7 +327,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } else { __PUT(prev + 12, next, INT32); } - if (restsize > 0) { + if (restsize != 0) { di = __ASHR(restsize, 4); __PUT(adr + 4, restsize, INT32); __PUT(adr + 12, Heap_freeList[di], INT32); @@ -345,7 +338,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (end - i > 0) { + while (Heap_uLT(i, end)) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,17 +435,17 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (end - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -471,14 +464,14 @@ static void Heap_Scan (void) adr += size; } } - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -492,16 +485,17 @@ static void Heap_Scan (void) static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { - INT32 i, j, x; + INT32 i, j; + INT32 x; j = l; x = a[j]; for (;;) { i = j; j = __ASHL(j, 1) + 1; - if ((j < r && a[j] < a[j + 1])) { + if ((j < r && Heap_uLT(a[j], a[j + 1]))) { j += 1; } - if (j > r || a[j] <= x) { + if (j > r || Heap_uLE(a[j], x)) { break; } a[i] = a[j]; @@ -511,7 +505,8 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { - INT32 l, r, x; + INT32 l, r; + INT32 x; l = __ASHR(n, 1); r = n - 1; while (l > 0) { @@ -529,35 +524,40 @@ static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { - INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; - chnk = Heap_heap; + INT32 chnk, end, adr, tag, next, i, ptr, size; + chnk = Heap_heap; i = 0; - lim = cand[n - 1]; - while ((chnk != 0 && lim - chnk > 0)) { + while (chnk != 0) { + __GET(chnk + 4, end, INT32); adr = chnk + 12; - __GET(chnk + 4, lim1, INT32); - if (lim1 - lim > 0) { - lim1 = lim; - } - while (lim1 - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); adr += size; + ptr = adr + 4; + while (Heap_uLT(cand[i], ptr)) { + i += 1; + if (i == n) { + return; + } + } } else { __GET(tag, size, INT32); ptr = adr + 4; - while (ptr - cand[i] > 0) { + adr += size; + while (Heap_uLT(cand[i], ptr)) { i += 1; + if (i == n) { + return; + } } - if (i == n) { - return; - } - next = adr + size; - if (next - cand[i] > 0) { + if (Heap_uLT(cand[i], adr)) { Heap_Mark(ptr); } - adr = next; + } + if (Heap_uLE(end, cand[i])) { + adr = end; } } __GET(chnk, chnk, INT32); @@ -619,7 +619,8 @@ void Heap_FINALL (void) static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; - INT32 inc, nofcand, sp, p, stack0; + INT32 nofcand; + INT32 inc, sp, p, stack0; struct Heap__1 align; if (n > 0) { Heap_MarkStack(n - 1, cand, cand__len); @@ -632,12 +633,12 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp - stack0 > 0) { + if (Heap_uLT(stack0, sp)) { inc = -inc; } while (sp != stack0) { __GET(sp, p, INT32); - if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { + if ((Heap_uLE(Heap_heapMin, p) && Heap_uLT(p, Heap_heapMax))) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -752,17 +753,15 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 2147483647; - Heap_heapPosMax = 0; - Heap_heapNegMin = 0; - Heap_heapNegMax = (-2147483647-1); + Heap_heapMin = -1; + Heap_heapMax = 0; + Heap_bigBlocks = 0; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; Heap_FileCount = 0; Heap_modules = NIL; - Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; Heap_HeapModuleInit(); diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 8a81aea1..87732bb9 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 881bee5a..c498f106 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 9e1502d5..f52b30af 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index c8ffb553..bb4ea138 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 587f5ca2..6757803a 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 556ff058..093bb886 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 377385f1..a32c29e0 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 5ec11c6f..0fd45dec 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index d52e3f0f..f246eacb 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 3199e877..c3e79413 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index c168cbe7..913d2eef 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index b554bf21..abfcd4b8 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 6e983459..9e15ba4e 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 13794d5f..fc598571 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index bc21d626..228191bf 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index adffc7a4..e44854e3 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 5d34109a..ea04b5b8 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 5f70ffca..fc487d97 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 4f49bfa7..cbb4de1a 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 5900abf5..b646e8b7 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index c628a89b..957af90d 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 2b39fcf1..9b449f98 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 016451be..3e83af42 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index b7456c5c..f9b5310a 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index be22ef18..58f9b546 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 2182dda5..96851302 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index fad4ca32..188b60fb 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 9b5da2b4..80457921 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 2c94eb2a..1a589c43 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index fd65edea..46b1acc2 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("i686-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 7d8a92d3..4201df04 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index c828f47d..d13ed803 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 5fa885ca..eb305bbe 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index af5f5580..d10b5011 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 915b50ff..10fc58d0 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 90be7986..5b4a0859 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index c618f3ef..9f808e0f 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,7 +69,7 @@ static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; export INT64 Heap_heap; -static INT64 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +static INT64 Heap_heapMin, Heap_heapMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -87,12 +87,12 @@ export void Heap_FINALL (void); static void Heap_Finalize (void); export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); +static void Heap_HeapSort (INT32 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT64 q); -static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len); +static void Heap_MarkCandidates (INT32 n, INT64 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT64 size); @@ -103,7 +103,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT64 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); +static void Heap_Sift (INT32 l, INT32 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -113,6 +113,8 @@ extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_ModulesHalt(code) Modules_Halt(code) #define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) +#define Heap_uLE(x, y) ((size_t)x <= (size_t)y) +#define Heap_uLT(x, y) ((size_t)x < (size_t)y) void Heap_Lock (void) { @@ -213,20 +215,11 @@ static INT64 Heap_NewChunk (INT64 blksz) __PUT(blk + 24, Heap_bigBlocks, INT64); Heap_bigBlocks = blk; Heap_heapsize += blksz; - if (chnk > 0) { - if (chnk < Heap_heapPosMin) { - Heap_heapPosMin = blk + 8; - } - if (end > Heap_heapPosMax) { - Heap_heapPosMax = end; - } - } else { - if (chnk < Heap_heapNegMin) { - Heap_heapNegMin = blk + 8; - } - if (end > Heap_heapNegMax) { - Heap_heapNegMax = end; - } + if (Heap_uLT(blk + 8, Heap_heapMin)) { + Heap_heapMin = blk + 8; + } + if (Heap_uLT(Heap_heapMax, end)) { + Heap_heapMax = end; } } return chnk; @@ -235,20 +228,20 @@ static INT64 Heap_NewChunk (INT64 blksz) static void Heap_ExtendHeap (INT64 blksz) { INT64 size, chnk, j, next; - if (blksz > 320000) { + if (Heap_uLT(320000, blksz)) { size = blksz; } else { size = 320000; } chnk = Heap_NewChunk(size); if (chnk != 0) { - if (chnk < Heap_heap) { + if (Heap_uLT(chnk, Heap_heap)) { __PUT(chnk, Heap_heap, INT64); Heap_heap = chnk; } else { j = Heap_heap; __GET(j, next, INT64); - while ((next != 0 && chnk - next > 0)) { + while ((next != 0 && Heap_uLT(next, chnk))) { j = next; __GET(j, next, INT64); } @@ -266,14 +259,14 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) __GET(tag, blksz, INT64); i0 = __ASHR(blksz, 5); i = i0; - if (i < 9) { + if (Heap_uLT(i, 9)) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (i < 9) { + if (Heap_uLT(i, 9)) { __GET(adr + 24, next, INT64); Heap_freeList[i] = next; if (i != i0) { @@ -296,7 +289,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - if (__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2) < Heap_heapsize) { + if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); } Heap_firstTry = 0; @@ -314,7 +307,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } } __GET(adr + 8, t, INT64); - if (t >= blksz) { + if (Heap_uLE(blksz, t)) { break; } prev = adr; @@ -325,7 +318,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) __PUT(end + 8, blksz, INT64); __PUT(end + 16, -8, INT64); __PUT(end, end + 8, INT64); - if (restsize > 288) { + if (Heap_uLT(288, restsize)) { __PUT(adr + 8, restsize, INT64); } else { __GET(adr + 24, next, INT64); @@ -334,7 +327,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } else { __PUT(prev + 24, next, INT64); } - if (restsize > 0) { + if (restsize != 0) { di = __ASHR(restsize, 5); __PUT(adr + 8, restsize, INT64); __PUT(adr + 24, Heap_freeList[di], INT64); @@ -345,7 +338,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } i = adr + 32; end = adr + blksz; - while (end - i > 0) { + while (Heap_uLT(i, end)) { __PUT(i, 0, INT64); __PUT(i + 8, 0, INT64); __PUT(i + 16, 0, INT64); @@ -442,17 +435,17 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 24; __GET(chnk + 8, end, INT64); - while (end - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT64); if (__ODD(tag)) { - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); i = __ASHR(freesize, 5); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); Heap_freeList[i] = start; } else { @@ -471,14 +464,14 @@ static void Heap_Scan (void) adr += size; } } - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); i = __ASHR(freesize, 5); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); Heap_freeList[i] = start; } else { @@ -490,18 +483,19 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) +static void Heap_Sift (INT32 l, INT32 r, INT64 *a, ADDRESS a__len) { - INT64 i, j, x; + INT32 i, j; + INT64 x; j = l; x = a[j]; for (;;) { i = j; j = __ASHL(j, 1) + 1; - if ((j < r && a[j] < a[j + 1])) { + if ((j < r && Heap_uLT(a[j], a[j + 1]))) { j += 1; } - if (j > r || a[j] <= x) { + if (j > r || Heap_uLE(a[j], x)) { break; } a[i] = a[j]; @@ -509,9 +503,10 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) a[i] = x; } -static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) +static void Heap_HeapSort (INT32 n, INT64 *a, ADDRESS a__len) { - INT64 l, r, x; + INT32 l, r; + INT64 x; l = __ASHR(n, 1); r = n - 1; while (l > 0) { @@ -527,37 +522,42 @@ static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) } } -static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) +static void Heap_MarkCandidates (INT32 n, INT64 *cand, ADDRESS cand__len) { - INT64 chnk, adr, tag, next, lim, lim1, i, ptr, size; - chnk = Heap_heap; + INT64 chnk, end, adr, tag, next, i, ptr, size; + chnk = Heap_heap; i = 0; - lim = cand[n - 1]; - while ((chnk != 0 && lim - chnk > 0)) { + while (chnk != 0) { + __GET(chnk + 8, end, INT64); adr = chnk + 24; - __GET(chnk + 8, lim1, INT64); - if (lim1 - lim > 0) { - lim1 = lim; - } - while (lim1 - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT64); if (__ODD(tag)) { __GET(tag - 1, size, INT64); adr += size; + ptr = adr + 8; + while (Heap_uLT(cand[i], ptr)) { + i += 1; + if (i == (INT64)n) { + return; + } + } } else { __GET(tag, size, INT64); ptr = adr + 8; - while (ptr - cand[i] > 0) { + adr += size; + while (Heap_uLT(cand[i], ptr)) { i += 1; + if (i == (INT64)n) { + return; + } } - if (i == n) { - return; - } - next = adr + size; - if (next - cand[i] > 0) { + if (Heap_uLT(cand[i], adr)) { Heap_Mark(ptr); } - adr = next; + } + if (Heap_uLE(end, cand[i])) { + adr = end; } } __GET(chnk, chnk, INT64); @@ -619,7 +619,8 @@ void Heap_FINALL (void) static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; - INT64 inc, nofcand, sp, p, stack0; + INT32 nofcand; + INT64 inc, sp, p, stack0; struct Heap__1 align; if (n > 0) { Heap_MarkStack(n - 1, cand, cand__len); @@ -632,13 +633,13 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp - stack0 > 0) { + if (Heap_uLT(stack0, sp)) { inc = -inc; } while (sp != stack0) { __GET(sp, p, INT64); - if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { - if (nofcand == (INT64)cand__len) { + if ((Heap_uLE(Heap_heapMin, p) && Heap_uLT(p, Heap_heapMax))) { + if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); nofcand = 0; @@ -752,17 +753,15 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 9223372036854775807LL; - Heap_heapPosMax = 0; - Heap_heapNegMin = 0; - Heap_heapNegMax = (-9223372036854775807LL-1); + Heap_heapMin = -1; + Heap_heapMax = 0; + Heap_bigBlocks = 0; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; Heap_FileCount = 0; Heap_modules = NIL; - Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; Heap_HeapModuleInit(); diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index cd281d35..ac0c9a94 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 95117c1d..3d520568 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 98b2aa47..13be7215 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index c8ffb553..bb4ea138 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 587f5ca2..6757803a 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 556ff058..093bb886 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 377385f1..a32c29e0 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 4b66e7f1..dc8eecc1 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index d52e3f0f..f246eacb 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 06c6a681..911d0bf7 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index c168cbe7..913d2eef 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index b554bf21..abfcd4b8 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 6e983459..9e15ba4e 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index cd38533c..68c085a5 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index bc21d626..228191bf 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 327f244d..7340919d 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 5d34109a..ea04b5b8 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a5f08778..b5fb4689 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 26039116..fe405da3 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 3c0223f6..0cf3f0c3 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 34af667e..38fee3de 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 2b39fcf1..9b449f98 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 016451be..3e83af42 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index b7456c5c..f9b5310a 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index be22ef18..58f9b546 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 09c54393..429d0665 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index cc880f07..ac6542ff 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 9b5da2b4..80457921 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 2c94eb2a..1a589c43 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index fd65edea..46b1acc2 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("i686-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 7d8a92d3..4201df04 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index c828f47d..d13ed803 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 5fa885ca..eb305bbe 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index af5f5580..d10b5011 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 6557a312..2922b3cd 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 8fbe56ca..b43aa306 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index a5b7cd03..d6b6560d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,7 +69,7 @@ static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; export INT32 Heap_heap; -static INT32 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -113,6 +113,8 @@ extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_ModulesHalt(code) Modules_Halt(code) #define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) +#define Heap_uLE(x, y) ((size_t)x <= (size_t)y) +#define Heap_uLT(x, y) ((size_t)x < (size_t)y) void Heap_Lock (void) { @@ -213,20 +215,11 @@ static INT32 Heap_NewChunk (INT32 blksz) __PUT(blk + 12, Heap_bigBlocks, INT32); Heap_bigBlocks = blk; Heap_heapsize += blksz; - if (chnk > 0) { - if (chnk < Heap_heapPosMin) { - Heap_heapPosMin = blk + 4; - } - if (end > Heap_heapPosMax) { - Heap_heapPosMax = end; - } - } else { - if (chnk < Heap_heapNegMin) { - Heap_heapNegMin = blk + 4; - } - if (end > Heap_heapNegMax) { - Heap_heapNegMax = end; - } + if (Heap_uLT(blk + 4, Heap_heapMin)) { + Heap_heapMin = blk + 4; + } + if (Heap_uLT(Heap_heapMax, end)) { + Heap_heapMax = end; } } return chnk; @@ -235,20 +228,20 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (blksz > 160000) { + if (Heap_uLT(160000, blksz)) { size = blksz; } else { size = 160000; } chnk = Heap_NewChunk(size); if (chnk != 0) { - if (chnk < Heap_heap) { + if (Heap_uLT(chnk, Heap_heap)) { __PUT(chnk, Heap_heap, INT32); Heap_heap = chnk; } else { j = Heap_heap; __GET(j, next, INT32); - while ((next != 0 && chnk - next > 0)) { + while ((next != 0 && Heap_uLT(next, chnk))) { j = next; __GET(j, next, INT32); } @@ -266,14 +259,14 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __GET(tag, blksz, INT32); i0 = __ASHR(blksz, 4); i = i0; - if (i < 9) { + if (Heap_uLT(i, 9)) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (i < 9) { + if (Heap_uLT(i, 9)) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -296,7 +289,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2) < Heap_heapsize) { + if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); } Heap_firstTry = 0; @@ -314,7 +307,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } } __GET(adr + 4, t, INT32); - if (t >= blksz) { + if (Heap_uLE(blksz, t)) { break; } prev = adr; @@ -325,7 +318,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) __PUT(end + 4, blksz, INT32); __PUT(end + 8, -4, INT32); __PUT(end, end + 4, INT32); - if (restsize > 144) { + if (Heap_uLT(144, restsize)) { __PUT(adr + 4, restsize, INT32); } else { __GET(adr + 12, next, INT32); @@ -334,7 +327,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } else { __PUT(prev + 12, next, INT32); } - if (restsize > 0) { + if (restsize != 0) { di = __ASHR(restsize, 4); __PUT(adr + 4, restsize, INT32); __PUT(adr + 12, Heap_freeList[di], INT32); @@ -345,7 +338,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) } i = adr + 16; end = adr + blksz; - while (end - i > 0) { + while (Heap_uLT(i, end)) { __PUT(i, 0, INT32); __PUT(i + 4, 0, INT32); __PUT(i + 8, 0, INT32); @@ -442,17 +435,17 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 12; __GET(chnk + 4, end, INT32); - while (end - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -471,14 +464,14 @@ static void Heap_Scan (void) adr += size; } } - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); i = __ASHR(freesize, 4); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); Heap_freeList[i] = start; } else { @@ -492,16 +485,17 @@ static void Heap_Scan (void) static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) { - INT32 i, j, x; + INT32 i, j; + INT32 x; j = l; x = a[j]; for (;;) { i = j; j = __ASHL(j, 1) + 1; - if ((j < r && a[j] < a[j + 1])) { + if ((j < r && Heap_uLT(a[j], a[j + 1]))) { j += 1; } - if (j > r || a[j] <= x) { + if (j > r || Heap_uLE(a[j], x)) { break; } a[i] = a[j]; @@ -511,7 +505,8 @@ static void Heap_Sift (INT32 l, INT32 r, INT32 *a, ADDRESS a__len) static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) { - INT32 l, r, x; + INT32 l, r; + INT32 x; l = __ASHR(n, 1); r = n - 1; while (l > 0) { @@ -529,35 +524,40 @@ static void Heap_HeapSort (INT32 n, INT32 *a, ADDRESS a__len) static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len) { - INT32 chnk, adr, tag, next, lim, lim1, i, ptr, size; - chnk = Heap_heap; + INT32 chnk, end, adr, tag, next, i, ptr, size; + chnk = Heap_heap; i = 0; - lim = cand[n - 1]; - while ((chnk != 0 && lim - chnk > 0)) { + while (chnk != 0) { + __GET(chnk + 4, end, INT32); adr = chnk + 12; - __GET(chnk + 4, lim1, INT32); - if (lim1 - lim > 0) { - lim1 = lim; - } - while (lim1 - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT32); if (__ODD(tag)) { __GET(tag - 1, size, INT32); adr += size; + ptr = adr + 4; + while (Heap_uLT(cand[i], ptr)) { + i += 1; + if (i == n) { + return; + } + } } else { __GET(tag, size, INT32); ptr = adr + 4; - while (ptr - cand[i] > 0) { + adr += size; + while (Heap_uLT(cand[i], ptr)) { i += 1; + if (i == n) { + return; + } } - if (i == n) { - return; - } - next = adr + size; - if (next - cand[i] > 0) { + if (Heap_uLT(cand[i], adr)) { Heap_Mark(ptr); } - adr = next; + } + if (Heap_uLE(end, cand[i])) { + adr = end; } } __GET(chnk, chnk, INT32); @@ -619,7 +619,8 @@ void Heap_FINALL (void) static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; - INT32 inc, nofcand, sp, p, stack0; + INT32 nofcand; + INT32 inc, sp, p, stack0; struct Heap__1 align; if (n > 0) { Heap_MarkStack(n - 1, cand, cand__len); @@ -632,12 +633,12 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp - stack0 > 0) { + if (Heap_uLT(stack0, sp)) { inc = -inc; } while (sp != stack0) { __GET(sp, p, INT32); - if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { + if ((Heap_uLE(Heap_heapMin, p) && Heap_uLT(p, Heap_heapMax))) { if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); @@ -752,17 +753,15 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 2147483647; - Heap_heapPosMax = 0; - Heap_heapNegMin = 0; - Heap_heapNegMax = (-2147483647-1); + Heap_heapMin = -1; + Heap_heapMax = 0; + Heap_bigBlocks = 0; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; Heap_freeList[9] = 1; Heap_FileCount = 0; Heap_modules = NIL; - Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; Heap_HeapModuleInit(); diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 8a81aea1..87732bb9 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index bda8ec0b..458d281f 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 9e1502d5..f52b30af 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index c8ffb553..bb4ea138 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 587f5ca2..6757803a 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 556ff058..093bb886 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 377385f1..a32c29e0 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 5ec11c6f..0fd45dec 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index d52e3f0f..f246eacb 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 3199e877..c3e79413 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index c168cbe7..913d2eef 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index b554bf21..abfcd4b8 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 6e983459..9e15ba4e 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 13794d5f..fc598571 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index bc21d626..228191bf 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index adffc7a4..e44854e3 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 5d34109a..ea04b5b8 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 07ed2f75..ebafde72 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 4f49bfa7..cbb4de1a 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index bf9c1b7f..fee81ec0 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 99ea737f..19fe26f9 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 2b39fcf1..9b449f98 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 016451be..3e83af42 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index b7456c5c..f9b5310a 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index be22ef18..58f9b546 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 2182dda5..96851302 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index fad4ca32..188b60fb 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 9b5da2b4..80457921 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 2c94eb2a..1a589c43 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index fd65edea..46b1acc2 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("i686-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 7d8a92d3..4201df04 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index c828f47d..d13ed803 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 5fa885ca..eb305bbe 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index af5f5580..d10b5011 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 097b5552..3b7e4c54 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 6ef831df..0093b4e8 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index c618f3ef..9f808e0f 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,7 +69,7 @@ static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; export INT64 Heap_heap; -static INT64 Heap_heapNegMin, Heap_heapNegMax, Heap_heapPosMin, Heap_heapPosMax; +static INT64 Heap_heapMin, Heap_heapMax; export INT64 Heap_heapsize; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; @@ -87,12 +87,12 @@ export void Heap_FINALL (void); static void Heap_Finalize (void); export INT32 Heap_FreeModule (CHAR *name, ADDRESS name__len); export void Heap_GC (BOOLEAN markStack); -static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len); +static void Heap_HeapSort (INT32 n, INT64 *a, ADDRESS a__len); export void Heap_INCREF (Heap_Module m); export void Heap_InitHeap (void); export void Heap_Lock (void); static void Heap_Mark (INT64 q); -static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len); +static void Heap_MarkCandidates (INT32 n, INT64 *cand, ADDRESS cand__len); static void Heap_MarkP (SYSTEM_PTR p); static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len); export SYSTEM_PTR Heap_NEWBLK (INT64 size); @@ -103,7 +103,7 @@ export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs); export void Heap_REGTYP (Heap_Module m, INT64 typ); export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize); static void Heap_Scan (void); -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len); +static void Heap_Sift (INT32 l, INT32 r, INT64 *a, ADDRESS a__len); export void Heap_Unlock (void); extern void *Heap__init(); @@ -113,6 +113,8 @@ extern ADDRESS Platform_OSAllocate(ADDRESS size); #define Heap_ModulesHalt(code) Modules_Halt(code) #define Heap_ModulesMainStackFrame() Modules_MainStackFrame #define Heap_OSAllocate(size) Platform_OSAllocate(size) +#define Heap_uLE(x, y) ((size_t)x <= (size_t)y) +#define Heap_uLT(x, y) ((size_t)x < (size_t)y) void Heap_Lock (void) { @@ -213,20 +215,11 @@ static INT64 Heap_NewChunk (INT64 blksz) __PUT(blk + 24, Heap_bigBlocks, INT64); Heap_bigBlocks = blk; Heap_heapsize += blksz; - if (chnk > 0) { - if (chnk < Heap_heapPosMin) { - Heap_heapPosMin = blk + 8; - } - if (end > Heap_heapPosMax) { - Heap_heapPosMax = end; - } - } else { - if (chnk < Heap_heapNegMin) { - Heap_heapNegMin = blk + 8; - } - if (end > Heap_heapNegMax) { - Heap_heapNegMax = end; - } + if (Heap_uLT(blk + 8, Heap_heapMin)) { + Heap_heapMin = blk + 8; + } + if (Heap_uLT(Heap_heapMax, end)) { + Heap_heapMax = end; } } return chnk; @@ -235,20 +228,20 @@ static INT64 Heap_NewChunk (INT64 blksz) static void Heap_ExtendHeap (INT64 blksz) { INT64 size, chnk, j, next; - if (blksz > 320000) { + if (Heap_uLT(320000, blksz)) { size = blksz; } else { size = 320000; } chnk = Heap_NewChunk(size); if (chnk != 0) { - if (chnk < Heap_heap) { + if (Heap_uLT(chnk, Heap_heap)) { __PUT(chnk, Heap_heap, INT64); Heap_heap = chnk; } else { j = Heap_heap; __GET(j, next, INT64); - while ((next != 0 && chnk - next > 0)) { + while ((next != 0 && Heap_uLT(next, chnk))) { j = next; __GET(j, next, INT64); } @@ -266,14 +259,14 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) __GET(tag, blksz, INT64); i0 = __ASHR(blksz, 5); i = i0; - if (i < 9) { + if (Heap_uLT(i, 9)) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (i < 9) { + if (Heap_uLT(i, 9)) { __GET(adr + 24, next, INT64); Heap_freeList[i] = next; if (i != i0) { @@ -296,7 +289,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - if (__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2) < Heap_heapsize) { + if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); } Heap_firstTry = 0; @@ -314,7 +307,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } } __GET(adr + 8, t, INT64); - if (t >= blksz) { + if (Heap_uLE(blksz, t)) { break; } prev = adr; @@ -325,7 +318,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) __PUT(end + 8, blksz, INT64); __PUT(end + 16, -8, INT64); __PUT(end, end + 8, INT64); - if (restsize > 288) { + if (Heap_uLT(288, restsize)) { __PUT(adr + 8, restsize, INT64); } else { __GET(adr + 24, next, INT64); @@ -334,7 +327,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } else { __PUT(prev + 24, next, INT64); } - if (restsize > 0) { + if (restsize != 0) { di = __ASHR(restsize, 5); __PUT(adr + 8, restsize, INT64); __PUT(adr + 24, Heap_freeList[di], INT64); @@ -345,7 +338,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) } i = adr + 32; end = adr + blksz; - while (end - i > 0) { + while (Heap_uLT(i, end)) { __PUT(i, 0, INT64); __PUT(i + 8, 0, INT64); __PUT(i + 16, 0, INT64); @@ -442,17 +435,17 @@ static void Heap_Scan (void) while (chnk != 0) { adr = chnk + 24; __GET(chnk + 8, end, INT64); - while (end - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT64); if (__ODD(tag)) { - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); i = __ASHR(freesize, 5); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); Heap_freeList[i] = start; } else { @@ -471,14 +464,14 @@ static void Heap_Scan (void) adr += size; } } - if (freesize > 0) { + if (freesize != 0) { start = adr - freesize; __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); i = __ASHR(freesize, 5); freesize = 0; - if (i < 9) { + if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); Heap_freeList[i] = start; } else { @@ -490,18 +483,19 @@ static void Heap_Scan (void) } } -static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) +static void Heap_Sift (INT32 l, INT32 r, INT64 *a, ADDRESS a__len) { - INT64 i, j, x; + INT32 i, j; + INT64 x; j = l; x = a[j]; for (;;) { i = j; j = __ASHL(j, 1) + 1; - if ((j < r && a[j] < a[j + 1])) { + if ((j < r && Heap_uLT(a[j], a[j + 1]))) { j += 1; } - if (j > r || a[j] <= x) { + if (j > r || Heap_uLE(a[j], x)) { break; } a[i] = a[j]; @@ -509,9 +503,10 @@ static void Heap_Sift (INT64 l, INT64 r, INT64 *a, ADDRESS a__len) a[i] = x; } -static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) +static void Heap_HeapSort (INT32 n, INT64 *a, ADDRESS a__len) { - INT64 l, r, x; + INT32 l, r; + INT64 x; l = __ASHR(n, 1); r = n - 1; while (l > 0) { @@ -527,37 +522,42 @@ static void Heap_HeapSort (INT64 n, INT64 *a, ADDRESS a__len) } } -static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len) +static void Heap_MarkCandidates (INT32 n, INT64 *cand, ADDRESS cand__len) { - INT64 chnk, adr, tag, next, lim, lim1, i, ptr, size; - chnk = Heap_heap; + INT64 chnk, end, adr, tag, next, i, ptr, size; + chnk = Heap_heap; i = 0; - lim = cand[n - 1]; - while ((chnk != 0 && lim - chnk > 0)) { + while (chnk != 0) { + __GET(chnk + 8, end, INT64); adr = chnk + 24; - __GET(chnk + 8, lim1, INT64); - if (lim1 - lim > 0) { - lim1 = lim; - } - while (lim1 - adr > 0) { + while (Heap_uLT(adr, end)) { __GET(adr, tag, INT64); if (__ODD(tag)) { __GET(tag - 1, size, INT64); adr += size; + ptr = adr + 8; + while (Heap_uLT(cand[i], ptr)) { + i += 1; + if (i == (INT64)n) { + return; + } + } } else { __GET(tag, size, INT64); ptr = adr + 8; - while (ptr - cand[i] > 0) { + adr += size; + while (Heap_uLT(cand[i], ptr)) { i += 1; + if (i == (INT64)n) { + return; + } } - if (i == n) { - return; - } - next = adr + size; - if (next - cand[i] > 0) { + if (Heap_uLT(cand[i], adr)) { Heap_Mark(ptr); } - adr = next; + } + if (Heap_uLE(end, cand[i])) { + adr = end; } } __GET(chnk, chnk, INT64); @@ -619,7 +619,8 @@ void Heap_FINALL (void) static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) { SYSTEM_PTR frame; - INT64 inc, nofcand, sp, p, stack0; + INT32 nofcand; + INT64 inc, sp, p, stack0; struct Heap__1 align; if (n > 0) { Heap_MarkStack(n - 1, cand, cand__len); @@ -632,13 +633,13 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len) sp = (ADDRESS)&frame; stack0 = Heap_ModulesMainStackFrame(); inc = (ADDRESS)&align.p - (ADDRESS)&align; - if (sp - stack0 > 0) { + if (Heap_uLT(stack0, sp)) { inc = -inc; } while (sp != stack0) { __GET(sp, p, INT64); - if ((((p > 0 && p >= Heap_heapPosMin)) && p < Heap_heapPosMax) || (((p < 0 && p >= Heap_heapNegMin)) && p < Heap_heapNegMax)) { - if (nofcand == (INT64)cand__len) { + if ((Heap_uLE(Heap_heapMin, p) && Heap_uLT(p, Heap_heapMax))) { + if (nofcand == cand__len) { Heap_HeapSort(nofcand, (void*)cand, cand__len); Heap_MarkCandidates(nofcand, (void*)cand, cand__len); nofcand = 0; @@ -752,17 +753,15 @@ void Heap_InitHeap (void) Heap_heapsize = 0; Heap_allocated = 0; Heap_lockdepth = 0; - Heap_heapPosMin = 9223372036854775807LL; - Heap_heapPosMax = 0; - Heap_heapNegMin = 0; - Heap_heapNegMax = (-9223372036854775807LL-1); + Heap_heapMin = -1; + Heap_heapMax = 0; + Heap_bigBlocks = 0; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; Heap_freeList[9] = 1; Heap_FileCount = 0; Heap_modules = NIL; - Heap_bigBlocks = 0; Heap_fin = NIL; Heap_interrupted = 0; Heap_HeapModuleInit(); diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index cd281d35..ac0c9a94 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tsSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index c210b7d7..539c398c 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 98b2aa47..13be7215 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index c8ffb553..bb4ea138 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 587f5ca2..6757803a 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 556ff058..093bb886 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 377385f1..a32c29e0 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 4b66e7f1..dc8eecc1 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index d52e3f0f..f246eacb 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 06c6a681..911d0bf7 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index c168cbe7..913d2eef 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index b554bf21..abfcd4b8 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 6e983459..9e15ba4e 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index cd38533c..68c085a5 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index bc21d626..228191bf 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 327f244d..7340919d 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 5d34109a..ea04b5b8 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 6ad86a73..cb9b1989 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 26039116..fe405da3 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index aa0f4ff3..127901b0 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7699502f..0b6a96a2 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 2b39fcf1..9b449f98 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 016451be..3e83af42 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index b7456c5c..f9b5310a 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index be22ef18..58f9b546 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 09c54393..429d0665 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index cc880f07..ac6542ff 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 9b5da2b4..80457921 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 2c94eb2a..1a589c43 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index fd65edea..46b1acc2 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -65,7 +65,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("i686-w64-mingw32-gcc -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -95,7 +95,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 7d8a92d3..4201df04 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/18]. Bootstrapping compiler for address size 4, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 412a8c3337ae1c89d608b1a2b33d2dced3063de0 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 20 Dec 2016 15:16:18 +0000 Subject: [PATCH 105/241] Document compilation; remove OpenBSD debugging. --- ReadMe.md | 7 +- doc/Compiling.md | 82 +++++++++++++ doc/Features.md | 2 +- src/compiler/Compiler.Mod | 2 +- src/compiler/OPM.Mod | 36 +++--- src/compiler/OPP.Mod | 2 +- src/compiler/extTools.Mod | 4 +- src/runtime/Files.Mod | 75 +----------- src/runtime/Out.Mod | 153 +------------------------ src/runtime/Texts.Mod | 64 ----------- src/test/confidence/intsyntax/expected | 2 +- 11 files changed, 110 insertions(+), 319 deletions(-) create mode 100644 doc/Compiling.md diff --git a/ReadMe.md b/ReadMe.md index 95732f0d..32e200b0 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -14,8 +14,8 @@ default libraries complying with the Oakwood Guidelines for Oberon-2 compilers. ### Contents     [**Installation**](#installation)
-    [**A 'Hello' application**](#a-hello-application)
-    [**Licensing**](#licensing)
+    [**Compiling a 'Hello' application**](#a-hello-application)
+    [**License**](#license)
    [**Platform support and porting**](#platform-support-and-porting)
    [**Language support and libraries**](#language-support-and-libraries)
    [**History**](#history)
@@ -138,6 +138,7 @@ executable binary. Execute as usual on Linux (`./hello`) or Windows (`hello`). +For more details on compilation, see [**Compiling**](/doc/Compiling.md). ### Viewing the interfaces of included modules. @@ -163,7 +164,7 @@ END Out. ``` -## Licensing +## License Vishap Oberon's frontend and C backend engine is a fork of Josef Templ’s Ofront, which has been released under the FreeBSD License. Unlike Ofront, Vishap Oberon does not include the Oberon v4 GUI environment. diff --git a/doc/Compiling.md b/doc/Compiling.md new file mode 100644 index 00000000..abeaf6c2 --- /dev/null +++ b/doc/Compiling.md @@ -0,0 +1,82 @@ +## Compiling + +An Oberon command line program is built from one or more modules. One module must be designated a main module. + +### Files generated + +From each non-main module the following files are generated in the current directory: + +| Filename | Purpose | +| ---------- | --------------------------------------------------------------------- | +| ```module.sym``` | Oberon symbols required to ```IMPORT``` this module in another compilation.| +| ```module.c``` | C source code for compilation by gcc, clang or msc. | +| ```module.h``` | C header files required by C compiler when importing this module. | + +Note that the filename of the .sym, .c and .h files is the name of the module from the ```MODULE``` statement at the start of the source file. It is not the name of the .mod file. + +If the compilation is successful, the Oberon compiler will automatically invoke the C compiler. The compiler option ```-V``` will cause the compiler to display the C compiler command used. + +### Successful compilation report + +For a successful compilation, the compiler displays a single line comprising + + * The name of the file being compiled + * The name of the module from the ```MODULE``` statment + * Compiler configuration (only if the ```-V``` verbose option is selected) + * A possible symbol update status message + * The number of characters compiled + +If a symbols file already exists, the compiler will check whether the new compilation changes the symbols, and if so whether the change is just an extension, or a more serious compatability threatening modification. If there is a change the compiler displays either ```Extended symbol file``` or ```New symbol file```. + +For example: + +``` +$ voc test.mod +test.mod Compiling test. New symbol file. 364 chars. +``` + +### Symbol file changes + +By default the compiler will refuse to compile a module if its symbols are different from those in the .sym file present from a previous compilation. To allow the compiler to change the symbols, one of the following options must be used. + +| Compiler option | Use | +| :-------------: | --------------------------- | +| ```-e``` | Allow extension of symbols. Do not allow changes to existing symbols. | +| ```-s``` | Allow changes to and extensions of symbols. | +| ```-F``` | Force generation of new symbol file.* | + +\* A new symbol file may be forced to guarantee that a symbol file is generated for a module that has the same name as an installed library module. + +### Main module + +The main module should be the last module compiled as it imports all other modules. + +The program logic should be started from the main module's initialisation code. + +The following options designate the main module: + +| Compiler option | Use | +| :-------------: | --------------------------- | +| ```-m``` | Generate loadable binary using dynamic library loading (on systems that support it). | +| ```-M``` | Generate loadable binary with all library references statically linked. | + +For a main module, no .sym or .h files are generated, and the C compiler is called with additional parameters to generate the execututable binary, linking the object files needed for imported modules. + +### Separate compilation + +Each module may be compiled by a separate command line, although the imports of a module must be compiled before the module is compiled. All three generated files (.sym, .c and .h) must be retained at least until all modules dependent on this module have been compiled. + +Multiple modules may be compiled on a single compiler command line. + +Options on the command line that preceed all module file names will be used as global settings: each module will be compiled with these settings except as overriden on a per file basis. + +Options on the command line that follow a module file name are specific to that module. + +For example: + +``` + voc -s alpha.mod beta.mod main.mod -m +``` + +Will apply the ```-s``` option to all modules (allow changes to and extension of symbols), and will apply the ```-m``` option (main program) only to ```main.mod```. + diff --git a/doc/Features.md b/doc/Features.md index 96c1bf78..ffcb4a93 100644 --- a/doc/Features.md +++ b/doc/Features.md @@ -1,4 +1,4 @@ -### Features +## Features #### 32 bit and 64 bit systems vs integer, set and address size. diff --git a/src/compiler/Compiler.Mod b/src/compiler/Compiler.Mod index 9e44a180..6148fea2 100644 --- a/src/compiler/Compiler.Mod +++ b/src/compiler/Compiler.Mod @@ -99,7 +99,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) Strings.Append(fn, objectnames) ELSE (* Found symbol file but no object file. *) - OPM.LogVT100(VT100.Yellow); + OPM.LogVT100(VT100.LightRed); OPM.LogWStr("Link warning: a local symbol file is present for module "); OPM.LogWStr(l.name); OPM.LogWStr(", but local object file '"); OPM.LogWStr(fn); OPM.LogWStr("' is missing."); OPM.LogVT100(VT100.ResetAll); OPM.LogWLn diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index ecfe4ac3..85392b15 100644 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -137,6 +137,18 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END END LogVT100; + PROCEDURE LogCompiling*(modname: ARRAY OF CHAR); + BEGIN + LogWStr("Compiling "); LogWStr(modname); + IF verbose IN Options THEN + LogWStr(", s:"); LogWNum(ShortintSize*8,1); + LogWStr( " i:"); LogWNum(IntegerSize*8,1); + LogWStr( " l:"); LogWNum(LongintSize*8,1); + LogWStr( " adr:"); LogWNum(AddressSize*8,1); + LogWStr( " algn:"); LogWNum(Alignment*8,1) + END; + LogW("."); + END LogCompiling; (* Integer size support *) @@ -299,20 +311,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) END OpenPar; - PROCEDURE VerboseListSizes; - BEGIN - LogWLn; - LogWStr("Type Size"); LogWLn; - LogWStr("SHORTINT "); LogWNum(ShortintSize, 4); LogWLn; - LogWStr("INTEGER "); LogWNum(IntegerSize, 4); LogWLn; - LogWStr("LONGINT "); LogWNum(LongintSize, 4); LogWLn; - LogWStr("SET "); LogWNum(LongintSize, 4); LogWLn; - LogWStr("ADDRESS "); LogWNum(AddressSize, 4); LogWLn; - LogWLn; - LogWStr("Alignment: "); LogWNum(Alignment, 4); LogWLn; - END VerboseListSizes; - - PROCEDURE InitOptions*; (* get the options for one translation *) VAR s: ARRAY 256 OF CHAR; searchpath, modules: ARRAY 1024 OF CHAR; MODULES: ARRAY 1024 OF CHAR; @@ -336,7 +334,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) ELSE ShortintSize := 1; IntegerSize := 2; LongintSize := 4 END; - IF verbose IN Options THEN VerboseListSizes END; + (*IF verbose IN Options THEN VerboseListSizes END;*) ResourceDir := InstallDir; IF ResourceDir[0] # 0X THEN @@ -392,14 +390,6 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) curpos := Texts.Pos(inR); Texts.Read(inR, ch); - (* OpenBSD intermittent file read error debugging. *) - IF (curpos = 0) & inR.eot THEN - LogWLn; LogWStr("DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = "); - LogWNum(ORD(ch),1); LogW("."); - Texts.DumpReader(inR); - LogWLn; LogWStr("Heap dump:"); LogWLn; - Out.DumpHeap - END; (* TODO, remove curpos var, and provide fn returning Texts.Pos(inR) - 1. *) (* Or, better still, record symbol position in OPS. *) diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 8cfc5a55..2b9fb0b1 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -1007,7 +1007,7 @@ MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) OPS.Init; LoopLevel := 0; level := 0; OPS.Get(sym); IF sym = OPS.module THEN OPS.Get(sym) ELSE err(16) END; IF sym = OPS.ident THEN - OPM.LogWStr("compiling "); OPM.LogWStr(OPS.name); OPM.LogW("."); + OPM.LogCompiling(OPS.name); OPT.Init(OPS.name, opt); OPS.Get(sym); CheckSym(OPS.semicolon); IF sym = OPS.import THEN OPS.Get(sym); LOOP diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index d4bb7f84..10163ced 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -49,7 +49,7 @@ PROCEDURE Assemble*(moduleName: ARRAY OF CHAR); Strings.Append("-c ", cmd); Strings.Append(moduleName, cmd); Strings.Append(".c", cmd); - execute("Assemble: ", cmd); + execute("C compile: ", cmd); END Assemble; @@ -73,7 +73,7 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition Strings.Append('-O', cmd); Strings.Append(OPM.Model, cmd); Strings.Append(Configuration.libext, cmd); - execute("Assemble and link: ", cmd); + execute("C compile and link: ", cmd); END LinkMain; diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index f60e67bb..eb369b3c 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -70,44 +70,6 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files SearchPath: POINTER TO ARRAY OF CHAR; -(* Debugging intermittent OpenBSD failure. *) - - PROCEDURE Spaces(i: INTEGER); BEGIN WHILE i>0 DO Out.String(" "); DEC(i) END END Spaces; - - PROCEDURE DumpFile*(f: File; indent: INTEGER); - BEGIN - Spaces(indent); Out.String("workName: "); Out.String(f.workName); Out.Ln; - Spaces(indent); Out.String("registerName: "); Out.String(f.registerName); Out.Ln; - Spaces(indent); Out.String("tempFile: "); IF f.tempFile THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - Spaces(indent); Out.String("identity: "); Out.String("..."); Out.Ln; (* TBD *) - Spaces(indent); Out.String("fd: "); Out.Int(f.fd,1); Out.Ln; - Spaces(indent); Out.String("len, "); Out.Int(f.len,1); Out.Ln; - Spaces(indent); Out.String("pos: "); Out.Int(f.pos,1); Out.Ln; - Spaces(indent); Out.String("bufs: "); Out.String("..."); Out.Ln; (* TBD *) - Spaces(indent); Out.String("swapper: "); Out.Int(f.swapper,1); Out.Ln; - Spaces(indent); Out.String("state: "); Out.Int(f.state,1); Out.Ln; - Spaces(indent); Out.String("next: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS,f.next),1); Out.Ln; - END DumpFile; - - PROCEDURE DumpBuffer*(b: Buffer; indent: INTEGER); - BEGIN - Spaces(indent); Out.String("chg: "); IF b.chg THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - Spaces(indent); Out.String("org: "); Out.Int(b.org,1); Out.Ln; - Spaces(indent); Out.String("size: "); Out.Int(b.size,1); Out.Ln; - Spaces(indent); Out.String("data: "); Out.Ln; Out.HexDump(b.data); - Spaces(indent); Out.String("f: "); IF b.f = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpFile(b.f, indent+1) END; - END DumpBuffer; - - PROCEDURE DumpRider*(r: Rider; indent: INTEGER); - BEGIN - Spaces(indent); Out.String("res: "); Out.Int(r.res,1); Out.Ln; - Spaces(indent); Out.String("eof: "); IF r.eof THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - Spaces(indent); Out.String("org: "); Out.Int(r.org,1); Out.Ln; - Spaces(indent); Out.String("offset: "); Out.Int(r.offset,1); Out.Ln; - Spaces(indent); Out.String("buf: "); IF r.buf = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpBuffer(r.buf, indent+1) END; - END DumpRider; - - PROCEDURE -IdxTrap "__HALT(-1)"; PROCEDURE^ Finalize(o: SYSTEM.PTR); @@ -203,13 +165,6 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files error: Platform.ErrorCode; err: ARRAY 32 OF CHAR; BEGIN - (* - Out.String("Files.Create fd = "); Out.Int(f.fd,1); - Out.String(", registerName = "); Out.String(f.registerName); - Out.String(", workName = "); Out.String(f.workName); - Out.String(", state = "); Out.Int(f.state,1); - Out.Ln; - *) IF f.fd = NoDesc THEN IF f.state = create THEN (* New file with enough data written to exceed buffers, so we need to @@ -248,19 +203,9 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files f: File; (* identity: Platform.FileIdentity; *) BEGIN - (* - Out.String("Files.Flush buf.f.registername = "); Out.String(buf.f.registerName); - Out.String(", buf.f.fd = "); Out.Int(buf.f.fd,1); - Out.String(", buffer at $"); Out.Hex(SYSTEM.ADR(buf.data)); - Out.String(", size "); Out.Int(buf.size,1); Out.Ln; - *) IF buf.chg THEN f := buf.f; Create(f); IF buf.org # f.pos THEN error := Platform.Seek(f.fd, buf.org, Platform.SeekSet); - (* - Out.String("Seeking to "); Out.Int(buf.org,1); - Out.String(", error code "); Out.Int(error,1); Out.Ln; - *) END; error := Platform.Write(f.fd, SYSTEM.ADR(buf.data), buf.size); IF error # 0 THEN Err("error writing file", f, error) END; @@ -271,11 +216,9 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files END END Flush; - PROCEDURE Close* (f: File); VAR - i: LONGINT; - error: Platform.ErrorCode; + i: LONGINT; error: Platform.ErrorCode; BEGIN IF (f.state # create) OR (f.registerName # "") THEN Create(f); i := 0; @@ -429,13 +372,6 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR org, offset, i, n: LONGINT; buf: Buffer; error: Platform.ErrorCode; BEGIN IF f # NIL THEN - (* - Out.String("Files.Set rider on fd = "); Out.Int(f.fd,1); - Out.String(", registerName = "); Out.String(f.registerName); - Out.String(", workName = "); Out.String(f.workName); - Out.String(", state = "); Out.Int(f.state,1); - Out.Ln; - *) IF pos > f.len THEN pos := f.len ELSIF pos < 0 THEN pos := 0 END; offset := pos MOD BufSize; org := pos - offset; i := 0; WHILE (i < NumBufs) & (f.bufs[i] # NIL) & (org # f.bufs[i].org) DO INC(i) END; @@ -597,10 +533,6 @@ Especially Length would become fairly complex. oldidentity, newidentity: Platform.FileIdentity; buf: ARRAY 4096 OF CHAR; BEGIN - (* - Out.String("Files.Rename old = "); Out.String(old); - Out.String(", new = "); Out.String(new); Out.Ln; - *) error := Platform.IdentifyByName(old, oldidentity); IF error = 0 THEN error := Platform.IdentifyByName(new, newidentity); @@ -798,11 +730,6 @@ Especially Length would become fairly complex. VAR f: File; res: LONGINT; BEGIN f := SYSTEM.VAL(File, o); - (* - Out.String("Files.Finalize f.fd = "); Out.Int(f.fd,1); - Out.String(", f.registername = "); Out.String(f.registerName); - Out.String(", f.workName = "); Out.String(f.workName); Out.Ln; - *) IF f.fd >= 0 THEN CloseOSFile(f); IF f.tempFile THEN res := Platform.Unlink(f.workName) END diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index 26decdb1..bdb6b8df 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -68,10 +68,13 @@ BEGIN WHILE i > 0 DO DEC(i); Char(s[i]) END END Int; + PROCEDURE Hex*(x, n: HUGEINT); BEGIN IF n < 1 THEN n := 1 ELSIF n > 16 THEN n := 16 END; - WHILE (n < 16) & (SYSTEM.LSH(x, -4*n) # 0) DO INC(n) END; + IF x >= 0 THEN + WHILE (n < 16) & (SYSTEM.LSH(x, -4*n) # 0) DO INC(n) END + END; x := SYSTEM.ROT(x, 4*(16-n)); WHILE n > 0 DO x := SYSTEM.ROT(x,4); DEC(n); @@ -84,154 +87,6 @@ PROCEDURE Ln*; BEGIN String(Platform.NL); Flush; END Ln; -PROCEDURE HexDumpAdr*(adr: SYSTEM.ADDRESS; offset: HUGEINT; length: LONGINT); -VAR i: INTEGER; n, lim: SYSTEM.ADDRESS; c: CHAR; -BEGIN - lim := SYSTEM.VAL(SYSTEM.ADDRESS, adr+length); - WHILE adr < lim DO - IF adr+16 < lim THEN n := 16 ELSE n := lim-adr END; - Hex(offset,8); Char(" "); - i := 0; WHILE i < n DO - IF i MOD 4 = 0 THEN Char(" ") END; - SYSTEM.GET(adr+i, c); Hex(ORD(c), 2); Char(" "); - INC(i) - END; - WHILE i < 16 DO - IF i MOD 4 = 0 THEN Char(" ") END; String(" "); - INC(i) - END; - String(" "); - i := 0; WHILE i < n DO - SYSTEM.GET(adr+i, c); - IF (ORD(c) < 32) OR (ORD(c) > 126) THEN Char(".") ELSE Char(c) END; - INC(i) - END; - INC(adr,n); INC(offset,n); Ln - END -END HexDumpAdr; - -PROCEDURE HexDump*(VAR m: ARRAY OF SYSTEM.BYTE); -BEGIN HexDumpAdr(SYSTEM.ADR(m), 0, LEN(m)) -END HexDump; - - -PROCEDURE DumpModule(m: Heap.Module); -BEGIN - String(" next: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.next),1); Ln; - String(" name: "); String(m.name); Ln; - String(" refcnt: "); Hex(m.refcnt,1); Ln; - String(" cmds: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.cmds),1); Ln; - String(" types: "); Hex(m.types,1); Ln; - String(" enumPtrs: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, m.enumPtrs),1); Ln; -END DumpModule; - -PROCEDURE DumpTag*(addr: SYSTEM.ADDRESS); -TYPE - typedesc = RECORD - (* Array of type bound procedure addresses preceeds this. *) - tag: SYSTEM.ADDRESS; - next: SYSTEM.ADDRESS; - level: SYSTEM.ADDRESS; - module: SYSTEM.ADDRESS; - name: ARRAY 24 OF CHAR; - bases: ARRAY 16 OF SYSTEM.ADDRESS; - reserved: SYSTEM.ADDRESS; - blksz: SYSTEM.ADDRESS; - ptr0: SYSTEM.ADDRESS; (* Offset of first pointer. Others follow this. *) - END; - tag = POINTER [1] TO typedesc; -VAR - desc: tag; - i: INTEGER; -BEGIN - String(" obj tag: "); Hex(addr,1); Ln; - DEC(addr, addr MOD 2); (* Work OK with incremented tags. *) - desc := SYSTEM.VAL(tag, addr - (21*SIZE(SYSTEM.ADDRESS) + 24)); - String(" desc at: "); Hex(SYSTEM.VAL(SYSTEM.ADDRESS, desc),1); Ln; - String(" desc contains:"); Ln; - String(" tag: "); Hex(desc.tag, 1); Ln; - String(" next: "); Hex(desc.next, 1); Ln; - String(" level: "); Hex(desc.level, 1); Ln; - String(" module: "); Hex(desc.module, 1); Ln; - IF desc.module # 0 THEN DumpModule(SYSTEM.VAL(Heap.Module, desc.module)) END; - String(" name: "); String(desc.name); Ln; - String(" bases: "); - i := 0; WHILE i < 16 DO - Hex(desc.bases[i], SIZE(SYSTEM.ADDRESS) * 2); - IF i MOD 4 = 3 THEN Ln; String(" ") ELSE Char(" ") END; - INC(i) - END; Ln; - String(" reserved: "); Hex(desc.reserved, 1); Ln; - String(" blksz: "); Hex(desc.blksz, 1); Ln; - String(" ptr0: "); Hex(desc.ptr0, 1); Ln; -END DumpTag; - -PROCEDURE DumpType*(VAR o: ARRAY OF SYSTEM.BYTE); -VAR addr: SYSTEM.ADDRESS; -BEGIN - SYSTEM.GET(SYSTEM.ADR(o) - SIZE(SYSTEM.ADDRESS), addr); - DumpTag(addr); -END DumpType; - - -PROCEDURE -externheap "extern ADDRESS Heap_heap;"; -PROCEDURE -getheap(): SYSTEM.ADDRESS "Heap_heap"; - -PROCEDURE DumpHeap*; -TYPE - adrptr = POINTER [1] TO ARRAY 1 OF SYSTEM.ADDRESS; - - block = POINTER [1] TO blockdesc; - blockdesc = RECORD - tag: SYSTEM.ADDRESS; - size: SYSTEM.ADDRESS; - sentinel: SYSTEM.ADDRESS; - next: SYSTEM.ADDRESS; - END; - - chunk = POINTER [1] TO chunkdesc; - chunkdesc = RECORD - next: SYSTEM.ADDRESS; - end: SYSTEM.ADDRESS; - reserved: SYSTEM.ADDRESS; - firstblock: blockdesc; - END; -VAR - caddr: SYSTEM.ADDRESS; c: chunk; - baddr: SYSTEM.ADDRESS; b: block; - tag: adrptr; -BEGIN - caddr := Heap.heap; - WHILE caddr # 0 DO - String("Chunk at: "); Hex(caddr, 1); Ln; - c := SYSTEM.VAL(chunk, caddr); - String(" next: "); Hex(c.next, 1); Ln; - String(" end: "); Hex(c.end, 1); String(" => size: "); Hex(c.end - caddr,1 ); Ln; - String(" rsvd: "); Hex(c.reserved, 1); Ln; - - baddr := SYSTEM.ADR(c.firstblock); - WHILE c.end - baddr > 0 DO - String(" Block at: "); Hex(baddr, 1); Ln; - b := SYSTEM.VAL(block, baddr); - tag := SYSTEM.VAL(adrptr, b.tag - (b.tag MOD 2)); (* mask out heap management flag in bit 0. *) - String(" tag: "); Hex(b.tag, 1); IF b.tag MOD 2 # 0 THEN String(" <--- ODD! ---") END; Ln; - String(" tag^: "); Hex(tag^[0], 1); Ln; - String(" size: "); Hex(b.size, 1); Ln; - String(" sentinel: "); Hex(b.sentinel, 1); Ln; - String(" next: "); Hex(b.next, 1); Ln; - IF b.tag # SYSTEM.ADR(b.size) THEN - (* There is a type descriptor. *) - DumpTag(b.tag) - END; - INC(baddr, tag^[0]); - Ln; - END; - - caddr := c.next; - Ln; - END -END DumpHeap; - (* Real and Longreal display *) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 55ab429f..5b645fc4 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -120,70 +120,6 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91** del: Buffer; FontsDefault: FontsFont; -(* Debugging intermittent OpenBSD failure. *) - - PROCEDURE DumpText(t: Text); - BEGIN - Out.String(" len: "); Out.Int(t.len,1); Out.Ln; - Out.String(" notify: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.notify),1); Out.Ln; - Out.String(" head: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.head),1); Out.Ln; - Out.String(" cache: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, t.cache),1); Out.Ln; - Out.String(" corg: "); Out.Int(t.corg,1); Out.Ln; - END DumpText; - - PROCEDURE DumpRun(ru: Run); - BEGIN - Out.String(" Run at "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru),1); Out.Ln; - Out.String(" prev: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.prev),1); Out.Ln; - Out.String(" next: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, ru.next),1); Out.Ln; - Out.String(" len: "); Out.Int(ru.len,1); Out.Ln; - Out.String(" fnt: "); IF ru.fnt # NIL THEN Out.String(ru.fnt.name) ELSE Out.String("") END; Out.Ln; - Out.String(" col: "); Out.Int(ru.col,1); Out.Ln; - Out.String(" voff: "); Out.Int(ru.voff,1); Out.Ln; - Out.String(" ascii: "); IF ru.ascii THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - END DumpRun; - - PROCEDURE DumpElem(e: Elem); - BEGIN - DumpRun(e); - Out.String(" -- Elem --"); Out.Ln; - Out.String(" W: "); Out.Int(e.W,1); Out.Ln; - Out.String(" H: "); Out.Int(e.H,1); Out.Ln; - Out.String(" handle: "); Out.Hex(SYSTEM.VAL(SYSTEM.ADDRESS, e.handle),1); Out.Ln; - Out.String(" base: "); IF e.base = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpText(e.base) END; - END DumpElem; - - PROCEDURE DumpPiece(p: Piece); - BEGIN - DumpRun(p); - Out.String(" -- Piece --"); Out.Ln; - Out.String(" file: "); IF p.file = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; Files.DumpFile(p.file, 3) END; - Out.String(" org: "); Out.Int(p.org,1); Out.Ln; - END DumpPiece; - - PROCEDURE DumpReader*(re: Reader); - BEGIN - Out.String("Reader:"); Out.Ln; - Out.String(" eot: "); IF re.eot THEN Out.String("TRUE") ELSE Out.String("FALSE") END; Out.Ln; - Out.String(" fnt: "); IF re.fnt # NIL THEN Out.String(re.fnt.name) ELSE Out.String("") END; Out.Ln; - Out.String(" col: "); Out.Int(re.col,1); Out.Ln; - Out.String(" voff: "); Out.Int(re.voff,1); Out.Ln; - Out.String(" org: "); Out.Int(re.org,1); Out.Ln; - Out.String(" off: "); Out.Int(re.off,1); Out.Ln; - Out.String(" elem: "); IF re.elem = NIL THEN Out.String(""); Out.Ln ELSE Out.Ln; DumpElem(re.elem) END; - Out.String(" rider: "); Out.Ln; Files.DumpRider(re.rider,2); - Out.String(" run: "); - IF re.run = NIL THEN Out.String(""); Out.Ln - ELSE Out.Ln; - IF re.run IS Piece THEN DumpPiece(re.run(Piece)) - ELSIF re.run IS Elem THEN DumpElem(re.run(Elem)) - ELSE DumpRun(re.run) - END - END; - Out.DumpType(re.run^); - END DumpReader; - - PROCEDURE FontsThis(VAR name: ARRAY OF CHAR): FontsFont; VAR F: FontsFont; BEGIN diff --git a/src/test/confidence/intsyntax/expected b/src/test/confidence/intsyntax/expected index 94e29760..ce0633c4 100644 --- a/src/test/confidence/intsyntax/expected +++ b/src/test/confidence/intsyntax/expected @@ -1,4 +1,4 @@ -IntSyntax.mod compiling IntSyntax. +IntSyntax.mod Compiling IntSyntax. 14: i := l; (* Bad, INTEGER shorter than LONGINT *) ^ From 3cb60cc59fe90a9872b46ef7229c911bcc9f3a8f Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 20 Dec 2016 15:17:12 +0000 Subject: [PATCH 106/241] Update C bootstrap source. --- bootstrap/unix-44/Compiler.c | 4 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 132 +--------- bootstrap/unix-44/Files.h | 15 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 65 ++--- bootstrap/unix-44/OPM.h | 3 +- bootstrap/unix-44/OPP.c | 6 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 255 +----------------- bootstrap/unix-44/Out.h | 7 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 372 ++++++++------------------- bootstrap/unix-44/Texts.h | 3 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 4 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 132 +--------- bootstrap/unix-48/Files.h | 15 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 65 ++--- bootstrap/unix-48/OPM.h | 3 +- bootstrap/unix-48/OPP.c | 6 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 255 +----------------- bootstrap/unix-48/Out.h | 7 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 372 ++++++++------------------- bootstrap/unix-48/Texts.h | 3 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 4 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 132 +--------- bootstrap/unix-88/Files.h | 15 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 65 ++--- bootstrap/unix-88/OPM.h | 3 +- bootstrap/unix-88/OPP.c | 6 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 255 +----------------- bootstrap/unix-88/Out.h | 7 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 372 ++++++++------------------- bootstrap/unix-88/Texts.h | 3 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 4 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 132 +--------- bootstrap/windows-48/Files.h | 15 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 65 ++--- bootstrap/windows-48/OPM.h | 3 +- bootstrap/windows-48/OPP.c | 6 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 255 +----------------- bootstrap/windows-48/Out.h | 7 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 372 ++++++++------------------- bootstrap/windows-48/Texts.h | 3 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 4 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 132 +--------- bootstrap/windows-88/Files.h | 15 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 65 ++--- bootstrap/windows-88/OPM.h | 3 +- bootstrap/windows-88/OPP.c | 6 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 255 +----------------- bootstrap/windows-88/Out.h | 7 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 372 ++++++++------------------- bootstrap/windows-88/Texts.h | 3 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 870 insertions(+), 3740 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index d13ed803..993c2bac 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); Strings_Append(fn, 64, (void*)objectnames, objectnames__len); } else { - OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogVT100((CHAR*)"91m", 4); OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); OPM_LogWStr(l->name, 256); OPM_LogWStr((CHAR*)", but local object file '", 26); diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index eb305bbe..80b87b1d 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index d10b5011..cdc285e5 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 94faa2a1..cd6f14b9 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,9 +69,6 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); -export void Files_DumpBuffer (Files_Buffer b, INT16 indent); -export void Files_DumpFile (Files_File f, INT16 indent); -export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -102,7 +99,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); -static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -116,132 +112,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) -static void Files_Spaces (INT16 i) -{ - while (i > 0) { - Out_String((CHAR*)" ", 3); - i -= 1; - } -} - -void Files_DumpFile (Files_File f, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"workName: ", 15); - Out_String(f->workName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"registerName: ", 15); - Out_String(f->registerName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"tempFile: ", 15); - if (f->tempFile) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"identity: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"fd: ", 15); - Out_Int(f->fd, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"len, ", 15); - Out_Int(f->len, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"pos: ", 15); - Out_Int(f->pos, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"bufs: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"swapper: ", 15); - Out_Int(f->swapper, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"state: ", 15); - Out_Int(f->state, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"next: ", 15); - Out_Hex((INT32)(ADDRESS)f->next, 1); - Out_Ln(); -} - -void Files_DumpBuffer (Files_Buffer b, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"chg: ", 7); - if (b->chg) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 7); - Out_Int(b->org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"size: ", 7); - Out_Int(b->size, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"data: ", 7); - Out_Ln(); - Out_HexDump((void*)b->data, 4096); - Files_Spaces(indent); - Out_String((CHAR*)"f: ", 7); - if (b->f == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(b->f, indent + 1); - } -} - -void Files_DumpRider (Files_Rider r, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"res: ", 9); - Out_Int(r.res, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"eof: ", 9); - if (r.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 9); - Out_Int(r.org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"offset: ", 9); - Out_Int(r.offset, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"buf: ", 9); - if (r.buf == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpBuffer(r.buf, indent + 1); - } -} - static void Files_Assert (BOOLEAN truth) { if (!truth) { diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index d0b6716f..62563e24 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,19 +1,10 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" -typedef - struct Files_BufDesc { - INT32 _prvt0; - char _prvt1[4108]; - } Files_BufDesc; - -typedef - Files_BufDesc *Files_Buffer; - typedef struct Files_FileDesc *Files_File; @@ -33,16 +24,12 @@ typedef import ADDRESS *Files_FileDesc__typ; -import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); -import void Files_DumpBuffer (Files_Buffer b, INT16 indent); -import void Files_DumpFile (Files_File f, INT16 indent); -import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index d6b6560d..c12cb722 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 87732bb9..de4d17ce 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index c498f106..f397649b 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index f52b30af..8436f089 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index bb4ea138..19e40505 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 6757803a..71d82def 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 093bb886..a5f41a8e 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index a32c29e0..38a2b01d 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 0fd45dec..8f903e46 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -63,6 +63,7 @@ export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); +export void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -92,7 +93,6 @@ export void OPM_SymWInt (INT64 i); export void OPM_SymWLReal (LONGREAL lr); export void OPM_SymWReal (REAL r); export void OPM_SymWSet (UINT64 s); -static void OPM_VerboseListSizes (void); export void OPM_Write (CHAR ch); export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); @@ -136,6 +136,27 @@ void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) __DEL(vt100code); } +void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) +{ + __DUP(modname, modname__len, CHAR); + OPM_LogWStr((CHAR*)"Compiling ", 11); + OPM_LogWStr(modname, modname__len); + if (__IN(18, OPM_Options, 32)) { + OPM_LogWStr((CHAR*)", s:", 5); + OPM_LogWNum(__ASHL(OPM_ShortintSize, 3), 1); + OPM_LogWStr((CHAR*)" i:", 4); + OPM_LogWNum(__ASHL(OPM_IntegerSize, 3), 1); + OPM_LogWStr((CHAR*)" l:", 4); + OPM_LogWNum(__ASHL(OPM_LongintSize, 3), 1); + OPM_LogWStr((CHAR*)" adr:", 6); + OPM_LogWNum(__ASHL(OPM_AddressSize, 3), 1); + OPM_LogWStr((CHAR*)" algn:", 7); + OPM_LogWNum(__ASHL(OPM_Alignment, 3), 1); + } + OPM_LogW('.'); + __DEL(modname); +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -363,32 +384,6 @@ BOOLEAN OPM_OpenPar (void) __RETCHK; } -static void OPM_VerboseListSizes (void) -{ - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Type Size", 15); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SHORTINT ", 12); - OPM_LogWNum(OPM_ShortintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"INTEGER ", 12); - OPM_LogWNum(OPM_IntegerSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"LONGINT ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SET ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"ADDRESS ", 12); - OPM_LogWNum(OPM_AddressSize, 4); - OPM_LogWLn(); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Alignment: ", 12); - OPM_LogWNum(OPM_Alignment, 4); - OPM_LogWLn(); -} - void OPM_InitOptions (void) { CHAR s[256]; @@ -432,9 +427,6 @@ void OPM_InitOptions (void) OPM_LongintSize = 4; break; } - if (__IN(18, OPM_Options, 32)) { - OPM_VerboseListSizes(); - } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); if (OPM_ResourceDir[0] != 0x00) { Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); @@ -491,17 +483,6 @@ void OPM_Get (CHAR *ch) { OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if ((OPM_curpos == 0 && OPM_inR.eot)) { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); - OPM_LogWNum((INT16)*ch, 1); - OPM_LogW('.'); - Texts_DumpReader(OPM_inR); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Heap dump:", 11); - OPM_LogWLn(); - Out_DumpHeap(); - } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; } diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index f246eacb..96318bea 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -33,6 +33,7 @@ import void OPM_Get (CHAR *ch); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); +import void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index c3e79413..ec4ad2be 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1796,9 +1796,7 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) OPP_err(16); } if (OPP_sym == 38) { - OPM_LogWStr((CHAR*)"compiling ", 11); - OPM_LogWStr(OPS_name, 256); - OPM_LogW('.'); + OPM_LogCompiling(OPS_name, 256); OPT_Init(OPS_name, opt); OPS_Get(&OPP_sym); OPP_CheckSym(39); diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 913d2eef..aa076aaa 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index abfcd4b8..bf9f1af5 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 9e15ba4e..09a33705 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 7bfd4abc..149bfd1b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 228191bf..63bf2070 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index e44854e3..8b095ff5 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index ea04b5b8..c6a107b6 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index fc487d97..23d917c7 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,19 +14,10 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__11__typ; -static ADDRESS *blockdesc__5__typ; -static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); -export void Out_DumpHeap (void); -static void Out_DumpModule (Heap_Module m); -export void Out_DumpTag (INT32 addr); -export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); -export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -40,8 +31,6 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) -extern ADDRESS Heap_heap; -#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -139,8 +128,10 @@ void Out_Hex (INT64 x, INT64 n) } else if (n > 16) { n = 16; } - while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { - n += 1; + if (x >= 0) { + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } } x = __ROT(x, __ASHL(16 - n, 2), 64); while (n > 0) { @@ -160,235 +151,6 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) -{ - INT16 i; - INT32 n, lim; - CHAR c; - lim = (INT32)(adr + length); - while (adr < lim) { - if (adr + 16 < lim) { - n = 16; - } else { - n = lim - adr; - } - Out_Hex(offset, 8); - Out_Char(' '); - i = 0; - while (i < n) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - __GET(adr + i, c, CHAR); - Out_Hex((INT16)c, 2); - Out_Char(' '); - i += 1; - } - while (i < 16) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - Out_String((CHAR*)" ", 4); - i += 1; - } - Out_String((CHAR*)" ", 2); - i = 0; - while (i < n) { - __GET(adr + i, c, CHAR); - if ((INT16)c < 32 || (INT16)c > 126) { - Out_Char('.'); - } else { - Out_Char(c); - } - i += 1; - } - adr += n; - offset += (INT64)n; - Out_Ln(); - } -} - -void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) -{ - Out_HexDumpAdr((ADDRESS)m, 0, m__len); -} - -static void Out_DumpModule (Heap_Module m) -{ - Out_String((CHAR*)" next: ", 19); - Out_Hex((INT32)(ADDRESS)m->next, 1); - Out_Ln(); - Out_String((CHAR*)" name: ", 19); - Out_String(m->name, 20); - Out_Ln(); - Out_String((CHAR*)" refcnt: ", 19); - Out_Hex(m->refcnt, 1); - Out_Ln(); - Out_String((CHAR*)" cmds: ", 19); - Out_Hex((INT32)(ADDRESS)m->cmds, 1); - Out_Ln(); - Out_String((CHAR*)" types: ", 19); - Out_Hex(m->types, 1); - Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 19); - Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); - Out_Ln(); -} - -typedef - struct typedesc__11 *tag__10; - -typedef - struct typedesc__11 { - INT32 tag, next, level, module; - CHAR name[24]; - INT32 bases[16]; - INT32 reserved, blksz, ptr0; - } typedesc__11; - -void Out_DumpTag (INT32 addr) -{ - tag__10 desc = NIL; - INT16 i; - Out_String((CHAR*)" obj tag: ", 17); - Out_Hex(addr, 1); - Out_Ln(); - addr -= __MASK(addr, -2); - desc = (tag__10)(ADDRESS)(addr - 108); - Out_String((CHAR*)" desc at: ", 17); - Out_Hex((INT32)(ADDRESS)desc, 1); - Out_Ln(); - Out_String((CHAR*)" desc contains:", 21); - Out_Ln(); - Out_String((CHAR*)" tag: ", 17); - Out_Hex(desc->tag, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 17); - Out_Hex(desc->next, 1); - Out_Ln(); - Out_String((CHAR*)" level: ", 17); - Out_Hex(desc->level, 1); - Out_Ln(); - Out_String((CHAR*)" module: ", 17); - Out_Hex(desc->module, 1); - Out_Ln(); - if (desc->module != 0) { - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - } - Out_String((CHAR*)" name: ", 17); - Out_String(desc->name, 24); - Out_Ln(); - Out_String((CHAR*)" bases: ", 17); - i = 0; - while (i < 16) { - Out_Hex(desc->bases[__X(i, 16)], 8); - if (__MASK(i, -4) == 3) { - Out_Ln(); - Out_String((CHAR*)" ", 17); - } else { - Out_Char(' '); - } - i += 1; - } - Out_Ln(); - Out_String((CHAR*)" reserved: ", 17); - Out_Hex(desc->reserved, 1); - Out_Ln(); - Out_String((CHAR*)" blksz: ", 17); - Out_Hex(desc->blksz, 1); - Out_Ln(); - Out_String((CHAR*)" ptr0: ", 17); - Out_Hex(desc->ptr0, 1); - Out_Ln(); -} - -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) -{ - INT32 addr; - __GET((ADDRESS)o - 4, addr, INT32); - Out_DumpTag(addr); -} - -typedef - INT32 (*adrptr__3)[1]; - -typedef - struct blockdesc__5 *block__4; - -typedef - struct blockdesc__5 { - INT32 tag, size, sentinel, next; - } blockdesc__5; - -typedef - struct chunkdesc__7 *chunk__6; - -typedef - struct chunkdesc__7 { - INT32 next, end, reserved; - blockdesc__5 firstblock; - } chunkdesc__7; - -void Out_DumpHeap (void) -{ - INT32 caddr; - chunk__6 c = NIL; - INT32 baddr; - block__4 b = NIL; - adrptr__3 tag = NIL; - caddr = Heap_heap; - while (caddr != 0) { - Out_String((CHAR*)"Chunk at: ", 11); - Out_Hex(caddr, 1); - Out_Ln(); - c = (chunk__6)(ADDRESS)caddr; - Out_String((CHAR*)" next: ", 11); - Out_Hex(c->next, 1); - Out_Ln(); - Out_String((CHAR*)" end: ", 11); - Out_Hex(c->end, 1); - Out_String((CHAR*)" => size: ", 11); - Out_Hex(c->end - caddr, 1); - Out_Ln(); - Out_String((CHAR*)" rsvd: ", 11); - Out_Hex(c->reserved, 1); - Out_Ln(); - baddr = (ADDRESS)&c->firstblock; - while (c->end - baddr > 0) { - Out_String((CHAR*)" Block at: ", 15); - Out_Hex(baddr, 1); - Out_Ln(); - b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); - Out_String((CHAR*)" tag: ", 15); - Out_Hex(b->tag, 1); - if (__MASK(b->tag, -2) != 0) { - Out_String((CHAR*)" <--- ODD! ---", 15); - } - Out_Ln(); - Out_String((CHAR*)" tag^: ", 15); - Out_Hex((*tag)[0], 1); - Out_Ln(); - Out_String((CHAR*)" size: ", 15); - Out_Hex(b->size, 1); - Out_Ln(); - Out_String((CHAR*)" sentinel: ", 15); - Out_Hex(b->sentinel, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 15); - Out_Hex(b->next, 1); - Out_Ln(); - if (b->tag != (ADDRESS)&b->size) { - Out_DumpTag(b->tag); - } - baddr += (*tag)[0]; - Out_Ln(); - } - caddr = c->next; - Out_Ln(); - } -} - static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -566,9 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; -__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; -__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -576,13 +335,9 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); - __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__11, typedesc__11, 0); - __INITYP(blockdesc__5, blockdesc__5, 0); - __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index cbb4de1a..e1285046 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,13 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); -import void Out_DumpHeap (void); -import void Out_DumpTag (INT32 addr); -import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); -import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index b646e8b7..fa5fada1 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 957af90d..0b98d7bb 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 9b449f98..d1eb72f6 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 3e83af42..170d1785 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index f9b5310a..225bd40a 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 58f9b546..4d98f1a3 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index bb00d7d0..a6913b51 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -192,11 +192,6 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -static void Texts_DumpElem (Texts_Elem e); -static void Texts_DumpPiece (Texts_Piece p); -export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRun (Texts_Run ru); -static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -238,161 +233,6 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static void Texts_DumpText (Texts_Text t) -{ - Out_String((CHAR*)" len: ", 15); - Out_Int(t->len, 1); - Out_Ln(); - Out_String((CHAR*)" notify: ", 15); - Out_Hex((INT32)(ADDRESS)t->notify, 1); - Out_Ln(); - Out_String((CHAR*)" head: ", 15); - Out_Hex((INT32)(ADDRESS)t->head, 1); - Out_Ln(); - Out_String((CHAR*)" cache: ", 15); - Out_Hex((INT32)(ADDRESS)t->cache, 1); - Out_Ln(); - Out_String((CHAR*)" corg: ", 15); - Out_Int(t->corg, 1); - Out_Ln(); -} - -static void Texts_DumpRun (Texts_Run ru) -{ - Out_String((CHAR*)" Run at ", 12); - Out_Hex((INT32)(ADDRESS)ru, 1); - Out_Ln(); - Out_String((CHAR*)" prev: ", 12); - Out_Hex((INT32)(ADDRESS)ru->prev, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 12); - Out_Hex((INT32)(ADDRESS)ru->next, 1); - Out_Ln(); - Out_String((CHAR*)" len: ", 12); - Out_Int(ru->len, 1); - Out_Ln(); - Out_String((CHAR*)" fnt: ", 12); - if (ru->fnt != NIL) { - Out_String(ru->fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 12); - Out_Int(ru->col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 12); - Out_Int(ru->voff, 1); - Out_Ln(); - Out_String((CHAR*)" ascii: ", 12); - if (ru->ascii) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - -static void Texts_DumpElem (Texts_Elem e) -{ - Texts_DumpRun((void*)e); - Out_String((CHAR*)" -- Elem --", 15); - Out_Ln(); - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - -static void Texts_DumpPiece (Texts_Piece p) -{ - Texts_DumpRun((void*)p); - Out_String((CHAR*)" -- Piece --", 16); - Out_Ln(); - Out_String((CHAR*)" file: ", 12); - if (p->file == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(p->file, 3); - } - Out_String((CHAR*)" org: ", 12); - Out_Int(p->org, 1); - Out_Ln(); -} - -void Texts_DumpReader (Texts_Reader re) -{ - Out_String((CHAR*)"Reader:", 8); - Out_Ln(); - Out_String((CHAR*)" eot: ", 10); - if (re.eot) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Out_String((CHAR*)" fnt: ", 10); - if (re.fnt != NIL) { - Out_String(re.fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 10); - Out_Int(re.col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 10); - Out_Int(re.voff, 1); - Out_Ln(); - Out_String((CHAR*)" org: ", 10); - Out_Int(re.org, 1); - Out_Ln(); - Out_String((CHAR*)" off: ", 10); - Out_Int(re.off, 1); - Out_Ln(); - Out_String((CHAR*)" elem: ", 10); - if (re.elem == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpElem(re.elem); - } - Out_String((CHAR*)" rider: ", 10); - Out_Ln(); - Files_DumpRider(re.rider, 2); - Out_String((CHAR*)" run: ", 10); - if (re.run == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - if (__ISP(re.run, Texts_PieceDesc, 1)) { - Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); - } else if (__ISP(re.run, Texts_ElemDesc, 1)) { - Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); - } else { - Texts_DumpRun(re.run); - } - } - Out_DumpType((void*)&*re.run, 20); -} - static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -877,32 +717,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__31 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__31 *lnk; +} *Scan__31_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__32 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__32 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + if (*Scan__31_s->ch == '-') { + *Scan__31_s->negE = 1; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__31_s->negE = 0; + if (*Scan__31_s->ch == '+') { + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { + *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } @@ -916,13 +756,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__31 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__31_s; + Scan__31_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1023,7 +863,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__32(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1056,7 +896,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__32(); } if (negE) { if (e <= 38) { @@ -1109,7 +949,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__31_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1328,30 +1168,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__53 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__53 *lnk; +} *WriteRealFix__53_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__54 (INT16 n); +static void seq__56 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__56 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__54 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__53_s->i -= 1; + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); n -= 1; } } @@ -1362,23 +1202,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__53 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__53_s; + WriteRealFix__53_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__56(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__56(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__56(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1411,21 +1251,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__56(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__54(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__54(k); } else { - seq__61(' ', (n - k) - 3); + seq__56(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__56('0', -e); + dig__54(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__53_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1524,48 +1364,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__43 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__43 *lnk; +} *WriteDate__43_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__44 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__44 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__43 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__43_s; + WriteDate__43_s = &_s; + WritePair__44(' ', __MASK(d, -32)); + WritePair__44('.', __MASK(__ASHR(d, 5), -16)); + WritePair__44('.', __MASK(__ASHR(d, 9), -128)); + WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__44(':', __MASK(__ASHR(t, 6), -64)); + WritePair__44(':', __MASK(t, -64)); + WriteDate__43_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__16 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__16 *lnk; +} *Load0__16_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Heap_Module M = NIL; Heap_Command Cmd; @@ -1576,15 +1416,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__16_s->ecnt) { + *Load0__16_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1593,25 +1433,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__16_s->T; + (*Load0__16_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__16_s->T; + a->file = *Load0__16_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1628,15 +1468,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__16 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__16_s; + Load0__16_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1669,7 +1509,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1687,7 +1527,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__16_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1756,25 +1596,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__39 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__39 *lnk; +} *Store__39_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1782,14 +1622,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__39_s->ecnt) { + *Store__39_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__39_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1810,14 +1650,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__39 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__39_s; + Store__39_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1859,7 +1699,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1913,7 +1753,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__39_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index cab12269..bad71689 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -134,7 +134,6 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 80457921..9cd5cf4d 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 1a589c43..8f60c652 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 46b1acc2..fa840303 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,7 +82,7 @@ void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble: ", 11, cmd, 1023); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); __DEL(moduleName); } @@ -106,7 +106,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); __DEL(additionalopts); } diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 4201df04..a93b6c85 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index d13ed803..993c2bac 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); Strings_Append(fn, 64, (void*)objectnames, objectnames__len); } else { - OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogVT100((CHAR*)"91m", 4); OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); OPM_LogWStr(l->name, 256); OPM_LogWStr((CHAR*)", but local object file '", 26); diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index eb305bbe..80b87b1d 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index d10b5011..cdc285e5 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 94faa2a1..cd6f14b9 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,9 +69,6 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); -export void Files_DumpBuffer (Files_Buffer b, INT16 indent); -export void Files_DumpFile (Files_File f, INT16 indent); -export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -102,7 +99,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); -static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -116,132 +112,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) -static void Files_Spaces (INT16 i) -{ - while (i > 0) { - Out_String((CHAR*)" ", 3); - i -= 1; - } -} - -void Files_DumpFile (Files_File f, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"workName: ", 15); - Out_String(f->workName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"registerName: ", 15); - Out_String(f->registerName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"tempFile: ", 15); - if (f->tempFile) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"identity: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"fd: ", 15); - Out_Int(f->fd, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"len, ", 15); - Out_Int(f->len, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"pos: ", 15); - Out_Int(f->pos, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"bufs: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"swapper: ", 15); - Out_Int(f->swapper, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"state: ", 15); - Out_Int(f->state, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"next: ", 15); - Out_Hex((INT32)(ADDRESS)f->next, 1); - Out_Ln(); -} - -void Files_DumpBuffer (Files_Buffer b, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"chg: ", 7); - if (b->chg) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 7); - Out_Int(b->org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"size: ", 7); - Out_Int(b->size, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"data: ", 7); - Out_Ln(); - Out_HexDump((void*)b->data, 4096); - Files_Spaces(indent); - Out_String((CHAR*)"f: ", 7); - if (b->f == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(b->f, indent + 1); - } -} - -void Files_DumpRider (Files_Rider r, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"res: ", 9); - Out_Int(r.res, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"eof: ", 9); - if (r.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 9); - Out_Int(r.org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"offset: ", 9); - Out_Int(r.offset, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"buf: ", 9); - if (r.buf == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpBuffer(r.buf, indent + 1); - } -} - static void Files_Assert (BOOLEAN truth) { if (!truth) { diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index d0b6716f..62563e24 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,19 +1,10 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" -typedef - struct Files_BufDesc { - INT32 _prvt0; - char _prvt1[4108]; - } Files_BufDesc; - -typedef - Files_BufDesc *Files_Buffer; - typedef struct Files_FileDesc *Files_File; @@ -33,16 +24,12 @@ typedef import ADDRESS *Files_FileDesc__typ; -import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); -import void Files_DumpBuffer (Files_Buffer b, INT16 indent); -import void Files_DumpFile (Files_File f, INT16 indent); -import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index d6b6560d..c12cb722 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 87732bb9..de4d17ce 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index c498f106..f397649b 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index f52b30af..8436f089 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index bb4ea138..19e40505 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 6757803a..71d82def 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 093bb886..a5f41a8e 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index a32c29e0..38a2b01d 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 0fd45dec..8f903e46 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -63,6 +63,7 @@ export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); +export void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -92,7 +93,6 @@ export void OPM_SymWInt (INT64 i); export void OPM_SymWLReal (LONGREAL lr); export void OPM_SymWReal (REAL r); export void OPM_SymWSet (UINT64 s); -static void OPM_VerboseListSizes (void); export void OPM_Write (CHAR ch); export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); @@ -136,6 +136,27 @@ void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) __DEL(vt100code); } +void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) +{ + __DUP(modname, modname__len, CHAR); + OPM_LogWStr((CHAR*)"Compiling ", 11); + OPM_LogWStr(modname, modname__len); + if (__IN(18, OPM_Options, 32)) { + OPM_LogWStr((CHAR*)", s:", 5); + OPM_LogWNum(__ASHL(OPM_ShortintSize, 3), 1); + OPM_LogWStr((CHAR*)" i:", 4); + OPM_LogWNum(__ASHL(OPM_IntegerSize, 3), 1); + OPM_LogWStr((CHAR*)" l:", 4); + OPM_LogWNum(__ASHL(OPM_LongintSize, 3), 1); + OPM_LogWStr((CHAR*)" adr:", 6); + OPM_LogWNum(__ASHL(OPM_AddressSize, 3), 1); + OPM_LogWStr((CHAR*)" algn:", 7); + OPM_LogWNum(__ASHL(OPM_Alignment, 3), 1); + } + OPM_LogW('.'); + __DEL(modname); +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -363,32 +384,6 @@ BOOLEAN OPM_OpenPar (void) __RETCHK; } -static void OPM_VerboseListSizes (void) -{ - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Type Size", 15); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SHORTINT ", 12); - OPM_LogWNum(OPM_ShortintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"INTEGER ", 12); - OPM_LogWNum(OPM_IntegerSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"LONGINT ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SET ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"ADDRESS ", 12); - OPM_LogWNum(OPM_AddressSize, 4); - OPM_LogWLn(); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Alignment: ", 12); - OPM_LogWNum(OPM_Alignment, 4); - OPM_LogWLn(); -} - void OPM_InitOptions (void) { CHAR s[256]; @@ -432,9 +427,6 @@ void OPM_InitOptions (void) OPM_LongintSize = 4; break; } - if (__IN(18, OPM_Options, 32)) { - OPM_VerboseListSizes(); - } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); if (OPM_ResourceDir[0] != 0x00) { Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); @@ -491,17 +483,6 @@ void OPM_Get (CHAR *ch) { OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if ((OPM_curpos == 0 && OPM_inR.eot)) { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); - OPM_LogWNum((INT16)*ch, 1); - OPM_LogW('.'); - Texts_DumpReader(OPM_inR); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Heap dump:", 11); - OPM_LogWLn(); - Out_DumpHeap(); - } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; } diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index f246eacb..96318bea 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -33,6 +33,7 @@ import void OPM_Get (CHAR *ch); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); +import void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index c3e79413..ec4ad2be 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1796,9 +1796,7 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) OPP_err(16); } if (OPP_sym == 38) { - OPM_LogWStr((CHAR*)"compiling ", 11); - OPM_LogWStr(OPS_name, 256); - OPM_LogW('.'); + OPM_LogCompiling(OPS_name, 256); OPT_Init(OPS_name, opt); OPS_Get(&OPP_sym); OPP_CheckSym(39); diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 913d2eef..aa076aaa 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index abfcd4b8..bf9f1af5 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 9e15ba4e..09a33705 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index fc598571..0002aa51 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 228191bf..63bf2070 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index e44854e3..8b095ff5 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index ea04b5b8..c6a107b6 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index fc487d97..23d917c7 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,19 +14,10 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__11__typ; -static ADDRESS *blockdesc__5__typ; -static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); -export void Out_DumpHeap (void); -static void Out_DumpModule (Heap_Module m); -export void Out_DumpTag (INT32 addr); -export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); -export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -40,8 +31,6 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) -extern ADDRESS Heap_heap; -#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -139,8 +128,10 @@ void Out_Hex (INT64 x, INT64 n) } else if (n > 16) { n = 16; } - while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { - n += 1; + if (x >= 0) { + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } } x = __ROT(x, __ASHL(16 - n, 2), 64); while (n > 0) { @@ -160,235 +151,6 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) -{ - INT16 i; - INT32 n, lim; - CHAR c; - lim = (INT32)(adr + length); - while (adr < lim) { - if (adr + 16 < lim) { - n = 16; - } else { - n = lim - adr; - } - Out_Hex(offset, 8); - Out_Char(' '); - i = 0; - while (i < n) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - __GET(adr + i, c, CHAR); - Out_Hex((INT16)c, 2); - Out_Char(' '); - i += 1; - } - while (i < 16) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - Out_String((CHAR*)" ", 4); - i += 1; - } - Out_String((CHAR*)" ", 2); - i = 0; - while (i < n) { - __GET(adr + i, c, CHAR); - if ((INT16)c < 32 || (INT16)c > 126) { - Out_Char('.'); - } else { - Out_Char(c); - } - i += 1; - } - adr += n; - offset += (INT64)n; - Out_Ln(); - } -} - -void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) -{ - Out_HexDumpAdr((ADDRESS)m, 0, m__len); -} - -static void Out_DumpModule (Heap_Module m) -{ - Out_String((CHAR*)" next: ", 19); - Out_Hex((INT32)(ADDRESS)m->next, 1); - Out_Ln(); - Out_String((CHAR*)" name: ", 19); - Out_String(m->name, 20); - Out_Ln(); - Out_String((CHAR*)" refcnt: ", 19); - Out_Hex(m->refcnt, 1); - Out_Ln(); - Out_String((CHAR*)" cmds: ", 19); - Out_Hex((INT32)(ADDRESS)m->cmds, 1); - Out_Ln(); - Out_String((CHAR*)" types: ", 19); - Out_Hex(m->types, 1); - Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 19); - Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); - Out_Ln(); -} - -typedef - struct typedesc__11 *tag__10; - -typedef - struct typedesc__11 { - INT32 tag, next, level, module; - CHAR name[24]; - INT32 bases[16]; - INT32 reserved, blksz, ptr0; - } typedesc__11; - -void Out_DumpTag (INT32 addr) -{ - tag__10 desc = NIL; - INT16 i; - Out_String((CHAR*)" obj tag: ", 17); - Out_Hex(addr, 1); - Out_Ln(); - addr -= __MASK(addr, -2); - desc = (tag__10)(ADDRESS)(addr - 108); - Out_String((CHAR*)" desc at: ", 17); - Out_Hex((INT32)(ADDRESS)desc, 1); - Out_Ln(); - Out_String((CHAR*)" desc contains:", 21); - Out_Ln(); - Out_String((CHAR*)" tag: ", 17); - Out_Hex(desc->tag, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 17); - Out_Hex(desc->next, 1); - Out_Ln(); - Out_String((CHAR*)" level: ", 17); - Out_Hex(desc->level, 1); - Out_Ln(); - Out_String((CHAR*)" module: ", 17); - Out_Hex(desc->module, 1); - Out_Ln(); - if (desc->module != 0) { - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - } - Out_String((CHAR*)" name: ", 17); - Out_String(desc->name, 24); - Out_Ln(); - Out_String((CHAR*)" bases: ", 17); - i = 0; - while (i < 16) { - Out_Hex(desc->bases[__X(i, 16)], 8); - if (__MASK(i, -4) == 3) { - Out_Ln(); - Out_String((CHAR*)" ", 17); - } else { - Out_Char(' '); - } - i += 1; - } - Out_Ln(); - Out_String((CHAR*)" reserved: ", 17); - Out_Hex(desc->reserved, 1); - Out_Ln(); - Out_String((CHAR*)" blksz: ", 17); - Out_Hex(desc->blksz, 1); - Out_Ln(); - Out_String((CHAR*)" ptr0: ", 17); - Out_Hex(desc->ptr0, 1); - Out_Ln(); -} - -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) -{ - INT32 addr; - __GET((ADDRESS)o - 4, addr, INT32); - Out_DumpTag(addr); -} - -typedef - INT32 (*adrptr__3)[1]; - -typedef - struct blockdesc__5 *block__4; - -typedef - struct blockdesc__5 { - INT32 tag, size, sentinel, next; - } blockdesc__5; - -typedef - struct chunkdesc__7 *chunk__6; - -typedef - struct chunkdesc__7 { - INT32 next, end, reserved; - blockdesc__5 firstblock; - } chunkdesc__7; - -void Out_DumpHeap (void) -{ - INT32 caddr; - chunk__6 c = NIL; - INT32 baddr; - block__4 b = NIL; - adrptr__3 tag = NIL; - caddr = Heap_heap; - while (caddr != 0) { - Out_String((CHAR*)"Chunk at: ", 11); - Out_Hex(caddr, 1); - Out_Ln(); - c = (chunk__6)(ADDRESS)caddr; - Out_String((CHAR*)" next: ", 11); - Out_Hex(c->next, 1); - Out_Ln(); - Out_String((CHAR*)" end: ", 11); - Out_Hex(c->end, 1); - Out_String((CHAR*)" => size: ", 11); - Out_Hex(c->end - caddr, 1); - Out_Ln(); - Out_String((CHAR*)" rsvd: ", 11); - Out_Hex(c->reserved, 1); - Out_Ln(); - baddr = (ADDRESS)&c->firstblock; - while (c->end - baddr > 0) { - Out_String((CHAR*)" Block at: ", 15); - Out_Hex(baddr, 1); - Out_Ln(); - b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); - Out_String((CHAR*)" tag: ", 15); - Out_Hex(b->tag, 1); - if (__MASK(b->tag, -2) != 0) { - Out_String((CHAR*)" <--- ODD! ---", 15); - } - Out_Ln(); - Out_String((CHAR*)" tag^: ", 15); - Out_Hex((*tag)[0], 1); - Out_Ln(); - Out_String((CHAR*)" size: ", 15); - Out_Hex(b->size, 1); - Out_Ln(); - Out_String((CHAR*)" sentinel: ", 15); - Out_Hex(b->sentinel, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 15); - Out_Hex(b->next, 1); - Out_Ln(); - if (b->tag != (ADDRESS)&b->size) { - Out_DumpTag(b->tag); - } - baddr += (*tag)[0]; - Out_Ln(); - } - caddr = c->next; - Out_Ln(); - } -} - static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -566,9 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; -__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; -__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -576,13 +335,9 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); - __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__11, typedesc__11, 0); - __INITYP(blockdesc__5, blockdesc__5, 0); - __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index cbb4de1a..e1285046 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,13 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); -import void Out_DumpHeap (void); -import void Out_DumpTag (INT32 addr); -import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); -import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index b646e8b7..fa5fada1 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 957af90d..0b98d7bb 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 9b449f98..d1eb72f6 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 3e83af42..170d1785 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index f9b5310a..225bd40a 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 58f9b546..4d98f1a3 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 96851302..08ee5129 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -192,11 +192,6 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -static void Texts_DumpElem (Texts_Elem e); -static void Texts_DumpPiece (Texts_Piece p); -export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRun (Texts_Run ru); -static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -238,161 +233,6 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static void Texts_DumpText (Texts_Text t) -{ - Out_String((CHAR*)" len: ", 15); - Out_Int(t->len, 1); - Out_Ln(); - Out_String((CHAR*)" notify: ", 15); - Out_Hex((INT32)(ADDRESS)t->notify, 1); - Out_Ln(); - Out_String((CHAR*)" head: ", 15); - Out_Hex((INT32)(ADDRESS)t->head, 1); - Out_Ln(); - Out_String((CHAR*)" cache: ", 15); - Out_Hex((INT32)(ADDRESS)t->cache, 1); - Out_Ln(); - Out_String((CHAR*)" corg: ", 15); - Out_Int(t->corg, 1); - Out_Ln(); -} - -static void Texts_DumpRun (Texts_Run ru) -{ - Out_String((CHAR*)" Run at ", 12); - Out_Hex((INT32)(ADDRESS)ru, 1); - Out_Ln(); - Out_String((CHAR*)" prev: ", 12); - Out_Hex((INT32)(ADDRESS)ru->prev, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 12); - Out_Hex((INT32)(ADDRESS)ru->next, 1); - Out_Ln(); - Out_String((CHAR*)" len: ", 12); - Out_Int(ru->len, 1); - Out_Ln(); - Out_String((CHAR*)" fnt: ", 12); - if (ru->fnt != NIL) { - Out_String(ru->fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 12); - Out_Int(ru->col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 12); - Out_Int(ru->voff, 1); - Out_Ln(); - Out_String((CHAR*)" ascii: ", 12); - if (ru->ascii) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - -static void Texts_DumpElem (Texts_Elem e) -{ - Texts_DumpRun((void*)e); - Out_String((CHAR*)" -- Elem --", 15); - Out_Ln(); - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - -static void Texts_DumpPiece (Texts_Piece p) -{ - Texts_DumpRun((void*)p); - Out_String((CHAR*)" -- Piece --", 16); - Out_Ln(); - Out_String((CHAR*)" file: ", 12); - if (p->file == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(p->file, 3); - } - Out_String((CHAR*)" org: ", 12); - Out_Int(p->org, 1); - Out_Ln(); -} - -void Texts_DumpReader (Texts_Reader re) -{ - Out_String((CHAR*)"Reader:", 8); - Out_Ln(); - Out_String((CHAR*)" eot: ", 10); - if (re.eot) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Out_String((CHAR*)" fnt: ", 10); - if (re.fnt != NIL) { - Out_String(re.fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 10); - Out_Int(re.col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 10); - Out_Int(re.voff, 1); - Out_Ln(); - Out_String((CHAR*)" org: ", 10); - Out_Int(re.org, 1); - Out_Ln(); - Out_String((CHAR*)" off: ", 10); - Out_Int(re.off, 1); - Out_Ln(); - Out_String((CHAR*)" elem: ", 10); - if (re.elem == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpElem(re.elem); - } - Out_String((CHAR*)" rider: ", 10); - Out_Ln(); - Files_DumpRider(re.rider, 2); - Out_String((CHAR*)" run: ", 10); - if (re.run == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - if (__ISP(re.run, Texts_PieceDesc, 1)) { - Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); - } else if (__ISP(re.run, Texts_ElemDesc, 1)) { - Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); - } else { - Texts_DumpRun(re.run); - } - } - Out_DumpType((void*)&*re.run, 20); -} - static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -877,32 +717,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__31 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__31 *lnk; +} *Scan__31_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__32 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__32 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + if (*Scan__31_s->ch == '-') { + *Scan__31_s->negE = 1; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__31_s->negE = 0; + if (*Scan__31_s->ch == '+') { + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { + *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } @@ -916,13 +756,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__31 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__31_s; + Scan__31_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1023,7 +863,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__32(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1056,7 +896,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__32(); } if (negE) { if (e <= 38) { @@ -1109,7 +949,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__31_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1328,30 +1168,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__53 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__53 *lnk; +} *WriteRealFix__53_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__54 (INT16 n); +static void seq__56 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__56 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__54 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__53_s->i -= 1; + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); n -= 1; } } @@ -1362,23 +1202,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__53 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__53_s; + WriteRealFix__53_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__56(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__56(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__56(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1411,21 +1251,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__56(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__54(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__54(k); } else { - seq__61(' ', (n - k) - 3); + seq__56(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__56('0', -e); + dig__54(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__53_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1524,48 +1364,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__43 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__43 *lnk; +} *WriteDate__43_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__44 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__44 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__43 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__43_s; + WriteDate__43_s = &_s; + WritePair__44(' ', __MASK(d, -32)); + WritePair__44('.', __MASK(__ASHR(d, 5), -16)); + WritePair__44('.', __MASK(__ASHR(d, 9), -128)); + WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__44(':', __MASK(__ASHR(t, 6), -64)); + WritePair__44(':', __MASK(t, -64)); + WriteDate__43_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__16 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__16 *lnk; +} *Load0__16_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Heap_Module M = NIL; Heap_Command Cmd; @@ -1576,15 +1416,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__16_s->ecnt) { + *Load0__16_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1593,25 +1433,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__16_s->T; + (*Load0__16_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__16_s->T; + a->file = *Load0__16_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1628,15 +1468,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__16 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__16_s; + Load0__16_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1669,7 +1509,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1687,7 +1527,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__16_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1756,25 +1596,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__39 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__39 *lnk; +} *Store__39_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1782,14 +1622,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__39_s->ecnt) { + *Store__39_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__39_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1810,14 +1650,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__39 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__39_s; + Store__39_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1859,7 +1699,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1913,7 +1753,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__39_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 188b60fb..5d3316e2 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,7 +135,6 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 80457921..9cd5cf4d 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 1a589c43..8f60c652 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 46b1acc2..fa840303 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,7 +82,7 @@ void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble: ", 11, cmd, 1023); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); __DEL(moduleName); } @@ -106,7 +106,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); __DEL(additionalopts); } diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 4201df04..a93b6c85 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index d13ed803..993c2bac 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); Strings_Append(fn, 64, (void*)objectnames, objectnames__len); } else { - OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogVT100((CHAR*)"91m", 4); OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); OPM_LogWStr(l->name, 256); OPM_LogWStr((CHAR*)", but local object file '", 26); diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index eb305bbe..80b87b1d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index d10b5011..cdc285e5 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 10fc58d0..d4425bbe 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,9 +69,6 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); -export void Files_DumpBuffer (Files_Buffer b, INT16 indent); -export void Files_DumpFile (Files_File f, INT16 indent); -export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -102,7 +99,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); -static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -116,132 +112,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) -static void Files_Spaces (INT16 i) -{ - while (i > 0) { - Out_String((CHAR*)" ", 3); - i -= 1; - } -} - -void Files_DumpFile (Files_File f, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"workName: ", 15); - Out_String(f->workName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"registerName: ", 15); - Out_String(f->registerName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"tempFile: ", 15); - if (f->tempFile) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"identity: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"fd: ", 15); - Out_Int(f->fd, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"len, ", 15); - Out_Int(f->len, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"pos: ", 15); - Out_Int(f->pos, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"bufs: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"swapper: ", 15); - Out_Int(f->swapper, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"state: ", 15); - Out_Int(f->state, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"next: ", 15); - Out_Hex((INT64)(ADDRESS)f->next, 1); - Out_Ln(); -} - -void Files_DumpBuffer (Files_Buffer b, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"chg: ", 7); - if (b->chg) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 7); - Out_Int(b->org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"size: ", 7); - Out_Int(b->size, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"data: ", 7); - Out_Ln(); - Out_HexDump((void*)b->data, 4096); - Files_Spaces(indent); - Out_String((CHAR*)"f: ", 7); - if (b->f == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(b->f, indent + 1); - } -} - -void Files_DumpRider (Files_Rider r, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"res: ", 9); - Out_Int(r.res, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"eof: ", 9); - if (r.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 9); - Out_Int(r.org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"offset: ", 9); - Out_Int(r.offset, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"buf: ", 9); - if (r.buf == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpBuffer(r.buf, indent + 1); - } -} - static void Files_Assert (BOOLEAN truth) { if (!truth) { diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 5b4a0859..a34a1758 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,19 +1,10 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" -typedef - struct Files_BufDesc { - INT64 _prvt0; - char _prvt1[4108]; - } Files_BufDesc; - -typedef - Files_BufDesc *Files_Buffer; - typedef struct Files_FileDesc *Files_File; @@ -34,16 +25,12 @@ typedef import ADDRESS *Files_FileDesc__typ; -import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); -import void Files_DumpBuffer (Files_Buffer b, INT16 indent); -import void Files_DumpFile (Files_File f, INT16 indent); -import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 9f808e0f..aeebff17 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index ac0c9a94..ff1a1b07 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 3d520568..c66fe5bd 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 13be7215..5e518753 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index bb4ea138..19e40505 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 6757803a..71d82def 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 093bb886..a5f41a8e 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index a32c29e0..38a2b01d 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index dc8eecc1..143546fd 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -63,6 +63,7 @@ export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); +export void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -92,7 +93,6 @@ export void OPM_SymWInt (INT64 i); export void OPM_SymWLReal (LONGREAL lr); export void OPM_SymWReal (REAL r); export void OPM_SymWSet (UINT64 s); -static void OPM_VerboseListSizes (void); export void OPM_Write (CHAR ch); export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); @@ -136,6 +136,27 @@ void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) __DEL(vt100code); } +void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) +{ + __DUP(modname, modname__len, CHAR); + OPM_LogWStr((CHAR*)"Compiling ", 11); + OPM_LogWStr(modname, modname__len); + if (__IN(18, OPM_Options, 32)) { + OPM_LogWStr((CHAR*)", s:", 5); + OPM_LogWNum(__ASHL(OPM_ShortintSize, 3), 1); + OPM_LogWStr((CHAR*)" i:", 4); + OPM_LogWNum(__ASHL(OPM_IntegerSize, 3), 1); + OPM_LogWStr((CHAR*)" l:", 4); + OPM_LogWNum(__ASHL(OPM_LongintSize, 3), 1); + OPM_LogWStr((CHAR*)" adr:", 6); + OPM_LogWNum(__ASHL(OPM_AddressSize, 3), 1); + OPM_LogWStr((CHAR*)" algn:", 7); + OPM_LogWNum(__ASHL(OPM_Alignment, 3), 1); + } + OPM_LogW('.'); + __DEL(modname); +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -363,32 +384,6 @@ BOOLEAN OPM_OpenPar (void) __RETCHK; } -static void OPM_VerboseListSizes (void) -{ - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Type Size", 15); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SHORTINT ", 12); - OPM_LogWNum(OPM_ShortintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"INTEGER ", 12); - OPM_LogWNum(OPM_IntegerSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"LONGINT ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SET ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"ADDRESS ", 12); - OPM_LogWNum(OPM_AddressSize, 4); - OPM_LogWLn(); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Alignment: ", 12); - OPM_LogWNum(OPM_Alignment, 4); - OPM_LogWLn(); -} - void OPM_InitOptions (void) { CHAR s[256]; @@ -432,9 +427,6 @@ void OPM_InitOptions (void) OPM_LongintSize = 4; break; } - if (__IN(18, OPM_Options, 32)) { - OPM_VerboseListSizes(); - } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); if (OPM_ResourceDir[0] != 0x00) { Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); @@ -491,17 +483,6 @@ void OPM_Get (CHAR *ch) { OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if ((OPM_curpos == 0 && OPM_inR.eot)) { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); - OPM_LogWNum((INT16)*ch, 1); - OPM_LogW('.'); - Texts_DumpReader(OPM_inR); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Heap dump:", 11); - OPM_LogWLn(); - Out_DumpHeap(); - } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; } diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index f246eacb..96318bea 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -33,6 +33,7 @@ import void OPM_Get (CHAR *ch); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); +import void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 911d0bf7..52620168 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1796,9 +1796,7 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) OPP_err(16); } if (OPP_sym == 38) { - OPM_LogWStr((CHAR*)"compiling ", 11); - OPM_LogWStr(OPS_name, 256); - OPM_LogW('.'); + OPM_LogCompiling(OPS_name, 256); OPT_Init(OPS_name, opt); OPS_Get(&OPP_sym); OPP_CheckSym(39); diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 913d2eef..aa076aaa 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index abfcd4b8..bf9f1af5 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 9e15ba4e..09a33705 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 68c085a5..d89ea5c8 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 228191bf..63bf2070 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 7340919d..69e2f94e 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index ea04b5b8..c6a107b6 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index b5fb4689..23d917c7 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,19 +14,10 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__11__typ; -static ADDRESS *blockdesc__5__typ; -static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); -export void Out_DumpHeap (void); -static void Out_DumpModule (Heap_Module m); -export void Out_DumpTag (INT64 addr); -export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); -export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -40,8 +31,6 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) -extern ADDRESS Heap_heap; -#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -139,8 +128,10 @@ void Out_Hex (INT64 x, INT64 n) } else if (n > 16) { n = 16; } - while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { - n += 1; + if (x >= 0) { + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } } x = __ROT(x, __ASHL(16 - n, 2), 64); while (n > 0) { @@ -160,235 +151,6 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) -{ - INT16 i; - INT64 n, lim; - CHAR c; - lim = (INT64)(adr + (INT64)length); - while (adr < lim) { - if (adr + 16 < lim) { - n = 16; - } else { - n = lim - adr; - } - Out_Hex(offset, 8); - Out_Char(' '); - i = 0; - while ((INT64)i < n) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - __GET(adr + (INT64)i, c, CHAR); - Out_Hex((INT16)c, 2); - Out_Char(' '); - i += 1; - } - while (i < 16) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - Out_String((CHAR*)" ", 4); - i += 1; - } - Out_String((CHAR*)" ", 2); - i = 0; - while ((INT64)i < n) { - __GET(adr + (INT64)i, c, CHAR); - if ((INT16)c < 32 || (INT16)c > 126) { - Out_Char('.'); - } else { - Out_Char(c); - } - i += 1; - } - adr += n; - offset += n; - Out_Ln(); - } -} - -void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) -{ - Out_HexDumpAdr((ADDRESS)m, 0, m__len); -} - -static void Out_DumpModule (Heap_Module m) -{ - Out_String((CHAR*)" next: ", 19); - Out_Hex((INT64)(ADDRESS)m->next, 1); - Out_Ln(); - Out_String((CHAR*)" name: ", 19); - Out_String(m->name, 20); - Out_Ln(); - Out_String((CHAR*)" refcnt: ", 19); - Out_Hex(m->refcnt, 1); - Out_Ln(); - Out_String((CHAR*)" cmds: ", 19); - Out_Hex((INT64)(ADDRESS)m->cmds, 1); - Out_Ln(); - Out_String((CHAR*)" types: ", 19); - Out_Hex(m->types, 1); - Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 19); - Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); - Out_Ln(); -} - -typedef - struct typedesc__11 *tag__10; - -typedef - struct typedesc__11 { - INT64 tag, next, level, module; - CHAR name[24]; - INT64 bases[16]; - INT64 reserved, blksz, ptr0; - } typedesc__11; - -void Out_DumpTag (INT64 addr) -{ - tag__10 desc = NIL; - INT16 i; - Out_String((CHAR*)" obj tag: ", 17); - Out_Hex(addr, 1); - Out_Ln(); - addr -= __MASK(addr, -2); - desc = (tag__10)(ADDRESS)(addr - 192); - Out_String((CHAR*)" desc at: ", 17); - Out_Hex((INT64)(ADDRESS)desc, 1); - Out_Ln(); - Out_String((CHAR*)" desc contains:", 21); - Out_Ln(); - Out_String((CHAR*)" tag: ", 17); - Out_Hex(desc->tag, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 17); - Out_Hex(desc->next, 1); - Out_Ln(); - Out_String((CHAR*)" level: ", 17); - Out_Hex(desc->level, 1); - Out_Ln(); - Out_String((CHAR*)" module: ", 17); - Out_Hex(desc->module, 1); - Out_Ln(); - if (desc->module != 0) { - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - } - Out_String((CHAR*)" name: ", 17); - Out_String(desc->name, 24); - Out_Ln(); - Out_String((CHAR*)" bases: ", 17); - i = 0; - while (i < 16) { - Out_Hex(desc->bases[__X(i, 16)], 16); - if (__MASK(i, -4) == 3) { - Out_Ln(); - Out_String((CHAR*)" ", 17); - } else { - Out_Char(' '); - } - i += 1; - } - Out_Ln(); - Out_String((CHAR*)" reserved: ", 17); - Out_Hex(desc->reserved, 1); - Out_Ln(); - Out_String((CHAR*)" blksz: ", 17); - Out_Hex(desc->blksz, 1); - Out_Ln(); - Out_String((CHAR*)" ptr0: ", 17); - Out_Hex(desc->ptr0, 1); - Out_Ln(); -} - -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) -{ - INT64 addr; - __GET((ADDRESS)o - 8, addr, INT64); - Out_DumpTag(addr); -} - -typedef - INT64 (*adrptr__3)[1]; - -typedef - struct blockdesc__5 *block__4; - -typedef - struct blockdesc__5 { - INT64 tag, size, sentinel, next; - } blockdesc__5; - -typedef - struct chunkdesc__7 *chunk__6; - -typedef - struct chunkdesc__7 { - INT64 next, end, reserved; - blockdesc__5 firstblock; - } chunkdesc__7; - -void Out_DumpHeap (void) -{ - INT64 caddr; - chunk__6 c = NIL; - INT64 baddr; - block__4 b = NIL; - adrptr__3 tag = NIL; - caddr = Heap_heap; - while (caddr != 0) { - Out_String((CHAR*)"Chunk at: ", 11); - Out_Hex(caddr, 1); - Out_Ln(); - c = (chunk__6)(ADDRESS)caddr; - Out_String((CHAR*)" next: ", 11); - Out_Hex(c->next, 1); - Out_Ln(); - Out_String((CHAR*)" end: ", 11); - Out_Hex(c->end, 1); - Out_String((CHAR*)" => size: ", 11); - Out_Hex(c->end - caddr, 1); - Out_Ln(); - Out_String((CHAR*)" rsvd: ", 11); - Out_Hex(c->reserved, 1); - Out_Ln(); - baddr = (ADDRESS)&c->firstblock; - while (c->end - baddr > 0) { - Out_String((CHAR*)" Block at: ", 15); - Out_Hex(baddr, 1); - Out_Ln(); - b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); - Out_String((CHAR*)" tag: ", 15); - Out_Hex(b->tag, 1); - if (__MASK(b->tag, -2) != 0) { - Out_String((CHAR*)" <--- ODD! ---", 15); - } - Out_Ln(); - Out_String((CHAR*)" tag^: ", 15); - Out_Hex((*tag)[0], 1); - Out_Ln(); - Out_String((CHAR*)" size: ", 15); - Out_Hex(b->size, 1); - Out_Ln(); - Out_String((CHAR*)" sentinel: ", 15); - Out_Hex(b->sentinel, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 15); - Out_Hex(b->next, 1); - Out_Ln(); - if (b->tag != (ADDRESS)&b->size) { - Out_DumpTag(b->tag); - } - baddr += (*tag)[0]; - Out_Ln(); - } - caddr = c->next; - Out_Ln(); - } -} - static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -566,9 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 208), {-8}}; -__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 32), {-8}}; -__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 56), {-8}}; export void *Out__init(void) { @@ -576,13 +335,9 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); - __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__11, typedesc__11, 0); - __INITYP(blockdesc__5, blockdesc__5, 0); - __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(1); Out_in = 0; diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index fe405da3..e1285046 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,13 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); -import void Out_DumpHeap (void); -import void Out_DumpTag (INT64 addr); -import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); -import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 0cf3f0c3..4d25035f 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 38fee3de..76f5da00 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 9b449f98..d1eb72f6 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 3e83af42..170d1785 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index f9b5310a..225bd40a 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 58f9b546..4d98f1a3 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 429d0665..565de43f 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -192,11 +192,6 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -static void Texts_DumpElem (Texts_Elem e); -static void Texts_DumpPiece (Texts_Piece p); -export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRun (Texts_Run ru); -static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -238,161 +233,6 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static void Texts_DumpText (Texts_Text t) -{ - Out_String((CHAR*)" len: ", 15); - Out_Int(t->len, 1); - Out_Ln(); - Out_String((CHAR*)" notify: ", 15); - Out_Hex((INT64)(ADDRESS)t->notify, 1); - Out_Ln(); - Out_String((CHAR*)" head: ", 15); - Out_Hex((INT64)(ADDRESS)t->head, 1); - Out_Ln(); - Out_String((CHAR*)" cache: ", 15); - Out_Hex((INT64)(ADDRESS)t->cache, 1); - Out_Ln(); - Out_String((CHAR*)" corg: ", 15); - Out_Int(t->corg, 1); - Out_Ln(); -} - -static void Texts_DumpRun (Texts_Run ru) -{ - Out_String((CHAR*)" Run at ", 12); - Out_Hex((INT64)(ADDRESS)ru, 1); - Out_Ln(); - Out_String((CHAR*)" prev: ", 12); - Out_Hex((INT64)(ADDRESS)ru->prev, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 12); - Out_Hex((INT64)(ADDRESS)ru->next, 1); - Out_Ln(); - Out_String((CHAR*)" len: ", 12); - Out_Int(ru->len, 1); - Out_Ln(); - Out_String((CHAR*)" fnt: ", 12); - if (ru->fnt != NIL) { - Out_String(ru->fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 12); - Out_Int(ru->col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 12); - Out_Int(ru->voff, 1); - Out_Ln(); - Out_String((CHAR*)" ascii: ", 12); - if (ru->ascii) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - -static void Texts_DumpElem (Texts_Elem e) -{ - Texts_DumpRun((void*)e); - Out_String((CHAR*)" -- Elem --", 15); - Out_Ln(); - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT64)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - -static void Texts_DumpPiece (Texts_Piece p) -{ - Texts_DumpRun((void*)p); - Out_String((CHAR*)" -- Piece --", 16); - Out_Ln(); - Out_String((CHAR*)" file: ", 12); - if (p->file == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(p->file, 3); - } - Out_String((CHAR*)" org: ", 12); - Out_Int(p->org, 1); - Out_Ln(); -} - -void Texts_DumpReader (Texts_Reader re) -{ - Out_String((CHAR*)"Reader:", 8); - Out_Ln(); - Out_String((CHAR*)" eot: ", 10); - if (re.eot) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Out_String((CHAR*)" fnt: ", 10); - if (re.fnt != NIL) { - Out_String(re.fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 10); - Out_Int(re.col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 10); - Out_Int(re.voff, 1); - Out_Ln(); - Out_String((CHAR*)" org: ", 10); - Out_Int(re.org, 1); - Out_Ln(); - Out_String((CHAR*)" off: ", 10); - Out_Int(re.off, 1); - Out_Ln(); - Out_String((CHAR*)" elem: ", 10); - if (re.elem == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpElem(re.elem); - } - Out_String((CHAR*)" rider: ", 10); - Out_Ln(); - Files_DumpRider(re.rider, 2); - Out_String((CHAR*)" run: ", 10); - if (re.run == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - if (__ISP(re.run, Texts_PieceDesc, 1)) { - Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); - } else if (__ISP(re.run, Texts_ElemDesc, 1)) { - Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); - } else { - Texts_DumpRun(re.run); - } - } - Out_DumpType((void*)&*re.run, 40); -} - static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -877,32 +717,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__31 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__31 *lnk; +} *Scan__31_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__32 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__32 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + if (*Scan__31_s->ch == '-') { + *Scan__31_s->negE = 1; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__31_s->negE = 0; + if (*Scan__31_s->ch == '+') { + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { + *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } @@ -916,13 +756,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__31 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__31_s; + Scan__31_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1023,7 +863,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__32(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1056,7 +896,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__32(); } if (negE) { if (e <= 38) { @@ -1109,7 +949,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__31_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1328,30 +1168,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__53 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__53 *lnk; +} *WriteRealFix__53_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__54 (INT16 n); +static void seq__56 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__56 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__54 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__53_s->i -= 1; + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); n -= 1; } } @@ -1362,23 +1202,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__53 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__53_s; + WriteRealFix__53_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__56(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__56(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__56(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1411,21 +1251,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__56(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__54(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__54(k); } else { - seq__61(' ', (n - k) - 3); + seq__56(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__56('0', -e); + dig__54(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__53_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1524,48 +1364,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__43 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__43 *lnk; +} *WriteDate__43_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__44 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__44 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__43 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__43_s; + WriteDate__43_s = &_s; + WritePair__44(' ', __MASK(d, -32)); + WritePair__44('.', __MASK(__ASHR(d, 5), -16)); + WritePair__44('.', __MASK(__ASHR(d, 9), -128)); + WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__44(':', __MASK(__ASHR(t, 6), -64)); + WritePair__44(':', __MASK(t, -64)); + WriteDate__43_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__16 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__16 *lnk; +} *Load0__16_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Heap_Module M = NIL; Heap_Command Cmd; @@ -1576,15 +1416,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__16_s->ecnt) { + *Load0__16_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1593,25 +1433,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__16_s->T; + (*Load0__16_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__16_s->T; + a->file = *Load0__16_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1628,15 +1468,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__16 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__16_s; + Load0__16_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1669,7 +1509,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1687,7 +1527,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__16_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1756,25 +1596,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__39 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__39 *lnk; +} *Store__39_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1782,14 +1622,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__39_s->ecnt) { + *Store__39_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__39_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1810,14 +1650,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__39 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__39_s; + Store__39_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1859,7 +1699,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1913,7 +1753,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__39_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index ac6542ff..bdd9fada 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,7 +135,6 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 80457921..9cd5cf4d 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 1a589c43..8f60c652 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 46b1acc2..fa840303 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,7 +82,7 @@ void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble: ", 11, cmd, 1023); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); __DEL(moduleName); } @@ -106,7 +106,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); __DEL(additionalopts); } diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 4201df04..a93b6c85 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index d13ed803..993c2bac 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); Strings_Append(fn, 64, (void*)objectnames, objectnames__len); } else { - OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogVT100((CHAR*)"91m", 4); OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); OPM_LogWStr(l->name, 256); OPM_LogWStr((CHAR*)", but local object file '", 26); diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index eb305bbe..80b87b1d 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index d10b5011..cdc285e5 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 2922b3cd..3eecd248 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -69,9 +69,6 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); -export void Files_DumpBuffer (Files_Buffer b, INT16 indent); -export void Files_DumpFile (Files_File f, INT16 indent); -export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -102,7 +99,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); -static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -116,132 +112,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) -static void Files_Spaces (INT16 i) -{ - while (i > 0) { - Out_String((CHAR*)" ", 3); - i -= 1; - } -} - -void Files_DumpFile (Files_File f, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"workName: ", 15); - Out_String(f->workName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"registerName: ", 15); - Out_String(f->registerName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"tempFile: ", 15); - if (f->tempFile) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"identity: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"fd: ", 15); - Out_Int(f->fd, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"len, ", 15); - Out_Int(f->len, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"pos: ", 15); - Out_Int(f->pos, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"bufs: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"swapper: ", 15); - Out_Int(f->swapper, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"state: ", 15); - Out_Int(f->state, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"next: ", 15); - Out_Hex((INT32)(ADDRESS)f->next, 1); - Out_Ln(); -} - -void Files_DumpBuffer (Files_Buffer b, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"chg: ", 7); - if (b->chg) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 7); - Out_Int(b->org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"size: ", 7); - Out_Int(b->size, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"data: ", 7); - Out_Ln(); - Out_HexDump((void*)b->data, 4096); - Files_Spaces(indent); - Out_String((CHAR*)"f: ", 7); - if (b->f == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(b->f, indent + 1); - } -} - -void Files_DumpRider (Files_Rider r, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"res: ", 9); - Out_Int(r.res, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"eof: ", 9); - if (r.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 9); - Out_Int(r.org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"offset: ", 9); - Out_Int(r.offset, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"buf: ", 9); - if (r.buf == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpBuffer(r.buf, indent + 1); - } -} - static void Files_Assert (BOOLEAN truth) { if (!truth) { diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index b43aa306..2dc667a1 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,19 +1,10 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" -typedef - struct Files_BufDesc { - INT32 _prvt0; - char _prvt1[4108]; - } Files_BufDesc; - -typedef - Files_BufDesc *Files_Buffer; - typedef struct Files_FileDesc *Files_File; @@ -33,16 +24,12 @@ typedef import ADDRESS *Files_FileDesc__typ; -import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); -import void Files_DumpBuffer (Files_Buffer b, INT16 indent); -import void Files_DumpFile (Files_File f, INT16 indent); -import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index d6b6560d..c12cb722 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 87732bb9..de4d17ce 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 458d281f..b437b514 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index f52b30af..8436f089 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index bb4ea138..19e40505 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 6757803a..71d82def 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 093bb886..a5f41a8e 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index a32c29e0..38a2b01d 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 0fd45dec..8f903e46 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -63,6 +63,7 @@ export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); +export void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -92,7 +93,6 @@ export void OPM_SymWInt (INT64 i); export void OPM_SymWLReal (LONGREAL lr); export void OPM_SymWReal (REAL r); export void OPM_SymWSet (UINT64 s); -static void OPM_VerboseListSizes (void); export void OPM_Write (CHAR ch); export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); @@ -136,6 +136,27 @@ void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) __DEL(vt100code); } +void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) +{ + __DUP(modname, modname__len, CHAR); + OPM_LogWStr((CHAR*)"Compiling ", 11); + OPM_LogWStr(modname, modname__len); + if (__IN(18, OPM_Options, 32)) { + OPM_LogWStr((CHAR*)", s:", 5); + OPM_LogWNum(__ASHL(OPM_ShortintSize, 3), 1); + OPM_LogWStr((CHAR*)" i:", 4); + OPM_LogWNum(__ASHL(OPM_IntegerSize, 3), 1); + OPM_LogWStr((CHAR*)" l:", 4); + OPM_LogWNum(__ASHL(OPM_LongintSize, 3), 1); + OPM_LogWStr((CHAR*)" adr:", 6); + OPM_LogWNum(__ASHL(OPM_AddressSize, 3), 1); + OPM_LogWStr((CHAR*)" algn:", 7); + OPM_LogWNum(__ASHL(OPM_Alignment, 3), 1); + } + OPM_LogW('.'); + __DEL(modname); +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -363,32 +384,6 @@ BOOLEAN OPM_OpenPar (void) __RETCHK; } -static void OPM_VerboseListSizes (void) -{ - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Type Size", 15); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SHORTINT ", 12); - OPM_LogWNum(OPM_ShortintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"INTEGER ", 12); - OPM_LogWNum(OPM_IntegerSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"LONGINT ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SET ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"ADDRESS ", 12); - OPM_LogWNum(OPM_AddressSize, 4); - OPM_LogWLn(); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Alignment: ", 12); - OPM_LogWNum(OPM_Alignment, 4); - OPM_LogWLn(); -} - void OPM_InitOptions (void) { CHAR s[256]; @@ -432,9 +427,6 @@ void OPM_InitOptions (void) OPM_LongintSize = 4; break; } - if (__IN(18, OPM_Options, 32)) { - OPM_VerboseListSizes(); - } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); if (OPM_ResourceDir[0] != 0x00) { Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); @@ -491,17 +483,6 @@ void OPM_Get (CHAR *ch) { OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if ((OPM_curpos == 0 && OPM_inR.eot)) { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); - OPM_LogWNum((INT16)*ch, 1); - OPM_LogW('.'); - Texts_DumpReader(OPM_inR); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Heap dump:", 11); - OPM_LogWLn(); - Out_DumpHeap(); - } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; } diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index f246eacb..96318bea 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -33,6 +33,7 @@ import void OPM_Get (CHAR *ch); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); +import void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index c3e79413..ec4ad2be 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1796,9 +1796,7 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) OPP_err(16); } if (OPP_sym == 38) { - OPM_LogWStr((CHAR*)"compiling ", 11); - OPM_LogWStr(OPS_name, 256); - OPM_LogW('.'); + OPM_LogCompiling(OPS_name, 256); OPT_Init(OPS_name, opt); OPS_Get(&OPP_sym); OPP_CheckSym(39); diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 913d2eef..aa076aaa 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index abfcd4b8..bf9f1af5 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 9e15ba4e..09a33705 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index fc598571..0002aa51 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 228191bf..63bf2070 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index e44854e3..8b095ff5 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index ea04b5b8..c6a107b6 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index ebafde72..01e91698 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,19 +14,10 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__11__typ; -static ADDRESS *blockdesc__5__typ; -static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); -export void Out_DumpHeap (void); -static void Out_DumpModule (Heap_Module m); -export void Out_DumpTag (INT32 addr); -export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); -export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -40,8 +31,6 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) -extern ADDRESS Heap_heap; -#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -139,8 +128,10 @@ void Out_Hex (INT64 x, INT64 n) } else if (n > 16) { n = 16; } - while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { - n += 1; + if (x >= 0) { + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } } x = __ROT(x, __ASHL(16 - n, 2), 64); while (n > 0) { @@ -160,235 +151,6 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length) -{ - INT16 i; - INT32 n, lim; - CHAR c; - lim = (INT32)(adr + length); - while (adr < lim) { - if (adr + 16 < lim) { - n = 16; - } else { - n = lim - adr; - } - Out_Hex(offset, 8); - Out_Char(' '); - i = 0; - while (i < n) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - __GET(adr + i, c, CHAR); - Out_Hex((INT16)c, 2); - Out_Char(' '); - i += 1; - } - while (i < 16) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - Out_String((CHAR*)" ", 4); - i += 1; - } - Out_String((CHAR*)" ", 2); - i = 0; - while (i < n) { - __GET(adr + i, c, CHAR); - if ((INT16)c < 32 || (INT16)c > 126) { - Out_Char('.'); - } else { - Out_Char(c); - } - i += 1; - } - adr += n; - offset += (INT64)n; - Out_Ln(); - } -} - -void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) -{ - Out_HexDumpAdr((ADDRESS)m, 0, m__len); -} - -static void Out_DumpModule (Heap_Module m) -{ - Out_String((CHAR*)" next: ", 19); - Out_Hex((INT32)(ADDRESS)m->next, 1); - Out_Ln(); - Out_String((CHAR*)" name: ", 19); - Out_String(m->name, 20); - Out_Ln(); - Out_String((CHAR*)" refcnt: ", 19); - Out_Hex(m->refcnt, 1); - Out_Ln(); - Out_String((CHAR*)" cmds: ", 19); - Out_Hex((INT32)(ADDRESS)m->cmds, 1); - Out_Ln(); - Out_String((CHAR*)" types: ", 19); - Out_Hex(m->types, 1); - Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 19); - Out_Hex((INT32)(ADDRESS)m->enumPtrs, 1); - Out_Ln(); -} - -typedef - struct typedesc__11 *tag__10; - -typedef - struct typedesc__11 { - INT32 tag, next, level, module; - CHAR name[24]; - INT32 bases[16]; - INT32 reserved, blksz, ptr0; - } typedesc__11; - -void Out_DumpTag (INT32 addr) -{ - tag__10 desc = NIL; - INT16 i; - Out_String((CHAR*)" obj tag: ", 17); - Out_Hex(addr, 1); - Out_Ln(); - addr -= __MASK(addr, -2); - desc = (tag__10)(ADDRESS)(addr - 108); - Out_String((CHAR*)" desc at: ", 17); - Out_Hex((INT32)(ADDRESS)desc, 1); - Out_Ln(); - Out_String((CHAR*)" desc contains:", 21); - Out_Ln(); - Out_String((CHAR*)" tag: ", 17); - Out_Hex(desc->tag, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 17); - Out_Hex(desc->next, 1); - Out_Ln(); - Out_String((CHAR*)" level: ", 17); - Out_Hex(desc->level, 1); - Out_Ln(); - Out_String((CHAR*)" module: ", 17); - Out_Hex(desc->module, 1); - Out_Ln(); - if (desc->module != 0) { - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - } - Out_String((CHAR*)" name: ", 17); - Out_String(desc->name, 24); - Out_Ln(); - Out_String((CHAR*)" bases: ", 17); - i = 0; - while (i < 16) { - Out_Hex(desc->bases[__X(i, 16)], 8); - if (__MASK(i, -4) == 3) { - Out_Ln(); - Out_String((CHAR*)" ", 17); - } else { - Out_Char(' '); - } - i += 1; - } - Out_Ln(); - Out_String((CHAR*)" reserved: ", 17); - Out_Hex(desc->reserved, 1); - Out_Ln(); - Out_String((CHAR*)" blksz: ", 17); - Out_Hex(desc->blksz, 1); - Out_Ln(); - Out_String((CHAR*)" ptr0: ", 17); - Out_Hex(desc->ptr0, 1); - Out_Ln(); -} - -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) -{ - INT32 addr; - __GET((ADDRESS)o - 4, addr, INT32); - Out_DumpTag(addr); -} - -typedef - INT32 (*adrptr__3)[1]; - -typedef - struct blockdesc__5 *block__4; - -typedef - struct blockdesc__5 { - INT32 tag, size, sentinel, next; - } blockdesc__5; - -typedef - struct chunkdesc__7 *chunk__6; - -typedef - struct chunkdesc__7 { - INT32 next, end, reserved; - blockdesc__5 firstblock; - } chunkdesc__7; - -void Out_DumpHeap (void) -{ - INT32 caddr; - chunk__6 c = NIL; - INT32 baddr; - block__4 b = NIL; - adrptr__3 tag = NIL; - caddr = Heap_heap; - while (caddr != 0) { - Out_String((CHAR*)"Chunk at: ", 11); - Out_Hex(caddr, 1); - Out_Ln(); - c = (chunk__6)(ADDRESS)caddr; - Out_String((CHAR*)" next: ", 11); - Out_Hex(c->next, 1); - Out_Ln(); - Out_String((CHAR*)" end: ", 11); - Out_Hex(c->end, 1); - Out_String((CHAR*)" => size: ", 11); - Out_Hex(c->end - caddr, 1); - Out_Ln(); - Out_String((CHAR*)" rsvd: ", 11); - Out_Hex(c->reserved, 1); - Out_Ln(); - baddr = (ADDRESS)&c->firstblock; - while (c->end - baddr > 0) { - Out_String((CHAR*)" Block at: ", 15); - Out_Hex(baddr, 1); - Out_Ln(); - b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); - Out_String((CHAR*)" tag: ", 15); - Out_Hex(b->tag, 1); - if (__MASK(b->tag, -2) != 0) { - Out_String((CHAR*)" <--- ODD! ---", 15); - } - Out_Ln(); - Out_String((CHAR*)" tag^: ", 15); - Out_Hex((*tag)[0], 1); - Out_Ln(); - Out_String((CHAR*)" size: ", 15); - Out_Hex(b->size, 1); - Out_Ln(); - Out_String((CHAR*)" sentinel: ", 15); - Out_Hex(b->sentinel, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 15); - Out_Hex(b->next, 1); - Out_Ln(); - if (b->tag != (ADDRESS)&b->size) { - Out_DumpTag(b->tag); - } - baddr += (*tag)[0]; - Out_Ln(); - } - caddr = c->next; - Out_Ln(); - } -} - static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -566,9 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 116), {-4}}; -__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 16), {-4}}; -__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 28), {-4}}; export void *Out__init(void) { @@ -576,13 +335,9 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); - __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__11, typedesc__11, 0); - __INITYP(blockdesc__5, blockdesc__5, 0); - __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index cbb4de1a..e1285046 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,13 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); -import void Out_DumpHeap (void); -import void Out_DumpTag (INT32 addr); -import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); -import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT32 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index fee81ec0..9d308e71 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 19fe26f9..bd2a519b 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 9b449f98..d1eb72f6 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 3e83af42..170d1785 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index f9b5310a..225bd40a 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 58f9b546..4d98f1a3 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 96851302..08ee5129 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -192,11 +192,6 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -static void Texts_DumpElem (Texts_Elem e); -static void Texts_DumpPiece (Texts_Piece p); -export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRun (Texts_Run ru); -static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -238,161 +233,6 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static void Texts_DumpText (Texts_Text t) -{ - Out_String((CHAR*)" len: ", 15); - Out_Int(t->len, 1); - Out_Ln(); - Out_String((CHAR*)" notify: ", 15); - Out_Hex((INT32)(ADDRESS)t->notify, 1); - Out_Ln(); - Out_String((CHAR*)" head: ", 15); - Out_Hex((INT32)(ADDRESS)t->head, 1); - Out_Ln(); - Out_String((CHAR*)" cache: ", 15); - Out_Hex((INT32)(ADDRESS)t->cache, 1); - Out_Ln(); - Out_String((CHAR*)" corg: ", 15); - Out_Int(t->corg, 1); - Out_Ln(); -} - -static void Texts_DumpRun (Texts_Run ru) -{ - Out_String((CHAR*)" Run at ", 12); - Out_Hex((INT32)(ADDRESS)ru, 1); - Out_Ln(); - Out_String((CHAR*)" prev: ", 12); - Out_Hex((INT32)(ADDRESS)ru->prev, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 12); - Out_Hex((INT32)(ADDRESS)ru->next, 1); - Out_Ln(); - Out_String((CHAR*)" len: ", 12); - Out_Int(ru->len, 1); - Out_Ln(); - Out_String((CHAR*)" fnt: ", 12); - if (ru->fnt != NIL) { - Out_String(ru->fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 12); - Out_Int(ru->col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 12); - Out_Int(ru->voff, 1); - Out_Ln(); - Out_String((CHAR*)" ascii: ", 12); - if (ru->ascii) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - -static void Texts_DumpElem (Texts_Elem e) -{ - Texts_DumpRun((void*)e); - Out_String((CHAR*)" -- Elem --", 15); - Out_Ln(); - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT32)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - -static void Texts_DumpPiece (Texts_Piece p) -{ - Texts_DumpRun((void*)p); - Out_String((CHAR*)" -- Piece --", 16); - Out_Ln(); - Out_String((CHAR*)" file: ", 12); - if (p->file == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(p->file, 3); - } - Out_String((CHAR*)" org: ", 12); - Out_Int(p->org, 1); - Out_Ln(); -} - -void Texts_DumpReader (Texts_Reader re) -{ - Out_String((CHAR*)"Reader:", 8); - Out_Ln(); - Out_String((CHAR*)" eot: ", 10); - if (re.eot) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Out_String((CHAR*)" fnt: ", 10); - if (re.fnt != NIL) { - Out_String(re.fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 10); - Out_Int(re.col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 10); - Out_Int(re.voff, 1); - Out_Ln(); - Out_String((CHAR*)" org: ", 10); - Out_Int(re.org, 1); - Out_Ln(); - Out_String((CHAR*)" off: ", 10); - Out_Int(re.off, 1); - Out_Ln(); - Out_String((CHAR*)" elem: ", 10); - if (re.elem == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpElem(re.elem); - } - Out_String((CHAR*)" rider: ", 10); - Out_Ln(); - Files_DumpRider(re.rider, 2); - Out_String((CHAR*)" run: ", 10); - if (re.run == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - if (__ISP(re.run, Texts_PieceDesc, 1)) { - Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); - } else if (__ISP(re.run, Texts_ElemDesc, 1)) { - Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); - } else { - Texts_DumpRun(re.run); - } - } - Out_DumpType((void*)&*re.run, 20); -} - static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -877,32 +717,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__31 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__31 *lnk; +} *Scan__31_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__32 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__32 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + if (*Scan__31_s->ch == '-') { + *Scan__31_s->negE = 1; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__31_s->negE = 0; + if (*Scan__31_s->ch == '+') { + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { + *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } @@ -916,13 +756,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__31 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__31_s; + Scan__31_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1023,7 +863,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__32(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1056,7 +896,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__32(); } if (negE) { if (e <= 38) { @@ -1109,7 +949,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__31_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1328,30 +1168,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__53 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__53 *lnk; +} *WriteRealFix__53_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__54 (INT16 n); +static void seq__56 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__56 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__54 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__53_s->i -= 1; + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); n -= 1; } } @@ -1362,23 +1202,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__53 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__53_s; + WriteRealFix__53_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__56(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__56(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__56(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1411,21 +1251,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__56(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__54(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__54(k); } else { - seq__61(' ', (n - k) - 3); + seq__56(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__56('0', -e); + dig__54(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__53_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1524,48 +1364,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__43 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__43 *lnk; +} *WriteDate__43_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__44 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__44 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__43 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__43_s; + WriteDate__43_s = &_s; + WritePair__44(' ', __MASK(d, -32)); + WritePair__44('.', __MASK(__ASHR(d, 5), -16)); + WritePair__44('.', __MASK(__ASHR(d, 9), -128)); + WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__44(':', __MASK(__ASHR(t, 6), -64)); + WritePair__44(':', __MASK(t, -64)); + WriteDate__43_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__16 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__16 *lnk; +} *Load0__16_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Heap_Module M = NIL; Heap_Command Cmd; @@ -1576,15 +1416,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__16_s->ecnt) { + *Load0__16_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1593,25 +1433,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__16_s->T; + (*Load0__16_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__16_s->T; + a->file = *Load0__16_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1628,15 +1468,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__16 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__16_s; + Load0__16_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1669,7 +1509,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1687,7 +1527,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__16_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1756,25 +1596,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__39 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__39 *lnk; +} *Store__39_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1782,14 +1622,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__39_s->ecnt) { + *Store__39_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__39_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1810,14 +1650,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__39 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__39_s; + Store__39_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1859,7 +1699,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1913,7 +1753,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__39_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 188b60fb..5d3316e2 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,7 +135,6 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 80457921..9cd5cf4d 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 1a589c43..8f60c652 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 46b1acc2..fa840303 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,7 +82,7 @@ void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble: ", 11, cmd, 1023); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); __DEL(moduleName); } @@ -106,7 +106,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); __DEL(additionalopts); } diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 4201df04..a93b6c85 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index d13ed803..993c2bac 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -122,7 +122,7 @@ static void Compiler_FindLocalObjectFiles (CHAR *objectnames, ADDRESS objectname Strings_Append((CHAR*)" ", 2, (void*)objectnames, objectnames__len); Strings_Append(fn, 64, (void*)objectnames, objectnames__len); } else { - OPM_LogVT100((CHAR*)"33m", 4); + OPM_LogVT100((CHAR*)"91m", 4); OPM_LogWStr((CHAR*)"Link warning: a local symbol file is present for module ", 57); OPM_LogWStr(l->name, 256); OPM_LogWStr((CHAR*)", but local object file '", 26); diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index eb305bbe..80b87b1d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index d10b5011..cdc285e5 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 3b7e4c54..508dc245 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -70,9 +70,6 @@ static void Files_CloseOSFile (Files_File f); static void Files_Create (Files_File f); export void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); static void Files_Deregister (CHAR *name, ADDRESS name__len); -export void Files_DumpBuffer (Files_Buffer b, INT16 indent); -export void Files_DumpFile (Files_File f, INT16 indent); -export void Files_DumpRider (Files_Rider r, INT16 indent); static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode); static void Files_Finalize (SYSTEM_PTR o); static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *dest, ADDRESS dest__len); @@ -103,7 +100,6 @@ export void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__l static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len); export void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos); export void Files_SetSearchPath (CHAR *path, ADDRESS path__len); -static void Files_Spaces (INT16 i); export void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x); export void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x); export void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); @@ -117,132 +113,6 @@ export void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS #define Files_IdxTrap() __HALT(-1) -static void Files_Spaces (INT16 i) -{ - while (i > 0) { - Out_String((CHAR*)" ", 3); - i -= 1; - } -} - -void Files_DumpFile (Files_File f, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"workName: ", 15); - Out_String(f->workName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"registerName: ", 15); - Out_String(f->registerName, 101); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"tempFile: ", 15); - if (f->tempFile) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"identity: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"fd: ", 15); - Out_Int(f->fd, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"len, ", 15); - Out_Int(f->len, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"pos: ", 15); - Out_Int(f->pos, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"bufs: ", 15); - Out_String((CHAR*)"...", 4); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"swapper: ", 15); - Out_Int(f->swapper, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"state: ", 15); - Out_Int(f->state, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"next: ", 15); - Out_Hex((INT64)(ADDRESS)f->next, 1); - Out_Ln(); -} - -void Files_DumpBuffer (Files_Buffer b, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"chg: ", 7); - if (b->chg) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 7); - Out_Int(b->org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"size: ", 7); - Out_Int(b->size, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"data: ", 7); - Out_Ln(); - Out_HexDump((void*)b->data, 4096); - Files_Spaces(indent); - Out_String((CHAR*)"f: ", 7); - if (b->f == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(b->f, indent + 1); - } -} - -void Files_DumpRider (Files_Rider r, INT16 indent) -{ - Files_Spaces(indent); - Out_String((CHAR*)"res: ", 9); - Out_Int(r.res, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"eof: ", 9); - if (r.eof) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"org: ", 9); - Out_Int(r.org, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"offset: ", 9); - Out_Int(r.offset, 1); - Out_Ln(); - Files_Spaces(indent); - Out_String((CHAR*)"buf: ", 9); - if (r.buf == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpBuffer(r.buf, indent + 1); - } -} - static void Files_Assert (BOOLEAN truth) { if (!truth) { diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 0093b4e8..74f5c8ca 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,19 +1,10 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h #include "SYSTEM.h" -typedef - struct Files_BufDesc { - INT64 _prvt0; - char _prvt1[4108]; - } Files_BufDesc; - -typedef - Files_BufDesc *Files_Buffer; - typedef struct Files_FileDesc *Files_File; @@ -34,16 +25,12 @@ typedef import ADDRESS *Files_FileDesc__typ; -import ADDRESS *Files_BufDesc__typ; import ADDRESS *Files_Rider__typ; import Files_File Files_Base (Files_Rider *r, ADDRESS *r__typ); import void Files_ChangeDirectory (CHAR *path, ADDRESS path__len, INT16 *res); import void Files_Close (Files_File f); import void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res); -import void Files_DumpBuffer (Files_Buffer b, INT16 indent); -import void Files_DumpFile (Files_File f, INT16 indent); -import void Files_DumpRider (Files_Rider r, INT16 indent); import void Files_GetDate (Files_File f, INT32 *t, INT32 *d); import void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len); import INT32 Files_Length (Files_File f); diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 9f808e0f..aeebff17 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index ac0c9a94..ff1a1b07 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 539c398c..62030574 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 13be7215..5e518753 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index bb4ea138..19e40505 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 6757803a..71d82def 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 093bb886..a5f41a8e 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index a32c29e0..38a2b01d 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index dc8eecc1..143546fd 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -63,6 +63,7 @@ export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len); +export void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); static void OPM_LogErrMsg (INT16 n); export void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); export void OPM_LogW (CHAR ch); @@ -92,7 +93,6 @@ export void OPM_SymWInt (INT64 i); export void OPM_SymWLReal (LONGREAL lr); export void OPM_SymWReal (REAL r); export void OPM_SymWSet (UINT64 s); -static void OPM_VerboseListSizes (void); export void OPM_Write (CHAR ch); export void OPM_WriteHex (INT64 i); export void OPM_WriteInt (INT64 i); @@ -136,6 +136,27 @@ void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len) __DEL(vt100code); } +void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) +{ + __DUP(modname, modname__len, CHAR); + OPM_LogWStr((CHAR*)"Compiling ", 11); + OPM_LogWStr(modname, modname__len); + if (__IN(18, OPM_Options, 32)) { + OPM_LogWStr((CHAR*)", s:", 5); + OPM_LogWNum(__ASHL(OPM_ShortintSize, 3), 1); + OPM_LogWStr((CHAR*)" i:", 4); + OPM_LogWNum(__ASHL(OPM_IntegerSize, 3), 1); + OPM_LogWStr((CHAR*)" l:", 4); + OPM_LogWNum(__ASHL(OPM_LongintSize, 3), 1); + OPM_LogWStr((CHAR*)" adr:", 6); + OPM_LogWNum(__ASHL(OPM_AddressSize, 3), 1); + OPM_LogWStr((CHAR*)" algn:", 7); + OPM_LogWNum(__ASHL(OPM_Alignment, 3), 1); + } + OPM_LogW('.'); + __DEL(modname); +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -363,32 +384,6 @@ BOOLEAN OPM_OpenPar (void) __RETCHK; } -static void OPM_VerboseListSizes (void) -{ - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Type Size", 15); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SHORTINT ", 12); - OPM_LogWNum(OPM_ShortintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"INTEGER ", 12); - OPM_LogWNum(OPM_IntegerSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"LONGINT ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"SET ", 12); - OPM_LogWNum(OPM_LongintSize, 4); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"ADDRESS ", 12); - OPM_LogWNum(OPM_AddressSize, 4); - OPM_LogWLn(); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Alignment: ", 12); - OPM_LogWNum(OPM_Alignment, 4); - OPM_LogWLn(); -} - void OPM_InitOptions (void) { CHAR s[256]; @@ -432,9 +427,6 @@ void OPM_InitOptions (void) OPM_LongintSize = 4; break; } - if (__IN(18, OPM_Options, 32)) { - OPM_VerboseListSizes(); - } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); if (OPM_ResourceDir[0] != 0x00) { Strings_Append((CHAR*)"/", 2, (void*)OPM_ResourceDir, 1024); @@ -491,17 +483,6 @@ void OPM_Get (CHAR *ch) { OPM_curpos = Texts_Pos(&OPM_inR, Texts_Reader__typ); Texts_Read(&OPM_inR, Texts_Reader__typ, &*ch); - if ((OPM_curpos == 0 && OPM_inR.eot)) { - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"DEBUG: OPM.Get returned inR.eot at curpos = 0, ch = ", 53); - OPM_LogWNum((INT16)*ch, 1); - OPM_LogW('.'); - Texts_DumpReader(OPM_inR); - OPM_LogWLn(); - OPM_LogWStr((CHAR*)"Heap dump:", 11); - OPM_LogWLn(); - Out_DumpHeap(); - } if ((*ch < 0x09 && !OPM_inR.eot)) { *ch = ' '; } diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index f246eacb..96318bea 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h @@ -33,6 +33,7 @@ import void OPM_Get (CHAR *ch); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); +import void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len); import void OPM_LogVT100 (CHAR *vt100code, ADDRESS vt100code__len); import void OPM_LogW (CHAR ch); import void OPM_LogWLn (void); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 911d0bf7..52620168 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1796,9 +1796,7 @@ void OPP_Module (OPT_Node *prog, UINT32 opt) OPP_err(16); } if (OPP_sym == 38) { - OPM_LogWStr((CHAR*)"compiling ", 11); - OPM_LogWStr(OPS_name, 256); - OPM_LogW('.'); + OPM_LogCompiling(OPS_name, 256); OPT_Init(OPS_name, opt); OPS_Get(&OPP_sym); OPP_CheckSym(39); diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 913d2eef..aa076aaa 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index abfcd4b8..bf9f1af5 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 9e15ba4e..09a33705 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 68c085a5..d89ea5c8 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 228191bf..63bf2070 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 7340919d..69e2f94e 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index ea04b5b8..c6a107b6 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index cb9b1989..01e91698 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -14,19 +14,10 @@ export BOOLEAN Out_IsConsole; static CHAR Out_buf[128]; static INT16 Out_in; -static ADDRESS *typedesc__11__typ; -static ADDRESS *blockdesc__5__typ; -static ADDRESS *chunkdesc__7__typ; export void Out_Char (CHAR ch); -export void Out_DumpHeap (void); -static void Out_DumpModule (Heap_Module m); -export void Out_DumpTag (INT64 addr); -export void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); export void Out_Flush (void); export void Out_Hex (INT64 x, INT64 n); -export void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -export void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); export void Out_Int (INT64 x, INT64 n); static INT32 Out_Length (CHAR *s, ADDRESS s__len); export void Out_Ln (void); @@ -40,8 +31,6 @@ static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i); static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i); #define Out_Entier64(x) (INT64)(x) -extern ADDRESS Heap_heap; -#define Out_getheap() Heap_heap void Out_Flush (void) { @@ -139,8 +128,10 @@ void Out_Hex (INT64 x, INT64 n) } else if (n > 16) { n = 16; } - while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { - n += 1; + if (x >= 0) { + while ((n < 16 && __LSH(x, -__ASHL(n, 2), 64) != 0)) { + n += 1; + } } x = __ROT(x, __ASHL(16 - n, 2), 64); while (n > 0) { @@ -160,235 +151,6 @@ void Out_Ln (void) Out_Flush(); } -void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length) -{ - INT16 i; - INT64 n, lim; - CHAR c; - lim = (INT64)(adr + (INT64)length); - while (adr < lim) { - if (adr + 16 < lim) { - n = 16; - } else { - n = lim - adr; - } - Out_Hex(offset, 8); - Out_Char(' '); - i = 0; - while ((INT64)i < n) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - __GET(adr + (INT64)i, c, CHAR); - Out_Hex((INT16)c, 2); - Out_Char(' '); - i += 1; - } - while (i < 16) { - if (__MASK(i, -4) == 0) { - Out_Char(' '); - } - Out_String((CHAR*)" ", 4); - i += 1; - } - Out_String((CHAR*)" ", 2); - i = 0; - while ((INT64)i < n) { - __GET(adr + (INT64)i, c, CHAR); - if ((INT16)c < 32 || (INT16)c > 126) { - Out_Char('.'); - } else { - Out_Char(c); - } - i += 1; - } - adr += n; - offset += n; - Out_Ln(); - } -} - -void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len) -{ - Out_HexDumpAdr((ADDRESS)m, 0, m__len); -} - -static void Out_DumpModule (Heap_Module m) -{ - Out_String((CHAR*)" next: ", 19); - Out_Hex((INT64)(ADDRESS)m->next, 1); - Out_Ln(); - Out_String((CHAR*)" name: ", 19); - Out_String(m->name, 20); - Out_Ln(); - Out_String((CHAR*)" refcnt: ", 19); - Out_Hex(m->refcnt, 1); - Out_Ln(); - Out_String((CHAR*)" cmds: ", 19); - Out_Hex((INT64)(ADDRESS)m->cmds, 1); - Out_Ln(); - Out_String((CHAR*)" types: ", 19); - Out_Hex(m->types, 1); - Out_Ln(); - Out_String((CHAR*)" enumPtrs: ", 19); - Out_Hex((INT64)(ADDRESS)m->enumPtrs, 1); - Out_Ln(); -} - -typedef - struct typedesc__11 *tag__10; - -typedef - struct typedesc__11 { - INT64 tag, next, level, module; - CHAR name[24]; - INT64 bases[16]; - INT64 reserved, blksz, ptr0; - } typedesc__11; - -void Out_DumpTag (INT64 addr) -{ - tag__10 desc = NIL; - INT16 i; - Out_String((CHAR*)" obj tag: ", 17); - Out_Hex(addr, 1); - Out_Ln(); - addr -= __MASK(addr, -2); - desc = (tag__10)(ADDRESS)(addr - 192); - Out_String((CHAR*)" desc at: ", 17); - Out_Hex((INT64)(ADDRESS)desc, 1); - Out_Ln(); - Out_String((CHAR*)" desc contains:", 21); - Out_Ln(); - Out_String((CHAR*)" tag: ", 17); - Out_Hex(desc->tag, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 17); - Out_Hex(desc->next, 1); - Out_Ln(); - Out_String((CHAR*)" level: ", 17); - Out_Hex(desc->level, 1); - Out_Ln(); - Out_String((CHAR*)" module: ", 17); - Out_Hex(desc->module, 1); - Out_Ln(); - if (desc->module != 0) { - Out_DumpModule((Heap_Module)(ADDRESS)desc->module); - } - Out_String((CHAR*)" name: ", 17); - Out_String(desc->name, 24); - Out_Ln(); - Out_String((CHAR*)" bases: ", 17); - i = 0; - while (i < 16) { - Out_Hex(desc->bases[__X(i, 16)], 16); - if (__MASK(i, -4) == 3) { - Out_Ln(); - Out_String((CHAR*)" ", 17); - } else { - Out_Char(' '); - } - i += 1; - } - Out_Ln(); - Out_String((CHAR*)" reserved: ", 17); - Out_Hex(desc->reserved, 1); - Out_Ln(); - Out_String((CHAR*)" blksz: ", 17); - Out_Hex(desc->blksz, 1); - Out_Ln(); - Out_String((CHAR*)" ptr0: ", 17); - Out_Hex(desc->ptr0, 1); - Out_Ln(); -} - -void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len) -{ - INT64 addr; - __GET((ADDRESS)o - 8, addr, INT64); - Out_DumpTag(addr); -} - -typedef - INT64 (*adrptr__3)[1]; - -typedef - struct blockdesc__5 *block__4; - -typedef - struct blockdesc__5 { - INT64 tag, size, sentinel, next; - } blockdesc__5; - -typedef - struct chunkdesc__7 *chunk__6; - -typedef - struct chunkdesc__7 { - INT64 next, end, reserved; - blockdesc__5 firstblock; - } chunkdesc__7; - -void Out_DumpHeap (void) -{ - INT64 caddr; - chunk__6 c = NIL; - INT64 baddr; - block__4 b = NIL; - adrptr__3 tag = NIL; - caddr = Heap_heap; - while (caddr != 0) { - Out_String((CHAR*)"Chunk at: ", 11); - Out_Hex(caddr, 1); - Out_Ln(); - c = (chunk__6)(ADDRESS)caddr; - Out_String((CHAR*)" next: ", 11); - Out_Hex(c->next, 1); - Out_Ln(); - Out_String((CHAR*)" end: ", 11); - Out_Hex(c->end, 1); - Out_String((CHAR*)" => size: ", 11); - Out_Hex(c->end - caddr, 1); - Out_Ln(); - Out_String((CHAR*)" rsvd: ", 11); - Out_Hex(c->reserved, 1); - Out_Ln(); - baddr = (ADDRESS)&c->firstblock; - while (c->end - baddr > 0) { - Out_String((CHAR*)" Block at: ", 15); - Out_Hex(baddr, 1); - Out_Ln(); - b = (block__4)(ADDRESS)baddr; - tag = (adrptr__3)(ADDRESS)(b->tag - __MASK(b->tag, -2)); - Out_String((CHAR*)" tag: ", 15); - Out_Hex(b->tag, 1); - if (__MASK(b->tag, -2) != 0) { - Out_String((CHAR*)" <--- ODD! ---", 15); - } - Out_Ln(); - Out_String((CHAR*)" tag^: ", 15); - Out_Hex((*tag)[0], 1); - Out_Ln(); - Out_String((CHAR*)" size: ", 15); - Out_Hex(b->size, 1); - Out_Ln(); - Out_String((CHAR*)" sentinel: ", 15); - Out_Hex(b->sentinel, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 15); - Out_Hex(b->next, 1); - Out_Ln(); - if (b->tag != (ADDRESS)&b->size) { - Out_DumpTag(b->tag); - } - baddr += (*tag)[0]; - Out_Ln(); - } - caddr = c->next; - Out_Ln(); - } -} - static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; @@ -566,9 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n) Out_RealP(x, n, 1); } -__TDESC(typedesc__11, 1, 0) = {__TDFLDS("typedesc__11", 208), {-8}}; -__TDESC(blockdesc__5, 1, 0) = {__TDFLDS("blockdesc__5", 32), {-8}}; -__TDESC(chunkdesc__7, 1, 0) = {__TDFLDS("chunkdesc__7", 56), {-8}}; export void *Out__init(void) { @@ -576,13 +335,9 @@ export void *Out__init(void) __MODULE_IMPORT(Heap); __MODULE_IMPORT(Platform); __REGMOD("Out", 0); - __REGCMD("DumpHeap", Out_DumpHeap); __REGCMD("Flush", Out_Flush); __REGCMD("Ln", Out_Ln); __REGCMD("Open", Out_Open); - __INITYP(typedesc__11, typedesc__11, 0); - __INITYP(blockdesc__5, blockdesc__5, 0); - __INITYP(chunkdesc__7, chunkdesc__7, 0); /* BEGIN */ Out_IsConsole = Platform_IsConsole(Platform_StdOut); Out_in = 0; diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index fe405da3..e1285046 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h @@ -10,13 +10,8 @@ import BOOLEAN Out_IsConsole; import void Out_Char (CHAR ch); -import void Out_DumpHeap (void); -import void Out_DumpTag (INT64 addr); -import void Out_DumpType (SYSTEM_BYTE *o, ADDRESS o__len); import void Out_Flush (void); import void Out_Hex (INT64 x, INT64 n); -import void Out_HexDump (SYSTEM_BYTE *m, ADDRESS m__len); -import void Out_HexDumpAdr (INT64 adr, INT64 offset, INT32 length); import void Out_Int (INT64 x, INT64 n); import void Out_Ln (void); import void Out_LongReal (LONGREAL x, INT16 n); diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 127901b0..1304f291 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 0b6a96a2..99405d0b 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 9b449f98..d1eb72f6 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 3e83af42..170d1785 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index f9b5310a..225bd40a 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 58f9b546..4d98f1a3 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 429d0665..565de43f 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -192,11 +192,6 @@ export void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); export void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); export void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); export void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -static void Texts_DumpElem (Texts_Elem e); -static void Texts_DumpPiece (Texts_Piece p); -export void Texts_DumpReader (Texts_Reader re); -static void Texts_DumpRun (Texts_Run ru); -static void Texts_DumpText (Texts_Text t); export Texts_Text Texts_ElemBase (Texts_Elem E); export INT32 Texts_ElemPos (Texts_Elem E); static void Texts_Find (Texts_Text T, INT32 *pos, Texts_Run *u, INT32 *org, INT32 *off); @@ -238,161 +233,6 @@ export void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x); export void Texts_WriteString (Texts_Writer *W, ADDRESS *W__typ, CHAR *s, ADDRESS s__len); -static void Texts_DumpText (Texts_Text t) -{ - Out_String((CHAR*)" len: ", 15); - Out_Int(t->len, 1); - Out_Ln(); - Out_String((CHAR*)" notify: ", 15); - Out_Hex((INT64)(ADDRESS)t->notify, 1); - Out_Ln(); - Out_String((CHAR*)" head: ", 15); - Out_Hex((INT64)(ADDRESS)t->head, 1); - Out_Ln(); - Out_String((CHAR*)" cache: ", 15); - Out_Hex((INT64)(ADDRESS)t->cache, 1); - Out_Ln(); - Out_String((CHAR*)" corg: ", 15); - Out_Int(t->corg, 1); - Out_Ln(); -} - -static void Texts_DumpRun (Texts_Run ru) -{ - Out_String((CHAR*)" Run at ", 12); - Out_Hex((INT64)(ADDRESS)ru, 1); - Out_Ln(); - Out_String((CHAR*)" prev: ", 12); - Out_Hex((INT64)(ADDRESS)ru->prev, 1); - Out_Ln(); - Out_String((CHAR*)" next: ", 12); - Out_Hex((INT64)(ADDRESS)ru->next, 1); - Out_Ln(); - Out_String((CHAR*)" len: ", 12); - Out_Int(ru->len, 1); - Out_Ln(); - Out_String((CHAR*)" fnt: ", 12); - if (ru->fnt != NIL) { - Out_String(ru->fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 12); - Out_Int(ru->col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 12); - Out_Int(ru->voff, 1); - Out_Ln(); - Out_String((CHAR*)" ascii: ", 12); - if (ru->ascii) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); -} - -static void Texts_DumpElem (Texts_Elem e) -{ - Texts_DumpRun((void*)e); - Out_String((CHAR*)" -- Elem --", 15); - Out_Ln(); - Out_String((CHAR*)" W: ", 13); - Out_Int(e->W, 1); - Out_Ln(); - Out_String((CHAR*)" H: ", 13); - Out_Int(e->H, 1); - Out_Ln(); - Out_String((CHAR*)" handle: ", 13); - Out_Hex((INT64)(ADDRESS)e->handle, 1); - Out_Ln(); - Out_String((CHAR*)" base: ", 13); - if (e->base == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpText(e->base); - } -} - -static void Texts_DumpPiece (Texts_Piece p) -{ - Texts_DumpRun((void*)p); - Out_String((CHAR*)" -- Piece --", 16); - Out_Ln(); - Out_String((CHAR*)" file: ", 12); - if (p->file == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Files_DumpFile(p->file, 3); - } - Out_String((CHAR*)" org: ", 12); - Out_Int(p->org, 1); - Out_Ln(); -} - -void Texts_DumpReader (Texts_Reader re) -{ - Out_String((CHAR*)"Reader:", 8); - Out_Ln(); - Out_String((CHAR*)" eot: ", 10); - if (re.eot) { - Out_String((CHAR*)"TRUE", 5); - } else { - Out_String((CHAR*)"FALSE", 6); - } - Out_Ln(); - Out_String((CHAR*)" fnt: ", 10); - if (re.fnt != NIL) { - Out_String(re.fnt->name, 32); - } else { - Out_String((CHAR*)"", 6); - } - Out_Ln(); - Out_String((CHAR*)" col: ", 10); - Out_Int(re.col, 1); - Out_Ln(); - Out_String((CHAR*)" voff: ", 10); - Out_Int(re.voff, 1); - Out_Ln(); - Out_String((CHAR*)" org: ", 10); - Out_Int(re.org, 1); - Out_Ln(); - Out_String((CHAR*)" off: ", 10); - Out_Int(re.off, 1); - Out_Ln(); - Out_String((CHAR*)" elem: ", 10); - if (re.elem == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - Texts_DumpElem(re.elem); - } - Out_String((CHAR*)" rider: ", 10); - Out_Ln(); - Files_DumpRider(re.rider, 2); - Out_String((CHAR*)" run: ", 10); - if (re.run == NIL) { - Out_String((CHAR*)"", 6); - Out_Ln(); - } else { - Out_Ln(); - if (__ISP(re.run, Texts_PieceDesc, 1)) { - Texts_DumpPiece(__GUARDP(re.run, Texts_PieceDesc, 1)); - } else if (__ISP(re.run, Texts_ElemDesc, 1)) { - Texts_DumpElem(__GUARDP(re.run, Texts_ElemDesc, 1)); - } else { - Texts_DumpRun(re.run); - } - } - Out_DumpType((void*)&*re.run, 40); -} - static Texts_FontsFont Texts_FontsThis (CHAR *name, ADDRESS name__len) { Texts_FontsFont F = NIL; @@ -877,32 +717,32 @@ void Texts_OpenScanner (Texts_Scanner *S, ADDRESS *S__typ, Texts_Text T, INT32 p (*S).nextCh = ' '; } -static struct Scan__36 { +static struct Scan__31 { Texts_Scanner *S; ADDRESS *S__typ; CHAR *ch; BOOLEAN *negE; INT16 *e; - struct Scan__36 *lnk; -} *Scan__36_s; + struct Scan__31 *lnk; +} *Scan__31_s; -static void ReadScaleFactor__37 (void); +static void ReadScaleFactor__32 (void); -static void ReadScaleFactor__37 (void) +static void ReadScaleFactor__32 (void) { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); - if (*Scan__36_s->ch == '-') { - *Scan__36_s->negE = 1; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); + if (*Scan__31_s->ch == '-') { + *Scan__31_s->negE = 1; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } else { - *Scan__36_s->negE = 0; - if (*Scan__36_s->ch == '+') { - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + *Scan__31_s->negE = 0; + if (*Scan__31_s->ch == '+') { + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } - while (('0' <= *Scan__36_s->ch && *Scan__36_s->ch <= '9')) { - *Scan__36_s->e = (*Scan__36_s->e * 10 + (INT16)*Scan__36_s->ch) - 48; - Texts_Read((void*)&*Scan__36_s->S, Scan__36_s->S__typ, &*Scan__36_s->ch); + while (('0' <= *Scan__31_s->ch && *Scan__31_s->ch <= '9')) { + *Scan__31_s->e = (*Scan__31_s->e * 10 + (INT16)*Scan__31_s->ch) - 48; + Texts_Read((void*)&*Scan__31_s->S, Scan__31_s->S__typ, &*Scan__31_s->ch); } } @@ -916,13 +756,13 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) REAL x, f; LONGREAL y, g; CHAR d[32]; - struct Scan__36 _s; + struct Scan__31 _s; _s.S = S; _s.S__typ = S__typ; _s.ch = &ch; _s.negE = &negE; _s.e = &e; - _s.lnk = Scan__36_s; - Scan__36_s = &_s; + _s.lnk = Scan__31_s; + Scan__31_s = &_s; ch = (*S).nextCh; i = 0; for (;;) { @@ -1023,7 +863,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) y = ((INT16)d[__X(j, 32)] - 48) * g + y; j += 1; } - ReadScaleFactor__37(); + ReadScaleFactor__32(); if (negE) { if (e <= 308) { y = y / (LONGREAL)Reals_TenL(e); @@ -1056,7 +896,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) j += 1; } if (ch == 'E') { - ReadScaleFactor__37(); + ReadScaleFactor__32(); } if (negE) { if (e <= 38) { @@ -1109,7 +949,7 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) } } (*S).nextCh = ch; - Scan__36_s = _s.lnk; + Scan__31_s = _s.lnk; } void Texts_OpenWriter (Texts_Writer *W, ADDRESS *W__typ) @@ -1328,30 +1168,30 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } } -static struct WriteRealFix__58 { +static struct WriteRealFix__53 { Texts_Writer *W; ADDRESS *W__typ; INT16 *i; CHAR (*d)[9]; - struct WriteRealFix__58 *lnk; -} *WriteRealFix__58_s; + struct WriteRealFix__53 *lnk; +} *WriteRealFix__53_s; -static void dig__59 (INT16 n); -static void seq__61 (CHAR ch, INT16 n); +static void dig__54 (INT16 n); +static void seq__56 (CHAR ch, INT16 n); -static void seq__61 (CHAR ch, INT16 n) +static void seq__56 (CHAR ch, INT16 n) { while (n > 0) { - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, ch); + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, ch); n -= 1; } } -static void dig__59 (INT16 n) +static void dig__54 (INT16 n) { while (n > 0) { - *WriteRealFix__58_s->i -= 1; - Texts_Write(&*WriteRealFix__58_s->W, WriteRealFix__58_s->W__typ, (*WriteRealFix__58_s->d)[__X(*WriteRealFix__58_s->i, 9)]); + *WriteRealFix__53_s->i -= 1; + Texts_Write(&*WriteRealFix__53_s->W, WriteRealFix__53_s->W__typ, (*WriteRealFix__53_s->d)[__X(*WriteRealFix__53_s->i, 9)]); n -= 1; } } @@ -1362,23 +1202,23 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 CHAR sign; REAL x0; CHAR d[9]; - struct WriteRealFix__58 _s; + struct WriteRealFix__53 _s; _s.W = W; _s.W__typ = W__typ; _s.i = &i; _s.d = (void*)d; - _s.lnk = WriteRealFix__58_s; - WriteRealFix__58_s = &_s; + _s.lnk = WriteRealFix__53_s; + WriteRealFix__53_s = &_s; e = Reals_Expo(x); if (k < 0) { k = 0; } if (e == 0) { - seq__61(' ', (n - k) - 2); + seq__56(' ', (n - k) - 2); Texts_Write(&*W, W__typ, '0'); - seq__61(' ', k + 1); + seq__56(' ', k + 1); } else if (e == 255) { Texts_WriteString(&*W, W__typ, (CHAR*)" NaN", 5); - seq__61(' ', n - 4); + seq__56(' ', n - 4); } else { e = __ASHR((e - 127) * 77, 8); if (x < (REAL)0) { @@ -1411,21 +1251,21 @@ void Texts_WriteRealFix (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n, INT1 i = k + e; Reals_Convert(x, i, (void*)d, 9); if (e > 0) { - seq__61(' ', ((n - e) - k) - 2); + seq__56(' ', ((n - e) - k) - 2); Texts_Write(&*W, W__typ, sign); - dig__59(e); + dig__54(e); Texts_Write(&*W, W__typ, '.'); - dig__59(k); + dig__54(k); } else { - seq__61(' ', (n - k) - 3); + seq__56(' ', (n - k) - 3); Texts_Write(&*W, W__typ, sign); Texts_Write(&*W, W__typ, '0'); Texts_Write(&*W, W__typ, '.'); - seq__61('0', -e); - dig__59(k + e); + seq__56('0', -e); + dig__54(k + e); } } - WriteRealFix__58_s = _s.lnk; + WriteRealFix__53_s = _s.lnk; } void Texts_WriteRealHex (Texts_Writer *W, ADDRESS *W__typ, REAL x) @@ -1524,48 +1364,48 @@ void Texts_WriteLongRealHex (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x) } while (!(i == 16)); } -static struct WriteDate__48 { +static struct WriteDate__43 { Texts_Writer *W; ADDRESS *W__typ; - struct WriteDate__48 *lnk; -} *WriteDate__48_s; + struct WriteDate__43 *lnk; +} *WriteDate__43_s; -static void WritePair__49 (CHAR ch, INT32 x); +static void WritePair__44 (CHAR ch, INT32 x); -static void WritePair__49 (CHAR ch, INT32 x) +static void WritePair__44 (CHAR ch, INT32 x) { - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, ch); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__48_s->W, WriteDate__48_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) { - struct WriteDate__48 _s; + struct WriteDate__43 _s; _s.W = W; _s.W__typ = W__typ; - _s.lnk = WriteDate__48_s; - WriteDate__48_s = &_s; - WritePair__49(' ', __MASK(d, -32)); - WritePair__49('.', __MASK(__ASHR(d, 5), -16)); - WritePair__49('.', __MASK(__ASHR(d, 9), -128)); - WritePair__49(' ', __MASK(__ASHR(t, 12), -32)); - WritePair__49(':', __MASK(__ASHR(t, 6), -64)); - WritePair__49(':', __MASK(t, -64)); - WriteDate__48_s = _s.lnk; + _s.lnk = WriteDate__43_s; + WriteDate__43_s = &_s; + WritePair__44(' ', __MASK(d, -32)); + WritePair__44('.', __MASK(__ASHR(d, 5), -16)); + WritePair__44('.', __MASK(__ASHR(d, 9), -128)); + WritePair__44(' ', __MASK(__ASHR(t, 12), -32)); + WritePair__44(':', __MASK(__ASHR(t, 6), -64)); + WritePair__44(':', __MASK(t, -64)); + WriteDate__43_s = _s.lnk; } -static struct Load0__21 { +static struct Load0__16 { Texts_Text *T; INT8 *ecnt; Files_File *f; Texts_FileMsg *msg; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Load0__21 *lnk; -} *Load0__21_s; + struct Load0__16 *lnk; +} *Load0__16_s; -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e); -static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) +static void LoadElem__17 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span, Texts_Elem *e) { Heap_Module M = NIL; Heap_Command Cmd; @@ -1576,15 +1416,15 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span Files_ReadLInt(&*r, r__typ, &ew); Files_ReadLInt(&*r, r__typ, &eh); Files_Read(&*r, r__typ, (void*)&eno); - if (eno > *Load0__21_s->ecnt) { - *Load0__21_s->ecnt = eno; - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->mods)[__X(eno, 64)], 32); - Files_ReadString(&*r, r__typ, (void*)(*Load0__21_s->procs)[__X(eno, 64)], 32); + if (eno > *Load0__16_s->ecnt) { + *Load0__16_s->ecnt = eno; + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->mods)[__X(eno, 64)], 32); + Files_ReadString(&*r, r__typ, (void*)(*Load0__16_s->procs)[__X(eno, 64)], 32); } org = Files_Pos(&*r, r__typ); - M = Modules_ThisMod((*Load0__21_s->mods)[__X(eno, 64)], 32); + M = Modules_ThisMod((*Load0__16_s->mods)[__X(eno, 64)], 32); if (M != NIL) { - Cmd = Modules_ThisCommand(M, (*Load0__21_s->procs)[__X(eno, 64)], 32); + Cmd = Modules_ThisCommand(M, (*Load0__16_s->procs)[__X(eno, 64)], 32); if (Cmd != NIL) { (*Cmd)(); } @@ -1593,25 +1433,25 @@ static void LoadElem__22 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, INT32 span if (*e != NIL) { (*e)->W = ew; (*e)->H = eh; - (*e)->base = *Load0__21_s->T; - (*Load0__21_s->msg).pos = pos; - (*(*e)->handle)(*e, (void*)&*Load0__21_s->msg, Texts_FileMsg__typ); + (*e)->base = *Load0__16_s->T; + (*Load0__16_s->msg).pos = pos; + (*(*e)->handle)(*e, (void*)&*Load0__16_s->msg, Texts_FileMsg__typ); if (Files_Pos(&*r, r__typ) != org + span) { *e = NIL; } } if (*e == NIL) { - Files_Set(&*r, r__typ, *Load0__21_s->f, org + span); + Files_Set(&*r, r__typ, *Load0__16_s->f, org + span); __NEW(a, Texts__1); a->W = ew; a->H = eh; a->handle = Texts_HandleAlien; - a->base = *Load0__21_s->T; - a->file = *Load0__21_s->f; + a->base = *Load0__16_s->T; + a->file = *Load0__16_s->f; a->org = org; a->span = span; - __COPY((*Load0__21_s->mods)[__X(eno, 64)], a->mod, 32); - __COPY((*Load0__21_s->procs)[__X(eno, 64)], a->proc, 32); + __COPY((*Load0__16_s->mods)[__X(eno, 64)], a->mod, 32); + __COPY((*Load0__16_s->procs)[__X(eno, 64)], a->proc, 32); *e = (Texts_Elem)a; } } @@ -1628,15 +1468,15 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; CHAR name[32]; Texts_FontsFont fnts[32]; - struct Load0__21 _s; + struct Load0__16 _s; _s.T = &T; _s.ecnt = &ecnt; _s.f = &f; _s.msg = &msg; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Load0__21_s; - Load0__21_s = &_s; + _s.lnk = Load0__16_s; + Load0__16_s = &_s; pos = Files_Pos(&*r, r__typ); f = Files_Base(&*r, r__typ); __NEW(u, Texts_RunDesc); @@ -1669,7 +1509,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) un = (Texts_Run)p; un->len = plen; } else { - LoadElem__22(&msg.r, Files_Rider__typ, pos - org, -plen, &e); + LoadElem__17(&msg.r, Files_Rider__typ, pos - org, -plen, &e); un = (Texts_Run)e; un->len = 1; } @@ -1687,7 +1527,7 @@ static void Texts_Load0 (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) T->corg = 0; Files_ReadLInt(&msg.r, Files_Rider__typ, &T->len); Files_Set(&*r, r__typ, f, Files_Pos(&msg.r, Files_Rider__typ) + T->len); - Load0__21_s = _s.lnk; + Load0__16_s = _s.lnk; } void Texts_Load (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) @@ -1756,25 +1596,25 @@ void Texts_Open (Texts_Text T, CHAR *name, ADDRESS name__len) __DEL(name); } -static struct Store__44 { +static struct Store__39 { INT8 *ecnt; Texts_FileMsg *msg; Texts_IdentifyMsg *iden; CHAR (*mods)[64][32], (*procs)[64][32]; - struct Store__44 *lnk; -} *Store__44_s; + struct Store__39 *lnk; +} *Store__39_s; -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e); -static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) +static void StoreElem__40 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Elem e) { Files_Rider r1; INT32 org, span; INT8 eno; - __COPY((*Store__44_s->iden).mod, (*Store__44_s->mods)[__X(*Store__44_s->ecnt, 64)], 32); - __COPY((*Store__44_s->iden).proc, (*Store__44_s->procs)[__X(*Store__44_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).mod, (*Store__39_s->mods)[__X(*Store__39_s->ecnt, 64)], 32); + __COPY((*Store__39_s->iden).proc, (*Store__39_s->procs)[__X(*Store__39_s->ecnt, 64)], 32); eno = 1; - while (__STRCMP((*Store__44_s->mods)[__X(eno, 64)], (*Store__44_s->iden).mod) != 0 || __STRCMP((*Store__44_s->procs)[__X(eno, 64)], (*Store__44_s->iden).proc) != 0) { + while (__STRCMP((*Store__39_s->mods)[__X(eno, 64)], (*Store__39_s->iden).mod) != 0 || __STRCMP((*Store__39_s->procs)[__X(eno, 64)], (*Store__39_s->iden).proc) != 0) { eno += 1; } Files_Set(&r1, Files_Rider__typ, Files_Base(&*r, r__typ), Files_Pos(&*r, r__typ)); @@ -1782,14 +1622,14 @@ static void StoreElem__45 (Files_Rider *r, ADDRESS *r__typ, INT32 pos, Texts_Ele Files_WriteLInt(&*r, r__typ, 0); Files_WriteLInt(&*r, r__typ, 0); Files_Write(&*r, r__typ, eno); - if (eno == *Store__44_s->ecnt) { - *Store__44_s->ecnt += 1; - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).mod, 32); - Files_WriteString(&*r, r__typ, (*Store__44_s->iden).proc, 32); + if (eno == *Store__39_s->ecnt) { + *Store__39_s->ecnt += 1; + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).mod, 32); + Files_WriteString(&*r, r__typ, (*Store__39_s->iden).proc, 32); } - (*Store__44_s->msg).pos = pos; + (*Store__39_s->msg).pos = pos; org = Files_Pos(&*r, r__typ); - (*e->handle)(e, (void*)&*Store__44_s->msg, Texts_FileMsg__typ); + (*e->handle)(e, (void*)&*Store__39_s->msg, Texts_FileMsg__typ); span = Files_Pos(&*r, r__typ) - org; Files_WriteLInt(&r1, Files_Rider__typ, -span); Files_WriteLInt(&r1, Files_Rider__typ, e->W); @@ -1810,14 +1650,14 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) CHAR mods[64][32], procs[64][32]; Texts_FontsFont fnts[32]; CHAR block[1024]; - struct Store__44 _s; + struct Store__39 _s; _s.ecnt = &ecnt; _s.msg = &msg; _s.iden = &iden; _s.mods = (void*)mods; _s.procs = (void*)procs; - _s.lnk = Store__44_s; - Store__44_s = &_s; + _s.lnk = Store__39_s; + Store__39_s = &_s; org = Files_Pos(&*r, r__typ); msg.id = 1; msg.r = *r; @@ -1859,7 +1699,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) pos += rlen; u = un; } else if (iden.mod[0] != 0x00) { - StoreElem__45(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); + StoreElem__40(&msg.r, Files_Rider__typ, pos, __GUARDP(u, Texts_ElemDesc, 1)); pos += 1; u = u->next; } else { @@ -1913,7 +1753,7 @@ void Texts_Store (Files_Rider *r, ADDRESS *r__typ, Texts_Text T) if (T->notify != NIL) { (*T->notify)(T, 3, 0, 0); } - Store__44_s = _s.lnk; + Store__39_s = _s.lnk; } void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index ac6542ff..bdd9fada 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h @@ -135,7 +135,6 @@ import void Texts_Close (Texts_Text T, CHAR *name, ADDRESS name__len); import void Texts_Copy (Texts_Buffer SB, Texts_Buffer DB); import void Texts_CopyElem (Texts_Elem SE, Texts_Elem DE); import void Texts_Delete (Texts_Text T, INT32 beg, INT32 end); -import void Texts_DumpReader (Texts_Reader re); import Texts_Text Texts_ElemBase (Texts_Elem E); import INT32 Texts_ElemPos (Texts_Elem E); import void Texts_Insert (Texts_Text T, INT32 pos, Texts_Buffer B); diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 80457921..9cd5cf4d 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 1a589c43..8f60c652 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 46b1acc2..fa840303 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,7 +82,7 @@ void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble: ", 11, cmd, 1023); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); __DEL(moduleName); } @@ -106,7 +106,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); Strings_Append(OPM_Model, 10, (void*)cmd, 1023); Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"Assemble and link: ", 20, cmd, 1023); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); __DEL(additionalopts); } diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 4201df04..a93b6c85 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/19]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 305781e000703ae82ea66f17bba6c0781afbf6fc Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 20 Dec 2016 17:27:47 +0000 Subject: [PATCH 107/241] Version 2.1.0 - update version and add history. --- ReadMe.md | 5 +++++ doc/History.md | 29 +++++++++++++++++++++++++---- src/tools/make/configure.c | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 32e200b0..3e2120a5 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -298,3 +298,8 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015 - [Joseph Templ's ofront on github](https://hithub.com/jtempl/ofront) - [Software Templ OG](http://www.software-templ.com) - [Oberon: Steps beyond Pascal and Modula](http://fruttenboel.verhoeven272.nl/Oberon/) + + +## History + +See [**History**](/doc/History.md). \ No newline at end of file diff --git a/doc/History.md b/doc/History.md index 6ff44199..26d20bdf 100644 --- a/doc/History.md +++ b/doc/History.md @@ -1,9 +1,30 @@ -#### (Work in progress) - - - ### History +#### Changes from 2.0 to 2.1.0 + + - Features + - Modules of a multi-module program may now be compiled independently - it is + no longer necessary to compile all modules on a single compiler command line. + - The file system location of standard libraries is now determined relative to + where the compiler binary loads from, rather than a fixed location built + into the compiler at install time. + - ```make full``` no longer installs the compiler, and can be run without + root/administrator priviledges. Optionally use ```make install``` to install. + - New warning message to advise of redefinition of standard predefined types. + - Supports revised Oberon array assignment. As well as supporting assignments + between arrays of identical type and size, also supports assignment of arrays + of identical type where the target is larger than the source. + - Fixes: + - Files.Mod provide Oberon system compatible behaviour when deleting an open file. + - The open file will be renamed to a temporary file, remaining accessible and + can be (re)registered. If not registered the temporary file will be deleted + at exit. + - Support allocated memory straddling and above 7FFFFFFFH. + - Flush output on assertion failure. + - Fix 2 or more dimension open array parameter addressing. + - Remove invalid large integer literal warnings on OpenBSD. + - Fix incorrect type generation when a record variable of type LONGINT immediately + follows a record variable of type SYSTEM.ADDRESS. #### Changes from 1.2 to 2.0 diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 4fde13a3..458bddec 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -8,7 +8,7 @@ // Derived from vocparam.c originally by J. Templ 23.6.95 -#define O_VER 2.00 // Version number to be reported by compiler. +#define O_VER 2.1.0 // Version number to be reported by compiler. #define O_NAME voc // Compiler name used for binary, install dir and references in text. From 3ba0d7ae2c22e7c38395fbd585dd29826845c080 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 21 Dec 2016 13:01:14 +0000 Subject: [PATCH 108/241] Update Visual C make.cmd, use separate compilation for LOLA conf test. --- make.cmd | 192 +++++++++++++++++-------------- src/compiler/extTools.Mod | 33 ++++-- src/test/confidence/lola/test.sh | 6 +- src/test/confidence/testenv.sh | 7 +- src/tools/make/configure.c | 1 + 5 files changed, 135 insertions(+), 104 deletions(-) diff --git a/make.cmd b/make.cmd index 6eb498e5..7a42fe50 100644 --- a/make.cmd +++ b/make.cmd @@ -1,26 +1,30 @@ @echo off -:: mscmake.cmd - Build Oberon with Microsoft C compiler. +:: make.cmd - Build Oberon with Microsoft C compiler. :: Expects the path to include cl.exe. -:: As of 10th Feb 2016 the miscrosoft c compiler and build tools +:: As of December 2016 the Microsoft C compiler and build tools :: can be downloaded independently of the full Visual Studio IDE :: as the 'Visual C++ Build Tools 2015'. -:: See: https://blogs.msdn.microsoft.com/vcblog/2015/11/02/announcing-visual-c-build-tools-2015-standalone-c-tools-for-build-environments/ +:: See: http://landinghub.visualstudio.com/visual-cpp-build-tools :: With this installed, from the start button select: -:: All Apps / Visual C++ Build Tools / Visual C++ x86 Native Build Tools Command Prompt +:: All Apps / Visual C++ Build Tools / Visual C++ 2015 x86 Native Build Tools Command Prompt +:: or All Apps / Visual C++ Build Tools / Visual C++ 2015 x64 Native Build Tools Command Prompt + + :: Create configuration and parameter files. -cl -nologo -Isrc\runtime src\tools\make\configure.c >nul +cl -nologo -Isrc\runtime src\tools\make\configure.c >msc-listing || type msc-listing setlocal configure.exe >nul del configure.obj configure.exe 2>nul + :: Extract make variables into local environment for /F "delims='=' tokens=1,2" %%a in (Configuration.make) do set %%a=%%b @@ -33,7 +37,6 @@ set MODEL=2 for /F %%d in ('cd');do set ROOTDIR=%%d - :: Process target parameter if "%1" equ "" ( @@ -51,30 +54,86 @@ goto :eof @echo. @echo Usage: @echo. -@echo. make full - Make and install compiler (from administrator prompt) +@echo. make full - Make compiler to 'install' subdirectory +@echo. make install - Install 'install' subdir to OS. Requires administrator privileges @echo. -@echo. make clean - Remove made files -@echo. make compiler - Build the compiler but not the library -@echo. make library - Build all library files and make library -@echo. make install - Install built compiler and library (from administrator prompt) +@echo. make clean - Remove made files +@echo. make compiler - Build the compiler but not the library +@echo. make library - Build all library files and make library +@echo. make install - Install built compiler and library (from administrator prompt) goto :eof :full +call :clean || exit /b +call :compiler || exit /b +call :browsercmd || exit /b +call :library || exit /b +call :makeinstalldir || exit /b +goto :eof + + + + +:makeinstalldir +rmdir /s /q "%ROOTDIR%\install" >nul 2>&1 +mkdir "%ROOTDIR%\install" >nul 2>&1 + +mkdir "%ROOTDIR%\install\bin" >nul 2>&1 +copy %OBECOMP% "%ROOTDIR%\install\bin" >nul +copy %BUILDDIR%\showdef.exe "%ROOTDIR%\install\bin" >nul + +mkdir "%ROOTDIR%\install\2" >nul 2>&1 +mkdir "%ROOTDIR%\install\2\include" >nul 2>&1 +mkdir "%ROOTDIR%\install\2\sym" >nul 2>&1 +copy %BUILDDIR%\2\*.h "%ROOTDIR%\install\2\include" >nul +copy %BUILDDIR%\2\*.sym "%ROOTDIR%\install\2\sym" >nul + +mkdir "%ROOTDIR%\install\C" >nul 2>&1 +mkdir "%ROOTDIR%\install\C\include" >nul 2>&1 +mkdir "%ROOTDIR%\install\C\sym" >nul 2>&1 +copy %BUILDDIR%\C\*.h "%ROOTDIR%\install\C\include" >nul +copy %BUILDDIR%\C\*.sym "%ROOTDIR%\install\C\sym" >nul + +mkdir "%ROOTDIR%\install\lib" >nul 2>&1 +copy %BUILDDIR%\2\lib%ONAME%* "%ROOTDIR%\install\lib" >nul +copy %BUILDDIR%\C\lib%ONAME%* "%ROOTDIR%\install\lib" >nul + +echo. +echo Now add %ROOTDIR%\install\bin to your path, for example with the command: +echo PATH %ROOTDIR%\install\bin;%%PATH%% +echo. +goto :eof + + + +:install whoami /groups | find "12288" >nul if errorlevel 1 ( -echo make full - administrator rights required. Please run under an administrator command prompt. +echo make install - administrator rights required. Please run under an administrator command prompt. goto :eof ) -call :uninstall || exit /b -call :clean || exit /b -call :compiler || exit /b -call :browsercmd || exit /b -call :library || exit /b -call :install || exit /b -call :showpath || exit /b +echo Installing to %INSTALLDIR% +rmdir /s /q "%INSTALLDIR%" >nul 2>&1 +xcopy /E /I /Y "%ROOTDIR%\install" "%INSTALLDIR%" >nul +echo. +echo Now add %INSTALLDIR%\bin to your path, for example with the command: +echo PATH %INSTALLDIR%\bin;%%PATH%% +echo. +goto :eof + + + +:uninstall +whoami /groups | find "12288" >nul +if errorlevel 1 ( +echo make uninstall - administrator rights required. Please run under an administrator command prompt. +goto :eof +) +echo Uninstalling %INSTALLDIR% +rmdir /s /q "%INSTALLDIR%" >nul 2>&1 goto :eof @@ -101,37 +160,38 @@ echo. echo.make assemble - compiling Oberon compiler c source:: echo. VERSION: %VERSION% echo. Target characeristics: -echo. PLATFORM: %PLATFORM% -echo. OS: %OS% -echo. BUILDDIR: %BUILDDIR% +echo. PLATFORM: %PLATFORM% +echo. OS: %OS% +echo. BUILDDIR: %BUILDDIR% +echo. INSTALLDIR: %INSTALLDIR% echo. Oberon characteristics: -echo. MODEL: %MODEL% -echo. ADRSIZE: %ADRSIZE% -echo. ALIGNMENT: %ALIGNMENT% +echo. MODEL: %MODEL% +echo. ADRSIZE: %ADRSIZE% +echo. ALIGNMENT: %ALIGNMENT% echo. C compiler: -echo. COMPILER: %COMPILER% -echo. COMPILE: %COMPILE% -echo. DATAMODEL: %DATAMODEL% +echo. COMPILER: %COMPILER% +echo. COMPILE: %COMPILE% +echo. DATAMODEL: %DATAMODEL% cd %BUILDDIR% cl -nologo /Zi -c SYSTEM.c Configuration.c Platform.c Heap.c || exit /b cl -nologo /Zi -c Out.c Strings.c Modules.c Files.c || exit /b -cl -nologo /Zi -c Reals.c Texts.c vt100.c errors.c || exit /b +cl -nologo /Zi -c Reals.c Texts.c VT100.c || exit /b cl -nologo /Zi -c OPM.c extTools.c OPS.c OPT.c || exit /b cl -nologo /Zi -c OPC.c OPV.c OPB.c OPP.c || exit /b cl -nologo /Zi Compiler.c /Fe%ROOTDIR%\%OBECOMP% /link /INCREMENTAL:NO ^ -SYSTEM.obj Configuration.obj Platform.obj Heap.obj ^ -Out.obj Strings.obj Modules.obj Files.obj ^ -Reals.obj Texts.obj VT100.obj errors.obj ^ -OPM.obj extTools.obj OPS.obj OPT.obj ^ -OPC.obj OPV.obj OPB.obj OPP.obj || exit /b +SYSTEM.obj Configuration.obj Platform.obj Heap.obj Out.obj Strings.obj ^ +Modules.obj Files.obj Reals.obj Texts.obj VT100.obj extTools.obj ^ +OPM.obj OPS.obj OPT.obj OPC.obj OPV.obj OPB.obj OPP.obj || exit /b +cd %ROOTDIR% copy src\runtime\*.c %BUILDDIR% >nul copy src\runtime\*.h %BUILDDIR% >nul +copy src\runtime\*.Txt %BUILDDIR% >nul +copy src\runtime\*.Txt %ROOTDIR% >nul echo.%OBECOMP% created. -cd %ROOTDIR% goto :eof @@ -176,7 +236,6 @@ del *.sym >nul 2>nul %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Reals.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Texts.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/VT100.Mod || exit /b -%ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/errors.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/OPM.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/extTools.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfFx -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/OPS.Mod || exit /b @@ -186,7 +245,12 @@ del *.sym >nul 2>nul %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/OPB.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/OPP.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ssfm -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/Compiler.Mod || exit /b + cd %ROOTDIR% +copy src\runtime\*.c %BUILDDIR% >nul +copy src\runtime\*.h %BUILDDIR% >nul +copy src\runtime\*.Txt %BUILDDIR% >nul + echo.%BUILDDIR% filled with compiler C source. goto :eof @@ -197,10 +261,11 @@ goto :eof echo. echo.Making symbol browser cd %BUILDDIR% +%ROOTDIR%/%OBECOMP% -fSs ../../src/runtime/Oberon.Mod %ROOTDIR%/%OBECOMP% -fSm ../../src/tools/browser/BrowserCmd.Mod -cl -nologo BrowserCmd.c /Feshowdef.exe ^ +cl -nologo BrowserCmd.c Oberon.c /Feshowdef.exe ^ Platform.obj Texts.obj OPT.obj Heap.obj Out.obj SYSTEM.obj OPM.obj OPS.obj OPV.obj ^ - Files.obj Reals.obj Modules.obj VT100.obj errors.obj Configuration.obj Strings.obj ^ + Files.obj Reals.obj Modules.obj VT100.obj Configuration.obj Strings.obj ^ OPC.obj cd %ROOTDIR% goto :eof @@ -208,55 +273,6 @@ goto :eof -:install -whoami /groups | find "12288" >nul -if errorlevel 1 ( -echo make install - administrator rights required. Please run under an administrator command prompt. -goto :eof -) -rmdir /s /q "%INSTALLDIR%" >nul 2>&1 -mkdir "%INSTALLDIR%" >nul 2>&1 - -mkdir "%INSTALLDIR%\bin" >nul 2>&1 -copy %OBECOMP% "%INSTALLDIR%\bin" >nul -copy %BUILDDIR%\showdef.exe "%INSTALLDIR%\bin" >nul - -mkdir "%INSTALLDIR%\2" >nul 2>&1 -mkdir "%INSTALLDIR%\2\include" >nul 2>&1 -mkdir "%INSTALLDIR%\2\sym" >nul 2>&1 -copy %BUILDDIR%\2\*.h "%INSTALLDIR%\2\include" >nul -copy %BUILDDIR%\2\*.sym "%INSTALLDIR%\2\sym" >nul - -mkdir "%INSTALLDIR%\C" >nul 2>&1 -mkdir "%INSTALLDIR%\C\include" >nul 2>&1 -mkdir "%INSTALLDIR%\C\sym" >nul 2>&1 -copy %BUILDDIR%\C\*.h "%INSTALLDIR%\C\include" >nul -copy %BUILDDIR%\C\*.sym "%INSTALLDIR%\C\sym" >nul - -mkdir "%INSTALLDIR%\lib" >nul 2>&1 -copy %BUILDDIR%\2\lib%ONAME%* "%INSTALLDIR%\lib" >nul -copy %BUILDDIR%\C\lib%ONAME%* "%INSTALLDIR%\lib" >nul -goto :eof - - -:uninstall -whoami /groups | find "12288" >nul -if errorlevel 1 ( -echo make uninstall - administrator rights required. Please run under an administrator command prompt. -goto :eof -) -rmdir /s /q "%INSTALLDIR%" >nul 2>&1 -goto :eof - - -:showpath -echo. -echo Now add %INSTALLDIR%\bin to your path, for example with the command: -echo PATH %INSTALLDIR%\bin;%%PATH%% -echo. -goto :eof - - :runtime echo. echo.Making runtime library for -O%MODEL% @@ -346,6 +362,7 @@ goto :eof :ulm echo.Making ulm library for -O%MODEL% cd %BUILDDIR%\%MODEL% +%ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmTypes.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmObjects.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmPriorities.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmDisciplines.Mod || exit /b @@ -357,7 +374,6 @@ cd %BUILDDIR%\%MODEL% %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmResources.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmForwarders.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmRelatedEvents.Mod || exit /b -%ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmTypes.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmStreams.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmStrings.Mod || exit /b %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/library/ulm/ulmSysTypes.Mod || exit /b diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 10163ced..98c9fa71 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -1,19 +1,34 @@ MODULE extTools; -IMPORT Strings, Out, Configuration, Platform, Modules, OPM; +IMPORT Strings, Out, Configuration, Platform, Modules, Heap, OPM; -VAR CFLAGS: ARRAY 1023 OF CHAR; +TYPE CommandString = ARRAY 4096 OF CHAR; + +VAR CFLAGS: CommandString; PROCEDURE execute(title: ARRAY OF CHAR; cmd: ARRAY OF CHAR); - VAR r, status, exitcode: INTEGER; + VAR r, status, exitcode: INTEGER; fullcmd: CommandString; BEGIN IF OPM.verbose IN OPM.Options THEN - Out.String(title); Out.String(cmd); Out.Ln + Out.String(" "); Out.String(fullcmd); Out.Ln END; - r := Platform.System(cmd); - status := r MOD 128; - exitcode := r DIV 256; + + (* Hack to suppress unwanted filename display by Microsoft C compiler on successful compilations. *) + IF Configuration.compiler = "MSC" THEN + fullcmd := "cmd /c "; + Strings.Append(cmd, fullcmd); + Strings.Append(" >msc-listing || type msc-listing", fullcmd) + ELSE + COPY(cmd, fullcmd); + END; + + (* Get GC to run file finalizers closing generated C files as otherwise Microsoft C cannot open them. *) + Heap.GC(FALSE); + + r := Platform.System(fullcmd); + + status := r MOD 128; exitcode := r DIV 256; IF exitcode > 127 THEN exitcode := exitcode - 256 END; (* Handle signed exit code *) IF r # 0 THEN @@ -43,7 +58,7 @@ END InitialiseCompilerCommand; PROCEDURE Assemble*(moduleName: ARRAY OF CHAR); VAR - cmd: ARRAY 1023 OF CHAR; + cmd: CommandString; BEGIN InitialiseCompilerCommand(cmd); Strings.Append("-c ", cmd); @@ -55,7 +70,7 @@ PROCEDURE Assemble*(moduleName: ARRAY OF CHAR); PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; additionalopts: ARRAY OF CHAR); VAR - cmd: ARRAY 1023 OF CHAR; + cmd: CommandString; BEGIN InitialiseCompilerCommand(cmd); Strings.Append(moduleName, cmd); diff --git a/src/test/confidence/lola/test.sh b/src/test/confidence/lola/test.sh index 315d6d8e..3571e536 100755 --- a/src/test/confidence/lola/test.sh +++ b/src/test/confidence/lola/test.sh @@ -1,5 +1,9 @@ #!/bin/sh . ../testenv.sh -$OBECOMP LSS.Mod LSB.Mod LSC.Mod LSV.Mod lola.Mod -m +$OBECOMP LSS.Mod +$OBECOMP LSB.Mod +$OBECOMP LSC.Mod +$OBECOMP LSV.Mod +$OBECOMP lola.Mod -m ./Lola RISC5.Lola result . ../testresult.sh diff --git a/src/test/confidence/testenv.sh b/src/test/confidence/testenv.sh index de1630fa..fee87667 100755 --- a/src/test/confidence/testenv.sh +++ b/src/test/confidence/testenv.sh @@ -14,12 +14,7 @@ export LD_LIBRARY_PATH=$1/lib:$LD_LIBRARY_PATH rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename $PWD) # Under gcc generate assembly source for source change test. -# NOTE: The following CFLAGS causes the assembler to write source -# to a single file. When there are multiple Mod files, each -# corresponding assembly file will overwrite the previous. I -# cannot see any way to overcome this short of using -S -# on the voc command and calling 'as' explicitly. -# NOTE 2: The cygwin 64 bit build has relocation errors with +# NOTE: The cygwin 64 bit build has relocation errors with # these assembly generation options. if [ "$COMPILER" = "gcc" -a "$FLAVOUR" != "cygwin.LP64.gcc" ] then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map" diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 458bddec..8ed9eeee 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -413,6 +413,7 @@ void writeConfigurationMod() { fprintf(fd, " linkflags* = '%s';\n", linkflags); fprintf(fd, " libspec* = '%s';\n", libspec); fprintf(fd, " libext* = '%s';\n", libext); + fprintf(fd, " compiler* = '%s';\n", compiler); fprintf(fd, " compile* = '%s';\n", cc); fprintf(fd, " installdir* = '%s';\n", installdir); fprintf(fd, " staticLink* = '%s';\n", staticlink); From ee197d741abeaafee34f2575c1d063d54a077181 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 21 Dec 2016 13:02:11 +0000 Subject: [PATCH 109/241] Update C bootstrap source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 6 +-- bootstrap/unix-44/Configuration.h | 4 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 4 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 4 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 66 ++++++++++++++++------------ bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 6 +-- bootstrap/unix-48/Configuration.h | 4 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 4 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 4 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 66 ++++++++++++++++------------ bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 6 +-- bootstrap/unix-88/Configuration.h | 4 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 4 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 4 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 66 ++++++++++++++++------------ bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 6 +-- bootstrap/windows-48/Configuration.h | 4 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 4 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 4 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 66 ++++++++++++++++------------ bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 6 +-- bootstrap/windows-88/Configuration.h | 4 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 4 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 4 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 66 ++++++++++++++++------------ bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 390 insertions(+), 350 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 993c2bac..d81a9a43 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 80b87b1d..1e31b260 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,7 @@ #include "SYSTEM.h" -export CHAR Configuration_versionLong[75]; +export CHAR Configuration_versionLong[76]; @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index cdc285e5..daf3ac70 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h @@ -6,7 +6,7 @@ #include "SYSTEM.h" -import CHAR Configuration_versionLong[75]; +import CHAR Configuration_versionLong[76]; import void *Configuration__init(void); diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index cd6f14b9..50902bd8 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 62563e24..25669e5f 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index c12cb722..129be081 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index de4d17ce..c019c8f0 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index f397649b..8e2f0126 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 8436f089..8771bb17 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 19e40505..47de29e6 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 71d82def..e546e68f 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index a5f41a8e..062bc79b 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1138,7 +1138,7 @@ static void OPC_GenHeaderMsg (void) OPM_WriteString((CHAR*)"/* ", 4); OPM_WriteString((CHAR*)"voc", 4); OPM_Write(' '); - OPM_WriteString(Configuration_versionLong, 75); + OPM_WriteString(Configuration_versionLong, 76); OPM_Write(' '); i = 0; while (i <= 31) { diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 38a2b01d..bc980a30 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 8f903e46..7b8be0fd 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -272,7 +272,7 @@ BOOLEAN OPM_OpenPar (void) if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); - OPM_LogWStr(Configuration_versionLong, 75); + OPM_LogWStr(Configuration_versionLong, 76); OPM_LogW('.'); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Based on Ofront by J. Templ and Software Templ OEG.", 52); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 96318bea..1a2a6e4e 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index ec4ad2be..b636f79f 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index aa076aaa..eca79f7f 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index bf9f1af5..fd0e7bba 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 09a33705..6596c0d4 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 149bfd1b..475e0bb8 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 63bf2070..ef7dd6a8 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 8b095ff5..0c366e14 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index c6a107b6..46b04b0d 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 23d917c7..a104f570 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index e1285046..cc5af1e0 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index fa5fada1..777ef8f2 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 0b98d7bb..0f3d5642 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index d1eb72f6..1cc18e85 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 170d1785..fc275a0e 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 225bd40a..90f9337c 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 4d98f1a3..e63580fb 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index a6913b51..484e698e 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index bad71689..ab086221 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 9cd5cf4d..e16da294 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 8f60c652..fcee0af8 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index fa840303..793e9025 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,14 +7,18 @@ #include "SYSTEM.h" #include "Configuration.h" +#include "Heap.h" #include "Modules.h" #include "OPM.h" #include "Out.h" #include "Platform.h" #include "Strings.h" +typedef + CHAR extTools_CommandString[4096]; -static CHAR extTools_CFLAGS[1023]; + +static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); @@ -26,14 +30,17 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; + extTools_CommandString fullcmd; __DUP(title, title__len, CHAR); __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { - Out_String(title, title__len); - Out_String(cmd, cmd__len); + Out_String((CHAR*)" ", 3); + Out_String(fullcmd, 4096); Out_Ln(); } - r = Platform_System(cmd, cmd__len); + __COPY(cmd, fullcmd, 4096); + Heap_GC(0); + r = Platform_System(fullcmd, 4096); status = __MASK(r, -128); exitcode = __ASHR(r, 8); if (exitcode > 127) { @@ -69,44 +76,44 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); - Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 1023); - Strings_Append(extTools_CFLAGS, 1023, (void*)s, s__len); + Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); + Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 4096); __DEL(moduleName); } void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); + Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } - Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); - Strings_Append(OPM_Model, 10, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); + Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } @@ -115,6 +122,7 @@ export void *extTools__init(void) { __DEFMOD; __MODULE_IMPORT(Configuration); + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Modules); __MODULE_IMPORT(OPM); __MODULE_IMPORT(Out); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index a93b6c85..e1375387 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 993c2bac..d81a9a43 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 80b87b1d..1e31b260 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,7 @@ #include "SYSTEM.h" -export CHAR Configuration_versionLong[75]; +export CHAR Configuration_versionLong[76]; @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index cdc285e5..daf3ac70 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h @@ -6,7 +6,7 @@ #include "SYSTEM.h" -import CHAR Configuration_versionLong[75]; +import CHAR Configuration_versionLong[76]; import void *Configuration__init(void); diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index cd6f14b9..50902bd8 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 62563e24..25669e5f 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index c12cb722..129be081 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index de4d17ce..c019c8f0 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index f397649b..8e2f0126 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 8436f089..8771bb17 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 19e40505..47de29e6 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 71d82def..e546e68f 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index a5f41a8e..062bc79b 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1138,7 +1138,7 @@ static void OPC_GenHeaderMsg (void) OPM_WriteString((CHAR*)"/* ", 4); OPM_WriteString((CHAR*)"voc", 4); OPM_Write(' '); - OPM_WriteString(Configuration_versionLong, 75); + OPM_WriteString(Configuration_versionLong, 76); OPM_Write(' '); i = 0; while (i <= 31) { diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 38a2b01d..bc980a30 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 8f903e46..7b8be0fd 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -272,7 +272,7 @@ BOOLEAN OPM_OpenPar (void) if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); - OPM_LogWStr(Configuration_versionLong, 75); + OPM_LogWStr(Configuration_versionLong, 76); OPM_LogW('.'); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Based on Ofront by J. Templ and Software Templ OEG.", 52); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 96318bea..1a2a6e4e 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index ec4ad2be..b636f79f 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index aa076aaa..eca79f7f 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index bf9f1af5..fd0e7bba 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 09a33705..6596c0d4 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 0002aa51..9b550db2 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 63bf2070..ef7dd6a8 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 8b095ff5..0c366e14 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index c6a107b6..46b04b0d 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 23d917c7..a104f570 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index e1285046..cc5af1e0 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index fa5fada1..777ef8f2 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 0b98d7bb..0f3d5642 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index d1eb72f6..1cc18e85 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 170d1785..fc275a0e 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 225bd40a..90f9337c 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 4d98f1a3..e63580fb 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 08ee5129..e9b54970 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 5d3316e2..a89d3713 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 9cd5cf4d..e16da294 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 8f60c652..fcee0af8 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index fa840303..793e9025 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,14 +7,18 @@ #include "SYSTEM.h" #include "Configuration.h" +#include "Heap.h" #include "Modules.h" #include "OPM.h" #include "Out.h" #include "Platform.h" #include "Strings.h" +typedef + CHAR extTools_CommandString[4096]; -static CHAR extTools_CFLAGS[1023]; + +static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); @@ -26,14 +30,17 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; + extTools_CommandString fullcmd; __DUP(title, title__len, CHAR); __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { - Out_String(title, title__len); - Out_String(cmd, cmd__len); + Out_String((CHAR*)" ", 3); + Out_String(fullcmd, 4096); Out_Ln(); } - r = Platform_System(cmd, cmd__len); + __COPY(cmd, fullcmd, 4096); + Heap_GC(0); + r = Platform_System(fullcmd, 4096); status = __MASK(r, -128); exitcode = __ASHR(r, 8); if (exitcode > 127) { @@ -69,44 +76,44 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); - Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 1023); - Strings_Append(extTools_CFLAGS, 1023, (void*)s, s__len); + Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); + Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 4096); __DEL(moduleName); } void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); + Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } - Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); - Strings_Append(OPM_Model, 10, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); + Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } @@ -115,6 +122,7 @@ export void *extTools__init(void) { __DEFMOD; __MODULE_IMPORT(Configuration); + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Modules); __MODULE_IMPORT(OPM); __MODULE_IMPORT(Out); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index a93b6c85..e1375387 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 993c2bac..d81a9a43 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 80b87b1d..1e31b260 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,7 @@ #include "SYSTEM.h" -export CHAR Configuration_versionLong[75]; +export CHAR Configuration_versionLong[76]; @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index cdc285e5..daf3ac70 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h @@ -6,7 +6,7 @@ #include "SYSTEM.h" -import CHAR Configuration_versionLong[75]; +import CHAR Configuration_versionLong[76]; import void *Configuration__init(void); diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index d4425bbe..91ef8f3a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index a34a1758..de24ffaf 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index aeebff17..d5a4f08e 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index ff1a1b07..4512d96e 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index c66fe5bd..186ab951 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 5e518753..00cdc69f 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 19e40505..47de29e6 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 71d82def..e546e68f 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index a5f41a8e..062bc79b 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1138,7 +1138,7 @@ static void OPC_GenHeaderMsg (void) OPM_WriteString((CHAR*)"/* ", 4); OPM_WriteString((CHAR*)"voc", 4); OPM_Write(' '); - OPM_WriteString(Configuration_versionLong, 75); + OPM_WriteString(Configuration_versionLong, 76); OPM_Write(' '); i = 0; while (i <= 31) { diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 38a2b01d..bc980a30 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 143546fd..315fb4d2 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -272,7 +272,7 @@ BOOLEAN OPM_OpenPar (void) if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); - OPM_LogWStr(Configuration_versionLong, 75); + OPM_LogWStr(Configuration_versionLong, 76); OPM_LogW('.'); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Based on Ofront by J. Templ and Software Templ OEG.", 52); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 96318bea..1a2a6e4e 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 52620168..a8eff270 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index aa076aaa..eca79f7f 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index bf9f1af5..fd0e7bba 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 09a33705..6596c0d4 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index d89ea5c8..a855a25f 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 63bf2070..ef7dd6a8 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 69e2f94e..df10c2a8 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index c6a107b6..46b04b0d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 23d917c7..a104f570 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index e1285046..cc5af1e0 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 4d25035f..affaff74 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 76f5da00..9599e6e3 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index d1eb72f6..1cc18e85 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 170d1785..fc275a0e 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 225bd40a..90f9337c 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 4d98f1a3..e63580fb 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 565de43f..a0c55c7d 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index bdd9fada..21d2344a 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 9cd5cf4d..e16da294 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 8f60c652..fcee0af8 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index fa840303..793e9025 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,14 +7,18 @@ #include "SYSTEM.h" #include "Configuration.h" +#include "Heap.h" #include "Modules.h" #include "OPM.h" #include "Out.h" #include "Platform.h" #include "Strings.h" +typedef + CHAR extTools_CommandString[4096]; -static CHAR extTools_CFLAGS[1023]; + +static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); @@ -26,14 +30,17 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; + extTools_CommandString fullcmd; __DUP(title, title__len, CHAR); __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { - Out_String(title, title__len); - Out_String(cmd, cmd__len); + Out_String((CHAR*)" ", 3); + Out_String(fullcmd, 4096); Out_Ln(); } - r = Platform_System(cmd, cmd__len); + __COPY(cmd, fullcmd, 4096); + Heap_GC(0); + r = Platform_System(fullcmd, 4096); status = __MASK(r, -128); exitcode = __ASHR(r, 8); if (exitcode > 127) { @@ -69,44 +76,44 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); - Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 1023); - Strings_Append(extTools_CFLAGS, 1023, (void*)s, s__len); + Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); + Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 4096); __DEL(moduleName); } void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); + Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } - Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); - Strings_Append(OPM_Model, 10, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); + Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } @@ -115,6 +122,7 @@ export void *extTools__init(void) { __DEFMOD; __MODULE_IMPORT(Configuration); + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Modules); __MODULE_IMPORT(OPM); __MODULE_IMPORT(Out); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index a93b6c85..e1375387 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 993c2bac..d81a9a43 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 80b87b1d..1e31b260 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,7 @@ #include "SYSTEM.h" -export CHAR Configuration_versionLong[75]; +export CHAR Configuration_versionLong[76]; @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index cdc285e5..daf3ac70 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h @@ -6,7 +6,7 @@ #include "SYSTEM.h" -import CHAR Configuration_versionLong[75]; +import CHAR Configuration_versionLong[76]; import void *Configuration__init(void); diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 3eecd248..9aacffe0 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 2dc667a1..24a5e667 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index c12cb722..129be081 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index de4d17ce..c019c8f0 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index b437b514..b0a58209 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 8436f089..8771bb17 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 19e40505..47de29e6 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 71d82def..e546e68f 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index a5f41a8e..062bc79b 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1138,7 +1138,7 @@ static void OPC_GenHeaderMsg (void) OPM_WriteString((CHAR*)"/* ", 4); OPM_WriteString((CHAR*)"voc", 4); OPM_Write(' '); - OPM_WriteString(Configuration_versionLong, 75); + OPM_WriteString(Configuration_versionLong, 76); OPM_Write(' '); i = 0; while (i <= 31) { diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 38a2b01d..bc980a30 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 8f903e46..7b8be0fd 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -272,7 +272,7 @@ BOOLEAN OPM_OpenPar (void) if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); - OPM_LogWStr(Configuration_versionLong, 75); + OPM_LogWStr(Configuration_versionLong, 76); OPM_LogW('.'); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Based on Ofront by J. Templ and Software Templ OEG.", 52); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 96318bea..1a2a6e4e 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index ec4ad2be..b636f79f 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index aa076aaa..eca79f7f 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index bf9f1af5..fd0e7bba 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 09a33705..6596c0d4 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 0002aa51..9b550db2 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 63bf2070..ef7dd6a8 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 8b095ff5..0c366e14 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index c6a107b6..46b04b0d 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 01e91698..82df8d74 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index e1285046..cc5af1e0 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 9d308e71..e618a17f 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index bd2a519b..96523fd2 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index d1eb72f6..1cc18e85 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 170d1785..fc275a0e 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 225bd40a..90f9337c 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 4d98f1a3..e63580fb 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 08ee5129..e9b54970 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 5d3316e2..a89d3713 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 9cd5cf4d..e16da294 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 8f60c652..fcee0af8 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index fa840303..793e9025 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,14 +7,18 @@ #include "SYSTEM.h" #include "Configuration.h" +#include "Heap.h" #include "Modules.h" #include "OPM.h" #include "Out.h" #include "Platform.h" #include "Strings.h" +typedef + CHAR extTools_CommandString[4096]; -static CHAR extTools_CFLAGS[1023]; + +static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); @@ -26,14 +30,17 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; + extTools_CommandString fullcmd; __DUP(title, title__len, CHAR); __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { - Out_String(title, title__len); - Out_String(cmd, cmd__len); + Out_String((CHAR*)" ", 3); + Out_String(fullcmd, 4096); Out_Ln(); } - r = Platform_System(cmd, cmd__len); + __COPY(cmd, fullcmd, 4096); + Heap_GC(0); + r = Platform_System(fullcmd, 4096); status = __MASK(r, -128); exitcode = __ASHR(r, 8); if (exitcode > 127) { @@ -69,44 +76,44 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); - Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 1023); - Strings_Append(extTools_CFLAGS, 1023, (void*)s, s__len); + Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); + Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 4096); __DEL(moduleName); } void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); + Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } - Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); - Strings_Append(OPM_Model, 10, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); + Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } @@ -115,6 +122,7 @@ export void *extTools__init(void) { __DEFMOD; __MODULE_IMPORT(Configuration); + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Modules); __MODULE_IMPORT(OPM); __MODULE_IMPORT(Out); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index a93b6c85..e1375387 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 993c2bac..d81a9a43 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 80b87b1d..1e31b260 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,7 @@ #include "SYSTEM.h" -export CHAR Configuration_versionLong[75]; +export CHAR Configuration_versionLong[76]; @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 75); + __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index cdc285e5..daf3ac70 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h @@ -6,7 +6,7 @@ #include "SYSTEM.h" -import CHAR Configuration_versionLong[75]; +import CHAR Configuration_versionLong[76]; import void *Configuration__init(void); diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 508dc245..3d38721d 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 74f5c8ca..c21b4aee 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index aeebff17..d5a4f08e 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index ff1a1b07..4512d96e 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 62030574..016ad7b2 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 5e518753..00cdc69f 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 19e40505..47de29e6 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 71d82def..e546e68f 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index a5f41a8e..062bc79b 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1138,7 +1138,7 @@ static void OPC_GenHeaderMsg (void) OPM_WriteString((CHAR*)"/* ", 4); OPM_WriteString((CHAR*)"voc", 4); OPM_Write(' '); - OPM_WriteString(Configuration_versionLong, 75); + OPM_WriteString(Configuration_versionLong, 76); OPM_Write(' '); i = 0; while (i <= 31) { diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 38a2b01d..bc980a30 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 143546fd..315fb4d2 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -272,7 +272,7 @@ BOOLEAN OPM_OpenPar (void) if (Modules_ArgCount == 1) { OPM_LogWLn(); OPM_LogWStr((CHAR*)"Oberon-2 compiler v", 20); - OPM_LogWStr(Configuration_versionLong, 75); + OPM_LogWStr(Configuration_versionLong, 76); OPM_LogW('.'); OPM_LogWLn(); OPM_LogWStr((CHAR*)"Based on Ofront by J. Templ and Software Templ OEG.", 52); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 96318bea..1a2a6e4e 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 52620168..a8eff270 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index aa076aaa..eca79f7f 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index bf9f1af5..fd0e7bba 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 09a33705..6596c0d4 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index d89ea5c8..a855a25f 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 63bf2070..ef7dd6a8 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 69e2f94e..df10c2a8 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index c6a107b6..46b04b0d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 01e91698..82df8d74 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index e1285046..cc5af1e0 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 1304f291..d168bcfb 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 99405d0b..f1fff926 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index d1eb72f6..1cc18e85 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 170d1785..fc275a0e 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 225bd40a..90f9337c 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 4d98f1a3..e63580fb 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 565de43f..a0c55c7d 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index bdd9fada..21d2344a 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 9cd5cf4d..e16da294 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 8f60c652..fcee0af8 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index fa840303..793e9025 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -7,14 +7,18 @@ #include "SYSTEM.h" #include "Configuration.h" +#include "Heap.h" #include "Modules.h" #include "OPM.h" #include "Out.h" #include "Platform.h" #include "Strings.h" +typedef + CHAR extTools_CommandString[4096]; -static CHAR extTools_CFLAGS[1023]; + +static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); @@ -26,14 +30,17 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len) { INT16 r, status, exitcode; + extTools_CommandString fullcmd; __DUP(title, title__len, CHAR); __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { - Out_String(title, title__len); - Out_String(cmd, cmd__len); + Out_String((CHAR*)" ", 3); + Out_String(fullcmd, 4096); Out_Ln(); } - r = Platform_System(cmd, cmd__len); + __COPY(cmd, fullcmd, 4096); + Heap_GC(0); + r = Platform_System(fullcmd, 4096); status = __MASK(r, -128); exitcode = __ASHR(r, 8); if (exitcode > 127) { @@ -69,44 +76,44 @@ static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); - Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 1023); - Strings_Append(extTools_CFLAGS, 1023, (void*)s, s__len); + Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); + Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c", 3, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile: ", 12, cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile: ", 12, cmd, 4096); __DEL(moduleName); } void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len) { - CHAR cmd[1023]; + extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)".c ", 4, (void*)cmd, 1023); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 1023); + extTools_InitialiseCompilerCommand((void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); + Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 1023); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } - Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 1023); - Strings_Append(moduleName, moduleName__len, (void*)cmd, 1023); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 1023); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 1023); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 1023); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 1023); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 1023); - Strings_Append(OPM_Model, 10, (void*)cmd, 1023); - Strings_Append((CHAR*)"", 1, (void*)cmd, 1023); - extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 1023); + Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); + Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } @@ -115,6 +122,7 @@ export void *extTools__init(void) { __DEFMOD; __MODULE_IMPORT(Configuration); + __MODULE_IMPORT(Heap); __MODULE_IMPORT(Modules); __MODULE_IMPORT(OPM); __MODULE_IMPORT(Out); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index a93b6c85..e1375387 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.00 [2016/12/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 572587ec565ff5e8785654147349dce199cc89d6 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 21 Dec 2016 18:16:25 +0000 Subject: [PATCH 110/241] Add new autobuild machine vim-obs32. --- doc/Installation.md | 3 ++- src/tools/autobuild/buildall.pl | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Installation.md b/doc/Installation.md index 37840f74..b0ab299d 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -54,7 +54,8 @@ Example pre-requisite installation commands: | --------- | ------------ | | Debian/Ubuntu/Mint ... | `apt-get install git` | | Fedora/RHEL/CentOS ... | `yum install git gcc glibc-static` (`dnf` instead of `yum` on recent Fedoras) | -| FreeBSD/OpenBSD/NetBSD | `pkg install git` | +| FreeBSD/NetBSD | `pkg install git` | +| OpenBSD | `pkg_add git gcc` | | OpenSUSE | `zypper install gcc git-core make glibc-devel-static` | On Mac OS (Darwin) just type the git command. OS/X will tell you that it is not installed and ask if you want to install it (say yes). Note that Darwin builds always use clang, the OS will redirect attempts to use gcc to clang. diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 7e74e3b7..787ae16c 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -20,6 +20,7 @@ my %machines = ( "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); From da14bc6398bfb2acb3846db05b842fec7ea6c352 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 14:35:11 +0000 Subject: [PATCH 111/241] Add Visual C x86 autobuild. --- make.cmd | 13 +++++++++++++ src/tools/autobuild/build-oberon.sh | 9 ++++++++- src/tools/autobuild/buildall.pl | 26 +++++++++++++------------- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/make.cmd b/make.cmd index 7a42fe50..c2a817dc 100644 --- a/make.cmd +++ b/make.cmd @@ -68,9 +68,21 @@ goto :eof :full call :clean || exit /b +echo. +echo.--- Compiler build started --- +echo. call :compiler || exit /b +echo. +echo.--- Compiler build successfull --- +echo. call :browsercmd || exit /b +echo. +echo.--- Library build started --- +echo. call :library || exit /b +echo. +echo.--- Library build successfull --- +echo. call :makeinstalldir || exit /b goto :eof @@ -148,6 +160,7 @@ goto :eof :clean +echo.--- Cleaning branch ... %OS% %COMPILER% %DATAMODEL% --- rd /s /q %BUILDDIR% 2>nul del /q %OBECOMP% 2>nul goto :eof diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index 7dc5096a..7a7b913b 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -22,4 +22,11 @@ $sudo git pull # Update the local repository $sudo git checkout -f $4 # Switch to requested branch export CC=$3 -$sudo make full \ No newline at end of file + +if test "$3" = "msc-x86"; then + cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x86 '&&' cd 'c:\cygwin\home\dave\msc-x86\voc' '&&' make full +else; if test "$3" = "msc-x64"; then + cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x64 '&&' cd 'c:\cygwin\home\dave\msc-x64\voc' '&&' make full +else + $sudo make full +fi diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 787ae16c..b0129ccb 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -8,21 +8,21 @@ my $branch = "master"; if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc x86_64-w64-mingw32-gcc ' . $branch . '\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "ob32" => ['22', 'root@nas-ob32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "win32" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x86/voc msc-x86' . $branch], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); sub logged { From 4dac1f29d50a416587957391f7f711fc39090c76 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 14:42:53 +0000 Subject: [PATCH 112/241] Fix conditional syntax in autobuild script. --- src/tools/autobuild/build-oberon.sh | 3 ++- src/tools/autobuild/buildall.pl | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index 7a7b913b..f3d60f27 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -25,7 +25,8 @@ export CC=$3 if test "$3" = "msc-x86"; then cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x86 '&&' cd 'c:\cygwin\home\dave\msc-x86\voc' '&&' make full -else; if test "$3" = "msc-x64"; then +else +if test "$3" = "msc-x64"; then cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x64 '&&' cd 'c:\cygwin\home\dave\msc-x64\voc' '&&' make full else $sudo make full diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index b0129ccb..5186406e 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -8,21 +8,21 @@ my $branch = "master"; if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], + "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], + "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], + "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], + "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc x86_64-w64-mingw32-gcc ' . $branch . '\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "win32" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x86/voc msc-x86' . $branch], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] + "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], + "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], + "win32" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x86/voc msc-x86 ' . $branch], + "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], + "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); sub logged { From b66d7bf2ef873831822a340da74237c75dd97c8c Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 14:55:03 +0000 Subject: [PATCH 113/241] Display configuration in Visual C makefile --- make.cmd | 2 +- src/tools/autobuild/build-oberon.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/make.cmd b/make.cmd index c2a817dc..231ac3db 100644 --- a/make.cmd +++ b/make.cmd @@ -21,7 +21,7 @@ cl -nologo -Isrc\runtime src\tools\make\configure.c >msc-listing || type msc-listing setlocal -configure.exe >nul +configure.exe del configure.obj configure.exe 2>nul diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh index f3d60f27..ca9a10ed 100644 --- a/src/tools/autobuild/build-oberon.sh +++ b/src/tools/autobuild/build-oberon.sh @@ -31,3 +31,4 @@ if test "$3" = "msc-x64"; then else $sudo make full fi +fi From 37fc052d951dd5062942bd9ce8d1342add435146 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 16:36:05 +0000 Subject: [PATCH 114/241] Update autobuild report --- src/tools/autobuild/buildall.pl | 1 + src/tools/autobuild/report.pl | 34 ++++++++++++++++++++++++--------- src/tools/make/configure.c | 2 +- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl index 5186406e..f72c36b9 100644 --- a/src/tools/autobuild/buildall.pl +++ b/src/tools/autobuild/buildall.pl @@ -21,6 +21,7 @@ my %machines = ( "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], "win32" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x86/voc msc-x86 ' . $branch], + "win64" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x64/voc msc-x64 ' . $branch], "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] ); diff --git a/src/tools/autobuild/report.pl b/src/tools/autobuild/report.pl index 459603e4..80c8965e 100644 --- a/src/tools/autobuild/report.pl +++ b/src/tools/autobuild/report.pl @@ -46,17 +46,31 @@ sub parselog { open(my $log, $fn) // die "Couldn't open build log $fn."; $branch = "Build on $fn started"; while (<$log>) { + s/\r//g; # Remove unwanted MS command prompt CR's. + if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1} if (/^([0-9.]+) /) {$time = $1} - # 19.39.58 Configuration: 1.95 [2016/07/14] for gcc LP64 on centos - if (/^[^ ]+ Configuration: ([0-9a-zA-Z.]+) \[[0-9\/]+\] for (.+) *$/) { - logstatus($fn); - $ver = $1; - printf "--- Config for $fn: $1 for $2.\n"; + + #14.55.15 === build-oberon.sh: $1=sudo, $2=oberon/voc, $3=gcc, $4=master, $sudo=sudo === + if (/^[^ ]+ === build-oberon.sh: .* \$3=([^ ]+), \$4=([^ ]+),/) { + ($compiler, $branch) = ($1, $2); } - if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) { - ($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5); + + # 14.55.17 + sudo git checkout -f master + if (/^[^ ]+ .*git checkout -f ([^ ]+) *$/) { + $branch = $1; } + + # 14.55.17 Configuration: 2.1.0 [2016/12/22] for gcc ILP32 on ubuntu + if (/^[^ ]+ Configuration: ([^ ]+) \[[0-9\/]+\] for ([^ ]+) ([^ ]+) on ([^ ]+)/) { + ($ver, $compiler, $datamodel, $os) = ($1, $2, $3, $4); + printf "--- Config for $fn: $1 for $2 $3 on $4.\n"; + } + + #if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) { + # ($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5); + #} + if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Started";} if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";} @@ -78,6 +92,7 @@ sub parselog { if ($compilerok eq "Started") {$compilerok = "Failed";} if ($libraryok eq "Started") {$libraryok = "Failed";} if ($tests eq "Started") {$tests = "Failed";} + if ($compiler eq "msc") {$sourcechange = "n/a"; $tests = "n/a";} } } close($log); @@ -110,8 +125,9 @@ sub svgtext { sub colourfor { my ($str) = @_; - if ($str eq "Failed") {return "#e03030";} - if ($str eq "Changed") {return "#ff9d4d";} + if ($str eq "Failed") {return "#e03030";} + if ($str eq "Changed") {return "#ff9d4d";} + if ($str eq "n/a") {return "#707070";} return "#5adb5a"; } diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 8ed9eeee..6ef80440 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -148,7 +148,7 @@ void determineCCompiler() { cc = "gcc -fPIC -g" optimize; } #elif defined(_MSC_VER) - compiler = "MSC"; + compiler = "msc"; cc = "cl /nologo"; objext = ".obj"; objflag = " -Fe"; From 535f80d91cb85acc9673d75325d2d6e7d8d08e46 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 17:16:42 +0000 Subject: [PATCH 115/241] Integrate jtempl heap allocation recursion fix. --- src/runtime/Heap.Mod | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index c5a5a977..83d5e6e7 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -266,18 +266,15 @@ MODULE Heap; IF adr = 0 THEN (* Nothing free *) IF firstTry THEN GC(TRUE); INC(blksz, Unit); - IF uLT(heapsize - allocated, blksz) - OR uLT((heapsize - allocated - blksz) * 4, heapsize) THEN - (* heap would still be more than 3/4 full; expand to avoid thrashing *) - ExtendHeap((allocated + blksz) DIV (3*Unit) * (4*Unit) - heapsize) - END; - firstTry := FALSE; new := NEWREC(tag); firstTry := TRUE; - IF new = NIL THEN - (* depending on the fragmentation, the heap may not have been extended by - the anti-thrashing heuristics above *) - ExtendHeap((allocated + blksz) DIV (3*Unit) * (4*Unit) - heapsize); - new := NEWREC(tag); (* will find a free block if heap has been expanded properly *) + (* Anti-thrashing heuristics: ensure 1/4 of the heap will not be allocated. *) + t := (allocated + blksz) DIV (3*Unit) * (4*Unit); (* Minimum required new heapsize *) + IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END; + firstTry := FALSE; new := NEWREC(tag); + IF new = NIL THEN (* Fragmentation prevented allocation, heap is 1/4 free *) + ExtendHeap(blksz); + new := NEWREC(tag) (* Will find a free block if heap has been expanded successfully *) END; + firstTry := TRUE; Unlock(); RETURN new ELSE Unlock(); RETURN NIL From d292b4b2c9f5ad891ed604f77fab4031d190616a Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 22 Dec 2016 17:17:34 +0000 Subject: [PATCH 116/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 11 ++++++----- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 11 ++++++----- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 11 ++++++----- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 11 ++++++----- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 11 ++++++----- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 215 insertions(+), 210 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index d81a9a43..a3ea0f88 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 1e31b260..8054febd 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index daf3ac70..da289d26 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 50902bd8..069bed68 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 25669e5f..4ed75358 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 129be081..66ce19f6 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + if (Heap_uLT(Heap_heapsize, t)) { + Heap_ExtendHeap(t - Heap_heapsize); } Heap_firstTry = 0; new = Heap_NEWREC(tag); - Heap_firstTry = 1; if (new == NIL) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + Heap_ExtendHeap(blksz); new = Heap_NEWREC(tag); } + Heap_firstTry = 1; Heap_Unlock(); return new; } else { diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index c019c8f0..c6640fd2 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8e2f0126..02aa54a7 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 8771bb17..2adfd91d 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 47de29e6..a27fa4ca 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index e546e68f..ad9b40c7 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 062bc79b..92219dc5 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index bc980a30..dc5cdfc7 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 7b8be0fd..0cfdc99a 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 1a2a6e4e..fd042e7f 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index b636f79f..f9a740ff 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index eca79f7f..b4949ef8 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index fd0e7bba..d98c7f8a 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 6596c0d4..2ae74912 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 475e0bb8..3dbeab79 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index ef7dd6a8..ec74311c 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 0c366e14..0965fdba 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 46b04b0d..8493d416 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index a104f570..0523671f 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index cc5af1e0..fb7415a8 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 777ef8f2..ce556023 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 0f3d5642..7c570eae 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 1cc18e85..4976039b 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index fc275a0e..b1044c30 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 90f9337c..1cc614c5 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index e63580fb..68cdf219 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 484e698e..3e44b72b 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index ab086221..f31da607 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index e16da294..76f04f6d 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index fcee0af8..812e751b 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 793e9025..90a3382a 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e1375387..e3ab156a 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index d81a9a43..a3ea0f88 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 1e31b260..8054febd 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index daf3ac70..da289d26 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 50902bd8..069bed68 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 25669e5f..4ed75358 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 129be081..66ce19f6 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + if (Heap_uLT(Heap_heapsize, t)) { + Heap_ExtendHeap(t - Heap_heapsize); } Heap_firstTry = 0; new = Heap_NEWREC(tag); - Heap_firstTry = 1; if (new == NIL) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + Heap_ExtendHeap(blksz); new = Heap_NEWREC(tag); } + Heap_firstTry = 1; Heap_Unlock(); return new; } else { diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index c019c8f0..c6640fd2 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8e2f0126..02aa54a7 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 8771bb17..2adfd91d 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 47de29e6..a27fa4ca 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index e546e68f..ad9b40c7 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 062bc79b..92219dc5 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index bc980a30..dc5cdfc7 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 7b8be0fd..0cfdc99a 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 1a2a6e4e..fd042e7f 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index b636f79f..f9a740ff 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index eca79f7f..b4949ef8 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index fd0e7bba..d98c7f8a 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 6596c0d4..2ae74912 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 9b550db2..cf8d3659 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index ef7dd6a8..ec74311c 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 0c366e14..0965fdba 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 46b04b0d..8493d416 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index a104f570..0523671f 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index cc5af1e0..fb7415a8 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 777ef8f2..ce556023 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 0f3d5642..7c570eae 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 1cc18e85..4976039b 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index fc275a0e..b1044c30 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 90f9337c..1cc614c5 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index e63580fb..68cdf219 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index e9b54970..5eea7749 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index a89d3713..6b4d7af2 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index e16da294..76f04f6d 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index fcee0af8..812e751b 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 793e9025..90a3382a 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e1375387..e3ab156a 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index d81a9a43..a3ea0f88 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 1e31b260..8054febd 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index daf3ac70..da289d26 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 91ef8f3a..b1517add 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index de24ffaf..64602dd6 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index d5a4f08e..dac990ab 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); + t = __ASHL(__DIV(Heap_allocated + blksz, 96), 7); + if (Heap_uLT(Heap_heapsize, t)) { + Heap_ExtendHeap(t - Heap_heapsize); } Heap_firstTry = 0; new = Heap_NEWREC(tag); - Heap_firstTry = 1; if (new == NIL) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); + Heap_ExtendHeap(blksz); new = Heap_NEWREC(tag); } + Heap_firstTry = 1; Heap_Unlock(); return new; } else { diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 4512d96e..cb98d8fc 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 186ab951..947bfc0b 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 00cdc69f..77d4cfb2 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 47de29e6..a27fa4ca 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index e546e68f..ad9b40c7 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 062bc79b..92219dc5 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index bc980a30..dc5cdfc7 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 315fb4d2..bb66f347 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 1a2a6e4e..fd042e7f 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index a8eff270..77801b58 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index eca79f7f..b4949ef8 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index fd0e7bba..d98c7f8a 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 6596c0d4..2ae74912 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index a855a25f..58ed2541 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index ef7dd6a8..ec74311c 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index df10c2a8..4186de2e 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 46b04b0d..8493d416 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index a104f570..0523671f 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index cc5af1e0..fb7415a8 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index affaff74..193a781b 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 9599e6e3..a6957766 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 1cc18e85..4976039b 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index fc275a0e..b1044c30 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 90f9337c..1cc614c5 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index e63580fb..68cdf219 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index a0c55c7d..5d9a398d 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 21d2344a..a35e5e97 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index e16da294..76f04f6d 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index fcee0af8..812e751b 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 793e9025..90a3382a 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e1375387..e3ab156a 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index d81a9a43..a3ea0f88 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 1e31b260..8054febd 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index daf3ac70..da289d26 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 9aacffe0..8fa17a0c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 24a5e667..c2718c5e 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 129be081..66ce19f6 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + if (Heap_uLT(Heap_heapsize, t)) { + Heap_ExtendHeap(t - Heap_heapsize); } Heap_firstTry = 0; new = Heap_NEWREC(tag); - Heap_firstTry = 1; if (new == NIL) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 48), 6) - Heap_heapsize); + Heap_ExtendHeap(blksz); new = Heap_NEWREC(tag); } + Heap_firstTry = 1; Heap_Unlock(); return new; } else { diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index c019c8f0..c6640fd2 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index b0a58209..699bf421 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 8771bb17..2adfd91d 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 47de29e6..a27fa4ca 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index e546e68f..ad9b40c7 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 062bc79b..92219dc5 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index bc980a30..dc5cdfc7 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 7b8be0fd..0cfdc99a 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 1a2a6e4e..fd042e7f 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index b636f79f..f9a740ff 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index eca79f7f..b4949ef8 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index fd0e7bba..d98c7f8a 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 6596c0d4..2ae74912 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 9b550db2..cf8d3659 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index ef7dd6a8..ec74311c 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 0c366e14..0965fdba 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 46b04b0d..8493d416 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 82df8d74..a9a7495f 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index cc5af1e0..fb7415a8 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index e618a17f..4c82c9d2 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 96523fd2..02a9a0cd 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 1cc18e85..4976039b 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index fc275a0e..b1044c30 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 90f9337c..1cc614c5 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index e63580fb..68cdf219 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index e9b54970..5eea7749 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index a89d3713..6b4d7af2 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index e16da294..76f04f6d 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index fcee0af8..812e751b 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 793e9025..90a3382a 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e1375387..e3ab156a 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index d81a9a43..a3ea0f88 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 1e31b260..8054febd 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index daf3ac70..da289d26 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 3d38721d..3a25f202 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index c21b4aee..0e8fed90 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index d5a4f08e..dac990ab 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -289,16 +289,17 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - if (Heap_uLT(Heap_heapsize - Heap_allocated, blksz) || Heap_uLT(__ASHL((Heap_heapsize - Heap_allocated) - blksz, 2), Heap_heapsize)) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); + t = __ASHL(__DIV(Heap_allocated + blksz, 96), 7); + if (Heap_uLT(Heap_heapsize, t)) { + Heap_ExtendHeap(t - Heap_heapsize); } Heap_firstTry = 0; new = Heap_NEWREC(tag); - Heap_firstTry = 1; if (new == NIL) { - Heap_ExtendHeap(__ASHL(__DIV(Heap_allocated + blksz, 96), 7) - Heap_heapsize); + Heap_ExtendHeap(blksz); new = Heap_NEWREC(tag); } + Heap_firstTry = 1; Heap_Unlock(); return new; } else { diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 4512d96e..cb98d8fc 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 016ad7b2..b7ed8754 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 00cdc69f..77d4cfb2 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 47de29e6..a27fa4ca 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index e546e68f..ad9b40c7 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 062bc79b..92219dc5 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index bc980a30..dc5cdfc7 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 315fb4d2..bb66f347 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 1a2a6e4e..fd042e7f 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index a8eff270..77801b58 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index eca79f7f..b4949ef8 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index fd0e7bba..d98c7f8a 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 6596c0d4..2ae74912 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index a855a25f..58ed2541 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index ef7dd6a8..ec74311c 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index df10c2a8..4186de2e 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 46b04b0d..8493d416 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 82df8d74..a9a7495f 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index cc5af1e0..fb7415a8 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index d168bcfb..404eeb1a 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index f1fff926..980e5732 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 1cc18e85..4976039b 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index fc275a0e..b1044c30 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 90f9337c..1cc614c5 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index e63580fb..68cdf219 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index a0c55c7d..5d9a398d 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 21d2344a..a35e5e97 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index e16da294..76f04f6d 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index fcee0af8..812e751b 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 793e9025..90a3382a 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e1375387..e3ab156a 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 2a65229fefaaf06e2b7584ed368e5357b3008ad2 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Mon, 26 Dec 2016 00:09:35 +0400 Subject: [PATCH 117/241] added 'make install' to the readme. --- ReadMe.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 3e2120a5..a420ab86 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -32,7 +32,7 @@ with the following simple steps: 1. Install pre-requisites such as git, gcc, static C libraries, diff utils. 2. Clone the repository and run 'make full'. - 3. Optionally install to a system directory such as /opt or /usr/local/share. + 3. Optionally install to a system directory such as /opt or /usr/local/share with 'make install'. 4. Set your PATH variable to include the compiler binary. These are detailed below: @@ -302,4 +302,4 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015 ## History -See [**History**](/doc/History.md). \ No newline at end of file +See [**History**](/doc/History.md). From 173c83f21753594cbcdb1cf6adea465927d0390e Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 28 Dec 2016 12:33:34 +0000 Subject: [PATCH 118/241] Integrate OFront fix for unsigned DIV in heap. --- src/runtime/Heap.Mod | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 83d5e6e7..f01b9c7b 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -4,12 +4,13 @@ MODULE Heap; before any other modules are initialized. *) CONST - ModNameLen = 20; - CmdNameLen = 24; - SZA = SIZE(S.ADDRESS); (* Size of address *) - Unit = 4*SZA; (* smallest possible heap block *) - nofLists = 9; (* number of freelist entries excluding sentinel *) - heapSize0 = 8000*Unit; (* startup heap size *) + ModNameLen = 20; + CmdNameLen = 24; + SZA = SIZE(S.ADDRESS); (* Size of address *) + Unit = 4*SZA; (* Smallest possible heap block *) + nofLists = 9; (* Number of freelist entries excluding sentinel *) + heapSize0 = 8000*Unit; (* Startup heap size *) + heapMinExpand = 10000*Unit; (* minimum heap expansion size *) (* all blocks look the same: free blocks describe themselves: size = Unit @@ -78,6 +79,8 @@ MODULE Heap; bigBlocks: S.ADDRESS; allocated*: S.ADDRESS; firstTry: BOOLEAN; + ldUnit: INTEGER; (* Unit = 2^ldUnit, for unsigned division expressed as logical shift right *) + (* extensible heap *) heap-: S.ADDRESS; (* the sorted list of heap chunks *) @@ -210,8 +213,8 @@ MODULE Heap; PROCEDURE ExtendHeap(blksz: S.ADDRESS); VAR size, chnk, j, next: S.ADDRESS; BEGIN - IF uLT(10000*Unit, blksz) THEN size := blksz - ELSE size := 10000*Unit (* additional heuristics *) + IF uLT(heapMinExpand, blksz) THEN size := blksz + ELSE size := heapMinExpand (* additional heuristics for avoiding many small heap expansions *) END; chnk := NewChunk(size); IF chnk # 0 THEN @@ -239,15 +242,15 @@ MODULE Heap; Lock(); S.GET(tag, blksz); - ASSERT((Unit = 16) OR (Unit = 32)); ASSERT(SIZE(S.PTR) = SIZE(S.ADDRESS)); ASSERT(blksz MOD Unit = 0); - i0 := blksz DIV Unit; i := i0; - IF uLT(i, nofLists) THEN adr := freeList[i]; + i0 := S.LSH(blksz, -ldUnit); (*uDIV Unit*) + i := i0; + IF i < nofLists THEN adr := freeList[i]; WHILE adr = 0 DO INC(i); adr := freeList[i] END END; - IF uLT(i, nofLists) THEN (* Unlink from freelist[i] *) + IF i < nofLists THEN (* Unlink from freelist[i] *) S.GET(adr + nextOff, next); freeList[i] := next; IF i # i0 THEN (* Split *) @@ -266,11 +269,11 @@ MODULE Heap; IF adr = 0 THEN (* Nothing free *) IF firstTry THEN GC(TRUE); INC(blksz, Unit); - (* Anti-thrashing heuristics: ensure 1/4 of the heap will not be allocated. *) - t := (allocated + blksz) DIV (3*Unit) * (4*Unit); (* Minimum required new heapsize *) + (* Anti-thrashing heuristics: ensure 1/5 of the heap will not be allocated. *) + t := S.LSH(allocated + blksz, -2) (*uDIV 4*) * 5 ; (* Minimum preferred heapsize *) IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END; firstTry := FALSE; new := NEWREC(tag); - IF new = NIL THEN (* Fragmentation prevented allocation, heap is 1/4 free *) + IF new = NIL THEN (* Heap is 1/5 free but fragmentation prevented allocation *) ExtendHeap(blksz); new := NEWREC(tag) (* Will find a free block if heap has been expanded successfully *) END; @@ -395,7 +398,8 @@ MODULE Heap; S.PUT(start, start+SZA); S.PUT(start+sizeOff, freesize); S.PUT(start+sntlOff, NoPtrSntl); - i := freesize DIV Unit; freesize := 0; + i := S.LSH(freesize, -ldUnit) (*uDIV Unit*); + freesize := 0; IF uLT(i, nofLists) THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start END @@ -416,7 +420,8 @@ MODULE Heap; S.PUT(start, start+SZA); S.PUT(start+sizeOff, freesize); S.PUT(start+sntlOff, NoPtrSntl); - i := freesize DIV Unit; freesize := 0; + i := S.LSH(freesize, -ldUnit) (*uDIV Unit*); + freesize := 0; IF uLT(i, nofLists) THEN S.PUT(start + nextOff, freeList[i]); freeList[i] := start ELSE S.PUT(start + nextOff, bigBlocks); bigBlocks := start END @@ -595,6 +600,9 @@ MODULE Heap; heapMax := 0; bigBlocks := 0; + ASSERT((Unit = 16) OR (Unit = 32)); + IF Unit = 16 THEN ldUnit := 4 ELSE ldUnit := 5 END; + heap := NewChunk(heapSize0); S.PUT(heap + nextChnkOff, AddressZero); From 6c9fdacce5d1551f76cb7c348b0d933d1e3e5ea5 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 28 Dec 2016 12:34:28 +0000 Subject: [PATCH 119/241] Update bootstrap C source --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 16 +++++++++------- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 16 +++++++++------- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 16 +++++++++------- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 16 +++++++++------- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 16 +++++++++------- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 230 insertions(+), 220 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index a3ea0f88..7e60820e 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 8054febd..38996368 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index da289d26..30cb74e8 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 069bed68..a6e0e050 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 4ed75358..16f28ca6 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 66ce19f6..1afb3591 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,6 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; +static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; @@ -257,16 +258,16 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) SYSTEM_PTR new; Heap_Lock(); __GET(tag, blksz, INT32); - i0 = __ASHR(blksz, 4); + i0 = __LSH(blksz, -Heap_ldUnit, 32); i = i0; - if (Heap_uLT(i, 9)) { + if (i < 9) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (Heap_uLT(i, 9)) { + if (i < 9) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -289,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -444,7 +445,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -470,7 +471,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -757,6 +758,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index c6640fd2..dfb69c3b 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 02aa54a7..9b704eaa 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 2adfd91d..b91a4bb6 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index a27fa4ca..6b05efda 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index ad9b40c7..fe90c6cf 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 92219dc5..e1589255 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index dc5cdfc7..e89cf071 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 0cfdc99a..9917bacf 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index fd042e7f..2b8f8082 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index f9a740ff..0f234a0c 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index b4949ef8..e29fd063 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index d98c7f8a..706aa7f6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 2ae74912..aaa0e316 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 3dbeab79..18cbbeb1 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index ec74311c..8c448452 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 0965fdba..3726a7a6 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 8493d416..05057877 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 0523671f..d471878f 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index fb7415a8..a8cec2fe 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index ce556023..60d8fc27 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 7c570eae..4bacbebb 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 4976039b..a922fa33 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index b1044c30..18363fbb 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 1cc614c5..bfa49f9a 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 68cdf219..65b61b6b 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 3e44b72b..ba0e2d5a 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index f31da607..1618c9e7 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 76f04f6d..25fcc26d 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 812e751b..e97f887c 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 90a3382a..3d36c2b5 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e3ab156a..f4aa7420 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index a3ea0f88..7e60820e 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 8054febd..38996368 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index da289d26..30cb74e8 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 069bed68..a6e0e050 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 4ed75358..16f28ca6 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 66ce19f6..1afb3591 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,6 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; +static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; @@ -257,16 +258,16 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) SYSTEM_PTR new; Heap_Lock(); __GET(tag, blksz, INT32); - i0 = __ASHR(blksz, 4); + i0 = __LSH(blksz, -Heap_ldUnit, 32); i = i0; - if (Heap_uLT(i, 9)) { + if (i < 9) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (Heap_uLT(i, 9)) { + if (i < 9) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -289,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -444,7 +445,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -470,7 +471,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -757,6 +758,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index c6640fd2..dfb69c3b 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 02aa54a7..9b704eaa 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 2adfd91d..b91a4bb6 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index a27fa4ca..6b05efda 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index ad9b40c7..fe90c6cf 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 92219dc5..e1589255 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index dc5cdfc7..e89cf071 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 0cfdc99a..9917bacf 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index fd042e7f..2b8f8082 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index f9a740ff..0f234a0c 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index b4949ef8..e29fd063 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index d98c7f8a..706aa7f6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 2ae74912..aaa0e316 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index cf8d3659..28197756 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index ec74311c..8c448452 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 0965fdba..3726a7a6 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 8493d416..05057877 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 0523671f..d471878f 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index fb7415a8..a8cec2fe 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index ce556023..60d8fc27 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 7c570eae..4bacbebb 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 4976039b..a922fa33 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index b1044c30..18363fbb 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 1cc614c5..bfa49f9a 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 68cdf219..65b61b6b 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 5eea7749..6526fc8e 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 6b4d7af2..a13ba9f8 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 76f04f6d..25fcc26d 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 812e751b..e97f887c 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 90a3382a..3d36c2b5 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e3ab156a..f4aa7420 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index a3ea0f88..7e60820e 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 8054febd..38996368 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index da289d26..30cb74e8 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index b1517add..c25fd9fb 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 64602dd6..9434f0cd 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index dac990ab..2951a621 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,6 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; +static INT16 Heap_ldUnit; export INT64 Heap_heap; static INT64 Heap_heapMin, Heap_heapMax; export INT64 Heap_heapsize; @@ -257,16 +258,16 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) SYSTEM_PTR new; Heap_Lock(); __GET(tag, blksz, INT64); - i0 = __ASHR(blksz, 5); + i0 = __LSH(blksz, -Heap_ldUnit, 64); i = i0; - if (Heap_uLT(i, 9)) { + if (i < 9) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (Heap_uLT(i, 9)) { + if (i < 9) { __GET(adr + 24, next, INT64); Heap_freeList[i] = next; if (i != i0) { @@ -289,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __ASHL(__DIV(Heap_allocated + blksz, 96), 7); + t = __LSHR(Heap_allocated + blksz, 2, 64) * 5; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -444,7 +445,7 @@ static void Heap_Scan (void) __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); - i = __ASHR(freesize, 5); + i = __LSH(freesize, -Heap_ldUnit, 64); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); @@ -470,7 +471,7 @@ static void Heap_Scan (void) __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); - i = __ASHR(freesize, 5); + i = __LSH(freesize, -Heap_ldUnit, 64); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); @@ -757,6 +758,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_ldUnit = 5; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index cb98d8fc..1faa5e4f 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 947bfc0b..3d62c928 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 77d4cfb2..06b12062 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index a27fa4ca..6b05efda 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index ad9b40c7..fe90c6cf 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 92219dc5..e1589255 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index dc5cdfc7..e89cf071 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index bb66f347..8daf5373 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index fd042e7f..2b8f8082 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 77801b58..9178c8e7 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index b4949ef8..e29fd063 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index d98c7f8a..706aa7f6 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 2ae74912..aaa0e316 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 58ed2541..cda9a6a5 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index ec74311c..8c448452 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 4186de2e..3b2a324b 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 8493d416..05057877 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 0523671f..d471878f 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index fb7415a8..a8cec2fe 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 193a781b..dbcea6e1 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index a6957766..ec49b926 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 4976039b..a922fa33 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index b1044c30..18363fbb 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 1cc614c5..bfa49f9a 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 68cdf219..65b61b6b 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 5d9a398d..4f8c5dea 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index a35e5e97..d1b30427 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 76f04f6d..25fcc26d 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 812e751b..e97f887c 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 90a3382a..3d36c2b5 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e3ab156a..f4aa7420 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index a3ea0f88..7e60820e 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 8054febd..38996368 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index da289d26..30cb74e8 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 8fa17a0c..1cb63e96 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index c2718c5e..846cca0a 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 66ce19f6..1afb3591 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,6 +68,7 @@ static INT32 Heap_freeList[10]; static INT32 Heap_bigBlocks; export INT32 Heap_allocated; static BOOLEAN Heap_firstTry; +static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; export INT32 Heap_heapsize; @@ -257,16 +258,16 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) SYSTEM_PTR new; Heap_Lock(); __GET(tag, blksz, INT32); - i0 = __ASHR(blksz, 4); + i0 = __LSH(blksz, -Heap_ldUnit, 32); i = i0; - if (Heap_uLT(i, 9)) { + if (i < 9) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (Heap_uLT(i, 9)) { + if (i < 9) { __GET(adr + 12, next, INT32); Heap_freeList[i] = next; if (i != i0) { @@ -289,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __ASHL(__DIV(Heap_allocated + blksz, 48), 6); + t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -444,7 +445,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -470,7 +471,7 @@ static void Heap_Scan (void) __PUT(start, start + 4, INT32); __PUT(start + 4, freesize, INT32); __PUT(start + 8, -4, INT32); - i = __ASHR(freesize, 4); + i = __LSH(freesize, -Heap_ldUnit, 32); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 12, Heap_freeList[i], INT32); @@ -757,6 +758,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); Heap_firstTry = 1; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index c6640fd2..dfb69c3b 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 699bf421..c6b518ca 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 2adfd91d..b91a4bb6 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index a27fa4ca..6b05efda 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index ad9b40c7..fe90c6cf 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 92219dc5..e1589255 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index dc5cdfc7..e89cf071 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 0cfdc99a..9917bacf 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index fd042e7f..2b8f8082 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index f9a740ff..0f234a0c 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index b4949ef8..e29fd063 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index d98c7f8a..706aa7f6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 2ae74912..aaa0e316 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index cf8d3659..28197756 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index ec74311c..8c448452 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 0965fdba..3726a7a6 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 8493d416..05057877 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index a9a7495f..9cc9d7e2 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index fb7415a8..a8cec2fe 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 4c82c9d2..fbad62b2 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 02a9a0cd..930a74b9 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 4976039b..a922fa33 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index b1044c30..18363fbb 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 1cc614c5..bfa49f9a 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 68cdf219..65b61b6b 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 5eea7749..6526fc8e 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 6b4d7af2..a13ba9f8 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 76f04f6d..25fcc26d 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 812e751b..e97f887c 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 90a3382a..3d36c2b5 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e3ab156a..f4aa7420 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index a3ea0f88..7e60820e 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 8054febd..38996368 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index da289d26..30cb74e8 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 3a25f202..37f1f36f 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 0e8fed90..1777e27f 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index dac990ab..2951a621 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -68,6 +68,7 @@ static INT64 Heap_freeList[10]; static INT64 Heap_bigBlocks; export INT64 Heap_allocated; static BOOLEAN Heap_firstTry; +static INT16 Heap_ldUnit; export INT64 Heap_heap; static INT64 Heap_heapMin, Heap_heapMax; export INT64 Heap_heapsize; @@ -257,16 +258,16 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) SYSTEM_PTR new; Heap_Lock(); __GET(tag, blksz, INT64); - i0 = __ASHR(blksz, 5); + i0 = __LSH(blksz, -Heap_ldUnit, 64); i = i0; - if (Heap_uLT(i, 9)) { + if (i < 9) { adr = Heap_freeList[i]; while (adr == 0) { i += 1; adr = Heap_freeList[i]; } } - if (Heap_uLT(i, 9)) { + if (i < 9) { __GET(adr + 24, next, INT64); Heap_freeList[i] = next; if (i != i0) { @@ -289,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __ASHL(__DIV(Heap_allocated + blksz, 96), 7); + t = __LSHR(Heap_allocated + blksz, 2, 64) * 5; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -444,7 +445,7 @@ static void Heap_Scan (void) __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); - i = __ASHR(freesize, 5); + i = __LSH(freesize, -Heap_ldUnit, 64); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); @@ -470,7 +471,7 @@ static void Heap_Scan (void) __PUT(start, start + 8, INT64); __PUT(start + 8, freesize, INT64); __PUT(start + 16, -8, INT64); - i = __ASHR(freesize, 5); + i = __LSH(freesize, -Heap_ldUnit, 64); freesize = 0; if (Heap_uLT(i, 9)) { __PUT(start + 24, Heap_freeList[i], INT64); @@ -757,6 +758,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_ldUnit = 5; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); Heap_firstTry = 1; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index cb98d8fc..1faa5e4f 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index b7ed8754..1833d072 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 77d4cfb2..06b12062 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index a27fa4ca..6b05efda 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index ad9b40c7..fe90c6cf 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 92219dc5..e1589255 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index dc5cdfc7..e89cf071 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index bb66f347..8daf5373 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index fd042e7f..2b8f8082 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 77801b58..9178c8e7 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index b4949ef8..e29fd063 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index d98c7f8a..706aa7f6 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 2ae74912..aaa0e316 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 58ed2541..cda9a6a5 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index ec74311c..8c448452 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 4186de2e..3b2a324b 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 8493d416..05057877 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index a9a7495f..9cc9d7e2 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index fb7415a8..a8cec2fe 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 404eeb1a..a9c27eea 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 980e5732..1b83ccd6 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 4976039b..a922fa33 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index b1044c30..18363fbb 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 1cc614c5..bfa49f9a 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 68cdf219..65b61b6b 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 5d9a398d..4f8c5dea 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index a35e5e97..d1b30427 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 76f04f6d..25fcc26d 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 812e751b..e97f887c 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 90a3382a..3d36c2b5 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e3ab156a..f4aa7420 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/22]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 265ac23f6e60751a4fcae404e129a4f78e95f7a4 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 28 Dec 2016 13:05:16 +0000 Subject: [PATCH 120/241] Restore 4*Unit heap allocation multiple. --- src/runtime/Heap.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index f01b9c7b..a3392fa8 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -270,7 +270,7 @@ MODULE Heap; IF firstTry THEN GC(TRUE); INC(blksz, Unit); (* Anti-thrashing heuristics: ensure 1/5 of the heap will not be allocated. *) - t := S.LSH(allocated + blksz, -2) (*uDIV 4*) * 5 ; (* Minimum preferred heapsize *) + t := S.LSH(allocated + blksz, -(ldUnit+2)) (*uDIV 4*Unit*) * (5*Unit) ; (* Minimum preferred heapsize *) IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END; firstTry := FALSE; new := NEWREC(tag); IF new = NIL THEN (* Heap is 1/5 free but fragmentation prevented allocation *) From ee6e5fe7b409720b6b3bc874e4447d57c42ad6f5 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 28 Dec 2016 13:06:10 +0000 Subject: [PATCH 121/241] Update bootstrap C source --- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-88/Heap.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 1afb3591..e1dac3b3 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -290,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; + t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 1afb3591..e1dac3b3 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -290,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; + t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 2951a621..bc1ace8e 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -290,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __LSHR(Heap_allocated + blksz, 2, 64) * 5; + t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 64) * 160; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 1afb3591..e1dac3b3 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -290,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSHR(Heap_allocated + blksz, 2, 32) * 5; + t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 2951a621..bc1ace8e 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -290,7 +290,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __LSHR(Heap_allocated + blksz, 2, 64) * 5; + t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 64) * 160; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } From 6a20f8f951e6c8c1cf1fcdbe3d37ce559ccdcc6f Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 28 Dec 2016 14:47:16 +0000 Subject: [PATCH 122/241] Fix for dynamic library installation. --- src/tools/make/oberon.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 553b02f6..4de7e18b 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -189,7 +189,7 @@ installable: uninstall: installable @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' rm -rf "$(INSTALLDIR)" - @sh src/tools/make/addlibrary.sh uninstall \""$(INSTALLDIR)/lib"\" $(oname) + @sh src/tools/make/addlibrary.sh uninstall "$(INSTALLDIR)/lib" $(oname) # install: Use only after a successful full build. Installs the compiler @@ -199,7 +199,7 @@ install: uninstall @printf '\nInstalling into \"$(INSTALLDIR)\"\n' @rm -rf "$(INSTALLDIR)" @cp -rf "$(ROOTDIR)/install/" "$(INSTALLDIR)" - @sh src/tools/make/addlibrary.sh install \""$(INSTALLDIR)/lib"\" $(ONAME) + @sh src/tools/make/addlibrary.sh install "$(INSTALLDIR)/lib" $(ONAME) @printf '\nOberon compiler installed to $(INSTALLDIR)\n' @printf '\nNow add $(INSTALLDIR)/bin to your path, for example with the command:\n' @printf 'export PATH=\"$(INSTALLDIR)/bin:$$PATH\"\n' From 0666629e1eb68280191917c5a4afe3e8c6deebc4 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 29 Dec 2016 15:28:04 +0000 Subject: [PATCH 123/241] J. Templ heap tweaks - improved handling in extreme memory scenarios. --- src/runtime/Heap.Mod | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index a3392fa8..885b4899 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -10,7 +10,6 @@ MODULE Heap; Unit = 4*SZA; (* Smallest possible heap block *) nofLists = 9; (* Number of freelist entries excluding sentinel *) heapSize0 = 8000*Unit; (* Startup heap size *) - heapMinExpand = 10000*Unit; (* minimum heap expansion size *) (* all blocks look the same: free blocks describe themselves: size = Unit @@ -83,10 +82,11 @@ MODULE Heap; (* extensible heap *) - heap-: S.ADDRESS; (* the sorted list of heap chunks *) - heapMin: S.ADDRESS; (* Range of valid pointer values, used for stack collection *) - heapMax: S.ADDRESS; - heapsize*: S.ADDRESS; (* the sum of all heap chunk sizes *) + heap-: S.ADDRESS; (* the sorted list of heap chunks *) + heapMin: S.ADDRESS; (* Range of valid pointer values, used for stack collection *) + heapMax: S.ADDRESS; + heapsize*: S.ADDRESS; (* the sum of all heap chunk sizes *) + heapMinExpand*: S.ADDRESS; (* minimum heap expansion size *) (* finalization candidates *) fin: FinNode; @@ -213,6 +213,7 @@ MODULE Heap; PROCEDURE ExtendHeap(blksz: S.ADDRESS); VAR size, chnk, j, next: S.ADDRESS; BEGIN + ASSERT(blksz MOD Unit = 0); IF uLT(heapMinExpand, blksz) THEN size := blksz ELSE size := heapMinExpand (* additional heuristics for avoiding many small heap expansions *) END; @@ -229,6 +230,12 @@ MODULE Heap; END; S.PUT(chnk, next); S.PUT(j, chnk) END + ELSIF ~firstTry THEN + (* Heap memory exhausted, i.e. heap is not expanded and NEWREC() will return NIL. + In order to be able to report a trap due to NIL access, there is more + memory needed, which may be available by reducing heapMinExpand. *) + heapMinExpand := Unit + (* ELSE firstTry: ignore failed heap expansion for anti-thrashing heuristics. *) END END ExtendHeap; @@ -270,8 +277,10 @@ MODULE Heap; IF firstTry THEN GC(TRUE); INC(blksz, Unit); (* Anti-thrashing heuristics: ensure 1/5 of the heap will not be allocated. *) - t := S.LSH(allocated + blksz, -(ldUnit+2)) (*uDIV 4*Unit*) * (5*Unit) ; (* Minimum preferred heapsize *) - IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END; + t := S.LSH(allocated + blksz, -(2+ldUnit)) (*uDIV 4*Unit*) * (5*Unit) ; (* Minimum preferred heapsize *) + IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) + (* If there is not enough heap memory then the heap will be expanded below by blksz *) + END; firstTry := FALSE; new := NEWREC(tag); IF new = NIL THEN (* Heap is 1/5 free but fragmentation prevented allocation *) ExtendHeap(blksz); @@ -592,13 +601,14 @@ MODULE Heap; (* InitHeap is called by Platform.init before any module bodies have been initialised, to enable NEW, S.NEW *) BEGIN - heap := 0; - heapsize := 0; - allocated := 0; - lockdepth := 0; - heapMin := -1; (* all bits set *) - heapMax := 0; - bigBlocks := 0; + heap := 0; + heapsize := 0; + allocated := 0; + lockdepth := 0; + heapMin := -1; (* all bits set = max unsigned value *) + heapMax := 0; + bigBlocks := 0; + heapMinExpand := heapSize0; ASSERT((Unit = 16) OR (Unit = 32)); IF Unit = 16 THEN ldUnit := 4 ELSE ldUnit := 5 END; From a4dfd37908faff276bc46f69b5db6a9168674b98 Mon Sep 17 00:00:00 2001 From: David Brown Date: Thu, 29 Dec 2016 15:30:06 +0000 Subject: [PATCH 124/241] Update bootstrap C source. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 13 ++++++++----- bootstrap/unix-44/Heap.h | 4 ++-- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 13 ++++++++----- bootstrap/unix-48/Heap.h | 4 ++-- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 13 ++++++++----- bootstrap/unix-88/Heap.h | 4 ++-- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 13 ++++++++----- bootstrap/windows-48/Heap.h | 4 ++-- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 13 ++++++++----- bootstrap/windows-88/Heap.h | 4 ++-- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 230 insertions(+), 215 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 7e60820e..911e21ee 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 38996368..04c3e0a2 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 30cb74e8..4fe31caa 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index a6e0e050..c8e14080 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 16f28ca6..f6dde2f7 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index e1dac3b3..217e035b 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -71,7 +71,7 @@ static BOOLEAN Heap_firstTry; static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; -export INT32 Heap_heapsize; +export INT32 Heap_heapsize, Heap_heapMinExpand; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; static BOOLEAN Heap_interrupted; @@ -229,10 +229,10 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (Heap_uLT(160000, blksz)) { + if (Heap_uLT(Heap_heapMinExpand, blksz)) { size = blksz; } else { - size = 160000; + size = Heap_heapMinExpand; } chnk = Heap_NewChunk(size); if (chnk != 0) { @@ -249,6 +249,8 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } + } else if (!Heap_firstTry) { + Heap_heapMinExpand = 16; } } @@ -290,7 +292,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; + t = __LSH(Heap_allocated + blksz, -(2 + Heap_ldUnit), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -758,6 +760,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_heapMinExpand = 128000; Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index dfb69c3b..d61c3744 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -48,7 +48,7 @@ typedef import SYSTEM_PTR Heap_modules; import INT32 Heap_allocated; import INT32 Heap_heap; -import INT32 Heap_heapsize; +import INT32 Heap_heapsize, Heap_heapMinExpand; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 9b704eaa..3ff43937 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index b91a4bb6..b368cc1a 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 6b05efda..59b8d208 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index fe90c6cf..1c809cd1 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index e1589255..404bb438 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index e89cf071..f5c2f02d 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 9917bacf..8c787e94 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 2b8f8082..625b3bf2 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 0f234a0c..c4884016 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index e29fd063..dc90a8c8 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 706aa7f6..0acb8eaa 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index aaa0e316..9bdd4251 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 18cbbeb1..d23cc38d 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 8c448452..a45f81b7 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 3726a7a6..7260ce0d 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 05057877..c5b53d0d 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index d471878f..6316edf5 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index a8cec2fe..0b685b73 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 60d8fc27..851cc99e 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 4bacbebb..9f1d94e2 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index a922fa33..5bb59706 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 18363fbb..b55f2e0b 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index bfa49f9a..932edba2 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 65b61b6b..f59925b7 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index ba0e2d5a..92d223fe 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 1618c9e7..3cd28223 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 25fcc26d..119ba2ab 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index e97f887c..14d4edd0 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 3d36c2b5..42332091 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index f4aa7420..f1a5292e 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 7e60820e..911e21ee 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 38996368..04c3e0a2 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 30cb74e8..4fe31caa 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index a6e0e050..c8e14080 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 16f28ca6..f6dde2f7 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index e1dac3b3..217e035b 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -71,7 +71,7 @@ static BOOLEAN Heap_firstTry; static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; -export INT32 Heap_heapsize; +export INT32 Heap_heapsize, Heap_heapMinExpand; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; static BOOLEAN Heap_interrupted; @@ -229,10 +229,10 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (Heap_uLT(160000, blksz)) { + if (Heap_uLT(Heap_heapMinExpand, blksz)) { size = blksz; } else { - size = 160000; + size = Heap_heapMinExpand; } chnk = Heap_NewChunk(size); if (chnk != 0) { @@ -249,6 +249,8 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } + } else if (!Heap_firstTry) { + Heap_heapMinExpand = 16; } } @@ -290,7 +292,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; + t = __LSH(Heap_allocated + blksz, -(2 + Heap_ldUnit), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -758,6 +760,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_heapMinExpand = 128000; Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index dfb69c3b..d61c3744 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -48,7 +48,7 @@ typedef import SYSTEM_PTR Heap_modules; import INT32 Heap_allocated; import INT32 Heap_heap; -import INT32 Heap_heapsize; +import INT32 Heap_heapsize, Heap_heapMinExpand; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 9b704eaa..3ff43937 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index b91a4bb6..b368cc1a 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 6b05efda..59b8d208 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index fe90c6cf..1c809cd1 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index e1589255..404bb438 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index e89cf071..f5c2f02d 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 9917bacf..8c787e94 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 2b8f8082..625b3bf2 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 0f234a0c..c4884016 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index e29fd063..dc90a8c8 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 706aa7f6..0acb8eaa 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index aaa0e316..9bdd4251 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 28197756..b0e1d20d 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 8c448452..a45f81b7 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 3726a7a6..7260ce0d 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 05057877..c5b53d0d 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index d471878f..6316edf5 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index a8cec2fe..0b685b73 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 60d8fc27..851cc99e 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 4bacbebb..9f1d94e2 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index a922fa33..5bb59706 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 18363fbb..b55f2e0b 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index bfa49f9a..932edba2 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 65b61b6b..f59925b7 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 6526fc8e..ad27510d 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index a13ba9f8..78bbb622 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 25fcc26d..119ba2ab 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index e97f887c..14d4edd0 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 3d36c2b5..42332091 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index f4aa7420..f1a5292e 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 7e60820e..911e21ee 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 38996368..04c3e0a2 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 30cb74e8..4fe31caa 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index c25fd9fb..a82f121a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 9434f0cd..f9116c3d 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index bc1ace8e..8ed516c2 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -71,7 +71,7 @@ static BOOLEAN Heap_firstTry; static INT16 Heap_ldUnit; export INT64 Heap_heap; static INT64 Heap_heapMin, Heap_heapMax; -export INT64 Heap_heapsize; +export INT64 Heap_heapsize, Heap_heapMinExpand; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; static BOOLEAN Heap_interrupted; @@ -229,10 +229,10 @@ static INT64 Heap_NewChunk (INT64 blksz) static void Heap_ExtendHeap (INT64 blksz) { INT64 size, chnk, j, next; - if (Heap_uLT(320000, blksz)) { + if (Heap_uLT(Heap_heapMinExpand, blksz)) { size = blksz; } else { - size = 320000; + size = Heap_heapMinExpand; } chnk = Heap_NewChunk(size); if (chnk != 0) { @@ -249,6 +249,8 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } + } else if (!Heap_firstTry) { + Heap_heapMinExpand = 32; } } @@ -290,7 +292,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 64) * 160; + t = __LSH(Heap_allocated + blksz, -(2 + Heap_ldUnit), 64) * 160; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -758,6 +760,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_heapMinExpand = 256000; Heap_ldUnit = 5; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 1faa5e4f..b22b092f 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -48,7 +48,7 @@ typedef import SYSTEM_PTR Heap_modules; import INT64 Heap_allocated; import INT64 Heap_heap; -import INT64 Heap_heapsize; +import INT64 Heap_heapsize, Heap_heapMinExpand; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 3d62c928..27292d4a 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 06b12062..0f7357d9 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 6b05efda..59b8d208 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index fe90c6cf..1c809cd1 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index e1589255..404bb438 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index e89cf071..f5c2f02d 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 8daf5373..48a4f21f 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 2b8f8082..625b3bf2 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 9178c8e7..37b0167c 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index e29fd063..dc90a8c8 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 706aa7f6..0acb8eaa 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index aaa0e316..9bdd4251 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index cda9a6a5..2c62b7b6 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 8c448452..a45f81b7 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 3b2a324b..08c51a1c 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 05057877..c5b53d0d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index d471878f..6316edf5 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index a8cec2fe..0b685b73 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index dbcea6e1..8781ae18 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index ec49b926..68f27069 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index a922fa33..5bb59706 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 18363fbb..b55f2e0b 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index bfa49f9a..932edba2 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 65b61b6b..f59925b7 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 4f8c5dea..6f68a05d 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index d1b30427..a407dbff 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 25fcc26d..119ba2ab 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index e97f887c..14d4edd0 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 3d36c2b5..42332091 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index f4aa7420..f1a5292e 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 7e60820e..911e21ee 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 38996368..04c3e0a2 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 30cb74e8..4fe31caa 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 1cb63e96..6cb72707 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 846cca0a..be215518 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index e1dac3b3..217e035b 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -71,7 +71,7 @@ static BOOLEAN Heap_firstTry; static INT16 Heap_ldUnit; export INT32 Heap_heap; static INT32 Heap_heapMin, Heap_heapMax; -export INT32 Heap_heapsize; +export INT32 Heap_heapsize, Heap_heapMinExpand; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; static BOOLEAN Heap_interrupted; @@ -229,10 +229,10 @@ static INT32 Heap_NewChunk (INT32 blksz) static void Heap_ExtendHeap (INT32 blksz) { INT32 size, chnk, j, next; - if (Heap_uLT(160000, blksz)) { + if (Heap_uLT(Heap_heapMinExpand, blksz)) { size = blksz; } else { - size = 160000; + size = Heap_heapMinExpand; } chnk = Heap_NewChunk(size); if (chnk != 0) { @@ -249,6 +249,8 @@ static void Heap_ExtendHeap (INT32 blksz) __PUT(chnk, next, INT32); __PUT(j, chnk, INT32); } + } else if (!Heap_firstTry) { + Heap_heapMinExpand = 16; } } @@ -290,7 +292,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 16; - t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 32) * 80; + t = __LSH(Heap_allocated + blksz, -(2 + Heap_ldUnit), 32) * 80; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -758,6 +760,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_heapMinExpand = 128000; Heap_ldUnit = 4; Heap_heap = Heap_NewChunk(128000); __PUT(Heap_heap, 0, INT32); diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index dfb69c3b..d61c3744 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -48,7 +48,7 @@ typedef import SYSTEM_PTR Heap_modules; import INT32 Heap_allocated; import INT32 Heap_heap; -import INT32 Heap_heapsize; +import INT32 Heap_heapsize, Heap_heapMinExpand; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index c6b518ca..b00d68e5 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index b91a4bb6..b368cc1a 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 6b05efda..59b8d208 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index fe90c6cf..1c809cd1 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index e1589255..404bb438 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index e89cf071..f5c2f02d 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 9917bacf..8c787e94 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 2b8f8082..625b3bf2 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 0f234a0c..c4884016 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index e29fd063..dc90a8c8 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 706aa7f6..0acb8eaa 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index aaa0e316..9bdd4251 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 28197756..b0e1d20d 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 8c448452..a45f81b7 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 3726a7a6..7260ce0d 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 05057877..c5b53d0d 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 9cc9d7e2..c9d24f3b 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index a8cec2fe..0b685b73 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index fbad62b2..879b566e 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 930a74b9..c0571816 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index a922fa33..5bb59706 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 18363fbb..b55f2e0b 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index bfa49f9a..932edba2 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 65b61b6b..f59925b7 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 6526fc8e..ad27510d 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index a13ba9f8..78bbb622 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 25fcc26d..119ba2ab 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index e97f887c..14d4edd0 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 3d36c2b5..42332091 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index f4aa7420..f1a5292e 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 7e60820e..911e21ee 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 38996368..04c3e0a2 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 30cb74e8..4fe31caa 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 37f1f36f..db896505 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 1777e27f..8805cf88 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index bc1ace8e..8ed516c2 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -71,7 +71,7 @@ static BOOLEAN Heap_firstTry; static INT16 Heap_ldUnit; export INT64 Heap_heap; static INT64 Heap_heapMin, Heap_heapMax; -export INT64 Heap_heapsize; +export INT64 Heap_heapsize, Heap_heapMinExpand; static Heap_FinNode Heap_fin; static INT16 Heap_lockdepth; static BOOLEAN Heap_interrupted; @@ -229,10 +229,10 @@ static INT64 Heap_NewChunk (INT64 blksz) static void Heap_ExtendHeap (INT64 blksz) { INT64 size, chnk, j, next; - if (Heap_uLT(320000, blksz)) { + if (Heap_uLT(Heap_heapMinExpand, blksz)) { size = blksz; } else { - size = 320000; + size = Heap_heapMinExpand; } chnk = Heap_NewChunk(size); if (chnk != 0) { @@ -249,6 +249,8 @@ static void Heap_ExtendHeap (INT64 blksz) __PUT(chnk, next, INT64); __PUT(j, chnk, INT64); } + } else if (!Heap_firstTry) { + Heap_heapMinExpand = 32; } } @@ -290,7 +292,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag) if (Heap_firstTry) { Heap_GC(1); blksz += 32; - t = __LSH(Heap_allocated + blksz, -(Heap_ldUnit + 2), 64) * 160; + t = __LSH(Heap_allocated + blksz, -(2 + Heap_ldUnit), 64) * 160; if (Heap_uLT(Heap_heapsize, t)) { Heap_ExtendHeap(t - Heap_heapsize); } @@ -758,6 +760,7 @@ void Heap_InitHeap (void) Heap_heapMin = -1; Heap_heapMax = 0; Heap_bigBlocks = 0; + Heap_heapMinExpand = 256000; Heap_ldUnit = 5; Heap_heap = Heap_NewChunk(256000); __PUT(Heap_heap, 0, INT64); diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 1faa5e4f..b22b092f 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h @@ -48,7 +48,7 @@ typedef import SYSTEM_PTR Heap_modules; import INT64 Heap_allocated; import INT64 Heap_heap; -import INT64 Heap_heapsize; +import INT64 Heap_heapsize, Heap_heapMinExpand; import INT16 Heap_FileCount; import ADDRESS *Heap_ModuleDesc__typ; diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 1833d072..8e635035 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 06b12062..0f7357d9 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 6b05efda..59b8d208 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index fe90c6cf..1c809cd1 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index e1589255..404bb438 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index e89cf071..f5c2f02d 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 8daf5373..48a4f21f 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 2b8f8082..625b3bf2 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 9178c8e7..37b0167c 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index e29fd063..dc90a8c8 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 706aa7f6..0acb8eaa 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index aaa0e316..9bdd4251 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index cda9a6a5..2c62b7b6 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 8c448452..a45f81b7 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 3b2a324b..08c51a1c 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 05057877..c5b53d0d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 9cc9d7e2..c9d24f3b 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index a8cec2fe..0b685b73 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index a9c27eea..5db8492c 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 1b83ccd6..950254ed 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index a922fa33..5bb59706 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 18363fbb..b55f2e0b 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index bfa49f9a..932edba2 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 65b61b6b..f59925b7 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 4f8c5dea..6f68a05d 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index d1b30427..a407dbff 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 25fcc26d..119ba2ab 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index e97f887c..14d4edd0 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 3d36c2b5..42332091 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index f4aa7420..f1a5292e 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/28]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From ba9498b592ec61a9afb6af76028ace96c626fcc5 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 1 Jan 2017 01:27:58 +0000 Subject: [PATCH 125/241] Fix verbose display of gcc command. --- src/compiler/extTools.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 98c9fa71..24ea1dc3 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -11,7 +11,7 @@ PROCEDURE execute(title: ARRAY OF CHAR; cmd: ARRAY OF CHAR); VAR r, status, exitcode: INTEGER; fullcmd: CommandString; BEGIN IF OPM.verbose IN OPM.Options THEN - Out.String(" "); Out.String(fullcmd); Out.Ln + Out.String(" "); Out.String(cmd); Out.Ln END; (* Hack to suppress unwanted filename display by Microsoft C compiler on successful compilations. *) From 284b105c80e5afdae8fe9bbe78b7ef45ade7dcd3 Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 1 Jan 2017 01:28:40 +0000 Subject: [PATCH 126/241] Update bootstrap C sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 ++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 ++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 ++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 ++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 ++-- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 195 insertions(+), 195 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 911e21ee..38c8117f 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 04c3e0a2..a65d07d6 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 4fe31caa..72e63747 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index c8e14080..d5fd78c7 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index f6dde2f7..9a0776b1 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 217e035b..8fc061ff 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index d61c3744..25310ebf 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 3ff43937..fac280fb 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index b368cc1a..8125a013 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 59b8d208..3779058a 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 1c809cd1..086dc5f6 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 404bb438..e9d9a49e 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f5c2f02d..fdcce95f 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 8c787e94..e475406d 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 625b3bf2..306f8ede 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index c4884016..bf3d11d5 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index dc90a8c8..ab6ef6cb 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 0acb8eaa..f77716b2 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 9bdd4251..f009c3c0 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index d23cc38d..4c2ce30b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index a45f81b7..305c3ef1 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 7260ce0d..51336832 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index c5b53d0d..60a80fc3 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 6316edf5..9d37e527 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0b685b73..7d83710b 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 851cc99e..f5b51345 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 9f1d94e2..69d52603 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 5bb59706..d73aa742 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index b55f2e0b..439e5203 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 932edba2..34b0450a 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index f59925b7..04b06545 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 92d223fe..c8d31144 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 3cd28223..ca48a032 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 119ba2ab..436790ae 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 14d4edd0..d8c8b46f 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 42332091..ef4097cd 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -35,7 +35,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { Out_String((CHAR*)" ", 3); - Out_String(fullcmd, 4096); + Out_String(cmd, cmd__len); Out_Ln(); } __COPY(cmd, fullcmd, 4096); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index f1a5292e..f05c741b 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 911e21ee..38c8117f 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 04c3e0a2..a65d07d6 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 4fe31caa..72e63747 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index c8e14080..d5fd78c7 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index f6dde2f7..9a0776b1 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 217e035b..8fc061ff 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index d61c3744..25310ebf 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 3ff43937..fac280fb 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index b368cc1a..8125a013 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 59b8d208..3779058a 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 1c809cd1..086dc5f6 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 404bb438..e9d9a49e 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f5c2f02d..fdcce95f 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 8c787e94..e475406d 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 625b3bf2..306f8ede 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index c4884016..bf3d11d5 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index dc90a8c8..ab6ef6cb 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 0acb8eaa..f77716b2 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 9bdd4251..f009c3c0 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index b0e1d20d..1c073903 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index a45f81b7..305c3ef1 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 7260ce0d..51336832 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index c5b53d0d..60a80fc3 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 6316edf5..9d37e527 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0b685b73..7d83710b 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 851cc99e..f5b51345 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 9f1d94e2..69d52603 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 5bb59706..d73aa742 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index b55f2e0b..439e5203 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 932edba2..34b0450a 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index f59925b7..04b06545 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index ad27510d..d63c3ed6 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 78bbb622..7a44b973 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 119ba2ab..436790ae 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 14d4edd0..d8c8b46f 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 42332091..ef4097cd 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -35,7 +35,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { Out_String((CHAR*)" ", 3); - Out_String(fullcmd, 4096); + Out_String(cmd, cmd__len); Out_Ln(); } __COPY(cmd, fullcmd, 4096); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index f1a5292e..f05c741b 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 911e21ee..38c8117f 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 04c3e0a2..a65d07d6 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 4fe31caa..72e63747 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index a82f121a..4448f8ba 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index f9116c3d..26195611 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 8ed516c2..27cb83e1 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index b22b092f..f2ead3af 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 27292d4a..9c2d3b1f 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 0f7357d9..100225d5 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 59b8d208..3779058a 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 1c809cd1..086dc5f6 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 404bb438..e9d9a49e 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f5c2f02d..fdcce95f 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 48a4f21f..664903f4 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 625b3bf2..306f8ede 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 37b0167c..8b9269cb 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index dc90a8c8..ab6ef6cb 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 0acb8eaa..f77716b2 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 9bdd4251..f009c3c0 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 2c62b7b6..19d654e6 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index a45f81b7..305c3ef1 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 08c51a1c..f4b2f0c9 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index c5b53d0d..60a80fc3 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 6316edf5..9d37e527 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0b685b73..7d83710b 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 8781ae18..344ace71 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 68f27069..833eff32 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 5bb59706..d73aa742 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index b55f2e0b..439e5203 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 932edba2..34b0450a 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index f59925b7..04b06545 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 6f68a05d..51082c36 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index a407dbff..037beccd 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 119ba2ab..436790ae 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 14d4edd0..d8c8b46f 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 42332091..ef4097cd 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -35,7 +35,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { Out_String((CHAR*)" ", 3); - Out_String(fullcmd, 4096); + Out_String(cmd, cmd__len); Out_Ln(); } __COPY(cmd, fullcmd, 4096); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index f1a5292e..f05c741b 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 911e21ee..38c8117f 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 04c3e0a2..a65d07d6 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 4fe31caa..72e63747 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 6cb72707..bdbed96c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index be215518..43167fa5 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 217e035b..8fc061ff 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index d61c3744..25310ebf 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index b00d68e5..60fa4748 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index b368cc1a..8125a013 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 59b8d208..3779058a 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 1c809cd1..086dc5f6 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 404bb438..e9d9a49e 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f5c2f02d..fdcce95f 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 8c787e94..e475406d 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 625b3bf2..306f8ede 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index c4884016..bf3d11d5 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index dc90a8c8..ab6ef6cb 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 0acb8eaa..f77716b2 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 9bdd4251..f009c3c0 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index b0e1d20d..1c073903 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index a45f81b7..305c3ef1 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 7260ce0d..51336832 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index c5b53d0d..60a80fc3 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index c9d24f3b..3950eb59 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0b685b73..7d83710b 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 879b566e..bc65bec9 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index c0571816..5e2fda7d 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 5bb59706..d73aa742 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index b55f2e0b..439e5203 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 932edba2..34b0450a 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index f59925b7..04b06545 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index ad27510d..d63c3ed6 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 78bbb622..7a44b973 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 119ba2ab..436790ae 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 14d4edd0..d8c8b46f 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 42332091..ef4097cd 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -35,7 +35,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { Out_String((CHAR*)" ", 3); - Out_String(fullcmd, 4096); + Out_String(cmd, cmd__len); Out_Ln(); } __COPY(cmd, fullcmd, 4096); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index f1a5292e..f05c741b 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 911e21ee..38c8117f 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 04c3e0a2..a65d07d6 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 4fe31caa..72e63747 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index db896505..032c4afb 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 8805cf88..66abb2c7 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 8ed516c2..27cb83e1 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index b22b092f..f2ead3af 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 8e635035..2a55e70b 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 0f7357d9..100225d5 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 59b8d208..3779058a 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 1c809cd1..086dc5f6 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 404bb438..e9d9a49e 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f5c2f02d..fdcce95f 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 48a4f21f..664903f4 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 625b3bf2..306f8ede 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 37b0167c..8b9269cb 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index dc90a8c8..ab6ef6cb 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 0acb8eaa..f77716b2 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 9bdd4251..f009c3c0 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 2c62b7b6..19d654e6 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index a45f81b7..305c3ef1 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 08c51a1c..f4b2f0c9 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index c5b53d0d..60a80fc3 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index c9d24f3b..3950eb59 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0b685b73..7d83710b 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 5db8492c..3c3b5124 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 950254ed..e210853f 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 5bb59706..d73aa742 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index b55f2e0b..439e5203 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 932edba2..34b0450a 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index f59925b7..04b06545 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 6f68a05d..51082c36 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index a407dbff..037beccd 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 119ba2ab..436790ae 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 14d4edd0..d8c8b46f 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 42332091..ef4097cd 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -35,7 +35,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DUP(cmd, cmd__len, CHAR); if (__IN(18, OPM_Options, 32)) { Out_String((CHAR*)" ", 3); - Out_String(fullcmd, 4096); + Out_String(cmd, cmd__len); Out_Ln(); } __COPY(cmd, fullcmd, 4096); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index f1a5292e..f05c741b 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2016/12/29]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 44d5e0f32501be406f412d1afcf2a3cc2a98857c Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 2 Jan 2017 12:00:36 +0000 Subject: [PATCH 127/241] Remove obsolete LDCONFIG env var generation in configure.c --- src/tools/make/configure.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 6ef80440..f40adf8d 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -43,7 +43,6 @@ char installdir[256]; char versionstring[256]; char osrelease[1024]; char cwd[1024]; -char ldconfig[1024]; // Command(s) to update OS shared library config char libspec[1024]; #define macrotostringhelper(s) #s @@ -195,21 +194,6 @@ void determineInstallDirectory() { -void determineLdconfig() { // Generate appropriate ldconfig command for this OS - if (bsd) { - snprintf(ldconfig, sizeof(ldconfig), "ldconfig -m \"%s/lib\"", installdir); - } else { - snprintf( - ldconfig, sizeof(ldconfig), - "if echo \"%s/lib\" >/etc/ld.so.conf.d/lib%s.conf; then ldconfig; fi", - installdir, oname - ); - } -} - - - - void determineBuildDate() { time_t t = time(0); strftime(builddate, sizeof(builddate), "%Y/%m/%d", localtime(&t)); @@ -394,7 +378,6 @@ void writeMakeParameters() { fprintf(fd, "BINEXT=%s\n", binext); fprintf(fd, "COMPILE=%s\n", cc); fprintf(fd, "STATICLINK=%s\n", staticlink); - fprintf(fd, "LDCONFIG=%s\n", ldconfig); fclose(fd); } @@ -456,7 +439,6 @@ int main(int argc, char *argv[]) determineCDataModel(); determineBuildDate(); determineInstallDirectory(); - determineLdconfig(); testSystemDotH(); From 8063b0c595610a7d108359cb6dd8d7c86af02e51 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 15 Feb 2017 18:34:00 +0000 Subject: [PATCH 128/241] Fix dynamic linking on Mac. Static linking not working. --- src/compiler/extTools.Mod | 17 +++++++++++++++++ src/tools/make/configure.c | 19 ++++++++++--------- src/tools/make/oberon.mk | 2 +- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 24ea1dc3..4c9b2c11 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -89,6 +89,23 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition Strings.Append(OPM.Model, cmd); Strings.Append(Configuration.libext, cmd); execute("C compile and link: ", cmd); + + IF (Configuration.os = "darwin") & ~statically THEN + (* Darwin requires an extra command to set the library directory into the binary *) + cmd := "install_name_tool -change lib"; + Strings.Append(Configuration.name, cmd); + Strings.Append('-O', cmd); + Strings.Append(OPM.Model, cmd); + Strings.Append('.dylib ', cmd); + Strings.Append(OPM.InstallDir, cmd); + Strings.Append('/lib/lib', cmd); + Strings.Append(Configuration.name, cmd); + Strings.Append('-O', cmd); + Strings.Append(OPM.Model, cmd); + Strings.Append('.dylib ', cmd); + Strings.Append(moduleName, cmd); + execute("Set library directory: ", cmd) + END END LinkMain; diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index f40adf8d..f82a5d37 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -47,14 +47,13 @@ char libspec[1024]; #define macrotostringhelper(s) #s #define macrotostring(s) macrotostringhelper(s) -char *version = macrotostring(O_VER); -char *objext = ".o"; -char *objflag = " -o "; -char *linkflags = " -L\""; -char *libext = ""; -char *oname = NULL; // From O_NAME env var if present, or O_NAME macro otherwise. - - +char *version = macrotostring(O_VER); +char *objext = ".o"; +char *objflag = " -o "; +char *linkflags = " -L\""; +char *libext = ""; +char *oname = NULL; // From O_NAME env var if present, or O_NAME macro otherwise. +char *dynext = ".so"; char *dataModel = NULL; char *compiler = NULL; char *cc = NULL; @@ -114,7 +113,7 @@ void determineOS() { else if (strncasecmp(sys.sysname, "linux", 5) == 0) {determineLinuxVariant();} else if (strncasecmp(sys.sysname, "freebsd", 5) == 0) {os = "freebsd"; bsd = 1;} else if (strncasecmp(sys.sysname, "openbsd", 5) == 0) {os = "openbsd"; bsd = 1;} - else if (strncasecmp(sys.sysname, "darwin", 5) == 0) {os = "darwin"; staticlink = "";} + else if (strncasecmp(sys.sysname, "darwin", 5) == 0) {os = "darwin"; staticlink = ""; dynext = ".dylib";} else { fprintf(stderr, "\n\n** Unrecognised utsname.sysname '%s' returned by uname().\n", sys.sysname); fprintf(stderr, "** Please add a test for this OS in src/buildtools/configure.c\n"); @@ -376,6 +375,7 @@ void writeMakeParameters() { fprintf(fd, "INSTALLDIR=%s\n", installdir); fprintf(fd, "PLATFORM=%s\n", platform); fprintf(fd, "BINEXT=%s\n", binext); + fprintf(fd, "DYNEXT=%s\n", dynext); fprintf(fd, "COMPILE=%s\n", cc); fprintf(fd, "STATICLINK=%s\n", staticlink); fclose(fd); @@ -396,6 +396,7 @@ void writeConfigurationMod() { fprintf(fd, " linkflags* = '%s';\n", linkflags); fprintf(fd, " libspec* = '%s';\n", libspec); fprintf(fd, " libext* = '%s';\n", libext); + fprintf(fd, " os* = '%s';\n", os); fprintf(fd, " compiler* = '%s';\n", compiler); fprintf(fd, " compile* = '%s';\n", cc); fprintf(fd, " installdir* = '%s';\n", installdir); diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 4de7e18b..7f159ce8 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -386,7 +386,7 @@ library: @make -f src/tools/make/oberon.mk -s O$(MODEL)library MODEL=$(MODEL) @printf '\nMaking lib$(ONAME)-O$(MODEL) .a and .so\n' ar rcs "$(BUILDDIR)/$(MODEL)/lib$(ONAME)-O$(MODEL).a" $(BUILDDIR)/$(MODEL)/*.o - @cd $(BUILDDIR)/$(MODEL) && $(COMPILE) -shared -o lib$(ONAME)-O$(MODEL).so *.o + @cd $(BUILDDIR)/$(MODEL) && $(COMPILE) -shared -o lib$(ONAME)-O$(MODEL)$(DYNEXT) *.o From 5c86750aed335cadc7c775248cfb4de85d47d979 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 15 Feb 2017 18:58:39 +0000 Subject: [PATCH 129/241] Enable Mac static linking. --- src/compiler/extTools.Mod | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 4c9b2c11..fdd38e94 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -73,21 +73,32 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition cmd: CommandString; BEGIN InitialiseCompilerCommand(cmd); - Strings.Append(moduleName, cmd); - Strings.Append(".c ", cmd); - Strings.Append(additionalopts, cmd); + Strings.Append(moduleName, cmd); + Strings.Append(".c ", cmd); + Strings.Append(additionalopts, cmd); IF statically THEN - Strings.Append(Configuration.staticLink, cmd) + IF Configuration.os = "darwin" THEN + Strings.Append(OPM.InstallDir, cmd); + Strings.Append('/lib/lib', cmd); + Strings.Append(Configuration.name, cmd); + Strings.Append('-O', cmd); + Strings.Append(OPM.Model, cmd); + Strings.Append('.a', cmd); + ELSE + Strings.Append(Configuration.staticLink, cmd) + END + END; + Strings.Append(Configuration.objflag, cmd); + Strings.Append(moduleName, cmd); + IF (~statically) OR ~(Configuration.os = "darwin") THEN + Strings.Append(Configuration.linkflags, cmd); + Strings.Append(OPM.InstallDir, cmd); + Strings.Append('/lib"', cmd); + Strings.Append(Configuration.libspec, cmd); + Strings.Append('-O', cmd); + Strings.Append(OPM.Model, cmd); + Strings.Append(Configuration.libext, cmd) END; - Strings.Append(Configuration.objflag, cmd); - Strings.Append(moduleName, cmd); - Strings.Append(Configuration.linkflags, cmd); - Strings.Append(OPM.InstallDir, cmd); - Strings.Append('/lib"', cmd); - Strings.Append(Configuration.libspec, cmd); - Strings.Append('-O', cmd); - Strings.Append(OPM.Model, cmd); - Strings.Append(Configuration.libext, cmd); execute("C compile and link: ", cmd); IF (Configuration.os = "darwin") & ~statically THEN From b5c76a0ee3f3590c1037545504934ac7fad9d61d Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 21 Jun 2017 20:45:58 +0400 Subject: [PATCH 130/241] implemented In.Real and In.LongReal, unless it'll be implemented better. --- src/runtime/In.Mod | 98 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 9 deletions(-) diff --git a/src/runtime/In.Mod b/src/runtime/In.Mod index 873a00d9..7f4c72e3 100644 --- a/src/runtime/In.Mod +++ b/src/runtime/In.Mod @@ -1,6 +1,6 @@ MODULE In; -IMPORT Platform, SYSTEM, Out; +IMPORT Platform, SYSTEM, Reals, Out; VAR Done-: BOOLEAN; @@ -99,14 +99,6 @@ VAR h: HUGEINT; BEGIN HugeInt(h); i := SYSTEM.VAL(LONGINT, h) END LongInt; -PROCEDURE Real*(VAR x: REAL); -BEGIN HALT(99) (* Not implemented *) -END Real; - -PROCEDURE LongReal*(VAR y: LONGREAL); -BEGIN HALT(99) (* Not implemented *) -END LongReal; - PROCEDURE Line*(VAR line: ARRAY OF CHAR); VAR i: INTEGER; BEGIN StartRead; i := 0; Done := readstate = ready; @@ -144,6 +136,94 @@ PROCEDURE Name*(VAR name: ARRAY OF CHAR); (* Read filename. Presumably using she BEGIN HALT(99) (* Not implemented *) END Name; +PROCEDURE StrToReal(s: ARRAY OF CHAR; VAR r: REAL); +VAR p, e: INTEGER; y, g: REAL; neg, negE: BOOLEAN; +BEGIN + p := 0; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + + y := 0; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + y := y * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF s[p] = "." THEN + INC(p); g := 1; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + g := g / 10; y := y + g * (ORD(s[p]) - 30H); + INC(p); + END; + END; + IF (s[p] = "D") OR (s[p] = "E") THEN + INC(p); e := 0; + IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; + WHILE (s[p] = "0") DO INC(p) END; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + e := e * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF negE THEN y := y / Reals.Ten(e) + ELSE y := y * Reals.Ten(e) END; + END; + IF neg THEN y := -y END; + r := y; +END StrToReal; + +PROCEDURE StrToLongReal(s: ARRAY OF CHAR; VAR r: LONGREAL); +VAR p, e: INTEGER; y, g: LONGREAL; neg, negE: BOOLEAN; +BEGIN + p := 0; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + + y := 0; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + y := y * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF s[p] = "." THEN + INC(p); g := 1; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + g := g / 10; y := y + g * (ORD(s[p]) - 30H); + INC(p); + END; + END; + IF (s[p] = "D") OR (s[p] = "E") THEN + INC(p); e := 0; + IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; + WHILE (s[p] = "0") DO INC(p) END; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + e := e * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF negE THEN y := y / Reals.Ten(e) + ELSE y := y * Reals.Ten(e) END; + END; + IF neg THEN y := -y END; + r := y; +END StrToLongReal; + +PROCEDURE Real*(VAR x: REAL); +VAR + str: ARRAY 16 OF CHAR; +BEGIN + Line(str); + StrToReal(str, x); +END Real; + +PROCEDURE LongReal*(VAR y: LONGREAL); +VAR + str: ARRAY 16 OF CHAR; +BEGIN + Line(str); + StrToLongReal(str, y); +END LongReal; + + + BEGIN nextch := 0X; readstate := pending; From 211f69c89aaaa416259d2863ef9a3a5f86ed4614 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 21 Jun 2017 20:58:10 +0400 Subject: [PATCH 131/241] moved strtoreal functions to strings module. --- src/runtime/In.Mod | 76 ++-------------------------------------- src/runtime/Strings.Mod | 74 ++++++++++++++++++++++++++++++++++++-- src/tools/make/oberon.mk | 2 +- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/src/runtime/In.Mod b/src/runtime/In.Mod index 7f4c72e3..76ceb1e8 100644 --- a/src/runtime/In.Mod +++ b/src/runtime/In.Mod @@ -1,6 +1,6 @@ MODULE In; -IMPORT Platform, SYSTEM, Reals, Out; +IMPORT Platform, SYSTEM, Strings, Out; VAR Done-: BOOLEAN; @@ -136,82 +136,12 @@ PROCEDURE Name*(VAR name: ARRAY OF CHAR); (* Read filename. Presumably using she BEGIN HALT(99) (* Not implemented *) END Name; -PROCEDURE StrToReal(s: ARRAY OF CHAR; VAR r: REAL); -VAR p, e: INTEGER; y, g: REAL; neg, negE: BOOLEAN; -BEGIN - p := 0; - WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; - IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; - WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; - - y := 0; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - y := y * 10 + (ORD(s[p]) - 30H); - INC(p); - END; - IF s[p] = "." THEN - INC(p); g := 1; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - g := g / 10; y := y + g * (ORD(s[p]) - 30H); - INC(p); - END; - END; - IF (s[p] = "D") OR (s[p] = "E") THEN - INC(p); e := 0; - IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; - WHILE (s[p] = "0") DO INC(p) END; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - e := e * 10 + (ORD(s[p]) - 30H); - INC(p); - END; - IF negE THEN y := y / Reals.Ten(e) - ELSE y := y * Reals.Ten(e) END; - END; - IF neg THEN y := -y END; - r := y; -END StrToReal; - -PROCEDURE StrToLongReal(s: ARRAY OF CHAR; VAR r: LONGREAL); -VAR p, e: INTEGER; y, g: LONGREAL; neg, negE: BOOLEAN; -BEGIN - p := 0; - WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; - IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; - WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; - - y := 0; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - y := y * 10 + (ORD(s[p]) - 30H); - INC(p); - END; - IF s[p] = "." THEN - INC(p); g := 1; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - g := g / 10; y := y + g * (ORD(s[p]) - 30H); - INC(p); - END; - END; - IF (s[p] = "D") OR (s[p] = "E") THEN - INC(p); e := 0; - IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; - WHILE (s[p] = "0") DO INC(p) END; - WHILE ("0" <= s[p]) & (s[p] <= "9") DO - e := e * 10 + (ORD(s[p]) - 30H); - INC(p); - END; - IF negE THEN y := y / Reals.Ten(e) - ELSE y := y * Reals.Ten(e) END; - END; - IF neg THEN y := -y END; - r := y; -END StrToLongReal; - PROCEDURE Real*(VAR x: REAL); VAR str: ARRAY 16 OF CHAR; BEGIN Line(str); - StrToReal(str, x); + Strings.StrToReal(str, x); END Real; PROCEDURE LongReal*(VAR y: LONGREAL); @@ -219,7 +149,7 @@ VAR str: ARRAY 16 OF CHAR; BEGIN Line(str); - StrToLongReal(str, y); + Strings.StrToLongReal(str, y); END LongReal; diff --git a/src/runtime/Strings.Mod b/src/runtime/Strings.Mod index 0dcfa6d2..89dcaa33 100644 --- a/src/runtime/Strings.Mod +++ b/src/runtime/Strings.Mod @@ -28,8 +28,8 @@ Strings.Cap(s) replaces each lower case letter in s by its upper case equivalent. -------------------------------------------------------------*) (* added from trianus v4 *) -MODULE Strings; (*HM 94-06-22 / *) - +MODULE Strings; (*HM 94-06-22 / *) (* noch 2017-06-21 *) +IMPORT Reals; PROCEDURE Length* (s: ARRAY OF CHAR): INTEGER; VAR i: LONGINT; @@ -153,4 +153,74 @@ BEGIN RETURN M(string, pattern, Length(string)-1, Length(pattern)-1) END Match; +PROCEDURE StrToReal*(s: ARRAY OF CHAR; VAR r: REAL); +VAR p, e: INTEGER; y, g: REAL; neg, negE: BOOLEAN; +BEGIN + p := 0; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + + y := 0; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + y := y * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF s[p] = "." THEN + INC(p); g := 1; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + g := g / 10; y := y + g * (ORD(s[p]) - 30H); + INC(p); + END; + END; + IF (s[p] = "D") OR (s[p] = "E") THEN + INC(p); e := 0; + IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; + WHILE (s[p] = "0") DO INC(p) END; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + e := e * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF negE THEN y := y / Reals.Ten(e) + ELSE y := y * Reals.Ten(e) END; + END; + IF neg THEN y := -y END; + r := y; +END StrToReal; + +PROCEDURE StrToLongReal*(s: ARRAY OF CHAR; VAR r: LONGREAL); +VAR p, e: INTEGER; y, g: LONGREAL; neg, negE: BOOLEAN; +BEGIN + p := 0; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; + WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; + + y := 0; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + y := y * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF s[p] = "." THEN + INC(p); g := 1; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + g := g / 10; y := y + g * (ORD(s[p]) - 30H); + INC(p); + END; + END; + IF (s[p] = "D") OR (s[p] = "E") THEN + INC(p); e := 0; + IF s[p] = "-" THEN negE := TRUE; INC(p) ELSE negE := FALSE END; + WHILE (s[p] = "0") DO INC(p) END; + WHILE ("0" <= s[p]) & (s[p] <= "9") DO + e := e * 10 + (ORD(s[p]) - 30H); + INC(p); + END; + IF negE THEN y := y / Reals.Ten(e) + ELSE y := y * Reals.Ten(e) END; + END; + IF neg THEN y := -y END; + r := y; +END StrToLongReal; + END Strings. diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 7f159ce8..ca7ac4ef 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -106,11 +106,11 @@ translate: cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod From e626e5c97d66e5d8f79235e5252691b11d4050e3 Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 21 Jun 2017 21:33:03 +0400 Subject: [PATCH 132/241] updated bootstrap sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 130 ++++++++++++++++++++++++++- bootstrap/unix-44/Strings.h | 4 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 20 +++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 130 ++++++++++++++++++++++++++- bootstrap/unix-48/Strings.h | 4 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 20 +++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 130 ++++++++++++++++++++++++++- bootstrap/unix-88/Strings.h | 4 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 20 +++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 130 ++++++++++++++++++++++++++- bootstrap/windows-48/Strings.h | 4 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 20 +++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 130 ++++++++++++++++++++++++++- bootstrap/windows-88/Strings.h | 4 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 20 +++-- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 890 insertions(+), 230 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 38c8117f..2e1f73ec 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index a65d07d6..37d129c0 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 72e63747..76f70d82 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index d5fd78c7..15f181ca 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 9a0776b1..9825b66f 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 8fc061ff..29215cc6 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 25310ebf..3a5b2ec6 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index fac280fb..8d1f2adc 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 8125a013..510a957f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 3779058a..4e5d8bb0 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 086dc5f6..23d08ad2 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index e9d9a49e..664d96fb 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index fdcce95f..26ce2529 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index e475406d..77be12d2 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 306f8ede..64e0b231 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index bf3d11d5..09556118 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index ab6ef6cb..dd80e8ba 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index f77716b2..00989b7b 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index f009c3c0..89f48bc6 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 4c2ce30b..795ce5e8 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 305c3ef1..d17422b2 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 51336832..bd91910e 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 60a80fc3..ebff1e8c 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 9d37e527..6ca1811b 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 7d83710b..d2b1d882 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index f5b51345..3adf3084 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 69d52603..975922f3 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index d73aa742..820a2ba7 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 439e5203..9a2fca64 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 34b0450a..925d8de0 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Reals.h" @@ -19,6 +20,8 @@ export INT16 Strings_Length (CHAR *s, ADDRESS s__len); export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +export void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); INT16 Strings_Length (CHAR *s, ADDRESS s__len) @@ -236,10 +239,135 @@ BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS return __retval; } +void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r) +{ + INT16 p, e; + REAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (REAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (REAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (REAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (REAL)(REAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (REAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + +void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r) +{ + INT16 p, e; + LONGREAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (LONGREAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (LONGREAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (LONGREAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (LONGREAL)(LONGREAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (LONGREAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + export void *Strings__init(void) { __DEFMOD; + __MODULE_IMPORT(Reals); __REGMOD("Strings", 0); /* BEGIN */ __ENDMOD; diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 04b06545..f88aeb04 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -17,6 +17,8 @@ import INT16 Strings_Length (CHAR *s, ADDRESS s__len); import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +import void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); import void *Strings__init(void); diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index c8d31144..05dd7063 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index ca48a032..965d36bd 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 436790ae..40b79e32 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index d8c8b46f..1e79747a 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index ef4097cd..6bfa4550 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -106,13 +106,15 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); - Strings_Append(OPM_Model, 10, (void*)cmd, 4096); - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + if (!statically || 1) { + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + } extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index f05c741b..6969521d 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 38c8117f..2e1f73ec 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index a65d07d6..37d129c0 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 72e63747..76f70d82 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index d5fd78c7..15f181ca 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 9a0776b1..9825b66f 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 8fc061ff..29215cc6 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 25310ebf..3a5b2ec6 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index fac280fb..8d1f2adc 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 8125a013..510a957f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 3779058a..4e5d8bb0 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 086dc5f6..23d08ad2 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index e9d9a49e..664d96fb 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index fdcce95f..26ce2529 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index e475406d..77be12d2 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 306f8ede..64e0b231 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index bf3d11d5..09556118 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index ab6ef6cb..dd80e8ba 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index f77716b2..00989b7b 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index f009c3c0..89f48bc6 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 1c073903..bade5779 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 305c3ef1..d17422b2 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 51336832..bd91910e 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 60a80fc3..ebff1e8c 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 9d37e527..6ca1811b 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 7d83710b..d2b1d882 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index f5b51345..3adf3084 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 69d52603..975922f3 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index d73aa742..820a2ba7 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 439e5203..9a2fca64 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 34b0450a..925d8de0 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Reals.h" @@ -19,6 +20,8 @@ export INT16 Strings_Length (CHAR *s, ADDRESS s__len); export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +export void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); INT16 Strings_Length (CHAR *s, ADDRESS s__len) @@ -236,10 +239,135 @@ BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS return __retval; } +void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r) +{ + INT16 p, e; + REAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (REAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (REAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (REAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (REAL)(REAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (REAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + +void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r) +{ + INT16 p, e; + LONGREAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (LONGREAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (LONGREAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (LONGREAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (LONGREAL)(LONGREAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (LONGREAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + export void *Strings__init(void) { __DEFMOD; + __MODULE_IMPORT(Reals); __REGMOD("Strings", 0); /* BEGIN */ __ENDMOD; diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 04b06545..f88aeb04 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -17,6 +17,8 @@ import INT16 Strings_Length (CHAR *s, ADDRESS s__len); import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +import void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); import void *Strings__init(void); diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index d63c3ed6..b1559a2e 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 7a44b973..bbc925ac 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 436790ae..40b79e32 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index d8c8b46f..1e79747a 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index ef4097cd..6bfa4550 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -106,13 +106,15 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); - Strings_Append(OPM_Model, 10, (void*)cmd, 4096); - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + if (!statically || 1) { + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + } extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index f05c741b..6969521d 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 38c8117f..2e1f73ec 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index a65d07d6..37d129c0 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 72e63747..76f70d82 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 4448f8ba..b387e012 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 26195611..c0394624 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 27cb83e1..12ba9904 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index f2ead3af..e7fb51b1 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 9c2d3b1f..a3a7a868 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 100225d5..2a213809 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 3779058a..4e5d8bb0 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 086dc5f6..23d08ad2 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index e9d9a49e..664d96fb 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index fdcce95f..26ce2529 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 664903f4..c439d70d 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 306f8ede..64e0b231 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 8b9269cb..e03ef961 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index ab6ef6cb..dd80e8ba 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index f77716b2..00989b7b 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index f009c3c0..89f48bc6 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 19d654e6..675711ee 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 305c3ef1..d17422b2 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f4b2f0c9..9255cad8 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 60a80fc3..ebff1e8c 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 9d37e527..6ca1811b 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 7d83710b..d2b1d882 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 344ace71..0100e778 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 833eff32..609b0969 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index d73aa742..820a2ba7 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 439e5203..9a2fca64 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 34b0450a..925d8de0 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Reals.h" @@ -19,6 +20,8 @@ export INT16 Strings_Length (CHAR *s, ADDRESS s__len); export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +export void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); INT16 Strings_Length (CHAR *s, ADDRESS s__len) @@ -236,10 +239,135 @@ BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS return __retval; } +void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r) +{ + INT16 p, e; + REAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (REAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (REAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (REAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (REAL)(REAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (REAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + +void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r) +{ + INT16 p, e; + LONGREAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (LONGREAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (LONGREAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (LONGREAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (LONGREAL)(LONGREAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (LONGREAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + export void *Strings__init(void) { __DEFMOD; + __MODULE_IMPORT(Reals); __REGMOD("Strings", 0); /* BEGIN */ __ENDMOD; diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 04b06545..f88aeb04 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -17,6 +17,8 @@ import INT16 Strings_Length (CHAR *s, ADDRESS s__len); import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +import void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); import void *Strings__init(void); diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 51082c36..95b9bc22 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 037beccd..62b8d52e 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 436790ae..40b79e32 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index d8c8b46f..1e79747a 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index ef4097cd..6bfa4550 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -106,13 +106,15 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); - Strings_Append(OPM_Model, 10, (void*)cmd, 4096); - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + if (!statically || 1) { + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + } extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index f05c741b..6969521d 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 38c8117f..2e1f73ec 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index a65d07d6..37d129c0 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 72e63747..76f70d82 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index bdbed96c..4dae8e76 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 43167fa5..4a2ce2b4 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 8fc061ff..29215cc6 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 25310ebf..3a5b2ec6 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 60fa4748..8fc501ee 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 8125a013..510a957f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 3779058a..4e5d8bb0 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 086dc5f6..23d08ad2 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index e9d9a49e..664d96fb 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index fdcce95f..26ce2529 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index e475406d..77be12d2 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 306f8ede..64e0b231 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index bf3d11d5..09556118 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index ab6ef6cb..dd80e8ba 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index f77716b2..00989b7b 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index f009c3c0..89f48bc6 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 1c073903..bade5779 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 305c3ef1..d17422b2 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 51336832..bd91910e 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 60a80fc3..ebff1e8c 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 3950eb59..e7193968 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 7d83710b..d2b1d882 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index bc65bec9..c50aa4c4 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 5e2fda7d..5ecd9242 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index d73aa742..820a2ba7 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 439e5203..9a2fca64 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 34b0450a..925d8de0 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Reals.h" @@ -19,6 +20,8 @@ export INT16 Strings_Length (CHAR *s, ADDRESS s__len); export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +export void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); INT16 Strings_Length (CHAR *s, ADDRESS s__len) @@ -236,10 +239,135 @@ BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS return __retval; } +void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r) +{ + INT16 p, e; + REAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (REAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (REAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (REAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (REAL)(REAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (REAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + +void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r) +{ + INT16 p, e; + LONGREAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (LONGREAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (LONGREAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (LONGREAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (LONGREAL)(LONGREAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (LONGREAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + export void *Strings__init(void) { __DEFMOD; + __MODULE_IMPORT(Reals); __REGMOD("Strings", 0); /* BEGIN */ __ENDMOD; diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 04b06545..f88aeb04 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -17,6 +17,8 @@ import INT16 Strings_Length (CHAR *s, ADDRESS s__len); import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +import void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); import void *Strings__init(void); diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index d63c3ed6..b1559a2e 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 7a44b973..bbc925ac 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 436790ae..40b79e32 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index d8c8b46f..1e79747a 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index ef4097cd..6bfa4550 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -106,13 +106,15 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); - Strings_Append(OPM_Model, 10, (void*)cmd, 4096); - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + if (!statically || 1) { + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + } extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index f05c741b..6969521d 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 38c8117f..2e1f73ec 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index a65d07d6..37d129c0 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 72e63747..76f70d82 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 032c4afb..e3eae937 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 66abb2c7..036899ba 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 27cb83e1..12ba9904 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index f2ead3af..e7fb51b1 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 2a55e70b..560c3287 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 100225d5..2a213809 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 3779058a..4e5d8bb0 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 086dc5f6..23d08ad2 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index e9d9a49e..664d96fb 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index fdcce95f..26ce2529 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 664903f4..c439d70d 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 306f8ede..64e0b231 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 8b9269cb..e03ef961 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index ab6ef6cb..dd80e8ba 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index f77716b2..00989b7b 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index f009c3c0..89f48bc6 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 19d654e6..675711ee 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 305c3ef1..d17422b2 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f4b2f0c9..9255cad8 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 60a80fc3..ebff1e8c 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 3950eb59..e7193968 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 7d83710b..d2b1d882 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 3c3b5124..7d755921 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index e210853f..1c658e83 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index d73aa742..820a2ba7 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 439e5203..9a2fca64 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 34b0450a..925d8de0 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -6,6 +6,7 @@ #define SET UINT32 #include "SYSTEM.h" +#include "Reals.h" @@ -19,6 +20,8 @@ export INT16 Strings_Length (CHAR *s, ADDRESS s__len); export BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); export INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); export void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +export void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +export void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); INT16 Strings_Length (CHAR *s, ADDRESS s__len) @@ -236,10 +239,135 @@ BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS return __retval; } +void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r) +{ + INT16 p, e; + REAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (REAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (REAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (REAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (REAL)(REAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (REAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + +void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r) +{ + INT16 p, e; + LONGREAL y, g; + BOOLEAN neg, negE; + __DUP(s, s__len, CHAR); + p = 0; + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + if (s[__X(p, s__len)] == '-') { + neg = 1; + p += 1; + } else { + neg = 0; + } + while (s[__X(p, s__len)] == ' ' || s[__X(p, s__len)] == '0') { + p += 1; + } + y = (LONGREAL)0; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + y = y * (LONGREAL)10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (s[__X(p, s__len)] == '.') { + p += 1; + g = (LONGREAL)1; + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + g = g / (LONGREAL)(LONGREAL)10; + y = y + g * ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + } + if (s[__X(p, s__len)] == 'D' || s[__X(p, s__len)] == 'E') { + p += 1; + e = 0; + if (s[__X(p, s__len)] == '-') { + negE = 1; + p += 1; + } else { + negE = 0; + } + while (s[__X(p, s__len)] == '0') { + p += 1; + } + while (('0' <= s[__X(p, s__len)] && s[__X(p, s__len)] <= '9')) { + e = e * 10 + ((INT16)s[__X(p, s__len)] - 48); + p += 1; + } + if (negE) { + y = y / (LONGREAL)Reals_Ten(e); + } else { + y = y * Reals_Ten(e); + } + } + if (neg) { + y = -y; + } + *r = y; + __DEL(s); +} + export void *Strings__init(void) { __DEFMOD; + __MODULE_IMPORT(Reals); __REGMOD("Strings", 0); /* BEGIN */ __ENDMOD; diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 04b06545..f88aeb04 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h @@ -17,6 +17,8 @@ import INT16 Strings_Length (CHAR *s, ADDRESS s__len); import BOOLEAN Strings_Match (CHAR *string, ADDRESS string__len, CHAR *pattern, ADDRESS pattern__len); import INT16 Strings_Pos (CHAR *pattern, ADDRESS pattern__len, CHAR *s, ADDRESS s__len, INT16 pos); import void Strings_Replace (CHAR *source, ADDRESS source__len, INT16 pos, CHAR *dest, ADDRESS dest__len); +import void Strings_StrToLongReal (CHAR *s, ADDRESS s__len, LONGREAL *r); +import void Strings_StrToReal (CHAR *s, ADDRESS s__len, REAL *r); import void *Strings__init(void); diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 51082c36..95b9bc22 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 037beccd..62b8d52e 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 436790ae..40b79e32 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index d8c8b46f..1e79747a 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index ef4097cd..6bfa4550 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -106,13 +106,15 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); - Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); - Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); - Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); - Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); - Strings_Append(OPM_Model, 10, (void*)cmd, 4096); - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + if (!statically || 1) { + Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); + Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); + Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); + Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); + Strings_Append(OPM_Model, 10, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + } extTools_execute((CHAR*)"C compile and link: ", 21, cmd, 4096); __DEL(additionalopts); } diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index f05c741b..6969521d 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/01/01]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 9f3893bb424c86a75767ee46741de751f78441da Mon Sep 17 00:00:00 2001 From: norayr Date: Wed, 21 Jun 2017 21:45:26 +0400 Subject: [PATCH 133/241] should fix library build. --- src/tools/make/oberon.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index ca7ac4ef..fedaf039 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -60,8 +60,8 @@ assemble: @printf ' DATAMODEL: %s\n' "$(DATAMODEL)" cd $(BUILDDIR) && $(COMPILE) -c SYSTEM.c Configuration.c Platform.c Heap.c - cd $(BUILDDIR) && $(COMPILE) -c Out.c Strings.c Modules.c Files.c - cd $(BUILDDIR) && $(COMPILE) -c Reals.c Texts.c VT100.c + cd $(BUILDDIR) && $(COMPILE) -c Out.c Reals.c Strings.c Modules.c + cd $(BUILDDIR) && $(COMPILE) -c Files.c Texts.c VT100.c cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c @@ -212,13 +212,13 @@ runtime: FORCE cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod + cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Reals.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Strings.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/In.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/VT100.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Files.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Math.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/MathL.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Reals.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Texts.Mod cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Oberon.Mod From 511186f0a42727b8439ca8e986de8063e6342f9d Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 8 Aug 2017 15:37:29 +0400 Subject: [PATCH 134/241] applied temple's fix for the ofront issue #30, endless recoursion for cyclic array types. https://github.com/jtempl/ofront/commit/c7d37c9162ce48d7feb4fbe2d6d2bc238d06a57d --- src/compiler/OPC.Mod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index 376ba412..43b86251 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -453,6 +453,9 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) ELSIF str^.form = OPT.Pointer THEN IF str^.BaseTyp^.comp # OPT.Record THEN DefineType(str^.BaseTyp) END ELSIF str^.comp IN {OPT.Array, OPT.DynArr} THEN + IF (str^.BaseTyp^.strobj # NIL) & (str^.BaseTyp^.strobj^.linkadr = ProcessingType) THEN (*cyclic base type*) + OPM.Mark(244, str^ .txtpos); str^.BaseTyp^.strobj^.linkadr := PredefinedType + END ; DefineType(str^.BaseTyp) ELSIF str^.form = OPT.ProcTyp THEN IF str^.BaseTyp # OPT.notyp THEN DefineType(str^.BaseTyp) END ; From bad584ec32e8d5c761c0fcc16c581b83f094d4bb Mon Sep 17 00:00:00 2001 From: norayr Date: Tue, 8 Aug 2017 15:39:44 +0400 Subject: [PATCH 135/241] make bootstrap. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 6 +++++- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 6 +++++- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 6 +++++- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 6 +++++- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 6 +++++- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 210 insertions(+), 190 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 2e1f73ec..cd41469c 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 37d129c0..9f1b22bf 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 76f70d82..35899464 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 15f181ca..07ef2f13 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 9825b66f..3bc2d0b7 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 29215cc6..230921f7 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 3a5b2ec6..9cd5ef68 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8d1f2adc..ce58d2bd 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 510a957f..f63c08e3 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 4e5d8bb0..a9bfa790 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 23d08ad2..a1d7caa3 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 664d96fb..4272bd0d 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str) OPC_DefineType(str->BaseTyp); } } else if (__IN(str->comp, 0x0c, 32)) { + if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) { + OPM_Mark(244, str->txtpos); + str->BaseTyp->strobj->linkadr = 2; + } OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 26ce2529..7ca019a5 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 77be12d2..ec0778a4 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 64e0b231..5fa08030 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 09556118..8963cdb8 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index dd80e8ba..abf3c5fe 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 00989b7b..be362918 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 89f48bc6..e1bafa1a 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 795ce5e8..21847ec1 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index d17422b2..027d4136 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index bd91910e..355b91bf 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index ebff1e8c..1511fecb 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 6ca1811b..5ae51898 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index d2b1d882..0cadead1 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 3adf3084..abca1ea7 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 975922f3..00d75eb9 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 820a2ba7..7766eea6 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 9a2fca64..db777c1d 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 925d8de0..180ca62f 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index f88aeb04..068bee5e 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 05dd7063..7e59fe02 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 965d36bd..0282ee71 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 40b79e32..3383b2ee 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 1e79747a..54b7d9d7 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 6bfa4550..322be252 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 6969521d..d7a81d4e 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 2e1f73ec..cd41469c 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 37d129c0..9f1b22bf 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 76f70d82..35899464 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 15f181ca..07ef2f13 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 9825b66f..3bc2d0b7 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 29215cc6..230921f7 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 3a5b2ec6..9cd5ef68 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8d1f2adc..ce58d2bd 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 510a957f..f63c08e3 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 4e5d8bb0..a9bfa790 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 23d08ad2..a1d7caa3 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 664d96fb..4272bd0d 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str) OPC_DefineType(str->BaseTyp); } } else if (__IN(str->comp, 0x0c, 32)) { + if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) { + OPM_Mark(244, str->txtpos); + str->BaseTyp->strobj->linkadr = 2; + } OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 26ce2529..7ca019a5 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 77be12d2..ec0778a4 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 64e0b231..5fa08030 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 09556118..8963cdb8 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index dd80e8ba..abf3c5fe 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 00989b7b..be362918 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 89f48bc6..e1bafa1a 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index bade5779..bc417521 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index d17422b2..027d4136 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index bd91910e..355b91bf 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index ebff1e8c..1511fecb 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 6ca1811b..5ae51898 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index d2b1d882..0cadead1 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 3adf3084..abca1ea7 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 975922f3..00d75eb9 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 820a2ba7..7766eea6 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 9a2fca64..db777c1d 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 925d8de0..180ca62f 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index f88aeb04..068bee5e 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index b1559a2e..2ae6cb09 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index bbc925ac..d8e458b3 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 40b79e32..3383b2ee 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 1e79747a..54b7d9d7 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 6bfa4550..322be252 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 6969521d..d7a81d4e 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 2e1f73ec..cd41469c 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 37d129c0..9f1b22bf 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 76f70d82..35899464 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index b387e012..e3497bbb 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index c0394624..687a3c51 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 12ba9904..748d21a5 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index e7fb51b1..869cd976 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index a3a7a868..ba9aa511 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 2a213809..872d937d 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 4e5d8bb0..a9bfa790 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 23d08ad2..a1d7caa3 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 664d96fb..4272bd0d 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str) OPC_DefineType(str->BaseTyp); } } else if (__IN(str->comp, 0x0c, 32)) { + if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) { + OPM_Mark(244, str->txtpos); + str->BaseTyp->strobj->linkadr = 2; + } OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 26ce2529..7ca019a5 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index c439d70d..697f985e 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 64e0b231..5fa08030 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index e03ef961..b6cacf30 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index dd80e8ba..abf3c5fe 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 00989b7b..be362918 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 89f48bc6..e1bafa1a 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 675711ee..88e4c9f8 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index d17422b2..027d4136 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 9255cad8..b35255c4 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index ebff1e8c..1511fecb 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 6ca1811b..5ae51898 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index d2b1d882..0cadead1 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 0100e778..d2465ce8 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 609b0969..5df45b89 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 820a2ba7..7766eea6 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 9a2fca64..db777c1d 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 925d8de0..180ca62f 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index f88aeb04..068bee5e 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 95b9bc22..5420a932 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 62b8d52e..ce8b3402 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 40b79e32..3383b2ee 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 1e79747a..54b7d9d7 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 6bfa4550..322be252 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 6969521d..d7a81d4e 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 2e1f73ec..cd41469c 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 37d129c0..9f1b22bf 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 76f70d82..35899464 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 4dae8e76..7ee3148c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 4a2ce2b4..3fbe334d 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 29215cc6..230921f7 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 3a5b2ec6..9cd5ef68 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 8fc501ee..b6c68442 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 510a957f..f63c08e3 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 4e5d8bb0..a9bfa790 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 23d08ad2..a1d7caa3 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 664d96fb..4272bd0d 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str) OPC_DefineType(str->BaseTyp); } } else if (__IN(str->comp, 0x0c, 32)) { + if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) { + OPM_Mark(244, str->txtpos); + str->BaseTyp->strobj->linkadr = 2; + } OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 26ce2529..7ca019a5 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 77be12d2..ec0778a4 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 64e0b231..5fa08030 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 09556118..8963cdb8 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index dd80e8ba..abf3c5fe 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 00989b7b..be362918 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 89f48bc6..e1bafa1a 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index bade5779..bc417521 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index d17422b2..027d4136 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index bd91910e..355b91bf 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index ebff1e8c..1511fecb 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index e7193968..ad6ab827 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index d2b1d882..0cadead1 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index c50aa4c4..e8dc98b0 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 5ecd9242..1f094b16 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 820a2ba7..7766eea6 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 9a2fca64..db777c1d 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 925d8de0..180ca62f 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index f88aeb04..068bee5e 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index b1559a2e..2ae6cb09 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index bbc925ac..d8e458b3 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 40b79e32..3383b2ee 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 1e79747a..54b7d9d7 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 6bfa4550..322be252 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 6969521d..d7a81d4e 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 2e1f73ec..cd41469c 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 37d129c0..9f1b22bf 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 76f70d82..35899464 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index e3eae937..14644554 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 036899ba..cf686837 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 12ba9904..748d21a5 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index e7fb51b1..869cd976 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 560c3287..b5ce22d3 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 2a213809..872d937d 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 4e5d8bb0..a9bfa790 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 23d08ad2..a1d7caa3 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 664d96fb..4272bd0d 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str) OPC_DefineType(str->BaseTyp); } } else if (__IN(str->comp, 0x0c, 32)) { + if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) { + OPM_Mark(244, str->txtpos); + str->BaseTyp->strobj->linkadr = 2; + } OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 26ce2529..7ca019a5 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index c439d70d..697f985e 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 64e0b231..5fa08030 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index e03ef961..b6cacf30 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index dd80e8ba..abf3c5fe 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 00989b7b..be362918 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 89f48bc6..e1bafa1a 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 675711ee..88e4c9f8 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index d17422b2..027d4136 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 9255cad8..b35255c4 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index ebff1e8c..1511fecb 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index e7193968..ad6ab827 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index d2b1d882..0cadead1 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 7d755921..ea7da9ab 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 1c658e83..7169da34 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 820a2ba7..7766eea6 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 9a2fca64..db777c1d 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 925d8de0..180ca62f 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index f88aeb04..068bee5e 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 95b9bc22..5420a932 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 62b8d52e..ce8b3402 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 40b79e32..3383b2ee 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 1e79747a..54b7d9d7 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 6bfa4550..322be252 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 6969521d..d7a81d4e 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/06/21]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 2ec7f3277a967ef16fd31752a2503153f5a9dd96 Mon Sep 17 00:00:00 2001 From: norayr Date: Sat, 2 Sep 2017 22:20:03 +0400 Subject: [PATCH 136/241] applied changes for the issue #61, with the @jtempl fix https://github.com/jtempl/ofront/commit/9e3e13af63499aa61e8934c80e69eb18ffb35acf --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 4 ++-- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 4 ++-- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 4 ++-- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 4 ++-- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 4 ++-- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPV.Mod | 2 +- 186 files changed, 196 insertions(+), 196 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index cd41469c..90b947ab 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 9f1b22bf..aec51f79 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 35899464..b40df642 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 07ef2f13..efcd4956 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 3bc2d0b7..3bcc1ece 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 230921f7..334d6938 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 9cd5ef68..f4cc3fdc 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index ce58d2bd..fdb70b86 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index f63c08e3..8b9aba1f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index a9bfa790..d80e722c 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index a1d7caa3..0f61f41b 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 4272bd0d..7a7d65ef 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 7ca019a5..808b1e30 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index ec0778a4..642a2726 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 5fa08030..81facffb 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 8963cdb8..d0e34e2b 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index abf3c5fe..3f6b4335 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index be362918..c89499f5 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index e1bafa1a..e2e6aa76 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 21847ec1..9e8900ee 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 027d4136..2b8d4909 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 355b91bf..31e6b9ff 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1183,7 +1183,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x) base = base->BaseTyp; } if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) { - OPC_Ident(base->strobj); + OPC_Andent(base); OPM_WriteString((CHAR*)"__typ", 6); } else if (base->form == 11) { OPM_WriteString((CHAR*)"POINTER__typ", 13); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 1511fecb..74fbddfb 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 5ae51898..5f010012 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0cadead1..b6de9e8e 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index abca1ea7..71910286 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 00d75eb9..f03d47db 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 7766eea6..24d6dbae 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index db777c1d..9afdda57 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 180ca62f..f71e1011 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 068bee5e..c5c20d62 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 7e59fe02..f49afd81 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 0282ee71..b6dd28f9 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 3383b2ee..f4bad650 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 54b7d9d7..348d31de 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 322be252..25bab77d 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index d7a81d4e..2147f066 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index cd41469c..90b947ab 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 9f1b22bf..aec51f79 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 35899464..b40df642 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 07ef2f13..efcd4956 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 3bc2d0b7..3bcc1ece 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 230921f7..334d6938 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 9cd5ef68..f4cc3fdc 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index ce58d2bd..fdb70b86 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index f63c08e3..8b9aba1f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index a9bfa790..d80e722c 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index a1d7caa3..0f61f41b 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 4272bd0d..7a7d65ef 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 7ca019a5..808b1e30 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index ec0778a4..642a2726 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 5fa08030..81facffb 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 8963cdb8..d0e34e2b 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index abf3c5fe..3f6b4335 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index be362918..c89499f5 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index e1bafa1a..e2e6aa76 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index bc417521..6ed97a79 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 027d4136..2b8d4909 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 355b91bf..31e6b9ff 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1183,7 +1183,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x) base = base->BaseTyp; } if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) { - OPC_Ident(base->strobj); + OPC_Andent(base); OPM_WriteString((CHAR*)"__typ", 6); } else if (base->form == 11) { OPM_WriteString((CHAR*)"POINTER__typ", 13); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 1511fecb..74fbddfb 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 5ae51898..5f010012 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0cadead1..b6de9e8e 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index abca1ea7..71910286 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 00d75eb9..f03d47db 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 7766eea6..24d6dbae 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index db777c1d..9afdda57 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 180ca62f..f71e1011 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 068bee5e..c5c20d62 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 2ae6cb09..bf746ce0 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index d8e458b3..adeaa30f 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 3383b2ee..f4bad650 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 54b7d9d7..348d31de 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 322be252..25bab77d 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index d7a81d4e..2147f066 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index cd41469c..90b947ab 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 9f1b22bf..aec51f79 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 35899464..b40df642 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index e3497bbb..b6c2fa2a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 687a3c51..23eb0ae2 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 748d21a5..b5548143 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 869cd976..2e1f525b 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index ba9aa511..f208a346 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 872d937d..f9b45430 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index a9bfa790..d80e722c 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index a1d7caa3..0f61f41b 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 4272bd0d..7a7d65ef 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 7ca019a5..808b1e30 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 697f985e..89456899 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 5fa08030..81facffb 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index b6cacf30..122e2f6c 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index abf3c5fe..3f6b4335 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index be362918..c89499f5 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index e1bafa1a..e2e6aa76 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 88e4c9f8..984753b2 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 027d4136..2b8d4909 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index b35255c4..423bbdef 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1183,7 +1183,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x) base = base->BaseTyp; } if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) { - OPC_Ident(base->strobj); + OPC_Andent(base); OPM_WriteString((CHAR*)"__typ", 6); } else if (base->form == 11) { OPM_WriteString((CHAR*)"POINTER__typ", 13); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 1511fecb..74fbddfb 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 5ae51898..5f010012 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0cadead1..b6de9e8e 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index d2465ce8..a28f82bf 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 5df45b89..8f982d78 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 7766eea6..24d6dbae 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index db777c1d..9afdda57 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 180ca62f..f71e1011 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 068bee5e..c5c20d62 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 5420a932..3eec265c 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index ce8b3402..9e0758f9 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 3383b2ee..f4bad650 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 54b7d9d7..348d31de 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 322be252..25bab77d 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index d7a81d4e..2147f066 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index cd41469c..90b947ab 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 9f1b22bf..aec51f79 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 35899464..b40df642 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 7ee3148c..7ba212c5 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 3fbe334d..1cf7bd4f 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 230921f7..334d6938 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 9cd5ef68..f4cc3fdc 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index b6c68442..2e36c7d8 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index f63c08e3..8b9aba1f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index a9bfa790..d80e722c 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index a1d7caa3..0f61f41b 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 4272bd0d..7a7d65ef 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 7ca019a5..808b1e30 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index ec0778a4..642a2726 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 5fa08030..81facffb 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 8963cdb8..d0e34e2b 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index abf3c5fe..3f6b4335 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index be362918..c89499f5 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index e1bafa1a..e2e6aa76 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index bc417521..6ed97a79 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 027d4136..2b8d4909 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 355b91bf..31e6b9ff 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1183,7 +1183,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x) base = base->BaseTyp; } if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) { - OPC_Ident(base->strobj); + OPC_Andent(base); OPM_WriteString((CHAR*)"__typ", 6); } else if (base->form == 11) { OPM_WriteString((CHAR*)"POINTER__typ", 13); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 1511fecb..74fbddfb 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index ad6ab827..d040a272 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0cadead1..b6de9e8e 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index e8dc98b0..73da4e17 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 1f094b16..58d8837d 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 7766eea6..24d6dbae 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index db777c1d..9afdda57 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 180ca62f..f71e1011 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 068bee5e..c5c20d62 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 2ae6cb09..bf746ce0 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index d8e458b3..adeaa30f 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 3383b2ee..f4bad650 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 54b7d9d7..348d31de 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 322be252..25bab77d 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index d7a81d4e..2147f066 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index cd41469c..90b947ab 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 9f1b22bf..aec51f79 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 35899464..b40df642 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 14644554..892a21b6 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index cf686837..8552fb5d 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 748d21a5..b5548143 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 869cd976..2e1f525b 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index b5ce22d3..58f86435 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 872d937d..f9b45430 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index a9bfa790..d80e722c 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index a1d7caa3..0f61f41b 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 4272bd0d..7a7d65ef 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 7ca019a5..808b1e30 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 697f985e..89456899 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 5fa08030..81facffb 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index b6cacf30..122e2f6c 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index abf3c5fe..3f6b4335 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index be362918..c89499f5 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index e1bafa1a..e2e6aa76 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 88e4c9f8..984753b2 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 027d4136..2b8d4909 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index b35255c4..423bbdef 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1183,7 +1183,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x) base = base->BaseTyp; } if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) { - OPC_Ident(base->strobj); + OPC_Andent(base); OPM_WriteString((CHAR*)"__typ", 6); } else if (base->form == 11) { OPM_WriteString((CHAR*)"POINTER__typ", 13); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 1511fecb..74fbddfb 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index ad6ab827..d040a272 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0cadead1..b6de9e8e 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index ea7da9ab..528b9c9c 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7169da34..ea34c3d3 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 7766eea6..24d6dbae 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index db777c1d..9afdda57 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 180ca62f..f71e1011 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 068bee5e..c5c20d62 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 5420a932..3eec265c 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index ce8b3402..9e0758f9 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 3383b2ee..f4bad650 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 54b7d9d7..348d31de 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 322be252..25bab77d 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index d7a81d4e..2147f066 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/08/08]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index d0cbde89..3c561714 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -723,7 +723,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 design(d, MinPrec); OPM.WriteString(" = __NEWARR("); WHILE base^.comp = OPT.Array DO INC(nofdim); base := base^.BaseTyp END ; IF (base^.comp = OPT.Record) & (OPC.NofPtrs(base) # 0) THEN - OPC.Ident(base^.strobj); OPM.WriteString(DynTypExt) + OPC.Andent(base); OPM.WriteString(DynTypExt) ELSIF base^.form = OPT.Pointer THEN OPM.WriteString("POINTER__typ") ELSE OPM.WriteString("NIL") END ; From 1bd70f367e5c30b2ffc3b9a6d774b39062859dee Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 6 Sep 2017 13:07:00 +0100 Subject: [PATCH 137/241] Correct size_t definition for OpenBSD .gt. 6.2 thanks to @ibara --- bootstrap/SYSTEM.h | 6 +++++- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 ++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 ++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 ++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 ++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 ++-- bootstrap/windows-88/extTools.h | 2 +- src/runtime/SYSTEM.h | 6 +++++- 187 files changed, 205 insertions(+), 197 deletions(-) diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index f6936068..07c6fd10 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -19,7 +19,11 @@ typedef unsigned long size_t; #endif #else - typedef unsigned int size_t; + #if defined(__OpenBSD__) + typedef unsigned long size_t; + #else + typedef unsigned int size_t; + #endif #endif #define _SIZE_T_DECLARED // For FreeBSD diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 90b947ab..2203e4f8 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index aec51f79..147e327d 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index b40df642..0305bae4 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index efcd4956..8f2f8230 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 3bcc1ece..d6a5d787 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 334d6938..8a2f0e42 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index f4cc3fdc..ea56eef7 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index fdb70b86..e85d6101 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 8b9aba1f..0211f78f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d80e722c..73efb8c0 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 0f61f41b..d8958167 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 7a7d65ef..ff43f636 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 808b1e30..8fe51423 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 642a2726..df753954 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 81facffb..1070c69d 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index d0e34e2b..309fcc08 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 3f6b4335..91257d84 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index c89499f5..491875a6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index e2e6aa76..c78ec622 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 9e8900ee..0ddf36a5 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 2b8d4909..1ba549d5 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 31e6b9ff..0201fc46 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 74fbddfb..6acedcaa 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 5f010012..5848b15c 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index b6de9e8e..4b15ee99 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 71910286..586721ce 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index f03d47db..66d3628b 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 24d6dbae..f5368742 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 9afdda57..a40de618 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index f71e1011..abdb14f8 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index c5c20d62..0f2f8b74 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f49afd81..6a395344 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index b6dd28f9..5feaaaf3 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index f4bad650..ff34c312 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 348d31de..2ddae6a2 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 25bab77d..982447f2 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 2147f066..3b45a534 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 90b947ab..2203e4f8 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index aec51f79..147e327d 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index b40df642..0305bae4 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index efcd4956..8f2f8230 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 3bcc1ece..d6a5d787 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 334d6938..8a2f0e42 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index f4cc3fdc..ea56eef7 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index fdb70b86..e85d6101 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 8b9aba1f..0211f78f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d80e722c..73efb8c0 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 0f61f41b..d8958167 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 7a7d65ef..ff43f636 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 808b1e30..8fe51423 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 642a2726..df753954 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 81facffb..1070c69d 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index d0e34e2b..309fcc08 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 3f6b4335..91257d84 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index c89499f5..491875a6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index e2e6aa76..c78ec622 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 6ed97a79..0dd59e3a 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 2b8d4909..1ba549d5 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 31e6b9ff..0201fc46 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 74fbddfb..6acedcaa 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 5f010012..5848b15c 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index b6de9e8e..4b15ee99 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 71910286..586721ce 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index f03d47db..66d3628b 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 24d6dbae..f5368742 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 9afdda57..a40de618 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index f71e1011..abdb14f8 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index c5c20d62..0f2f8b74 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index bf746ce0..d7491951 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index adeaa30f..70bac541 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index f4bad650..ff34c312 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 348d31de..2ddae6a2 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 25bab77d..982447f2 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 2147f066..3b45a534 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 90b947ab..2203e4f8 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index aec51f79..147e327d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index b40df642..0305bae4 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index b6c2fa2a..119f0290 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 23eb0ae2..730acfa4 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index b5548143..58d587c5 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 2e1f525b..39fa0153 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index f208a346..1cd6c686 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index f9b45430..12d1a18d 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d80e722c..73efb8c0 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 0f61f41b..d8958167 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 7a7d65ef..ff43f636 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 808b1e30..8fe51423 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 89456899..cec560bf 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 81facffb..1070c69d 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 122e2f6c..fd1f6597 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 3f6b4335..91257d84 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index c89499f5..491875a6 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index e2e6aa76..c78ec622 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 984753b2..df13f5c8 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 2b8d4909..1ba549d5 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 423bbdef..d8a4f2b4 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 74fbddfb..6acedcaa 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 5f010012..5848b15c 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index b6de9e8e..4b15ee99 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index a28f82bf..5bcea939 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 8f982d78..eebba012 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 24d6dbae..f5368742 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 9afdda57..a40de618 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index f71e1011..abdb14f8 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index c5c20d62..0f2f8b74 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 3eec265c..10b78453 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 9e0758f9..2ca102c0 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index f4bad650..ff34c312 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 348d31de..2ddae6a2 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 25bab77d..982447f2 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 2147f066..3b45a534 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 90b947ab..2203e4f8 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index aec51f79..147e327d 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index b40df642..0305bae4 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 7ba212c5..39b7e631 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 1cf7bd4f..dca242d4 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 334d6938..8a2f0e42 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index f4cc3fdc..ea56eef7 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 2e36c7d8..3ef7d5ed 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 8b9aba1f..0211f78f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d80e722c..73efb8c0 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 0f61f41b..d8958167 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 7a7d65ef..ff43f636 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 808b1e30..8fe51423 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 642a2726..df753954 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 81facffb..1070c69d 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index d0e34e2b..309fcc08 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 3f6b4335..91257d84 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index c89499f5..491875a6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index e2e6aa76..c78ec622 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 6ed97a79..0dd59e3a 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 2b8d4909..1ba549d5 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 31e6b9ff..0201fc46 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 74fbddfb..6acedcaa 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index d040a272..bd4613d3 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index b6de9e8e..4b15ee99 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 73da4e17..095e52f8 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 58d8837d..7a25825b 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 24d6dbae..f5368742 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 9afdda57..a40de618 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index f71e1011..abdb14f8 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index c5c20d62..0f2f8b74 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index bf746ce0..d7491951 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index adeaa30f..70bac541 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index f4bad650..ff34c312 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 348d31de..2ddae6a2 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 25bab77d..982447f2 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 2147f066..3b45a534 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 90b947ab..2203e4f8 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index aec51f79..147e327d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index b40df642..0305bae4 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 892a21b6..e09fa2cb 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 8552fb5d..22d3da2d 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index b5548143..58d587c5 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 2e1f525b..39fa0153 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 58f86435..4897dfa4 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index f9b45430..12d1a18d 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d80e722c..73efb8c0 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 0f61f41b..d8958167 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 7a7d65ef..ff43f636 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 808b1e30..8fe51423 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 89456899..cec560bf 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 81facffb..1070c69d 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 122e2f6c..fd1f6597 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 3f6b4335..91257d84 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index c89499f5..491875a6 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index e2e6aa76..c78ec622 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 984753b2..df13f5c8 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 2b8d4909..1ba549d5 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 423bbdef..d8a4f2b4 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 74fbddfb..6acedcaa 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d040a272..bd4613d3 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index b6de9e8e..4b15ee99 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 528b9c9c..d1b69ffd 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index ea34c3d3..e8e2dae2 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 24d6dbae..f5368742 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 9afdda57..a40de618 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index f71e1011..abdb14f8 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index c5c20d62..0f2f8b74 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 3eec265c..10b78453 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 9e0758f9..2ca102c0 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index f4bad650..ff34c312 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 348d31de..2ddae6a2 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 25bab77d..982447f2 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 2147f066..3b45a534 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/02]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index f6936068..07c6fd10 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -19,7 +19,11 @@ typedef unsigned long size_t; #endif #else - typedef unsigned int size_t; + #if defined(__OpenBSD__) + typedef unsigned long size_t; + #else + typedef unsigned int size_t; + #endif #endif #define _SIZE_T_DECLARED // For FreeBSD From 9470716304af88806f36889ccabf679d64411a93 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 10 Apr 2018 22:48:37 +0400 Subject: [PATCH 138/241] issue #64 https://github.com/vishaps/voc/issues/64 --- src/runtime/Files.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index eb369b3c..c06d2f2b 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -29,7 +29,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files name *) TYPE - FileName = ARRAY 101 OF CHAR; + FileName = ARRAY 256 OF CHAR; File* = POINTER TO FileDesc; Buffer = POINTER TO BufDesc; From c43644ffebed3b1574a0161b8fdde7beff8e3e22 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 10 Apr 2018 22:51:26 +0400 Subject: [PATCH 139/241] bootstrap sources update. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 38 ++++++++++++++-------------- bootstrap/unix-44/Files.h | 4 +-- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 +-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 38 ++++++++++++++-------------- bootstrap/unix-48/Files.h | 4 +-- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 +-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 38 ++++++++++++++-------------- bootstrap/unix-88/Files.h | 4 +-- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 +-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 38 ++++++++++++++-------------- bootstrap/windows-48/Files.h | 4 +-- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 +-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 38 ++++++++++++++-------------- bootstrap/windows-88/Files.h | 4 +-- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 +-- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 290 insertions(+), 290 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 2203e4f8..10abd264 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 147e327d..8eac398d 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 0305bae4..c817585e 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 8f2f8230..333bdb63 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -26,7 +26,7 @@ typedef Files_BufDesc *Files_Buffer; typedef - CHAR Files_FileName[101]; + CHAR Files_FileName[256]; typedef 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); if (f != NIL) { if (f->registerName[0] != 0x00) { - Out_String(f->registerName, 101); + Out_String(f->registerName, 256); } else { - Out_String(f->workName, 101); + Out_String(f->workName, 256); } if (f->fd != 0) { Out_String((CHAR*)"f.fd = ", 8); @@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __MOVE(osfile->workName, osfile->registerName, 101); - Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + __MOVE(osfile->workName, osfile->registerName, 256); + Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); osfile->tempFile = 1; osfile->state = 0; - error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); if (error != 0) { 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]; if (f->fd == -1) { if (f->state == 1) { - Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); + Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); - Files_Deregister(f->registerName, 101); - __MOVE(f->registerName, f->workName, 101); + Files_Deregister(f->registerName, 256); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } - error = Platform_Unlink((void*)f->workName, 101); - error = Platform_New((void*)f->workName, 101, &f->fd); + error = Platform_Unlink((void*)f->workName, 256); + error = Platform_New((void*)f->workName, 256, &f->fd); done = error == 0; if (done) { f->next = Files_files; @@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len) __DUP(name, name__len, CHAR); __NEW(f, Files_FileDesc); f->workName[0] = 0x00; - __COPY(name, f->registerName, 101); + __COPY(name, f->registerName, 256); f->fd = -1; f->state = 1; f->len = 0; @@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) f->pos = 0; f->swapper = -1; error = Platform_Size(fd, &f->len); - __COPY(name, f->workName, 101); + __COPY(name, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; f->identity = identity; @@ -817,12 +817,12 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { - Files_Deregister(f->registerName, 101); - Files_Rename(f->workName, 101, f->registerName, 101, &errcode); + Files_Deregister(f->registerName, 256); + Files_Rename(f->workName, 256, f->registerName, 256, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __MOVE(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o) if (f->fd >= 0) { Files_CloseOSFile(f); if (f->tempFile) { - res = Platform_Unlink((void*)f->workName, 101); + res = Platform_Unlink((void*)f->workName, 256); } } } @@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*)) P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index d6a5d787..8c775fa4 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,7 +11,7 @@ typedef typedef struct Files_FileDesc { INT32 _prvt0; - char _prvt1[248]; + char _prvt1[560]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 8a2f0e42..348b336b 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index ea56eef7..b73de4fe 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index e85d6101..89f370a7 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 0211f78f..2d074a62 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 73efb8c0..41e56e38 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index d8958167..0eba52d2 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index ff43f636..7fa9fa23 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 8fe51423..1e17f6c2 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index df753954..3dbed3bf 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 1070c69d..9c84b7af 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 309fcc08..00e4fa0e 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 91257d84..010479f8 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 491875a6..74719041 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index c78ec622..dfe2b972 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 0ddf36a5..d6a4c67b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 1ba549d5..f457c51e 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 0201fc46..5193f272 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 6acedcaa..bee5e44d 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 5848b15c..54d88edf 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 4b15ee99..fad5cd1a 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 586721ce..86284785 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 66d3628b..c4f8841c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index f5368742..2af2574f 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index a40de618..07f4371d 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index abdb14f8..3d82b654 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 0f2f8b74..df6f5edc 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 6a395344..e4ee535c 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 5feaaaf3..d53e287c 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index ff34c312..5bfcea49 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 2ddae6a2..51c85058 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 982447f2..2b6c962b 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 3b45a534..9b0b1ee9 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 2203e4f8..10abd264 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 147e327d..8eac398d 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 0305bae4..c817585e 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 8f2f8230..333bdb63 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -26,7 +26,7 @@ typedef Files_BufDesc *Files_Buffer; typedef - CHAR Files_FileName[101]; + CHAR Files_FileName[256]; typedef 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); if (f != NIL) { if (f->registerName[0] != 0x00) { - Out_String(f->registerName, 101); + Out_String(f->registerName, 256); } else { - Out_String(f->workName, 101); + Out_String(f->workName, 256); } if (f->fd != 0) { Out_String((CHAR*)"f.fd = ", 8); @@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __MOVE(osfile->workName, osfile->registerName, 101); - Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + __MOVE(osfile->workName, osfile->registerName, 256); + Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); osfile->tempFile = 1; osfile->state = 0; - error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); if (error != 0) { 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]; if (f->fd == -1) { if (f->state == 1) { - Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); + Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); - Files_Deregister(f->registerName, 101); - __MOVE(f->registerName, f->workName, 101); + Files_Deregister(f->registerName, 256); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } - error = Platform_Unlink((void*)f->workName, 101); - error = Platform_New((void*)f->workName, 101, &f->fd); + error = Platform_Unlink((void*)f->workName, 256); + error = Platform_New((void*)f->workName, 256, &f->fd); done = error == 0; if (done) { f->next = Files_files; @@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len) __DUP(name, name__len, CHAR); __NEW(f, Files_FileDesc); f->workName[0] = 0x00; - __COPY(name, f->registerName, 101); + __COPY(name, f->registerName, 256); f->fd = -1; f->state = 1; f->len = 0; @@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) f->pos = 0; f->swapper = -1; error = Platform_Size(fd, &f->len); - __COPY(name, f->workName, 101); + __COPY(name, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; f->identity = identity; @@ -817,12 +817,12 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { - Files_Deregister(f->registerName, 101); - Files_Rename(f->workName, 101, f->registerName, 101, &errcode); + Files_Deregister(f->registerName, 256); + Files_Rename(f->workName, 256, f->registerName, 256, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __MOVE(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o) if (f->fd >= 0) { Files_CloseOSFile(f); if (f->tempFile) { - res = Platform_Unlink((void*)f->workName, 101); + res = Platform_Unlink((void*)f->workName, 256); } } } @@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*)) P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index d6a5d787..8c775fa4 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,7 +11,7 @@ typedef typedef struct Files_FileDesc { INT32 _prvt0; - char _prvt1[248]; + char _prvt1[560]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 8a2f0e42..348b336b 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index ea56eef7..b73de4fe 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index e85d6101..89f370a7 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 0211f78f..2d074a62 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 73efb8c0..41e56e38 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index d8958167..0eba52d2 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index ff43f636..7fa9fa23 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 8fe51423..1e17f6c2 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index df753954..3dbed3bf 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 1070c69d..9c84b7af 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 309fcc08..00e4fa0e 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 91257d84..010479f8 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 491875a6..74719041 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index c78ec622..dfe2b972 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 0dd59e3a..962b0f86 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 1ba549d5..f457c51e 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 0201fc46..5193f272 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 6acedcaa..bee5e44d 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 5848b15c..54d88edf 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 4b15ee99..fad5cd1a 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 586721ce..86284785 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 66d3628b..c4f8841c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index f5368742..2af2574f 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index a40de618..07f4371d 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index abdb14f8..3d82b654 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 0f2f8b74..df6f5edc 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index d7491951..8e4938b8 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 70bac541..0c55850a 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index ff34c312..5bfcea49 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 2ddae6a2..51c85058 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 982447f2..2b6c962b 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 3b45a534..9b0b1ee9 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 2203e4f8..10abd264 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 147e327d..8eac398d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 0305bae4..c817585e 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 119f0290..4e3baead 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -26,7 +26,7 @@ typedef Files_BufDesc *Files_Buffer; typedef - CHAR Files_FileName[101]; + CHAR Files_FileName[256]; typedef 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); if (f != NIL) { if (f->registerName[0] != 0x00) { - Out_String(f->registerName, 101); + Out_String(f->registerName, 256); } else { - Out_String(f->workName, 101); + Out_String(f->workName, 256); } if (f->fd != 0) { Out_String((CHAR*)"f.fd = ", 8); @@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __MOVE(osfile->workName, osfile->registerName, 101); - Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + __MOVE(osfile->workName, osfile->registerName, 256); + Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); osfile->tempFile = 1; osfile->state = 0; - error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); if (error != 0) { 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]; if (f->fd == -1) { if (f->state == 1) { - Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); + Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); - Files_Deregister(f->registerName, 101); - __MOVE(f->registerName, f->workName, 101); + Files_Deregister(f->registerName, 256); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } - error = Platform_Unlink((void*)f->workName, 101); - error = Platform_New((void*)f->workName, 101, &f->fd); + error = Platform_Unlink((void*)f->workName, 256); + error = Platform_New((void*)f->workName, 256, &f->fd); done = error == 0; if (done) { f->next = Files_files; @@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len) __DUP(name, name__len, CHAR); __NEW(f, Files_FileDesc); f->workName[0] = 0x00; - __COPY(name, f->registerName, 101); + __COPY(name, f->registerName, 256); f->fd = -1; f->state = 1; f->len = 0; @@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) f->pos = 0; f->swapper = -1; error = Platform_Size(fd, &f->len); - __COPY(name, f->workName, 101); + __COPY(name, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; f->identity = identity; @@ -817,12 +817,12 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { - Files_Deregister(f->registerName, 101); - Files_Rename(f->workName, 101, f->registerName, 101, &errcode); + Files_Deregister(f->registerName, 256); + Files_Rename(f->workName, 256, f->registerName, 256, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __MOVE(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o) if (f->fd >= 0) { Files_CloseOSFile(f); if (f->tempFile) { - res = Platform_Unlink((void*)f->workName, 101); + res = Platform_Unlink((void*)f->workName, 256); } } } @@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*)) P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 280), {232, 240, 248, 256, -40}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 592), {544, 552, 560, 568, -40}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}}; diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 730acfa4..b0056ea8 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,7 +11,7 @@ typedef typedef struct Files_FileDesc { INT64 _prvt0; - char _prvt1[272]; + char _prvt1[584]; } Files_FileDesc; typedef diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 58d587c5..9e99e657 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 39fa0153..2b6287cd 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 1cd6c686..25d5f032 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 12d1a18d..5d832fa6 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 73efb8c0..41e56e38 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index d8958167..0eba52d2 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index ff43f636..7fa9fa23 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 8fe51423..1e17f6c2 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index cec560bf..bcf72c6b 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 1070c69d..9c84b7af 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index fd1f6597..18305e4c 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 91257d84..010479f8 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 491875a6..74719041 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index c78ec622..dfe2b972 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index df13f5c8..c6989580 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 1ba549d5..f457c51e 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index d8a4f2b4..617e9e58 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 6acedcaa..bee5e44d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 5848b15c..54d88edf 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 4b15ee99..fad5cd1a 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 5bcea939..bb97464a 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index eebba012..51911cc6 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index f5368742..2af2574f 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index a40de618..07f4371d 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index abdb14f8..3d82b654 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 0f2f8b74..df6f5edc 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 10b78453..82588563 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 2ca102c0..b3dd50cb 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index ff34c312..5bfcea49 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 2ddae6a2..51c85058 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 982447f2..2b6c962b 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 3b45a534..9b0b1ee9 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 2203e4f8..10abd264 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 147e327d..8eac398d 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 0305bae4..c817585e 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 39b7e631..15471c4f 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -26,7 +26,7 @@ typedef Files_BufDesc *Files_Buffer; typedef - CHAR Files_FileName[101]; + CHAR Files_FileName[256]; typedef 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); if (f != NIL) { if (f->registerName[0] != 0x00) { - Out_String(f->registerName, 101); + Out_String(f->registerName, 256); } else { - Out_String(f->workName, 101); + Out_String(f->workName, 256); } if (f->fd != 0) { Out_String((CHAR*)"f.fd = ", 8); @@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __MOVE(osfile->workName, osfile->registerName, 101); - Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + __MOVE(osfile->workName, osfile->registerName, 256); + Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); osfile->tempFile = 1; osfile->state = 0; - error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); if (error != 0) { 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]; if (f->fd == -1) { if (f->state == 1) { - Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); + Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); - Files_Deregister(f->registerName, 101); - __MOVE(f->registerName, f->workName, 101); + Files_Deregister(f->registerName, 256); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } - error = Platform_Unlink((void*)f->workName, 101); - error = Platform_New((void*)f->workName, 101, &f->fd); + error = Platform_Unlink((void*)f->workName, 256); + error = Platform_New((void*)f->workName, 256, &f->fd); done = error == 0; if (done) { f->next = Files_files; @@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len) __DUP(name, name__len, CHAR); __NEW(f, Files_FileDesc); f->workName[0] = 0x00; - __COPY(name, f->registerName, 101); + __COPY(name, f->registerName, 256); f->fd = -1; f->state = 1; f->len = 0; @@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) f->pos = 0; f->swapper = -1; error = Platform_Size(fd, &f->len); - __COPY(name, f->workName, 101); + __COPY(name, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; f->identity = identity; @@ -817,12 +817,12 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { - Files_Deregister(f->registerName, 101); - Files_Rename(f->workName, 101, f->registerName, 101, &errcode); + Files_Deregister(f->registerName, 256); + Files_Rename(f->workName, 256, f->registerName, 256, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __MOVE(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o) if (f->fd >= 0) { Files_CloseOSFile(f); if (f->tempFile) { - res = Platform_Unlink((void*)f->workName, 101); + res = Platform_Unlink((void*)f->workName, 256); } } } @@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*)) P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 260), {236, 240, 244, 248, -20}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 572), {548, 552, 556, 560, -20}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}}; diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dca242d4..25b5a32d 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,7 +11,7 @@ typedef typedef struct Files_FileDesc { INT32 _prvt0; - char _prvt1[256]; + char _prvt1[568]; } Files_FileDesc; typedef diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 8a2f0e42..348b336b 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index ea56eef7..b73de4fe 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 3ef7d5ed..e2075ab0 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 0211f78f..2d074a62 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 73efb8c0..41e56e38 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index d8958167..0eba52d2 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index ff43f636..7fa9fa23 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 8fe51423..1e17f6c2 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index df753954..3dbed3bf 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 1070c69d..9c84b7af 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 309fcc08..00e4fa0e 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 91257d84..010479f8 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 491875a6..74719041 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index c78ec622..dfe2b972 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 0dd59e3a..962b0f86 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 1ba549d5..f457c51e 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 0201fc46..5193f272 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 6acedcaa..bee5e44d 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index bd4613d3..3bfb1ec7 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 4b15ee99..fad5cd1a 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 095e52f8..65fd2654 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 7a25825b..47755d00 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index f5368742..2af2574f 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index a40de618..07f4371d 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index abdb14f8..3d82b654 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 0f2f8b74..df6f5edc 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index d7491951..8e4938b8 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 70bac541..0c55850a 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index ff34c312..5bfcea49 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 2ddae6a2..51c85058 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 982447f2..2b6c962b 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 3b45a534..9b0b1ee9 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 2203e4f8..10abd264 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 147e327d..8eac398d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 0305bae4..c817585e 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index e09fa2cb..7a28d41d 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -26,7 +26,7 @@ typedef Files_BufDesc *Files_Buffer; typedef - CHAR Files_FileName[101]; + CHAR Files_FileName[256]; typedef struct Files_FileDesc { @@ -130,9 +130,9 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String((CHAR*)": ", 3); if (f != NIL) { if (f->registerName[0] != 0x00) { - Out_String(f->registerName, 101); + Out_String(f->registerName, 256); } else { - Out_String(f->workName, 101); + Out_String(f->workName, 256); } if (f->fd != 0) { Out_String((CHAR*)"f.fd = ", 8); @@ -237,11 +237,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len) if (osfile != NIL) { __ASSERT(!osfile->tempFile, 0); __ASSERT(osfile->fd >= 0, 0); - __MOVE(osfile->workName, osfile->registerName, 101); - Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101); + __MOVE(osfile->workName, osfile->registerName, 256); + Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256); osfile->tempFile = 1; osfile->state = 0; - error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101); + error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256); if (error != 0) { Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error); } @@ -257,17 +257,17 @@ static void Files_Create (Files_File f) CHAR err[32]; if (f->fd == -1) { if (f->state == 1) { - Files_GetTempName(f->registerName, 101, (void*)f->workName, 101); + Files_GetTempName(f->registerName, 256, (void*)f->workName, 256); f->tempFile = 1; } else { __ASSERT(f->state == 2, 0); - Files_Deregister(f->registerName, 101); - __MOVE(f->registerName, f->workName, 101); + Files_Deregister(f->registerName, 256); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } - error = Platform_Unlink((void*)f->workName, 101); - error = Platform_New((void*)f->workName, 101, &f->fd); + error = Platform_Unlink((void*)f->workName, 256); + error = Platform_New((void*)f->workName, 256, &f->fd); done = error == 0; if (done) { f->next = Files_files; @@ -338,7 +338,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len) __DUP(name, name__len, CHAR); __NEW(f, Files_FileDesc); f->workName[0] = 0x00; - __COPY(name, f->registerName, 101); + __COPY(name, f->registerName, 256); f->fd = -1; f->state = 1; f->len = 0; @@ -483,7 +483,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len) f->pos = 0; f->swapper = -1; error = Platform_Size(fd, &f->len); - __COPY(name, f->workName, 101); + __COPY(name, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; f->identity = identity; @@ -819,12 +819,12 @@ void Files_Register (Files_File f) } Files_Close(f); if (f->registerName[0] != 0x00) { - Files_Deregister(f->registerName, 101); - Files_Rename(f->workName, 101, f->registerName, 101, &errcode); + Files_Deregister(f->registerName, 256); + Files_Rename(f->workName, 256, f->registerName, 256, &errcode); if (errcode != 0) { Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode); } - __MOVE(f->registerName, f->workName, 101); + __MOVE(f->registerName, f->workName, 256); f->registerName[0] = 0x00; f->tempFile = 0; } @@ -1043,7 +1043,7 @@ static void Files_Finalize (SYSTEM_PTR o) if (f->fd >= 0) { Files_CloseOSFile(f); if (f->tempFile) { - res = Platform_Unlink((void*)f->workName, 101); + res = Platform_Unlink((void*)f->workName, 256); } } } @@ -1065,7 +1065,7 @@ static void EnumPtrs(void (*P)(void*)) P(Files_SearchPath); } -__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 288), {240, 248, 256, 264, -40}}; +__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 600), {552, 560, 568, 576, -40}}; __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}}; __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}}; diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 22d3da2d..16fd4396 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef Files__h #define Files__h @@ -11,7 +11,7 @@ typedef typedef struct Files_FileDesc { INT64 _prvt0; - char _prvt1[280]; + char _prvt1[592]; } Files_FileDesc; typedef diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 58d587c5..9e99e657 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 39fa0153..2b6287cd 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 4897dfa4..94227779 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 12d1a18d..5d832fa6 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 73efb8c0..41e56e38 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index d8958167..0eba52d2 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index ff43f636..7fa9fa23 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 8fe51423..1e17f6c2 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index cec560bf..bcf72c6b 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 1070c69d..9c84b7af 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index fd1f6597..18305e4c 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 91257d84..010479f8 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 491875a6..74719041 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index c78ec622..dfe2b972 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index df13f5c8..c6989580 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 1ba549d5..f457c51e 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index d8a4f2b4..617e9e58 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 6acedcaa..bee5e44d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index bd4613d3..3bfb1ec7 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 4b15ee99..fad5cd1a 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index d1b69ffd..361a39fc 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index e8e2dae2..9ca6f851 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index f5368742..2af2574f 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index a40de618..07f4371d 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index abdb14f8..3d82b654 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 0f2f8b74..df6f5edc 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 10b78453..82588563 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 2ca102c0..b3dd50cb 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index ff34c312..5bfcea49 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 2ddae6a2..51c85058 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 982447f2..2b6c962b 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 3b45a534..9b0b1ee9 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2017/09/06]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2018/04/10]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 4bbacbaaa47e4764d65bec067653adc863125bc1 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 10 Apr 2018 23:29:14 +0400 Subject: [PATCH 140/241] brought sources in sync with current library state. --- src/test/newt/newttest.Mod | 78 +++++++++++++++++++------------------ src/test/newt/newttest2.Mod | 4 +- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/test/newt/newttest.Mod b/src/test/newt/newttest.Mod index 46d82a8e..ff673863 100644 --- a/src/test/newt/newttest.Mod +++ b/src/test/newt/newttest.Mod @@ -1,46 +1,50 @@ MODULE newttest; -IMPORT newt, oocIntStr, Unix; -VAR i, j, k : newt.Int32; -str : ARRAY 32 OF CHAR; -ch : CHAR; -fo, co : newt.Component; +IMPORT newt, oocIntStr, Platform; + +CONST delayTime = 1000; + +VAR + i, j, k : newt.Int32; + str : ARRAY 32 OF CHAR; + ch : CHAR; + fo, co : newt.Component; BEGIN -i := newt.Init(); -newt.Cls(); -str := "hello world!"; -newt.DrawRootText(5, 7, str); -newt.GetScreenSize(i, j); -oocIntStr.IntToStr(i, str); -newt.DrawRootText(5, 9, str); -str := "x"; -newt.DrawRootText(7, 9, "x"); -oocIntStr.IntToStr(j, str); -newt.DrawRootText(9, 9, str); + i := newt.Init(); + newt.Cls(); + str := "hello world!"; + newt.DrawRootText(5, 7, str); + newt.GetScreenSize(i, j); + oocIntStr.IntToStr(i, str); + newt.DrawRootText(5, 9, str); + str := "x"; + newt.DrawRootText(7, 9, "x"); + oocIntStr.IntToStr(j, str); + newt.DrawRootText(9, 9, str); -newt.PushHelpLine(""); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PushHelpLine(""); + newt.Refresh(); + Platform.Delay(delayTime); -newt.PushHelpLine("A help line"); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PushHelpLine("A help line"); + newt.Refresh(); + Platform.Delay(delayTime); -newt.PopHelpLine(); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PopHelpLine(); + newt.Refresh(); + Platform.Delay(delayTime); -REPEAT -ch := newt.GetKey(); -str[0] := ch; -str[1] := 0X; -newt.DrawRootText(5, 5, str); -newt.PushHelpLine(str); -newt.Refresh; -UNTIL ch = ' '; + REPEAT + ch := newt.GetKey(); + str[0] := ch; + str[1] := 0X; + newt.DrawRootText(5, 5, str); + newt.PushHelpLine(str); + newt.Refresh; + UNTIL ch = ' '; -(* -newt.WaitForKey(); -newt.Delay(30);*) -i := newt.Finished(); + (* + newt.WaitForKey(); + newt.Delay(30);*) + i := newt.Finished(); END newttest. diff --git a/src/test/newt/newttest2.Mod b/src/test/newt/newttest2.Mod index 9cd02d99..a26248ab 100644 --- a/src/test/newt/newttest2.Mod +++ b/src/test/newt/newttest2.Mod @@ -1,6 +1,6 @@ MODULE newttest2; -IMPORT newt, oocIntStr, Unix; +IMPORT newt, oocIntStr; VAR i, j, k : newt.Int32; str : ARRAY 32 OF CHAR; form, b1, b2, comp: newt.Component; @@ -20,7 +20,7 @@ newt.FormAddComponent(form, b1); newt.FormAddComponent(form, b2); comp := newt.RunForm(form); newt.WaitForKey(); -newt.Delay(30); +newt.Delay(3000); newt.FormDestroy(form); i := newt.Finished(); END newttest2. From 419e90e0739e624516a18fbfe6221e4b32aa148b Mon Sep 17 00:00:00 2001 From: norayr Date: Sat, 14 Apr 2018 23:09:26 +0400 Subject: [PATCH 141/241] in order to instigate new build and update the build status png synced beep.Mod with actual library sources. --- src/test/sound/beep.Mod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/sound/beep.Mod b/src/test/sound/beep.Mod index 6c53ed76..d8b30ae9 100644 --- a/src/test/sound/beep.Mod +++ b/src/test/sound/beep.Mod @@ -1,5 +1,5 @@ MODULE beep; -IMPORT Files, rm:=oocRealMath, Unix; +IMPORT Files, rm:=oocRealMath, Platform; CONST pi2=6.28318; (*pi2 = 6.2831802368164062;*) @@ -52,7 +52,7 @@ FOR i:=1 TO e DO END; Files.Register(outvar); -i:=Unix.System("oggenc -r -C 1 beepfile"); -i:=Unix.System("ogg123 beepfile.ogg"); +i:=Platform.System("oggenc -r -C 1 beepfile"); +i:=Platform.System("ogg123 beepfile.ogg"); END beep. From 1da977da55d054d01f97414446e41b4cfda1e75e Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 18:21:10 +0100 Subject: [PATCH 142/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index a420ab86..6a545bbc 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](http://brownsmeet.com/build-status.svg)](http://brownsmeet.com/log/) +[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From 1bd4070e064d6a525796dafa2c747318d9812bc9 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 18:23:44 +0100 Subject: [PATCH 143/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 6a545bbc..28e73dcd 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) +[![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From 56ea3f3a2743b39838a6425f867f29c2c10e4dec Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 19:55:37 +0100 Subject: [PATCH 144/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 28e73dcd..a420ab86 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) +[![Build status](http://brownsmeet.com/build-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From a2f3f727958981eef752857d710ef85f80e30d3d Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 20:11:17 +0100 Subject: [PATCH 145/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index a420ab86..6a545bbc 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](http://brownsmeet.com/build-status.svg)](http://brownsmeet.com/log/) +[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From ffad2a1a14cc4f6c296cc78da8f7aedc824df7c1 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 20:13:09 +0100 Subject: [PATCH 146/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 6a545bbc..28e73dcd 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) +[![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From 02ea27e8b509b162b91e3ee171e44c62c6e507f0 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Sun, 22 Apr 2018 20:21:09 +0100 Subject: [PATCH 147/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 28e73dcd..6a545bbc 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) +[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) # Ѵishap Oberon From 2d8cd4a4789ec0f83ca1f1aafe4185da3a1f96d7 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 23 Apr 2018 17:28:43 +0100 Subject: [PATCH 148/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 6a545bbc..9b614a2e 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg)](http://brownsmeet.com/log/) +[Build status](http://brownsmeet.com/githubhook/vishaps-status.svg) # Ѵishap Oberon From 2de6345b99a609e00a8622898929dd41b202d54c Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 23 Apr 2018 17:29:05 +0100 Subject: [PATCH 149/241] Update ReadMe.md --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 9b614a2e..f43f8559 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -[Build status](http://brownsmeet.com/githubhook/vishaps-status.svg) +![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg) # Ѵishap Oberon From 175eafb9009a786d4d9c69313132e8fa0d06faf4 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 23 Apr 2018 18:24:41 +0100 Subject: [PATCH 150/241] New autobuild system --- src/tools/autobuild/build-oberon.sh | 34 ---- src/tools/autobuild/buildall.pl | 68 -------- src/tools/autobuild/makesvg.pl | 113 +++++++++++++ src/tools/autobuild/postpush.pl | 55 ------- src/tools/autobuild/report.pl | 192 ---------------------- src/tools/autobuild/response.html | 5 + src/tools/autobuild/runbuilds.pl | 203 ++++++++++++++++++++++++ src/tools/autobuild/server.pl | 154 ++++++++++++++++++ src/tools/autobuild/update-webserver.sh | 9 -- 9 files changed, 475 insertions(+), 358 deletions(-) delete mode 100644 src/tools/autobuild/build-oberon.sh delete mode 100644 src/tools/autobuild/buildall.pl create mode 100644 src/tools/autobuild/makesvg.pl delete mode 100644 src/tools/autobuild/postpush.pl delete mode 100644 src/tools/autobuild/report.pl create mode 100644 src/tools/autobuild/response.html create mode 100644 src/tools/autobuild/runbuilds.pl create mode 100755 src/tools/autobuild/server.pl delete mode 100644 src/tools/autobuild/update-webserver.sh diff --git a/src/tools/autobuild/build-oberon.sh b/src/tools/autobuild/build-oberon.sh deleted file mode 100644 index ca9a10ed..00000000 --- a/src/tools/autobuild/build-oberon.sh +++ /dev/null @@ -1,34 +0,0 @@ -# Build Oberon -# -# Args -# -# $1 - whether to use sudo -# $2 - build directory -# $3 - CC -# $4 - branch - -if test "$1" = "sudo"; then sudo=sudo; else sudo=""; fi - -echo "" -echo === build-oberon.sh: \$1="$1", \$2="$2", \$3="$3", \$4="$4", \$sudo="$sudo" === -echo "" - -set -x -cd $2 - -$sudo git reset --hard # Clear the staging area -$sudo git clean -dfx # Remove all untracked files -$sudo git pull # Update the local repository -$sudo git checkout -f $4 # Switch to requested branch - -export CC=$3 - -if test "$3" = "msc-x86"; then - cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x86 '&&' cd 'c:\cygwin\home\dave\msc-x86\voc' '&&' make full -else -if test "$3" = "msc-x64"; then - cmd /c 'C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat' x64 '&&' cd 'c:\cygwin\home\dave\msc-x64\voc' '&&' make full -else - $sudo make full -fi -fi diff --git a/src/tools/autobuild/buildall.pl b/src/tools/autobuild/buildall.pl deleted file mode 100644 index f72c36b9..00000000 --- a/src/tools/autobuild/buildall.pl +++ /dev/null @@ -1,68 +0,0 @@ -#!perl -w -use strict; -use warnings; -use POSIX "strftime"; -use Cwd; - -my $branch = "master"; -if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} - -my %machines = ( - "pi" => ['22', 'pi@pie', 'sh build-oberon.sh sudo projects/oberon/vishap/voc gcc ' . $branch], - "darwin" => ['22', 'dave@dcb', 'sh build-oberon.sh sudo projects/oberon/vishap/voc clang ' . $branch], - "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], - "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], - "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], - "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc x86_64-w64-mingw32-gcc ' . $branch . '\''], - "android" => ['8022', 'root@and', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "lub64" => ['22', 'dave@vim', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "lub32" => ['22', 'dave@vim-lub32', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "fed64" => ['22', 'dave@vim-fed64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "osu64" => ['22', 'dave@vim-osu64', 'sh build-oberon.sh sudo oberon/voc gcc ' . $branch], - "obs32" => ['22', 'dave@vim-obs32', 'sh build-oberon.sh n vishap/voc gcc ' . $branch], - "win32" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x86/voc msc-x86 ' . $branch], - "win64" => ['22', 'dave@vim-win64', 'sh build-oberon.sh n msc-x64/voc msc-x64 ' . $branch], - "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], - "fb64" => ['22', 'root@oberon', 'sh build-oberon.sh n vishap/voc gcc ' . $branch] -); - -sub logged { - my ($cmd, $id) = @_; - my $child = fork; - if (not defined $child) {die "Fork failed.";} - if ($child) { - # parent process - print "Started $id, pid = $child\n"; - } else { - # child process - open(my $log, ">log/$id.log") // die "Could not create log file log/$id.log"; - print $log strftime("%Y/%m/%d %H.%M.%S ", localtime), "$id.log\n"; - print $log strftime("%H.%M.%S", localtime), "> $cmd\n"; - print $id, " ", strftime("%H.%M.%S", localtime), "> $cmd\n"; - open(my $pipe, "$cmd 2>&1 |") // die "Could not open pipe from command $cmd."; - while (<$pipe>) { - my $line = $_; - print $id, " ", strftime("%H.%M.%S", localtime), " ", $line; - print $log strftime("%H.%M.%S", localtime), " ", $line; - } - close($pipe); - print $log strftime("%H.%M.%S", localtime), " --- Make completed ---\n"; - close($log); - exit; - } -} - -unlink glob "log/*"; - -for my $machine (sort keys %machines) { - my ($port, $login, $cmd) = @{$machines{$machine}}; - my $cmd = "scp -P $port build-oberon.sh $login:build-oberon.sh &&" - . "ssh -p $port $login \"$cmd\""; - logged($cmd, $machine); -} - -system("perl report.pl $branch"); -while ((my $pid = wait) > 0) { - print "Child pid $pid completed.\n"; - system("perl report.pl $branch"); -} diff --git a/src/tools/autobuild/makesvg.pl b/src/tools/autobuild/makesvg.pl new file mode 100644 index 00000000..398d09cd --- /dev/null +++ b/src/tools/autobuild/makesvg.pl @@ -0,0 +1,113 @@ +#!perl -w +use strict; +use warnings; + + +my %BuildStatus = (); +my $Rows = 0; +opendir DIR, "logs"; +while (my $fn = readdir(DIR)) { + if ($fn =~ /^((.+)-(.+))\.state$/) { + my ($build, $branch, $id) = ($1, $2, $3); + open STATE, "); # date time os compiler model compiler-build library-build ssource-change binary-change tests + splice(@state, 2, 0, $branch); + $BuildStatus{$build} = \@state; + close STATE; + $Rows++; + } +} +closedir DIR; + +#for my $fn (sort keys %BuildStatus) { +# print "$fn:\n"; +# my @state = @{$BuildStatus{$fn}}; +# my $i = 0; +# for my $val (@state) { +# print " $i: $val\n"; +# $i++; +# } +#} + + +my $FontHeight = 12; +my $LineHeight = 16; + +sub svgtext { + my ($f, $x, $y, $colour, $msg) = @_; + if ($msg ne '') { + $y = ($y+1)*$LineHeight + $FontHeight*0.4; + print $f <<"--END--TEXT--"; +$msg +--END--TEXT-- + } +} + +sub ColourFor { + my ($str) = @_; + if ($str eq "Failed") {return "#e03030";} # red + if ($str eq "Changed") {return "#ff9d4d";} # amber + if ($str eq "Passed") {return "#5adb5a";} # green + if ($str eq "Built") {return "#5adb5a";} # green + return "#c0c0c0"; +} + + +my @ColWidths = (22, 81, 67, 60, 70, 60, 50, 60, 60, 80, 80, 64); +my @Columns = (0); +for my $width (@ColWidths) {push @Columns, $Columns[$#Columns] + $width} + +my $Width = $Columns[$#Columns]; +my $Height = ($Rows+2.2) * $LineHeight; + + + +open(my $svg, ">vishaps-status.svg") // die "Could not create vishaps-status.svg."; + +print $svg <<"--END--SVG--HEADER--"; + + + +--END--SVG--HEADER-- + + +svgtext($svg, $Columns[1], 0, "#e0e0e0", "Date"); +svgtext($svg, $Columns[2], 0, "#e0e0e0", "Time"); +svgtext($svg, $Columns[3], 0, "#e0e0e0", "Branch"); +svgtext($svg, $Columns[4], 0, "#e0e0e0", "OS"); +svgtext($svg, $Columns[5], 0, "#e0e0e0", "Compiler"); +svgtext($svg, $Columns[6], 0, "#e0e0e0", "Model"); +svgtext($svg, $Columns[7], 0, "#e0e0e0", "Oberon"); +svgtext($svg, $Columns[8], 0, "#e0e0e0", "Library"); +svgtext($svg, $Columns[9], 0, "#e0e0e0", "C Source"); +svgtext($svg, $Columns[10], 0, "#e0e0e0", "Assembler"); +svgtext($svg, $Columns[11], 0, "#e0e0e0", "Tests"); + + +my $Row = 1; +for my $build (sort keys %BuildStatus) { + my @state = @{$BuildStatus{$build}}; + + my $y = $Row*$LineHeight + $FontHeight*0.8; + my $h = $LineHeight * 0.9; + print $svg <<"--END--HIGHLIGHT--"; + + +--END--HIGHLIGHT-- + + my $column = 1; + for my $field (@state) { + svgtext($svg, $Columns[$column], $Row, ColourFor($field), $field); + $column++; + } + $Row++; + + print $svg "\n" +} + +print $svg "\n"; +close $svg; diff --git a/src/tools/autobuild/postpush.pl b/src/tools/autobuild/postpush.pl deleted file mode 100644 index 07397517..00000000 --- a/src/tools/autobuild/postpush.pl +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use warnings; -use POSIX "strftime"; - -use CGI qw(:standard escapeHTML); -use JSON; - - -sub writelog { - my ($msg) = @_; - - open(LOG, ">>/tmp/postpush.log") or die "Could not create postpush.log"; - flock(LOG, 2) or die "Could not lock postpush.log"; - print LOG sprintf("%s %s\n", strftime("%Y/%m/%d %H.%M.%S", localtime), $msg); - close(LOG); - system "id >> /tmp/postpush.log"; -} - -my $postdata = from_json(param('POSTDATA')); - -my $url = $postdata->{'repository'}->{'url'}; -my $ref = $postdata->{'ref'}; -my $name = $postdata->{'head_commit'}->{'author'}->{'name'}; -my $branch = $ref; $branch =~ s'^.*\/''; -my $repo = $url; $repo =~ s'^.*\/''; -my $modified = $postdata->{'head_commit'}->{'modified'}; - -my $buildneeded = 0; -for my $file (@{$modified}) { - if ($file !~ m/\.(md|svg)$/i) {$buildneeded = 1;} -} - -if ($buildneeded) { - writelog "Post push github web hook for repository $repo, branch $branch, name $name. Build required."; - - my $child = fork; - if (not defined $child) {die "Fork failed.";} - if ($child) { - writelog "Started buildall, pid = $child."; # parent process - } else { - close(STDIN); close(STDOUT); close(STDERR); # child process - exec 'perl buildall.pl ' . $branch . ' >/tmp/buildall.log'; - exit; - } -} else { - writelog "Post push github web hook for repository $repo, branch $branch, name $name. No build required."; -} - - -print header(), - start_html("Vishap Oberon github post push web hook."), - p("Repository $repo, branch $branch, name $name."), - end_html(); diff --git a/src/tools/autobuild/report.pl b/src/tools/autobuild/report.pl deleted file mode 100644 index 80c8965e..00000000 --- a/src/tools/autobuild/report.pl +++ /dev/null @@ -1,192 +0,0 @@ -#!perl -w -use strict; -use warnings; -use POSIX "strftime"; -use Cwd; - -my $branch = "master"; -if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]} - -print "--- Running build status report on branch $branch.\n"; - -my %status = (); - -my $fn; -my $date; -my $time; -my $os; -my $compiler; -my $datamodel; -my $compilerok; -my $libraryok; -my $sourcechange; -my $asmchange; -my $tests; -my $key; -my $ver; - -sub clearvars { - $time = ""; $branch = ""; $os = ""; $compiler = ""; - $datamodel = ""; $compilerok = ""; $libraryok = ""; $sourcechange = ""; - $asmchange = ""; $tests = ""; $key = ""; $ver = ""; -} - -sub logstatus { - my ($fn) = @_; - if ($compiler ne "") { - $status{"$os-$compiler-$datamodel"} = - [$fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $asmchange, $tests]; - } - clearvars(); -} - -sub parselog { - ($fn) = @_; - clearvars(); - open(my $log, $fn) // die "Couldn't open build log $fn."; - $branch = "Build on $fn started"; - while (<$log>) { - s/\r//g; # Remove unwanted MS command prompt CR's. - - if (/^([0-9\/]+) ([0-9.]+) .+\.log$/) {$date = $1} - if (/^([0-9.]+) /) {$time = $1} - - #14.55.15 === build-oberon.sh: $1=sudo, $2=oberon/voc, $3=gcc, $4=master, $sudo=sudo === - if (/^[^ ]+ === build-oberon.sh: .* \$3=([^ ]+), \$4=([^ ]+),/) { - ($compiler, $branch) = ($1, $2); - } - - # 14.55.17 + sudo git checkout -f master - if (/^[^ ]+ .*git checkout -f ([^ ]+) *$/) { - $branch = $1; - } - - # 14.55.17 Configuration: 2.1.0 [2016/12/22] for gcc ILP32 on ubuntu - if (/^[^ ]+ Configuration: ([^ ]+) \[[0-9\/]+\] for ([^ ]+) ([^ ]+) on ([^ ]+)/) { - ($ver, $compiler, $datamodel, $os) = ($1, $2, $3, $4); - printf "--- Config for $fn: $1 for $2 $3 on $4.\n"; - } - - #if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) { - # ($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5); - #} - - if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Started";} - if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";} - - if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Started";} - if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";} - - if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";} - if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";} - - if (/^([0-9.]+) --- Generated code unchanged ---$/) {if ($asmchange eq "") {$asmchange = "Unchanged"}} - if (/^([0-9.]+) --- Generated code changed ---$/) {$asmchange = "Changed"} - - if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Started";} - if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";} - - if (/^([0-9.]+) --- Make completed ---$/) { - # Go back and convert 'Started' status to 'Failed'. - if ($branch =~ m/^Build on/) {$branch = "Build on $fn failed to start.";} - if ($compilerok eq "Started") {$compilerok = "Failed";} - if ($libraryok eq "Started") {$libraryok = "Failed";} - if ($tests eq "Started") {$tests = "Failed";} - if ($compiler eq "msc") {$sourcechange = "n/a"; $tests = "n/a";} - } - } - close($log); - logstatus($fn); -} - -opendir DIR, "log" // die "Could not open log directory."; -my @logs = readdir DIR; -closedir DIR; - -for my $logname (sort @logs) { - $logname = "log/" . $logname; - #print "Consider $logname\n"; - if (-f $logname) {parselog($logname);} -} - -my $fontheight = 12; -my $lineheight = 15; - -sub svgtext { - my ($f, $x, $y, $colour, $msg) = @_; - print $f ''; - print $f $msg; - print $f "\n"; -} - -sub colourfor { - my ($str) = @_; - if ($str eq "Failed") {return "#e03030";} - if ($str eq "Changed") {return "#ff9d4d";} - if ($str eq "n/a") {return "#707070";} - return "#5adb5a"; -} - -my $rows = keys %status; - -my $width = 710; -my $height = ($rows+2.2) * $lineheight; - -open(my $svg, ">build-status.svg") // die "Could not create build-status.svg."; -print $svg '\n"; -print $svg '', "\n"; - -my $col1 = 20; -my $col2 = 97; -my $col3 = 160; -my $col4 = 220; -my $col5 = 280; -my $col6 = 330; -my $col7 = 380; -my $col8 = 440; -my $col9 = 490; -my $col10 = 570; -my $col11 = 650; - -svgtext($svg, $col1, 0, "#e0e0e0", "Date"); -svgtext($svg, $col3, 0, "#e0e0e0", "Branch"); -svgtext($svg, $col4, 0, "#e0e0e0", "Platform"); -svgtext($svg, $col7, 0, "#e0e0e0", "Compiler"); -svgtext($svg, $col8, 0, "#e0e0e0", "Library"); -svgtext($svg, $col9, 0, "#e0e0e0", "C Source"); -svgtext($svg, $col10, 0, "#e0e0e0", "Assembler"); -svgtext($svg, $col11, 0, "#e0e0e0", "Tests"); - -my $i=1; -for my $key (sort keys %status) { - my ($fn, $date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, - $sourcechange, $asmchange, $tests) = @{$status{$key}}; - print $svg ''; - svgtext($svg, $col1, $i, "#c0c0c0", $date); - svgtext($svg, $col2, $i, "#c0c0c0", $time); - svgtext($svg, $col3, $i, "#c0c0c0", $branch); - svgtext($svg, $col4, $i, "#c0c0c0", $os); - svgtext($svg, $col5, $i, "#c0c0c0", $compiler); - svgtext($svg, $col6, $i, "#c0c0c0", $datamodel); - svgtext($svg, $col7, $i, colourfor($compilerok), $compilerok); - svgtext($svg, $col8, $i, colourfor($libraryok), $libraryok); - svgtext($svg, $col9, $i, colourfor($sourcechange), $sourcechange); - svgtext($svg, $col10, $i, colourfor($asmchange), $asmchange); - svgtext($svg, $col11, $i, colourfor($tests), $tests); - print $svg ''; - $i++; -} - -print $svg "\n"; - -system 'chmod +r log/*'; -system 'scp build-status.svg dave@hub:/var/www'; -system 'scp log/* dave@hub:/var/www/log'; diff --git a/src/tools/autobuild/response.html b/src/tools/autobuild/response.html new file mode 100644 index 00000000..12acbc38 --- /dev/null +++ b/src/tools/autobuild/response.html @@ -0,0 +1,5 @@ + + +github webhook response +github webhook response + diff --git a/src/tools/autobuild/runbuilds.pl b/src/tools/autobuild/runbuilds.pl new file mode 100644 index 00000000..c0cb733a --- /dev/null +++ b/src/tools/autobuild/runbuilds.pl @@ -0,0 +1,203 @@ +#!perl -w +use strict; +use warnings; +use POSIX "strftime"; + +my $home = "/home/dave/vishap-build"; + +chdir $home; +mkdir "logs"; +#my $GlobalLog = *STDOUT; +open my $GlobalLog, ">$home/logs/runbuilds.log"; + +my $LogToScreenToo = 1; + + +# Find a build to run + +sub FindTriggeredBuild { + opendir (DIR, "$home") || die "$!"; + my $branch = undef; + while ((!defined $branch) && (my $fn = readdir DIR)) { + if ($fn =~ /^trigger-(\w+)/) {$branch = $1; unlink "$home/$fn"} + } + closedir DIR; + return $branch; +} + + + + +# Status information +# +# Build type: Datestamp Branch Platform Compiler Model +# Status: Compiler-build Library-build C-changed Assembler? Tests +# + +my %BuildStatus = (); + +sub WriteStatus {my ($timestamp, $id) = @_; + open STATE, ">logs/$id.state"; + print STATE "$timestamp "; + print STATE $BuildStatus{$id}->{kind}, ' '; + print STATE $BuildStatus{$id}->{compile}, ' '; + print STATE $BuildStatus{$id}->{library}, ' '; + print STATE $BuildStatus{$id}->{csource}, ' '; + print STATE $BuildStatus{$id}->{binary}, ' '; + print STATE $BuildStatus{$id}->{tests}, "\n"; + close STATE; +} + +sub SetStatus {my ($timestamp, $id, $section, $state) = @_; + if (!exists $BuildStatus{$id}) {$BuildStatus{$id} = { + kind => "- - -", compile => "Pending", library => "Pending", + csource => "Pending", binary => "Pending", tests => "Pending" + }} + $BuildStatus{$id}->{$section} = $state; + WriteStatus($timestamp, $id) +} + + +sub UpdateStatus {my ($timestamp, $id, $msg) = @_; + if ($msg =~ /^Configuration: ([^ ]+) \[[0-9\/]+\] for ([^ ]+) ([^ ]+) on ([^ ]+)/) { + SetStatus($timestamp, $id, 'kind', "$4 $2 $3") + } else { + if ($msg =~ /^--- (.*) ---$/) { + my $status = $1; + if ($status eq 'Build starts') {$id =~ /^.+?-(.+)$/; SetStatus($timestamp, $id, 'kind', "($1 rsync) -")} + elsif ($status eq 'Compiler build started') {SetStatus($timestamp, $id, 'compile', 'Busy')} + elsif ($status eq 'Compiler build successfull') {SetStatus($timestamp, $id, 'compile', 'Built')} + elsif ($status eq 'Library build started') {SetStatus($timestamp, $id, 'library', 'Busy')} + elsif ($status eq 'Library build successfull') {SetStatus($timestamp, $id, 'library', 'Built')} + elsif ($status eq 'Generated c source files match bootstrap') {SetStatus($timestamp, $id, 'csource', 'Unchanged')} + elsif ($status eq 'Generated c source files differ from bootstrap') {SetStatus($timestamp, $id, 'csource', 'Changed')} + elsif ($status eq 'Generated code unchanged') {SetStatus($timestamp, $id, 'binary', 'Unchanged')} + elsif ($status eq 'Generated code changed') {SetStatus($timestamp, $id, 'binary', 'Changed')} + elsif ($status eq 'Confidence tests started') {SetStatus($timestamp, $id, 'tests', 'Busy')} + elsif ($status eq 'Confidence tests passed') {SetStatus($timestamp, $id, 'tests', 'Passed')} + elsif ($status eq 'Build ends') { + my %status = %{$BuildStatus{$id}}; + foreach my $sec (keys %status) { + if ($status{$sec} eq 'Busy') {$BuildStatus{$id}->{$sec} = 'Failed'} + if ($status{$sec} eq 'Pending') {$BuildStatus{$id}->{$sec} = '-'} + } + WriteStatus($timestamp, $id) + } + } + } +} + + +sub Log {my ($log, $id, $msg) = @_; + my $timestamp = strftime("%Y/%m/%d %H.%M.%S", localtime); + $msg =~ s/[\r\n]*$//; # Remove trailing newline characters + UpdateStatus($timestamp, $id, $msg); + substr($timestamp,0,11) = ''; # Remove date part as not needed in logs + if ($LogToScreenToo) {print "($id) $timestamp $msg\n"} + print $GlobalLog "$timestamp ($id) $msg\n"; + if (defined $log) {print $log "$timestamp $msg\n"} +} + + +sub DoLogged {my ($log, $id, $cmd) = @_; + Log $log, $id, "Executing '$cmd'."; + open(my $pipe, "$cmd 2>&1 |") // die "Could not open pipe from command $cmd."; + while (<$pipe>) {Log $log, $id, $_} + close($pipe); +} + + + +sub SendFile {my ($log, $id, $dest, $port, $filename, $content) = @_; + Log $log, $id, "SendFile($dest,$port,$filename)"; + open PIPE, "|ssh -p $port $dest 'cat >$filename'"; + $content =~ s/\n/\r\n/g; # Unix to MS line ends. + print PIPE $content; + close PIPE; +} + + + +## my %machines = ( +## "cygwin32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch], +## "cygwin64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/cygwin/voc gcc ' . $branch . '\''], +## "mingw32" => ['5932', 'dave@wax', 'sh build-oberon.sh n oberon/mingw/voc i686-w64-mingw32-gcc ' . $branch], +## "mingw64" => ['5932', 'dave@wax', 'sh start64.sh \'sh build-oberon.sh n oberon/mingw/voc x86_64-w64-mingw32-gcc ' . $branch . '\''], +## "ce64" => ['5922', 'obe@www', 'sh build-oberon.sh sudo vishap/voc gcc ' . $branch], +## ); + + + + +my @Builds = ( + ['pi', 'pi@pie', '22', '', 'cd vishaps/$id && make full'], + ['android', 'and', '8022', '', 'cd vishaps/$id && CC=gcc make full'], + ['lub32', 'vim-lub32', '22', '', 'cd vishaps/$id && make full'], + ['lub32cl', 'vim-lub32', '22', '', 'cd vishaps/$id && CC=clang make full'], + ['obs32', 'vim-obs32', '22', '', 'cd vishaps/$id && make full'], + ['cyg32', 'wax', '5932', '', 'cd vishaps/$id && make full'], + ['ming32', 'wax', '5932', '', 'cd vishaps/$id && CC=i686-w64-mingw32-gcc make full'], + ['cyg64', 'wax', '5932', '', 'sh start64.sh \'cd vishaps/$id && make full\''], + ['ming64', 'wax', '5932', '', 'sh start64.sh \'cd vishaps/$id && CC=x86_64-w64-mingw32-gcc make full\''], + ['lub64', 'vim', '22', '', 'cd vishaps/$id && make full'], + ['osu64', 'vim-osu64', '22', '', 'cd vishaps/$id && make full'], + ['fed64', 'vim-fed64', '22', '', 'cd vishaps/$id && make full'], + ['fbs64', 'githubhook', '22', '', 'cd vishaps/$id && make full'], + ['ce64', 'vim-ce64', '22', '', 'cd vishaps/$id && make full'], + ['darwin', 'dcb', '22', '', 'cd vishaps/$id && make full'], + ['win32', 'vim-win64', '22', 'x86', 'cmd /c x86.cmd'], + ['win64', 'vim-win64', '22', 'x64', 'cmd /c x64.cmd'] +); + +sub Prepare {my ($log, $id, $dest, $port, $preparation) = @_; + SendFile($log, $id, $dest, $port, "$preparation.cmd", <<"--END--MS--"); +call \"C:\\Program Files (x86)\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat\" $preparation +cd %HOME%\\vishaps\\$id +make full +--END--MS-- +} + +sub BuildBranch {my ($branch) = @_; + Log undef, $branch, "$branch branch build triggered."; + +# # Obtain a clean clone of vishaps +# DoLogged undef, $branch, "rm -rf $home/voc"; +# DoLogged undef, $branch, "cd $home && git clone -b $branch --single-branch https://github.com/vishaps/voc"; + + # Start each build in turn + + unlink glob "$home/logs/$branch-*"; + for my $build (@Builds) { + my ($id, $dest, $port, $preparation, $command) = @$build; + my $rsynccompress = "-z"; if ($id eq "android") {$rsynccompress = "-zz"} + $id = "$branch-$id"; + my $child = fork; if (not defined $child) {die "Fork failed.";} + if ($child) {print "Opened process $child for build $id at $dest.\n"} + else { + # child process + my $log; + open $log, ">$home/logs/$id.log"; + Log $log, $id, "--- Build starts ---"; + Log $log, $id, strftime("%Y/%m/%d ", localtime) . "Build $id starting at $dest."; + DoLogged $log, $id, "ssh -p $port $dest mkdir -p vishaps/$id"; + DoLogged $log, $id, "rsync -r $rsynccompress --delete -e 'ssh -p $port' $home/voc/ $dest:vishaps/$id/"; + if ($preparation ne '') {Prepare($log, $id, $dest, $port, $preparation)} + $command =~ s/\$id /$id /g; + DoLogged $log, $id, "ssh -p $port $dest \"$command\""; + Log $log, $id, "Build $id for branch $branch at $dest completed."; + Log $log, $id, "--- Build ends ---"; + close $log; + exit; + } + } + + Log undef, $branch, "$branch branch: all builds started."; +} + + + +Log undef, 'runbuilds', strftime("%Y/%m/%d ", localtime) . "runbuilds starting."; +while (my $branch = FindTriggeredBuild()) {BuildBranch($branch)} +Log undef, 'runbuilds', "No more build triggers found, runbuilds complete."; +close $GlobalLog; + diff --git a/src/tools/autobuild/server.pl b/src/tools/autobuild/server.pl new file mode 100755 index 00000000..1016f78f --- /dev/null +++ b/src/tools/autobuild/server.pl @@ -0,0 +1,154 @@ +#!/usr/bin/perl +use strict; +use warnings; +use HTTP::Daemon; +use HTTP::Status; +use HTTP::Response; +use HTTP::Date qw(time2str); +use LWP::MediaTypes qw(guess_media_type); +use Digest::SHA qw(hmac_sha1_hex); +use Data::Dumper; +use JSON; +use sigtrap qw(die INT QUIT); + +my $home = "/usr/home/dave/vishap-build"; +my $criggleplop = "splurd crungle splonge."; + +$| = 1; + +my $PORT = 9000; +my $server = HTTP::Daemon->new(LocalPort => $PORT, ReuseAddr => 1); +die "Cannot setup server" unless $server; +print "[$$: Accepting clients at http://localhost:$PORT/]\n"; + +while (my $client = $server->accept) { + (my $pid = fork()) // die("Couldn't fork."); + if ($pid) {close $client; undef $client} else {ServeRequests($client); exit} +} +print "$$: server->accept failed. Exiting.\n"; +exit; + + +sub StartBuilds {my ($branch) = @_; + open TRIGGER, ">trigger-$branch"; print TRIGGER "trigger.\n"; close TRIGGER; + my $running = 0; + if (open PID, "; close PID} + if (!$running) { + my $child = fork; + if ($child) { + # This is the parent. We get to know the child PID, write it out. + print "Started build, pid $child.\n"; + open PID, ">pid"; print PID "$child.\n"; close PID; + } else { + # This is the child, we actually run all triggered builds. + exec "perl $home/runbuilds.pl >$home/runbuilds.log"; + exit; # Shouldn't get here + } + } +} + + +sub decodehook {my ($hook) = @_; + my %modifiedfiles = (); + my %commitauthors = (); + my $buildrequired = 0; + + my $commits = $hook->{commits}; + for my $commit (@$commits) { + my $committer = $commit->{committer}; + $commitauthors{$committer->{username}}++; + my $modified = $commit->{modified}; + for my $modfile (@$modified) { + $modifiedfiles{$modfile}++; + if ($modfile !~ m/\.(md|svg)$/i) {$buildrequired = 1;} + } + } + my $pusher = $hook->{pusher}; + my $repository = $hook->{repository}; + my $branch = $hook->{ref}; $branch =~ s'^.*\/''; + print "Repository: $repository->{name}, branch: $branch.\n"; + print "Commit authors: " . join(", ", keys %commitauthors) . ".\n"; + print "Pusher: " . $pusher->{name} . "\n"; + print "Files modified: " . join(", ", keys %modifiedfiles) . ".\n"; + print "Build " . ($buildrequired ? '' : 'not') . " required.\n"; + if ($buildrequired) {StartBuilds($branch)} +} + + +sub SendFile {my ($client, $file) = @_; + my $CRLF = "\r\n"; + local(*F); + sysopen(F, $file, 0); + binmode(F); + my($ct,$ce) = guess_media_type($file); + my($size,$mtime) = (stat $file)[7,9]; + $client->send_basic_header; + print $client "Content-Encoding: $ce$CRLF" if $ce; + print $client "Last-Modified: ", time2str($mtime), "$CRLF" if $mtime; + print $client "Accept-Ranges: bytes$CRLF"; + print $client "Content-Length: $size$CRLF" if $size; + print $client "Cache-Control: no-cache, no-store, must-revalidate, max-age=0$CRLF"; + print $client "Pragma: no-cache$CRLF"; + print $client "Expires: Wed, 11 Jan 1984 05:00:00 GMT$CRLF"; + print $client "Content-Type: $ct$CRLF"; + print $client $CRLF; + $client->send_file(\*F) unless $client->head_request; +} + + +sub VishapStatus {my ($client) = @_; + system "perl makesvg.pl"; # Construct an up-to-date status file + SendFile($client, "vishaps-status.svg"); +} + +sub LogFileResponse {my ($client, $path) = @_; + if (-f "logs/$path.log") { + SendFile($client, "logs/$path.log") + } else { + $client->send_error(RC_FORBIDDEN) + } +} + + +sub ServeRequests {my ($client) = @_; + $client->autoflush(1); + while (my $request = $client->get_request) { + if ($request->method eq 'GET') { + + my $uri = $request->uri; + my $host = $request->headers->{host}; + + print "URI requested: '$uri'.\n"; + print "Host: '$host'.\n"; + + $uri =~ s/^\///; + $uri =~ s/^githubhook\///; + + + if ($uri eq 'vishaps-status.svg') {VishapStatus($client)} + else {LogFileResponse($client, $uri)} + + + } elsif ($request->method eq 'POST') { + + $client->send_file_response("response.html"); + my $event = $request->headers->{'x-github-event'}; + my $githubsig = substr($request->headers->{'x-hub-signature'}, 5); + my $mysig = hmac_sha1_hex($request->content, $criggleplop); + print "Github event: $event, mysig $mysig, githubsig: $githubsig.\n"; + if (($event eq "push") && ($mysig eq $githubsig)) { + my $content = $request->content; + $content =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; # Unescape %xx sequences. + decodehook(JSON::decode_json(substr($content,8))); + } + + } else { + + print "Request method $request->method forbidden.\n"; + $client->send_error(RC_FORBIDDEN) + } + } + $client->close; + undef $client; + #print "$$: no more requests, closing client.\n"; +} diff --git a/src/tools/autobuild/update-webserver.sh b/src/tools/autobuild/update-webserver.sh deleted file mode 100644 index 58a5e439..00000000 --- a/src/tools/autobuild/update-webserver.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Push buildall and postpush to postpush server - -set -x -for f in *.pl build-oberon.sh; do - scp -P 5922 $f root@www:/var/lib/nethserver/ibay/githubhook/$f - ssh -p 5922 root@www "chmod +x /var/lib/nethserver/ibay/githubhook/$f" -done; -ssh -p 5922 root@www "ls -lap /var/lib/nethserver/ibay/githubhook" - From 9928bfe70dd5f6192ed8a1574d900bafca39b10d Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 23 Apr 2018 20:21:50 +0100 Subject: [PATCH 151/241] Fix build order of Reals.Mod in Microsoft C builds. --- make.cmd | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/make.cmd b/make.cmd index 231ac3db..a47b97f0 100644 --- a/make.cmd +++ b/make.cmd @@ -188,15 +188,15 @@ echo. DATAMODEL: %DATAMODEL% cd %BUILDDIR% -cl -nologo /Zi -c SYSTEM.c Configuration.c Platform.c Heap.c || exit /b -cl -nologo /Zi -c Out.c Strings.c Modules.c Files.c || exit /b -cl -nologo /Zi -c Reals.c Texts.c VT100.c || exit /b -cl -nologo /Zi -c OPM.c extTools.c OPS.c OPT.c || exit /b -cl -nologo /Zi -c OPC.c OPV.c OPB.c OPP.c || exit /b +cl -nologo /Zi -c SYSTEM.c Configuration.c Platform.c Heap.c || exit /b +cl -nologo /Zi -c Out.c Reals.c Strings.c Modules.c || exit /b +cl -nologo /Zi -c Files.c Texts.c VT100.c || exit /b +cl -nologo /Zi -c OPM.c extTools.c OPS.c OPT.c || exit /b +cl -nologo /Zi -c OPC.c OPV.c OPB.c OPP.c || exit /b cl -nologo /Zi Compiler.c /Fe%ROOTDIR%\%OBECOMP% /link /INCREMENTAL:NO ^ -SYSTEM.obj Configuration.obj Platform.obj Heap.obj Out.obj Strings.obj ^ -Modules.obj Files.obj Reals.obj Texts.obj VT100.obj extTools.obj ^ +SYSTEM.obj Configuration.obj Platform.obj Heap.obj Out.obj Reals.obj ^ +Modules.obj Files.obj Strings.obj Texts.obj VT100.obj extTools.obj ^ OPM.obj OPS.obj OPT.obj OPC.obj OPV.obj OPB.obj OPP.obj || exit /b cd %ROOTDIR% @@ -242,11 +242,11 @@ del *.sym >nul 2>nul %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../Configuration.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Platform%PLATFORM%.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfFapx -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Heap.Mod || exit /b +%ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Reals.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Strings.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Out.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Modules.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfFx -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Files.Mod || exit /b -%ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Reals.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/Texts.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/runtime/VT100.Mod || exit /b %ROOTDIR%\%OBECOMP% -SsfF -A%ADRSIZE%%ALIGNMENT% -O%MODEL% ../../src/compiler/OPM.Mod || exit /b @@ -293,6 +293,7 @@ cd %BUILDDIR%\%MODEL% %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Platform%PLATFORM%.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Heap.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Modules.Mod +%ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Reals.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Strings.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Out.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/In.Mod @@ -300,7 +301,6 @@ cd %BUILDDIR%\%MODEL% %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Files.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Math.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/MathL.Mod -%ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Reals.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Texts.Mod %ROOTDIR%\%OBECOMP% -Ffs -O%MODEL% ../../../src/runtime/Oberon.Mod cd %ROOTDIR% From afe570e096e3f81d2a1e84e4d67c4fe110c6b452 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 23 Apr 2018 20:45:01 +0100 Subject: [PATCH 152/241] Restore temporarily commented git clone in autobuild runbuilds.pl --- src/tools/autobuild/runbuilds.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/autobuild/runbuilds.pl b/src/tools/autobuild/runbuilds.pl index c0cb733a..8fca8869 100644 --- a/src/tools/autobuild/runbuilds.pl +++ b/src/tools/autobuild/runbuilds.pl @@ -160,9 +160,9 @@ make full sub BuildBranch {my ($branch) = @_; Log undef, $branch, "$branch branch build triggered."; -# # Obtain a clean clone of vishaps -# DoLogged undef, $branch, "rm -rf $home/voc"; -# DoLogged undef, $branch, "cd $home && git clone -b $branch --single-branch https://github.com/vishaps/voc"; + # Obtain a clean clone of vishaps + DoLogged undef, $branch, "rm -rf $home/voc"; + DoLogged undef, $branch, "cd $home && git clone -b $branch --single-branch https://github.com/vishaps/voc"; # Start each build in turn From 66f03634746639f4e60d831d5c19aca86adf2739 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 12:21:57 +0100 Subject: [PATCH 153/241] Fix missing quotes in path setting for tests, allowing them to run in linux under windows. --- src/test/confidence/testenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/confidence/testenv.sh b/src/test/confidence/testenv.sh index fee87667..69bfb20e 100755 --- a/src/test/confidence/testenv.sh +++ b/src/test/confidence/testenv.sh @@ -5,8 +5,8 @@ echo --- Confidence test $(basename $PWD) --- if which cygpath >/dev/null 2>/dev/null -then export PATH="$(cygpath "$1")/bin":$PATH -else export PATH="$1/bin":$PATH +then export PATH="$(cygpath "$1")/bin":"$PATH" +else export PATH="$1/bin":"$PATH" fi # Set ibrary paths for darwin and termux(android) export DYLD_LIBRARY_PATH=$1/lib:$DYLD_LIBRARY_PATH From f458b98ff293b0f35f8fa750eb19e9daf6aa4683 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 16:04:56 +0100 Subject: [PATCH 154/241] Enable index checks in Files.Mod and OPS.Mod. --- src/tools/make/oberon.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index fedaf039..581f3117 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -67,7 +67,7 @@ assemble: cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ SYSTEM.o Configuration.o Platform.o Heap.o Out.o Strings.o \ - Modules.o Files.o Reals.o Texts.o VT100.o extTools.o \ + Modules.o Files.o Reals.o Texts.o VT100.o extTools.o \ OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o cp src/runtime/*.[ch] $(BUILDDIR) @@ -110,12 +110,12 @@ translate: cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod From 1c8828ede1e253f11016e37f9893c0527d5a6715 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 16:11:16 +0100 Subject: [PATCH 155/241] Update bootstrap C source files. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 120 +++++++++++++-------------- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 20 ++--- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 120 +++++++++++++-------------- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 20 ++--- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 120 +++++++++++++-------------- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 20 ++--- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 120 +++++++++++++-------------- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 20 ++--- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 120 +++++++++++++-------------- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 20 ++--- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 530 insertions(+), 530 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 10abd264..9cdbb76c 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 8eac398d..3ab08d40 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* 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/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index c817585e..7db28b57 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 333bdb63..78f0f4e9 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -154,20 +154,20 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS __DUP(name, name__len, CHAR); i = 0; j = 0; - while (dir[i] != 0x00) { - dest[i] = dir[i]; + while (dir[__X(i, dir__len)] != 0x00) { + dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[i - 1] != '/') { - dest[i] = '/'; + if (dest[__X(i - 1, dest__len)] != '/') { + dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[j] != 0x00) { - dest[i] = name[j]; + while (name[__X(j, name__len)] != 0x00) { + dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; } - dest[i] = 0x00; + dest[__X(i, dest__len)] = 0x00; __DEL(dir); __DEL(name); } @@ -180,45 +180,45 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na n = Files_tempno; i = 0; if (finalName[0] != '/') { - while (Platform_CWD[i] != 0x00) { - name[i] = Platform_CWD[i]; + while (Platform_CWD[__X(i, 256)] != 0x00) { + name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; i += 1; } - if (Platform_CWD[i - 1] != '/') { - name[i] = '/'; + if (Platform_CWD[__X(i - 1, 256)] != '/') { + name[__X(i, name__len)] = '/'; i += 1; } } j = 0; - while (finalName[j] != 0x00) { - name[i] = finalName[j]; + while (finalName[__X(j, finalName__len)] != 0x00) { + name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; i += 1; j += 1; } i -= 1; - while (name[i] != '/') { + while (name[__X(i, name__len)] != '/') { i -= 1; } - name[i + 1] = '.'; - name[i + 2] = 't'; - name[i + 3] = 'm'; - name[i + 4] = 'p'; - name[i + 5] = '.'; + name[__X(i + 1, name__len)] = '.'; + name[__X(i + 2, name__len)] = 't'; + name[__X(i + 3, name__len)] = 'm'; + name[__X(i + 4, name__len)] = 'p'; + name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = '.'; + name[__X(i, name__len)] = '.'; i += 1; n = Platform_PID; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = 0x00; + name[__X(i, name__len)] = 0x00; __DEL(finalName); } @@ -319,8 +319,8 @@ void Files_Close (Files_File f) if (f->state != 1 || f->registerName[0] != 0x00) { Files_Create(f); i = 0; - while ((i < 4 && f->bufs[i] != NIL)) { - Files_Flush(f->bufs[i]); + while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) { + Files_Flush(f->bufs[__X(i, 4)]); i += 1; } } @@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) *pos += 1; } } else { - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; while (ch == ' ' || ch == ';') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } if (ch == '~') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; - while (Files_HOME[i] != 0x00) { - dir[i] = Files_HOME[i]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; + while (Files_HOME[__X(i, 1024)] != 0x00) { + dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)]; i += 1; } if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) { - while ((i > 0 && dir[i - 1] != '/')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) { i -= 1; } } } while ((ch != 0x00 && ch != ';')) { - dir[i] = ch; + dir[__X(i, dir__len)] = ch; i += 1; *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } - while ((i > 0 && dir[i - 1] == ' ')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) { i -= 1; } } - dir[i] = 0x00; + dir[__X(i, dir__len)] = 0x00; } static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) @@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) ch = name[0]; while ((ch != 0x00 && ch != '/')) { i += 1; - ch = name[i]; + ch = name[__X(i, name__len)]; } return ch == '/'; } @@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) if (!Platform_SameFileTime(identity, f->identity)) { i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -514,9 +514,9 @@ void Files_Purge (Files_File f) INT16 error; i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) offset = __MASK(pos, -4096); org = pos - offset; i = 0; - while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) { + while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) { i += 1; } if (i < 4) { - if (f->bufs[i] == NIL) { + if (f->bufs[__X(i, 4)] == NIL) { __NEW(buf, Files_BufDesc); buf->chg = 0; buf->org = -1; buf->f = f; - f->bufs[i] = buf; + f->bufs[__X(i, 4)] = buf; } else { - buf = f->bufs[i]; + buf = f->bufs[__X(i, 4)]; } } else { f->swapper = __MASK(f->swapper + 1, -4); - buf = f->bufs[f->swapper]; + buf = f->bufs[__X(f->swapper, 4)]; Files_Flush(buf); } if (buf->org != org) { @@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } Files_Assert(offset <= buf->size); if (offset < buf->size) { - *x = buf->data[offset]; + *x = buf->data[__X(offset, 4096)]; (*r).offset = offset + 1; } else if ((*r).org + offset < buf->f->len) { Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset); @@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); + __MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min); offset += min; (*r).offset = offset; xpos += min; @@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) offset = (*r).offset; } Files_Assert(offset < 4096); - buf->data[offset] = x; + buf->data[__X(offset, 4096)] = x; buf->chg = 1; if (offset == buf->size) { buf->size += 1; @@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); + __MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); @@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de j = 0; while (i > 0) { i -= 1; - dest[j] = src[i]; + dest[__X(j, dest__len)] = src[__X(i, src__len)]; j += 1; } } else { @@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) i = 0; do { Files_Read(&*R, R__typ, (void*)&ch); - x[i] = ch; + x[__X(i, x__len)] = ch; i += 1; } while (!(ch == 0x00)); } @@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) INT16 i; i = 0; do { - Files_Read(&*R, R__typ, (void*)&x[i]); + Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]); i += 1; - } while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a)); - if (x[i - 1] == 0x0a) { + } while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a)); + if (x[__X(i - 1, x__len)] == 0x0a) { i -= 1; } - if ((i > 0 && x[i - 1] == 0x0d)) { + if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) { i -= 1; } - x[i] = 0x00; + x[__X(i, x__len)] = 0x00; } void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) @@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len { INT16 i; i = 0; - while (x[i] != 0x00) { + while (x[__X(i, x__len)] != 0x00) { i += 1; } Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 8c775fa4..a0bced1c 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 348b336b..bd4ed5a8 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index b73de4fe..8d7eb8e5 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 89f370a7..8ae1f5fb 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 2d074a62..9d10f4ac 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 41e56e38..d7012f3e 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 0eba52d2..b82bf9ba 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 7fa9fa23..42cd3c56 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 1e17f6c2..b79317f7 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 3dbed3bf..e6b33367 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 9c84b7af..1c6ca2ac 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 00e4fa0e..54a9f7c8 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 010479f8..52242f7c 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 74719041..0e42294b 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym) OPS_err(241); break; } - OPS_str[i] = OPS_ch; + OPS_str[__X(i, 256)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[i] = 0x00; + OPS_str[__X(i, 256)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym) INT16 i; i = 0; do { - OPS_name[i] = OPS_ch; + OPS_name[__X(i, 256)] = OPS_ch; i += 1; OPM_Get(&OPS_ch); } while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256)); @@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym) OPS_err(240); i -= 1; } - OPS_name[i] = 0x00; + OPS_name[__X(i, 256)] = 0x00; *sym = 38; } @@ -143,7 +143,7 @@ static void OPS_Number (void) if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) { if (m > 0 || OPS_ch != '0') { if (n < 24) { - dig[n] = OPS_ch; + dig[__X(n, 24)] = OPS_ch; n += 1; } m += 1; @@ -173,7 +173,7 @@ static void OPS_Number (void) OPS_numtyp = 1; if (n <= 2) { while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -187,7 +187,7 @@ static void OPS_Number (void) OPS_intval = -1; } while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -196,7 +196,7 @@ static void OPS_Number (void) } else { OPS_numtyp = 2; while (i < n) { - d = Ord__7(dig[i], 0); + d = Ord__7(dig[__X(i, 24)], 0); i += 1; if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; @@ -214,7 +214,7 @@ static void OPS_Number (void) expCh = 'E'; while (n > 0) { n -= 1; - f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10; + f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10; } if (OPS_ch == 'E' || OPS_ch == 'D') { expCh = OPS_ch; diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index dfe2b972..15cdcc6c 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index d6a4c67b..bc38d46b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index f457c51e..a4688654 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 5193f272..ebe18cc4 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index bee5e44d..05e906a7 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 54d88edf..fc5b46c6 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index fad5cd1a..0819285a 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 86284785..b5bf3da8 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index c4f8841c..6c2d79c8 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 2af2574f..44be33b7 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 07f4371d..7c2e0e35 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 3d82b654..6158bc92 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index df6f5edc..42b68da8 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index e4ee535c..6d66b07b 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index d53e287c..c706a783 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 5bfcea49..a3b0b0dd 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 51c85058..e7539d2f 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 2b6c962b..562921ce 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 9b0b1ee9..e6dd4577 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 10abd264..9cdbb76c 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 8eac398d..3ab08d40 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* 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/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index c817585e..7db28b57 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 333bdb63..78f0f4e9 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -154,20 +154,20 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS __DUP(name, name__len, CHAR); i = 0; j = 0; - while (dir[i] != 0x00) { - dest[i] = dir[i]; + while (dir[__X(i, dir__len)] != 0x00) { + dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[i - 1] != '/') { - dest[i] = '/'; + if (dest[__X(i - 1, dest__len)] != '/') { + dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[j] != 0x00) { - dest[i] = name[j]; + while (name[__X(j, name__len)] != 0x00) { + dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; } - dest[i] = 0x00; + dest[__X(i, dest__len)] = 0x00; __DEL(dir); __DEL(name); } @@ -180,45 +180,45 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na n = Files_tempno; i = 0; if (finalName[0] != '/') { - while (Platform_CWD[i] != 0x00) { - name[i] = Platform_CWD[i]; + while (Platform_CWD[__X(i, 256)] != 0x00) { + name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; i += 1; } - if (Platform_CWD[i - 1] != '/') { - name[i] = '/'; + if (Platform_CWD[__X(i - 1, 256)] != '/') { + name[__X(i, name__len)] = '/'; i += 1; } } j = 0; - while (finalName[j] != 0x00) { - name[i] = finalName[j]; + while (finalName[__X(j, finalName__len)] != 0x00) { + name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; i += 1; j += 1; } i -= 1; - while (name[i] != '/') { + while (name[__X(i, name__len)] != '/') { i -= 1; } - name[i + 1] = '.'; - name[i + 2] = 't'; - name[i + 3] = 'm'; - name[i + 4] = 'p'; - name[i + 5] = '.'; + name[__X(i + 1, name__len)] = '.'; + name[__X(i + 2, name__len)] = 't'; + name[__X(i + 3, name__len)] = 'm'; + name[__X(i + 4, name__len)] = 'p'; + name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = '.'; + name[__X(i, name__len)] = '.'; i += 1; n = Platform_PID; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = 0x00; + name[__X(i, name__len)] = 0x00; __DEL(finalName); } @@ -319,8 +319,8 @@ void Files_Close (Files_File f) if (f->state != 1 || f->registerName[0] != 0x00) { Files_Create(f); i = 0; - while ((i < 4 && f->bufs[i] != NIL)) { - Files_Flush(f->bufs[i]); + while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) { + Files_Flush(f->bufs[__X(i, 4)]); i += 1; } } @@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) *pos += 1; } } else { - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; while (ch == ' ' || ch == ';') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } if (ch == '~') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; - while (Files_HOME[i] != 0x00) { - dir[i] = Files_HOME[i]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; + while (Files_HOME[__X(i, 1024)] != 0x00) { + dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)]; i += 1; } if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) { - while ((i > 0 && dir[i - 1] != '/')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) { i -= 1; } } } while ((ch != 0x00 && ch != ';')) { - dir[i] = ch; + dir[__X(i, dir__len)] = ch; i += 1; *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } - while ((i > 0 && dir[i - 1] == ' ')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) { i -= 1; } } - dir[i] = 0x00; + dir[__X(i, dir__len)] = 0x00; } static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) @@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) ch = name[0]; while ((ch != 0x00 && ch != '/')) { i += 1; - ch = name[i]; + ch = name[__X(i, name__len)]; } return ch == '/'; } @@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) if (!Platform_SameFileTime(identity, f->identity)) { i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -514,9 +514,9 @@ void Files_Purge (Files_File f) INT16 error; i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) offset = __MASK(pos, -4096); org = pos - offset; i = 0; - while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) { + while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) { i += 1; } if (i < 4) { - if (f->bufs[i] == NIL) { + if (f->bufs[__X(i, 4)] == NIL) { __NEW(buf, Files_BufDesc); buf->chg = 0; buf->org = -1; buf->f = f; - f->bufs[i] = buf; + f->bufs[__X(i, 4)] = buf; } else { - buf = f->bufs[i]; + buf = f->bufs[__X(i, 4)]; } } else { f->swapper = __MASK(f->swapper + 1, -4); - buf = f->bufs[f->swapper]; + buf = f->bufs[__X(f->swapper, 4)]; Files_Flush(buf); } if (buf->org != org) { @@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } Files_Assert(offset <= buf->size); if (offset < buf->size) { - *x = buf->data[offset]; + *x = buf->data[__X(offset, 4096)]; (*r).offset = offset + 1; } else if ((*r).org + offset < buf->f->len) { Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset); @@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); + __MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min); offset += min; (*r).offset = offset; xpos += min; @@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) offset = (*r).offset; } Files_Assert(offset < 4096); - buf->data[offset] = x; + buf->data[__X(offset, 4096)] = x; buf->chg = 1; if (offset == buf->size) { buf->size += 1; @@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); + __MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); @@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de j = 0; while (i > 0) { i -= 1; - dest[j] = src[i]; + dest[__X(j, dest__len)] = src[__X(i, src__len)]; j += 1; } } else { @@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) i = 0; do { Files_Read(&*R, R__typ, (void*)&ch); - x[i] = ch; + x[__X(i, x__len)] = ch; i += 1; } while (!(ch == 0x00)); } @@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) INT16 i; i = 0; do { - Files_Read(&*R, R__typ, (void*)&x[i]); + Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]); i += 1; - } while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a)); - if (x[i - 1] == 0x0a) { + } while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a)); + if (x[__X(i - 1, x__len)] == 0x0a) { i -= 1; } - if ((i > 0 && x[i - 1] == 0x0d)) { + if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) { i -= 1; } - x[i] = 0x00; + x[__X(i, x__len)] = 0x00; } void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) @@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len { INT16 i; i = 0; - while (x[i] != 0x00) { + while (x[__X(i, x__len)] != 0x00) { i += 1; } Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 8c775fa4..a0bced1c 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 348b336b..bd4ed5a8 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index b73de4fe..8d7eb8e5 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 89f370a7..8ae1f5fb 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 2d074a62..9d10f4ac 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 41e56e38..d7012f3e 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 0eba52d2..b82bf9ba 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 7fa9fa23..42cd3c56 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 1e17f6c2..b79317f7 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 3dbed3bf..e6b33367 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 9c84b7af..1c6ca2ac 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 00e4fa0e..54a9f7c8 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 010479f8..52242f7c 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 74719041..0e42294b 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym) OPS_err(241); break; } - OPS_str[i] = OPS_ch; + OPS_str[__X(i, 256)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[i] = 0x00; + OPS_str[__X(i, 256)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym) INT16 i; i = 0; do { - OPS_name[i] = OPS_ch; + OPS_name[__X(i, 256)] = OPS_ch; i += 1; OPM_Get(&OPS_ch); } while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256)); @@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym) OPS_err(240); i -= 1; } - OPS_name[i] = 0x00; + OPS_name[__X(i, 256)] = 0x00; *sym = 38; } @@ -143,7 +143,7 @@ static void OPS_Number (void) if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) { if (m > 0 || OPS_ch != '0') { if (n < 24) { - dig[n] = OPS_ch; + dig[__X(n, 24)] = OPS_ch; n += 1; } m += 1; @@ -173,7 +173,7 @@ static void OPS_Number (void) OPS_numtyp = 1; if (n <= 2) { while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -187,7 +187,7 @@ static void OPS_Number (void) OPS_intval = -1; } while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -196,7 +196,7 @@ static void OPS_Number (void) } else { OPS_numtyp = 2; while (i < n) { - d = Ord__7(dig[i], 0); + d = Ord__7(dig[__X(i, 24)], 0); i += 1; if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; @@ -214,7 +214,7 @@ static void OPS_Number (void) expCh = 'E'; while (n > 0) { n -= 1; - f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10; + f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10; } if (OPS_ch == 'E' || OPS_ch == 'D') { expCh = OPS_ch; diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index dfe2b972..15cdcc6c 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 962b0f86..1897f024 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index f457c51e..a4688654 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 5193f272..ebe18cc4 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index bee5e44d..05e906a7 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 54d88edf..fc5b46c6 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index fad5cd1a..0819285a 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 86284785..b5bf3da8 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index c4f8841c..6c2d79c8 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 2af2574f..44be33b7 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 07f4371d..7c2e0e35 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 3d82b654..6158bc92 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index df6f5edc..42b68da8 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 8e4938b8..2726593a 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 0c55850a..714d9ac5 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 5bfcea49..a3b0b0dd 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 51c85058..e7539d2f 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 2b6c962b..562921ce 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 9b0b1ee9..e6dd4577 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 10abd264..9cdbb76c 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 8eac398d..3ab08d40 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* 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/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index c817585e..7db28b57 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 4e3baead..0738e4f7 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -154,20 +154,20 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS __DUP(name, name__len, CHAR); i = 0; j = 0; - while (dir[i] != 0x00) { - dest[i] = dir[i]; + while (dir[__X(i, dir__len)] != 0x00) { + dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[i - 1] != '/') { - dest[i] = '/'; + if (dest[__X(i - 1, dest__len)] != '/') { + dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[j] != 0x00) { - dest[i] = name[j]; + while (name[__X(j, name__len)] != 0x00) { + dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; } - dest[i] = 0x00; + dest[__X(i, dest__len)] = 0x00; __DEL(dir); __DEL(name); } @@ -180,45 +180,45 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na n = Files_tempno; i = 0; if (finalName[0] != '/') { - while (Platform_CWD[i] != 0x00) { - name[i] = Platform_CWD[i]; + while (Platform_CWD[__X(i, 256)] != 0x00) { + name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; i += 1; } - if (Platform_CWD[i - 1] != '/') { - name[i] = '/'; + if (Platform_CWD[__X(i - 1, 256)] != '/') { + name[__X(i, name__len)] = '/'; i += 1; } } j = 0; - while (finalName[j] != 0x00) { - name[i] = finalName[j]; + while (finalName[__X(j, finalName__len)] != 0x00) { + name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; i += 1; j += 1; } i -= 1; - while (name[i] != '/') { + while (name[__X(i, name__len)] != '/') { i -= 1; } - name[i + 1] = '.'; - name[i + 2] = 't'; - name[i + 3] = 'm'; - name[i + 4] = 'p'; - name[i + 5] = '.'; + name[__X(i + 1, name__len)] = '.'; + name[__X(i + 2, name__len)] = 't'; + name[__X(i + 3, name__len)] = 'm'; + name[__X(i + 4, name__len)] = 'p'; + name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = '.'; + name[__X(i, name__len)] = '.'; i += 1; n = Platform_PID; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = 0x00; + name[__X(i, name__len)] = 0x00; __DEL(finalName); } @@ -319,8 +319,8 @@ void Files_Close (Files_File f) if (f->state != 1 || f->registerName[0] != 0x00) { Files_Create(f); i = 0; - while ((i < 4 && f->bufs[i] != NIL)) { - Files_Flush(f->bufs[i]); + while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) { + Files_Flush(f->bufs[__X(i, 4)]); i += 1; } } @@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) *pos += 1; } } else { - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; while (ch == ' ' || ch == ';') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } if (ch == '~') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; - while (Files_HOME[i] != 0x00) { - dir[i] = Files_HOME[i]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; + while (Files_HOME[__X(i, 1024)] != 0x00) { + dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)]; i += 1; } if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) { - while ((i > 0 && dir[i - 1] != '/')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) { i -= 1; } } } while ((ch != 0x00 && ch != ';')) { - dir[i] = ch; + dir[__X(i, dir__len)] = ch; i += 1; *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } - while ((i > 0 && dir[i - 1] == ' ')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) { i -= 1; } } - dir[i] = 0x00; + dir[__X(i, dir__len)] = 0x00; } static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) @@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) ch = name[0]; while ((ch != 0x00 && ch != '/')) { i += 1; - ch = name[i]; + ch = name[__X(i, name__len)]; } return ch == '/'; } @@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) if (!Platform_SameFileTime(identity, f->identity)) { i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -514,9 +514,9 @@ void Files_Purge (Files_File f) INT16 error; i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) offset = __MASK(pos, -4096); org = pos - offset; i = 0; - while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) { + while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) { i += 1; } if (i < 4) { - if (f->bufs[i] == NIL) { + if (f->bufs[__X(i, 4)] == NIL) { __NEW(buf, Files_BufDesc); buf->chg = 0; buf->org = -1; buf->f = f; - f->bufs[i] = buf; + f->bufs[__X(i, 4)] = buf; } else { - buf = f->bufs[i]; + buf = f->bufs[__X(i, 4)]; } } else { f->swapper = __MASK(f->swapper + 1, -4); - buf = f->bufs[f->swapper]; + buf = f->bufs[__X(f->swapper, 4)]; Files_Flush(buf); } if (buf->org != org) { @@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } Files_Assert(offset <= buf->size); if (offset < buf->size) { - *x = buf->data[offset]; + *x = buf->data[__X(offset, 4096)]; (*r).offset = offset + 1; } else if ((*r).org + offset < buf->f->len) { Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset); @@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); + __MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min); offset += min; (*r).offset = offset; xpos += min; @@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) offset = (*r).offset; } Files_Assert(offset < 4096); - buf->data[offset] = x; + buf->data[__X(offset, 4096)] = x; buf->chg = 1; if (offset == buf->size) { buf->size += 1; @@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); + __MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); @@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de j = 0; while (i > 0) { i -= 1; - dest[j] = src[i]; + dest[__X(j, dest__len)] = src[__X(i, src__len)]; j += 1; } } else { @@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) i = 0; do { Files_Read(&*R, R__typ, (void*)&ch); - x[i] = ch; + x[__X(i, x__len)] = ch; i += 1; } while (!(ch == 0x00)); } @@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) INT16 i; i = 0; do { - Files_Read(&*R, R__typ, (void*)&x[i]); + Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]); i += 1; - } while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a)); - if (x[i - 1] == 0x0a) { + } while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a)); + if (x[__X(i - 1, x__len)] == 0x0a) { i -= 1; } - if ((i > 0 && x[i - 1] == 0x0d)) { + if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) { i -= 1; } - x[i] = 0x00; + x[__X(i, x__len)] = 0x00; } void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) @@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len { INT16 i; i = 0; - while (x[i] != 0x00) { + while (x[__X(i, x__len)] != 0x00) { i += 1; } Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index b0056ea8..9d81c004 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 9e99e657..eb19a612 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 2b6287cd..ab574eed 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 25d5f032..3c88874e 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 5d832fa6..3f97dc19 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 41e56e38..d7012f3e 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 0eba52d2..b82bf9ba 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 7fa9fa23..42cd3c56 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 1e17f6c2..b79317f7 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index bcf72c6b..28e1ec4b 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 9c84b7af..1c6ca2ac 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 18305e4c..7508ac7a 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 010479f8..52242f7c 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 74719041..0e42294b 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym) OPS_err(241); break; } - OPS_str[i] = OPS_ch; + OPS_str[__X(i, 256)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[i] = 0x00; + OPS_str[__X(i, 256)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym) INT16 i; i = 0; do { - OPS_name[i] = OPS_ch; + OPS_name[__X(i, 256)] = OPS_ch; i += 1; OPM_Get(&OPS_ch); } while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256)); @@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym) OPS_err(240); i -= 1; } - OPS_name[i] = 0x00; + OPS_name[__X(i, 256)] = 0x00; *sym = 38; } @@ -143,7 +143,7 @@ static void OPS_Number (void) if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) { if (m > 0 || OPS_ch != '0') { if (n < 24) { - dig[n] = OPS_ch; + dig[__X(n, 24)] = OPS_ch; n += 1; } m += 1; @@ -173,7 +173,7 @@ static void OPS_Number (void) OPS_numtyp = 1; if (n <= 2) { while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -187,7 +187,7 @@ static void OPS_Number (void) OPS_intval = -1; } while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -196,7 +196,7 @@ static void OPS_Number (void) } else { OPS_numtyp = 2; while (i < n) { - d = Ord__7(dig[i], 0); + d = Ord__7(dig[__X(i, 24)], 0); i += 1; if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; @@ -214,7 +214,7 @@ static void OPS_Number (void) expCh = 'E'; while (n > 0) { n -= 1; - f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10; + f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10; } if (OPS_ch == 'E' || OPS_ch == 'D') { expCh = OPS_ch; diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index dfe2b972..15cdcc6c 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index c6989580..57dfaa59 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index f457c51e..a4688654 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 617e9e58..bad459b6 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index bee5e44d..05e906a7 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 54d88edf..fc5b46c6 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index fad5cd1a..0819285a 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index bb97464a..fa174db0 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 51911cc6..085c2257 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 2af2574f..44be33b7 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 07f4371d..7c2e0e35 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 3d82b654..6158bc92 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index df6f5edc..42b68da8 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 82588563..6a06c85c 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index b3dd50cb..e4aa3a7d 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 5bfcea49..a3b0b0dd 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 51c85058..e7539d2f 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 2b6c962b..562921ce 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 9b0b1ee9..e6dd4577 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 10abd264..9cdbb76c 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 8eac398d..3ab08d40 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* 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/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index c817585e..7db28b57 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 15471c4f..e714f199 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -154,20 +154,20 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS __DUP(name, name__len, CHAR); i = 0; j = 0; - while (dir[i] != 0x00) { - dest[i] = dir[i]; + while (dir[__X(i, dir__len)] != 0x00) { + dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[i - 1] != '/') { - dest[i] = '/'; + if (dest[__X(i - 1, dest__len)] != '/') { + dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[j] != 0x00) { - dest[i] = name[j]; + while (name[__X(j, name__len)] != 0x00) { + dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; } - dest[i] = 0x00; + dest[__X(i, dest__len)] = 0x00; __DEL(dir); __DEL(name); } @@ -180,45 +180,45 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na n = Files_tempno; i = 0; if (finalName[0] != '/') { - while (Platform_CWD[i] != 0x00) { - name[i] = Platform_CWD[i]; + while (Platform_CWD[__X(i, 4096)] != 0x00) { + name[__X(i, name__len)] = Platform_CWD[__X(i, 4096)]; i += 1; } - if (Platform_CWD[i - 1] != '/') { - name[i] = '/'; + if (Platform_CWD[__X(i - 1, 4096)] != '/') { + name[__X(i, name__len)] = '/'; i += 1; } } j = 0; - while (finalName[j] != 0x00) { - name[i] = finalName[j]; + while (finalName[__X(j, finalName__len)] != 0x00) { + name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; i += 1; j += 1; } i -= 1; - while (name[i] != '/') { + while (name[__X(i, name__len)] != '/') { i -= 1; } - name[i + 1] = '.'; - name[i + 2] = 't'; - name[i + 3] = 'm'; - name[i + 4] = 'p'; - name[i + 5] = '.'; + name[__X(i + 1, name__len)] = '.'; + name[__X(i + 2, name__len)] = 't'; + name[__X(i + 3, name__len)] = 'm'; + name[__X(i + 4, name__len)] = 'p'; + name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = '.'; + name[__X(i, name__len)] = '.'; i += 1; n = Platform_PID; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = 0x00; + name[__X(i, name__len)] = 0x00; __DEL(finalName); } @@ -319,8 +319,8 @@ void Files_Close (Files_File f) if (f->state != 1 || f->registerName[0] != 0x00) { Files_Create(f); i = 0; - while ((i < 4 && f->bufs[i] != NIL)) { - Files_Flush(f->bufs[i]); + while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) { + Files_Flush(f->bufs[__X(i, 4)]); i += 1; } } @@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) *pos += 1; } } else { - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; while (ch == ' ' || ch == ';') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } if (ch == '~') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; - while (Files_HOME[i] != 0x00) { - dir[i] = Files_HOME[i]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; + while (Files_HOME[__X(i, 1024)] != 0x00) { + dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)]; i += 1; } if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) { - while ((i > 0 && dir[i - 1] != '/')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) { i -= 1; } } } while ((ch != 0x00 && ch != ';')) { - dir[i] = ch; + dir[__X(i, dir__len)] = ch; i += 1; *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } - while ((i > 0 && dir[i - 1] == ' ')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) { i -= 1; } } - dir[i] = 0x00; + dir[__X(i, dir__len)] = 0x00; } static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) @@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) ch = name[0]; while ((ch != 0x00 && ch != '/')) { i += 1; - ch = name[i]; + ch = name[__X(i, name__len)]; } return ch == '/'; } @@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) if (!Platform_SameFileTime(identity, f->identity)) { i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -514,9 +514,9 @@ void Files_Purge (Files_File f) INT16 error; i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) offset = __MASK(pos, -4096); org = pos - offset; i = 0; - while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) { + while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) { i += 1; } if (i < 4) { - if (f->bufs[i] == NIL) { + if (f->bufs[__X(i, 4)] == NIL) { __NEW(buf, Files_BufDesc); buf->chg = 0; buf->org = -1; buf->f = f; - f->bufs[i] = buf; + f->bufs[__X(i, 4)] = buf; } else { - buf = f->bufs[i]; + buf = f->bufs[__X(i, 4)]; } } else { f->swapper = __MASK(f->swapper + 1, -4); - buf = f->bufs[f->swapper]; + buf = f->bufs[__X(f->swapper, 4)]; Files_Flush(buf); } if (buf->org != org) { @@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } Files_Assert(offset <= buf->size); if (offset < buf->size) { - *x = buf->data[offset]; + *x = buf->data[__X(offset, 4096)]; (*r).offset = offset + 1; } else if ((*r).org + offset < buf->f->len) { Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset); @@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); + __MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min); offset += min; (*r).offset = offset; xpos += min; @@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) offset = (*r).offset; } Files_Assert(offset < 4096); - buf->data[offset] = x; + buf->data[__X(offset, 4096)] = x; buf->chg = 1; if (offset == buf->size) { buf->size += 1; @@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); + __MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); @@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de j = 0; while (i > 0) { i -= 1; - dest[j] = src[i]; + dest[__X(j, dest__len)] = src[__X(i, src__len)]; j += 1; } } else { @@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) i = 0; do { Files_Read(&*R, R__typ, (void*)&ch); - x[i] = ch; + x[__X(i, x__len)] = ch; i += 1; } while (!(ch == 0x00)); } @@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) INT16 i; i = 0; do { - Files_Read(&*R, R__typ, (void*)&x[i]); + Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]); i += 1; - } while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a)); - if (x[i - 1] == 0x0a) { + } while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a)); + if (x[__X(i - 1, x__len)] == 0x0a) { i -= 1; } - if ((i > 0 && x[i - 1] == 0x0d)) { + if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) { i -= 1; } - x[i] = 0x00; + x[__X(i, x__len)] = 0x00; } void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) @@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len { INT16 i; i = 0; - while (x[i] != 0x00) { + while (x[__X(i, x__len)] != 0x00) { i += 1; } Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 25b5a32d..61cad689 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 348b336b..bd4ed5a8 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index b73de4fe..8d7eb8e5 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index e2075ab0..276b9857 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 2d074a62..9d10f4ac 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 41e56e38..d7012f3e 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 0eba52d2..b82bf9ba 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 7fa9fa23..42cd3c56 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 1e17f6c2..b79317f7 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 3dbed3bf..e6b33367 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 9c84b7af..1c6ca2ac 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 00e4fa0e..54a9f7c8 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 010479f8..52242f7c 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 74719041..0e42294b 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym) OPS_err(241); break; } - OPS_str[i] = OPS_ch; + OPS_str[__X(i, 256)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[i] = 0x00; + OPS_str[__X(i, 256)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym) INT16 i; i = 0; do { - OPS_name[i] = OPS_ch; + OPS_name[__X(i, 256)] = OPS_ch; i += 1; OPM_Get(&OPS_ch); } while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256)); @@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym) OPS_err(240); i -= 1; } - OPS_name[i] = 0x00; + OPS_name[__X(i, 256)] = 0x00; *sym = 38; } @@ -143,7 +143,7 @@ static void OPS_Number (void) if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) { if (m > 0 || OPS_ch != '0') { if (n < 24) { - dig[n] = OPS_ch; + dig[__X(n, 24)] = OPS_ch; n += 1; } m += 1; @@ -173,7 +173,7 @@ static void OPS_Number (void) OPS_numtyp = 1; if (n <= 2) { while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -187,7 +187,7 @@ static void OPS_Number (void) OPS_intval = -1; } while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -196,7 +196,7 @@ static void OPS_Number (void) } else { OPS_numtyp = 2; while (i < n) { - d = Ord__7(dig[i], 0); + d = Ord__7(dig[__X(i, 24)], 0); i += 1; if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; @@ -214,7 +214,7 @@ static void OPS_Number (void) expCh = 'E'; while (n > 0) { n -= 1; - f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10; + f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10; } if (OPS_ch == 'E' || OPS_ch == 'D') { expCh = OPS_ch; diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index dfe2b972..15cdcc6c 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 962b0f86..1897f024 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index f457c51e..a4688654 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 5193f272..ebe18cc4 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index bee5e44d..05e906a7 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 3bfb1ec7..2407ec4e 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index fad5cd1a..0819285a 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 65fd2654..62920520 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 47755d00..c447f2ba 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 2af2574f..44be33b7 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 07f4371d..7c2e0e35 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 3d82b654..6158bc92 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index df6f5edc..42b68da8 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 8e4938b8..2726593a 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 0c55850a..714d9ac5 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 5bfcea49..a3b0b0dd 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 51c85058..e7539d2f 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 2b6c962b..562921ce 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 9b0b1ee9..e6dd4577 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 10abd264..9cdbb76c 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 8eac398d..3ab08d40 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* 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/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index c817585e..7db28b57 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 7a28d41d..178e5cca 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -155,20 +155,20 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS __DUP(name, name__len, CHAR); i = 0; j = 0; - while (dir[i] != 0x00) { - dest[i] = dir[i]; + while (dir[__X(i, dir__len)] != 0x00) { + dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[i - 1] != '/') { - dest[i] = '/'; + if (dest[__X(i - 1, dest__len)] != '/') { + dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[j] != 0x00) { - dest[i] = name[j]; + while (name[__X(j, name__len)] != 0x00) { + dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; } - dest[i] = 0x00; + dest[__X(i, dest__len)] = 0x00; __DEL(dir); __DEL(name); } @@ -181,45 +181,45 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na n = Files_tempno; i = 0; if (finalName[0] != '/') { - while (Platform_CWD[i] != 0x00) { - name[i] = Platform_CWD[i]; + while (Platform_CWD[__X(i, 4096)] != 0x00) { + name[__X(i, name__len)] = Platform_CWD[__X(i, 4096)]; i += 1; } - if (Platform_CWD[i - 1] != '/') { - name[i] = '/'; + if (Platform_CWD[__X(i - 1, 4096)] != '/') { + name[__X(i, name__len)] = '/'; i += 1; } } j = 0; - while (finalName[j] != 0x00) { - name[i] = finalName[j]; + while (finalName[__X(j, finalName__len)] != 0x00) { + name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; i += 1; j += 1; } i -= 1; - while (name[i] != '/') { + while (name[__X(i, name__len)] != '/') { i -= 1; } - name[i + 1] = '.'; - name[i + 2] = 't'; - name[i + 3] = 'm'; - name[i + 4] = 'p'; - name[i + 5] = '.'; + name[__X(i + 1, name__len)] = '.'; + name[__X(i + 2, name__len)] = 't'; + name[__X(i + 3, name__len)] = 'm'; + name[__X(i + 4, name__len)] = 'p'; + name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = '.'; + name[__X(i, name__len)] = '.'; i += 1; n = Platform_PID; while (n > 0) { - name[i] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } - name[i] = 0x00; + name[__X(i, name__len)] = 0x00; __DEL(finalName); } @@ -320,8 +320,8 @@ void Files_Close (Files_File f) if (f->state != 1 || f->registerName[0] != 0x00) { Files_Create(f); i = 0; - while ((i < 4 && f->bufs[i] != NIL)) { - Files_Flush(f->bufs[i]); + while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) { + Files_Flush(f->bufs[__X(i, 4)]); i += 1; } } @@ -360,35 +360,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len) *pos += 1; } } else { - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; while (ch == ' ' || ch == ';') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } if (ch == '~') { *pos += 1; - ch = (Files_SearchPath->data)[*pos]; - while (Files_HOME[i] != 0x00) { - dir[i] = Files_HOME[i]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; + while (Files_HOME[__X(i, 1024)] != 0x00) { + dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)]; i += 1; } if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) { - while ((i > 0 && dir[i - 1] != '/')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) { i -= 1; } } } while ((ch != 0x00 && ch != ';')) { - dir[i] = ch; + dir[__X(i, dir__len)] = ch; i += 1; *pos += 1; - ch = (Files_SearchPath->data)[*pos]; + ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])]; } - while ((i > 0 && dir[i - 1] == ' ')) { + while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) { i -= 1; } } - dir[i] = 0x00; + dir[__X(i, dir__len)] = 0x00; } static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) @@ -399,7 +399,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len) ch = name[0]; while ((ch != 0x00 && ch != '/')) { i += 1; - ch = name[i]; + ch = name[__X(i, name__len)]; } return ch == '/'; } @@ -414,9 +414,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity) if (!Platform_SameFileTime(identity, f->identity)) { i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -515,9 +515,9 @@ void Files_Purge (Files_File f) INT16 error; i = 0; while (i < 4) { - if (f->bufs[i] != NIL) { - f->bufs[i]->org = -1; - f->bufs[i] = NIL; + if (f->bufs[__X(i, 4)] != NIL) { + f->bufs[__X(i, 4)]->org = -1; + f->bufs[__X(i, 4)] = NIL; } i += 1; } @@ -561,22 +561,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos) offset = __MASK(pos, -4096); org = pos - offset; i = 0; - while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) { + while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) { i += 1; } if (i < 4) { - if (f->bufs[i] == NIL) { + if (f->bufs[__X(i, 4)] == NIL) { __NEW(buf, Files_BufDesc); buf->chg = 0; buf->org = -1; buf->f = f; - f->bufs[i] = buf; + f->bufs[__X(i, 4)] = buf; } else { - buf = f->bufs[i]; + buf = f->bufs[__X(i, 4)]; } } else { f->swapper = __MASK(f->swapper + 1, -4); - buf = f->bufs[f->swapper]; + buf = f->bufs[__X(f->swapper, 4)]; Files_Flush(buf); } if (buf->org != org) { @@ -623,7 +623,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } Files_Assert(offset <= buf->size); if (offset < buf->size) { - *x = buf->data[offset]; + *x = buf->data[__X(offset, 4096)]; (*r).offset = offset + 1; } else if ((*r).org + offset < buf->f->len) { Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset); @@ -661,7 +661,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x } else { min = n; } - __MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min); + __MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min); offset += min; (*r).offset = offset; xpos += min; @@ -690,7 +690,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x) offset = (*r).offset; } Files_Assert(offset < 4096); - buf->data[offset] = x; + buf->data[__X(offset, 4096)] = x; buf->chg = 1; if (offset == buf->size) { buf->size += 1; @@ -724,7 +724,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS } else { min = n; } - __MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min); + __MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min); offset += min; (*r).offset = offset; Files_Assert(offset <= 4096); @@ -845,7 +845,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de j = 0; while (i > 0) { i -= 1; - dest[j] = src[i]; + dest[__X(j, dest__len)] = src[__X(i, src__len)]; j += 1; } } else { @@ -902,7 +902,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) i = 0; do { Files_Read(&*R, R__typ, (void*)&ch); - x[i] = ch; + x[__X(i, x__len)] = ch; i += 1; } while (!(ch == 0x00)); } @@ -912,16 +912,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len) INT16 i; i = 0; do { - Files_Read(&*R, R__typ, (void*)&x[i]); + Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]); i += 1; - } while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a)); - if (x[i - 1] == 0x0a) { + } while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a)); + if (x[__X(i - 1, x__len)] == 0x0a) { i -= 1; } - if ((i > 0 && x[i - 1] == 0x0d)) { + if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) { i -= 1; } - x[i] = 0x00; + x[__X(i, x__len)] = 0x00; } void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len) @@ -994,7 +994,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len { INT16 i; i = 0; - while (x[i] != 0x00) { + while (x[__X(i, x__len)] != 0x00) { i += 1; } Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1); diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 16fd4396..658429ef 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 9e99e657..eb19a612 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 2b6287cd..ab574eed 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 94227779..b3c05745 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 5d832fa6..3f97dc19 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 41e56e38..d7012f3e 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 0eba52d2..b82bf9ba 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 7fa9fa23..42cd3c56 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 1e17f6c2..b79317f7 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index bcf72c6b..28e1ec4b 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 9c84b7af..1c6ca2ac 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 18305e4c..7508ac7a 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 010479f8..52242f7c 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 74719041..0e42294b 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym) OPS_err(241); break; } - OPS_str[i] = OPS_ch; + OPS_str[__X(i, 256)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[i] = 0x00; + OPS_str[__X(i, 256)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym) INT16 i; i = 0; do { - OPS_name[i] = OPS_ch; + OPS_name[__X(i, 256)] = OPS_ch; i += 1; OPM_Get(&OPS_ch); } while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256)); @@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym) OPS_err(240); i -= 1; } - OPS_name[i] = 0x00; + OPS_name[__X(i, 256)] = 0x00; *sym = 38; } @@ -143,7 +143,7 @@ static void OPS_Number (void) if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) { if (m > 0 || OPS_ch != '0') { if (n < 24) { - dig[n] = OPS_ch; + dig[__X(n, 24)] = OPS_ch; n += 1; } m += 1; @@ -173,7 +173,7 @@ static void OPS_Number (void) OPS_numtyp = 1; if (n <= 2) { while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -187,7 +187,7 @@ static void OPS_Number (void) OPS_intval = -1; } while (i < n) { - OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1); + OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1); i += 1; } } else { @@ -196,7 +196,7 @@ static void OPS_Number (void) } else { OPS_numtyp = 2; while (i < n) { - d = Ord__7(dig[i], 0); + d = Ord__7(dig[__X(i, 24)], 0); i += 1; if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) { OPS_intval = OPS_intval * 10 + (INT64)d; @@ -214,7 +214,7 @@ static void OPS_Number (void) expCh = 'E'; while (n > 0) { n -= 1; - f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10; + f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10; } if (OPS_ch == 'E' || OPS_ch == 'D') { expCh = OPS_ch; diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index dfe2b972..15cdcc6c 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index c6989580..57dfaa59 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index f457c51e..a4688654 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 617e9e58..bad459b6 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index bee5e44d..05e906a7 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 3bfb1ec7..2407ec4e 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index fad5cd1a..0819285a 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 361a39fc..9f789ece 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 9ca6f851..ee812dcd 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 2af2574f..44be33b7 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 07f4371d..7c2e0e35 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 3d82b654..6158bc92 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index df6f5edc..42b68da8 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 82588563..6a06c85c 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index b3dd50cb..e4aa3a7d 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 5bfcea49..a3b0b0dd 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 51c85058..e7539d2f 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 2b6c962b..562921ce 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 9b0b1ee9..e6dd4577 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -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/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ #ifndef extTools__h #define extTools__h From 70f2839c76a5a6e8a133807a7d688180314a46d9 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 17:32:38 +0100 Subject: [PATCH 156/241] Add 'Filename too long' error in Files.Mod. --- src/runtime/Files.Mod | 48 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index c06d2f2b..b63553d7 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -2,16 +2,6 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files IMPORT SYSTEM, Platform, Heap, Strings, Out; - (* standard data type I/O - - little endian, - Sint:1, Int:2, Lint:4 - ORD({0}) = 1, - false = 0, true =1 - IEEE real format, - null terminated strings, - compact numbers according to M.Odersky *) - CONST NumBufs = 4; @@ -84,34 +74,34 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files Out.Ln; Out.String("-- "); Out.String(s); Out.String(": "); IF f # NIL THEN IF f.registerName # "" THEN Out.String(f.registerName) ELSE Out.String(f.workName) END; - IF f.fd # 0 THEN Out.String("f.fd = "); Out.Int(f.fd,1) END + IF f.fd # 0 THEN Out.String(", f.fd = "); Out.Int(f.fd,1) END END; - IF errcode # 0 THEN Out.String(" errcode = "); Out.Int(errcode, 1) END; + IF errcode # 0 THEN Out.String(", errcode = "); Out.Int(errcode, 1) END; Out.Ln; HALT(99) END Err; PROCEDURE MakeFileName(dir, name: ARRAY OF CHAR; VAR dest: ARRAY OF CHAR); - VAR i, j: INTEGER; - BEGIN i := 0; j := 0; - WHILE dir[i] # 0X DO dest[i] := dir[i]; INC(i) END; - IF dest[i-1] # "/" THEN dest[i] := "/"; INC(i) END; - WHILE name[j] # 0X DO dest[i] := name[j]; INC(i); INC(j) END; - dest[i] := 0X + VAR i, j, ld, ln: INTEGER; + BEGIN ld := Strings.Length(dir); ln := Strings.Length(name); + WHILE (ld > 0) & (dir[ld-1] = '/') DO DEC(ld) END; + IF ld + ln + 2 > LEN(dest) THEN Err("File name too long", NIL, 0) END; + i := 0; + WHILE i < ld DO dest[i] := dir[i]; INC(i) END; + IF i > 0 THEN dest[i] := '/'; INC(i) END; + j := 0; + WHILE j < ln DO dest[i] := name[j]; INC(i); INC(j) END; + dest[i] := 0X; END MakeFileName; PROCEDURE GetTempName(finalName: ARRAY OF CHAR; VAR name: ARRAY OF CHAR); - VAR n, i, j: LONGINT; + VAR i, n: INTEGER; BEGIN - INC(tempno); n := tempno; i := 0; - IF finalName[0] # "/" THEN (* relative pathname *) - WHILE Platform.CWD[i] # 0X DO name[i] := Platform.CWD[i]; INC(i) END; - IF Platform.CWD[i-1] # "/" THEN name[i] := "/"; INC(i) END - END; - j := 0; - WHILE finalName[j] # 0X DO name[i] := finalName[j]; INC(i); INC(j) END; - DEC(i); - WHILE name[i] # "/" DO DEC(i) END; + IF finalName[0]='/' THEN COPY(finalName, name) ELSE MakeFileName(Platform.CWD, finalName, name) END; + i := Strings.Length(name)-1; + WHILE (i > 0) & (name[i] # '/') DO DEC(i) END; + IF i+16 >= LEN(name) THEN Err("File name too long", NIL, 0) END; + INC(tempno); n := tempno; name[i+1] := "."; name[i+2] := "t"; name[i+3] := "m"; name[i+4] := "p"; name[i+5] := "."; INC(i, 6); WHILE n > 0 DO name[i] := CHR(n MOD 10 + ORD("0")); n := n DIV 10; INC(i) END; name[i] := "."; INC(i); n := Platform.PID; @@ -181,7 +171,7 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files error := Platform.New(f.workName, f.fd); done := error = 0; IF done THEN - f.next := files; files := f; (* Link this file into the list of OS bakced files. *) + f.next := files; files := f; (* Link this file into the list of OS backed files. *) INC(Heap.FileCount); Heap.RegisterFinalizer(f, Finalize); f.state := open; From f7904230c9c89a5337d63a3ec8fa241e099191c4 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 17:46:55 +0100 Subject: [PATCH 157/241] Update bootstrap C source files. --- bootstrap/unix-44/Files.c | 55 ++++++++++++++++++------------------ bootstrap/unix-48/Files.c | 55 ++++++++++++++++++------------------ bootstrap/unix-88/Files.c | 55 ++++++++++++++++++------------------ bootstrap/windows-48/Files.c | 55 ++++++++++++++++++------------------ bootstrap/windows-88/Files.c | 55 ++++++++++++++++++------------------ 5 files changed, 135 insertions(+), 140 deletions(-) diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 78f0f4e9..8efb373c 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -134,12 +134,12 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String(f->workName, 256); } if (f->fd != 0) { - Out_String((CHAR*)"f.fd = ", 8); + Out_String((CHAR*)", f.fd = ", 10); Out_Int(f->fd, 1); } } if (errcode != 0) { - Out_String((CHAR*)" errcode = ", 12); + Out_String((CHAR*)", errcode = ", 13); Out_Int(errcode, 1); } Out_Ln(); @@ -149,20 +149,28 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { - INT16 i, j; + INT16 i, j, ld, ln; __DUP(dir, dir__len, CHAR); __DUP(name, name__len, CHAR); + ld = Strings_Length(dir, dir__len); + ln = Strings_Length(name, name__len); + while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) { + ld -= 1; + } + if (((ld + ln) + 2) > dest__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } i = 0; - j = 0; - while (dir[__X(i, dir__len)] != 0x00) { + while (i < ld) { dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[__X(i - 1, dest__len)] != '/') { + if (i > 0) { dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[__X(j, name__len)] != 0x00) { + j = 0; + while (j < ln) { dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; @@ -174,31 +182,22 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { - INT32 n, i, j; + INT16 i, n; __DUP(finalName, finalName__len, CHAR); - Files_tempno += 1; - n = Files_tempno; - i = 0; - if (finalName[0] != '/') { - while (Platform_CWD[__X(i, 256)] != 0x00) { - name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; - i += 1; - } - if (Platform_CWD[__X(i - 1, 256)] != '/') { - name[__X(i, name__len)] = '/'; - i += 1; - } + if (finalName[0] == '/') { + __COPY(finalName, name, name__len); + } else { + Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len); } - j = 0; - while (finalName[__X(j, finalName__len)] != 0x00) { - name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; - i += 1; - j += 1; - } - i -= 1; - while (name[__X(i, name__len)] != '/') { + i = Strings_Length(name, name__len) - 1; + while ((i > 0 && name[__X(i, name__len)] != '/')) { i -= 1; } + if ((i + 16) >= name__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } + Files_tempno += 1; + n = Files_tempno; name[__X(i + 1, name__len)] = '.'; name[__X(i + 2, name__len)] = 't'; name[__X(i + 3, name__len)] = 'm'; diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 78f0f4e9..8efb373c 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -134,12 +134,12 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String(f->workName, 256); } if (f->fd != 0) { - Out_String((CHAR*)"f.fd = ", 8); + Out_String((CHAR*)", f.fd = ", 10); Out_Int(f->fd, 1); } } if (errcode != 0) { - Out_String((CHAR*)" errcode = ", 12); + Out_String((CHAR*)", errcode = ", 13); Out_Int(errcode, 1); } Out_Ln(); @@ -149,20 +149,28 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { - INT16 i, j; + INT16 i, j, ld, ln; __DUP(dir, dir__len, CHAR); __DUP(name, name__len, CHAR); + ld = Strings_Length(dir, dir__len); + ln = Strings_Length(name, name__len); + while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) { + ld -= 1; + } + if (((ld + ln) + 2) > dest__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } i = 0; - j = 0; - while (dir[__X(i, dir__len)] != 0x00) { + while (i < ld) { dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[__X(i - 1, dest__len)] != '/') { + if (i > 0) { dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[__X(j, name__len)] != 0x00) { + j = 0; + while (j < ln) { dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; @@ -174,31 +182,22 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { - INT32 n, i, j; + INT16 i, n; __DUP(finalName, finalName__len, CHAR); - Files_tempno += 1; - n = Files_tempno; - i = 0; - if (finalName[0] != '/') { - while (Platform_CWD[__X(i, 256)] != 0x00) { - name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; - i += 1; - } - if (Platform_CWD[__X(i - 1, 256)] != '/') { - name[__X(i, name__len)] = '/'; - i += 1; - } + if (finalName[0] == '/') { + __COPY(finalName, name, name__len); + } else { + Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len); } - j = 0; - while (finalName[__X(j, finalName__len)] != 0x00) { - name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; - i += 1; - j += 1; - } - i -= 1; - while (name[__X(i, name__len)] != '/') { + i = Strings_Length(name, name__len) - 1; + while ((i > 0 && name[__X(i, name__len)] != '/')) { i -= 1; } + if ((i + 16) >= name__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } + Files_tempno += 1; + n = Files_tempno; name[__X(i + 1, name__len)] = '.'; name[__X(i + 2, name__len)] = 't'; name[__X(i + 3, name__len)] = 'm'; diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 0738e4f7..e30bbdb0 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -134,12 +134,12 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String(f->workName, 256); } if (f->fd != 0) { - Out_String((CHAR*)"f.fd = ", 8); + Out_String((CHAR*)", f.fd = ", 10); Out_Int(f->fd, 1); } } if (errcode != 0) { - Out_String((CHAR*)" errcode = ", 12); + Out_String((CHAR*)", errcode = ", 13); Out_Int(errcode, 1); } Out_Ln(); @@ -149,20 +149,28 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { - INT16 i, j; + INT16 i, j, ld, ln; __DUP(dir, dir__len, CHAR); __DUP(name, name__len, CHAR); + ld = Strings_Length(dir, dir__len); + ln = Strings_Length(name, name__len); + while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) { + ld -= 1; + } + if (((ld + ln) + 2) > dest__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } i = 0; - j = 0; - while (dir[__X(i, dir__len)] != 0x00) { + while (i < ld) { dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[__X(i - 1, dest__len)] != '/') { + if (i > 0) { dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[__X(j, name__len)] != 0x00) { + j = 0; + while (j < ln) { dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; @@ -174,31 +182,22 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { - INT32 n, i, j; + INT16 i, n; __DUP(finalName, finalName__len, CHAR); - Files_tempno += 1; - n = Files_tempno; - i = 0; - if (finalName[0] != '/') { - while (Platform_CWD[__X(i, 256)] != 0x00) { - name[__X(i, name__len)] = Platform_CWD[__X(i, 256)]; - i += 1; - } - if (Platform_CWD[__X(i - 1, 256)] != '/') { - name[__X(i, name__len)] = '/'; - i += 1; - } + if (finalName[0] == '/') { + __COPY(finalName, name, name__len); + } else { + Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len); } - j = 0; - while (finalName[__X(j, finalName__len)] != 0x00) { - name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; - i += 1; - j += 1; - } - i -= 1; - while (name[__X(i, name__len)] != '/') { + i = Strings_Length(name, name__len) - 1; + while ((i > 0 && name[__X(i, name__len)] != '/')) { i -= 1; } + if ((i + 16) >= name__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } + Files_tempno += 1; + n = Files_tempno; name[__X(i + 1, name__len)] = '.'; name[__X(i + 2, name__len)] = 't'; name[__X(i + 3, name__len)] = 'm'; diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index e714f199..f5bfa63b 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -134,12 +134,12 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String(f->workName, 256); } if (f->fd != 0) { - Out_String((CHAR*)"f.fd = ", 8); + Out_String((CHAR*)", f.fd = ", 10); Out_Int(f->fd, 1); } } if (errcode != 0) { - Out_String((CHAR*)" errcode = ", 12); + Out_String((CHAR*)", errcode = ", 13); Out_Int(errcode, 1); } Out_Ln(); @@ -149,20 +149,28 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { - INT16 i, j; + INT16 i, j, ld, ln; __DUP(dir, dir__len, CHAR); __DUP(name, name__len, CHAR); + ld = Strings_Length(dir, dir__len); + ln = Strings_Length(name, name__len); + while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) { + ld -= 1; + } + if (((ld + ln) + 2) > dest__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } i = 0; - j = 0; - while (dir[__X(i, dir__len)] != 0x00) { + while (i < ld) { dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[__X(i - 1, dest__len)] != '/') { + if (i > 0) { dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[__X(j, name__len)] != 0x00) { + j = 0; + while (j < ln) { dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; @@ -174,31 +182,22 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { - INT32 n, i, j; + INT16 i, n; __DUP(finalName, finalName__len, CHAR); - Files_tempno += 1; - n = Files_tempno; - i = 0; - if (finalName[0] != '/') { - while (Platform_CWD[__X(i, 4096)] != 0x00) { - name[__X(i, name__len)] = Platform_CWD[__X(i, 4096)]; - i += 1; - } - if (Platform_CWD[__X(i - 1, 4096)] != '/') { - name[__X(i, name__len)] = '/'; - i += 1; - } + if (finalName[0] == '/') { + __COPY(finalName, name, name__len); + } else { + Files_MakeFileName(Platform_CWD, 4096, finalName, finalName__len, (void*)name, name__len); } - j = 0; - while (finalName[__X(j, finalName__len)] != 0x00) { - name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; - i += 1; - j += 1; - } - i -= 1; - while (name[__X(i, name__len)] != '/') { + i = Strings_Length(name, name__len) - 1; + while ((i > 0 && name[__X(i, name__len)] != '/')) { i -= 1; } + if ((i + 16) >= name__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } + Files_tempno += 1; + n = Files_tempno; name[__X(i + 1, name__len)] = '.'; name[__X(i + 2, name__len)] = 't'; name[__X(i + 3, name__len)] = 'm'; diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 178e5cca..d7a1a3e1 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -135,12 +135,12 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) Out_String(f->workName, 256); } if (f->fd != 0) { - Out_String((CHAR*)"f.fd = ", 8); + Out_String((CHAR*)", f.fd = ", 10); Out_Int(f->fd, 1); } } if (errcode != 0) { - Out_String((CHAR*)" errcode = ", 12); + Out_String((CHAR*)", errcode = ", 13); Out_Int(errcode, 1); } Out_Ln(); @@ -150,20 +150,28 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode) static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len) { - INT16 i, j; + INT16 i, j, ld, ln; __DUP(dir, dir__len, CHAR); __DUP(name, name__len, CHAR); + ld = Strings_Length(dir, dir__len); + ln = Strings_Length(name, name__len); + while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) { + ld -= 1; + } + if (((ld + ln) + 2) > dest__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } i = 0; - j = 0; - while (dir[__X(i, dir__len)] != 0x00) { + while (i < ld) { dest[__X(i, dest__len)] = dir[__X(i, dir__len)]; i += 1; } - if (dest[__X(i - 1, dest__len)] != '/') { + if (i > 0) { dest[__X(i, dest__len)] = '/'; i += 1; } - while (name[__X(j, name__len)] != 0x00) { + j = 0; + while (j < ln) { dest[__X(i, dest__len)] = name[__X(j, name__len)]; i += 1; j += 1; @@ -175,31 +183,22 @@ static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len) { - INT32 n, i, j; + INT16 i, n; __DUP(finalName, finalName__len, CHAR); - Files_tempno += 1; - n = Files_tempno; - i = 0; - if (finalName[0] != '/') { - while (Platform_CWD[__X(i, 4096)] != 0x00) { - name[__X(i, name__len)] = Platform_CWD[__X(i, 4096)]; - i += 1; - } - if (Platform_CWD[__X(i - 1, 4096)] != '/') { - name[__X(i, name__len)] = '/'; - i += 1; - } + if (finalName[0] == '/') { + __COPY(finalName, name, name__len); + } else { + Files_MakeFileName(Platform_CWD, 4096, finalName, finalName__len, (void*)name, name__len); } - j = 0; - while (finalName[__X(j, finalName__len)] != 0x00) { - name[__X(i, name__len)] = finalName[__X(j, finalName__len)]; - i += 1; - j += 1; - } - i -= 1; - while (name[__X(i, name__len)] != '/') { + i = Strings_Length(name, name__len) - 1; + while ((i > 0 && name[__X(i, name__len)] != '/')) { i -= 1; } + if ((i + 16) >= name__len) { + Files_Err((CHAR*)"File name too long", 19, NIL, 0); + } + Files_tempno += 1; + n = Files_tempno; name[__X(i + 1, name__len)] = '.'; name[__X(i + 2, name__len)] = 't'; name[__X(i + 3, name__len)] = 'm'; From ee01f97392351939072dbe3c782f00c8b2c5ec48 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 18:51:39 +0100 Subject: [PATCH 158/241] Expose file name and path max lengths in Files.Mod. --- src/runtime/Files.Mod | 5 +++++ src/runtime/Platformunix.Mod | 13 ++++++++++++- src/runtime/Platformwindows.Mod | 11 +++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index b63553d7..5ce79071 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -54,6 +54,9 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files VAR + MaxPathLength-: INTEGER; + MaxNameLength-: INTEGER; + files: POINTER [1] TO FileDesc; (* List of files backed by an OS file, whether open, registered or temporary. *) tempno: INTEGER; HOME: ARRAY 1024 OF CHAR; @@ -741,4 +744,6 @@ BEGIN tempno := -1; Heap.FileCount := 0; HOME := ""; Platform.GetEnv("HOME", HOME); + MaxPathLength := Platform.MaxPathLength(); + MaxNameLength := Platform.MaxNameLength(); END Files. diff --git a/src/runtime/Platformunix.Mod b/src/runtime/Platformunix.Mod index ff03a960..bcf11137 100644 --- a/src/runtime/Platformunix.Mod +++ b/src/runtime/Platformunix.Mod @@ -44,6 +44,7 @@ PROCEDURE -Aincludeerrno '#include '; PROCEDURE -Astdlib '#include '; PROCEDURE -Astdio '#include '; PROCEDURE -Aerrno '#include '; +PROCEDURE -Alimits '#include '; @@ -66,7 +67,6 @@ PROCEDURE -EINTR(): ErrorCode 'EINTR'; - PROCEDURE TooManyFiles*(e: ErrorCode): BOOLEAN; BEGIN RETURN (e = EMFILE()) OR (e = ENFILE()) END TooManyFiles; @@ -95,6 +95,17 @@ BEGIN RETURN e = EINTR() END Interrupted; +(* Expose file and path name length limits *) + +PROCEDURE -NAMEMAX(): INTEGER 'NAME_MAX'; +PROCEDURE -PATHMAX(): INTEGER 'PATH_MAX'; + +PROCEDURE MaxNameLength*(): INTEGER; BEGIN RETURN NAMEMAX() END MaxNameLength; +PROCEDURE MaxPathLength*(): INTEGER; BEGIN RETURN PATHMAX() END MaxPathLength; + + + + (* OS memory allocaton *) PROCEDURE -allocate (size: SYSTEM.ADDRESS): SYSTEM.ADDRESS "(ADDRESS)((void*)malloc((size_t)size))"; diff --git a/src/runtime/Platformwindows.Mod b/src/runtime/Platformwindows.Mod index 4087c75b..63c90a69 100644 --- a/src/runtime/Platformwindows.Mod +++ b/src/runtime/Platformwindows.Mod @@ -91,6 +91,17 @@ BEGIN RETURN e = EINTR() END Interrupted; + +(* Expose file and path name length limits (same on Windows) *) + +PROCEDURE -MAXPATH(): INTEGER 'MAX_PATH'; + +PROCEDURE MaxNameLength*(): INTEGER; BEGIN RETURN MAXPATH() END MaxNameLength; +PROCEDURE MaxPathLength*(): INTEGER; BEGIN RETURN MAXPATH() END MaxPathLength; + + + + (* OS memory allocaton *) PROCEDURE -allocate(size: SYSTEM.ADDRESS): SYSTEM.ADDRESS "(ADDRESS)((void*)HeapAlloc(GetProcessHeap(), 0, (size_t)size))"; From b1b4d6b6026ae7955a0d9e0b32d13b80809f7940 Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 24 Apr 2018 18:53:02 +0100 Subject: [PATCH 159/241] Update bootstrap C source files. --- bootstrap/unix-44/Files.c | 3 +++ bootstrap/unix-44/Files.h | 1 + bootstrap/unix-44/Platform.c | 21 ++++++++++++++++++--- bootstrap/unix-44/Platform.h | 2 ++ bootstrap/unix-48/Files.c | 3 +++ bootstrap/unix-48/Files.h | 1 + bootstrap/unix-48/Platform.c | 21 ++++++++++++++++++--- bootstrap/unix-48/Platform.h | 2 ++ bootstrap/unix-88/Files.c | 3 +++ bootstrap/unix-88/Files.h | 1 + bootstrap/unix-88/Platform.c | 21 ++++++++++++++++++--- bootstrap/unix-88/Platform.h | 2 ++ bootstrap/windows-48/Files.c | 3 +++ bootstrap/windows-48/Files.h | 1 + bootstrap/windows-48/Platform.c | 13 +++++++++++++ bootstrap/windows-48/Platform.h | 2 ++ bootstrap/windows-88/Files.c | 3 +++ bootstrap/windows-88/Files.h | 1 + bootstrap/windows-88/Platform.c | 13 +++++++++++++ bootstrap/windows-88/Platform.h | 2 ++ 20 files changed, 110 insertions(+), 9 deletions(-) diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 8efb373c..867c33a4 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -48,6 +48,7 @@ typedef } Files_Rider; +export INT16 Files_MaxPathLength, Files_MaxNameLength; static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; @@ -1082,5 +1083,7 @@ export void *Files__init(void) Heap_FileCount = 0; Files_HOME[0] = 0x00; Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024); + Files_MaxPathLength = Platform_MaxPathLength(); + Files_MaxNameLength = Platform_MaxNameLength(); __ENDMOD; } diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index a0bced1c..f0e783a2 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -22,6 +22,7 @@ typedef } Files_Rider; +import INT16 Files_MaxPathLength, Files_MaxNameLength; import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index b5bf3da8..5e716822 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -42,6 +42,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +export INT16 Platform_MaxNameLength (void); +export INT16 Platform_MaxPathLength (void); export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); @@ -79,6 +81,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #include #include #include +#include #include #include #define Platform_EACCES() EACCES @@ -94,6 +97,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV +#define Platform_NAMEMAX() NAME_MAX +#define Platform_PATHMAX() PATH_MAX #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -178,6 +183,16 @@ BOOLEAN Platform_Interrupted (INT16 e) return e == Platform_EINTR(); } +INT16 Platform_MaxNameLength (void) +{ + return Platform_NAMEMAX(); +} + +INT16 Platform_MaxPathLength (void) +{ + return Platform_PATHMAX(); +} + INT32 Platform_OSAllocate (INT32 size) { return Platform_allocate(size); @@ -189,13 +204,13 @@ void Platform_OSFree (INT32 address) } typedef - CHAR (*EnvPtr__78)[1024]; + CHAR (*EnvPtr__83)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - EnvPtr__78 p = NIL; + EnvPtr__83 p = NIL; __DUP(var, var__len, CHAR); - p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); + p = (EnvPtr__83)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 6c2d79c8..3c3d06cb 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -40,6 +40,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +import INT16 Platform_MaxNameLength (void); +import INT16 Platform_MaxPathLength (void); import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 8efb373c..867c33a4 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -48,6 +48,7 @@ typedef } Files_Rider; +export INT16 Files_MaxPathLength, Files_MaxNameLength; static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; @@ -1082,5 +1083,7 @@ export void *Files__init(void) Heap_FileCount = 0; Files_HOME[0] = 0x00; Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024); + Files_MaxPathLength = Platform_MaxPathLength(); + Files_MaxNameLength = Platform_MaxNameLength(); __ENDMOD; } diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index a0bced1c..f0e783a2 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -22,6 +22,7 @@ typedef } Files_Rider; +import INT16 Files_MaxPathLength, Files_MaxNameLength; import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index b5bf3da8..5e716822 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -42,6 +42,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +export INT16 Platform_MaxNameLength (void); +export INT16 Platform_MaxPathLength (void); export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); @@ -79,6 +81,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #include #include #include +#include #include #include #define Platform_EACCES() EACCES @@ -94,6 +97,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV +#define Platform_NAMEMAX() NAME_MAX +#define Platform_PATHMAX() PATH_MAX #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -178,6 +183,16 @@ BOOLEAN Platform_Interrupted (INT16 e) return e == Platform_EINTR(); } +INT16 Platform_MaxNameLength (void) +{ + return Platform_NAMEMAX(); +} + +INT16 Platform_MaxPathLength (void) +{ + return Platform_PATHMAX(); +} + INT32 Platform_OSAllocate (INT32 size) { return Platform_allocate(size); @@ -189,13 +204,13 @@ void Platform_OSFree (INT32 address) } typedef - CHAR (*EnvPtr__78)[1024]; + CHAR (*EnvPtr__83)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - EnvPtr__78 p = NIL; + EnvPtr__83 p = NIL; __DUP(var, var__len, CHAR); - p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); + p = (EnvPtr__83)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 6c2d79c8..3c3d06cb 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -40,6 +40,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +import INT16 Platform_MaxNameLength (void); +import INT16 Platform_MaxPathLength (void); import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index e30bbdb0..dd5e8a22 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -48,6 +48,7 @@ typedef } Files_Rider; +export INT16 Files_MaxPathLength, Files_MaxNameLength; static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; @@ -1082,5 +1083,7 @@ export void *Files__init(void) Heap_FileCount = 0; Files_HOME[0] = 0x00; Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024); + Files_MaxPathLength = Platform_MaxPathLength(); + Files_MaxNameLength = Platform_MaxNameLength(); __ENDMOD; } diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 9d81c004..f74b89a5 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -23,6 +23,7 @@ typedef } Files_Rider; +import INT16 Files_MaxPathLength, Files_MaxNameLength; import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index fa174db0..e578c349 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -42,6 +42,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +export INT16 Platform_MaxNameLength (void); +export INT16 Platform_MaxPathLength (void); export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT64 Platform_OSAllocate (INT64 size); @@ -79,6 +81,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #include #include #include +#include #include #include #define Platform_EACCES() EACCES @@ -94,6 +97,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_EROFS() EROFS #define Platform_ETIMEDOUT() ETIMEDOUT #define Platform_EXDEV() EXDEV +#define Platform_NAMEMAX() NAME_MAX +#define Platform_PATHMAX() PATH_MAX #define Platform_allocate(size) (ADDRESS)((void*)malloc((size_t)size)) #define Platform_chdir(n, n__len) chdir((char*)n) #define Platform_closefile(fd) close(fd) @@ -178,6 +183,16 @@ BOOLEAN Platform_Interrupted (INT16 e) return e == Platform_EINTR(); } +INT16 Platform_MaxNameLength (void) +{ + return Platform_NAMEMAX(); +} + +INT16 Platform_MaxPathLength (void) +{ + return Platform_PATHMAX(); +} + INT64 Platform_OSAllocate (INT64 size) { return Platform_allocate(size); @@ -189,13 +204,13 @@ void Platform_OSFree (INT64 address) } typedef - CHAR (*EnvPtr__78)[1024]; + CHAR (*EnvPtr__83)[1024]; BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len) { - EnvPtr__78 p = NIL; + EnvPtr__83 p = NIL; __DUP(var, var__len, CHAR); - p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len); + p = (EnvPtr__83)(ADDRESS)Platform_getenv(var, var__len); if (p != NIL) { __COPY(*p, val, val__len); } diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 085c2257..fefe3da8 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -40,6 +40,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +import INT16 Platform_MaxNameLength (void); +import INT16 Platform_MaxPathLength (void); import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT64 Platform_OSAllocate (INT64 size); diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index f5bfa63b..b6b62f3c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -48,6 +48,7 @@ typedef } Files_Rider; +export INT16 Files_MaxPathLength, Files_MaxNameLength; static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; @@ -1082,5 +1083,7 @@ export void *Files__init(void) Heap_FileCount = 0; Files_HOME[0] = 0x00; Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024); + Files_MaxPathLength = Platform_MaxPathLength(); + Files_MaxNameLength = Platform_MaxNameLength(); __ENDMOD; } diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 61cad689..2e6b98b9 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -22,6 +22,7 @@ typedef } Files_Rider; +import INT16 Files_MaxPathLength, Files_MaxNameLength; import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 62920520..9e7d70ee 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -44,6 +44,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT32 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +export INT16 Platform_MaxNameLength (void); +export INT16 Platform_MaxPathLength (void); export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT32 Platform_OSAllocate (INT32 size); @@ -88,6 +90,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_ETIMEDOUT() WSAETIMEDOUT #define Platform_GetConsoleMode(h, m) GetConsoleMode((HANDLE)h, (DWORD*)m) #define Platform_GetTickCount() (LONGINT)(UINT32)GetTickCount() +#define Platform_MAXPATH() MAX_PATH #define Platform_SetConsoleMode(h, m) SetConsoleMode((HANDLE)h, (DWORD)m) #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) #define Platform_SetQuitHandler(h) SystemSetQuitHandler((ADDRESS)h) @@ -191,6 +194,16 @@ BOOLEAN Platform_Interrupted (INT16 e) return e == Platform_EINTR(); } +INT16 Platform_MaxNameLength (void) +{ + return Platform_MAXPATH(); +} + +INT16 Platform_MaxPathLength (void) +{ + return Platform_MAXPATH(); +} + INT32 Platform_OSAllocate (INT32 size) { return Platform_allocate(size); diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index c447f2ba..9c125f90 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -41,6 +41,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT32 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +import INT16 Platform_MaxNameLength (void); +import INT16 Platform_MaxPathLength (void); import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT32 Platform_OSAllocate (INT32 size); diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index d7a1a3e1..c473c7b3 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -49,6 +49,7 @@ typedef } Files_Rider; +export INT16 Files_MaxPathLength, Files_MaxNameLength; static Files_FileDesc *Files_files; static INT16 Files_tempno; static CHAR Files_HOME[1024]; @@ -1084,5 +1085,7 @@ export void *Files__init(void) Heap_FileCount = 0; Files_HOME[0] = 0x00; Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024); + Files_MaxPathLength = Platform_MaxPathLength(); + Files_MaxNameLength = Platform_MaxNameLength(); __ENDMOD; } diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 658429ef..032d28c2 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -23,6 +23,7 @@ typedef } Files_Rider; +import INT16 Files_MaxPathLength, Files_MaxNameLength; import ADDRESS *Files_FileDesc__typ; import ADDRESS *Files_Rider__typ; diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 9f789ece..6f55e803 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -44,6 +44,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e); export BOOLEAN Platform_Interrupted (INT16 e); export BOOLEAN Platform_IsConsole (INT64 h); export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +export INT16 Platform_MaxNameLength (void); +export INT16 Platform_MaxPathLength (void); export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h); export BOOLEAN Platform_NoSuchDirectory (INT16 e); export INT64 Platform_OSAllocate (INT64 size); @@ -88,6 +90,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS #define Platform_ETIMEDOUT() WSAETIMEDOUT #define Platform_GetConsoleMode(h, m) GetConsoleMode((HANDLE)h, (DWORD*)m) #define Platform_GetTickCount() (LONGINT)(UINT32)GetTickCount() +#define Platform_MAXPATH() MAX_PATH #define Platform_SetConsoleMode(h, m) SetConsoleMode((HANDLE)h, (DWORD)m) #define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h) #define Platform_SetQuitHandler(h) SystemSetQuitHandler((ADDRESS)h) @@ -191,6 +194,16 @@ BOOLEAN Platform_Interrupted (INT16 e) return e == Platform_EINTR(); } +INT16 Platform_MaxNameLength (void) +{ + return Platform_MAXPATH(); +} + +INT16 Platform_MaxPathLength (void) +{ + return Platform_MAXPATH(); +} + INT64 Platform_OSAllocate (INT64 size) { return Platform_allocate(size); diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index ee812dcd..ba866b78 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -41,6 +41,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e); import BOOLEAN Platform_Interrupted (INT16 e); import BOOLEAN Platform_IsConsole (INT64 h); import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d); +import INT16 Platform_MaxNameLength (void); +import INT16 Platform_MaxPathLength (void); import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h); import BOOLEAN Platform_NoSuchDirectory (INT16 e); import INT64 Platform_OSAllocate (INT64 size); From af380565180e7b4028abafa6dce823a69488e692 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 27 Apr 2018 13:58:10 +0100 Subject: [PATCH 160/241] Add ruminations on how Oberon Files.Mod behaviour differs from conventional systems. --- doc/Files.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 doc/Files.md diff --git a/doc/Files.md b/doc/Files.md new file mode 100644 index 00000000..54355260 --- /dev/null +++ b/doc/Files.md @@ -0,0 +1,70 @@ +## Oberon's Files.Mod - differences from POSIX style file APIs + +Most operating systems provide file access in a similar and familiar manner: + - A new file is initially created as an entry in a filesystem directory referencing an empty file. + - File writes add to this file though buffers that will be flushed when full and at file close. + - Following file close the file is inacccessible until reopened. + +#### Why is a file *always* indexed in the filesystem directory? + +Before computers, files would be stored in filing cabinets for long term storage and retrieval, but they would also live independent of filing cabinets, for example in in-trays or out-trays, or loose on desks while being assembled. + +A file outside the filing cabinet might be being in the process of updating and so in an incomplete or inconsistant state. A file in the filing cabinet might be considered complete and consistent. + +#### Oberon Files.Mod behaviour + +Oberons filesystem behaviour is arguably closer to pre-computer usage. Files can easily exist independent of the filesystem directory: + + - Files.New creates a Files.File object that is fully writeable (and readable) but which is not (yet) indexed in the the filesystem. + - Files.Register puts the files name into the filesystem directory. + - Files.Delete takes the files name out of the filesystem directory. + - Neither Register nor Delete affect the file content or access to it. + - The files disk space will be recovered when there is neither a Files.File object referencing the file, nor is its file name present in the directory. + +For example it would be possible for a program to create a new file (Files.New), and then repeatedly put it into the directory (Files.Register) and take it out of the directory (Files.Delete) while at all times the Files.File returned by Files.New remains valid and the content and connected riders are unaffected by the directory changes. + +#### Comparing the Posix and Oberon approaches to file creation. + +On a real Oberon system, file access is independent of the file directory and the Oberon APIs directly reflect the system implementation. + +On a POSIX like system some Oberon APIs require implementation workarounds. This table illustrates Oberon behaviour by describing how it is implemented on top of a POSIX like filesystem. + +|Oberon API|Oberon behaviour|C API|C behaviour| +|---|---|---|---| +|Files.New(name)|Creates a file handle (Files.File) but does not touch the disk.|fopen(name, "w")|Creates an empty file and returns a handle. The empty file is immediately visible to other processes.| +|Files.Set(rider,file,pos)|Creates a rider at a given file position. Multiple riders may be created on the same file at the same or different positions.|----|----| +|Files.WriteBytes(rider,bytes,len)|Buffers are allocated to store written data (current implementation is up to 4 buffers, each 4kb).
Until the buffers are full nothing is written to disk and no file is created in the OS|fwrite()|Data is written to a buffer up to a system dependant size, nothing is written to disk.| +|Files.WriteBytes beyond buffer size|Once more than 16kb has been written, Vishap Oberon creates a temporary file to back up least recently accessed buffers.|fwrite()...|Once the internal buffer is full it is written to the named disk file| +|Files.Register|If all data is still in buffers (no temp file has been created), an OS file is created using the name originally passed to Files.New.
If a temporary file had been created it is renamed to the name originally passed to Files.New.
All buffered data is flushed to the file.|(no equivalent)|| +|Files.Delete|If there is no Files.File in the same program referencing the file then unlink/DeleteFile is called.
If there is a Files.File the OS file is renamed as a temporary file.
Any riders active on the file remain valid.
The file can be reregistered later.|unlink() or DeleteFile()|The file is marked for deletion and will be removed from the filesystem directory when no processes have it open.
Neither Windows nor Linux allow the file to be put back into the directory.| +|Files.Close|Any buffered data is flushed to disk. *The file object and all riders remain valid, data can still be read and written*.|close|Any buffered data is flushed to disk. The file handle is no longer valid for use.| + +Note that the Oberon approach results naturally in files not being visible to other processes until the writer has written a complete set of data. + +On other systems one common workaround is to write to a temporary file, and then rename it to it's public name, taking care of course to create the temporary file on the same device/partition where it will be published. + +Another workaround is to use file locking to keep the file inaccessible until the full set of data is written, of course taking care to avoid deadlocks. + + +### More on the Vishap Oberon emulation of Oberon system file access. + +Emulation of Oberon system behaviour is part of the Vishap Oberon run time system linked into each program. When multiple Oberon programs are running there are necessarily multiple run time systems running. + +#### Two programs writing to the same file + +Each run time system provides Oberon like buffer management. For example, each run time system ensures that multiple riders based on the same file share the same file buffers, such that writes to one of the riders are immediately availble to all (suitably positioned) other riders. + +It is a limitation that this parallel read and write behaviour does not work accross multiple porgams. + +#### Deleting and re-registering files + +Each run time system tracks deletes and registers to provide Oberon system behaviour, allowing a file to be registered, deleted, and re-registered as often as desired. (When the file is deleted, the run time system converts it back to a temporary file.) + +It is a limitation that the run time system does not provide full Oberon behaviour when a file is opened that is also in use by another program, or for which there are other hard links. + +#### Details + +|Activity|Behaviour| +|---|---| +|Rider buffering|File decriptors and buffers are not shared between multiple instances of the runtime system, therefore if two separate programs call Files.Old on the same file, writes to a rider in one program will usually not be reflected by reads in another program.
Further if both programs are writing to parts of the file that fall in the same buffer area, data will likely be lost: the second program to flush its buffer will overwrite new data written by the program that flushed first. While this is expected behaviour for most operating systems, it is not Oberon behaviour.| +|Register and Delete|When an Oberon program program calls Files.Delete passing a filename for which there is a Files.File instance, its runtime system renames the file as a temporary file and records that it is unregistered. The file continues to be accessible by all programs that have it open. When the program that deleted it completes it will call unlink, causing the OS to actually remove it once no programs have it open. This much is valid Oberon system behaviour.
However only the runtime system of the program that deleted the file knows that it is now unregistered and can successfully register it again. Run time systems of other running Vishap Oberon programs still think the file is registered and will be unable to Register it themselves.| \ No newline at end of file From 8890fe13369780dbbf480dfa7e4badefd8f12995 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 24 Nov 2018 00:28:13 +0400 Subject: [PATCH 161/241] windows installation document link fixed. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index f43f8559..d159399c 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -74,7 +74,7 @@ for your OS as follows: | ------- | -------------------------------------- | | Linux | `/opt/voc` | | BSD | `/usr/local/share/voc` | -| Windows | See [**Windows installation**](/doc/WInstallation.md) | +| Windows | See [**Windows installation**](/doc/Winstallation.md) | | Termux | `/data/data/com.termux/files/opt/voc` | `make install` updates `ldconfg` with the new library locations. From 6842928bf8b435966f625a699fa8186c3fd26900 Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 4 Jan 2019 18:54:55 +0000 Subject: [PATCH 162/241] Integrate rangechecked casting correction from @svorkoetter. --- .gitignore | 4 +++ bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 30 ++++++++++----------- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 4 +-- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 8 +++--- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 12 ++++----- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 24 ++++++++--------- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 10 +++---- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 12 ++++----- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 7 +++-- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 18 ++++++------- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 20 +++++++------- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 6 ++--- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 28 +++++++++---------- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 4 +-- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 +-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 30 ++++++++++----------- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 4 +-- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 8 +++--- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 12 ++++----- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 24 ++++++++--------- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 10 +++---- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 12 ++++----- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 7 +++-- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 18 ++++++------- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 20 +++++++------- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 6 ++--- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 28 +++++++++---------- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 4 +-- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 +-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 30 ++++++++++----------- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 4 +-- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 8 +++--- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 12 ++++----- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 24 ++++++++--------- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 10 +++---- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 12 ++++----- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 7 +++-- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 18 ++++++------- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 20 +++++++------- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 6 ++--- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 28 +++++++++---------- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 4 +-- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 +-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 30 ++++++++++----------- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 4 +-- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 8 +++--- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 12 ++++----- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 24 ++++++++--------- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 10 +++---- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 12 ++++----- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 7 +++-- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 18 ++++++------- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 20 +++++++------- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 6 ++--- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 28 +++++++++---------- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 4 +-- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 +-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 30 ++++++++++----------- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 4 +-- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 8 +++--- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 12 ++++----- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 24 ++++++++--------- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 10 +++---- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 12 ++++----- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 7 +++-- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 18 ++++++------- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 20 +++++++------- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 6 ++--- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 28 +++++++++---------- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 4 +-- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 +-- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPV.Mod | 9 ++++--- src/tools/make/oberon.mk | 40 ++++++++++++++-------------- 188 files changed, 614 insertions(+), 614 deletions(-) diff --git a/.gitignore b/.gitignore index cce16916..22c5a97d 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,7 @@ **/.tmp.* /*.pdb /*.ilk +/t/* +/triage/BasicTypeSize.md +/triage/Roadmap.md +triage/system/* diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 867c33a4..8f2c5d55 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index f0e783a2..f0a69373 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 8ae1f5fb..0e237dea 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index bc38d46b..a60c37a0 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 5e716822..9b4b1656 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 3c3d06cb..f19b815c 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 6d66b07b..74d010d1 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index c706a783..060cd98a 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 867c33a4..8f2c5d55 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index f0e783a2..f0a69373 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 8ae1f5fb..0e237dea 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 1897f024..1bf52545 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 5e716822..9b4b1656 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 3c3d06cb..f19b815c 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 2726593a..8096bc1d 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 714d9ac5..f7b5d487 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index dd5e8a22..9b17254c 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index f74b89a5..441c4007 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index eb19a612..9e3f5ae9 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index ab574eed..5db19e82 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 3c88874e..b0840e01 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 3f97dc19..be398042 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 28e1ec4b..7079d9d3 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 7508ac7a..bfbc425e 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 57dfaa59..fe093273 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index bad459b6..777dee8c 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index fc5b46c6..5bb316dd 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(1, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index e578c349..0e52a0fe 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index fefe3da8..13166a06 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 6a06c85c..9fb45ce9 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index e4aa3a7d..93a7b381 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index b6b62f3c..923a2d90 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -206,7 +206,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -214,7 +214,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 2e6b98b9..5524bb64 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index bd4ed5a8..31e05d3d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 8d7eb8e5..6ab10893 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 276b9857..917d5517 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 9d10f4ac..6dc9bb50 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index e6b33367..3f9ab009 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 54a9f7c8..3c2474d3 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 1897f024..1bf52545 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index ebe18cc4..a56a7417 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 2407ec4e..c1cc48bd 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(Platform_StdOut, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 9e7d70ee..1e9d3fdd 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 9c125f90..e7e58fb1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 2726593a..8096bc1d 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 714d9ac5..f7b5d487 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 9cdbb76c..3c9bd35e 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 3ab08d40..50c02bb9 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 7db28b57..d85d80f6 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index c473c7b3..4c53ff0e 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -207,7 +207,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na name[__X(i + 5, name__len)] = '.'; i += 6; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -215,7 +215,7 @@ static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *na i += 1; n = Platform_PID; while (n > 0) { - name[__X(i, name__len)] = (CHAR)((int)__MOD(n, 10) + 48); + name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48); n = __DIV(n, 10); i += 1; } @@ -949,18 +949,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x) void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x) { CHAR b[2]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2); } void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x) { CHAR b[4]; - b[0] = (CHAR)x; - b[1] = (CHAR)__ASHR(x, 8); - b[2] = (CHAR)__ASHR(x, 16); - b[3] = (CHAR)__ASHR(x, 24); + b[0] = __CHR(x); + b[1] = __CHR(__ASHR(x, 8)); + b[2] = __CHR(__ASHR(x, 16)); + b[3] = __CHR(__ASHR(x, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -969,10 +969,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) CHAR b[4]; INT32 i; i = (INT32)x; - b[0] = (CHAR)i; - b[1] = (CHAR)__ASHR(i, 8); - b[2] = (CHAR)__ASHR(i, 16); - b[3] = (CHAR)__ASHR(i, 24); + b[0] = __CHR(i); + b[1] = __CHR(__ASHR(i, 8)); + b[2] = __CHR(__ASHR(i, 16)); + b[3] = __CHR(__ASHR(i, 24)); Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4); } @@ -1003,10 +1003,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x) { while (x < -64 || x > 63) { - Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128)); x = __ASHR(x, 7); } - Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128)); + Files_Write(&*R, R__typ, __CHR(__MASK(x, -128))); } void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len) diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 032d28c2..96331322 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index eb19a612..9e3f5ae9 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index ab574eed..5db19e82 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. tsSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index b3c05745..294e8d2f 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -404,7 +404,7 @@ static void Modules_errint (INT32 l) if (l >= 10) { Modules_errint(__DIV(l, 10)); } - Modules_errch((CHAR)((int)__MOD(l, 10) + 48)); + Modules_errch(__CHR((int)__MOD(l, 10) + 48)); } static void Modules_DisplayHaltCode (INT32 code) diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 3f97dc19..be398042 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d7012f3e..6f3e6970 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n) { CHAR ch; n->typ = OPT_stringtyp; - ch = (CHAR)n->conval->intval; + ch = __CHR(n->conval->intval); n->conval->ext = OPT_NewExt(); if (ch == 0x00) { n->conval->intval2 = 1; @@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x) case 22: if (f == 3) { if (z->class == 7) { - z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval); + z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval)); z->obj = NIL; } else { z = NewOp__29(op, typ, z); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(203); r = (LONGREAL)1; } - (*x)->conval->intval = (INT32)__ENTIER(r); + (*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL); OPB_SetIntType(*x); } } diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index b82bf9ba..032091ba 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 42cd3c56..3847bab7 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1743,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c) if ((c == 92 || c == 39) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); OPM_Write('\''); } } @@ -1759,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l) c = (INT16)s[__X(i, s__len)]; if (c < 32 || c > 126) { OPM_Write('\\'); - OPM_Write((CHAR)(48 + __ASHR(c, 6))); + OPM_Write(__CHR(48 + __ASHR(c, 6))); c = __MASK(c, -64); - OPM_Write((CHAR)(48 + __ASHR(c, 3))); + OPM_Write(__CHR(48 + __ASHR(c, 3))); c = __MASK(c, -8); - OPM_Write((CHAR)(48 + c)); + OPM_Write(__CHR(48 + c)); } else { if ((c == 92 || c == 34) || c == 63) { OPM_Write('\\'); } - OPM_Write((CHAR)c); + OPM_Write(__CHR(c)); } i += 1; } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index b79317f7..f1968a6b 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 28e1ec4b..7079d9d3 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos) if (pos >= (INT64)OPM_ErrorLineLimitPos) { pos = OPM_ErrorLineLimitPos - 1; } - i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos); + i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768); while (i > 0) { OPM_LogW(' '); i -= 1; @@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i) { CHAR s[3]; INT32 digit; - digit = __ASHR((INT32)i, 4); + digit = __ASHR(__SHORT(i, 2147483648LL), 4); if (digit < 10) { - s[0] = (CHAR)(48 + digit); + s[0] = __CHR(48 + digit); } else { - s[0] = (CHAR)(87 + digit); + s[0] = __CHR(87 + digit); } - digit = __MASK((INT32)i, -16); + digit = __MASK(__SHORT(i, 2147483648LL), -16); if (digit < 10) { - s[1] = (CHAR)(48 + digit); + s[1] = __CHR(48 + digit); } else { - s[1] = (CHAR)(87 + digit); + s[1] = __CHR(87 + digit); } s[2] = 0x00; OPM_WriteString(s, 3); @@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i) __MOVE("LL", s, 3); k = 2; } - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; while (i1 > 0) { - s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48); + s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48); i1 = __DIV(i1, 10); k += 1; } @@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx) CHAR s[32]; CHAR ch; INT16 i; - if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) { + if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) { if (suffx == 'f') { OPM_WriteString((CHAR*)"(REAL)", 7); } else { OPM_WriteString((CHAR*)"(LONGREAL)", 11); } - OPM_WriteInt((INT32)__ENTIER(r)); + OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL)); } else { Texts_OpenWriter(&W, Texts_Writer__typ); if (suffx == 'f') { diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 1c6ca2ac..89ae5649 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 7508ac7a..bfbc425e 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x) OPT_Node y = NIL; INT8 m; INT16 n; - m = (INT8)((INT16)(*x)->obj->adr); + m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128); n = 0; if (OPP_sym == 30) { OPS_Get(&OPP_sym); @@ -943,7 +943,7 @@ static void GetCode__19 (void) (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; n += 1; } - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); OPS_Get(&OPP_sym); } else { for (;;) { @@ -956,14 +956,14 @@ static void GetCode__19 (void) n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = (CHAR)c; + (*ext)[__X(n, 256)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); } else if (OPP_sym == 35) { OPP_err(19); } else { - (*ext)[0] = (CHAR)n; + (*ext)[0] = __CHR(n); break; } } diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 52242f7c..849ca32f 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 0e42294b..523bcc40 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 15cdcc6c..4e2c9e5d 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 57dfaa59..fe093273 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ) } typ->size = offset; typ->align = base; - typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8); + typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768); } else if (c == 2) { OPT_TypSize(typ->BaseTyp); typ->size = typ->n * typ->BaseTyp->size; @@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ) obj->vis = 0; tag = OPM_SymRInt(); if (tag == 35) { - (*typ)->sysflag = (INT16)OPM_SymRInt(); + (*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768); tag = OPM_SymRInt(); } switch (tag) { @@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno) obj->mode = 9; ext = OPT_NewExt(); obj->conval->ext = ext; - s = (INT16)OPM_SymRInt(); - (*ext)[0] = (CHAR)s; + s = __SHORTF(OPM_SymRInt(), 32768); + (*ext)[0] = __CHR(s); i = 1; while (i <= s) { OPM_SymRCh(&(*ext)[__X(i, 256)]); @@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWInt(f); switch (f) { case 2: case 3: - OPM_SymWCh((CHAR)obj->conval->intval); + OPM_SymWCh(__CHR(obj->conval->intval)); break; case 4: OPM_SymWInt(obj->conval->intval); diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index a4688654..65364b16 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index bad459b6..777dee8c 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -112,7 +112,7 @@ static void OPV_Stamp (OPS_Name s) i += 2; k = 0; do { - n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48); + n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } while (!(j == 0)); @@ -370,6 +370,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to) OPM_WriteInt(__ASHL(to, 3)); OPM_WriteString((CHAR*)")", 2); } + OPV_Entier(n, 9); } } @@ -381,7 +382,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) if (to == 7) { if (from == 7) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); @@ -391,7 +391,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec) } } else if (to == 4) { OPV_SizeCast(n, newtype->size); - OPV_Entier(n, 9); } else if (to == 3) { if (__IN(2, OPM_Options, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 05e906a7..58f9508b 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 2407ec4e..c1cc48bd 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -80,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len) error = Platform_Write(Platform_StdOut, (ADDRESS)str, l); } else { __MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l); - Out_in += (INT16)l; + Out_in += __SHORT(l, 32768); } __DEL(str); } @@ -98,11 +98,11 @@ void Out_Int (INT64 x, INT64 n) if (x < 0) { x = -x; } - s[0] = (CHAR)(48 + __MOD(x, 10)); + s[0] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i = 1; while (x != 0) { - s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10)); + s[__X(i, 22)] = __CHR(48 + __MOD(x, 10)); x = __DIV(x, 10); i += 1; } @@ -138,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n) x = __ROTL(x, 4, 64); n -= 1; if (__MASK(x, -16) < 10) { - Out_Char((CHAR)(__MASK(x, -16) + 48)); + Out_Char(__CHR(__MASK(x, -16) + 48)); } else { - Out_Char((CHAR)((__MASK(x, -16) - 10) + 65)); + Out_Char(__CHR((__MASK(x, -16) - 10) + 65)); } } } @@ -154,7 +154,7 @@ void Out_Ln (void) static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i) { *i -= 1; - s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48); + s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48); } static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i) @@ -166,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 if (l > *i) { l = *i; } - *i -= (INT16)l; + *i -= __SHORT(l, 32768); j = 0; while (j < l) { s[__X(*i + j, s__len)] = t[__X(j, t__len)]; @@ -248,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_) if (nn) { x = -x; } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Out_Ten(e); } else { diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 0819285a..5cc7a37c 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 6f55e803..36884101 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index ba866b78..1544c29b 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 44be33b7..d0a86172 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex) { CHAR c; __GET((ADDRESS)x + 3, c, CHAR); - __PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); __GET((ADDRESS)x + 2, c, CHAR); - __PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); + __PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); } INT16 Reals_ExpoL (LONGREAL x) @@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len) } k = 0; if (n > 9) { - i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000); - j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000); + i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL); + j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL); if (j < 0) { j = 0; } while (k < 9) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48); j = __DIV(j, 10); k += 1; } } else { - i = (INT32)__ENTIER(x); + i = __SHORT(__ENTIER(x), 2147483648LL); } while (k < n) { - d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48); + d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48); i = __DIV(i, 10); k += 1; } @@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len) static CHAR Reals_ToHex (INT16 i) { if (i < 10) { - return (CHAR)(i + 48); + return __CHR(i + 48); } else { - return (CHAR)(i + 55); + return __CHR(i + 55); } __RETCHK; } diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 7c2e0e35..d7d40e29 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 6158bc92..c2deb7cf 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len) } if (i <= 32767) { __DEL(s); - return (INT16)i; + return __SHORT(i, 32768); } else { __DEL(s); return 32767; @@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA INT16 len, destLen, i; __DUP(source, source__len, CHAR); len = Strings_Length(source, source__len); - destLen = (INT16)dest__len - 1; + destLen = __SHORT(dest__len, 32768) - 1; if (pos < 0) { pos = 0; } diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 42b68da8..75b9b634 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 6a06c85c..9fb45ce9 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ) if ('9' < ch) { if (('A' <= ch && ch <= 'F')) { hex = 1; - ch = (CHAR)((INT16)ch - 7); + ch = __CHR((INT16)ch - 7); } else if (('a' <= ch && ch <= 'f')) { hex = 1; - ch = (CHAR)((INT16)ch - 39); + ch = __CHR((INT16)ch - 39); } else { break; } @@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n) x0 = x; } do { - a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x) do { y = __MASK(x, -16); if (y < 10) { - a[__X(i, 20)] = (CHAR)(y + 48); + a[__X(i, 20)] = __CHR(y + 48); } else { - a[__X(i, 20)] = (CHAR)(y + 55); + a[__X(i, 20)] = __CHR(y + 55); } x = __ASHR(x, 4); i += 1; @@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, ' '); } - e = (INT16)__ASHR((e - 1023) * 77, 8); + e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768); if (e >= 0) { x = x / (LONGREAL)Reals_TenL(e); } else { @@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n) } else { Texts_Write(&*W, W__typ, '+'); } - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48)); e = (int)__MOD(e, 100); - Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48)); - Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48)); + Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48)); } } @@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x); static void WritePair__44 (CHAR ch, INT32 x) { Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48)); - Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48)); + Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48)); } void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d) diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index e4aa3a7d..93a7b381 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index a3b0b0dd..a98729de 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len) } e = s; do { - b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48); + b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48); int_ = __DIV(int_, 10); e += 1; } while (!(int_ == 0)); diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index e7539d2f..df99892d 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 562921ce..6a411d85 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index e6dd4577..0629bd56 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2018/04/24]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */ +/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 3c561714..964f60e1 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -204,7 +204,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 END; END Precedence; - PROCEDURE^ expr (n: OPT.Node; prec: INTEGER); + PROCEDURE^ expr (n: OPT.Node; prec: INTEGER); PROCEDURE^ design(n: OPT.Node; prec: INTEGER); PROCEDURE Len(n: OPT.Node; dim: SYSTEM.INT64); @@ -241,7 +241,8 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 ELSE IF (n.typ.size # to) & ((n.typ.size > OPM.CIntSize) OR (to # OPM.CIntSize)) THEN OPM.WriteString("(INT"); OPM.WriteInt(to*8); OPM.WriteString(")") - END + END; + Entier(n, 9) END END SizeCast; @@ -250,13 +251,13 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 BEGIN from := n^.typ^.form; to := newtype.form; IF to = OPT.Set THEN IF from = OPT.Set THEN (* Sets of different size *) - SizeCast(n, newtype.size); Entier(n, 9) + SizeCast(n, newtype.size); ELSE (* Set from integer *) OPM.WriteString("__SETOF("); Entier(n, MinPrec); OPM.WriteString(","); OPM.WriteInt(newtype.size*8); OPM.Write(CloseParen) END ELSIF to = OPT.Int THEN (* integers of different size *) - SizeCast(n, newtype.size); Entier(n, 9) + SizeCast(n, newtype.size); ELSIF to = OPT.Char THEN IF OPM.ranchk IN OPM.Options THEN OPM.WriteString("__CHR"); IF SideEffects(n) THEN OPM.Write("F") END ; diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 581f3117..20654d40 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -60,7 +60,7 @@ assemble: @printf ' DATAMODEL: %s\n' "$(DATAMODEL)" cd $(BUILDDIR) && $(COMPILE) -c SYSTEM.c Configuration.c Platform.c Heap.c - cd $(BUILDDIR) && $(COMPILE) -c Out.c Reals.c Strings.c Modules.c + cd $(BUILDDIR) && $(COMPILE) -c Out.c Reals.c Strings.c Modules.c cd $(BUILDDIR) && $(COMPILE) -c Files.c Texts.c VT100.c cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c @@ -103,25 +103,25 @@ translate: @mkdir -p $(BUILDDIR) @rm -f $(BUILDDIR)/*.sym - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssrm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) From 2e93bc09098e750e8c4f7b5ffa97893d9ed8b352 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 7 Jan 2019 18:10:33 +0000 Subject: [PATCH 163/241] Correct the other reference to the windows installation doc. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index d159399c..66265334 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -95,7 +95,7 @@ For reference this will be: | Just `make full` | `export PATH="your-repository-clone/install/bin:$PATH"` | | `make install` on Linux | `export PATH="/opt/voc/bin:$PATH"` | | `make install` on BSD | `export PATH="/usr/local/share/voc/bin:$PATH"` | -| `make install` on Windows | See [**Windows installation**](/doc/WInstallation.md) | +| `make install` on Windows | See [**Windows installation**](/doc/Winstallation.md) | | `make install` on Termux | `export PATH="/data/data/com.termux/files/opt/voc/bin:$PATH"` | Also see [**Installation**](/doc/Installation.md). From 5e903cb3d9372729d65026adb1e8db5a4b6c80df Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 18:47:15 +0000 Subject: [PATCH 164/241] Trigger build --- src/tools/autobuild/trigger-build | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/tools/autobuild/trigger-build diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build new file mode 100644 index 00000000..e69de29b From e07c1250170e95bf27f55af6f67b7cabea69b94b Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 18:58:35 +0000 Subject: [PATCH 165/241] Trigger again --- src/tools/autobuild/trigger-build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build index e69de29b..a15e1851 100644 --- a/src/tools/autobuild/trigger-build +++ b/src/tools/autobuild/trigger-build @@ -0,0 +1 @@ +again From e3a07e77fa3a04555c3774934ab503d56181509d Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 7 Jan 2019 19:17:34 +0000 Subject: [PATCH 166/241] Trigger again --- src/tools/autobuild/trigger-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build index a15e1851..9b24da92 100644 --- a/src/tools/autobuild/trigger-build +++ b/src/tools/autobuild/trigger-build @@ -1 +1 @@ -again +another From a35668bf93b8550559be7e7a45d759d68db87b44 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 10 Oct 2019 17:41:18 +0400 Subject: [PATCH 167/241] initial tcc/linux changes --- src/tools/make/configure.c | 5 ++++- src/tools/make/oberon.mk | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index f82a5d37..8eedc80c 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -126,7 +126,7 @@ void determineOS() { #define optimize "" // " -O1" void determineCCompiler() { - snprintf(libspec, sizeof(libspec), " -l %s", oname); + snprintf(libspec, sizeof(libspec), " -l%s", oname); #if defined(__MINGW32__) compiler = "mingw"; if (sizeof (void*) == 4) { @@ -137,6 +137,9 @@ void determineCCompiler() { #elif defined(__clang__) compiler = "clang"; cc = "clang -fPIC -g" optimize; + #elif defined(__TINYC__) + compiler = "tcc"; + cc = "tcc -g"; #elif defined(__GNUC__) compiler = "gcc"; if (strncasecmp(os, "cygwin", 6) == 0) { diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 20654d40..0ec66ff9 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -65,10 +65,20 @@ assemble: cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c +ifeq ($(COMPILER),tcc) + cd $(BUILDDIR) && $(COMPILE) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ + SYSTEM.o Configuration.o Platform.o Heap.o Out.o \ + Strings.o Modules.o Files.o Reals.o Texts.o \ + VT100.o extTools.o \ + OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o +else cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ - SYSTEM.o Configuration.o Platform.o Heap.o Out.o Strings.o \ - Modules.o Files.o Reals.o Texts.o VT100.o extTools.o \ - OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o + SYSTEM.o Configuration.o Platform.o Heap.o Out.o \ + Strings.o Modules.o Files.o Reals.o Texts.o \ + VT100.o extTools.o \ + OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o + +endif cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) From 9626a95daa47fd73bdf24ba9891f1af32ac21ccf Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 10 Oct 2019 17:46:12 +0400 Subject: [PATCH 168/241] updated bootstrap files, main change should be in ext-tools.c (linking options, whitespace removed) --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +++--- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +++--- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +++--- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +++--- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +++--- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 200 insertions(+), 200 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 3c9bd35e..6b188f16 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 50c02bb9..409963ca 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index d85d80f6..dbf009d6 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 8f2c5d55..044765bb 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index f0a69373..8aa1d409 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 31e05d3d..9df04b8d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 6ab10893..bf0ce02b 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 0e237dea..54f9ba0d 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 6dc9bb50..1389aa0c 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 6f3e6970..a4397de5 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 032091ba..9fbb34f6 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 3847bab7..f8db5c9b 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index f1968a6b..fae0e6bb 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 3f9ab009..e685ba09 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 89ae5649..64a69570 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 3c2474d3..16c1d6e3 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 849ca32f..21533b54 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 523bcc40..ce8ccc05 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 4e2c9e5d..e57fe046 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index a60c37a0..62a0fada 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 65364b16..24bb332f 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index a56a7417..e02fbd6d 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 58f9508b..a6ee396f 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 5bb316dd..9ec940b8 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 5cc7a37c..f2e05bf1 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 9b4b1656..e60c4f2e 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index f19b815c..f97f4ca4 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index d0a86172..72025942 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index d7d40e29..db968500 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index c2deb7cf..37f86a62 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 75b9b634..bbeafccb 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 74d010d1..138fa46d 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 060cd98a..5808c15b 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index a98729de..86a3a929 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index df99892d..4e6a8592 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 6a411d85..01b7afde 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("tcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); Strings_Append(OPM_Model, 10, (void*)cmd, 4096); Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 0629bd56..146a1a2a 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 3c9bd35e..6b188f16 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 50c02bb9..409963ca 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index d85d80f6..dbf009d6 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 8f2c5d55..044765bb 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index f0a69373..8aa1d409 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 31e05d3d..9df04b8d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 6ab10893..bf0ce02b 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 0e237dea..54f9ba0d 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 6dc9bb50..1389aa0c 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 6f3e6970..a4397de5 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 032091ba..9fbb34f6 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 3847bab7..f8db5c9b 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index f1968a6b..fae0e6bb 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 3f9ab009..e685ba09 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 89ae5649..64a69570 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 3c2474d3..16c1d6e3 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 849ca32f..21533b54 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 523bcc40..ce8ccc05 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 4e2c9e5d..e57fe046 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 1bf52545..84eb203a 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 65364b16..24bb332f 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index a56a7417..e02fbd6d 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 58f9508b..a6ee396f 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 5bb316dd..9ec940b8 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 5cc7a37c..f2e05bf1 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 9b4b1656..e60c4f2e 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index f19b815c..f97f4ca4 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index d0a86172..72025942 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index d7d40e29..db968500 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index c2deb7cf..37f86a62 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 75b9b634..bbeafccb 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 8096bc1d..98c548ad 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index f7b5d487..dbc379f3 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index a98729de..86a3a929 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index df99892d..4e6a8592 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 6a411d85..01b7afde 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("tcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); Strings_Append(OPM_Model, 10, (void*)cmd, 4096); Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 0629bd56..146a1a2a 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 3c9bd35e..6b188f16 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 50c02bb9..409963ca 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index d85d80f6..dbf009d6 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 9b17254c..fee60e95 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 441c4007..829f677c 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 9e3f5ae9..ba20585f 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 5db19e82..9bbf2905 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index b0840e01..d02cab4b 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index be398042..978b1734 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 6f3e6970..a4397de5 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 032091ba..9fbb34f6 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 3847bab7..f8db5c9b 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index f1968a6b..fae0e6bb 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 7079d9d3..c26c8fec 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 89ae5649..64a69570 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index bfbc425e..b55812ec 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 849ca32f..21533b54 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 523bcc40..ce8ccc05 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 4e2c9e5d..e57fe046 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index fe093273..e212b6dc 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 65364b16..24bb332f 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 777dee8c..db0f15d9 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 58f9508b..a6ee396f 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 5bb316dd..9ec940b8 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 5cc7a37c..f2e05bf1 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 0e52a0fe..a7787021 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 13166a06..7d39fd5b 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index d0a86172..72025942 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index d7d40e29..db968500 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index c2deb7cf..37f86a62 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 75b9b634..bbeafccb 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 9fb45ce9..22cd2acd 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 93a7b381..44954586 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index a98729de..86a3a929 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index df99892d..4e6a8592 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 6a411d85..01b7afde 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("tcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); Strings_Append(OPM_Model, 10, (void*)cmd, 4096); Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 0629bd56..146a1a2a 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 3c9bd35e..6b188f16 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 50c02bb9..409963ca 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index d85d80f6..dbf009d6 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 923a2d90..00670e70 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 5524bb64..bd36750b 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 31e05d3d..9df04b8d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 6ab10893..bf0ce02b 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 917d5517..96791b9b 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 6dc9bb50..1389aa0c 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 6f3e6970..a4397de5 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 032091ba..9fbb34f6 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 3847bab7..f8db5c9b 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index f1968a6b..fae0e6bb 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 3f9ab009..e685ba09 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 89ae5649..64a69570 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 3c2474d3..16c1d6e3 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 849ca32f..21533b54 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 523bcc40..ce8ccc05 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 4e2c9e5d..e57fe046 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 1bf52545..84eb203a 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 65364b16..24bb332f 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index a56a7417..e02fbd6d 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 58f9508b..a6ee396f 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index c1cc48bd..f0f851c9 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 5cc7a37c..f2e05bf1 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 1e9d3fdd..c9cd7326 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index e7e58fb1..be514393 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index d0a86172..72025942 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index d7d40e29..db968500 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index c2deb7cf..37f86a62 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 75b9b634..bbeafccb 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 8096bc1d..98c548ad 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index f7b5d487..dbc379f3 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index a98729de..86a3a929 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index df99892d..4e6a8592 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 6a411d85..01b7afde 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("tcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); Strings_Append(OPM_Model, 10, (void*)cmd, 4096); Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 0629bd56..146a1a2a 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 3c9bd35e..6b188f16 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 50c02bb9..409963ca 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index d85d80f6..dbf009d6 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 4c53ff0e..514b5090 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 96331322..c679e795 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 9e3f5ae9..ba20585f 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 5db19e82..9bbf2905 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 294e8d2f..de2da183 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index be398042..978b1734 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 6f3e6970..a4397de5 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 032091ba..9fbb34f6 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 3847bab7..f8db5c9b 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index f1968a6b..fae0e6bb 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 7079d9d3..c26c8fec 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 89ae5649..64a69570 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index bfbc425e..b55812ec 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 849ca32f..21533b54 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 523bcc40..ce8ccc05 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 4e2c9e5d..e57fe046 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index fe093273..e212b6dc 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 65364b16..24bb332f 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 777dee8c..db0f15d9 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 58f9508b..a6ee396f 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index c1cc48bd..f0f851c9 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 5cc7a37c..f2e05bf1 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 36884101..4a739dc5 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 1544c29b..69b78662 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index d0a86172..72025942 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index d7d40e29..db968500 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index c2deb7cf..37f86a62 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 75b9b634..bbeafccb 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 9fb45ce9..22cd2acd 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 93a7b381..44954586 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index a98729de..86a3a929 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index df99892d..4e6a8592 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 6a411d85..01b7afde 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("gcc -g", s, s__len); + __COPY("tcc -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096); Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096); Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096); - Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096); + Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096); Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096); Strings_Append(OPM_Model, 10, (void*)cmd, 4096); Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 0629bd56..146a1a2a 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/01/04]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h From 7b9b5cb4f113b389d7bc0c7a522809c516086fd0 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 11 Oct 2019 15:00:02 +0400 Subject: [PATCH 169/241] simpler way of removing 'static' for tcc in configure.c, reverted oberon.mk back, according to this comment: https://github.com/vishaps/voc/commit/a35668bf93b8550559be7e7a45d759d68db87b44#r35448231 update of bootstrap sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 ++-- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 ++-- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 ++-- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 ++-- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 ++-- bootstrap/windows-88/extTools.h | 2 +- src/tools/make/configure.c | 1 + src/tools/make/oberon.mk | 9 --------- 187 files changed, 196 insertions(+), 204 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 6b188f16..706e5dac 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 409963ca..af1b360f 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index dbf009d6..75963938 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 044765bb..6b75d2c9 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 8aa1d409..e01b30c1 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 9df04b8d..1712292d 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index bf0ce02b..95defe4d 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 54f9ba0d..7fcd0339 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 1389aa0c..7132d67d 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index a4397de5..ee9816a3 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 9fbb34f6..eca13e1c 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index f8db5c9b..9d950335 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index fae0e6bb..ed46a18d 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index e685ba09..c00ef3c0 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 64a69570..ed863d1c 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 16c1d6e3..d6b5b011 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 21533b54..ebe70724 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index ce8ccc05..e535af0d 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index e57fe046..0aae61b1 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 62a0fada..6dfd6a9f 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 24bb332f..4bdb3a41 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index e02fbd6d..b6969178 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index a6ee396f..36e6ffa1 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 9ec940b8..b37ac764 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index f2e05bf1..b328aba8 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index e60c4f2e..2571cf00 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index f97f4ca4..cd5f8097 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 72025942..61d38fc6 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index db968500..cf6fff34 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 37f86a62..7d141b4d 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index bbeafccb..7101e619 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 138fa46d..98d2ca37 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 5808c15b..a70ae3ca 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 86a3a929..16cd0cf7 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 4e6a8592..c8271316 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 01b7afde..e091956d 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 146a1a2a..ad119444 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 6b188f16..706e5dac 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 409963ca..af1b360f 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index dbf009d6..75963938 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 044765bb..6b75d2c9 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 8aa1d409..e01b30c1 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 9df04b8d..1712292d 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index bf0ce02b..95defe4d 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 54f9ba0d..7fcd0339 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 1389aa0c..7132d67d 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index a4397de5..ee9816a3 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 9fbb34f6..eca13e1c 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index f8db5c9b..9d950335 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index fae0e6bb..ed46a18d 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index e685ba09..c00ef3c0 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 64a69570..ed863d1c 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 16c1d6e3..d6b5b011 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 21533b54..ebe70724 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index ce8ccc05..e535af0d 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index e57fe046..0aae61b1 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 84eb203a..cb27a509 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 24bb332f..4bdb3a41 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index e02fbd6d..b6969178 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index a6ee396f..36e6ffa1 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 9ec940b8..b37ac764 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index f2e05bf1..b328aba8 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index e60c4f2e..2571cf00 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index f97f4ca4..cd5f8097 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 72025942..61d38fc6 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index db968500..cf6fff34 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 37f86a62..7d141b4d 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index bbeafccb..7101e619 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 98c548ad..a43f9e79 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index dbc379f3..f8efcd82 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 86a3a929..16cd0cf7 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 4e6a8592..c8271316 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 01b7afde..e091956d 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 146a1a2a..ad119444 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 6b188f16..706e5dac 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 409963ca..af1b360f 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index dbf009d6..75963938 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index fee60e95..155e0a04 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 829f677c..e594e82b 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index ba20585f..e9555122 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 9bbf2905..e09ec7a8 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index d02cab4b..b5952131 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 978b1734..3a135985 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index a4397de5..ee9816a3 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 9fbb34f6..eca13e1c 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index f8db5c9b..9d950335 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index fae0e6bb..ed46a18d 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index c26c8fec..faa2b9d7 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 64a69570..ed863d1c 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index b55812ec..814adb3c 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 21533b54..ebe70724 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index ce8ccc05..e535af0d 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index e57fe046..0aae61b1 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index e212b6dc..b834bc38 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 24bb332f..4bdb3a41 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index db0f15d9..2f9f78c6 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index a6ee396f..36e6ffa1 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 9ec940b8..b37ac764 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index f2e05bf1..b328aba8 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index a7787021..99fd71e3 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 7d39fd5b..77e7eabf 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 72025942..61d38fc6 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index db968500..cf6fff34 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 37f86a62..7d141b4d 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index bbeafccb..7101e619 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 22cd2acd..fadb3d3b 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 44954586..95d43066 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 86a3a929..16cd0cf7 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 4e6a8592..c8271316 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 01b7afde..e091956d 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 146a1a2a..ad119444 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 6b188f16..706e5dac 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 409963ca..af1b360f 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index dbf009d6..75963938 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 00670e70..b7204686 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index bd36750b..d4f352c8 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 9df04b8d..1712292d 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index bf0ce02b..95defe4d 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 96791b9b..70e3c600 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 1389aa0c..7132d67d 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index a4397de5..ee9816a3 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 9fbb34f6..eca13e1c 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index f8db5c9b..9d950335 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index fae0e6bb..ed46a18d 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index e685ba09..c00ef3c0 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 64a69570..ed863d1c 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 16c1d6e3..d6b5b011 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 21533b54..ebe70724 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index ce8ccc05..e535af0d 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index e57fe046..0aae61b1 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 84eb203a..cb27a509 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 24bb332f..4bdb3a41 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index e02fbd6d..b6969178 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index a6ee396f..36e6ffa1 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index f0f851c9..d85cee6b 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index f2e05bf1..b328aba8 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index c9cd7326..9de4c27b 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index be514393..02f3b4e1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 72025942..61d38fc6 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index db968500..cf6fff34 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 37f86a62..7d141b4d 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index bbeafccb..7101e619 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 98c548ad..a43f9e79 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index dbc379f3..f8efcd82 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 86a3a929..16cd0cf7 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 4e6a8592..c8271316 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 01b7afde..e091956d 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 146a1a2a..ad119444 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 6b188f16..706e5dac 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 409963ca..af1b360f 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index dbf009d6..75963938 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 514b5090..e3a43ec3 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index c679e795..4f0adc88 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index ba20585f..e9555122 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 9bbf2905..e09ec7a8 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index de2da183..2432e8d7 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 978b1734..3a135985 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index a4397de5..ee9816a3 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 9fbb34f6..eca13e1c 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index f8db5c9b..9d950335 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index fae0e6bb..ed46a18d 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index c26c8fec..faa2b9d7 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 64a69570..ed863d1c 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index b55812ec..814adb3c 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 21533b54..ebe70724 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index ce8ccc05..e535af0d 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index e57fe046..0aae61b1 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index e212b6dc..b834bc38 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 24bb332f..4bdb3a41 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index db0f15d9..2f9f78c6 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index a6ee396f..36e6ffa1 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index f0f851c9..d85cee6b 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index f2e05bf1..b328aba8 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 4a739dc5..b6b5a74c 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 69b78662..391a1d4d 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 72025942..61d38fc6 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index db968500..cf6fff34 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 37f86a62..7d141b4d 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index bbeafccb..7101e619 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 22cd2acd..fadb3d3b 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 44954586..95d43066 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 86a3a929..16cd0cf7 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 4e6a8592..c8271316 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 01b7afde..e091956d 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); + Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 146a1a2a..ad119444 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 8eedc80c..ecfc3f1f 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -140,6 +140,7 @@ void determineCCompiler() { #elif defined(__TINYC__) compiler = "tcc"; cc = "tcc -g"; + staticlink = ""; #elif defined(__GNUC__) compiler = "gcc"; if (strncasecmp(os, "cygwin", 6) == 0) { diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 0ec66ff9..ffb27ace 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -65,21 +65,12 @@ assemble: cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c -ifeq ($(COMPILER),tcc) - cd $(BUILDDIR) && $(COMPILE) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ - SYSTEM.o Configuration.o Platform.o Heap.o Out.o \ - Strings.o Modules.o Files.o Reals.o Texts.o \ - VT100.o extTools.o \ - OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o -else cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ SYSTEM.o Configuration.o Platform.o Heap.o Out.o \ Strings.o Modules.o Files.o Reals.o Texts.o \ VT100.o extTools.o \ OPM.o OPS.o OPT.o OPC.o OPV.o OPB.o OPP.o -endif - cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) cp src/runtime/*.Txt $(ROOTDIR) From 49cb239730945ff9d8e1296322704695b1b4b73a Mon Sep 17 00:00:00 2001 From: David Brown Date: Fri, 11 Oct 2019 17:24:05 +0100 Subject: [PATCH 170/241] Update autobuild scripts for freenas server --- src/tools/autobuild/runbuilds.pl | 2 ++ src/tools/autobuild/server.pl | 37 +++++++++++++++++++------------ src/tools/autobuild/trigger-build | 1 - 3 files changed, 25 insertions(+), 15 deletions(-) delete mode 100644 src/tools/autobuild/trigger-build diff --git a/src/tools/autobuild/runbuilds.pl b/src/tools/autobuild/runbuilds.pl index 8fca8869..23a7f1db 100644 --- a/src/tools/autobuild/runbuilds.pl +++ b/src/tools/autobuild/runbuilds.pl @@ -3,6 +3,8 @@ use strict; use warnings; use POSIX "strftime"; +$SIG{CHLD} = 'IGNORE'; + my $home = "/home/dave/vishap-build"; chdir $home; diff --git a/src/tools/autobuild/server.pl b/src/tools/autobuild/server.pl index 1016f78f..f076a6c5 100755 --- a/src/tools/autobuild/server.pl +++ b/src/tools/autobuild/server.pl @@ -11,25 +11,28 @@ use Data::Dumper; use JSON; use sigtrap qw(die INT QUIT); -my $home = "/usr/home/dave/vishap-build"; +my $home = "/home/dave/vishap-build"; my $criggleplop = "splurd crungle splonge."; $| = 1; +$SIG{CHLD} = 'IGNORE'; my $PORT = 9000; -my $server = HTTP::Daemon->new(LocalPort => $PORT, ReuseAddr => 1); +my $server = HTTP::Daemon->new(Family => AF_INET, LocalPort => $PORT, ReuseAddr => 1); die "Cannot setup server" unless $server; print "[$$: Accepting clients at http://localhost:$PORT/]\n"; while (my $client = $server->accept) { (my $pid = fork()) // die("Couldn't fork."); - if ($pid) {close $client; undef $client} else {ServeRequests($client); exit} + if ($pid) {$client->close; undef $client} + else {ServeRequests($client); $client->close; undef $client; exit} } print "$$: server->accept failed. Exiting.\n"; exit; sub StartBuilds {my ($branch) = @_; + print " -- start builds for branch $branch.\n"; open TRIGGER, ">trigger-$branch"; print TRIGGER "trigger.\n"; close TRIGGER; my $running = 0; if (open PID, "; close PID} @@ -41,6 +44,7 @@ sub StartBuilds {my ($branch) = @_; open PID, ">pid"; print PID "$child.\n"; close PID; } else { # This is the child, we actually run all triggered builds. + # print "Debug: About to run perl >$home/runbuilds.log ...\n"; exec "perl $home/runbuilds.pl >$home/runbuilds.log"; exit; # Shouldn't get here } @@ -97,14 +101,17 @@ sub SendFile {my ($client, $file) = @_; sub VishapStatus {my ($client) = @_; + print " -- generate status.\n"; system "perl makesvg.pl"; # Construct an up-to-date status file SendFile($client, "vishaps-status.svg"); } sub LogFileResponse {my ($client, $path) = @_; if (-f "logs/$path.log") { + print " -- send log for build $path.\n"; SendFile($client, "logs/$path.log") } else { + print " -- respond forbidden: no log for $path.\n"; $client->send_error(RC_FORBIDDEN) } } @@ -115,27 +122,31 @@ sub ServeRequests {my ($client) = @_; while (my $request = $client->get_request) { if ($request->method eq 'GET') { - my $uri = $request->uri; my $host = $request->headers->{host}; - - print "URI requested: '$uri'.\n"; - print "Host: '$host'.\n"; - + my $uri = $request->uri; $uri =~ s/^\///; $uri =~ s/^githubhook\///; + print "Request: $uri\n"; - if ($uri eq 'vishaps-status.svg') {VishapStatus($client)} + if ($uri eq 'vishaps-status.svg') {VishapStatus($client)} + elsif ($uri eq 'vishaps-trigger') { + $client->send_file_response("response.html"); + StartBuilds("master"); + } + elsif ($uri =~ /^vishaps-trigger\/([-_a-z0-9]+)/i) { + $client->send_file_response("response.html"); + StartBuilds($1); + } else {LogFileResponse($client, $uri)} - } elsif ($request->method eq 'POST') { $client->send_file_response("response.html"); my $event = $request->headers->{'x-github-event'}; my $githubsig = substr($request->headers->{'x-hub-signature'}, 5); my $mysig = hmac_sha1_hex($request->content, $criggleplop); - print "Github event: $event, mysig $mysig, githubsig: $githubsig.\n"; + print "Github POST: $event, mysig $mysig, githubsig: $githubsig.\n"; if (($event eq "push") && ($mysig eq $githubsig)) { my $content = $request->content; $content =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; # Unescape %xx sequences. @@ -146,9 +157,7 @@ sub ServeRequests {my ($client) = @_; print "Request method $request->method forbidden.\n"; $client->send_error(RC_FORBIDDEN) + } } - $client->close; - undef $client; - #print "$$: no more requests, closing client.\n"; } diff --git a/src/tools/autobuild/trigger-build b/src/tools/autobuild/trigger-build deleted file mode 100644 index 9b24da92..00000000 --- a/src/tools/autobuild/trigger-build +++ /dev/null @@ -1 +0,0 @@ -another From 8cec6b37948d07359c857d65f55e313731b911ba Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Fri, 11 Oct 2019 17:41:45 +0100 Subject: [PATCH 171/241] A bit more info about static vs dynamic linking Some systems support only one. --- doc/Compiling.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/Compiling.md b/doc/Compiling.md index abeaf6c2..ebb84ce9 100644 --- a/doc/Compiling.md +++ b/doc/Compiling.md @@ -57,11 +57,13 @@ The following options designate the main module: | Compiler option | Use | | :-------------: | --------------------------- | -| ```-m``` | Generate loadable binary using dynamic library loading (on systems that support it). | -| ```-M``` | Generate loadable binary with all library references statically linked. | +| ```-m``` | Generate loadable binary using dynamic library loading (*see note*) | +| ```-M``` | Generate loadable binary with all library references statically linked (*see note*) | For a main module, no .sym or .h files are generated, and the C compiler is called with additional parameters to generate the execututable binary, linking the object files needed for imported modules. +*Note:* not all systems support both static and dynamic linking: some support only static; some support only dynamic. When a system only supports one, ```-m``` and ```-M``` behave the same. + ### Separate compilation Each module may be compiled by a separate command line, although the imports of a module must be compiled before the module is compiled. All three generated files (.sym, .c and .h) must be retained at least until all modules dependent on this module have been compiled. From e4743120def912ad66a98c65a2a168a0c8ef4f9a Mon Sep 17 00:00:00 2001 From: David Brown Date: Mon, 4 Nov 2019 16:06:16 +0000 Subject: [PATCH 172/241] Add support for building in a path containing spaces. --- src/compiler/extTools.Mod | 4 +- src/test/confidence/testenv.sh | 6 +- src/tools/make/oberon.mk | 329 ++++++++++++++++---------------- src/tools/make/sourcechanges.sh | 6 +- 4 files changed, 172 insertions(+), 173 deletions(-) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index fdd38e94..0c7acded 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -107,13 +107,13 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition Strings.Append(Configuration.name, cmd); Strings.Append('-O', cmd); Strings.Append(OPM.Model, cmd); - Strings.Append('.dylib ', cmd); + Strings.Append('.dylib "', cmd); Strings.Append(OPM.InstallDir, cmd); Strings.Append('/lib/lib', cmd); Strings.Append(Configuration.name, cmd); Strings.Append('-O', cmd); Strings.Append(OPM.Model, cmd); - Strings.Append('.dylib ', cmd); + Strings.Append('.dylib" ', cmd); Strings.Append(moduleName, cmd); execute("Set library directory: ", cmd) END diff --git a/src/test/confidence/testenv.sh b/src/test/confidence/testenv.sh index 69bfb20e..fdb13cc2 100755 --- a/src/test/confidence/testenv.sh +++ b/src/test/confidence/testenv.sh @@ -2,16 +2,16 @@ ## '.' this file from individual test.sh files. #set -e -echo --- Confidence test $(basename $PWD) --- +echo --- Confidence test $(basename "$PWD") --- if which cygpath >/dev/null 2>/dev/null then export PATH="$(cygpath "$1")/bin":"$PATH" else export PATH="$1/bin":"$PATH" fi -# Set ibrary paths for darwin and termux(android) +# Set library paths for darwin and termux(android) export DYLD_LIBRARY_PATH=$1/lib:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=$1/lib:$LD_LIBRARY_PATH -rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename $PWD) +rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename "$PWD") # Under gcc generate assembly source for source change test. # NOTE: The cygwin 64 bit build has relocation errors with diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index ffb27ace..21068cba 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -33,7 +33,7 @@ usage: clean: @printf '\n\n--- Cleaning branch $(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n' - rm -rf $(BUILDDIR) $(ROOTDIR)/install + rm -rf $(BUILDDIR) "$(ROOTDIR)/install" rm -f $(OBECOMP) @@ -65,7 +65,7 @@ assemble: cd $(BUILDDIR) && $(COMPILE) -c OPM.c extTools.c OPS.c OPT.c cd $(BUILDDIR) && $(COMPILE) -c OPC.c OPV.c OPB.c OPP.c - cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o $(ROOTDIR)/$(OBECOMP) \ + cd $(BUILDDIR) && $(COMPILE) $(STATICLINK) Compiler.c -o "$(ROOTDIR)/$(OBECOMP)" \ SYSTEM.o Configuration.o Platform.o Heap.o Out.o \ Strings.o Modules.o Files.o Reals.o Texts.o \ VT100.o extTools.o \ @@ -73,7 +73,7 @@ assemble: cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) - cp src/runtime/*.Txt $(ROOTDIR) + cp src/runtime/*.Txt "$(ROOTDIR)" @printf '$(OBECOMP) created.\n' @@ -104,25 +104,25 @@ translate: @mkdir -p $(BUILDDIR) @rm -f $(BUILDDIR)/*.sym - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod - cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ssrm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../Configuration.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Platform$(PLATFORM).Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrFapx -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Heap.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Reals.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Strings.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Out.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Modules.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Files.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/Texts.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/runtime/VT100.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPM.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/extTools.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPS.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPT.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPC.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPV.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPB.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -SsrF -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/OPP.Mod + cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -Ssrm -A$(ADRSIZE)$(ALIGNMENT) -O$(MODEL) ../../src/compiler/Compiler.Mod cp src/runtime/*.[ch] $(BUILDDIR) cp src/runtime/*.Txt $(BUILDDIR) @@ -133,8 +133,8 @@ translate: browsercmd: @printf '\nMaking symbol browser\n' - @cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Ss -O$(MODEL) ../../src/runtime/Oberon.Mod - @cd $(BUILDDIR); $(ROOTDIR)/$(OBECOMP) -Sm -O$(MODEL) ../../src/tools/browser/BrowserCmd.Mod + @cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -Ss -O$(MODEL) ../../src/runtime/Oberon.Mod + @cd $(BUILDDIR); "$(ROOTDIR)/$(OBECOMP)" -Sm -O$(MODEL) ../../src/tools/browser/BrowserCmd.Mod @cd $(BUILDDIR); $(COMPILE) BrowserCmd.c Oberon.c -o showdef \ Platform.o Texts.o OPT.o Heap.o Out.o SYSTEM.o OPM.o OPS.o OPV.o \ Files.o Reals.o Modules.o VT100.o Configuration.o Strings.o \ @@ -146,7 +146,7 @@ browsercmd: # makeinstalldir: Use only after a successful full build. Creates an # installation directory image in $(BUILDDOR)/install makeinstalldir: - @printf '\nCreating installation image at $(ROOTDIR)/install\n' + @printf '\nCreating installation image at "$(ROOTDIR)/install\n"' @rm -rf "$(ROOTDIR)/install" @mkdir -p "$(ROOTDIR)/install/bin" @@ -168,9 +168,9 @@ makeinstalldir: # instructions: Advice on completion of local build instructions: FORCE - @printf '\nOberon build and test complete, result is in $(ROOTDIR)/install\n' - @printf '\nYou can use the new compiler by running $(ROOTDIR)/install/bin/$(ONAME),\n' - @printf 'Or add it to your path as follows:\n' + @printf '\nOberon build and test complete, result is in "$(ROOTDIR)/install".\n' + @printf '\nYou can use the new compiler by running "$(ROOTDIR)/install/bin/$(ONAME)",\n' + @printf 'or add it to your path as follows:\n' @printf 'export PATH=\"$(ROOTDIR)/install/bin:$$PATH\"\n' @printf '\n' @@ -209,166 +209,166 @@ install: uninstall runtime: FORCE @printf '\nMaking run time library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Platform$(PLATFORM).Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Out.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Reals.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Strings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/In.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/VT100.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Files.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Math.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/MathL.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Texts.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/runtime/Oberon.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Platform$(PLATFORM).Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Heap.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Out.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Modules.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Reals.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Strings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/In.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/VT100.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Files.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Math.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/MathL.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Texts.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/runtime/Oberon.Mod v4: @printf '\nMaking v4 library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Args.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Console.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Printer.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/v4/Sets.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/v4/Args.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/v4/Console.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/v4/Printer.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/v4/Sets.Mod ooc2: @printf '\nMaking ooc2 library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Strings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Ascii.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2CharClass.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2ConvTypes.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2IntConv.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2IntStr.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Real0.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Strings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Ascii.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2CharClass.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2ConvTypes.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2IntConv.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2IntStr.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc2/ooc2Real0.Mod ooc: @printf '\nMaking ooc library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLowReal.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLowLReal.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocRealMath.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocOakMath.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealMath.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLongInts.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocComplexMath.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLComplexMath.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocAscii.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocCharClass.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocStrings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocConvTypes.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealConv.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealStr.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocRealConv.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocRealStr.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocIntConv.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocIntStr.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocMsg.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocSysClock.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocTime.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocChannel.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocStrings2.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocRts.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocFilenames.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocTextRider.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocBinaryRider.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocJulianDay.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocFilenames.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocwrapperlibc.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ooc/oocC$(DATAMODEL).Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLowReal.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLowLReal.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocRealMath.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocOakMath.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealMath.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLongInts.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocComplexMath.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLComplexMath.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocAscii.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocCharClass.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocConvTypes.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealConv.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocLRealStr.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocRealConv.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocRealStr.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocIntConv.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocIntStr.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocMsg.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocSysClock.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocTime.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocChannel.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocStrings2.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocRts.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocFilenames.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocTextRider.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocBinaryRider.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocJulianDay.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocFilenames.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocwrapperlibc.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ooc/oocC$(DATAMODEL).Mod oocX11: @printf '\nMaking oocX11 library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocX11.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocXutil.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/oocX11/oocXYplane.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/oocX11/oocX11.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/oocX11/oocXutil.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/oocX11/oocXYplane.Mod ulm: @printf '\nMaking ulm library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTypes.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmObjects.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPriorities.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmDisciplines.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmServices.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSys.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSYSTEM.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmEvents.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmProcess.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmResources.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmForwarders.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmRelatedEvents.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreams.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStrings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysTypes.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTexts.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysConversions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmErrors.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysErrors.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysStat.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmASCII.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSets.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmIO.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmAssertions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmIndirectDisciplines.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreamDisciplines.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmIEEE.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmMC68881.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmReals.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPrint.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmWrite.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmConstStrings.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPlotters.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysIO.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmLoader.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmNetIO.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPersistentObjects.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmPersistentDisciplines.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmOperations.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmScales.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimes.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmClocks.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmConditions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreamConditions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimeConditions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmCiphers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmCipherOps.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmBlockCiphers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmAsymmetricCiphers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmConclusions.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmRandomGenerators.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmTCrypt.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/ulm/ulmIntOperations.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTypes.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmObjects.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmPriorities.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmDisciplines.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmServices.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSys.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSYSTEM.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmEvents.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmProcess.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmResources.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmForwarders.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmRelatedEvents.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreams.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysTypes.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTexts.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysConversions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmErrors.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysErrors.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysStat.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmASCII.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSets.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmIO.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmAssertions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmIndirectDisciplines.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreamDisciplines.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmIEEE.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmMC68881.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmReals.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmPrint.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmWrite.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmConstStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmPlotters.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmSysIO.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmLoader.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmNetIO.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmPersistentObjects.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmPersistentDisciplines.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmOperations.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmScales.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimes.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmClocks.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmConditions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmStreamConditions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTimeConditions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmCiphers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmCipherOps.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmBlockCiphers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmAsymmetricCiphers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmConclusions.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmRandomGenerators.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmTCrypt.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/ulm/ulmIntOperations.Mod pow32: @printf '\nMaking pow library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/pow/powStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/pow/powStrings.Mod misc: @printf '\nMaking misc library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/crt.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/Listen.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/MersenneTwister.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/MultiArrays.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/misc/MultiArrayRiders.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/misc/crt.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/misc/Listen.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/misc/MersenneTwister.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/misc/MultiArrays.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/misc/MultiArrayRiders.Mod s3: @printf '\nMaking s3 library for -O$(MODEL)\n' - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethBTrees.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethMD5.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethSets.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlib.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlibBuffers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlibInflate.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlibDeflate.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlibReaders.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZlibWriters.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethZip.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethRandomNumbers.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethGZReaders.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethGZWriters.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethUnicode.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethDates.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethReals.Mod - cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Fs -O$(MODEL) ../../../src/library/s3/ethStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethBTrees.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethMD5.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethSets.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlib.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlibBuffers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlibInflate.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlibDeflate.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlibReaders.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZlibWriters.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethZip.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethRandomNumbers.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethGZReaders.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethGZWriters.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethUnicode.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethDates.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethReals.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethStrings.Mod @@ -392,8 +392,7 @@ library: sourcechanges: - @cd $(BUILDDIR) && sh $(ROOTDIR)/src/tools/make/sourcechanges.sh $(ROOTDIR)/bootstrap/$(PLATFORM)-$(ADRSIZE)$(ALIGNMENT) - + @cd $(BUILDDIR) && sh "$(ROOTDIR)/src/tools/make/sourcechanges.sh" "$(ROOTDIR)/bootstrap/$(PLATFORM)-$(ADRSIZE)$(ALIGNMENT)" diff --git a/src/tools/make/sourcechanges.sh b/src/tools/make/sourcechanges.sh index 1439ce4e..e20e6841 100644 --- a/src/tools/make/sourcechanges.sh +++ b/src/tools/make/sourcechanges.sh @@ -12,9 +12,9 @@ # The current directory is the build directory changes="0" -for f in $1/*; do - fn=$(basename $f) - egrep -v -f ../../src/tools/make/ignore $f >$fn.old +find "$1" -type f -print0 | while IFS= read -r -d '' f; do + fn=$(basename "$f") + egrep -v -f ../../src/tools/make/ignore "$f" >$fn.old egrep -v -f ../../src/tools/make/ignore $fn >$fn.new if ! diff -U 2 -b $fn.old $fn.new >$fn.diff; then echo "" From b2f70879662bd4e5d9da3d1503a767562088ac22 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 18:23:17 +0000 Subject: [PATCH 173/241] Reflect distinction between build (make full) and install (make install) --- doc/Installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Installation.md b/doc/Installation.md index b0ab299d..d9ad75cd 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -78,11 +78,11 @@ This will create a subdirectory 'voc' which includes the following files and dir | make.cmd | Makefile specifically for native Microsoft C builds. No tests. | -#### 3. Build and install the Oberon compiler and library +#### 3. Build the Oberon compiler and library ``` cd voc -[sudo] make full +make full ``` The makefile will: From 93b6ecc2340bb5125bf6f8f51db72125e591f637 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 18:24:47 +0000 Subject: [PATCH 174/241] Use https to get build status. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 66265334..09d3e962 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -![Build status](http://brownsmeet.com/githubhook/vishaps-status.svg) +![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg) # Ѵishap Oberon From 0b136c44e9dd8cedd24156d3feba079974601c14 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 19:22:49 +0000 Subject: [PATCH 175/241] No real change - attempting to clear the github cache of build status svg. --- ReadMe.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 09d3e962..470d485a 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -245,9 +245,7 @@ Norayr Chilingarian forked ofront in 2013, porting extensive libraries from [ULM David Brown has worked on adding support for more platforms incuding windows using MSC, cygwin or mingw since January 2016. More recently he has generalised basic type support within the compiler to allow e.g. 64 bit LONGINT on 32 bit systems, and 32 bit LONGINT on 64 bit systems. -## Origin of the name "Ѵishap Oberon" - -#### Oberon +## Oberon Oberon is a programming language, an operating system and a graphical user interface. Originally designed and implemented by by Niklaus Wirth and @@ -266,7 +264,7 @@ of Einstein and Antoine de Saint-Exupéry: > when there is no longer anything to take away. (Antoine de Saint-Exupéry, > translated by Lewis Galantière.) -#### Ѵishap +## Origin of the name "Ѵishap Oberon" Vishaps are dragons inhabiting the Armenian Highlands. We decided to name the project “Vishap” because ties between compilers and dragons have ancient traditions. From 84b6f0aa9256095bec55491e90d3bcba27484ebb Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 19:28:52 +0000 Subject: [PATCH 176/241] Trying harder to get build status to refresh, part 1. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 470d485a..8c06d9e5 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg) +![Build status](https://brownsmeet.com/githubhook/vishaps-status2.svg) # Ѵishap Oberon From 1d48dd811433cadb9f4e148fd586f9980d4daad0 Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 19:29:12 +0000 Subject: [PATCH 177/241] Trying harder to get build status to refresh, part 2. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 8c06d9e5..470d485a 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -![Build status](https://brownsmeet.com/githubhook/vishaps-status2.svg) +![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg) # Ѵishap Oberon From 760e14bbe197b8a7edb984c2ca73faf5a6de9cfd Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Mon, 4 Nov 2019 19:30:42 +0000 Subject: [PATCH 178/241] Still trying to get build status to refresh. --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 470d485a..55ccd3d9 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,4 @@ -![Build status](https://brownsmeet.com/githubhook/vishaps-status.svg) +![Build status](https://brownsmeet.com/githubhook/vishaps-status) # Ѵishap Oberon From 6ae2f96d08a4d60ecfbcb89ca4a2384e2f7ba063 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 7 Nov 2019 20:20:08 +0400 Subject: [PATCH 179/241] Undecl var fix (#74) * fix like https://github.com/jtempl/ofront/commit/78036911d21636514f2ece6d9e9e74ecc8755f1e * OPT.DynArr to be precise * removed PromoteIntConstToLInt() function call * update of bootstrap sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 12 +++++++----- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 22 +++++++++++++++++----- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 6 +++--- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 12 +++++++----- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 22 +++++++++++++++++----- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 6 +++--- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 12 +++++++----- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 22 +++++++++++++++++----- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 6 +++--- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 12 +++++++----- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 22 +++++++++++++++++----- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 6 +++--- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 12 +++++++----- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 22 +++++++++++++++++----- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 6 +++--- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPC.Mod | 5 ++++- src/compiler/OPV.Mod | 10 +++++++++- 187 files changed, 323 insertions(+), 242 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 706e5dac..4f763604 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index af1b360f..646b2242 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 75963938..7b9ae370 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 6b75d2c9..492214b6 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index e01b30c1..08ff9fe0 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 1712292d..a01553d6 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 95defe4d..7eb1fed5 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 7fcd0339..1e66d12e 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 7132d67d..c06e7adf 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index ee9816a3..d716887b 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index eca13e1c..654ea008 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 9d950335..cfc69c4f 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1834,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size) void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) { + INT64 d; + d = dim; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } if (array->comp == 3) { OPC_CompleteIdent(obj); OPM_WriteString((CHAR*)"__len", 6); @@ -1841,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) OPM_WriteInt(dim); } } else { - while (dim > 0) { - array = array->BaseTyp; - dim -= 1; - } OPM_WriteInt(array->n); } } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index ed46a18d..14b85b47 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index c00ef3c0..16996b23 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index ed863d1c..a046228e 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index d6b5b011..df77049f 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index ebe70724..50bb8039 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index e535af0d..67f0d84a 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 0aae61b1..edbf5767 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 6dfd6a9f..1386ae18 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 4bdb3a41..578e9629 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index b6969178..789619eb 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -317,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp static void OPV_Len (OPT_Node n, INT64 dim) { + INT64 d; + OPT_Struct array = NIL; while ((n->class == 4 && n->typ->comp == 3)) { dim += 1; n = n->left; } if ((n->class == 3 && n->typ->comp == 3)) { - OPV_design(n->left, 10); - OPM_WriteString((CHAR*)"->len[", 7); - OPM_WriteInt(dim); - OPM_Write(']'); + d = dim; + array = n->typ; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } + if (array->comp == 3) { + OPV_design(n->left, 10); + OPM_WriteString((CHAR*)"->len[", 7); + OPM_WriteInt(dim); + OPM_Write(']'); + } else { + OPM_WriteInt(array->n); + } } else { OPC_Len(n->obj, n->typ, dim); } diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 36e6ffa1..74a49d24 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index b37ac764..7d4c7d72 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index b328aba8..ba654cb8 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 2571cf00..8c32b583 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index cd5f8097..0cecb356 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 61d38fc6..2b8483b4 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index cf6fff34..270f7735 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 7d141b4d..864f4ace 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 7101e619..e3ff12c6 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 98d2ca37..ff6f352e 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index a70ae3ca..0fd08ee2 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 16cd0cf7..84ffc7ab 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index c8271316..3aafef64 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index e091956d..082bedeb 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("tcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index ad119444..0bc230e3 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 706e5dac..4f763604 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index af1b360f..646b2242 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 75963938..7b9ae370 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 6b75d2c9..492214b6 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index e01b30c1..08ff9fe0 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 1712292d..a01553d6 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 95defe4d..7eb1fed5 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 7fcd0339..1e66d12e 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 7132d67d..c06e7adf 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index ee9816a3..d716887b 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index eca13e1c..654ea008 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 9d950335..cfc69c4f 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1834,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size) void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) { + INT64 d; + d = dim; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } if (array->comp == 3) { OPC_CompleteIdent(obj); OPM_WriteString((CHAR*)"__len", 6); @@ -1841,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) OPM_WriteInt(dim); } } else { - while (dim > 0) { - array = array->BaseTyp; - dim -= 1; - } OPM_WriteInt(array->n); } } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index ed46a18d..14b85b47 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index c00ef3c0..16996b23 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index ed863d1c..a046228e 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index d6b5b011..df77049f 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index ebe70724..50bb8039 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index e535af0d..67f0d84a 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 0aae61b1..edbf5767 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index cb27a509..cf3ae87d 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 4bdb3a41..578e9629 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index b6969178..789619eb 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -317,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp static void OPV_Len (OPT_Node n, INT64 dim) { + INT64 d; + OPT_Struct array = NIL; while ((n->class == 4 && n->typ->comp == 3)) { dim += 1; n = n->left; } if ((n->class == 3 && n->typ->comp == 3)) { - OPV_design(n->left, 10); - OPM_WriteString((CHAR*)"->len[", 7); - OPM_WriteInt(dim); - OPM_Write(']'); + d = dim; + array = n->typ; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } + if (array->comp == 3) { + OPV_design(n->left, 10); + OPM_WriteString((CHAR*)"->len[", 7); + OPM_WriteInt(dim); + OPM_Write(']'); + } else { + OPM_WriteInt(array->n); + } } else { OPC_Len(n->obj, n->typ, dim); } diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 36e6ffa1..74a49d24 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index b37ac764..7d4c7d72 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index b328aba8..ba654cb8 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 2571cf00..8c32b583 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index cd5f8097..0cecb356 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 61d38fc6..2b8483b4 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index cf6fff34..270f7735 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 7d141b4d..864f4ace 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 7101e619..e3ff12c6 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index a43f9e79..628d68a4 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index f8efcd82..02f20def 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 16cd0cf7..84ffc7ab 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index c8271316..3aafef64 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index e091956d..082bedeb 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("tcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index ad119444..0bc230e3 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 706e5dac..4f763604 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index af1b360f..646b2242 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 75963938..7b9ae370 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 155e0a04..b07eb5ea 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index e594e82b..2606a167 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index e9555122..6ab94025 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index e09ec7a8..16458b6a 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index b5952131..282588f9 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 3a135985..ee462907 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index ee9816a3..d716887b 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index eca13e1c..654ea008 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 9d950335..cfc69c4f 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1834,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size) void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) { + INT64 d; + d = dim; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } if (array->comp == 3) { OPC_CompleteIdent(obj); OPM_WriteString((CHAR*)"__len", 6); @@ -1841,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) OPM_WriteInt(dim); } } else { - while (dim > 0) { - array = array->BaseTyp; - dim -= 1; - } OPM_WriteInt(array->n); } } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index ed46a18d..14b85b47 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index faa2b9d7..59ad4e17 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index ed863d1c..a046228e 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 814adb3c..79620fe3 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index ebe70724..50bb8039 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index e535af0d..67f0d84a 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 0aae61b1..edbf5767 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index b834bc38..861fad9e 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 4bdb3a41..578e9629 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 2f9f78c6..8681be7b 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -317,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp static void OPV_Len (OPT_Node n, INT64 dim) { + INT64 d; + OPT_Struct array = NIL; while ((n->class == 4 && n->typ->comp == 3)) { dim += 1; n = n->left; } if ((n->class == 3 && n->typ->comp == 3)) { - OPV_design(n->left, 10); - OPM_WriteString((CHAR*)"->len[", 7); - OPM_WriteInt(dim); - OPM_Write(']'); + d = dim; + array = n->typ; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } + if (array->comp == 3) { + OPV_design(n->left, 10); + OPM_WriteString((CHAR*)"->len[", 7); + OPM_WriteInt(dim); + OPM_Write(']'); + } else { + OPM_WriteInt(array->n); + } } else { OPC_Len(n->obj, n->typ, dim); } diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 36e6ffa1..74a49d24 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index b37ac764..7d4c7d72 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index b328aba8..ba654cb8 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 99fd71e3..636554ef 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 77e7eabf..efff0062 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 61d38fc6..2b8483b4 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index cf6fff34..270f7735 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 7d141b4d..864f4ace 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 7101e619..e3ff12c6 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index fadb3d3b..fad539ed 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 95d43066..04f1d40e 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 16cd0cf7..84ffc7ab 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index c8271316..3aafef64 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index e091956d..082bedeb 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("tcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index ad119444..0bc230e3 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 706e5dac..4f763604 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index af1b360f..646b2242 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 75963938..7b9ae370 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index b7204686..5edba307 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index d4f352c8..2ad2f341 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 1712292d..a01553d6 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 95defe4d..7eb1fed5 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 70e3c600..9708137f 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 7132d67d..c06e7adf 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index ee9816a3..d716887b 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index eca13e1c..654ea008 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 9d950335..cfc69c4f 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1834,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size) void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) { + INT64 d; + d = dim; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } if (array->comp == 3) { OPC_CompleteIdent(obj); OPM_WriteString((CHAR*)"__len", 6); @@ -1841,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) OPM_WriteInt(dim); } } else { - while (dim > 0) { - array = array->BaseTyp; - dim -= 1; - } OPM_WriteInt(array->n); } } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index ed46a18d..14b85b47 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index c00ef3c0..16996b23 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index ed863d1c..a046228e 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index d6b5b011..df77049f 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index ebe70724..50bb8039 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index e535af0d..67f0d84a 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 0aae61b1..edbf5767 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index cb27a509..cf3ae87d 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 4bdb3a41..578e9629 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index b6969178..789619eb 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -317,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp static void OPV_Len (OPT_Node n, INT64 dim) { + INT64 d; + OPT_Struct array = NIL; while ((n->class == 4 && n->typ->comp == 3)) { dim += 1; n = n->left; } if ((n->class == 3 && n->typ->comp == 3)) { - OPV_design(n->left, 10); - OPM_WriteString((CHAR*)"->len[", 7); - OPM_WriteInt(dim); - OPM_Write(']'); + d = dim; + array = n->typ; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } + if (array->comp == 3) { + OPV_design(n->left, 10); + OPM_WriteString((CHAR*)"->len[", 7); + OPM_WriteInt(dim); + OPM_Write(']'); + } else { + OPM_WriteInt(array->n); + } } else { OPC_Len(n->obj, n->typ, dim); } diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 36e6ffa1..74a49d24 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index d85cee6b..7fa3733e 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index b328aba8..ba654cb8 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 9de4c27b..f5c9fa99 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 02f3b4e1..c9296c98 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 61d38fc6..2b8483b4 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index cf6fff34..270f7735 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 7d141b4d..864f4ace 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 7101e619..e3ff12c6 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index a43f9e79..628d68a4 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index f8efcd82..02f20def 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 16cd0cf7..84ffc7ab 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index c8271316..3aafef64 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index e091956d..082bedeb 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("tcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index ad119444..0bc230e3 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 706e5dac..4f763604 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index af1b360f..646b2242 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 75963938..7b9ae370 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index e3a43ec3..32a88308 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 4f0adc88..3e47427c 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index e9555122..6ab94025 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index e09ec7a8..16458b6a 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 2432e8d7..ccefe599 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 3a135985..ee462907 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index ee9816a3..d716887b 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index eca13e1c..654ea008 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 9d950335..cfc69c4f 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1834,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size) void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) { + INT64 d; + d = dim; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } if (array->comp == 3) { OPC_CompleteIdent(obj); OPM_WriteString((CHAR*)"__len", 6); @@ -1841,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim) OPM_WriteInt(dim); } } else { - while (dim > 0) { - array = array->BaseTyp; - dim -= 1; - } OPM_WriteInt(array->n); } } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index ed46a18d..14b85b47 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index faa2b9d7..59ad4e17 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index ed863d1c..a046228e 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 814adb3c..79620fe3 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index ebe70724..50bb8039 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index e535af0d..67f0d84a 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 0aae61b1..edbf5767 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index b834bc38..861fad9e 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 4bdb3a41..578e9629 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 2f9f78c6..8681be7b 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -317,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp static void OPV_Len (OPT_Node n, INT64 dim) { + INT64 d; + OPT_Struct array = NIL; while ((n->class == 4 && n->typ->comp == 3)) { dim += 1; n = n->left; } if ((n->class == 3 && n->typ->comp == 3)) { - OPV_design(n->left, 10); - OPM_WriteString((CHAR*)"->len[", 7); - OPM_WriteInt(dim); - OPM_Write(']'); + d = dim; + array = n->typ; + while (d > 0) { + array = array->BaseTyp; + d -= 1; + } + if (array->comp == 3) { + OPV_design(n->left, 10); + OPM_WriteString((CHAR*)"->len[", 7); + OPM_WriteInt(dim); + OPM_Write(']'); + } else { + OPM_WriteInt(array->n); + } } else { OPC_Len(n->obj, n->typ, dim); } diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 36e6ffa1..74a49d24 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d85cee6b..7fa3733e 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index b328aba8..ba654cb8 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b6b5a74c..23cdc990 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 391a1d4d..75f561f0 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 61d38fc6..2b8483b4 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index cf6fff34..270f7735 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 7d141b4d..864f4ace 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 7101e619..e3ff12c6 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index fadb3d3b..fad539ed 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 95d43066..04f1d40e 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 16cd0cf7..84ffc7ab 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index c8271316..3aafef64 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index e091956d..082bedeb 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -72,7 +72,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) { - __COPY("tcc -g", s, s__len); + __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); @@ -102,7 +102,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { - Strings_Append((CHAR*)"", 1, (void*)cmd, 4096); + Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } Strings_Append((CHAR*)" -o ", 5, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index ad119444..0bc230e3 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/10/11]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index 43b86251..d1f9027a 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -1215,12 +1215,15 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) END IntLiteral; PROCEDURE Len* (obj: OPT.Object; array: OPT.Struct; dim: SYSTEM.INT64); + VAR + d: SYSTEM.INT64; BEGIN + d := dim; + WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; IF array^.comp = OPT.DynArr THEN CompleteIdent(obj); OPM.WriteString(LenExt); IF dim # 0 THEN OPM.WriteInt(dim) END ELSE (* array *) - WHILE dim > 0 DO array := array^.BaseTyp; DEC(dim) END; OPM.WriteInt(array.n) END END Len; diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 964f60e1..371d69d3 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -208,10 +208,18 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 PROCEDURE^ design(n: OPT.Node; prec: INTEGER); PROCEDURE Len(n: OPT.Node; dim: SYSTEM.INT64); + VAR + d: SYSTEM.INT64; array: OPT.Struct; BEGIN WHILE (n^.class = OPT.Nindex) & (n^.typ^.comp = OPT.DynArr(*26.7.2002*)) DO INC(dim); n := n^.left END ; IF (n^.class = OPT.Nderef) & (n^.typ^.comp = OPT.DynArr) THEN - design(n^.left, 10); OPM.WriteString("->len["); OPM.WriteInt(dim); OPM.Write("]") + d := dim; array := n^.typ; + WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; + IF array^.comp = OPT.DynArr THEN + design(n^.left, 10); OPM.WriteString("->len["); OPM.WriteInt(dim); OPM.Write("]") + ELSE + OPM.WriteInt(array^.n) + END ELSE OPC.Len(n^.obj, n^.typ, dim) END From 2ddbf5d5171ce4ddfcae51c87d68676d393971e3 Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Sat, 9 Nov 2019 11:32:03 +0000 Subject: [PATCH 180/241] Correct Args.argc to INTEGER rather than LONGINT --- src/library/v4/Args.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 src/library/v4/Args.Mod diff --git a/src/library/v4/Args.Mod b/src/library/v4/Args.Mod old mode 100644 new mode 100755 index 578ac7e5..c3621116 --- a/src/library/v4/Args.Mod +++ b/src/library/v4/Args.Mod @@ -10,7 +10,7 @@ MODULE Args; (* jt, 8.12.94 *) ArgVec = POINTER TO ARRAY 1024 OF ArgPtr; VAR - argc-: LONGINT; + argc-: INTEGER; argv-: SYSTEM.ADDRESS; From 7f4b284aef2bb2742875c2497c9832e60fc7ff87 Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Tue, 19 Nov 2019 15:53:20 +0000 Subject: [PATCH 181/241] Correct set size in component pascal compatability mode --- src/compiler/Compiler.Mod | 2 +- src/compiler/OPM.Mod | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/compiler/Compiler.Mod mode change 100644 => 100755 src/compiler/OPM.Mod diff --git a/src/compiler/Compiler.Mod b/src/compiler/Compiler.Mod old mode 100644 new mode 100755 index 6148fea2..5855a008 --- a/src/compiler/Compiler.Mod +++ b/src/compiler/Compiler.Mod @@ -66,7 +66,7 @@ MODULE Compiler; (* J. Templ 3.2.95 *) OPT.intobj.typ := OPT.inttyp; OPT.lintobj.typ := OPT.linttyp; - CASE OPM.LongintSize OF + CASE OPM.SetSize OF |4: OPT.settyp := OPT.set32typ ELSE OPT.settyp := OPT.set64typ END; diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod old mode 100644 new mode 100755 index 85392b15..ef6253d7 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -92,7 +92,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) GlobalAlignment, Alignment*: INTEGER; GlobalOptions*, Options*: SET; - ShortintSize*, IntegerSize*, LongintSize*: INTEGER; + ShortintSize*, IntegerSize*, LongintSize*, SetSize*: INTEGER; MaxIndex*: SYSTEM.INT64; @@ -328,10 +328,10 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) MaxIndex := SignedMaximum(AddressSize); CASE Model[0] OF - |'2': ShortintSize := 1; IntegerSize := 2; LongintSize := 4 - |'C': ShortintSize := 2; IntegerSize := 4; LongintSize := 8 - |'V': ShortintSize := 1; IntegerSize := 4; LongintSize := 8 - ELSE ShortintSize := 1; IntegerSize := 2; LongintSize := 4 + |'2': ShortintSize := 1; IntegerSize := 2; LongintSize := 4; SetSize := 4; + |'C': ShortintSize := 2; IntegerSize := 4; LongintSize := 8; SetSize := 4; + |'V': ShortintSize := 1; IntegerSize := 4; LongintSize := 8; SetSize := 8; + ELSE ShortintSize := 1; IntegerSize := 2; LongintSize := 4; SetSize := 4; END; (*IF verbose IN Options THEN VerboseListSizes END;*) From 63008f6d30747e9ceac13acb2631ac47dbc6729f Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Tue, 19 Nov 2019 19:45:23 +0000 Subject: [PATCH 182/241] Fix -OC set size in usage text --- src/compiler/OPM.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index ef6253d7..b64e1e94 100755 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -273,7 +273,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) LogWLn; LogWStr(" Size model for elementary types (default O2)"); LogWLn; LogWStr(" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET."); LogWLn; - LogWStr(" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET."); LogWLn; + LogWStr(" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT."); LogWLn; LogWStr(" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET."); LogWLn; LogWLn; LogWStr(" Target machine address size and alignment (default is that of the running compiler binary)"); LogWLn; From ff87e23780825b8c8e84fbe917ea36c7a30e7144 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sun, 29 Mar 2020 20:40:36 +0400 Subject: [PATCH 183/241] fixed ooc.C typesizes and made X11 examples compile. --- src/library/ooc/oocCILP32.Mod | 12 ++++++------ src/library/ooc/oocCLLP64.Mod | 14 +++++++------- src/library/ooc/oocCLP64.Mod | 14 +++++++------- src/test/x11/0/makefile | 4 ++-- src/test/x11/IFS/makefile | 5 ++--- src/test/x11/mines/makefile | 5 +++-- src/test/x11/pacman/makefile | 5 +++-- src/test/x11/tetris/Tetris.Mod | 2 +- src/test/x11/tetris/makefile | 5 +++-- src/test/x11/tron/makefile | 4 ++-- src/test/x11/vier/makefile | 5 +++-- 11 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/library/ooc/oocCILP32.Mod b/src/library/ooc/oocCILP32.Mod index e868b9f6..66a3cde1 100644 --- a/src/library/ooc/oocCILP32.Mod +++ b/src/library/ooc/oocCILP32.Mod @@ -31,13 +31,13 @@ Unix they should be fairly safe. TYPE char* = CHAR; (* 8 bits *) - signedchar* = SHORTINT; (* 8 bits *) - shortint* = RECORD a,b: SYSTEM.BYTE END; (* 16 bits *) - int* = LONGINT; (* 32 bits *) - set* = LONGINT; (* 32 bits *) - longint* = LONGINT; (* 32 bits on ILP32 (64 bits is 'long long') *) + signedchar* = SYSTEM.INT8; (* 8 bits *) + shortint* = SYSTEM.INT16; (* 16 bits *) + int* = SYSTEM.INT32; (* 32 bits *) + set* = SYSTEM.INT32; (* 32 bits *) + longint* = SYSTEM.INT32; (* 32 bits on ILP32 (64 bits is 'long long') *) (*longset* = SET; n/a *) (* 64 bit SET *) - address* = LONGINT; (* 32 bits *) + address* = SYSTEM.ADDRESS; (* 32 bits *) float* = REAL; (* 32 bits *) double* = LONGREAL; (* 64 bits *) diff --git a/src/library/ooc/oocCLLP64.Mod b/src/library/ooc/oocCLLP64.Mod index a7eadc0b..4b6add95 100644 --- a/src/library/ooc/oocCLLP64.Mod +++ b/src/library/ooc/oocCLLP64.Mod @@ -31,13 +31,13 @@ Unix they should be fairly safe. TYPE char* = CHAR; (* 8 bits *) - signedchar* = SHORTINT; (* 8 bits *) - shortint* = RECORD a,b: SYSTEM.BYTE END; (* 16 bits *) - int* = INTEGER; (* 32 bits *) - set* = INTEGER; (* 32 bits *) - longint* = INTEGER; (* 32 bits *) - longset* = SET; (* 64 bits *) - address* = LONGINT; (* 64 bits *) + signedchar* = SYSTEM.INT8; (* 8 bits *) + shortint* = SYSTEM.INT16; (* 16 bits *) + int* = SYSTEM.INT32; (* 32 bits *) + set* = SYSTEM.SET32; (* 32 bits *) + longint* = SYSTEM.INT32; (* 32 bits *) + longset* = SYSTEM.SET64; (* 64 bits *) + address* = SYSTEM.INT64; (* 64 bits *) float* = REAL; (* 32 bits *) double* = LONGREAL; (* 64 bits *) diff --git a/src/library/ooc/oocCLP64.Mod b/src/library/ooc/oocCLP64.Mod index dcc76584..0e97c566 100644 --- a/src/library/ooc/oocCLP64.Mod +++ b/src/library/ooc/oocCLP64.Mod @@ -31,13 +31,13 @@ Unix they should be fairly safe. TYPE char* = CHAR; (* 8 bits *) - signedchar* = SHORTINT; (* 8 bits *) - shortint* = RECORD a,b: SYSTEM.BYTE END; (* 16 bits *) - int* = INTEGER; (* 32 bits *) - set* = INTEGER; (* 32 bits *) - longint* = LONGINT; (* 64 bits *) - longset* = SET; (* 64 bits *) - address* = LONGINT; (* 64 bits *) + signedchar* = SYSTEM.INT8; (* 8 bits *) + shortint* = SYSTEM.INT16; (* 16 bits *) + int* = SYSTEM.INT32; (* 32 bits *) + set* = SYSTEM.INT32; (* 32 bits *) + longint* = SYSTEM.INT64; (* 64 bits *) + longset* = SYSTEM.SET64; (* 64 bits *) + address* = SYSTEM.ADDRESS; (* 64 bits *) float* = REAL; (* 32 bits *) double* = LONGREAL; (* 64 bits *) diff --git a/src/test/x11/0/makefile b/src/test/x11/0/makefile index 67bf3938..c9b9aa5a 100644 --- a/src/test/x11/0/makefile +++ b/src/test/x11/0/makefile @@ -1,12 +1,12 @@ #for old systems like RHEL4 use #CFLAGS=-L/usr/X11R6/lib -lX11 +MODX11="../../../library/oocX11" CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod test.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod test.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/IFS/makefile b/src/test/x11/IFS/makefile index eda916b9..0e36987d 100644 --- a/src/test/x11/IFS/makefile +++ b/src/test/x11/IFS/makefile @@ -1,11 +1,10 @@ CFLAGS=-lX11 export CFLAGS - -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod IFS.Mod IFStest.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod IFS.Mod IFStest.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/mines/makefile b/src/test/x11/mines/makefile index 02d5c8b4..f31fd926 100644 --- a/src/test/x11/mines/makefile +++ b/src/test/x11/mines/makefile @@ -3,11 +3,12 @@ CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" + VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod compatIn.Mod Linie.Mod Minesweeper.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod compatIn.Mod Linie.Mod Minesweeper.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/pacman/makefile b/src/test/x11/pacman/makefile index 018f29c7..a90df273 100644 --- a/src/test/x11/pacman/makefile +++ b/src/test/x11/pacman/makefile @@ -3,11 +3,12 @@ CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" + VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod Grafik.Mod PacMan.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod Grafik.Mod PacMan.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/tetris/Tetris.Mod b/src/test/x11/tetris/Tetris.Mod index a3468bd9..977d9ff4 100644 --- a/src/test/x11/tetris/Tetris.Mod +++ b/src/test/x11/tetris/Tetris.Mod @@ -5,7 +5,7 @@ MODULE Tetris; (* Neuerungen: Spielparameter sind ueber Konstantendeklariert, Zweispielermodus bricht bei Limit-Linien ab, Pause-Funktion wurde eingefuehrt *) -IMPORT X:=oocXYplane, L:=Linie, In := compatIn, Out := Console, RN:=ethRandomNumbers, Ziffer, Oberon := Kernel; +IMPORT X:=oocXYplane, L:=Linie, In := compatIn, Out := Console, RN:=ethRandomNumbers, Ziffer, Oberon; CONST diff --git a/src/test/x11/tetris/makefile b/src/test/x11/tetris/makefile index ae2c5119..e7c8a4b7 100644 --- a/src/test/x11/tetris/makefile +++ b/src/test/x11/tetris/makefile @@ -3,11 +3,12 @@ CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" + VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod compatIn.Mod Linie.Mod Ziffer.Mod Tetris.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod compatIn.Mod Linie.Mod Ziffer.Mod Tetris.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/tron/makefile b/src/test/x11/tron/makefile index be94ea28..48464d5e 100644 --- a/src/test/x11/tron/makefile +++ b/src/test/x11/tron/makefile @@ -3,11 +3,11 @@ CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod compatIn.Mod Tron.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod compatIn.Mod Tron.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 diff --git a/src/test/x11/vier/makefile b/src/test/x11/vier/makefile index 2c39f530..54d4ac35 100644 --- a/src/test/x11/vier/makefile +++ b/src/test/x11/vier/makefile @@ -3,11 +3,12 @@ CFLAGS=-lX11 export CFLAGS -MOD = MODULES="../../../lib/oocX11" +MODX11="../../../library/oocX11" + VOC = $(MOD) /opt/voc/bin/voc all: - $(VOC) -s oocX11.Mod oocXutil.Mod oocXYplane.Mod compatIn.Mod Ausgabe.Mod Vier.Mod -m + $(VOC) -s $(MODX11)/oocX11.Mod $(MODX11)/oocXutil.Mod $(MODX11)/oocXYplane.Mod compatIn.Mod Ausgabe.Mod Vier.Mod -m #$(VOC) -Cm test.Mod #gcc -o test test.o -fPIC -g -I /opt/voc-1.0/src/lib/system/gcc/x86_64 -I /opt/voc-1.0/lib/voc/obj -lVishapOberon -L. -L/opt/voc-1.0/lib -lX11 From c9b56ea10e16c884720a68f5b2bb8c821049521d Mon Sep 17 00:00:00 2001 From: David C W Brown Date: Tue, 16 Jun 2020 18:12:30 +0100 Subject: [PATCH 184/241] Remove GC blocking IF test, add abstract comment to each compiler mod. --- src/compiler/OPB.Mod | 2 +- src/compiler/OPP.Mod | 1 + src/compiler/OPS.Mod | 1 + src/compiler/OPT.Mod | 1 + src/compiler/OPV.Mod | 1 + src/runtime/Heap.Mod | 59 ++++++++++++++++++++++++-------------------- 6 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/compiler/OPB.Mod b/src/compiler/OPB.Mod index 84085804..718d9b9e 100644 --- a/src/compiler/OPB.Mod +++ b/src/compiler/OPB.Mod @@ -1,5 +1,5 @@ +(* Oberon Portable build parse tree (front end) *) MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) -(* build parse tree *) IMPORT OPT, OPS, OPM, SYSTEM; diff --git a/src/compiler/OPP.Mod b/src/compiler/OPP.Mod index 2b9fb0b1..96117cad 100644 --- a/src/compiler/OPP.Mod +++ b/src/compiler/OPP.Mod @@ -1,3 +1,4 @@ +(* OPP - Oberon Portable Parser (front end) *) MODULE OPP; (* NW, RC 6.3.89 / 10.2.94 *) (* object model 4.12.93 *) IMPORT diff --git a/src/compiler/OPS.Mod b/src/compiler/OPS.Mod index 909cdee2..9cb59e37 100644 --- a/src/compiler/OPS.Mod +++ b/src/compiler/OPS.Mod @@ -1,3 +1,4 @@ +(* Oberon Portable Scanner (front end) *) MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) IMPORT OPM, SYSTEM; diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index 2641703e..758bb505 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -1,3 +1,4 @@ +(* OPT - Oberon Portable Symbol Table (front end) *) MODULE OPT; (* NW, RC 6.3.89 / 23.1.92 *) (* object model 24.2.94 *) (* diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 371d69d3..c6b26c05 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -1,3 +1,4 @@ +(* OPV - parse tree traverser (back end) *) MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 26.7.2002 jt bug fix OPS.in Len: wrong result if called for fixed OPT.Array diff --git a/src/runtime/Heap.Mod b/src/runtime/Heap.Mod index 885b4899..4c57fa3c 100644 --- a/src/runtime/Heap.Mod +++ b/src/runtime/Heap.Mod @@ -91,7 +91,7 @@ MODULE Heap; (* finalization candidates *) fin: FinNode; - (* garbage collector locking *) + (* garbage collector busy flag *) lockdepth: INTEGER; interrupted: BOOLEAN; @@ -549,6 +549,8 @@ MODULE Heap; END END MarkStack; + + PROCEDURE GC*(markStack: BOOLEAN); VAR m: Module; @@ -556,34 +558,37 @@ MODULE Heap; i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23: S.ADDRESS; cand: ARRAY 10000 OF S.ADDRESS; BEGIN - IF (lockdepth = 0) OR (lockdepth = 1) & ~markStack THEN - Lock(); - m := S.VAL(Module, modules); - WHILE m # NIL DO - IF m.enumPtrs # NIL THEN m.enumPtrs(MarkP) END; - m := m^.next + Lock(); + m := S.VAL(Module, modules); + WHILE m # NIL DO + IF m.enumPtrs # NIL THEN m.enumPtrs(MarkP) END; + m := m^.next + END; + IF markStack THEN + (* generate register pressure to force callee saved registers to memory; + may be simplified by inlining OS calls or processor specific instructions + *) + i0 := -100; i1 := -101; i2 := -102; i3 := -103; i4 := -104; i5 := -105; i6 := -106; i7 := -107; + i8 := 1; i9 := 2; i10 := 3; i11 := 4; i12 := 5; i13 := 6; i14 := 7; i15 := 8; + i16 := 9; i17 := 10; i18 := 11; i19 := 12; i20 := 13; i21 := 14; i22 := 15; i23 := 16; + LOOP + INC(i0, 1); INC(i1, 2); INC(i2, 3); INC(i3, 4); INC(i4, 5); INC(i5, 6); INC(i6, 7); INC(i7, 8); + INC(i8, 9); INC(i9, 10); INC(i10, 11); INC(i11, 12); INC(i12, 13); INC(i13, 14); INC(i14, 15); INC(i15, 16); + INC(i16, 17); INC(i17, 18); INC(i18, 19); INC(i19, 20); INC(i20, 21); INC(i21, 22); INC(i22, 23); INC(i23, 24); + IF (i0 = -99) & (i15 = 24) THEN (* True at first iteration *) + MarkStack(32, cand); EXIT + END END; - IF markStack THEN - (* generate register pressure to force callee saved registers to memory; - may be simplified by inlining OS calls or processor specific instructions - *) - i0 := -100; i1 := -101; i2 := -102; i3 := -103; i4 := -104; i5 := -105; i6 := -106; i7 := -107; - i8 := 1; i9 := 2; i10 := 3; i11 := 4; i12 := 5; i13 := 6; i14 := 7; i15 := 8; - i16 := 9; i17 := 10; i18 := 11; i19 := 12; i20 := 13; i21 := 14; i22 := 15; i23 := 16; - LOOP INC(i0, 1); INC(i1, 2); INC(i2, 3); INC(i3, 4); INC(i4, 5); INC(i5, 6); INC(i6, 7); INC(i7, 8); - INC(i8, 9); INC(i9, 10); INC(i10, 11); INC(i11, 12); INC(i12, 13); INC(i13, 14); INC(i14, 15); INC(i15, 16); - INC(i16, 17); INC(i17, 18); INC(i18, 19); INC(i19, 20); INC(i20, 21); INC(i21, 22); INC(i22, 23); INC(i23, 24); - IF (i0 = -99) & (i15 = 24) THEN MarkStack(32, cand); EXIT END - END; - IF i0 + i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + i10 + i11 + i12 + i13 + i14 + i15 - + i16 + i17 + i18 + i19 + i20 + i21 + i22 + i23 > 10000 THEN RETURN (* use all variables *) - END; + IF i0 + i1 + i2 + i3 + i4 + i5 + i6 + i7 (* use all variables *) + + i8 + i9 + i10 + i11 + i12 + i13 + i14 + i15 + + i16 + i17 + i18 + i19 + i20 + i21 + i22 + i23 > 10000 THEN (* Always false *) + RETURN END; - CheckFin; - Scan; - Finalize; - Unlock() - END + END; + CheckFin; + Scan; + Finalize; + Unlock() END GC; PROCEDURE RegisterFinalizer*(obj: S.PTR; finalize: Finalizer); From 3d62284b3221b877cb2a9e2c413056e7e719956b Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Mon, 27 Dec 2021 19:38:05 +0400 Subject: [PATCH 185/241] typo fix: oname should be ONAME https://github.com/vishaps/voc/issues/97 --- src/tools/make/oberon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 21068cba..dd1610bb 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -190,7 +190,7 @@ installable: uninstall: installable @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' rm -rf "$(INSTALLDIR)" - @sh src/tools/make/addlibrary.sh uninstall "$(INSTALLDIR)/lib" $(oname) + @sh src/tools/make/addlibrary.sh uninstall "$(INSTALLDIR)/lib" $(ONAME) # install: Use only after a successful full build. Installs the compiler From bc8adf76c1dd27fcf5e6d1e8300216e060d5ca6d Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Mon, 27 Dec 2021 19:52:27 +0400 Subject: [PATCH 186/241] fixes "memory past end of source var" warning, solution by @kekcleader; issue: https://github.com/vishaps/voc/issues/96 --- src/runtime/Files.Mod | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index 5ce79071..aede16c4 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -672,7 +672,15 @@ Especially Length would become fairly complex. PROCEDURE WriteSet* (VAR R: Rider; x: SET); VAR b: ARRAY 4 OF CHAR; i: LONGINT; - BEGIN i := SYSTEM.VAL(LONGINT, x); + y: SYSTEM.SET64; + BEGIN + IF SIZE(SET) = SIZE(INTEGER) THEN + i := SYSTEM.VAL(INTEGER, x); + ELSE + y := x; + i := SYSTEM.VAL(LONGINT, y); + END; + b[0] := CHR(i); b[1] := CHR(i DIV 100H); b[2] := CHR(i DIV 10000H); b[3] := CHR(i DIV 1000000H); WriteBytes(R, b, 4); END WriteSet; From 32ec67552f1bb5b154ba0a5f9327cb1b99981c50 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 15 Mar 2022 17:20:41 +0400 Subject: [PATCH 187/241] fix in ooc Strings modules to prevent index out of range error. --- src/library/ooc/oocStrings.Mod | 6 +++++- src/library/ooc2/ooc2Strings.Mod | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/library/ooc/oocStrings.Mod b/src/library/ooc/oocStrings.Mod index add23621..73315fa3 100644 --- a/src/library/ooc/oocStrings.Mod +++ b/src/library/ooc/oocStrings.Mod @@ -63,7 +63,11 @@ PROCEDURE Length* (stringVal: ARRAY OF CHAR): INTEGER; i: INTEGER; BEGIN i := 0; - WHILE (stringVal[i] # 0X) DO + (* note from noch: + original ooc code below, commented out, leads to + index out of range runtime error + WHILE (stringVal[i] # 0X) DO *) + WHILE ((i < LEN(stringVal)) & (stringVal[i] # 0X)) DO INC (i) END; RETURN i diff --git a/src/library/ooc2/ooc2Strings.Mod b/src/library/ooc2/ooc2Strings.Mod index a0ad4362..278f2663 100644 --- a/src/library/ooc2/ooc2Strings.Mod +++ b/src/library/ooc2/ooc2Strings.Mod @@ -59,7 +59,12 @@ PROCEDURE Length* (stringVal: ARRAY OF CHAR): INTEGER; i: INTEGER; BEGIN i := 0; - WHILE (stringVal[i] # 0X) DO + (* note from noch: + this original ooc code crashes with index out of range + because it doesn't expect a string which has no 0X character + so i had to change it + WHILE (stringVal[i] # 0X) DO *) + WHILE ((i < LEN(stringVal)) & (stringVal[i] # 0X)) DO INC (i) END; RETURN i From 590398b27ed70eedebf32b828dc321c12b403cf4 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 15 Mar 2022 17:23:17 +0400 Subject: [PATCH 188/241] update of bootstrap files. --- bootstrap/unix-44/Compiler.c | 4 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 6 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 142 +++++++++++++-------------- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 10 +- bootstrap/unix-44/OPM.h | 4 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 4 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 6 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 142 +++++++++++++-------------- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 10 +- bootstrap/unix-48/OPM.h | 4 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 4 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 6 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 142 +++++++++++++-------------- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 10 +- bootstrap/unix-88/OPM.h | 4 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 4 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 6 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 142 +++++++++++++-------------- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 10 +- bootstrap/windows-48/OPM.h | 4 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 4 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 6 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 142 +++++++++++++-------------- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 10 +- bootstrap/windows-88/OPM.h | 4 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- 185 files changed, 590 insertions(+), 570 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 4f763604..bd643b9a 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ static void Compiler_PropagateElementaryTypeSizes (void) OPT_sintobj->typ = OPT_sinttyp; OPT_intobj->typ = OPT_inttyp; OPT_lintobj->typ = OPT_linttyp; - switch (OPM_LongintSize) { + switch (OPM_SetSize) { case 4: OPT_settyp = OPT_set32typ; break; diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 646b2242..1c746b94 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 7b9ae370..1747f3ca 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 492214b6..821546e2 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -966,7 +966,9 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) { CHAR b[4]; INT32 i; - i = (INT32)x; + UINT64 y; + y = x; + i = __VAL(INT32, y); b[0] = __CHR(i); b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 08ff9fe0..8ba31015 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index a01553d6..c7957869 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -665,79 +665,77 @@ void Heap_GC (BOOLEAN markStack) Heap_Module m; INT32 i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23; INT32 cand[10000]; - if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) { - Heap_Lock(); - m = (Heap_Module)(ADDRESS)Heap_modules; - while (m != NIL) { - if (m->enumPtrs != NIL) { - (*m->enumPtrs)(Heap_MarkP); - } - m = m->next; + Heap_Lock(); + m = (Heap_Module)(ADDRESS)Heap_modules; + while (m != NIL) { + if (m->enumPtrs != NIL) { + (*m->enumPtrs)(Heap_MarkP); } - if (markStack) { - i0 = -100; - i1 = -101; - i2 = -102; - i3 = -103; - i4 = -104; - i5 = -105; - i6 = -106; - i7 = -107; - i8 = 1; - i9 = 2; - i10 = 3; - i11 = 4; - i12 = 5; - i13 = 6; - i14 = 7; - i15 = 8; - i16 = 9; - i17 = 10; - i18 = 11; - i19 = 12; - i20 = 13; - i21 = 14; - i22 = 15; - i23 = 16; - for (;;) { - i0 += 1; - i1 += 2; - i2 += 3; - i3 += 4; - i4 += 5; - i5 += 6; - i6 += 7; - i7 += 8; - i8 += 9; - i9 += 10; - i10 += 11; - i11 += 12; - i12 += 13; - i13 += 14; - i14 += 15; - i15 += 16; - i16 += 17; - i17 += 18; - i18 += 19; - i19 += 20; - i20 += 21; - i21 += 22; - i22 += 23; - i23 += 24; - if ((i0 == -99 && i15 == 24)) { - Heap_MarkStack(32, (void*)cand, 10000); - break; - } - } - if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { - return; - } - } - Heap_CheckFin(); - Heap_Scan(); - Heap_Finalize(); - Heap_Unlock(); + m = m->next; } + if (markStack) { + i0 = -100; + i1 = -101; + i2 = -102; + i3 = -103; + i4 = -104; + i5 = -105; + i6 = -106; + i7 = -107; + i8 = 1; + i9 = 2; + i10 = 3; + i11 = 4; + i12 = 5; + i13 = 6; + i14 = 7; + i15 = 8; + i16 = 9; + i17 = 10; + i18 = 11; + i19 = 12; + i20 = 13; + i21 = 14; + i22 = 15; + i23 = 16; + for (;;) { + i0 += 1; + i1 += 2; + i2 += 3; + i3 += 4; + i4 += 5; + i5 += 6; + i6 += 7; + i7 += 8; + i8 += 9; + i9 += 10; + i10 += 11; + i11 += 12; + i12 += 13; + i13 += 14; + i14 += 15; + i15 += 16; + i16 += 17; + i17 += 18; + i18 += 19; + i19 += 20; + i20 += 21; + i21 += 22; + i22 += 23; + i23 += 24; + if ((i0 == -99 && i15 == 24)) { + Heap_MarkStack(32, (void*)cand, 10000); + break; + } + } + if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { + return; + } + } + Heap_CheckFin(); + Heap_Scan(); + Heap_Finalize(); + Heap_Unlock(); } void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 7eb1fed5..385cd08c 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 1e66d12e..f1df9980 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index c06e7adf..74575f7f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index d716887b..46fc80da 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 654ea008..d409cbfd 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index cfc69c4f..dfeb1a84 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 14b85b47..4086dae5 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 16996b23..9c87c0c5 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,7 +27,7 @@ export INT16 OPM_AddressSize; static INT16 OPM_GlobalAlignment; export INT16 OPM_Alignment; export UINT32 OPM_GlobalOptions, OPM_Options; -export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; export INT64 OPM_MaxIndex; export LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; export BOOLEAN OPM_noerr; @@ -338,7 +338,7 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET.", 95); OPM_LogWLn(); - OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); + OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT.", 95); OPM_LogWLn(); OPM_LogWStr((CHAR*)" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); OPM_LogWLn(); @@ -410,21 +410,25 @@ void OPM_InitOptions (void) OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; case 'C': OPM_ShortintSize = 2; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 4; break; case 'V': OPM_ShortintSize = 1; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 8; break; default: OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index a046228e..8b0c7133 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -9,7 +9,7 @@ import CHAR OPM_Model[10]; import INT16 OPM_AddressSize, OPM_Alignment; import UINT32 OPM_GlobalOptions, OPM_Options; -import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; import INT64 OPM_MaxIndex; import LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; import BOOLEAN OPM_noerr; diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index df77049f..4226dd8b 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 50bb8039..a389b3d9 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 67f0d84a..4dd60bee 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index edbf5767..009b0baa 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 1386ae18..9284c006 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 578e9629..95bbf8b0 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 789619eb..3e6f92d5 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 74a49d24..ca2ef73d 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 7d4c7d72..6f5e342a 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index ba654cb8..7507a692 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 8c32b583..db6a8378 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 0cecb356..7ef51226 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 2b8483b4..c969b821 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 270f7735..b1b5513e 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 864f4ace..c0b1581b 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index e3ff12c6..e5750cb0 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index ff6f352e..c2e600fa 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 0fd08ee2..ea14161b 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 84ffc7ab..aad9af3b 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 3aafef64..a382735c 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 082bedeb..9ffffdd9 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 0bc230e3..403cdeff 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 4f763604..bd643b9a 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ static void Compiler_PropagateElementaryTypeSizes (void) OPT_sintobj->typ = OPT_sinttyp; OPT_intobj->typ = OPT_inttyp; OPT_lintobj->typ = OPT_linttyp; - switch (OPM_LongintSize) { + switch (OPM_SetSize) { case 4: OPT_settyp = OPT_set32typ; break; diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 646b2242..1c746b94 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 7b9ae370..1747f3ca 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 492214b6..821546e2 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -966,7 +966,9 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) { CHAR b[4]; INT32 i; - i = (INT32)x; + UINT64 y; + y = x; + i = __VAL(INT32, y); b[0] = __CHR(i); b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 08ff9fe0..8ba31015 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index a01553d6..c7957869 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -665,79 +665,77 @@ void Heap_GC (BOOLEAN markStack) Heap_Module m; INT32 i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23; INT32 cand[10000]; - if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) { - Heap_Lock(); - m = (Heap_Module)(ADDRESS)Heap_modules; - while (m != NIL) { - if (m->enumPtrs != NIL) { - (*m->enumPtrs)(Heap_MarkP); - } - m = m->next; + Heap_Lock(); + m = (Heap_Module)(ADDRESS)Heap_modules; + while (m != NIL) { + if (m->enumPtrs != NIL) { + (*m->enumPtrs)(Heap_MarkP); } - if (markStack) { - i0 = -100; - i1 = -101; - i2 = -102; - i3 = -103; - i4 = -104; - i5 = -105; - i6 = -106; - i7 = -107; - i8 = 1; - i9 = 2; - i10 = 3; - i11 = 4; - i12 = 5; - i13 = 6; - i14 = 7; - i15 = 8; - i16 = 9; - i17 = 10; - i18 = 11; - i19 = 12; - i20 = 13; - i21 = 14; - i22 = 15; - i23 = 16; - for (;;) { - i0 += 1; - i1 += 2; - i2 += 3; - i3 += 4; - i4 += 5; - i5 += 6; - i6 += 7; - i7 += 8; - i8 += 9; - i9 += 10; - i10 += 11; - i11 += 12; - i12 += 13; - i13 += 14; - i14 += 15; - i15 += 16; - i16 += 17; - i17 += 18; - i18 += 19; - i19 += 20; - i20 += 21; - i21 += 22; - i22 += 23; - i23 += 24; - if ((i0 == -99 && i15 == 24)) { - Heap_MarkStack(32, (void*)cand, 10000); - break; - } - } - if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { - return; - } - } - Heap_CheckFin(); - Heap_Scan(); - Heap_Finalize(); - Heap_Unlock(); + m = m->next; } + if (markStack) { + i0 = -100; + i1 = -101; + i2 = -102; + i3 = -103; + i4 = -104; + i5 = -105; + i6 = -106; + i7 = -107; + i8 = 1; + i9 = 2; + i10 = 3; + i11 = 4; + i12 = 5; + i13 = 6; + i14 = 7; + i15 = 8; + i16 = 9; + i17 = 10; + i18 = 11; + i19 = 12; + i20 = 13; + i21 = 14; + i22 = 15; + i23 = 16; + for (;;) { + i0 += 1; + i1 += 2; + i2 += 3; + i3 += 4; + i4 += 5; + i5 += 6; + i6 += 7; + i7 += 8; + i8 += 9; + i9 += 10; + i10 += 11; + i11 += 12; + i12 += 13; + i13 += 14; + i14 += 15; + i15 += 16; + i16 += 17; + i17 += 18; + i18 += 19; + i19 += 20; + i20 += 21; + i21 += 22; + i22 += 23; + i23 += 24; + if ((i0 == -99 && i15 == 24)) { + Heap_MarkStack(32, (void*)cand, 10000); + break; + } + } + if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { + return; + } + } + Heap_CheckFin(); + Heap_Scan(); + Heap_Finalize(); + Heap_Unlock(); } void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 7eb1fed5..385cd08c 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 1e66d12e..f1df9980 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index c06e7adf..74575f7f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index d716887b..46fc80da 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 654ea008..d409cbfd 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index cfc69c4f..dfeb1a84 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 14b85b47..4086dae5 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 16996b23..9c87c0c5 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,7 +27,7 @@ export INT16 OPM_AddressSize; static INT16 OPM_GlobalAlignment; export INT16 OPM_Alignment; export UINT32 OPM_GlobalOptions, OPM_Options; -export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; export INT64 OPM_MaxIndex; export LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; export BOOLEAN OPM_noerr; @@ -338,7 +338,7 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET.", 95); OPM_LogWLn(); - OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); + OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT.", 95); OPM_LogWLn(); OPM_LogWStr((CHAR*)" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); OPM_LogWLn(); @@ -410,21 +410,25 @@ void OPM_InitOptions (void) OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; case 'C': OPM_ShortintSize = 2; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 4; break; case 'V': OPM_ShortintSize = 1; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 8; break; default: OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index a046228e..8b0c7133 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -9,7 +9,7 @@ import CHAR OPM_Model[10]; import INT16 OPM_AddressSize, OPM_Alignment; import UINT32 OPM_GlobalOptions, OPM_Options; -import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; import INT64 OPM_MaxIndex; import LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; import BOOLEAN OPM_noerr; diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index df77049f..4226dd8b 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 50bb8039..a389b3d9 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 67f0d84a..4dd60bee 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index edbf5767..009b0baa 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index cf3ae87d..50f3065b 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 578e9629..95bbf8b0 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 789619eb..3e6f92d5 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 74a49d24..ca2ef73d 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 7d4c7d72..6f5e342a 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index ba654cb8..7507a692 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 8c32b583..db6a8378 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 0cecb356..7ef51226 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 2b8483b4..c969b821 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 270f7735..b1b5513e 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 864f4ace..c0b1581b 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index e3ff12c6..e5750cb0 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 628d68a4..fcd01a50 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 02f20def..443cb429 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 84ffc7ab..aad9af3b 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 3aafef64..a382735c 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 082bedeb..9ffffdd9 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 0bc230e3..403cdeff 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 4f763604..bd643b9a 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ static void Compiler_PropagateElementaryTypeSizes (void) OPT_sintobj->typ = OPT_sinttyp; OPT_intobj->typ = OPT_inttyp; OPT_lintobj->typ = OPT_linttyp; - switch (OPM_LongintSize) { + switch (OPM_SetSize) { case 4: OPT_settyp = OPT_set32typ; break; diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 646b2242..1c746b94 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 7b9ae370..1747f3ca 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index b07eb5ea..9a887e8f 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -966,7 +966,9 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) { CHAR b[4]; INT32 i; - i = (INT32)x; + UINT64 y; + y = x; + i = __VAL(INT32, y); b[0] = __CHR(i); b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 2606a167..23f65c21 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 6ab94025..5b01f160 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -665,79 +665,77 @@ void Heap_GC (BOOLEAN markStack) Heap_Module m; INT64 i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23; INT64 cand[10000]; - if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) { - Heap_Lock(); - m = (Heap_Module)(ADDRESS)Heap_modules; - while (m != NIL) { - if (m->enumPtrs != NIL) { - (*m->enumPtrs)(Heap_MarkP); - } - m = m->next; + Heap_Lock(); + m = (Heap_Module)(ADDRESS)Heap_modules; + while (m != NIL) { + if (m->enumPtrs != NIL) { + (*m->enumPtrs)(Heap_MarkP); } - if (markStack) { - i0 = -100; - i1 = -101; - i2 = -102; - i3 = -103; - i4 = -104; - i5 = -105; - i6 = -106; - i7 = -107; - i8 = 1; - i9 = 2; - i10 = 3; - i11 = 4; - i12 = 5; - i13 = 6; - i14 = 7; - i15 = 8; - i16 = 9; - i17 = 10; - i18 = 11; - i19 = 12; - i20 = 13; - i21 = 14; - i22 = 15; - i23 = 16; - for (;;) { - i0 += 1; - i1 += 2; - i2 += 3; - i3 += 4; - i4 += 5; - i5 += 6; - i6 += 7; - i7 += 8; - i8 += 9; - i9 += 10; - i10 += 11; - i11 += 12; - i12 += 13; - i13 += 14; - i14 += 15; - i15 += 16; - i16 += 17; - i17 += 18; - i18 += 19; - i19 += 20; - i20 += 21; - i21 += 22; - i22 += 23; - i23 += 24; - if ((i0 == -99 && i15 == 24)) { - Heap_MarkStack(32, (void*)cand, 10000); - break; - } - } - if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { - return; - } - } - Heap_CheckFin(); - Heap_Scan(); - Heap_Finalize(); - Heap_Unlock(); + m = m->next; } + if (markStack) { + i0 = -100; + i1 = -101; + i2 = -102; + i3 = -103; + i4 = -104; + i5 = -105; + i6 = -106; + i7 = -107; + i8 = 1; + i9 = 2; + i10 = 3; + i11 = 4; + i12 = 5; + i13 = 6; + i14 = 7; + i15 = 8; + i16 = 9; + i17 = 10; + i18 = 11; + i19 = 12; + i20 = 13; + i21 = 14; + i22 = 15; + i23 = 16; + for (;;) { + i0 += 1; + i1 += 2; + i2 += 3; + i3 += 4; + i4 += 5; + i5 += 6; + i6 += 7; + i7 += 8; + i8 += 9; + i9 += 10; + i10 += 11; + i11 += 12; + i12 += 13; + i13 += 14; + i14 += 15; + i15 += 16; + i16 += 17; + i17 += 18; + i18 += 19; + i19 += 20; + i20 += 21; + i21 += 22; + i22 += 23; + i23 += 24; + if ((i0 == -99 && i15 == 24)) { + Heap_MarkStack(32, (void*)cand, 10000); + break; + } + } + if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { + return; + } + } + Heap_CheckFin(); + Heap_Scan(); + Heap_Finalize(); + Heap_Unlock(); } void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 16458b6a..82b83e8c 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 282588f9..5f8012d2 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index ee462907..2d245d3b 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index d716887b..46fc80da 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 654ea008..d409cbfd 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index cfc69c4f..dfeb1a84 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 14b85b47..4086dae5 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 59ad4e17..716c199c 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,7 +27,7 @@ export INT16 OPM_AddressSize; static INT16 OPM_GlobalAlignment; export INT16 OPM_Alignment; export UINT32 OPM_GlobalOptions, OPM_Options; -export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; export INT64 OPM_MaxIndex; export LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; export BOOLEAN OPM_noerr; @@ -338,7 +338,7 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET.", 95); OPM_LogWLn(); - OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); + OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT.", 95); OPM_LogWLn(); OPM_LogWStr((CHAR*)" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); OPM_LogWLn(); @@ -410,21 +410,25 @@ void OPM_InitOptions (void) OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; case 'C': OPM_ShortintSize = 2; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 4; break; case 'V': OPM_ShortintSize = 1; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 8; break; default: OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index a046228e..8b0c7133 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -9,7 +9,7 @@ import CHAR OPM_Model[10]; import INT16 OPM_AddressSize, OPM_Alignment; import UINT32 OPM_GlobalOptions, OPM_Options; -import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; import INT64 OPM_MaxIndex; import LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; import BOOLEAN OPM_noerr; diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 79620fe3..5726dee1 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 50bb8039..a389b3d9 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 67f0d84a..4dd60bee 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index edbf5767..009b0baa 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 861fad9e..cf98d97c 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 578e9629..95bbf8b0 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 8681be7b..14f83a4d 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 74a49d24..ca2ef73d 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 7d4c7d72..6f5e342a 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index ba654cb8..7507a692 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 636554ef..c56505b5 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index efff0062..53e6dedf 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 2b8483b4..c969b821 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 270f7735..b1b5513e 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 864f4ace..c0b1581b 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index e3ff12c6..e5750cb0 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index fad539ed..fb6f4a4c 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 04f1d40e..64bd272c 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 84ffc7ab..aad9af3b 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 3aafef64..a382735c 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 082bedeb..9ffffdd9 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 0bc230e3..403cdeff 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 4f763604..bd643b9a 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ static void Compiler_PropagateElementaryTypeSizes (void) OPT_sintobj->typ = OPT_sinttyp; OPT_intobj->typ = OPT_inttyp; OPT_lintobj->typ = OPT_linttyp; - switch (OPM_LongintSize) { + switch (OPM_SetSize) { case 4: OPT_settyp = OPT_set32typ; break; diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 646b2242..1c746b94 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 7b9ae370..1747f3ca 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 5edba307..7d838e6c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -966,7 +966,9 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) { CHAR b[4]; INT32 i; - i = (INT32)x; + UINT64 y; + y = x; + i = __VAL(INT32, y); b[0] = __CHR(i); b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 2ad2f341..b539610b 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index a01553d6..c7957869 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -665,79 +665,77 @@ void Heap_GC (BOOLEAN markStack) Heap_Module m; INT32 i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23; INT32 cand[10000]; - if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) { - Heap_Lock(); - m = (Heap_Module)(ADDRESS)Heap_modules; - while (m != NIL) { - if (m->enumPtrs != NIL) { - (*m->enumPtrs)(Heap_MarkP); - } - m = m->next; + Heap_Lock(); + m = (Heap_Module)(ADDRESS)Heap_modules; + while (m != NIL) { + if (m->enumPtrs != NIL) { + (*m->enumPtrs)(Heap_MarkP); } - if (markStack) { - i0 = -100; - i1 = -101; - i2 = -102; - i3 = -103; - i4 = -104; - i5 = -105; - i6 = -106; - i7 = -107; - i8 = 1; - i9 = 2; - i10 = 3; - i11 = 4; - i12 = 5; - i13 = 6; - i14 = 7; - i15 = 8; - i16 = 9; - i17 = 10; - i18 = 11; - i19 = 12; - i20 = 13; - i21 = 14; - i22 = 15; - i23 = 16; - for (;;) { - i0 += 1; - i1 += 2; - i2 += 3; - i3 += 4; - i4 += 5; - i5 += 6; - i6 += 7; - i7 += 8; - i8 += 9; - i9 += 10; - i10 += 11; - i11 += 12; - i12 += 13; - i13 += 14; - i14 += 15; - i15 += 16; - i16 += 17; - i17 += 18; - i18 += 19; - i19 += 20; - i20 += 21; - i21 += 22; - i22 += 23; - i23 += 24; - if ((i0 == -99 && i15 == 24)) { - Heap_MarkStack(32, (void*)cand, 10000); - break; - } - } - if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { - return; - } - } - Heap_CheckFin(); - Heap_Scan(); - Heap_Finalize(); - Heap_Unlock(); + m = m->next; } + if (markStack) { + i0 = -100; + i1 = -101; + i2 = -102; + i3 = -103; + i4 = -104; + i5 = -105; + i6 = -106; + i7 = -107; + i8 = 1; + i9 = 2; + i10 = 3; + i11 = 4; + i12 = 5; + i13 = 6; + i14 = 7; + i15 = 8; + i16 = 9; + i17 = 10; + i18 = 11; + i19 = 12; + i20 = 13; + i21 = 14; + i22 = 15; + i23 = 16; + for (;;) { + i0 += 1; + i1 += 2; + i2 += 3; + i3 += 4; + i4 += 5; + i5 += 6; + i6 += 7; + i7 += 8; + i8 += 9; + i9 += 10; + i10 += 11; + i11 += 12; + i12 += 13; + i13 += 14; + i14 += 15; + i15 += 16; + i16 += 17; + i17 += 18; + i18 += 19; + i19 += 20; + i20 += 21; + i21 += 22; + i22 += 23; + i23 += 24; + if ((i0 == -99 && i15 == 24)) { + Heap_MarkStack(32, (void*)cand, 10000); + break; + } + } + if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { + return; + } + } + Heap_CheckFin(); + Heap_Scan(); + Heap_Finalize(); + Heap_Unlock(); } void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 7eb1fed5..385cd08c 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 9708137f..c4f50e79 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index c06e7adf..74575f7f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index d716887b..46fc80da 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 654ea008..d409cbfd 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index cfc69c4f..dfeb1a84 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 14b85b47..4086dae5 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 16996b23..9c87c0c5 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,7 +27,7 @@ export INT16 OPM_AddressSize; static INT16 OPM_GlobalAlignment; export INT16 OPM_Alignment; export UINT32 OPM_GlobalOptions, OPM_Options; -export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; export INT64 OPM_MaxIndex; export LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; export BOOLEAN OPM_noerr; @@ -338,7 +338,7 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET.", 95); OPM_LogWLn(); - OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); + OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT.", 95); OPM_LogWLn(); OPM_LogWStr((CHAR*)" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); OPM_LogWLn(); @@ -410,21 +410,25 @@ void OPM_InitOptions (void) OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; case 'C': OPM_ShortintSize = 2; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 4; break; case 'V': OPM_ShortintSize = 1; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 8; break; default: OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index a046228e..8b0c7133 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -9,7 +9,7 @@ import CHAR OPM_Model[10]; import INT16 OPM_AddressSize, OPM_Alignment; import UINT32 OPM_GlobalOptions, OPM_Options; -import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; import INT64 OPM_MaxIndex; import LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; import BOOLEAN OPM_noerr; diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index df77049f..4226dd8b 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 50bb8039..a389b3d9 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 67f0d84a..4dd60bee 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index edbf5767..009b0baa 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index cf3ae87d..50f3065b 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 578e9629..95bbf8b0 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 789619eb..3e6f92d5 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 74a49d24..ca2ef73d 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 7fa3733e..c0b2adae 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index ba654cb8..7507a692 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index f5c9fa99..bc0d563b 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index c9296c98..49c44602 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 2b8483b4..c969b821 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 270f7735..b1b5513e 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 864f4ace..c0b1581b 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index e3ff12c6..e5750cb0 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 628d68a4..fcd01a50 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 02f20def..443cb429 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 84ffc7ab..aad9af3b 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 3aafef64..a382735c 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 082bedeb..9ffffdd9 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 0bc230e3..403cdeff 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 4f763604..bd643b9a 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 @@ -89,7 +89,7 @@ static void Compiler_PropagateElementaryTypeSizes (void) OPT_sintobj->typ = OPT_sinttyp; OPT_intobj->typ = OPT_inttyp; OPT_lintobj->typ = OPT_linttyp; - switch (OPM_LongintSize) { + switch (OPM_SetSize) { case 4: OPT_settyp = OPT_set32typ; break; diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 646b2242..1c746b94 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 7b9ae370..1747f3ca 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 32a88308..180b7cae 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -968,7 +968,9 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x) { CHAR b[4]; INT32 i; - i = (INT32)x; + UINT64 y; + y = x; + i = __VAL(INT32, y); b[0] = __CHR(i); b[1] = __CHR(__ASHR(i, 8)); b[2] = __CHR(__ASHR(i, 16)); diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 3e47427c..70e6cb03 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 6ab94025..5b01f160 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -665,79 +665,77 @@ void Heap_GC (BOOLEAN markStack) Heap_Module m; INT64 i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23; INT64 cand[10000]; - if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) { - Heap_Lock(); - m = (Heap_Module)(ADDRESS)Heap_modules; - while (m != NIL) { - if (m->enumPtrs != NIL) { - (*m->enumPtrs)(Heap_MarkP); - } - m = m->next; + Heap_Lock(); + m = (Heap_Module)(ADDRESS)Heap_modules; + while (m != NIL) { + if (m->enumPtrs != NIL) { + (*m->enumPtrs)(Heap_MarkP); } - if (markStack) { - i0 = -100; - i1 = -101; - i2 = -102; - i3 = -103; - i4 = -104; - i5 = -105; - i6 = -106; - i7 = -107; - i8 = 1; - i9 = 2; - i10 = 3; - i11 = 4; - i12 = 5; - i13 = 6; - i14 = 7; - i15 = 8; - i16 = 9; - i17 = 10; - i18 = 11; - i19 = 12; - i20 = 13; - i21 = 14; - i22 = 15; - i23 = 16; - for (;;) { - i0 += 1; - i1 += 2; - i2 += 3; - i3 += 4; - i4 += 5; - i5 += 6; - i6 += 7; - i7 += 8; - i8 += 9; - i9 += 10; - i10 += 11; - i11 += 12; - i12 += 13; - i13 += 14; - i14 += 15; - i15 += 16; - i16 += 17; - i17 += 18; - i18 += 19; - i19 += 20; - i20 += 21; - i21 += 22; - i22 += 23; - i23 += 24; - if ((i0 == -99 && i15 == 24)) { - Heap_MarkStack(32, (void*)cand, 10000); - break; - } - } - if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { - return; - } - } - Heap_CheckFin(); - Heap_Scan(); - Heap_Finalize(); - Heap_Unlock(); + m = m->next; } + if (markStack) { + i0 = -100; + i1 = -101; + i2 = -102; + i3 = -103; + i4 = -104; + i5 = -105; + i6 = -106; + i7 = -107; + i8 = 1; + i9 = 2; + i10 = 3; + i11 = 4; + i12 = 5; + i13 = 6; + i14 = 7; + i15 = 8; + i16 = 9; + i17 = 10; + i18 = 11; + i19 = 12; + i20 = 13; + i21 = 14; + i22 = 15; + i23 = 16; + for (;;) { + i0 += 1; + i1 += 2; + i2 += 3; + i3 += 4; + i4 += 5; + i5 += 6; + i6 += 7; + i7 += 8; + i8 += 9; + i9 += 10; + i10 += 11; + i11 += 12; + i12 += 13; + i13 += 14; + i14 += 15; + i15 += 16; + i16 += 17; + i17 += 18; + i18 += 19; + i19 += 20; + i20 += 21; + i21 += 22; + i22 += 23; + i23 += 24; + if ((i0 == -99 && i15 == 24)) { + Heap_MarkStack(32, (void*)cand, 10000); + break; + } + } + if (((((((((((((((((((((((i0 + i1) + i2) + i3) + i4) + i5) + i6) + i7) + i8) + i9) + i10) + i11) + i12) + i13) + i14) + i15) + i16) + i17) + i18) + i19) + i20) + i21) + i22) + i23 > 10000) { + return; + } + } + Heap_CheckFin(); + Heap_Scan(); + Heap_Finalize(); + Heap_Unlock(); } void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize) diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 16458b6a..82b83e8c 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index ccefe599..8daa2dfd 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index ee462907..2d245d3b 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index d716887b..46fc80da 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 654ea008..d409cbfd 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index cfc69c4f..dfeb1a84 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 14b85b47..4086dae5 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 59ad4e17..716c199c 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -27,7 +27,7 @@ export INT16 OPM_AddressSize; static INT16 OPM_GlobalAlignment; export INT16 OPM_Alignment; export UINT32 OPM_GlobalOptions, OPM_Options; -export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +export INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; export INT64 OPM_MaxIndex; export LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; export BOOLEAN OPM_noerr; @@ -338,7 +338,7 @@ BOOLEAN OPM_OpenPar (void) OPM_LogWLn(); OPM_LogWStr((CHAR*)" -O2 Original Oberon / Oberon-2: 8 bit SHORTINT, 16 bit INTEGER, 32 bit LONGINT and SET.", 95); OPM_LogWLn(); - OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); + OPM_LogWStr((CHAR*)" -OC Component Pascal: 16 bit SHORTINT, 32 bit INTEGER and SET, 64 bit LONGINT.", 95); OPM_LogWLn(); OPM_LogWStr((CHAR*)" -OV Alternate large model: 8 bit SHORTINT, 32 bit INTEGER, 64 bit LONGINT and SET.", 95); OPM_LogWLn(); @@ -410,21 +410,25 @@ void OPM_InitOptions (void) OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; case 'C': OPM_ShortintSize = 2; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 4; break; case 'V': OPM_ShortintSize = 1; OPM_IntegerSize = 4; OPM_LongintSize = 8; + OPM_SetSize = 8; break; default: OPM_ShortintSize = 1; OPM_IntegerSize = 2; OPM_LongintSize = 4; + OPM_SetSize = 4; break; } __MOVE(OPM_InstallDir, OPM_ResourceDir, 1024); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index a046228e..8b0c7133 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -9,7 +9,7 @@ import CHAR OPM_Model[10]; import INT16 OPM_AddressSize, OPM_Alignment; import UINT32 OPM_GlobalOptions, OPM_Options; -import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize; +import INT16 OPM_ShortintSize, OPM_IntegerSize, OPM_LongintSize, OPM_SetSize; import INT64 OPM_MaxIndex; import LONGREAL OPM_MinReal, OPM_MaxReal, OPM_MinLReal, OPM_MaxLReal; import BOOLEAN OPM_noerr; diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 79620fe3..5726dee1 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 50bb8039..a389b3d9 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 67f0d84a..4dd60bee 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index edbf5767..009b0baa 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 861fad9e..cf98d97c 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 578e9629..95bbf8b0 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 8681be7b..14f83a4d 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 74a49d24..ca2ef73d 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 7fa3733e..c0b2adae 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index ba654cb8..7507a692 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 23cdc990..27c077b9 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 75f561f0..1dc659c2 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 2b8483b4..c969b821 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 270f7735..b1b5513e 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 864f4ace..c0b1581b 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index e3ff12c6..e5750cb0 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index fad539ed..fb6f4a4c 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 04f1d40e..64bd272c 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 84ffc7ab..aad9af3b 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 3aafef64..a382735c 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 082bedeb..9ffffdd9 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 0bc230e3..403cdeff 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h From 9e3995d0ee5266d99b8c50d1077f34cee2e9380b Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 26 May 2022 01:29:02 +0400 Subject: [PATCH 189/241] added Reset() function to VT100 module. --- src/runtime/VT100.Mod | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/runtime/VT100.Mod b/src/runtime/VT100.Mod index 03cc1d2c..6687ed02 100644 --- a/src/runtime/VT100.Mod +++ b/src/runtime/VT100.Mod @@ -168,8 +168,15 @@ CONST END EscSeq2; - - + PROCEDURE Reset*; + VAR + cmd : ARRAY 6 OF CHAR; + BEGIN + COPY(Escape, cmd); + Strings.Append("c", cmd); + Out.String(cmd); + Out.Ln; + END Reset; (* Cursor up moves cursor n cells in the given direction. if the cursor is already at the edge of the screen, this has no effect *) From 7ca08f1ef100a8fb7f561111606c2e7932b2c4b8 Mon Sep 17 00:00:00 2001 From: Faraz Vahedi Date: Mon, 4 Jul 2022 16:31:45 +0000 Subject: [PATCH 190/241] Remove an unused import --- src/runtime/Texts.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/Texts.Mod b/src/runtime/Texts.Mod index 5b645fc4..aba83032 100644 --- a/src/runtime/Texts.Mod +++ b/src/runtime/Texts.Mod @@ -1,6 +1,6 @@ MODULE Texts; (** CAS/HM 23.9.93 -- interface based on Texts by JG/NW 6.12.91**) (* << RC, MB, JT *) IMPORT - Files, Modules, Reals, SYSTEM, Out; + Files, Modules, Reals, SYSTEM; (*--- insert field e: Elem into Texts.Scanner and change Texts.Scan to set it in case of class=6 *) From bd35c73c1f45decf2b5fc85b8539e03251e5d67c Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Wed, 26 Apr 2023 04:01:15 +0400 Subject: [PATCH 191/241] more changes for tcc --- ReadMe.md | 4 ++-- makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 55ccd3d9..575afbb0 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -6,7 +6,7 @@ implementation of the Oberon-2 language and libraries for use on conventional operating systems such as Linux, BSD, Android, Mac and Windows. -Vishap's Oberon Compiler (voc) uses a C backend (gcc, clang or msc) to compile +Vishap's Oberon Compiler (voc) uses a C backend (gcc, clang, tcc or msc) to compile Oberon programs under Unix, Mac or Windows. Vishap Oberon includes libraries from the Ulm, oo2c and Ofront Oberon compilers, as well as default libraries complying with the Oakwood Guidelines for Oberon-2 compilers. @@ -181,7 +181,7 @@ Most of the runtime in libVishapOberon is distributed under GPLv3 with runtime e Vishap Oberon supports 32 and 64 bit little-endian architectures including Intel x86 and x64, arm and ppc. -It compiles under gcc, clang and Microsoft Visual C. +It compiles under gcc, clang, tcc and Microsoft Visual C. Installation supports GNU/Linux, MAC OSX, BSD and Windows (native and cygwin). diff --git a/makefile b/makefile index 8186e175..2a8dc400 100644 --- a/makefile +++ b/makefile @@ -19,6 +19,7 @@ # # clang # gcc +# tcc # i686-w64-mingw32-gcc (32 bit cygwin only) # x86_64-w64-mingw32-gcc (64 bit cygwin only) # From b8d08c007a6d5e8f64d19368914ae238fd833e37 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 5 Oct 2023 16:54:37 +0400 Subject: [PATCH 192/241] additional opts should be on the left of other CFLAGS, this fixes linking to third party libraries issue on some operating systems including Ubuntu and Debian, probably older gcc 11 is to blame. Did not notice this problem on Gentoo, at least with gcc 13. --- src/compiler/extTools.Mod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 0c7acded..18890f79 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -44,12 +44,13 @@ BEGIN END execute; -PROCEDURE InitialiseCompilerCommand(VAR s: ARRAY OF CHAR); +PROCEDURE InitialiseCompilerCommand(VAR s: ARRAY OF CHAR; additionalopts: ARRAY OF CHAR); BEGIN COPY(Configuration.compile, s); Strings.Append(' -I "', s); Strings.Append(OPM.ResourceDir, s); Strings.Append('/include" ', s); + Strings.Append(additionalopts, s); Platform.GetEnv("CFLAGS", CFLAGS); Strings.Append (CFLAGS, s); Strings.Append (" ", s); @@ -60,7 +61,7 @@ PROCEDURE Assemble*(moduleName: ARRAY OF CHAR); VAR cmd: CommandString; BEGIN - InitialiseCompilerCommand(cmd); + InitialiseCompilerCommand(cmd, ""); Strings.Append("-c ", cmd); Strings.Append(moduleName, cmd); Strings.Append(".c", cmd); @@ -72,10 +73,9 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition VAR cmd: CommandString; BEGIN - InitialiseCompilerCommand(cmd); + InitialiseCompilerCommand(cmd, additionalopts); Strings.Append(moduleName, cmd); Strings.Append(".c ", cmd); - Strings.Append(additionalopts, cmd); IF statically THEN IF Configuration.os = "darwin" THEN Strings.Append(OPM.InstallDir, cmd); From c4213e333ac7bb5e3a93c687a3aa12450e3e8999 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 5 Oct 2023 17:00:23 +0400 Subject: [PATCH 193/241] small fix to build options, whitespace is necessary. --- src/compiler/extTools.Mod | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/extTools.Mod b/src/compiler/extTools.Mod index 18890f79..c51d8c4d 100644 --- a/src/compiler/extTools.Mod +++ b/src/compiler/extTools.Mod @@ -51,6 +51,7 @@ BEGIN Strings.Append(OPM.ResourceDir, s); Strings.Append('/include" ', s); Strings.Append(additionalopts, s); + Strings.Append(" ", s); Platform.GetEnv("CFLAGS", CFLAGS); Strings.Append (CFLAGS, s); Strings.Append (" ", s); From ff429202264de6825df1df2fa2f365a6e519b684 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 5 Oct 2023 17:03:30 +0400 Subject: [PATCH 194/241] =?UTF-8?q?gcc:=20warning:=20switch=20=E2=80=98-gs?= =?UTF-8?q?tabs=E2=80=99=20is=20no=20longer=20supported=20-=20removed=20it?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/confidence/testenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/confidence/testenv.sh b/src/test/confidence/testenv.sh index fdb13cc2..e0a157ee 100755 --- a/src/test/confidence/testenv.sh +++ b/src/test/confidence/testenv.sh @@ -17,5 +17,5 @@ rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename "$PWD") # NOTE: The cygwin 64 bit build has relocation errors with # these assembly generation options. if [ "$COMPILER" = "gcc" -a "$FLAVOUR" != "cygwin.LP64.gcc" ] -then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map" +then export CFLAGS="-g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map" fi From 5a93546143f5aae4e56bde271144ca78228db387 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Wed, 13 Dec 2023 15:56:49 +0400 Subject: [PATCH 195/241] insignificant readme and makefile changes. --- ReadMe.md | 10 ++++++---- makefile | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 575afbb0..933b0681 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -31,9 +31,11 @@ It is easy to install the Oberon compiler and libraries with the following simple steps: 1. Install pre-requisites such as git, gcc, static C libraries, diff utils. - 2. Clone the repository and run 'make full'. - 3. Optionally install to a system directory such as /opt or /usr/local/share with 'make install'. - 4. Set your PATH variable to include the compiler binary. + 2. Clone the repository: `git clone https://github.com/vishaps/voc`. + 3. Optionally `export CC=clang` or `export CC=tcc`. + 4. run `make full`. + 5. Optionally install to a system directory such as /opt or /usr/local/share with `make install` (might be with sudo). + 6. Set your PATH variable to include the compiler binary. These are detailed below: @@ -179,7 +181,7 @@ Most of the runtime in libVishapOberon is distributed under GPLv3 with runtime e ## Platform support and porting -Vishap Oberon supports 32 and 64 bit little-endian architectures including Intel x86 and x64, arm and ppc. +Vishap Oberon supports 32 and 64 bit little-endian architectures including Intel x86 and x86_64, 32 bit arm and aarch64. It compiles under gcc, clang, tcc and Microsoft Visual C. diff --git a/makefile b/makefile index 2a8dc400..5c0ee241 100644 --- a/makefile +++ b/makefile @@ -82,6 +82,8 @@ usage: @echo " make compiler - Build the compiler but not the library" @echo " make browsercmd - Build the symbol browser (showdef)" @echo " make library - Build all library files and make library" + @echo " make O2library - Build all library files with Oberon-2 type sizes" + @echo " make OClibrary - Build all library files with Component Pascal type sizes" @echo " make install - Install built compiler and library in /opt or C:\\PROGRAM FILES*" @echo " (Needs root access)" @echo "" From dfaf2d3622b57f155c70b9e668a0f09a0dd75d97 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sun, 14 Jan 2024 17:15:40 +0400 Subject: [PATCH 196/241] example on how to read commandline arguments with Texts. --- src/test/texts/argTexts.Mod | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/texts/argTexts.Mod diff --git a/src/test/texts/argTexts.Mod b/src/test/texts/argTexts.Mod new file mode 100644 index 00000000..644813d0 --- /dev/null +++ b/src/test/texts/argTexts.Mod @@ -0,0 +1,24 @@ +MODULE argTexts; (* example how to get arguments by using Texts module *) +IMPORT Texts, Oberon; + +VAR + S: Texts.Scanner; (* we'll read program arguments with it *) + + W : Texts.Writer; (* to write to console *) + T : Texts.Text; + +BEGIN + Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); + Texts.Scan(S); + (*Out.String(S.s); Out.Ln;*) + +Texts.OpenWriter (W); + +Texts.WriteString(W, "aaa"); +Texts.WriteLn(W); +Texts.WriteString(W, S.s); +Texts.WriteLn(W); +Texts.Append(Oberon.Log, W.buf); + + +END argTexts. From 75c155f8ecfb912e43be816a946928aae6847953 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 26 Jan 2024 02:20:24 +0400 Subject: [PATCH 197/241] md5 sum calculation example. --- src/test/md5/hello.txt | 1 + src/test/md5/md5test.Mod | 50 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/test/md5/hello.txt create mode 100644 src/test/md5/md5test.Mod diff --git a/src/test/md5/hello.txt b/src/test/md5/hello.txt new file mode 100644 index 00000000..980a0d5f --- /dev/null +++ b/src/test/md5/hello.txt @@ -0,0 +1 @@ +Hello World! diff --git a/src/test/md5/md5test.Mod b/src/test/md5/md5test.Mod new file mode 100644 index 00000000..d697d955 --- /dev/null +++ b/src/test/md5/md5test.Mod @@ -0,0 +1,50 @@ +MODULE md5test; + IMPORT MD5 := ethMD5, Out, Files, Strings; +PROCEDURE dump(VAR arr: ARRAY OF CHAR); +VAR + i: INTEGER; + ch: CHAR; +BEGIN + i := 0; + REPEAT + Out.String("arr["); Out.Int(i, 0); Out.String("]="); Out.Int(ORD(arr[i]), 0);Out.Ln; + INC(i) + UNTIL i = Strings.Length(arr)+2 +END dump; + +PROCEDURE main; + VAR + context: MD5.Context; + digest: MD5.Digest; + hexDigest: ARRAY 33 OF CHAR; + F: Files.File; + R: Files.Rider; + input: ARRAY 512 OF CHAR; + ch: CHAR; + i: INTEGER; +BEGIN + F := Files.Old("hello.txt"); + IF F # NIL THEN + Files.Set(R, F, 0); + i := 0; + REPEAT + Files.Read(R, ch); + input[i] := ch; + INC(i) + UNTIL R.eof; + dump(input); + END; + + context := MD5.New(); (* Initialize MD5 context *) + + MD5.WriteBytes(context, input, Strings.Length(input)); (* Process input string *) + MD5.Close(context, digest); (* Finalize and get digest *) + + MD5.ToString(digest, hexDigest); (* Convert digest to hex string *) + Out.String("MD5 Hash: "); Out.String(hexDigest); Out.Ln; +END main; + +BEGIN + main; +END md5test. + From e376e59f581b586a46b560148fcd877eff943843 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Wed, 21 Feb 2024 03:30:49 +0400 Subject: [PATCH 198/241] md5sum test will now work with binary files as well. --- src/test/md5/md5test.Mod | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/test/md5/md5test.Mod b/src/test/md5/md5test.Mod index d697d955..91885c0e 100644 --- a/src/test/md5/md5test.Mod +++ b/src/test/md5/md5test.Mod @@ -19,25 +19,30 @@ PROCEDURE main; hexDigest: ARRAY 33 OF CHAR; F: Files.File; R: Files.Rider; - input: ARRAY 512 OF CHAR; + input: POINTER TO ARRAY OF CHAR; + ilen: LONGINT; ch: CHAR; i: INTEGER; BEGIN - F := Files.Old("hello.txt"); + F := Files.Old("SETs.pdf"); IF F # NIL THEN Files.Set(R, F, 0); + ilen := Files.Length(F); + Out.String("file length is "); Out.Int(ilen, 0); Out.Ln; + NEW(input, ilen+1); i := 0; REPEAT Files.Read(R, ch); - input[i] := ch; + input^[i] := ch; INC(i) UNTIL R.eof; - dump(input); + (*dump(input^);*) END; context := MD5.New(); (* Initialize MD5 context *) - MD5.WriteBytes(context, input, Strings.Length(input)); (* Process input string *) + (*MD5.WriteBytes(context, input^, Strings.Length(input^));*) (* Process input string *) + MD5.WriteBytes(context, input^, LEN(input^)-1); (* Process input string *) MD5.Close(context, digest); (* Finalize and get digest *) MD5.ToString(digest, hexDigest); (* Convert digest to hex string *) From 85dff7734d3a4581f8e61c0d9e38cc8c51f40366 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 14 Mar 2024 18:01:26 +0400 Subject: [PATCH 199/241] wrapper function for compatibility with project oberon 13 sources. --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 8 +++++++- bootstrap/unix-44/Files.h | 3 ++- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 4 +--- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 13 ++++++++++++- bootstrap/unix-44/VT100.h | 3 ++- bootstrap/unix-44/extTools.c | 15 +++++++++------ bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 8 +++++++- bootstrap/unix-48/Files.h | 3 ++- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 4 +--- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 13 ++++++++++++- bootstrap/unix-48/VT100.h | 3 ++- bootstrap/unix-48/extTools.c | 15 +++++++++------ bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 8 +++++++- bootstrap/unix-88/Files.h | 3 ++- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 4 +--- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 13 ++++++++++++- bootstrap/unix-88/VT100.h | 3 ++- bootstrap/unix-88/extTools.c | 15 +++++++++------ bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 8 +++++++- bootstrap/windows-48/Files.h | 3 ++- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 4 +--- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 13 ++++++++++++- bootstrap/windows-48/VT100.h | 3 ++- bootstrap/windows-48/extTools.c | 15 +++++++++------ bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 8 +++++++- bootstrap/windows-88/Files.h | 3 ++- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 4 +--- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 13 ++++++++++++- bootstrap/windows-88/VT100.h | 3 ++- bootstrap/windows-88/extTools.c | 15 +++++++++------ bootstrap/windows-88/extTools.h | 2 +- src/runtime/Files.Mod | 8 +++++++- 186 files changed, 332 insertions(+), 226 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index bd643b9a..cfdeda93 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 1c746b94..b57b2c02 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 1747f3ca..ec6aa1fc 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 821546e2..036e1a9c 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -86,6 +86,7 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); @@ -634,6 +635,11 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } +void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) +{ + Files_Read(&*r, r__typ, &*x); +} + void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 8ba31015..9a2e9eb3 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h @@ -40,6 +40,7 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index c7957869..e39f5219 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 385cd08c..82af4503 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index f1df9980..3dfe0c57 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 74575f7f..0170d1e1 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 46fc80da..c44c18d2 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index d409cbfd..c6549fbd 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index dfeb1a84..d87c06e3 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 4086dae5..b200194e 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 9c87c0c5..2d1f5b46 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 8b0c7133..02653db0 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 4226dd8b..6a4c0e65 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index a389b3d9..a42e2381 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 4dd60bee..2e62a8d6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 009b0baa..ae65ff71 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 9284c006..81129027 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 95bbf8b0..3463d4bd 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 3e6f92d5..504b7c3c 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index ca2ef73d..23df5968 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 6f5e342a..80c4f532 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 7507a692..2b10d766 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index db6a8378..e3fe3c3d 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 7ef51226..e83a7ba7 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index c969b821..ca2a3bf6 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index b1b5513e..9584ffc9 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index c0b1581b..1039098d 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index e5750cb0..4e11cddd 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index c2e600fa..293287b0 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,6 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" -#include "Out.h" #include "Reals.h" typedef @@ -1810,7 +1809,6 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); - __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index ea14161b..436f475a 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index aad9af3b..2fb16a73 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,6 +34,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); +export void VT100_Reset (void); static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); @@ -136,6 +137,15 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) __DEL(letter); } +void VT100_Reset (void) +{ + CHAR cmd[6]; + __COPY("\033", cmd, 6); + Strings_Append((CHAR*)"c", 2, (void*)cmd, 6); + Out_String(cmd, 6); + Out_Ln(); +} + void VT100_CUU (INT16 n) { VT100_EscSeq(n, (CHAR*)"A", 2); @@ -256,6 +266,7 @@ export void *VT100__init(void) __REGCMD("DECTCEMh", VT100_DECTCEMh); __REGCMD("DECTCEMl", VT100_DECTCEMl); __REGCMD("RCP", VT100_RCP); + __REGCMD("Reset", VT100_Reset); __REGCMD("SCP", VT100_SCP); /* BEGIN */ __COPY("\033", VT100_CSI, 5); diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index a382735c..b9cd4c06 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h @@ -25,6 +25,7 @@ import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); +import void VT100_Reset (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 9ffffdd9..a8dee3f6 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len); export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); @@ -70,22 +70,26 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { + __DUP(additionalopts, additionalopts__len, CHAR); __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); + Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len); + Strings_Append((CHAR*)" ", 2, (void*)s, s__len); Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); + __DEL(additionalopts); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1); Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); @@ -97,10 +101,9 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati { extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 403cdeff..a6544ef7 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index bd643b9a..cfdeda93 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 1c746b94..b57b2c02 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 1747f3ca..ec6aa1fc 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 821546e2..036e1a9c 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -86,6 +86,7 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); @@ -634,6 +635,11 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } +void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) +{ + Files_Read(&*r, r__typ, &*x); +} + void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 8ba31015..9a2e9eb3 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h @@ -40,6 +40,7 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index c7957869..e39f5219 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 385cd08c..82af4503 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index f1df9980..3dfe0c57 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 74575f7f..0170d1e1 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 46fc80da..c44c18d2 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index d409cbfd..c6549fbd 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index dfeb1a84..d87c06e3 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 4086dae5..b200194e 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 9c87c0c5..2d1f5b46 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 8b0c7133..02653db0 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 4226dd8b..6a4c0e65 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index a389b3d9..a42e2381 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 4dd60bee..2e62a8d6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 009b0baa..ae65ff71 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 50f3065b..4f18f54c 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 95bbf8b0..3463d4bd 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 3e6f92d5..504b7c3c 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index ca2ef73d..23df5968 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 6f5e342a..80c4f532 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 7507a692..2b10d766 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index db6a8378..e3fe3c3d 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 7ef51226..e83a7ba7 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index c969b821..ca2a3bf6 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index b1b5513e..9584ffc9 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index c0b1581b..1039098d 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index e5750cb0..4e11cddd 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index fcd01a50..36e71a85 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,6 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" -#include "Out.h" #include "Reals.h" typedef @@ -1810,7 +1809,6 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); - __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 443cb429..74423529 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index aad9af3b..2fb16a73 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,6 +34,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); +export void VT100_Reset (void); static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); @@ -136,6 +137,15 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) __DEL(letter); } +void VT100_Reset (void) +{ + CHAR cmd[6]; + __COPY("\033", cmd, 6); + Strings_Append((CHAR*)"c", 2, (void*)cmd, 6); + Out_String(cmd, 6); + Out_Ln(); +} + void VT100_CUU (INT16 n) { VT100_EscSeq(n, (CHAR*)"A", 2); @@ -256,6 +266,7 @@ export void *VT100__init(void) __REGCMD("DECTCEMh", VT100_DECTCEMh); __REGCMD("DECTCEMl", VT100_DECTCEMl); __REGCMD("RCP", VT100_RCP); + __REGCMD("Reset", VT100_Reset); __REGCMD("SCP", VT100_SCP); /* BEGIN */ __COPY("\033", VT100_CSI, 5); diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index a382735c..b9cd4c06 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h @@ -25,6 +25,7 @@ import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); +import void VT100_Reset (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 9ffffdd9..a8dee3f6 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len); export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); @@ -70,22 +70,26 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { + __DUP(additionalopts, additionalopts__len, CHAR); __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); + Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len); + Strings_Append((CHAR*)" ", 2, (void*)s, s__len); Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); + __DEL(additionalopts); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1); Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); @@ -97,10 +101,9 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati { extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 403cdeff..a6544ef7 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index bd643b9a..cfdeda93 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 1c746b94..b57b2c02 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 1747f3ca..ec6aa1fc 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 9a887e8f..9adf424f 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -86,6 +86,7 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); @@ -634,6 +635,11 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } +void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) +{ + Files_Read(&*r, r__typ, &*x); +} + void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 23f65c21..7a91d8e6 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h @@ -41,6 +41,7 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 5b01f160..e2d137e1 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 82b83e8c..84a699c8 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 5f8012d2..c166b163 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 2d245d3b..1bc9e78a 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 46fc80da..c44c18d2 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index d409cbfd..c6549fbd 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index dfeb1a84..d87c06e3 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 4086dae5..b200194e 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 716c199c..e4f7f87b 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 8b0c7133..02653db0 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 5726dee1..cbdc3d68 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index a389b3d9..a42e2381 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 4dd60bee..2e62a8d6 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 009b0baa..ae65ff71 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index cf98d97c..e635696d 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 95bbf8b0..3463d4bd 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 14f83a4d..f719c048 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index ca2ef73d..23df5968 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 6f5e342a..80c4f532 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 7507a692..2b10d766 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index c56505b5..fd7c0838 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 53e6dedf..cb0cb468 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index c969b821..ca2a3bf6 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index b1b5513e..9584ffc9 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index c0b1581b..1039098d 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index e5750cb0..4e11cddd 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index fb6f4a4c..a9561691 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,6 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" -#include "Out.h" #include "Reals.h" typedef @@ -1810,7 +1809,6 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); - __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 64bd272c..1fd381b6 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index aad9af3b..2fb16a73 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,6 +34,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); +export void VT100_Reset (void); static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); @@ -136,6 +137,15 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) __DEL(letter); } +void VT100_Reset (void) +{ + CHAR cmd[6]; + __COPY("\033", cmd, 6); + Strings_Append((CHAR*)"c", 2, (void*)cmd, 6); + Out_String(cmd, 6); + Out_Ln(); +} + void VT100_CUU (INT16 n) { VT100_EscSeq(n, (CHAR*)"A", 2); @@ -256,6 +266,7 @@ export void *VT100__init(void) __REGCMD("DECTCEMh", VT100_DECTCEMh); __REGCMD("DECTCEMl", VT100_DECTCEMl); __REGCMD("RCP", VT100_RCP); + __REGCMD("Reset", VT100_Reset); __REGCMD("SCP", VT100_SCP); /* BEGIN */ __COPY("\033", VT100_CSI, 5); diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index a382735c..b9cd4c06 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h @@ -25,6 +25,7 @@ import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); +import void VT100_Reset (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 9ffffdd9..a8dee3f6 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len); export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); @@ -70,22 +70,26 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { + __DUP(additionalopts, additionalopts__len, CHAR); __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); + Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len); + Strings_Append((CHAR*)" ", 2, (void*)s, s__len); Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); + __DEL(additionalopts); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1); Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); @@ -97,10 +101,9 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati { extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 403cdeff..a6544ef7 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index bd643b9a..cfdeda93 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 1c746b94..b57b2c02 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 1747f3ca..ec6aa1fc 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 7d838e6c..55944507 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -86,6 +86,7 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); @@ -634,6 +635,11 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } +void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) +{ + Files_Read(&*r, r__typ, &*x); +} + void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index b539610b..bf355af3 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h @@ -40,6 +40,7 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index c7957869..e39f5219 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 385cd08c..82af4503 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index c4f50e79..20b60394 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 74575f7f..0170d1e1 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 46fc80da..c44c18d2 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index d409cbfd..c6549fbd 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index dfeb1a84..d87c06e3 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 4086dae5..b200194e 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 9c87c0c5..2d1f5b46 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 8b0c7133..02653db0 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 4226dd8b..6a4c0e65 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index a389b3d9..a42e2381 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 4dd60bee..2e62a8d6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 009b0baa..ae65ff71 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 50f3065b..4f18f54c 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 95bbf8b0..3463d4bd 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 3e6f92d5..504b7c3c 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index ca2ef73d..23df5968 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index c0b2adae..a56aa994 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 7507a692..2b10d766 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index bc0d563b..b0582647 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 49c44602..13b13d69 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index c969b821..ca2a3bf6 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index b1b5513e..9584ffc9 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index c0b1581b..1039098d 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index e5750cb0..4e11cddd 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index fcd01a50..36e71a85 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,6 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" -#include "Out.h" #include "Reals.h" typedef @@ -1810,7 +1809,6 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); - __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 443cb429..74423529 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index aad9af3b..2fb16a73 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,6 +34,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); +export void VT100_Reset (void); static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); @@ -136,6 +137,15 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) __DEL(letter); } +void VT100_Reset (void) +{ + CHAR cmd[6]; + __COPY("\033", cmd, 6); + Strings_Append((CHAR*)"c", 2, (void*)cmd, 6); + Out_String(cmd, 6); + Out_Ln(); +} + void VT100_CUU (INT16 n) { VT100_EscSeq(n, (CHAR*)"A", 2); @@ -256,6 +266,7 @@ export void *VT100__init(void) __REGCMD("DECTCEMh", VT100_DECTCEMh); __REGCMD("DECTCEMl", VT100_DECTCEMl); __REGCMD("RCP", VT100_RCP); + __REGCMD("Reset", VT100_Reset); __REGCMD("SCP", VT100_SCP); /* BEGIN */ __COPY("\033", VT100_CSI, 5); diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index a382735c..b9cd4c06 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h @@ -25,6 +25,7 @@ import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); +import void VT100_Reset (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 9ffffdd9..a8dee3f6 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len); export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); @@ -70,22 +70,26 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { + __DUP(additionalopts, additionalopts__len, CHAR); __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); + Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len); + Strings_Append((CHAR*)" ", 2, (void*)s, s__len); Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); + __DEL(additionalopts); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1); Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); @@ -97,10 +101,9 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati { extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 403cdeff..a6544ef7 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index bd643b9a..cfdeda93 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 1c746b94..b57b2c02 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 1747f3ca..ec6aa1fc 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 180b7cae..550373db 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -87,6 +87,7 @@ export INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); export void Files_Purge (Files_File f); export void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +export void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); export void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); export void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); export void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); @@ -635,6 +636,11 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) } } +void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x) +{ + Files_Read(&*r, r__typ, &*x); +} + void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n) { INT32 xpos, min, restInBuf, offset; diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 70e6cb03..b35a824e 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h @@ -41,6 +41,7 @@ import INT32 Files_Pos (Files_Rider *r, ADDRESS *r__typ); import void Files_Purge (Files_File f); import void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN *x); +import void Files_ReadByte (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x); import void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x__len, INT32 n); import void Files_ReadInt (Files_Rider *R, ADDRESS *R__typ, INT16 *x); import void Files_ReadLInt (Files_Rider *R, ADDRESS *R__typ, INT32 *x); diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 5b01f160..e2d137e1 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 82b83e8c..84a699c8 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 8daa2dfd..6bb5ad88 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 2d245d3b..1bc9e78a 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 46fc80da..c44c18d2 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index d409cbfd..c6549fbd 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index dfeb1a84..d87c06e3 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 4086dae5..b200194e 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 716c199c..e4f7f87b 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 8b0c7133..02653db0 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 5726dee1..cbdc3d68 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index a389b3d9..a42e2381 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 4dd60bee..2e62a8d6 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 009b0baa..ae65ff71 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index cf98d97c..e635696d 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 95bbf8b0..3463d4bd 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 14f83a4d..f719c048 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index ca2ef73d..23df5968 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index c0b2adae..a56aa994 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 7507a692..2b10d766 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 27c077b9..298d2ec3 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 1dc659c2..fc5b76af 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index c969b821..ca2a3bf6 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index b1b5513e..9584ffc9 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index c0b1581b..1039098d 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index e5750cb0..4e11cddd 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index fb6f4a4c..a9561691 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -8,7 +8,6 @@ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" -#include "Out.h" #include "Reals.h" typedef @@ -1810,7 +1809,6 @@ export void *Texts__init(void) __DEFMOD; __MODULE_IMPORT(Files); __MODULE_IMPORT(Modules); - __MODULE_IMPORT(Out); __MODULE_IMPORT(Reals); __REGMOD("Texts", EnumPtrs); __INITYP(Texts_FontDesc, Texts_FontDesc, 0); diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 64bd272c..1fd381b6 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index aad9af3b..2fb16a73 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -34,6 +34,7 @@ static void VT100_EscSeqSwapped (INT16 n, CHAR *letter, ADDRESS letter__len); export void VT100_HVP (INT16 n, INT16 m); export void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); export void VT100_RCP (void); +export void VT100_Reset (void); static void VT100_Reverse0 (CHAR *str, ADDRESS str__len, INT16 start, INT16 end); export void VT100_SCP (void); export void VT100_SD (INT16 n); @@ -136,6 +137,15 @@ static void VT100_EscSeq2 (INT16 n, INT16 m, CHAR *letter, ADDRESS letter__len) __DEL(letter); } +void VT100_Reset (void) +{ + CHAR cmd[6]; + __COPY("\033", cmd, 6); + Strings_Append((CHAR*)"c", 2, (void*)cmd, 6); + Out_String(cmd, 6); + Out_Ln(); +} + void VT100_CUU (INT16 n) { VT100_EscSeq(n, (CHAR*)"A", 2); @@ -256,6 +266,7 @@ export void *VT100__init(void) __REGCMD("DECTCEMh", VT100_DECTCEMh); __REGCMD("DECTCEMl", VT100_DECTCEMl); __REGCMD("RCP", VT100_RCP); + __REGCMD("Reset", VT100_Reset); __REGCMD("SCP", VT100_SCP); /* BEGIN */ __COPY("\033", VT100_CSI, 5); diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index a382735c..b9cd4c06 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h @@ -25,6 +25,7 @@ import void VT100_EL (INT16 n); import void VT100_HVP (INT16 n, INT16 m); import void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len); import void VT100_RCP (void); +import void VT100_Reset (void); import void VT100_SCP (void); import void VT100_SD (INT16 n); import void VT100_SGR (INT16 n); diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 9ffffdd9..a8dee3f6 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -22,7 +22,7 @@ static extTools_CommandString extTools_CFLAGS; export void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len); -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len); +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len); export void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN statically, CHAR *additionalopts, ADDRESS additionalopts__len); static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRESS cmd__len); @@ -70,22 +70,26 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES __DEL(cmd); } -static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len) +static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { + __DUP(additionalopts, additionalopts__len, CHAR); __COPY("gcc -fPIC -g", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); + Strings_Append(additionalopts, additionalopts__len, (void*)s, s__len); + Strings_Append((CHAR*)" ", 2, (void*)s, s__len); Platform_GetEnv((CHAR*)"CFLAGS", 7, (void*)extTools_CFLAGS, 4096); Strings_Append(extTools_CFLAGS, 4096, (void*)s, s__len); Strings_Append((CHAR*)" ", 2, (void*)s, s__len); + __DEL(additionalopts); } void extTools_Assemble (CHAR *moduleName, ADDRESS moduleName__len) { extTools_CommandString cmd; __DUP(moduleName, moduleName__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, (CHAR*)"", 1); Strings_Append((CHAR*)"-c ", 4, (void*)cmd, 4096); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c", 3, (void*)cmd, 4096); @@ -97,10 +101,9 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati { extTools_CommandString cmd; __DUP(additionalopts, additionalopts__len, CHAR); - extTools_InitialiseCompilerCommand((void*)cmd, 4096); + extTools_InitialiseCompilerCommand((void*)cmd, 4096, additionalopts, additionalopts__len); Strings_Append(moduleName, moduleName__len, (void*)cmd, 4096); Strings_Append((CHAR*)".c ", 4, (void*)cmd, 4096); - Strings_Append(additionalopts, additionalopts__len, (void*)cmd, 4096); if (statically) { Strings_Append((CHAR*)" -static", 9, (void*)cmd, 4096); } diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 403cdeff..a6544ef7 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2022/03/15]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/runtime/Files.Mod b/src/runtime/Files.Mod index aede16c4..64236a7d 100644 --- a/src/runtime/Files.Mod +++ b/src/runtime/Files.Mod @@ -413,6 +413,12 @@ MODULE Files; (* J. Templ 1.12. 89/12.4.95 Oberon files mapped onto Unix files END END Read; + (* wrapper for compatibility with Project Oberon sources *) + PROCEDURE ReadByte*(VAR r: Rider; VAR x: SYSTEM.BYTE); + BEGIN + Read(r, x) + END ReadByte; + PROCEDURE ReadBytes* (VAR r: Rider; VAR x: ARRAY OF SYSTEM.BYTE; n: LONGINT); VAR xpos, min, restInBuf, offset: LONGINT; buf: Buffer; BEGIN @@ -673,7 +679,7 @@ Especially Length would become fairly complex. PROCEDURE WriteSet* (VAR R: Rider; x: SET); VAR b: ARRAY 4 OF CHAR; i: LONGINT; y: SYSTEM.SET64; - BEGIN + BEGIN IF SIZE(SET) = SIZE(INTEGER) THEN i := SYSTEM.VAL(INTEGER, x); ELSE From a7fe55d434a64fde14adee42210b3f9a0ccd64bf Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 21 Mar 2024 19:36:43 +0400 Subject: [PATCH 200/241] changed hardcoded test file name to the one which exists in current directory. --- src/test/md5/md5test.Mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/md5/md5test.Mod b/src/test/md5/md5test.Mod index 91885c0e..a6e685fb 100644 --- a/src/test/md5/md5test.Mod +++ b/src/test/md5/md5test.Mod @@ -24,7 +24,7 @@ PROCEDURE main; ch: CHAR; i: INTEGER; BEGIN - F := Files.Old("SETs.pdf"); + F := Files.Old("hello.txt"); IF F # NIL THEN Files.Set(R, F, 0); ilen := Files.Length(F); From 7ea99e20a008080df8e931331ce74ca52cedfa10 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 12 Apr 2024 21:52:25 +0400 Subject: [PATCH 201/241] fixed crash introduced in commit aed9134e9961145a40397e6b70833d307ae221a9 see comments in OPB.Mod --- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 3 ++- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 3 ++- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 3 ++- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 3 ++- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 3 ++- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- src/compiler/OPB.Mod | 19 +++++++++++++++++++ 186 files changed, 214 insertions(+), 190 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index cfdeda93..3b38d219 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index b57b2c02..c44f113b 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index ec6aa1fc..4f9fce60 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 036e1a9c..ab0385cd 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 9a2e9eb3..726cc299 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index e39f5219..4df7f428 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 82af4503..c61a7bb1 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 3dfe0c57..01900836 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 0170d1e1..38ed4ace 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index c44c18d2..b42be120 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1626,6 +1626,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (x == y) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { + OPB_err(113); } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index c6549fbd..1dc8ffc0 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index d87c06e3..0bb7bbfd 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index b200194e..a31dc547 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 2d1f5b46..a893a729 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 02653db0..af78b76f 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 6a4c0e65..7b311a12 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index a42e2381..8aae5cd9 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 2e62a8d6..b8fd3d66 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index ae65ff71..7e15fce3 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 81129027..21748d69 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 3463d4bd..3e653237 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 504b7c3c..e4792940 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 23df5968..ae5b7f69 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 80c4f532..900a2035 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 2b10d766..d4033209 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index e3fe3c3d..76e02daf 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index e83a7ba7..53d00242 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index ca2a3bf6..98cd4d23 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 9584ffc9..7720227f 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 1039098d..aa3d856b 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 4e11cddd..ecd78a84 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 293287b0..139cc693 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 436f475a..c3417d88 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 2fb16a73..e7bde10b 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index b9cd4c06..3d141927 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index a8dee3f6..49f9d0d8 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index a6544ef7..13fb27dd 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index cfdeda93..3b38d219 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index b57b2c02..c44f113b 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index ec6aa1fc..4f9fce60 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 036e1a9c..ab0385cd 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 9a2e9eb3..726cc299 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index e39f5219..4df7f428 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 82af4503..c61a7bb1 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 3dfe0c57..01900836 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 0170d1e1..38ed4ace 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index c44c18d2..b42be120 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1626,6 +1626,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (x == y) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { + OPB_err(113); } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index c6549fbd..1dc8ffc0 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index d87c06e3..0bb7bbfd 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index b200194e..a31dc547 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 2d1f5b46..a893a729 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 02653db0..af78b76f 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 6a4c0e65..7b311a12 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index a42e2381..8aae5cd9 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 2e62a8d6..b8fd3d66 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index ae65ff71..7e15fce3 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 4f18f54c..10c206cc 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 3463d4bd..3e653237 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 504b7c3c..e4792940 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 23df5968..ae5b7f69 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 80c4f532..900a2035 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 2b10d766..d4033209 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index e3fe3c3d..76e02daf 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index e83a7ba7..53d00242 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index ca2a3bf6..98cd4d23 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 9584ffc9..7720227f 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 1039098d..aa3d856b 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 4e11cddd..ecd78a84 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 36e71a85..64448cf9 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 74423529..5bf3762f 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 2fb16a73..e7bde10b 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index b9cd4c06..3d141927 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index a8dee3f6..49f9d0d8 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index a6544ef7..13fb27dd 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index cfdeda93..3b38d219 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index b57b2c02..c44f113b 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index ec6aa1fc..4f9fce60 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 9adf424f..9ac86c0b 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 7a91d8e6..8fb1b05c 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index e2d137e1..ed882a7f 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 84a699c8..77c7815a 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index c166b163..f6a42485 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 1bc9e78a..ecfe6a4f 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index c44c18d2..b42be120 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1626,6 +1626,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (x == y) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { + OPB_err(113); } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index c6549fbd..1dc8ffc0 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index d87c06e3..0bb7bbfd 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index b200194e..a31dc547 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index e4f7f87b..f25303f2 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 02653db0..af78b76f 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index cbdc3d68..a2aa3ed3 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index a42e2381..8aae5cd9 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 2e62a8d6..b8fd3d66 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index ae65ff71..7e15fce3 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index e635696d..10f74ed9 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 3463d4bd..3e653237 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f719c048..f1dd5a74 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 23df5968..ae5b7f69 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 80c4f532..900a2035 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 2b10d766..d4033209 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index fd7c0838..e59f3465 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index cb0cb468..f18addde 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index ca2a3bf6..98cd4d23 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 9584ffc9..7720227f 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 1039098d..aa3d856b 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 4e11cddd..ecd78a84 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index a9561691..cbaf0ead 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 1fd381b6..4a529d81 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 2fb16a73..e7bde10b 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index b9cd4c06..3d141927 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index a8dee3f6..49f9d0d8 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index a6544ef7..13fb27dd 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index cfdeda93..3b38d219 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index b57b2c02..c44f113b 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index ec6aa1fc..4f9fce60 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 55944507..c9924fe5 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index bf355af3..0eedbd67 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index e39f5219..4df7f428 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 82af4503..c61a7bb1 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 20b60394..a1725b7e 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 0170d1e1..38ed4ace 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index c44c18d2..b42be120 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1626,6 +1626,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (x == y) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { + OPB_err(113); } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index c6549fbd..1dc8ffc0 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index d87c06e3..0bb7bbfd 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index b200194e..a31dc547 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 2d1f5b46..a893a729 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 02653db0..af78b76f 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 6a4c0e65..7b311a12 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index a42e2381..8aae5cd9 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 2e62a8d6..b8fd3d66 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index ae65ff71..7e15fce3 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 4f18f54c..10c206cc 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 3463d4bd..3e653237 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 504b7c3c..e4792940 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 23df5968..ae5b7f69 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index a56aa994..6336cff6 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 2b10d766..d4033209 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index b0582647..82b21cb5 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 13b13d69..c2f0defe 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index ca2a3bf6..98cd4d23 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 9584ffc9..7720227f 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 1039098d..aa3d856b 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 4e11cddd..ecd78a84 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 36e71a85..64448cf9 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 74423529..5bf3762f 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 2fb16a73..e7bde10b 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index b9cd4c06..3d141927 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index a8dee3f6..49f9d0d8 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index a6544ef7..13fb27dd 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index cfdeda93..3b38d219 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index b57b2c02..c44f113b 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index ec6aa1fc..4f9fce60 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 550373db..4e274d67 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index b35a824e..0be7189d 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index e2d137e1..ed882a7f 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 84a699c8..77c7815a 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 6bb5ad88..53157142 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 1bc9e78a..ecfe6a4f 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index c44c18d2..b42be120 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -1626,6 +1626,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (x == y) { } else if ((((y->comp == 2 && y->BaseTyp == x->BaseTyp)) && y->n <= x->n)) { } else if ((y->comp == 3 && y->BaseTyp == x->BaseTyp)) { + OPB_err(113); } else if (x->BaseTyp == OPT_chartyp) { if (g == 8) { if (ynode->conval->intval2 > x->n) { diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index c6549fbd..1dc8ffc0 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index d87c06e3..0bb7bbfd 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index b200194e..a31dc547 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index e4f7f87b..f25303f2 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 02653db0..af78b76f 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index cbdc3d68..a2aa3ed3 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index a42e2381..8aae5cd9 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 2e62a8d6..b8fd3d66 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index ae65ff71..7e15fce3 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index e635696d..10f74ed9 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 3463d4bd..3e653237 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f719c048..f1dd5a74 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 23df5968..ae5b7f69 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index a56aa994..6336cff6 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 2b10d766..d4033209 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 298d2ec3..5da8bd9d 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index fc5b76af..17c80af3 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index ca2a3bf6..98cd4d23 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 9584ffc9..7720227f 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 1039098d..aa3d856b 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 4e11cddd..ecd78a84 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index a9561691..cbaf0ead 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 1fd381b6..4a529d81 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 2fb16a73..e7bde10b 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index b9cd4c06..3d141927 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index a8dee3f6..49f9d0d8 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index a6544ef7..13fb27dd 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/03/14]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/compiler/OPB.Mod b/src/compiler/OPB.Mod index 718d9b9e..3ff7fffc 100644 --- a/src/compiler/OPB.Mod +++ b/src/compiler/OPB.Mod @@ -893,6 +893,25 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) IF x = y THEN (* ok *) ELSIF (y.comp = OPT.Array) & (y.BaseTyp = x.BaseTyp) & (y.n <= x.n) THEN (* OK by Oberon-07/2013 *) ELSIF (y.comp = OPT.DynArr) & (y.BaseTyp = x.BaseTyp) THEN (* OK by Oberon-07/2013, length tested at runtime *) + err(113) + (* if no error issued the compiler will crash later + in OPC.CompleteIdent because NIL will be passed to it + from OPC.Len + which is called from OPV.stat + OPV.stat gets n: OPT.node + where both n^.left.obj and n^.right.obj are NIL. + n^.right.obj is then passed to OPC.Len + + at this point, in this ELSIF body + x^.comp = OPT.Array + x^.strobj.name= + y^.strobj is NIL already! + + it's interesting that OPT.InStruct functions + Sarr case is entered, but not Sdarr + + issuing error for now to eliminate compiler crash. + *) ELSIF x^.BaseTyp = OPT.chartyp THEN (* Assign to (static) ARRAY OF CHAR *) IF g = OPT.String THEN (*check length of string*) IF ynode^.conval^.intval2 > x^.n THEN err(114) END From 7fb61a066bca566966684737413c94c25d6ad258 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 13 Apr 2024 04:14:18 +0400 Subject: [PATCH 202/241] now "NIL access" error in Modules.Mod indeed works. --- bootstrap/SYSTEM.c | 43 +++++++++++++++++----------- bootstrap/SYSTEM.h | 5 +++- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- src/runtime/SYSTEM.c | 43 +++++++++++++++++----------- src/runtime/SYSTEM.h | 5 +++- 189 files changed, 250 insertions(+), 226 deletions(-) diff --git a/bootstrap/SYSTEM.c b/bootstrap/SYSTEM.c index a1b2cb14..2952bb66 100644 --- a/bootstrap/SYSTEM.c +++ b/bootstrap/SYSTEM.c @@ -151,53 +151,61 @@ SYSTEM_PTR SYSTEM_NEWARR(ADDRESS *typ, ADDRESS elemsz, int elemalgn, int nofdim, return x; } - - - typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler #ifndef _WIN32 + // Unix signal handling + SystemSignalHandler handler[10] = {0}; // Adjust the array size to include signal 11 - SystemSignalHandler handler[3] = {0}; - - // Provide signal handling for Unix based systems + void segfaultHandler(int signal) { + __HALT(-10); + } + // Revised signal handler to accommodate additional signals like SIGSEGV void signalHandler(int s) { - if (s >= 2 && s <= 4) handler[s-2](s); - // (Ignore other signals) + if ((s >= 2 && s <= 4) || s == 11) { // Include SIGSEGV (usually signal 11) + if (handler[s-2]) { + handler[s-2](s); + } + } + // Ignore other signals } void SystemSetHandler(int s, ADDRESS h) { - if (s >= 2 && s <= 4) { + if ((s >= 2 && s <= 4) || s == 11) { int needtosetsystemhandler = handler[s-2] == 0; handler[s-2] = (SystemSignalHandler)h; - if (needtosetsystemhandler) {signal(s, signalHandler);} + if (needtosetsystemhandler) { + signal(s, signalHandler); + } } } -#else + void setupAutomaticSegfaultHandler() { + SystemSetHandler(11, (ADDRESS)segfaultHandler); // Register handler for SIGSEGV + } - // Provides Windows callback handlers for signal-like scenarios +#else + // Windows system remains as is since Windows does not use SIGSEGV in the same way #include "WindowsWrapper.h" SystemSignalHandler SystemInterruptHandler = 0; - SystemSignalHandler SystemQuitHandler = 0; + SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { - SystemInterruptHandler(2); // SIGINT + SystemInterruptHandler(2); // SIGINT return TRUE; } - } else { // Close, logoff or shutdown + } else { if (SystemQuitHandler) { - SystemQuitHandler(3); // SIGQUIT + SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); @@ -216,3 +224,4 @@ typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler } #endif + diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 07c6fd10..68e2e335 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -265,7 +265,10 @@ extern void Heap_INCREF(); extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); -#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); +extern void setupAutomaticSegfaultHandler(); + +#define __INIT(argc, argv) static void *m; setupAutomaticSegfaultHandler(); Modules_Init(argc, (ADDRESS)&argv); + #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 3b38d219..6ed43e4c 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index c44f113b..412d61c7 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 4f9fce60..2d35c30b 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index ab0385cd..a52f7d8d 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 726cc299..cb58b0ac 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 4df7f428..1168b35e 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index c61a7bb1..dd4a854d 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 01900836..e1f64512 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 38ed4ace..7b03650b 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index b42be120..fde76c7f 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 1dc8ffc0..b2d8373a 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 0bb7bbfd..c955c25e 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index a31dc547..7292cc70 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index a893a729..4bedaffe 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index af78b76f..3768e484 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 7b311a12..6beda68c 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 8aae5cd9..3ae323c1 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index b8fd3d66..047e06b3 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 7e15fce3..1f88fb07 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 21748d69..c546c53d 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 3e653237..484abf7d 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index e4792940..30f58a60 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index ae5b7f69..139fcee4 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 900a2035..6a68a636 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index d4033209..3788e8db 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 76e02daf..3e4cef6a 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 53d00242..93fa209a 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 98cd4d23..9ee944a0 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 7720227f..38931e4d 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index aa3d856b..0c6b1c30 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index ecd78a84..5d12e02b 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 139cc693..957f87f3 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index c3417d88..89cee481 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index e7bde10b..73440da9 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 3d141927..62917b5a 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 49f9d0d8..5d56a636 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 13fb27dd..f93b0cab 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 3b38d219..6ed43e4c 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index c44f113b..412d61c7 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 4f9fce60..2d35c30b 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index ab0385cd..a52f7d8d 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 726cc299..cb58b0ac 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 4df7f428..1168b35e 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index c61a7bb1..dd4a854d 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 01900836..e1f64512 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 38ed4ace..7b03650b 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index b42be120..fde76c7f 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 1dc8ffc0..b2d8373a 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 0bb7bbfd..c955c25e 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index a31dc547..7292cc70 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index a893a729..4bedaffe 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index af78b76f..3768e484 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 7b311a12..6beda68c 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 8aae5cd9..3ae323c1 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index b8fd3d66..047e06b3 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 7e15fce3..1f88fb07 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 10c206cc..9eaae852 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 3e653237..484abf7d 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index e4792940..30f58a60 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index ae5b7f69..139fcee4 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 900a2035..6a68a636 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index d4033209..3788e8db 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 76e02daf..3e4cef6a 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 53d00242..93fa209a 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 98cd4d23..9ee944a0 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 7720227f..38931e4d 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index aa3d856b..0c6b1c30 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index ecd78a84..5d12e02b 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 64448cf9..a0a4c4af 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 5bf3762f..5e562845 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index e7bde10b..73440da9 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 3d141927..62917b5a 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 49f9d0d8..5d56a636 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 13fb27dd..f93b0cab 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 3b38d219..6ed43e4c 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index c44f113b..412d61c7 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 4f9fce60..2d35c30b 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 9ac86c0b..a2496e99 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 8fb1b05c..f4aff9ce 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index ed882a7f..f5e50be6 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 77c7815a..6c8b35e6 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index f6a42485..8db0dde1 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index ecfe6a4f..8f14d6de 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index b42be120..fde76c7f 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 1dc8ffc0..b2d8373a 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 0bb7bbfd..c955c25e 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index a31dc547..7292cc70 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index f25303f2..1c057aa5 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index af78b76f..3768e484 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index a2aa3ed3..049893b4 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 8aae5cd9..3ae323c1 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index b8fd3d66..047e06b3 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 7e15fce3..1f88fb07 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 10f74ed9..4ff8bb16 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 3e653237..484abf7d 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f1dd5a74..f0146564 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index ae5b7f69..139fcee4 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 900a2035..6a68a636 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index d4033209..3788e8db 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index e59f3465..6bafee5a 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index f18addde..2e63d516 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 98cd4d23..9ee944a0 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 7720227f..38931e4d 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index aa3d856b..0c6b1c30 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index ecd78a84..5d12e02b 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index cbaf0ead..6e34c257 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 4a529d81..a7c894bd 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index e7bde10b..73440da9 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 3d141927..62917b5a 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 49f9d0d8..5d56a636 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 13fb27dd..f93b0cab 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 3b38d219..6ed43e4c 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index c44f113b..412d61c7 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 4f9fce60..2d35c30b 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index c9924fe5..723046f3 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 0eedbd67..f30b79bd 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 4df7f428..1168b35e 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index c61a7bb1..dd4a854d 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index a1725b7e..018f1502 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 38ed4ace..7b03650b 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index b42be120..fde76c7f 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 1dc8ffc0..b2d8373a 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 0bb7bbfd..c955c25e 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index a31dc547..7292cc70 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index a893a729..4bedaffe 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index af78b76f..3768e484 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 7b311a12..6beda68c 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 8aae5cd9..3ae323c1 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index b8fd3d66..047e06b3 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 7e15fce3..1f88fb07 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 10c206cc..9eaae852 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 3e653237..484abf7d 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index e4792940..30f58a60 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index ae5b7f69..139fcee4 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 6336cff6..0e7bc573 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index d4033209..3788e8db 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 82b21cb5..ef701d09 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index c2f0defe..2b9706ac 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 98cd4d23..9ee944a0 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 7720227f..38931e4d 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index aa3d856b..0c6b1c30 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index ecd78a84..5d12e02b 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 64448cf9..a0a4c4af 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 5bf3762f..5e562845 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index e7bde10b..73440da9 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 3d141927..62917b5a 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 49f9d0d8..5d56a636 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 13fb27dd..f93b0cab 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 3b38d219..6ed43e4c 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index c44f113b..412d61c7 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 4f9fce60..2d35c30b 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 4e274d67..5e166225 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 0be7189d..09267a36 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index ed882a7f..f5e50be6 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 77c7815a..6c8b35e6 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 53157142..0d08cf59 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index ecfe6a4f..8f14d6de 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index b42be120..fde76c7f 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 1dc8ffc0..b2d8373a 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 0bb7bbfd..c955c25e 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index a31dc547..7292cc70 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index f25303f2..1c057aa5 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index af78b76f..3768e484 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index a2aa3ed3..049893b4 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 8aae5cd9..3ae323c1 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index b8fd3d66..047e06b3 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 7e15fce3..1f88fb07 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 10f74ed9..4ff8bb16 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 3e653237..484abf7d 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f1dd5a74..f0146564 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index ae5b7f69..139fcee4 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 6336cff6..0e7bc573 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index d4033209..3788e8db 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 5da8bd9d..57d0a77d 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 17c80af3..6a1a89ee 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 98cd4d23..9ee944a0 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 7720227f..38931e4d 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index aa3d856b..0c6b1c30 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index ecd78a84..5d12e02b 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index cbaf0ead..6e34c257 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 4a529d81..a7c894bd 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index e7bde10b..73440da9 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 3d141927..62917b5a 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 49f9d0d8..5d56a636 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 13fb27dd..f93b0cab 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/12]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/runtime/SYSTEM.c b/src/runtime/SYSTEM.c index a1b2cb14..2952bb66 100644 --- a/src/runtime/SYSTEM.c +++ b/src/runtime/SYSTEM.c @@ -151,53 +151,61 @@ SYSTEM_PTR SYSTEM_NEWARR(ADDRESS *typ, ADDRESS elemsz, int elemalgn, int nofdim, return x; } - - - typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler #ifndef _WIN32 + // Unix signal handling + SystemSignalHandler handler[10] = {0}; // Adjust the array size to include signal 11 - SystemSignalHandler handler[3] = {0}; - - // Provide signal handling for Unix based systems + void segfaultHandler(int signal) { + __HALT(-10); + } + // Revised signal handler to accommodate additional signals like SIGSEGV void signalHandler(int s) { - if (s >= 2 && s <= 4) handler[s-2](s); - // (Ignore other signals) + if ((s >= 2 && s <= 4) || s == 11) { // Include SIGSEGV (usually signal 11) + if (handler[s-2]) { + handler[s-2](s); + } + } + // Ignore other signals } void SystemSetHandler(int s, ADDRESS h) { - if (s >= 2 && s <= 4) { + if ((s >= 2 && s <= 4) || s == 11) { int needtosetsystemhandler = handler[s-2] == 0; handler[s-2] = (SystemSignalHandler)h; - if (needtosetsystemhandler) {signal(s, signalHandler);} + if (needtosetsystemhandler) { + signal(s, signalHandler); + } } } -#else + void setupAutomaticSegfaultHandler() { + SystemSetHandler(11, (ADDRESS)segfaultHandler); // Register handler for SIGSEGV + } - // Provides Windows callback handlers for signal-like scenarios +#else + // Windows system remains as is since Windows does not use SIGSEGV in the same way #include "WindowsWrapper.h" SystemSignalHandler SystemInterruptHandler = 0; - SystemSignalHandler SystemQuitHandler = 0; + SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { - SystemInterruptHandler(2); // SIGINT + SystemInterruptHandler(2); // SIGINT return TRUE; } - } else { // Close, logoff or shutdown + } else { if (SystemQuitHandler) { - SystemQuitHandler(3); // SIGQUIT + SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); @@ -216,3 +224,4 @@ typedef void (*SystemSignalHandler)(INT32); // = Platform_SignalHandler } #endif + diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index 07c6fd10..68e2e335 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -265,7 +265,10 @@ extern void Heap_INCREF(); extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); -#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); +extern void setupAutomaticSegfaultHandler(); + +#define __INIT(argc, argv) static void *m; setupAutomaticSegfaultHandler(); Modules_Init(argc, (ADDRESS)&argv); + #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 From e189882af813c40b662925801302825fe74a5b6c Mon Sep 17 00:00:00 2001 From: Antranig Vartanian Date: Sat, 11 May 2024 21:43:22 +0400 Subject: [PATCH 203/241] set language to Oberon --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitattributes b/.gitattributes index 08b0dbe0..0b277fd3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -34,3 +34,7 @@ *.Mod diff=pascal *.c diff=cpp *.h diff=cpp + +# Set the language to Oberon +*.Mod linguist-language=Oberon +*.mod linguist-language=Oberon From 8d2d479664a4b45c9fd93f268b3c53b2d97e8d68 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 23 Aug 2024 13:51:15 +0400 Subject: [PATCH 204/241] unix nil check won't prevent windows builds. --- bootstrap/SYSTEM.h | 6 ++++-- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 ++-- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 ++-- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 ++-- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 ++-- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 ++-- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- src/runtime/SYSTEM.h | 6 ++++-- 187 files changed, 198 insertions(+), 194 deletions(-) diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 68e2e335..2ecdc7f9 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -266,9 +266,11 @@ extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); extern void setupAutomaticSegfaultHandler(); - +#ifndef _WIN32 #define __INIT(argc, argv) static void *m; setupAutomaticSegfaultHandler(); Modules_Init(argc, (ADDRESS)&argv); - +#else +#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); +#endif #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 6ed43e4c..1807e545 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 412d61c7..fb7a8f35 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 2d35c30b..c8bae246 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index a52f7d8d..7ce57bc2 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index cb58b0ac..3622bbe7 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 1168b35e..df721094 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index dd4a854d..dbc11b6f 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index e1f64512..00137463 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 7b03650b..22468d7d 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index fde76c7f..4d4925c6 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index b2d8373a..cb41ad3d 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index c955c25e..dc9da7db 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 7292cc70..fd7ddb5e 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 4bedaffe..d2462ff6 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 3768e484..14ef9200 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 6beda68c..2bbed37b 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 3ae323c1..5980afc3 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 047e06b3..95456407 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 1f88fb07..f4851b8a 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index c546c53d..9e34302b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 484abf7d..d2f8d9fe 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 30f58a60..ecef063d 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 139fcee4..44652222 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index 6a68a636..d5a45e43 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index 3788e8db..a008c089 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 3e4cef6a..61463b51 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 93fa209a..89ce40d3 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 9ee944a0..f4cc31eb 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 38931e4d..04ff0d7c 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 0c6b1c30..629009fa 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 5d12e02b..6acdef43 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 957f87f3..369d0244 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 89cee481..3c805fbe 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index 73440da9..c5e8a3ba 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 62917b5a..94b7b846 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 5d56a636..cf90fa2a 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index f93b0cab..6b1b37eb 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 6ed43e4c..1807e545 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 412d61c7..fb7a8f35 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 2d35c30b..c8bae246 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index a52f7d8d..7ce57bc2 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index cb58b0ac..3622bbe7 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 1168b35e..df721094 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index dd4a854d..dbc11b6f 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index e1f64512..00137463 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 7b03650b..22468d7d 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index fde76c7f..4d4925c6 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index b2d8373a..cb41ad3d 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index c955c25e..dc9da7db 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 7292cc70..fd7ddb5e 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 4bedaffe..d2462ff6 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 3768e484..14ef9200 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 6beda68c..2bbed37b 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 3ae323c1..5980afc3 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 047e06b3..95456407 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 1f88fb07..f4851b8a 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 9eaae852..85b0ef1c 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 484abf7d..d2f8d9fe 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 30f58a60..ecef063d 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 139fcee4..44652222 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index 6a68a636..d5a45e43 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index 3788e8db..a008c089 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 3e4cef6a..61463b51 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 93fa209a..89ce40d3 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 9ee944a0..f4cc31eb 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 38931e4d..04ff0d7c 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 0c6b1c30..629009fa 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 5d12e02b..6acdef43 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index a0a4c4af..2b57b307 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 5e562845..75712cc1 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index 73440da9..c5e8a3ba 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 62917b5a..94b7b846 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 5d56a636..cf90fa2a 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index f93b0cab..6b1b37eb 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 6ed43e4c..1807e545 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 412d61c7..fb7a8f35 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 2d35c30b..c8bae246 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index a2496e99..940170c8 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index f4aff9ce..375065c6 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index f5e50be6..980fab89 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 6c8b35e6..e188739a 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 8db0dde1..011ac733 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 8f14d6de..34d0e538 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index fde76c7f..4d4925c6 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index b2d8373a..cb41ad3d 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index c955c25e..dc9da7db 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 7292cc70..fd7ddb5e 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 1c057aa5..f298d2d5 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 3768e484..14ef9200 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 049893b4..f98062ab 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 3ae323c1..5980afc3 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 047e06b3..95456407 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 1f88fb07..f4851b8a 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 4ff8bb16..3b837866 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 484abf7d..d2f8d9fe 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index f0146564..2535e861 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 139fcee4..44652222 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index 6a68a636..d5a45e43 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index 3788e8db..a008c089 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 6bafee5a..c545b975 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 2e63d516..c6cd7505 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 9ee944a0..f4cc31eb 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 38931e4d..04ff0d7c 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 0c6b1c30..629009fa 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 5d12e02b..6acdef43 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 6e34c257..291ccf2b 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index a7c894bd..56bb9359 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index 73440da9..c5e8a3ba 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 62917b5a..94b7b846 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 5d56a636..cf90fa2a 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index f93b0cab..6b1b37eb 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 6ed43e4c..1807e545 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 412d61c7..fb7a8f35 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 2d35c30b..c8bae246 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 723046f3..15dcd35d 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index f30b79bd..6d39b035 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 1168b35e..df721094 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index dd4a854d..dbc11b6f 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 018f1502..35b801dc 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 7b03650b..22468d7d 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index fde76c7f..4d4925c6 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index b2d8373a..cb41ad3d 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index c955c25e..dc9da7db 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 7292cc70..fd7ddb5e 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 4bedaffe..d2462ff6 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 3768e484..14ef9200 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 6beda68c..2bbed37b 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 3ae323c1..5980afc3 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 047e06b3..95456407 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 1f88fb07..f4851b8a 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 9eaae852..85b0ef1c 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 484abf7d..d2f8d9fe 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 30f58a60..ecef063d 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 139fcee4..44652222 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index 0e7bc573..d8b08478 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index 3788e8db..a008c089 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index ef701d09..e57cfbc4 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 2b9706ac..543943d3 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 9ee944a0..f4cc31eb 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 38931e4d..04ff0d7c 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 0c6b1c30..629009fa 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 5d12e02b..6acdef43 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index a0a4c4af..2b57b307 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 5e562845..75712cc1 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index 73440da9..c5e8a3ba 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 62917b5a..94b7b846 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 5d56a636..cf90fa2a 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index f93b0cab..6b1b37eb 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 6ed43e4c..1807e545 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 412d61c7..fb7a8f35 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 2d35c30b..c8bae246 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 5e166225..5412cd99 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 09267a36..2bbdcf3c 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index f5e50be6..980fab89 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 6c8b35e6..e188739a 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 0d08cf59..8617e065 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 8f14d6de..34d0e538 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index fde76c7f..4d4925c6 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index b2d8373a..cb41ad3d 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index c955c25e..dc9da7db 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 7292cc70..fd7ddb5e 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 1c057aa5..f298d2d5 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 3768e484..14ef9200 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 049893b4..f98062ab 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 3ae323c1..5980afc3 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 047e06b3..95456407 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 1f88fb07..f4851b8a 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 4ff8bb16..3b837866 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 484abf7d..d2f8d9fe 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index f0146564..2535e861 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 139fcee4..44652222 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index 0e7bc573..d8b08478 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index 3788e8db..a008c089 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 57d0a77d..358785ee 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 6a1a89ee..7bd26e48 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 9ee944a0..f4cc31eb 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 38931e4d..04ff0d7c 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 0c6b1c30..629009fa 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 5d12e02b..6acdef43 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 6e34c257..291ccf2b 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index a7c894bd..56bb9359 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index 73440da9..c5e8a3ba 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 62917b5a..94b7b846 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 5d56a636..cf90fa2a 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index f93b0cab..6b1b37eb 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/04/13]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index 68e2e335..2ecdc7f9 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -266,9 +266,11 @@ extern void Modules_Init(INT32 argc, ADDRESS argv); extern void Heap_FINALL(); extern void setupAutomaticSegfaultHandler(); - +#ifndef _WIN32 #define __INIT(argc, argv) static void *m; setupAutomaticSegfaultHandler(); Modules_Init(argc, (ADDRESS)&argv); - +#else +#define __INIT(argc, argv) static void *m; Modules_Init(argc, (ADDRESS)&argv); +#endif #define __REGMAIN(name, enum) m = Heap_REGMOD((CHAR*)name,enum) #define __FINI Heap_FINALL(); return 0 From 7d14452a51fd4d9c05018e8607a9e2147edc3e89 Mon Sep 17 00:00:00 2001 From: "T. Kurt Bond" Date: Fri, 17 Jan 2025 08:10:47 -0500 Subject: [PATCH 205/241] Don't try to uninstall the shared libraries unless the directory exists. Otherwise it fails on OpenBSD during the first installation with: ldconfig: /usr/local/sw/versions/voc/git/lib: No such file or directory --- src/tools/make/oberon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index dd1610bb..04d08af6 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -189,8 +189,8 @@ installable: uninstall: installable @printf '\nUninstalling from \"$(INSTALLDIR)\"\n' + @[ -d "$(INSTALLDIR)/lib" ] && sh src/tools/make/addlibrary.sh uninstall "$(INSTALLDIR)/lib" $(ONAME) || echo nolibdir, skipping rm -rf "$(INSTALLDIR)" - @sh src/tools/make/addlibrary.sh uninstall "$(INSTALLDIR)/lib" $(ONAME) # install: Use only after a successful full build. Installs the compiler From afe5a2d824ab1f180f0403c645c99851ee539662 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 21 Feb 2025 04:48:39 +0400 Subject: [PATCH 206/241] now test server can listen on any ipv4 address. --- src/compiler/OPV.Mod | 107 ++++++++++++++++++++++----------- src/test/server/s.Mod | 15 +++-- src/test/server/sockets.Mod | 115 ++++++++++++++++++------------------ 3 files changed, 141 insertions(+), 96 deletions(-) diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index c6b26c05..2239bfe3 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -6,7 +6,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 various promotion rules changed (long) => (LONGINT), xxxL avoided *) - IMPORT OPT, OPC, OPM, OPS, SYSTEM; + IMPORT OPT, OPC, OPM, OPS, VT100, Strings, SYSTEM; CONST UndefinedType = 0; (* named type not yet defined *) @@ -28,6 +28,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 GuardPtrFunc = "__GUARDP("; GuardRecFunc = "__GUARDR("; TypeFunc = "__TYPEOF("; + SetOfFunc = "__SETOF("; CopyFunc = "__COPY("; MoveFunc = "__MOVE("; GetFunc = "__GET("; @@ -44,7 +45,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 TYPE ExitInfo = RECORD level, label: INTEGER END ; - + tmpName = POINTER TO ARRAY 32 OF CHAR; VAR stamp: INTEGER; (* unique number for nested objects *) @@ -52,6 +53,20 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 exit: ExitInfo; (* to check if EXIT is simply a break *) nofExitLabels: INTEGER; + tempCounter: INTEGER; (* to generate unique temp names *) + + PROCEDURE uniqueTempName(): tmpName; + VAR + num: ARRAY 8 OF CHAR; + tempName: tmpName; + BEGIN + INC(tempCounter); + NEW(tempName); + COPY("_voc_tmp_", tempName^); + VT100.IntToStr(tempCounter, num); + Strings.Append(num, tempName^); + RETURN tempName; + END uniqueTempName; PROCEDURE Init*; BEGIN @@ -196,7 +211,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPT.bit, OPT.lsh, OPT.rot: RETURN 10 - ELSE OPM.LogWStr("unhandled case in OPV.Precedence OPT.Ndop, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.Precedence OPT.Ndop, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END; | OPT.Nupto: RETURN 10 | OPT.Ntype, @@ -214,13 +229,13 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 BEGIN WHILE (n^.class = OPT.Nindex) & (n^.typ^.comp = OPT.DynArr(*26.7.2002*)) DO INC(dim); n := n^.left END ; IF (n^.class = OPT.Nderef) & (n^.typ^.comp = OPT.DynArr) THEN - d := dim; array := n^.typ; - WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; - IF array^.comp = OPT.DynArr THEN + d := dim; array := n^.typ; + WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; + IF array^.comp = OPT.DynArr THEN design(n^.left, 10); OPM.WriteString("->len["); OPM.WriteInt(dim); OPM.Write("]") - ELSE + ELSE OPM.WriteInt(array^.n) - END + END ELSE OPC.Len(n^.obj, n^.typ, dim) END @@ -255,27 +270,39 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 END END SizeCast; - PROCEDURE Convert(n: OPT.Node; newtype: OPT.Struct; prec: INTEGER); - VAR from, to: INTEGER; - BEGIN from := n^.typ^.form; to := newtype.form; - IF to = OPT.Set THEN - IF from = OPT.Set THEN (* Sets of different size *) - SizeCast(n, newtype.size); - ELSE (* Set from integer *) - OPM.WriteString("__SETOF("); Entier(n, MinPrec); - OPM.WriteString(","); OPM.WriteInt(newtype.size*8); OPM.Write(CloseParen) - END - ELSIF to = OPT.Int THEN (* integers of different size *) +PROCEDURE Convert(n: OPT.Node; newtype: OPT.Struct; prec: INTEGER); +VAR + from, to: INTEGER; + tempName: tmpName; + tempIndex: INTEGER; (* New variable to manage temporary indexes *) +BEGIN + from := n^.typ^.form; + to := newtype.form; + + IF to = OPT.Set THEN + tempName := uniqueTempName(); + tempIndex := 0; (* Initialize temp index *) + OPM.WriteString("UINT32 "); OPM.WriteString(tempName^); OPM.WriteString(" = 0;"); (* Correctly initialize variable *) + OPM.WriteLn; + + IF from = OPT.Set THEN SizeCast(n, newtype.size); - ELSIF to = OPT.Char THEN - IF OPM.ranchk IN OPM.Options THEN OPM.WriteString("__CHR"); - IF SideEffects(n) THEN OPM.Write("F") END ; - OPM.Write(OpenParen); Entier(n, MinPrec); OPM.Write(CloseParen) - ELSE OPM.WriteString("(CHAR)"); Entier(n, 9) - END - ELSE expr(n, prec) + ELSE + OPM.WriteString(tempName^); OPM.WriteString(" = __SETOF("); + Entier(n, MinPrec); + OPM.WriteString(","); + OPM.WriteInt(newtype.size * 8); + OPM.WriteString(");"); + OPM.WriteLn; + OPM.WriteString("i |= "); OPM.WriteString(tempName^); OPM.WriteString(";"); (* Ensure 'i' is declared *) END - END Convert; + ELSIF to = OPT.Int THEN + SizeCast(n, newtype.size); + ELSE + expr(n, prec); + END +END Convert; + PROCEDURE TypeOf(n: OPT.Node); BEGIN @@ -576,7 +603,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 IF SideEffects(n) THEN OPM.WriteString("__MODF(") ELSE OPM.WriteString("__MOD(") END; - ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END ; expr(l, MinPrec); OPM.WriteString(Comma); @@ -622,10 +649,10 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 ELSE OPM.WriteString(" - ") END; | OPS.or: OPM.WriteString(" || "); - ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END; expr(r, exprPrec); - IF (subclass = OPS.and) OR ((form = OPT.Set) & ((subclass = OPS.times) OR (subclass = OPS.minus))) THEN OPM.Write(CloseParen) END; (* to silence clang warnings, -- noch*) + IF (subclass = OPS.and) OR ((form = OPT.Set) & ((subclass = OPS.times) OR (subclass = OPS.minus))) THEN OPM.Write(CloseParen) END; (* to silence clang warnings, -- noch*) END | OPT.Ncall: IF (l^.obj # NIL) & (l^.obj^.mode = OPT.TProc) THEN IF l^.subcl = OPT.super THEN proc := SuperProc(n) @@ -769,6 +796,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 PROCEDURE stat(n: OPT.Node; outerProc: OPT.Object); VAR proc: OPT.Object; saved: ExitInfo; l, r: OPT.Node; + tempName, tempVar: tmpName; BEGIN WHILE (n # NIL) & OPM.noerr DO OPM.errpos := OPM.Longint(n^.conval^.intval); @@ -833,9 +861,17 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 | OPT.incfn, OPT.decfn: expr(n^.left, MinPrec); OPC.Increment(n^.subcl = OPT.decfn); expr(n^.right, MinPrec) | OPT.inclfn, - OPT.exclfn: expr(n^.left, MinPrec); OPC.SetInclude(n^.subcl = OPT.exclfn); - OPM.WriteString("__SETOF("); expr(n^.right, MinPrec); - OPM.WriteString(","); OPM.WriteInt(n.left.typ.size*8); OPM.Write(CloseParen) + OPT.exclfn: + tempName := uniqueTempName(); + OPM.WriteString("UINT32 "); OPM.WriteString(tempName^); OPM.WriteString(";"); + OPM.WriteLn; + + OPM.WriteString(tempName^); OPM.WriteString(" = __SETOF("); + expr(n^.right, MinPrec); + OPM.WriteString(","); OPM.WriteInt(n.left.typ.size * 8); + OPM.WriteString(");"); + OPM.WriteLn; + OPM.WriteString("i |= "); OPM.WriteString(tempName^); OPM.WriteString(";"); | OPT.copyfn: OPM.WriteString(CopyFunc); expr(n^.right, MinPrec); OPM.WriteString(Comma); expr(n^.left, MinPrec); OPM.WriteString(Comma); Len(n^.left, 0); OPM.Write(CloseParen) @@ -857,7 +893,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 design(n^.left, MinPrec); OPM.WriteString(", "); expr(n^.right, MinPrec); OPM.Write(")") - ELSE OPM.LogWStr("unhandled case in OPV.expr, n^.subcl = "); OPM.LogWNum(n^.subcl, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, n^.subcl = "); OPM.LogWNum(n^.subcl, 0); OPM.LogWLn; END | OPT.Ncall: IF (n^.left^.obj # NIL) & (n^.left^.obj^.mode = OPT.TProc) THEN IF n^.left^.subcl = OPT.super THEN proc := SuperProc(n) @@ -931,4 +967,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPC.GenBdy(prog^.right); stat(prog, NIL) END Module; +BEGIN + tempCounter := 0 + END OPV. diff --git a/src/test/server/s.Mod b/src/test/server/s.Mod index be04d59e..38a92496 100644 --- a/src/test/server/s.Mod +++ b/src/test/server/s.Mod @@ -4,7 +4,7 @@ IMPORT sockets, types, Out := Console, SYSTEM, Platform, Strings; PROCEDURE DoSmth(sock: Platform.FileHandle); -VAR +VAR str, aff: ARRAY 256 OF CHAR; n: LONGINT; BEGIN @@ -15,7 +15,7 @@ BEGIN ELSE str[n] := 0X; (* Make sure that received message is zero terminated *) Out.String("received message is "); Out.String(str); Out.Ln; - + IF Platform.Write(sock, SYSTEM.ADR(aff), Strings.Length(aff)) # 0 THEN Out.String("error writing to socket"); Out.Ln END; @@ -29,16 +29,17 @@ PROCEDURE -fork(): LONGINT "(LONGINT)fork()"; PROCEDURE serve; -CONST +CONST Port = 2055; MaxQueue = 5; -VAR +VAR sockfd: LONGINT; newsockfd: LONGINT; ServAddr: sockets.SockAddrIn; pid: LONGINT; res: Platform.ErrorCode; sockaddrlen: LONGINT; + ipAddr: LONGINT; ip: ARRAY 16 OF CHAR; BEGIN sockfd := sockets.Socket(sockets.AfInet, sockets.SockStream, 0); IF sockfd < 0 THEN @@ -47,15 +48,17 @@ BEGIN Out.String("socket created.") END; Out.Ln; + COPY("127.0.0.1", ip); + ipAddr := sockets.inetaddr(ip); - sockets.SetSockAddrIn(sockets.AfInet, Port, 0, ServAddr); + sockets.SetSockAddrIn(sockets.AfInet, Port, ipAddr, ServAddr); IF sockets.Bind(sockfd, SYSTEM.VAL(sockets.SockAddr, ServAddr), SIZE(sockets.SockAddr)) < 0 THEN Out.String("error on binding") ELSE Out.String("binding completed.") END; Out.Ln; - + IF sockets.Listen(sockfd, MaxQueue) # 0 THEN Out.String("listen() failed"); ELSE diff --git a/src/test/server/sockets.Mod b/src/test/server/sockets.Mod index 58ff3c24..ded7a61f 100644 --- a/src/test/server/sockets.Mod +++ b/src/test/server/sockets.Mod @@ -2,60 +2,60 @@ MODULE sockets; IMPORT SYSTEM, oocC; -CONST - SockStream* = 1; - SockDgram* = 2; - SockRaw* = 3; - SockRdm* = 4; - SockSeqpacket* = 5; - SockDccp* = 6; - SockPacket* = 10; - - AfUnscec* = 0; (* Unspecified. *) - AfLocal* = 1; (* Local to host (pipes and file-domain). *) - AfUnix* = 1; (* POSIX name for PF_LOCAL. *) - AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) - AfInet* = 2; (* IP protocol family. *) - AfAx25* = 3; (* Amateur Radio AX.25. *) - AfIpx* = 4; (* Novell Internet Protocol. *) - AfAppletalk* = 5; (* Appletalk DDP. *) - AfNetrom* = 6; (* Amateur radio NetROM. *) - AfBridge* = 7; (* Multiprotocol bridge. *) - AfAtmpvc* = 8; (* ATM PVCs. *) - AfX25* = 9; (* Reserved for X.25 project. *) - AfInet6* = 10; (* IP version 6. *) - AfRose* = 11; (* Amateur Radio X.25 PLP. *) - AfDecnet* = 12; (* Reserved for DECnet project. *) - AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) - AfSecurity* = 14; (* Security callback pseudo AF. *) - AfKey* = 15; (* PF_KEY key management API. *) - AfNetlink* = 16; - AfRoute* = 16; (* Alias to emulate 4.4BSD. *) - AfPacket = 17; (* Packet family. *) - AfAsh = 18; (* Ash. *) - AfEconet* = 19; (* Acorn Econet. *) - AfAtmsvc* = 20; (* ATM SVCs. *) - AfRds* = 21; (* RDS sockets. *) - AfSna = 22; (* Linux SNA Project *) - AfIrda* = 23; (* IRDA sockets. *) - AfPppox = 24; (* PPPoX sockets. *) - AfWanpipe* = 25; (* Wanpipe API sockets. *) - AfLlc* = 26; (* Linux LLC. *) - AfCan* = 29; (* Controller Area Network. *) - AfTipc* = 30; (* TIPC sockets. *) - AfBluetooth* = 31; (* Bluetooth sockets. *) - AfIucv* = 32; (* IUCV sockets. *) - AfRxrpc* = 33; (* RxRPC sockets. *) - AfIsdn* = 34; (* mISDN sockets. *) - AfPhonet* = 35; (* Phonet sockets. *) - AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) - AfCaif* = 37; (* CAIF sockets. *) - AfAlg* = 38; (* Algorithm sockets. *) - AfNfc* = 39; (* NFC sockets. *) - AfVsock* = 40; (* vSockets. *) - AfMax* = 41; (* For now.. *) - - InAddrAny* = 0; +CONST + SockStream* = 1; + SockDgram* = 2; + SockRaw* = 3; + SockRdm* = 4; + SockSeqpacket* = 5; + SockDccp* = 6; + SockPacket* = 10; + + AfUnscec* = 0; (* Unspecified. *) + AfLocal* = 1; (* Local to host (pipes and file-domain). *) + AfUnix* = 1; (* POSIX name for PF_LOCAL. *) + AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) + AfInet* = 2; (* IP protocol family. *) + AfAx25* = 3; (* Amateur Radio AX.25. *) + AfIpx* = 4; (* Novell Internet Protocol. *) + AfAppletalk* = 5; (* Appletalk DDP. *) + AfNetrom* = 6; (* Amateur radio NetROM. *) + AfBridge* = 7; (* Multiprotocol bridge. *) + AfAtmpvc* = 8; (* ATM PVCs. *) + AfX25* = 9; (* Reserved for X.25 project. *) + AfInet6* = 10; (* IP version 6. *) + AfRose* = 11; (* Amateur Radio X.25 PLP. *) + AfDecnet* = 12; (* Reserved for DECnet project. *) + AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) + AfSecurity* = 14; (* Security callback pseudo AF. *) + AfKey* = 15; (* PF_KEY key management API. *) + AfNetlink* = 16; + AfRoute* = 16; (* Alias to emulate 4.4BSD. *) + AfPacket = 17; (* Packet family. *) + AfAsh = 18; (* Ash. *) + AfEconet* = 19; (* Acorn Econet. *) + AfAtmsvc* = 20; (* ATM SVCs. *) + AfRds* = 21; (* RDS sockets. *) + AfSna = 22; (* Linux SNA Project *) + AfIrda* = 23; (* IRDA sockets. *) + AfPppox = 24; (* PPPoX sockets. *) + AfWanpipe* = 25; (* Wanpipe API sockets. *) + AfLlc* = 26; (* Linux LLC. *) + AfCan* = 29; (* Controller Area Network. *) + AfTipc* = 30; (* TIPC sockets. *) + AfBluetooth* = 31; (* Bluetooth sockets. *) + AfIucv* = 32; (* IUCV sockets. *) + AfRxrpc* = 33; (* RxRPC sockets. *) + AfIsdn* = 34; (* mISDN sockets. *) + AfPhonet* = 35; (* Phonet sockets. *) + AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) + AfCaif* = 37; (* CAIF sockets. *) + AfAlg* = 38; (* Algorithm sockets. *) + AfNfc* = 39; (* NFC sockets. *) + AfVsock* = 40; (* vSockets. *) + AfMax* = 41; (* For now.. *) + + InAddrAny* = 0; TYPE (* /usr/include/netinet/in.h *) @@ -70,13 +70,16 @@ TYPE SinZero*: ARRAY 8 OF CHAR; END; (* /usr/include/sys/socket.h *) - + SockAddr* = RECORD SaFamily*: oocC.shortint; SaData*: ARRAY 14 OF CHAR END; PROCEDURE -includesocket "#include "; + PROCEDURE -includeInet "#include "; + + PROCEDURE -inetaddr*(s: ARRAY OF CHAR): LONGINT "(LONGINT)inet_addr((char*)s)"; PROCEDURE -SetCShort(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = i"; @@ -84,7 +87,7 @@ TYPE PROCEDURE -SetCShortSwapped(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = ((i >> 8) & 0x00ff) | ((i << 8) & 0xff00)"; - PROCEDURE SetSockAddrIn*(family, port, inaddr: INTEGER; VAR sai: SockAddrIn); + PROCEDURE SetSockAddrIn*(family, port: INTEGER; inaddr: LONGINT; VAR sai: SockAddrIn); VAR i: INTEGER; BEGIN SetCShort(family, sai.SinFamily); From e36e862c8c030ebab6fdb31889623797d4d52215 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 21 Feb 2025 04:52:20 +0400 Subject: [PATCH 207/241] Revert "now test server can listen on any ipv4 address." This reverts commit afe5a2d824ab1f180f0403c645c99851ee539662. --- src/compiler/OPV.Mod | 107 +++++++++++---------------------- src/test/server/s.Mod | 15 ++--- src/test/server/sockets.Mod | 115 ++++++++++++++++++------------------ 3 files changed, 96 insertions(+), 141 deletions(-) diff --git a/src/compiler/OPV.Mod b/src/compiler/OPV.Mod index 2239bfe3..c6b26c05 100644 --- a/src/compiler/OPV.Mod +++ b/src/compiler/OPV.Mod @@ -6,7 +6,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 various promotion rules changed (long) => (LONGINT), xxxL avoided *) - IMPORT OPT, OPC, OPM, OPS, VT100, Strings, SYSTEM; + IMPORT OPT, OPC, OPM, OPS, SYSTEM; CONST UndefinedType = 0; (* named type not yet defined *) @@ -28,7 +28,6 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 GuardPtrFunc = "__GUARDP("; GuardRecFunc = "__GUARDR("; TypeFunc = "__TYPEOF("; - SetOfFunc = "__SETOF("; CopyFunc = "__COPY("; MoveFunc = "__MOVE("; GetFunc = "__GET("; @@ -45,7 +44,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 TYPE ExitInfo = RECORD level, label: INTEGER END ; - tmpName = POINTER TO ARRAY 32 OF CHAR; + VAR stamp: INTEGER; (* unique number for nested objects *) @@ -53,20 +52,6 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 exit: ExitInfo; (* to check if EXIT is simply a break *) nofExitLabels: INTEGER; - tempCounter: INTEGER; (* to generate unique temp names *) - - PROCEDURE uniqueTempName(): tmpName; - VAR - num: ARRAY 8 OF CHAR; - tempName: tmpName; - BEGIN - INC(tempCounter); - NEW(tempName); - COPY("_voc_tmp_", tempName^); - VT100.IntToStr(tempCounter, num); - Strings.Append(num, tempName^); - RETURN tempName; - END uniqueTempName; PROCEDURE Init*; BEGIN @@ -211,7 +196,7 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 OPT.bit, OPT.lsh, OPT.rot: RETURN 10 - ELSE OPM.LogWStr("unhandled case in OPV.Precedence OPT.Ndop, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.Precedence OPT.Ndop, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END; | OPT.Nupto: RETURN 10 | OPT.Ntype, @@ -229,13 +214,13 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 BEGIN WHILE (n^.class = OPT.Nindex) & (n^.typ^.comp = OPT.DynArr(*26.7.2002*)) DO INC(dim); n := n^.left END ; IF (n^.class = OPT.Nderef) & (n^.typ^.comp = OPT.DynArr) THEN - d := dim; array := n^.typ; - WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; - IF array^.comp = OPT.DynArr THEN + d := dim; array := n^.typ; + WHILE d > 0 DO array := array^.BaseTyp; DEC(d) END; + IF array^.comp = OPT.DynArr THEN design(n^.left, 10); OPM.WriteString("->len["); OPM.WriteInt(dim); OPM.Write("]") - ELSE + ELSE OPM.WriteInt(array^.n) - END + END ELSE OPC.Len(n^.obj, n^.typ, dim) END @@ -270,39 +255,27 @@ MODULE OPV; (* J. Templ 16.2.95 / 3.7.96 END END SizeCast; -PROCEDURE Convert(n: OPT.Node; newtype: OPT.Struct; prec: INTEGER); -VAR - from, to: INTEGER; - tempName: tmpName; - tempIndex: INTEGER; (* New variable to manage temporary indexes *) -BEGIN - from := n^.typ^.form; - to := newtype.form; - - IF to = OPT.Set THEN - tempName := uniqueTempName(); - tempIndex := 0; (* Initialize temp index *) - OPM.WriteString("UINT32 "); OPM.WriteString(tempName^); OPM.WriteString(" = 0;"); (* Correctly initialize variable *) - OPM.WriteLn; - - IF from = OPT.Set THEN + PROCEDURE Convert(n: OPT.Node; newtype: OPT.Struct; prec: INTEGER); + VAR from, to: INTEGER; + BEGIN from := n^.typ^.form; to := newtype.form; + IF to = OPT.Set THEN + IF from = OPT.Set THEN (* Sets of different size *) + SizeCast(n, newtype.size); + ELSE (* Set from integer *) + OPM.WriteString("__SETOF("); Entier(n, MinPrec); + OPM.WriteString(","); OPM.WriteInt(newtype.size*8); OPM.Write(CloseParen) + END + ELSIF to = OPT.Int THEN (* integers of different size *) SizeCast(n, newtype.size); - ELSE - OPM.WriteString(tempName^); OPM.WriteString(" = __SETOF("); - Entier(n, MinPrec); - OPM.WriteString(","); - OPM.WriteInt(newtype.size * 8); - OPM.WriteString(");"); - OPM.WriteLn; - OPM.WriteString("i |= "); OPM.WriteString(tempName^); OPM.WriteString(";"); (* Ensure 'i' is declared *) + ELSIF to = OPT.Char THEN + IF OPM.ranchk IN OPM.Options THEN OPM.WriteString("__CHR"); + IF SideEffects(n) THEN OPM.Write("F") END ; + OPM.Write(OpenParen); Entier(n, MinPrec); OPM.Write(CloseParen) + ELSE OPM.WriteString("(CHAR)"); Entier(n, 9) + END + ELSE expr(n, prec) END - ELSIF to = OPT.Int THEN - SizeCast(n, newtype.size); - ELSE - expr(n, prec); - END -END Convert; - + END Convert; PROCEDURE TypeOf(n: OPT.Node); BEGIN @@ -603,7 +576,7 @@ END Convert; IF SideEffects(n) THEN OPM.WriteString("__MODF(") ELSE OPM.WriteString("__MOD(") END; - ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END ; expr(l, MinPrec); OPM.WriteString(Comma); @@ -649,10 +622,10 @@ END Convert; ELSE OPM.WriteString(" - ") END; | OPS.or: OPM.WriteString(" || "); - ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, subclass = "); OPM.LogWNum(subclass, 0); OPM.LogWLn; END; expr(r, exprPrec); - IF (subclass = OPS.and) OR ((form = OPT.Set) & ((subclass = OPS.times) OR (subclass = OPS.minus))) THEN OPM.Write(CloseParen) END; (* to silence clang warnings, -- noch*) + IF (subclass = OPS.and) OR ((form = OPT.Set) & ((subclass = OPS.times) OR (subclass = OPS.minus))) THEN OPM.Write(CloseParen) END; (* to silence clang warnings, -- noch*) END | OPT.Ncall: IF (l^.obj # NIL) & (l^.obj^.mode = OPT.TProc) THEN IF l^.subcl = OPT.super THEN proc := SuperProc(n) @@ -796,7 +769,6 @@ END Convert; PROCEDURE stat(n: OPT.Node; outerProc: OPT.Object); VAR proc: OPT.Object; saved: ExitInfo; l, r: OPT.Node; - tempName, tempVar: tmpName; BEGIN WHILE (n # NIL) & OPM.noerr DO OPM.errpos := OPM.Longint(n^.conval^.intval); @@ -861,17 +833,9 @@ END Convert; | OPT.incfn, OPT.decfn: expr(n^.left, MinPrec); OPC.Increment(n^.subcl = OPT.decfn); expr(n^.right, MinPrec) | OPT.inclfn, - OPT.exclfn: - tempName := uniqueTempName(); - OPM.WriteString("UINT32 "); OPM.WriteString(tempName^); OPM.WriteString(";"); - OPM.WriteLn; - - OPM.WriteString(tempName^); OPM.WriteString(" = __SETOF("); - expr(n^.right, MinPrec); - OPM.WriteString(","); OPM.WriteInt(n.left.typ.size * 8); - OPM.WriteString(");"); - OPM.WriteLn; - OPM.WriteString("i |= "); OPM.WriteString(tempName^); OPM.WriteString(";"); + OPT.exclfn: expr(n^.left, MinPrec); OPC.SetInclude(n^.subcl = OPT.exclfn); + OPM.WriteString("__SETOF("); expr(n^.right, MinPrec); + OPM.WriteString(","); OPM.WriteInt(n.left.typ.size*8); OPM.Write(CloseParen) | OPT.copyfn: OPM.WriteString(CopyFunc); expr(n^.right, MinPrec); OPM.WriteString(Comma); expr(n^.left, MinPrec); OPM.WriteString(Comma); Len(n^.left, 0); OPM.Write(CloseParen) @@ -893,7 +857,7 @@ END Convert; design(n^.left, MinPrec); OPM.WriteString(", "); expr(n^.right, MinPrec); OPM.Write(")") - ELSE OPM.LogWStr("unhandled case in OPV.expr, n^.subcl = "); OPM.LogWNum(n^.subcl, 0); OPM.LogWLn; + ELSE OPM.LogWStr("unhandled case in OPV.expr, n^.subcl = "); OPM.LogWNum(n^.subcl, 0); OPM.LogWLn; END | OPT.Ncall: IF (n^.left^.obj # NIL) & (n^.left^.obj^.mode = OPT.TProc) THEN IF n^.left^.subcl = OPT.super THEN proc := SuperProc(n) @@ -967,7 +931,4 @@ END Convert; OPC.GenBdy(prog^.right); stat(prog, NIL) END Module; -BEGIN - tempCounter := 0 - END OPV. diff --git a/src/test/server/s.Mod b/src/test/server/s.Mod index 38a92496..be04d59e 100644 --- a/src/test/server/s.Mod +++ b/src/test/server/s.Mod @@ -4,7 +4,7 @@ IMPORT sockets, types, Out := Console, SYSTEM, Platform, Strings; PROCEDURE DoSmth(sock: Platform.FileHandle); -VAR +VAR str, aff: ARRAY 256 OF CHAR; n: LONGINT; BEGIN @@ -15,7 +15,7 @@ BEGIN ELSE str[n] := 0X; (* Make sure that received message is zero terminated *) Out.String("received message is "); Out.String(str); Out.Ln; - + IF Platform.Write(sock, SYSTEM.ADR(aff), Strings.Length(aff)) # 0 THEN Out.String("error writing to socket"); Out.Ln END; @@ -29,17 +29,16 @@ PROCEDURE -fork(): LONGINT "(LONGINT)fork()"; PROCEDURE serve; -CONST +CONST Port = 2055; MaxQueue = 5; -VAR +VAR sockfd: LONGINT; newsockfd: LONGINT; ServAddr: sockets.SockAddrIn; pid: LONGINT; res: Platform.ErrorCode; sockaddrlen: LONGINT; - ipAddr: LONGINT; ip: ARRAY 16 OF CHAR; BEGIN sockfd := sockets.Socket(sockets.AfInet, sockets.SockStream, 0); IF sockfd < 0 THEN @@ -48,17 +47,15 @@ BEGIN Out.String("socket created.") END; Out.Ln; - COPY("127.0.0.1", ip); - ipAddr := sockets.inetaddr(ip); - sockets.SetSockAddrIn(sockets.AfInet, Port, ipAddr, ServAddr); + sockets.SetSockAddrIn(sockets.AfInet, Port, 0, ServAddr); IF sockets.Bind(sockfd, SYSTEM.VAL(sockets.SockAddr, ServAddr), SIZE(sockets.SockAddr)) < 0 THEN Out.String("error on binding") ELSE Out.String("binding completed.") END; Out.Ln; - + IF sockets.Listen(sockfd, MaxQueue) # 0 THEN Out.String("listen() failed"); ELSE diff --git a/src/test/server/sockets.Mod b/src/test/server/sockets.Mod index ded7a61f..58ff3c24 100644 --- a/src/test/server/sockets.Mod +++ b/src/test/server/sockets.Mod @@ -2,60 +2,60 @@ MODULE sockets; IMPORT SYSTEM, oocC; -CONST - SockStream* = 1; - SockDgram* = 2; - SockRaw* = 3; - SockRdm* = 4; - SockSeqpacket* = 5; - SockDccp* = 6; - SockPacket* = 10; - - AfUnscec* = 0; (* Unspecified. *) - AfLocal* = 1; (* Local to host (pipes and file-domain). *) - AfUnix* = 1; (* POSIX name for PF_LOCAL. *) - AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) - AfInet* = 2; (* IP protocol family. *) - AfAx25* = 3; (* Amateur Radio AX.25. *) - AfIpx* = 4; (* Novell Internet Protocol. *) - AfAppletalk* = 5; (* Appletalk DDP. *) - AfNetrom* = 6; (* Amateur radio NetROM. *) - AfBridge* = 7; (* Multiprotocol bridge. *) - AfAtmpvc* = 8; (* ATM PVCs. *) - AfX25* = 9; (* Reserved for X.25 project. *) - AfInet6* = 10; (* IP version 6. *) - AfRose* = 11; (* Amateur Radio X.25 PLP. *) - AfDecnet* = 12; (* Reserved for DECnet project. *) - AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) - AfSecurity* = 14; (* Security callback pseudo AF. *) - AfKey* = 15; (* PF_KEY key management API. *) - AfNetlink* = 16; - AfRoute* = 16; (* Alias to emulate 4.4BSD. *) - AfPacket = 17; (* Packet family. *) - AfAsh = 18; (* Ash. *) - AfEconet* = 19; (* Acorn Econet. *) - AfAtmsvc* = 20; (* ATM SVCs. *) - AfRds* = 21; (* RDS sockets. *) - AfSna = 22; (* Linux SNA Project *) - AfIrda* = 23; (* IRDA sockets. *) - AfPppox = 24; (* PPPoX sockets. *) - AfWanpipe* = 25; (* Wanpipe API sockets. *) - AfLlc* = 26; (* Linux LLC. *) - AfCan* = 29; (* Controller Area Network. *) - AfTipc* = 30; (* TIPC sockets. *) - AfBluetooth* = 31; (* Bluetooth sockets. *) - AfIucv* = 32; (* IUCV sockets. *) - AfRxrpc* = 33; (* RxRPC sockets. *) - AfIsdn* = 34; (* mISDN sockets. *) - AfPhonet* = 35; (* Phonet sockets. *) - AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) - AfCaif* = 37; (* CAIF sockets. *) - AfAlg* = 38; (* Algorithm sockets. *) - AfNfc* = 39; (* NFC sockets. *) - AfVsock* = 40; (* vSockets. *) - AfMax* = 41; (* For now.. *) - - InAddrAny* = 0; +CONST + SockStream* = 1; + SockDgram* = 2; + SockRaw* = 3; + SockRdm* = 4; + SockSeqpacket* = 5; + SockDccp* = 6; + SockPacket* = 10; + + AfUnscec* = 0; (* Unspecified. *) + AfLocal* = 1; (* Local to host (pipes and file-domain). *) + AfUnix* = 1; (* POSIX name for PF_LOCAL. *) + AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) + AfInet* = 2; (* IP protocol family. *) + AfAx25* = 3; (* Amateur Radio AX.25. *) + AfIpx* = 4; (* Novell Internet Protocol. *) + AfAppletalk* = 5; (* Appletalk DDP. *) + AfNetrom* = 6; (* Amateur radio NetROM. *) + AfBridge* = 7; (* Multiprotocol bridge. *) + AfAtmpvc* = 8; (* ATM PVCs. *) + AfX25* = 9; (* Reserved for X.25 project. *) + AfInet6* = 10; (* IP version 6. *) + AfRose* = 11; (* Amateur Radio X.25 PLP. *) + AfDecnet* = 12; (* Reserved for DECnet project. *) + AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) + AfSecurity* = 14; (* Security callback pseudo AF. *) + AfKey* = 15; (* PF_KEY key management API. *) + AfNetlink* = 16; + AfRoute* = 16; (* Alias to emulate 4.4BSD. *) + AfPacket = 17; (* Packet family. *) + AfAsh = 18; (* Ash. *) + AfEconet* = 19; (* Acorn Econet. *) + AfAtmsvc* = 20; (* ATM SVCs. *) + AfRds* = 21; (* RDS sockets. *) + AfSna = 22; (* Linux SNA Project *) + AfIrda* = 23; (* IRDA sockets. *) + AfPppox = 24; (* PPPoX sockets. *) + AfWanpipe* = 25; (* Wanpipe API sockets. *) + AfLlc* = 26; (* Linux LLC. *) + AfCan* = 29; (* Controller Area Network. *) + AfTipc* = 30; (* TIPC sockets. *) + AfBluetooth* = 31; (* Bluetooth sockets. *) + AfIucv* = 32; (* IUCV sockets. *) + AfRxrpc* = 33; (* RxRPC sockets. *) + AfIsdn* = 34; (* mISDN sockets. *) + AfPhonet* = 35; (* Phonet sockets. *) + AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) + AfCaif* = 37; (* CAIF sockets. *) + AfAlg* = 38; (* Algorithm sockets. *) + AfNfc* = 39; (* NFC sockets. *) + AfVsock* = 40; (* vSockets. *) + AfMax* = 41; (* For now.. *) + + InAddrAny* = 0; TYPE (* /usr/include/netinet/in.h *) @@ -70,16 +70,13 @@ TYPE SinZero*: ARRAY 8 OF CHAR; END; (* /usr/include/sys/socket.h *) - + SockAddr* = RECORD SaFamily*: oocC.shortint; SaData*: ARRAY 14 OF CHAR END; PROCEDURE -includesocket "#include "; - PROCEDURE -includeInet "#include "; - - PROCEDURE -inetaddr*(s: ARRAY OF CHAR): LONGINT "(LONGINT)inet_addr((char*)s)"; PROCEDURE -SetCShort(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = i"; @@ -87,7 +84,7 @@ TYPE PROCEDURE -SetCShortSwapped(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = ((i >> 8) & 0x00ff) | ((i << 8) & 0xff00)"; - PROCEDURE SetSockAddrIn*(family, port: INTEGER; inaddr: LONGINT; VAR sai: SockAddrIn); + PROCEDURE SetSockAddrIn*(family, port, inaddr: INTEGER; VAR sai: SockAddrIn); VAR i: INTEGER; BEGIN SetCShort(family, sai.SinFamily); From 2178fa7b18feb03c1236cbb84fbeddf97782ce27 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 21 Feb 2025 04:52:54 +0400 Subject: [PATCH 208/241] now test server can listen on any ipv4 address. --- src/test/server/s.Mod | 15 +++-- src/test/server/sockets.Mod | 115 ++++++++++++++++++------------------ 2 files changed, 68 insertions(+), 62 deletions(-) diff --git a/src/test/server/s.Mod b/src/test/server/s.Mod index be04d59e..38a92496 100644 --- a/src/test/server/s.Mod +++ b/src/test/server/s.Mod @@ -4,7 +4,7 @@ IMPORT sockets, types, Out := Console, SYSTEM, Platform, Strings; PROCEDURE DoSmth(sock: Platform.FileHandle); -VAR +VAR str, aff: ARRAY 256 OF CHAR; n: LONGINT; BEGIN @@ -15,7 +15,7 @@ BEGIN ELSE str[n] := 0X; (* Make sure that received message is zero terminated *) Out.String("received message is "); Out.String(str); Out.Ln; - + IF Platform.Write(sock, SYSTEM.ADR(aff), Strings.Length(aff)) # 0 THEN Out.String("error writing to socket"); Out.Ln END; @@ -29,16 +29,17 @@ PROCEDURE -fork(): LONGINT "(LONGINT)fork()"; PROCEDURE serve; -CONST +CONST Port = 2055; MaxQueue = 5; -VAR +VAR sockfd: LONGINT; newsockfd: LONGINT; ServAddr: sockets.SockAddrIn; pid: LONGINT; res: Platform.ErrorCode; sockaddrlen: LONGINT; + ipAddr: LONGINT; ip: ARRAY 16 OF CHAR; BEGIN sockfd := sockets.Socket(sockets.AfInet, sockets.SockStream, 0); IF sockfd < 0 THEN @@ -47,15 +48,17 @@ BEGIN Out.String("socket created.") END; Out.Ln; + COPY("127.0.0.1", ip); + ipAddr := sockets.inetaddr(ip); - sockets.SetSockAddrIn(sockets.AfInet, Port, 0, ServAddr); + sockets.SetSockAddrIn(sockets.AfInet, Port, ipAddr, ServAddr); IF sockets.Bind(sockfd, SYSTEM.VAL(sockets.SockAddr, ServAddr), SIZE(sockets.SockAddr)) < 0 THEN Out.String("error on binding") ELSE Out.String("binding completed.") END; Out.Ln; - + IF sockets.Listen(sockfd, MaxQueue) # 0 THEN Out.String("listen() failed"); ELSE diff --git a/src/test/server/sockets.Mod b/src/test/server/sockets.Mod index 58ff3c24..ded7a61f 100644 --- a/src/test/server/sockets.Mod +++ b/src/test/server/sockets.Mod @@ -2,60 +2,60 @@ MODULE sockets; IMPORT SYSTEM, oocC; -CONST - SockStream* = 1; - SockDgram* = 2; - SockRaw* = 3; - SockRdm* = 4; - SockSeqpacket* = 5; - SockDccp* = 6; - SockPacket* = 10; - - AfUnscec* = 0; (* Unspecified. *) - AfLocal* = 1; (* Local to host (pipes and file-domain). *) - AfUnix* = 1; (* POSIX name for PF_LOCAL. *) - AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) - AfInet* = 2; (* IP protocol family. *) - AfAx25* = 3; (* Amateur Radio AX.25. *) - AfIpx* = 4; (* Novell Internet Protocol. *) - AfAppletalk* = 5; (* Appletalk DDP. *) - AfNetrom* = 6; (* Amateur radio NetROM. *) - AfBridge* = 7; (* Multiprotocol bridge. *) - AfAtmpvc* = 8; (* ATM PVCs. *) - AfX25* = 9; (* Reserved for X.25 project. *) - AfInet6* = 10; (* IP version 6. *) - AfRose* = 11; (* Amateur Radio X.25 PLP. *) - AfDecnet* = 12; (* Reserved for DECnet project. *) - AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) - AfSecurity* = 14; (* Security callback pseudo AF. *) - AfKey* = 15; (* PF_KEY key management API. *) - AfNetlink* = 16; - AfRoute* = 16; (* Alias to emulate 4.4BSD. *) - AfPacket = 17; (* Packet family. *) - AfAsh = 18; (* Ash. *) - AfEconet* = 19; (* Acorn Econet. *) - AfAtmsvc* = 20; (* ATM SVCs. *) - AfRds* = 21; (* RDS sockets. *) - AfSna = 22; (* Linux SNA Project *) - AfIrda* = 23; (* IRDA sockets. *) - AfPppox = 24; (* PPPoX sockets. *) - AfWanpipe* = 25; (* Wanpipe API sockets. *) - AfLlc* = 26; (* Linux LLC. *) - AfCan* = 29; (* Controller Area Network. *) - AfTipc* = 30; (* TIPC sockets. *) - AfBluetooth* = 31; (* Bluetooth sockets. *) - AfIucv* = 32; (* IUCV sockets. *) - AfRxrpc* = 33; (* RxRPC sockets. *) - AfIsdn* = 34; (* mISDN sockets. *) - AfPhonet* = 35; (* Phonet sockets. *) - AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) - AfCaif* = 37; (* CAIF sockets. *) - AfAlg* = 38; (* Algorithm sockets. *) - AfNfc* = 39; (* NFC sockets. *) - AfVsock* = 40; (* vSockets. *) - AfMax* = 41; (* For now.. *) - - InAddrAny* = 0; +CONST + SockStream* = 1; + SockDgram* = 2; + SockRaw* = 3; + SockRdm* = 4; + SockSeqpacket* = 5; + SockDccp* = 6; + SockPacket* = 10; + + AfUnscec* = 0; (* Unspecified. *) + AfLocal* = 1; (* Local to host (pipes and file-domain). *) + AfUnix* = 1; (* POSIX name for PF_LOCAL. *) + AfFile* = 1; (* Another non-standard name for PF_LOCAL. *) + AfInet* = 2; (* IP protocol family. *) + AfAx25* = 3; (* Amateur Radio AX.25. *) + AfIpx* = 4; (* Novell Internet Protocol. *) + AfAppletalk* = 5; (* Appletalk DDP. *) + AfNetrom* = 6; (* Amateur radio NetROM. *) + AfBridge* = 7; (* Multiprotocol bridge. *) + AfAtmpvc* = 8; (* ATM PVCs. *) + AfX25* = 9; (* Reserved for X.25 project. *) + AfInet6* = 10; (* IP version 6. *) + AfRose* = 11; (* Amateur Radio X.25 PLP. *) + AfDecnet* = 12; (* Reserved for DECnet project. *) + AfNetbeui* = 13; (* Reserved for 802.2LLC project. *) + AfSecurity* = 14; (* Security callback pseudo AF. *) + AfKey* = 15; (* PF_KEY key management API. *) + AfNetlink* = 16; + AfRoute* = 16; (* Alias to emulate 4.4BSD. *) + AfPacket = 17; (* Packet family. *) + AfAsh = 18; (* Ash. *) + AfEconet* = 19; (* Acorn Econet. *) + AfAtmsvc* = 20; (* ATM SVCs. *) + AfRds* = 21; (* RDS sockets. *) + AfSna = 22; (* Linux SNA Project *) + AfIrda* = 23; (* IRDA sockets. *) + AfPppox = 24; (* PPPoX sockets. *) + AfWanpipe* = 25; (* Wanpipe API sockets. *) + AfLlc* = 26; (* Linux LLC. *) + AfCan* = 29; (* Controller Area Network. *) + AfTipc* = 30; (* TIPC sockets. *) + AfBluetooth* = 31; (* Bluetooth sockets. *) + AfIucv* = 32; (* IUCV sockets. *) + AfRxrpc* = 33; (* RxRPC sockets. *) + AfIsdn* = 34; (* mISDN sockets. *) + AfPhonet* = 35; (* Phonet sockets. *) + AfIeee802154* = 36; (* IEEE 802.15.4 sockets. *) + AfCaif* = 37; (* CAIF sockets. *) + AfAlg* = 38; (* Algorithm sockets. *) + AfNfc* = 39; (* NFC sockets. *) + AfVsock* = 40; (* vSockets. *) + AfMax* = 41; (* For now.. *) + + InAddrAny* = 0; TYPE (* /usr/include/netinet/in.h *) @@ -70,13 +70,16 @@ TYPE SinZero*: ARRAY 8 OF CHAR; END; (* /usr/include/sys/socket.h *) - + SockAddr* = RECORD SaFamily*: oocC.shortint; SaData*: ARRAY 14 OF CHAR END; PROCEDURE -includesocket "#include "; + PROCEDURE -includeInet "#include "; + + PROCEDURE -inetaddr*(s: ARRAY OF CHAR): LONGINT "(LONGINT)inet_addr((char*)s)"; PROCEDURE -SetCShort(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = i"; @@ -84,7 +87,7 @@ TYPE PROCEDURE -SetCShortSwapped(i: INTEGER; VAR si: oocC.shortint) "*(short*)si = ((i >> 8) & 0x00ff) | ((i << 8) & 0xff00)"; - PROCEDURE SetSockAddrIn*(family, port, inaddr: INTEGER; VAR sai: SockAddrIn); + PROCEDURE SetSockAddrIn*(family, port: INTEGER; inaddr: LONGINT; VAR sai: SockAddrIn); VAR i: INTEGER; BEGIN SetCShort(family, sai.SinFamily); From b22fc3fd3ffd752019f80f18aa101b48dc82bc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan-Iulian=20Alecu?= <165364995+pascalecu@users.noreply.github.com> Date: Wed, 12 Mar 2025 02:07:15 +0200 Subject: [PATCH 209/241] feat: add netbsd support in configure.c --- src/tools/make/configure.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index ecfc3f1f..2cd37b13 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -113,6 +113,7 @@ void determineOS() { else if (strncasecmp(sys.sysname, "linux", 5) == 0) {determineLinuxVariant();} else if (strncasecmp(sys.sysname, "freebsd", 5) == 0) {os = "freebsd"; bsd = 1;} else if (strncasecmp(sys.sysname, "openbsd", 5) == 0) {os = "openbsd"; bsd = 1;} + else if (strncasecmp(sys.sysname, "netbsd", 5) == 0) {os = "netbsd"; bsd = 1;} else if (strncasecmp(sys.sysname, "darwin", 5) == 0) {os = "darwin"; staticlink = ""; dynext = ".dylib";} else { fprintf(stderr, "\n\n** Unrecognised utsname.sysname '%s' returned by uname().\n", sys.sysname); From c4f379204733f3f245d6b8a59d4636a4b06f6ac9 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 07:52:22 +0400 Subject: [PATCH 210/241] add ctags --- .gitignore | 1 + makefile | 6 ++++-- oberon.ctags | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 oberon.ctags diff --git a/.gitignore b/.gitignore index 22c5a97d..27d956ae 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /triage/BasicTypeSize.md /triage/Roadmap.md triage/system/* +tags diff --git a/makefile b/makefile index 5c0ee241..7bc29843 100644 --- a/makefile +++ b/makefile @@ -91,8 +91,10 @@ usage: @echo " make bootstrap - Update bootstrap C source directories." @echo " make revertbootstrap - Use git checkout to restore bootstrap C source directories" - - +# Code navigation helper +.PHONY: tags +tags: + ctags -R --options=oberon.ctags --extras=+q # Generate config files Configuration.Make and Configuration.Mod FORCE: diff --git a/oberon.ctags b/oberon.ctags new file mode 100644 index 00000000..de5a1cf8 --- /dev/null +++ b/oberon.ctags @@ -0,0 +1,32 @@ +# ctags -R --options=oberon.ctags --extras=+q + +--langdef=Oberon{_autoFQTag} + +--map-Oberon=+.mod +--map-Oberon=+.Mod + +--kinddef-Oberon=m,module,modules +--kinddef-Oberon=p,procedure,procedures + +--regex-Oberon=/^\s*MODULE\s+([a-zA-Z][a-zA-Z0-9]*)\s*;/\1/m/{scope=push} +--regex-Oberon=/^\s*END\s+([a-zA-Z][a-zA-Z0-9]*)\s*\./\1/m/{scope=pop} +--regex-Oberon=/^\s*PROCEDURE(\s*\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref} +# NOTE Oberon-2 receiver procedures not supported + +### using ctags with vim +# examples: +# vim -t "Compiler" +# vim -t "OPS.Get" +# vim -c ":ts Platform.Read" +# +# when inside the editor you need to jump to the fully qualified tag, +# not just procedure name e.g. when you have Platform.Write, you +# can't just place cursor on W then and expect it to resolve +# correctly all the time. +# your better options are +# autocmd FileType oberon setlocal iskeyword+=. +# autocmd FileType modula2 setlocal iskeyword+=. +# :ta Platform.Write +# v 3e +# :ts Platform.Write +# g From e936f7d7b0b4921528df0fd79285ec1681250792 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 07:52:59 +0400 Subject: [PATCH 211/241] fix typo in ReadMe --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 933b0681..fa8f5143 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -295,7 +295,7 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015 ###### Links - [Niklaus Wirth's personal page at ETH Zurich](https://www.inf.ethz.ch/personal/wirth/) - [ETH Zurich's Wirth publications page](http://www.ethoberon.ethz.ch/WirthPubl/) - - [Joseph Templ's ofront on github](https://hithub.com/jtempl/ofront) + - [Joseph Templ's ofront on github](https://github.com/jtempl/ofront) - [Software Templ OG](http://www.software-templ.com) - [Oberon: Steps beyond Pascal and Modula](http://fruttenboel.verhoeven272.nl/Oberon/) From 233761e7fa055d0605c499e744661af12f728ec3 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 08:16:27 +0400 Subject: [PATCH 212/241] more matches --- oberon.ctags | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oberon.ctags b/oberon.ctags index de5a1cf8..dac4e685 100644 --- a/oberon.ctags +++ b/oberon.ctags @@ -10,7 +10,7 @@ --regex-Oberon=/^\s*MODULE\s+([a-zA-Z][a-zA-Z0-9]*)\s*;/\1/m/{scope=push} --regex-Oberon=/^\s*END\s+([a-zA-Z][a-zA-Z0-9]*)\s*\./\1/m/{scope=pop} ---regex-Oberon=/^\s*PROCEDURE(\s*\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref} +--regex-Oberon=/^\s*PROCEDURE\s*(\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref} # NOTE Oberon-2 receiver procedures not supported ### using ctags with vim From 9084ca288bfaeaf47250837492700c1a45536a56 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 16:29:13 +0400 Subject: [PATCH 213/241] rewording ceveats on oberon.ctags --- oberon.ctags | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/oberon.ctags b/oberon.ctags index dac4e685..c7b57dc7 100644 --- a/oberon.ctags +++ b/oberon.ctags @@ -1,3 +1,4 @@ +# universal tags # ctags -R --options=oberon.ctags --extras=+q --langdef=Oberon{_autoFQTag} @@ -19,14 +20,14 @@ # vim -t "OPS.Get" # vim -c ":ts Platform.Read" # -# when inside the editor you need to jump to the fully qualified tag, -# not just procedure name e.g. when you have Platform.Write, you -# can't just place cursor on W then and expect it to resolve -# correctly all the time. -# your better options are -# autocmd FileType oberon setlocal iskeyword+=. -# autocmd FileType modula2 setlocal iskeyword+=. -# :ta Platform.Write -# v 3e -# :ts Platform.Write -# g +# you need to jump to the fully qualified name, since procedure names alone +# sometimes resolve to an incorrect module. that is to say putting cursor on +# W in Platform.Write and jumping will probably not work as expected, so you +# might have to do some of these +# autocmd FileType oberon,modula2 setlocal iskeyword+=. +# select the name fully +# v 3e +# :ta Platform.Write +# resolve ambiguities interactively +# :ts Write +# g From 9e9bbe7581a20cf0ba9be6c5a58c1465d74bbe7f Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 19:00:09 +0400 Subject: [PATCH 214/241] fix empty link in ReadMe --- ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index fa8f5143..ab4dfbce 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -2,7 +2,7 @@ # Ѵishap Oberon -[Ѵishap Oberon](http://oberon.vishap.am) is a free and open source (GPLv3) +[Ѵishap Oberon](https://vishap.oberon.am/) is a free and open source (GPLv3) implementation of the Oberon-2 language and libraries for use on conventional operating systems such as Linux, BSD, Android, Mac and Windows. From cb098d448dd392f5cd872f3a839e4710256c54aa Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 19:20:01 +0400 Subject: [PATCH 215/241] update deaed links in ReadMe --- ReadMe.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index ab4dfbce..95d7f840 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -278,13 +278,13 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015 ###### Oberon - [The History of Modula-2 and Oberon](http://people.inf.ethz.ch/wirth/Articles/Modula-Oberon-June.pdf) - [The Programming Language Oberon](https://www.inf.ethz.ch/personal/wirth/Oberon/Oberon.Report.pdf) - - [Project Oberon: The Design of an Operating System and Compiler ](http://www.ethoberon.ethz.ch/WirthPubl/ProjectOberon.pdf) - - [Oberon - the Overlooked Jewel](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90.7173&rep=rep1&type=pdf) + - [Project Oberon: The Design of an Operating System and Compiler ](https://people.inf.ethz.ch/wirth/ProjectOberon1992.pdf) + - [Oberon - the Overlooked Jewel](http://pascal.hansotten.com/uploads/oberonpi/Oberon%20article.pdf) ###### Oberon 2 - - [Differences between Oberon and Oberon-2](http://members.home.nl/jmr272/Oberon/Oberon2.Differences.pdf) + - [Differences between Oberon and Oberon-2](https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=89e5bd3cf006bde4821599cdc57a37de5dc84bcd) - [The Programming Language Oberon-2](http://www.ssw.uni-linz.ac.at/Research/Papers/Oberon2.pdf) - - [Programming in Oberon. Steps beyond Pascal and Modula](http://www.ethoberon.ethz.ch/WirthPubl/ProgInOberonWR.pdf) + - [Programming in Oberon. Steps beyond Pascal and Modula](https://people.inf.ethz.ch/wirth/ProgInOberonWR.pdf) - [The Oakwood Guidelines for Oberon-2 Compiler Developers](http://www.math.bas.bg/bantchev/place/oberon/oakwood-guidelines.pdf) ###### Oberon 07 @@ -294,10 +294,10 @@ Also, Vishaps are known in tales, fiction. [This page](http://blog.fogus.me/2015 ###### Links - [Niklaus Wirth's personal page at ETH Zurich](https://www.inf.ethz.ch/personal/wirth/) - - [ETH Zurich's Wirth publications page](http://www.ethoberon.ethz.ch/WirthPubl/) + - [Selected articles by Niklaus Wirth](https://people.inf.ethz.ch/wirth/SelectedArticles.pdf) + - [ETH Oberon publications page](https://web.archive.org/web/20191207155011/http://www.ethoberon.ethz.ch/books.html) - [Joseph Templ's ofront on github](https://github.com/jtempl/ofront) - [Software Templ OG](http://www.software-templ.com) - - [Oberon: Steps beyond Pascal and Modula](http://fruttenboel.verhoeven272.nl/Oberon/) ## History From ac829590928189f05ea2d022cbbc319a521fdd41 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 20:05:37 +0400 Subject: [PATCH 216/241] add stuff to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 27d956ae..ba12dfc3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /*.sym /*.asm /*.mod +/Errors.Txt /Errors.txt /olang /src/test/**/*.exe @@ -40,3 +41,4 @@ /triage/Roadmap.md triage/system/* tags +voc From e64d4c4d441d45303f458bd33b2eca844070d190 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 20:14:24 +0400 Subject: [PATCH 217/241] add test binaries to .gitignore --- .gitignore | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index ba12dfc3..521c9a36 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,17 @@ /src/test/confidence/**/*.asm /src/test/confidence/**/*.s /src/test/confidence/**/*.map +/src/test/confidence/arrayassignment/aa +/src/test/confidence/hello/hello +/src/test/confidence/in/intest +/src/test/confidence/isptest/isptest +/src/test/confidence/language/TestLanguage +/src/test/confidence/library/TestLibrary +/src/test/confidence/lola/Lola +/src/test/confidence/math/mathtest +/src/test/confidence/out/outtest +/src/test/confidence/signal/SignalTest +/src/test/confidence/texts/testTexts /bootstrap/*/SYSTEM.[ch] /bootstrap/*/Errors.Txt /bootstrap/*/WindowsWrapper.h From a25b44ae2145dd35ce9f28d91c5fa7c07e6abf32 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 20:38:12 +0400 Subject: [PATCH 218/241] exclude all confidence test files without extension except expect --- .gitignore | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 521c9a36..19fc1ede 100644 --- a/.gitignore +++ b/.gitignore @@ -21,23 +21,14 @@ /src/test/**/*.obj /src/test/**/*.sym **/*.stackdump +!/src/test/confidence/**/expected /src/test/confidence/**/input /src/test/confidence/**/result /src/test/confidence/**/result-* +/src/test/confidence/**/*[^.]* /src/test/confidence/**/*.asm /src/test/confidence/**/*.s /src/test/confidence/**/*.map -/src/test/confidence/arrayassignment/aa -/src/test/confidence/hello/hello -/src/test/confidence/in/intest -/src/test/confidence/isptest/isptest -/src/test/confidence/language/TestLanguage -/src/test/confidence/library/TestLibrary -/src/test/confidence/lola/Lola -/src/test/confidence/math/mathtest -/src/test/confidence/out/outtest -/src/test/confidence/signal/SignalTest -/src/test/confidence/texts/testTexts /bootstrap/*/SYSTEM.[ch] /bootstrap/*/Errors.Txt /bootstrap/*/WindowsWrapper.h From d00531742414e2676d1b71be7826e03b07b96693 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 20:57:00 +0400 Subject: [PATCH 219/241] address more caveats in oberon.ctags --- oberon.ctags | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/oberon.ctags b/oberon.ctags index c7b57dc7..6af0745a 100644 --- a/oberon.ctags +++ b/oberon.ctags @@ -24,10 +24,15 @@ # sometimes resolve to an incorrect module. that is to say putting cursor on # W in Platform.Write and jumping will probably not work as expected, so you # might have to do some of these -# autocmd FileType oberon,modula2 setlocal iskeyword+=. -# select the name fully +# add this to yout .vimrc +# autocmd FileType oberon,modula2 setlocal iskeyword+=. +# select the qualified name # v 3e # :ta Platform.Write # resolve ambiguities interactively # :ts Write # g +# +# if you need upward searching for tags file, so you can access them from +# project root subdirectories, then add this to your .vimrc +# set tags=./tags;~ From 7691293a5b3d490efcb74c66d2b8eb9870187352 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 21:05:42 +0400 Subject: [PATCH 220/241] replace egrep with grep -E for less warnings --- src/tools/make/sourcechanges.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/make/sourcechanges.sh b/src/tools/make/sourcechanges.sh index e20e6841..86aa9542 100644 --- a/src/tools/make/sourcechanges.sh +++ b/src/tools/make/sourcechanges.sh @@ -14,8 +14,8 @@ changes="0" find "$1" -type f -print0 | while IFS= read -r -d '' f; do fn=$(basename "$f") - egrep -v -f ../../src/tools/make/ignore "$f" >$fn.old - egrep -v -f ../../src/tools/make/ignore $fn >$fn.new + grep -E -v -f ../../src/tools/make/ignore "$f" >$fn.old + grep -E -v -f ../../src/tools/make/ignore $fn >$fn.new if ! diff -U 2 -b $fn.old $fn.new >$fn.diff; then echo "" echo "" From cd06cd32b1b658a941b686756aacaab2e4ba9b07 Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 22:09:20 +0400 Subject: [PATCH 221/241] ignore common warnings in gcc and clang --- src/tools/make/configure.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 2cd37b13..3ff41948 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -137,7 +137,8 @@ void determineCCompiler() { } #elif defined(__clang__) compiler = "clang"; - cc = "clang -fPIC -g" optimize; + // FIXME ignoring warnings + cc = "clang -fPIC -g -Wno-deprecated-non-prototype" optimize; #elif defined(__TINYC__) compiler = "tcc"; cc = "tcc -g"; @@ -146,9 +147,11 @@ void determineCCompiler() { compiler = "gcc"; if (strncasecmp(os, "cygwin", 6) == 0) { // Avoid cygwin specific warning that -fPIC is ignored. - cc = "gcc -g" optimize; + // FIXME ignoring warnings + cc = "gcc -g -Wno-stringop-overflow" optimize; } else { - cc = "gcc -fPIC -g" optimize; + // FIXME ignoring warnings + cc = "gcc -fPIC -g -Wno-stringop-overflow" optimize; } #elif defined(_MSC_VER) compiler = "msc"; From b12029e3ed5618f3c43e5c1cfeec522799cb68ba Mon Sep 17 00:00:00 2001 From: sevoves Date: Thu, 3 Apr 2025 22:26:20 +0400 Subject: [PATCH 222/241] remove warning floods for MinGW compiler --- src/tools/make/configure.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 3ff41948..87591d63 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -131,9 +131,11 @@ void determineCCompiler() { #if defined(__MINGW32__) compiler = "mingw"; if (sizeof (void*) == 4) { - cc = "i686-w64-mingw32-gcc -g" optimize; + // FIXME ignoring warnings + cc = "i686-w64-mingw32-gcc -g -Wno-stringop-overflow" optimize; } else { - cc = "x86_64-w64-mingw32-gcc -g" optimize; + // FIXME ignoring warnings + cc = "x86_64-w64-mingw32-gcc -g -Wno-stringop-overflow" optimize; } #elif defined(__clang__) compiler = "clang"; From 089ca94207638feecdf6ae7ac03d326e72f4fc2d Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 00:38:41 +0400 Subject: [PATCH 223/241] remove scope pop in ctag since file is the scope --- oberon.ctags | 1 - 1 file changed, 1 deletion(-) diff --git a/oberon.ctags b/oberon.ctags index 6af0745a..d400018f 100644 --- a/oberon.ctags +++ b/oberon.ctags @@ -10,7 +10,6 @@ --kinddef-Oberon=p,procedure,procedures --regex-Oberon=/^\s*MODULE\s+([a-zA-Z][a-zA-Z0-9]*)\s*;/\1/m/{scope=push} ---regex-Oberon=/^\s*END\s+([a-zA-Z][a-zA-Z0-9]*)\s*\./\1/m/{scope=pop} --regex-Oberon=/^\s*PROCEDURE\s*(\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref} # NOTE Oberon-2 receiver procedures not supported From 3460b9f78ad639486585c562579ba20bca766044 Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 15:37:41 +0400 Subject: [PATCH 224/241] create macros for ignoring flood warnings --- src/tools/make/configure.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 87591d63..a5e699f6 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -125,22 +125,22 @@ void determineOS() { } #define optimize "" // " -O1" +// FIXME ignoring flood warnings that possibly are problems +#define ignore_gcc_flood_warning " -Wno-stringop-overflow" +#define ignore_clang_flood_warning " -Wno-deprecated-non-prototype" void determineCCompiler() { snprintf(libspec, sizeof(libspec), " -l%s", oname); #if defined(__MINGW32__) compiler = "mingw"; if (sizeof (void*) == 4) { - // FIXME ignoring warnings - cc = "i686-w64-mingw32-gcc -g -Wno-stringop-overflow" optimize; + cc = "i686-w64-mingw32-gcc -g" ignore_gcc_flood_warning optimize; } else { - // FIXME ignoring warnings - cc = "x86_64-w64-mingw32-gcc -g -Wno-stringop-overflow" optimize; + cc = "x86_64-w64-mingw32-gcc -g" ignore_gcc_flood_warning optimize; } #elif defined(__clang__) compiler = "clang"; - // FIXME ignoring warnings - cc = "clang -fPIC -g -Wno-deprecated-non-prototype" optimize; + cc = "clang -fPIC -g" ignore_clang_flood_warning optimize; #elif defined(__TINYC__) compiler = "tcc"; cc = "tcc -g"; @@ -149,11 +149,9 @@ void determineCCompiler() { compiler = "gcc"; if (strncasecmp(os, "cygwin", 6) == 0) { // Avoid cygwin specific warning that -fPIC is ignored. - // FIXME ignoring warnings - cc = "gcc -g -Wno-stringop-overflow" optimize; + cc = "gcc -g" ignore_gcc_flood_warning optimize; } else { - // FIXME ignoring warnings - cc = "gcc -fPIC -g -Wno-stringop-overflow" optimize; + cc = "gcc -fPIC -g" ignore_gcc_flood_warning optimize; } #elif defined(_MSC_VER) compiler = "msc"; From e298d10d99ca9db6bb55f6da6d43501d8caa6901 Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 15:43:44 +0400 Subject: [PATCH 225/241] rewording in configure.c --- src/tools/make/configure.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index a5e699f6..79059bd7 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -125,22 +125,22 @@ void determineOS() { } #define optimize "" // " -O1" -// FIXME ignoring flood warnings that possibly are problems -#define ignore_gcc_flood_warning " -Wno-stringop-overflow" -#define ignore_clang_flood_warning " -Wno-deprecated-non-prototype" +// FIXME ignoring warning floods that possibly are problems +#define ignore_gcc_warning_flood " -Wno-stringop-overflow" +#define ignore_clang_warning_flood " -Wno-deprecated-non-prototype" void determineCCompiler() { snprintf(libspec, sizeof(libspec), " -l%s", oname); #if defined(__MINGW32__) compiler = "mingw"; if (sizeof (void*) == 4) { - cc = "i686-w64-mingw32-gcc -g" ignore_gcc_flood_warning optimize; + cc = "i686-w64-mingw32-gcc -g" ignore_gcc_warning_flood optimize; } else { - cc = "x86_64-w64-mingw32-gcc -g" ignore_gcc_flood_warning optimize; + cc = "x86_64-w64-mingw32-gcc -g" ignore_gcc_warning_flood optimize; } #elif defined(__clang__) compiler = "clang"; - cc = "clang -fPIC -g" ignore_clang_flood_warning optimize; + cc = "clang -fPIC -g" ignore_clang_warning_flood optimize; #elif defined(__TINYC__) compiler = "tcc"; cc = "tcc -g"; @@ -149,9 +149,9 @@ void determineCCompiler() { compiler = "gcc"; if (strncasecmp(os, "cygwin", 6) == 0) { // Avoid cygwin specific warning that -fPIC is ignored. - cc = "gcc -g" ignore_gcc_flood_warning optimize; + cc = "gcc -g" ignore_gcc_warning_flood optimize; } else { - cc = "gcc -fPIC -g" ignore_gcc_flood_warning optimize; + cc = "gcc -fPIC -g" ignore_gcc_warning_flood optimize; } #elif defined(_MSC_VER) compiler = "msc"; From 5e52f8c23151684cc8d1119f59887b47229778fc Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 21:39:45 +0400 Subject: [PATCH 226/241] add ctags doc and remove comments from oberon.ctags --- doc/ctags.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ oberon.ctags | 23 --------------- 2 files changed, 82 insertions(+), 23 deletions(-) create mode 100644 doc/ctags.md diff --git a/doc/ctags.md b/doc/ctags.md new file mode 100644 index 00000000..34319208 --- /dev/null +++ b/doc/ctags.md @@ -0,0 +1,82 @@ +## Code navigation with ctags + +[`ctags`](https://github.com/universal-ctags/ctags) is a tool that creates an index file for names (symbols) in various programming langauges, which helps code comprehension by giving information to text editors to search, locate, and interactively suggest names. Particularly for Oberon, the `oberon.ctags` file, located in the project root, contains definitions for Oberon modules and procedures (but not receiver procedures). + +Below you can find installation instructions and usage examples for `ctags`, in particular, using the universal tags implementation (not tested with other implementations), with `vim` (you can find or add guides for your text editor), with examples that deal with Oberon source code. + +## Install universal tags + +#### Use your package manager + +`pacman -S ctags` (arch linux) +`apt install universal-ctags` (debian, ubuntu) +`brew install universal-ctags` (macOS) +... + +#### Compile from source + +`git clone https://github.com/universal-ctags/ctags.git` +follow [build instructions](https://github.com/universal-ctags/ctags/blob/master/README.md#how-to-build-and-install) + +## Using ctags with vim and Oberon + +the following instructions are for POSIX systems, but can be easily adapted to other systems + +#### Configuration + +First, generate tags in project root +`make tags` + +When you add or change names in source files, you have to regenerate the `tags` file. That can be done by running `make tags` again. Optionally, use a `vim` plugin such as [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags) to automate this process. Install it (or skip this step): +``` +git clone https://github.com/ludovicchabant/vim-gutentags ~/.vim/plugin/ +``` +or wherever your vim global plugin directory is specified in `:h plugin`. + +Add this to your `~/.vimrc` +``` +" search upwards for tags file until home directory +set tags=./tags;~ +" qualified name metadata for plugin +let g:gutentags_ctags_extra_args = ['--extras=+q'] +``` + +To use `oberon.ctags` with a plugin or for Oberon language detection outside its directory: +`cp oberon.ctags ~/.config/ctags/` +or +`cp oberon.ctags $XDG_CONFIG_HOME/ctags/` + +#### Usage examples + +tags documentation is in vim +`:h tags` + +some examples: +``` +vim -t "Compiler" +vim -t "OPS.Get" +vim -c ":ts Platform.Read" +vim -c ":ta BrowserCmd.ShowDef" +``` + +Inside vim when you have cursor on the first letter `M` of `Module.Procedure`, do this to jump to procedure definition: +`v 3e ` *(visually select the fully qualified name)* +module definition: +`` +To come back: +`` + +Putting cursor on `P` of `Module.Procedure` is not guaranteed to resolve correctly to the correct module, so choose the fully qualified name. This is a [known limitation](https://docs.ctags.io/en/latest/man/ctags-faq.7.html#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name) of `ctags` (any suggestions for to handle this better are welcome). + +To address this, you can visually select as in the above examples, or resolve ambiguities interactively: +`g ` +`:ts Write` +`:ts Platform.Write` +or make vim see the qualified name as a complete keyword: +`iskeyword+=.` +in `.vimrc` +`autocmd FileType oberon,modula2 setlocal iskeyword+=.` + +**TODO** +There is some auto-completion, with but it doesn't work well. One idea is to define a custom `omnifunc` that suggests only exported symbols (`*`) from a file (module scope is file), so that when you type `OPS.` and press `` you can have useful suggestions (similar to `showdef`). + diff --git a/oberon.ctags b/oberon.ctags index d400018f..f0ef512f 100644 --- a/oberon.ctags +++ b/oberon.ctags @@ -11,27 +11,4 @@ --regex-Oberon=/^\s*MODULE\s+([a-zA-Z][a-zA-Z0-9]*)\s*;/\1/m/{scope=push} --regex-Oberon=/^\s*PROCEDURE\s*(\^|-)?\s*([a-zA-Z][a-zA-Z0-9]*)/\2/p/{scope=ref} -# NOTE Oberon-2 receiver procedures not supported -### using ctags with vim -# examples: -# vim -t "Compiler" -# vim -t "OPS.Get" -# vim -c ":ts Platform.Read" -# -# you need to jump to the fully qualified name, since procedure names alone -# sometimes resolve to an incorrect module. that is to say putting cursor on -# W in Platform.Write and jumping will probably not work as expected, so you -# might have to do some of these -# add this to yout .vimrc -# autocmd FileType oberon,modula2 setlocal iskeyword+=. -# select the qualified name -# v 3e -# :ta Platform.Write -# resolve ambiguities interactively -# :ts Write -# g -# -# if you need upward searching for tags file, so you can access them from -# project root subdirectories, then add this to your .vimrc -# set tags=./tags;~ From 7dafb02d1ed593d36da35c31f4aacb2638722296 Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 21:40:59 +0400 Subject: [PATCH 227/241] add ctags doc --- makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/makefile b/makefile index 7bc29843..08b69845 100644 --- a/makefile +++ b/makefile @@ -92,6 +92,7 @@ usage: @echo " make revertbootstrap - Use git checkout to restore bootstrap C source directories" # Code navigation helper +# doc/ctags.md .PHONY: tags tags: ctags -R --options=oberon.ctags --extras=+q From bb7a7311979938bf2eac19900dd416f9cd0f0def Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 21:44:46 +0400 Subject: [PATCH 228/241] small change in ctags.md --- doc/ctags.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ctags.md b/doc/ctags.md index 34319208..ed646ee2 100644 --- a/doc/ctags.md +++ b/doc/ctags.md @@ -28,9 +28,9 @@ First, generate tags in project root `make tags` When you add or change names in source files, you have to regenerate the `tags` file. That can be done by running `make tags` again. Optionally, use a `vim` plugin such as [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags) to automate this process. Install it (or skip this step): -``` -git clone https://github.com/ludovicchabant/vim-gutentags ~/.vim/plugin/ -``` + +`git clone https://github.com/ludovicchabant/vim-gutentags ~/.vim/plugin/` + or wherever your vim global plugin directory is specified in `:h plugin`. Add this to your `~/.vimrc` From 9846292b85056a3f4f1978e6993fb2669a3cdcf7 Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 21:51:30 +0400 Subject: [PATCH 229/241] minor changes in docs --- doc/ctags.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ctags.md b/doc/ctags.md index ed646ee2..aab16dee 100644 --- a/doc/ctags.md +++ b/doc/ctags.md @@ -66,7 +66,7 @@ module definition: To come back: `` -Putting cursor on `P` of `Module.Procedure` is not guaranteed to resolve correctly to the correct module, so choose the fully qualified name. This is a [known limitation](https://docs.ctags.io/en/latest/man/ctags-faq.7.html#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name) of `ctags` (any suggestions for to handle this better are welcome). +Putting cursor on `P` of `Module.Procedure` is not guaranteed to resolve correctly to the correct module, so choose the fully qualified name. This is a [known limitation](https://docs.ctags.io/en/latest/man/ctags-faq.7.html#how-do-i-jump-to-the-tag-i-want-instead-of-the-wrong-one-by-the-same-name) of `ctags` (any suggestions for handling this better are welcome). To address this, you can visually select as in the above examples, or resolve ambiguities interactively: `g ` @@ -77,6 +77,6 @@ or make vim see the qualified name as a complete keyword: in `.vimrc` `autocmd FileType oberon,modula2 setlocal iskeyword+=.` -**TODO** -There is some auto-completion, with but it doesn't work well. One idea is to define a custom `omnifunc` that suggests only exported symbols (`*`) from a file (module scope is file), so that when you type `OPS.` and press `` you can have useful suggestions (similar to `showdef`). +**TODO** +There is some auto-completion, but it doesn't work well. One idea is to define a custom `omnifunc` that suggests only exported symbols (`*`) from a file (module scope is file), so that when you type `OPS.` and press `` you can have useful suggestions (similar to `showdef`). From 1fbbb68dc7f72196dd59db1bd8e24529b8adb89c Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 21:56:16 +0400 Subject: [PATCH 230/241] rewording ctags doc --- doc/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ctags.md b/doc/ctags.md index aab16dee..30680898 100644 --- a/doc/ctags.md +++ b/doc/ctags.md @@ -2,7 +2,7 @@ [`ctags`](https://github.com/universal-ctags/ctags) is a tool that creates an index file for names (symbols) in various programming langauges, which helps code comprehension by giving information to text editors to search, locate, and interactively suggest names. Particularly for Oberon, the `oberon.ctags` file, located in the project root, contains definitions for Oberon modules and procedures (but not receiver procedures). -Below you can find installation instructions and usage examples for `ctags`, in particular, using the universal tags implementation (not tested with other implementations), with `vim` (you can find or add guides for your text editor), with examples that deal with Oberon source code. +Below you can find installation instructions and usage examples for `ctags` to navigate Oberon source code, in particular, using the universal tags implementation (not tested with other implementations), with `vim` (you can find or add guides for your text editor). ## Install universal tags From 378de4327444f79c5a8797b592fd53c51500d74e Mon Sep 17 00:00:00 2001 From: sevoves Date: Fri, 4 Apr 2025 22:00:31 +0400 Subject: [PATCH 231/241] rewording doc/ctags.md --- doc/ctags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ctags.md b/doc/ctags.md index 30680898..d6e8a40d 100644 --- a/doc/ctags.md +++ b/doc/ctags.md @@ -1,6 +1,6 @@ ## Code navigation with ctags -[`ctags`](https://github.com/universal-ctags/ctags) is a tool that creates an index file for names (symbols) in various programming langauges, which helps code comprehension by giving information to text editors to search, locate, and interactively suggest names. Particularly for Oberon, the `oberon.ctags` file, located in the project root, contains definitions for Oberon modules and procedures (but not receiver procedures). +[`ctags`](https://github.com/universal-ctags/ctags) is a tool that creates an index file for names in various programming langauges, which helps code comprehension by giving information to text editors to search, locate, and interactively suggest names, identifiers, symbols etc. Particularly for Oberon, the `oberon.ctags` file, located in the project root, contains definitions for Oberon modules and procedures (but not receiver procedures). Below you can find installation instructions and usage examples for `ctags` to navigate Oberon source code, in particular, using the universal tags implementation (not tested with other implementations), with `vim` (you can find or add guides for your text editor). From f0e92c743477c8bfe25326e5eeb8dab2850fbcfc Mon Sep 17 00:00:00 2001 From: Inna Khachikyan Date: Thu, 17 Apr 2025 23:44:56 +0400 Subject: [PATCH 232/241] modified Index checking to handle run-time variable index containing negative value --- src/runtime/SYSTEM.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/runtime/SYSTEM.h b/src/runtime/SYSTEM.h index 2ecdc7f9..39d594ed 100644 --- a/src/runtime/SYSTEM.h +++ b/src/runtime/SYSTEM.h @@ -116,9 +116,11 @@ extern void Modules_AssertFail(INT32 x); // Index checking -static inline INT64 __XF(UINT64 i, UINT64 ub) {if (i >= ub) {__HALT(-2);} return i;} -#define __X(i, ub) (((i)<(ub))?i:(__HALT(-2),0)) - +static inline INT64 __XF(INT64 i, UINT64 ub) { + if (i < 0 || (UINT64)i >= ub) __HALT(-2); + return i; +} +#define __X(i, ub) (((i) >= 0 && (i) < (ub)) ? (i) : (__HALT(-2),0)) // Range checking, and checked SHORT and CHR functions From 28c327be28a3007832b1797fa4555837e2342391 Mon Sep 17 00:00:00 2001 From: Carlos Une Date: Thu, 8 May 2025 07:41:02 -0300 Subject: [PATCH 233/241] Math, MathL: add procedure fcmp --- src/runtime/Math.Mod | 26 ++++++++++++++++++++++++++ src/runtime/MathL.Mod | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/runtime/Math.Mod b/src/runtime/Math.Mod index b3ca4e6a..0d1d61f5 100644 --- a/src/runtime/Math.Mod +++ b/src/runtime/Math.Mod @@ -741,6 +741,32 @@ BEGIN t := ABS(x); RETURN arcsinh(x/sqrt(ONE - x * x)) END arctanh; +PROCEDURE fcmp* (x, y, epsilon: REAL): INTEGER; +(* fcmp: this procedure determines whether `x` and `y` are approximately equal + to a relative accuracy `epsilon`. + References: + The implementation is based on the GNU Scientific Library (GSL). + https://www.gnu.org/software/gsl/doc/html/math.html#approximate-comparison-of-floating-point-numbers +*) +VAR max, exponent0, delta, difference: REAL; +BEGIN + IF ABS(x) > ABS(y) THEN + max := x; + ELSE + max := y; + END; + exponent0 := exponent(max); + delta := 2.0*epsilon*power(2.0, exponent0); + difference := x - y; + IF difference > delta THEN + RETURN 1; + ELSIF difference < -delta THEN + RETURN -1; + ELSE + RETURN 0; (* approximately equal *) + END; +END fcmp; + PROCEDURE ToREAL(h: HUGEINT): REAL; BEGIN RETURN SYSTEM.VAL(REAL, h) END ToREAL; diff --git a/src/runtime/MathL.Mod b/src/runtime/MathL.Mod index bd17b490..b1448dc0 100644 --- a/src/runtime/MathL.Mod +++ b/src/runtime/MathL.Mod @@ -665,6 +665,32 @@ BEGIN t := ABS(x); RETURN arcsinh(x/sqrt(ONE-x*x)) END arctanh; +PROCEDURE fcmp* (x, y, epsilon: LONGREAL): INTEGER; +(* fcmp: this procedure determines whether `x` and `y` are approximately equal + to a relative accuracy `epsilon`. + References: + The implementation is based on the GNU Scientific Library (GSL). + https://www.gnu.org/software/gsl/doc/html/math.html#approximate-comparison-of-floating-point-numbers +*) +VAR max, exponent0, delta, difference: LONGREAL; +BEGIN + IF ABS(x) > ABS(y) THEN + max := x; + ELSE + max := y; + END; + exponent0 := exponent(max); + delta := 2.0D0*epsilon*power(2.0D0, exponent0); + difference := x - y; + IF difference > delta THEN + RETURN 1; + ELSIF difference < -delta THEN + RETURN -1; + ELSE + RETURN 0; (* approximately equal *) + END; +END fcmp; + PROCEDURE ToLONGREAL(h: HUGEINT): LONGREAL; BEGIN RETURN SYSTEM.VAL(LONGREAL, h) END ToLONGREAL; From 2f1ce08aff56f028b3ea0b041c1d721c5725f2be Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 14 Jun 2025 17:12:48 +0400 Subject: [PATCH 234/241] should fix type-bound procedure name mismatch between calls and definitions --- src/compiler/OPC.Mod | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/compiler/OPC.Mod b/src/compiler/OPC.Mod index d1f9027a..80e6bd66 100644 --- a/src/compiler/OPC.Mod +++ b/src/compiler/OPC.Mod @@ -409,22 +409,24 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) BEGIN IF obj # NIL THEN DefineTProcMacros(obj^.left, empty); - IF (obj^.mode = OPT.TProc) & (obj = BaseTProc(obj)) & ((OPM.currFile # OPM.HeaderFile) OR (obj^.vis = OPT.external)) THEN - OPM.WriteString("#define __"); - Ident(obj); - DeclareParams(obj^.link, TRUE); - OPM.WriteString(" __SEND("); - IF obj^.link^.typ^.form = OPT.Pointer THEN - OPM.WriteString("__TYPEOF("); Ident(obj^.link); OPM.Write(")") - ELSE Ident(obj^.link); OPM.WriteString(TagExt) - END ; - Str1(", #, ", obj^.adr DIV 10000H); - IF obj^.typ = OPT.notyp THEN OPM.WriteString('void') ELSE Ident(obj^.typ^.strobj) END ; - OPM.WriteString("(*)"); - AnsiParamList(obj^.link, FALSE); - OPM.WriteString(", "); - DeclareParams(obj^.link, TRUE); - OPM.Write(")"); OPM.WriteLn + IF (obj^.mode = OPT.TProc) & (obj = BaseTProc(obj)) THEN + IF (OPM.currFile = OPM.BodyFile) OR ((OPM.currFile = OPM.HeaderFile) & (obj^.vis = OPT.external)) THEN + OPM.WriteString("#define __"); + Ident(obj); + DeclareParams(obj^.link, TRUE); + OPM.WriteString(" __SEND("); + IF obj^.link^.typ^.form = OPT.Pointer THEN + OPM.WriteString("__TYPEOF("); Ident(obj^.link); OPM.Write(")") + ELSE Ident(obj^.link); OPM.WriteString(TagExt) + END ; + Str1(", #, ", obj^.adr DIV 10000H); + IF obj^.typ = OPT.notyp THEN OPM.WriteString('void') ELSE Ident(obj^.typ^.strobj) END ; + OPM.WriteString("(*)"); + AnsiParamList(obj^.link, FALSE); + OPM.WriteString(", "); + DeclareParams(obj^.link, TRUE); + OPM.Write(")"); OPM.WriteLn + END END ; DefineTProcMacros(obj^.right, empty) END @@ -433,7 +435,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) PROCEDURE DefineType(str: OPT.Struct); (* define a type object *) VAR obj, field, par: OPT.Object; empty: BOOLEAN; BEGIN - IF (OPM.currFile = OPM.BodyFile) OR (str^.ref < OPM.MaxStruct (*for hidden exports*) ) THEN + IF (OPM.currFile = OPM.BodyFile) OR (str^.ref < OPM.MaxStruct (*for hidden exports*) ) OR ((OPM.currFile = OPM.HeaderFile) & (str^.strobj # NIL) & (str^.strobj^.vis = OPT.external)) THEN obj := str^.strobj; IF (obj = NIL) OR Undefined(obj) THEN IF obj # NIL THEN (* check for cycles *) @@ -455,7 +457,7 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) ELSIF str^.comp IN {OPT.Array, OPT.DynArr} THEN IF (str^.BaseTyp^.strobj # NIL) & (str^.BaseTyp^.strobj^.linkadr = ProcessingType) THEN (*cyclic base type*) OPM.Mark(244, str^ .txtpos); str^.BaseTyp^.strobj^.linkadr := PredefinedType - END ; + END ; DefineType(str^.BaseTyp) ELSIF str^.form = OPT.ProcTyp THEN IF str^.BaseTyp # OPT.notyp THEN DefineType(str^.BaseTyp) END ; @@ -475,6 +477,11 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *) IF obj^.typ^.comp = OPT.Record THEN empty := TRUE; DeclareTProcs(str^.link, empty); DefineTProcMacros(str^.link, empty); IF ~empty THEN OPM.WriteLn END + ELSIF (obj^.typ^.form = OPT.Pointer) & (obj^.typ^.BaseTyp^.comp = OPT.Record) THEN + empty := TRUE; + DeclareTProcs(obj^.typ^.BaseTyp^.link, empty); + DefineTProcMacros(obj^.typ^.BaseTyp^.link, empty); + IF ~empty THEN OPM.WriteLn END END END END From dac6504f12219e6b74e1ab6e67a93676840bd7aa Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 24 Jun 2025 17:44:19 +0400 Subject: [PATCH 235/241] comments in symbol files, viewable by showdef browser. --- src/compiler/OPM.Mod | 38 +++++- src/compiler/OPS.Mod | 98 ++++++++++++-- src/compiler/OPT.Mod | 217 ++++++++++++++++++++++++------- src/library/ooc/oocIntStr.Mod | 46 +++---- src/runtime/Out.Mod | 38 ++++-- src/tools/browser/BrowserCmd.Mod | 8 ++ 6 files changed, 348 insertions(+), 97 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index b64e1e94..8e9f100b 100755 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -8,6 +8,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) CONST OptionChar* = "-"; + MaxCommentLen* = 256; (* compiler option flag bits; don't change the encoding *) inxchk* = 0; (* index check on *) @@ -76,15 +77,16 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) BFext = ".c"; (* body file extension *) HFext = ".h"; (* header file extension *) SFtag = 0F7X; (* symbol file tag *) - SFver = 083X; (* symbol file version. Increment if symbol file format is changed. *) - - + SFver = 084X; (* symbol file version. Increment if symbol file format is changed. *) TYPE FileName = ARRAY 32 OF CHAR; VAR + currentComment: ARRAY MaxCommentLen OF CHAR; + hasComment: BOOLEAN; + SourceFileName : ARRAY 256 OF CHAR; GlobalModel, Model*: ARRAY 10 OF CHAR; (* 2: S8/I16/L32, C: S16/I32/L64, V:S8/I32/L64 *) @@ -150,6 +152,33 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) LogW("."); END LogCompiling; + (* for exported comments *) + PROCEDURE StoreComment*(text: ARRAY OF CHAR); + VAR i: INTEGER; + BEGIN + i := 0; + WHILE (i < MaxCommentLen - 1) & (text[i] # 0X) DO + currentComment[i] := text[i]; INC(i) + END; + currentComment[i] := 0X; + hasComment := TRUE; + END StoreComment; + + PROCEDURE GetComment*(VAR text: ARRAY OF CHAR); + VAR i: INTEGER; + BEGIN + IF hasComment THEN + i := 0; + WHILE (i < LEN(text)) & (i < MaxCommentLen) & (currentComment[i] # 0X) DO + text[i] := currentComment[i]; INC(i) + END; + text[i] := 0X; + hasComment := FALSE + ELSE + text[0] := 0X + END; + END GetComment; + (* Integer size support *) @@ -830,4 +859,7 @@ BEGIN MinReal := -MaxReal; MinLReal := -MaxLReal; FindInstallDir; + + hasComment := FALSE; + currentComment[0] := 0X; END OPM. diff --git a/src/compiler/OPS.Mod b/src/compiler/OPS.Mod index 9cb59e37..ab68d629 100644 --- a/src/compiler/OPS.Mod +++ b/src/compiler/OPS.Mod @@ -190,22 +190,92 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) PROCEDURE Get*(VAR sym: SHORTINT); VAR s: SHORTINT; - PROCEDURE Comment; (* do not read after end of file *) - BEGIN OPM.Get(ch); - LOOP - LOOP - WHILE ch = "(" DO OPM.Get(ch); - IF ch = "*" THEN Comment END - END ; - IF ch = "*" THEN OPM.Get(ch); EXIT END ; - IF ch = OPM.Eot THEN EXIT END ; - OPM.Get(ch) - END ; - IF ch = ")" THEN OPM.Get(ch); EXIT END ; - IF ch = OPM.Eot THEN err(5); EXIT END - END + PROCEDURE Comment; + VAR + isExported: BOOLEAN; + commentText: ARRAY OPM.MaxCommentLen OF CHAR; + i: INTEGER; + nestLevel: INTEGER; + prevCh, nextCh: CHAR; + BEGIN + FOR i := 0 TO LEN(commentText) - 1 DO + commentText[i] := 0X + END; + + isExported := FALSE; + i := 0; + nestLevel := 1; + prevCh := 0X; + + OPM.Get(ch); + + IF ch = "*" THEN + isExported := TRUE; + OPM.Get(ch); + IF ch = ")" THEN + (* Empty exported comment (**), handle and return *) + commentText[0] := 0X; + OPM.StoreComment(commentText); + OPM.Get(ch); (* consume character after closing comment *) + RETURN + END + END; + + WHILE (nestLevel > 0) & (ch # OPM.Eot) DO + IF (prevCh = "(") & (ch = "*") THEN + INC(nestLevel); + prevCh := 0X + ELSIF (prevCh = "*") & (ch = ")") THEN + DEC(nestLevel); + IF nestLevel = 0 THEN + OPM.Get(ch); (* move past ')' *) + ELSE + prevCh := 0X + END + ELSE + IF isExported & (nestLevel = 1) & (prevCh # 0X) THEN + IF i < OPM.MaxCommentLen - 1 THEN + commentText[i] := prevCh; INC(i) + END + END; + + prevCh := ch + END; + + IF nestLevel > 0 THEN OPM.Get(ch) END + END; + + IF ch = OPM.Eot THEN + err(5) + END; + (* + IF isExported & (nestLevel = 0) & (prevCh # 0X) & (prevCh # "*") & (i < OPM.MaxCommentLen - 2) THEN + commentText[i] := prevCh; + INC(i) + END; + *) + IF isExported & (nestLevel = 0) & (prevCh # 0X) & (prevCh # "*") THEN + IF i < OPM.MaxCommentLen - 1 THEN + commentText[i] := prevCh; + INC(i) + ELSE + OPM.LogWStr("Truncating final comment character"); OPM.LogWLn + END + END; + + + IF isExported THEN + IF i >= OPM.MaxCommentLen THEN + OPM.LogWStr("Warning: commentText overflow"); OPM.LogWLn; + i := OPM.MaxCommentLen - 1 + END; + commentText[i] := 0X; + OPM.StoreComment(commentText) + END; + END Comment; + BEGIN OPM.errpos := OPM.curpos-1; WHILE ch <= " " DO (*ignore control characters*) diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index 758bb505..a2e5f913 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -46,7 +46,8 @@ TYPE typ*: Struct; conval*: Const; adr*, linkadr*: LONGINT; - x*: INTEGER (* linkadr and x can be freely used by the backend *) + x*: INTEGER; (* linkadr and x can be freely used by the backend *) + comment*: ConstExt; END; CONST @@ -178,6 +179,7 @@ CONST Shdptr* = 27; Shdpro* = 28; Stpro* = 29; Shdtpro* = 30; Sxpro* = 31; Sipro* = 32; Scpro* = 33; Sstruct* = 34; Ssys* = 35; Sptr* = 36; Sarr* = 37; Sdarr* = 38; Srec* = 39; Spro* = 40; Slink* = 37; + Scomment* = 41; TYPE ImpCtxt = RECORD @@ -367,7 +369,15 @@ END NewConst; PROCEDURE NewObj*(): Object; VAR obj: Object; -BEGIN NEW(obj); RETURN obj +BEGIN + NEW(obj); + (* lets fully init pointers *) + obj^.typ := NIL; + obj^.conval := NIL; + obj^.comment := NIL; + obj^.name := ""; + + RETURN obj END NewObj; PROCEDURE NewStr*(form, comp: SHORTINT): Struct; @@ -468,8 +478,16 @@ BEGIN END FindField; PROCEDURE Insert*(VAR name: OPS.Name; VAR obj: Object); - VAR ob0, ob1: Object; left: BOOLEAN; mnolev: SHORTINT; -BEGIN ob0 := topScope; ob1 := ob0^.right; left := FALSE; +VAR + ob0, ob1: Object; + left: BOOLEAN; + mnolev: SHORTINT; + commentText: ARRAY OPM.MaxCommentLen OF CHAR; + j: INTEGER; +BEGIN + ob0 := topScope; + ob1 := ob0^.right; + left := FALSE; LOOP IF ob1 # NIL THEN IF name < ob1^.name THEN ob0 := ob1; ob1 := ob0^.left; left := TRUE @@ -480,13 +498,24 @@ BEGIN ob0 := topScope; ob1 := ob0^.right; left := FALSE; IF left THEN ob0^.left := ob1 ELSE ob0^.right := ob1 END; ob1^.left := NIL; ob1^.right := NIL; COPY(name, ob1^.name); mnolev := topScope^.mnolev; ob1^.mnolev := mnolev; + (* Attach pending comment *) + OPM.GetComment(commentText); + IF commentText[0] # 0X THEN + NEW(ob1^.comment); + (*COPY(commentText, ob1^.comment^);*) + j := 0; + WHILE (j < OPM.MaxCommentLen - 1) & (commentText[j] # 0X) DO + ob1^.comment^[j] := commentText[j]; + INC(j) + END; + ob1^.comment^[j] := 0X; + END; EXIT END END; obj := ob1 END Insert; - (*-------------------------- Fingerprinting --------------------------*) (* Fingerprints prevent structural type equivalence. *) @@ -791,13 +820,25 @@ PROCEDURE InSign(mno: SHORTINT; VAR res: Struct; VAR par: Object); VAR last, new: Object; tag: LONGINT; BEGIN InStruct(res); - tag := OPM.SymRInt(); last := NIL; + tag := OPM.SymRInt(); + last := NIL; WHILE tag # Send DO - new := NewObj(); new^.mnolev := -mno; + + (* Add bounds checking *) + IF (tag < 0) OR (tag > 100) THEN + OPM.LogWStr("ERROR: Invalid tag value in InSign: "); OPM.LogWNum(tag, 0); OPM.LogWLn; + OPM.err(155); (* symbol file corrupted *) + RETURN + END; + + new := NewObj(); + new^.mnolev := -mno; IF last = NIL THEN par := new ELSE last^.link := new END; IF tag = Svalpar THEN new^.mode := Var ELSE new^.mode := VarPar END; - InStruct(new^.typ); new^.adr := OPM.SymRInt(); InName(new^.name); - last := new; tag := OPM.SymRInt() + InStruct(new^.typ); + new^.adr := OPM.SymRInt(); InName(new^.name); + last := new; + tag := OPM.SymRInt(); END END InSign; @@ -973,11 +1014,46 @@ BEGIN END END InStruct; + PROCEDURE InObj(mno: SHORTINT): Object; (* first number in impCtxt.nextTag *) VAR i, s: INTEGER; ch: CHAR; obj, old: Object; typ: Struct; tag: LONGINT; ext: ConstExt; + commentText: OPS.Name; + hasComment : BOOLEAN; + j: INTEGER; + len: LONGINT; BEGIN tag := impCtxt.nextTag; + hasComment := FALSE; + + (* checking for comment first, but not processing it yet *) + WHILE tag = Scomment DO (* Handle multiple consecutive comments *) + len := OPM.SymRInt(); (* read length *) + + (* Ensure length is within bounds *) + IF len < 0 THEN len := 0 END; + IF len > OPS.MaxStrLen - 1 THEN len := OPS.MaxStrLen - 1 END; + + i := 0; + WHILE i < len DO + OPM.SymRCh(commentText[i]); INC(i) + END; + commentText[i] := 0X; + hasComment := TRUE; (* Only keep the last comment if there are multiple *) + + tag := OPM.SymRInt(); (* continue stream *) + END; + + (* Now tag should be a valid object tag *) + impCtxt.nextTag := tag; + + (* Validate tag value *) + IF (tag < 0) OR (tag > 50) THEN + OPM.LogWStr("ERROR: Invalid tag in InObj: "); OPM.LogWNum(tag, 0); OPM.LogWLn; + OPM.err(155); (* Symbol file error *) + RETURN NIL + END; + IF tag = Stype THEN InStruct(typ); obj := typ^.strobj; IF ~impCtxt.self THEN obj^.vis := external END (* type name visible now, obj^.fprint already done *) @@ -986,7 +1062,7 @@ BEGIN IF tag <= Pointer THEN (* Constant *) obj^.mode := Con; obj^.conval := NewConst(); InConstant(tag, obj^.conval); obj^.typ := InTyp(tag) - ELSIF tag >= Sxpro THEN + ELSIF (tag >= Sxpro) & (tag <= Scpro) THEN (* Procedure tags *) obj^.conval := NewConst(); obj^.conval^.intval := -1; InSign(mno, obj^.typ, obj^.link); @@ -998,16 +1074,33 @@ BEGIN s := SHORT(OPM.SymRInt()); ext^[0] := CHR(s); i := 1; WHILE i <= s DO OPM.SymRCh(ext^[i]); INC(i) END ELSE OPM.LogWStr("unhandled case at InObj, tag = "); OPM.LogWNum(tag, 0); OPM.LogWLn; + OPM.err(155); RETURN NIL END ELSIF tag = Salias THEN obj^.mode := Typ; InStruct(obj^.typ) - ELSE + ELSIF (tag = Svar) OR (tag = Srvar) THEN obj^.mode := Var; IF tag = Srvar THEN obj^.vis := externalR END; InStruct(obj^.typ) + ELSE + OPM.LogWStr("ERROR: Unexpected tag in InObj: "); OPM.LogWNum(tag, 0); OPM.LogWLn; + OPM.err(155); (* Symbol file error *) + RETURN NIL END; InName(obj^.name) END; + + (* attaching exported comment after the object was created *) + IF hasComment & (obj # NIL) THEN + NEW(obj^.comment); + j := 0; + WHILE (j < OPM.MaxCommentLen - 1) & (j < len) & (commentText[j] # 0X) DO + obj^.comment^[j] := commentText[j]; + INC(j) + END; + obj^.comment^[j] := 0X; + END; + FPrintObj(obj); IF (obj^.mode = Var) & ((obj^.typ^.strobj = NIL) OR (obj^.typ^.strobj^.name = "")) THEN (* compute a global fingerprint to avoid structural type equivalence for anonymous types *) @@ -1040,6 +1133,8 @@ BEGIN RETURN obj END InObj; + + PROCEDURE Import*(aliasName: OPS.Name; VAR name: OPS.Name; VAR done: BOOLEAN); VAR obj: Object; mno: SHORTINT; (* done used in Browser *) BEGIN @@ -1226,45 +1321,71 @@ END Import; END END OutConstant; - PROCEDURE OutObj(obj: Object); - VAR i, j: INTEGER; ext: ConstExt; - BEGIN - IF obj # NIL THEN - OutObj(obj^.left); - IF obj^.mode IN {Con, Typ, Var, LProc, XProc, CProc, IProc} THEN - IF obj^.history = removed THEN FPrintErr(obj, 250) - ELSIF obj^.vis # internal THEN - CASE obj^.history OF - | inserted: FPrintErr(obj, 253) - | same: (* ok *) - | pbmodified: FPrintErr(obj, 252) - | pvmodified: FPrintErr(obj, 251) - ELSE OPM.LogWStr("unhandled case at OutObj, obj^.history = "); OPM.LogWNum(obj^.history, 0); OPM.LogWLn; - END; - CASE obj^.mode OF - | Con: OutConstant(obj); OutName(obj^.name) - | Typ: IF obj^.typ^.strobj = obj THEN OPM.SymWInt(Stype); OutStr(obj^.typ) - ELSE OPM.SymWInt(Salias); OutStr(obj^.typ); OutName(obj^.name) - END - | Var: IF obj^.vis = externalR THEN OPM.SymWInt(Srvar) ELSE OPM.SymWInt(Svar) END; - OutStr(obj^.typ); OutName(obj^.name); - IF (obj^.typ^.strobj = NIL) OR (obj^.typ^.strobj^.name = "") THEN - (* compute fingerprint to avoid structural type equivalence *) - OPM.FPrint(expCtxt.reffp, obj^.typ^.ref) - END - | XProc: OPM.SymWInt(Sxpro); OutSign(obj^.typ, obj^.link); OutName(obj^.name) - | IProc: OPM.SymWInt(Sipro); OutSign(obj^.typ, obj^.link); OutName(obj^.name) - | CProc: OPM.SymWInt(Scpro); OutSign(obj^.typ, obj^.link); ext := obj^.conval^.ext; - j := ORD(ext^[0]); i := 1; OPM.SymWInt(j); - WHILE i <= j DO OPM.SymWCh(ext^[i]); INC(i) END; - OutName(obj^.name) - ELSE OPM.LogWStr("unhandled case at OutObj, obj.mode = "); OPM.LogWNum(obj.mode, 0); OPM.LogWLn; - END +PROCEDURE OutTruncatedName(text: ARRAY OF CHAR); +VAR i: INTEGER; +BEGIN + i := 0; + WHILE (i < OPS.MaxStrLen - 1) & (text[i] # 0X) DO + OPM.SymWCh(text[i]); INC(i) + END; + OPM.SymWCh(0X) +END OutTruncatedName; + + +PROCEDURE OutObj(obj: Object); + VAR i, j: INTEGER; ext: ConstExt; + k, l: INTEGER; +BEGIN + IF obj # NIL THEN + OutObj(obj^.left); + IF obj^.mode IN {Con, Typ, Var, LProc, XProc, CProc, IProc} THEN + (* Write comment BEFORE the object *) + IF obj^.comment # NIL THEN + OPM.SymWInt(Scomment); + (* Calculate actual length of comment text *) + k := 0; + WHILE (k < OPM.MaxCommentLen - 1) & (obj^.comment^[k] # 0X) DO INC(k) END; + OPM.SymWInt(k); (* length prefix *) + (* Write comment data as individual characters *) + l := 0; + WHILE l < k DO + OPM.SymWCh(obj^.comment^[l]); INC(l) END END; - OutObj(obj^.right) - END - END OutObj; + + IF obj^.history = removed THEN FPrintErr(obj, 250) + ELSIF obj^.vis # internal THEN + CASE obj^.history OF + | inserted: FPrintErr(obj, 253) + | same: (* ok *) + | pbmodified: FPrintErr(obj, 252) + | pvmodified: FPrintErr(obj, 251) + ELSE OPM.LogWStr("unhandled case at OutObj, obj^.history = "); OPM.LogWNum(obj^.history, 0); OPM.LogWLn; + END; + CASE obj^.mode OF + | Con: OutConstant(obj); OutName(obj^.name) + | Typ: IF obj^.typ^.strobj = obj THEN OPM.SymWInt(Stype); OutStr(obj^.typ) + ELSE OPM.SymWInt(Salias); OutStr(obj^.typ); OutName(obj^.name) + END + | Var: IF obj^.vis = externalR THEN OPM.SymWInt(Srvar) ELSE OPM.SymWInt(Svar) END; + OutStr(obj^.typ); OutName(obj^.name); + IF (obj^.typ^.strobj = NIL) OR (obj^.typ^.strobj^.name = "") THEN + (* compute fingerprint to avoid structural type equivalence *) + OPM.FPrint(expCtxt.reffp, obj^.typ^.ref) + END + | XProc: OPM.SymWInt(Sxpro); OutSign(obj^.typ, obj^.link); OutName(obj^.name) + | IProc: OPM.SymWInt(Sipro); OutSign(obj^.typ, obj^.link); OutName(obj^.name) + | CProc: OPM.SymWInt(Scpro); OutSign(obj^.typ, obj^.link); ext := obj^.conval^.ext; + j := ORD(ext^[0]); i := 1; OPM.SymWInt(j); + WHILE i <= j DO OPM.SymWCh(ext^[i]); INC(i) END; + OutName(obj^.name) + ELSE OPM.LogWStr("unhandled case at OutObj, obj.mode = "); OPM.LogWNum(obj.mode, 0); OPM.LogWLn; + END + END + END; + OutObj(obj^.right) + END +END OutObj; PROCEDURE Export*(VAR ext, new: BOOLEAN); VAR i: INTEGER; nofmod: SHORTINT; done: BOOLEAN; diff --git a/src/library/ooc/oocIntStr.Mod b/src/library/ooc/oocIntStr.Mod index ec98f128..b5f9d928 100644 --- a/src/library/ooc/oocIntStr.Mod +++ b/src/library/ooc/oocIntStr.Mod @@ -1,47 +1,47 @@ -(* $Id: IntStr.Mod,v 1.4 1999/09/02 13:07:47 acken Exp $ *) +(* $Id: IntStr.Mod,v 1.4 1999/09/02 13:07:47 acken Exp $ *) MODULE oocIntStr; -(* IntStr - Integer-number/string conversions. +(* IntStr - Integer-number/string conversions. Copyright (C) 1995 Michael Griebling - + This module is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as + it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) - + IMPORT Conv := oocConvTypes, IntConv := oocIntConv; - + TYPE - ConvResults*= Conv.ConvResults; - (* possible values: strAllRight, strOutOfRange, strWrongFormat, strEmpty *) + ConvResults*= Conv.ConvResults; + (** possible values: strAllRight, strOutOfRange, strWrongFormat, strEmpty *) CONST strAllRight*=Conv.strAllRight; - (* the string format is correct for the corresponding conversion *) + (** the string format is correct for the corresponding conversion *) strOutOfRange*=Conv.strOutOfRange; - (* the string is well-formed but the value cannot be represented *) + (** the string is well-formed but the value cannot be represented *) strWrongFormat*=Conv.strWrongFormat; - (* the string is in the wrong format for the conversion *) + (** the string is in the wrong format for the conversion *) strEmpty*=Conv.strEmpty; - (* the given string is empty *) - - -(* the string form of a signed whole number is + (** the given string is empty *) + + +(** the string form of a signed whole number is ["+" | "-"] decimal_digit {decimal_digit} *) - + PROCEDURE StrToInt*(str: ARRAY OF CHAR; VAR int: LONGINT; VAR res: ConvResults); -(* Ignores any leading spaces in `str'. If the subsequent characters in `str' +(** Ignores any leading spaces in `str'. If the subsequent characters in `str' are in the format of a signed whole number, assigns a corresponding value to `int'. Assigns a value indicating the format of `str' to `res'. *) BEGIN @@ -53,7 +53,7 @@ END StrToInt; PROCEDURE Reverse (VAR str : ARRAY OF CHAR; start, end : INTEGER); -(* Reverses order of characters in the interval [start..end]. *) +(** Reverses order of characters in the interval [start..end]. *) VAR h : CHAR; BEGIN @@ -65,7 +65,7 @@ END Reverse; PROCEDURE IntToStr*(int: LONGINT; VAR str: ARRAY OF CHAR); -(* Converts the value of `int' to string form and copies the possibly truncated +(** Converts the value of `int' to string form and copies the possibly truncated result to `str'. *) CONST maxLength = 11; (* maximum number of digits representing a LONGINT value *) @@ -92,9 +92,9 @@ BEGIN b[e] := 0X; Reverse(b, s, e-1) END; - + COPY(b, str) (* truncate output if necessary *) END IntToStr; - + END oocIntStr. diff --git a/src/runtime/Out.Mod b/src/runtime/Out.Mod index bdb6b8df..8895037c 100644 --- a/src/runtime/Out.Mod +++ b/src/runtime/Out.Mod @@ -1,4 +1,7 @@ MODULE Out; (* DCW Brown. 2016-09-27 *) + (** Module Out provides a set of basic routines + for formatted output of characters, numbers, and strings. + It assumes a standard output stream to which the symbols are written. *) IMPORT SYSTEM, Platform, Heap; @@ -16,11 +19,11 @@ BEGIN IF in > 0 THEN error := Platform.Write(Platform.StdOut, SYSTEM.ADR(buf), in) END; in := 0; END Flush; - +(** Initializes the output stream. In this library does nothing, safe to never use. *) PROCEDURE Open*; BEGIN END Open; - +(** Writes the character to the end of the output stream. *) PROCEDURE Char*(ch: CHAR); BEGIN IF in >= LEN(buf) THEN Flush END; @@ -32,7 +35,7 @@ PROCEDURE Length(VAR s: ARRAY OF CHAR): LONGINT; VAR l: LONGINT; BEGIN l := 0; WHILE (l < LEN(s)) & (s[l] # 0X) DO INC(l) END; RETURN l END Length; - +(** Writes the null-terminated character sequence str to the end of the output stream (without 0X). *) PROCEDURE String*(str: ARRAY OF CHAR); VAR l: LONGINT; error: Platform.ErrorCode; BEGIN @@ -46,7 +49,10 @@ BEGIN END END String; - +(** Writes the integer number x to the end of the output stream. + If the textual representation of x requires m characters, + x is right adjusted in a field of Max(n, m) characters + padded with blanks at the left end. a plus sign is not written. *) PROCEDURE Int*(x, n: HUGEINT); CONST zero = ORD('0'); VAR s: ARRAY 22 OF CHAR; i: INTEGER; negative: BOOLEAN; @@ -82,7 +88,7 @@ BEGIN ELSE Char(CHR((x MOD 16) - 10 + ORD('A'))) END END END Hex; - +(** Writes an end-of-line symbol to the end of the output stream *) PROCEDURE Ln*; BEGIN String(Platform.NL); Flush; END Ln; @@ -117,14 +123,15 @@ END Ten; PROCEDURE -Entier64(x: LONGREAL): SYSTEM.INT64 "(INT64)(x)"; -PROCEDURE RealP(x: LONGREAL; n: INTEGER; long: BOOLEAN); - -(* RealP(x, n) writes the long real number x to the end of the output stream using an +(** RealP(x, n) writes the long real number x to the end of the output stream using an exponential form. If the textual representation of x requires m characters (including a three-digit signed exponent), x is right adjusted in a field of Max(n, m) characters padded with blanks at the left end. A plus sign of the mantissa is not written. LONGREAL is 1/sign, 11/exponent, 52/significand *) +PROCEDURE RealP(x: LONGREAL; n: INTEGER; long: BOOLEAN); + + VAR e: INTEGER; (* Exponent field *) f: HUGEINT; (* Fraction field *) @@ -212,11 +219,18 @@ BEGIN WHILE i < LEN(s) DO Char(s[i]); INC(i) END END RealP; - +(** Writes the real number x to the end of the output stream using an exponential + form. If the textual representation of x requires m characters (including a + two-digit signed exponent), x is right adjusted in a field of Max(n, m) characters + padded with blanks at the left end. A plus sign of the mantissa is not written.*) PROCEDURE Real*(x: REAL; n: INTEGER); BEGIN RealP(x, n, FALSE); END Real; +(** Writes the long real number x to the end of the output stream using an exponential form. + If the textual representation of x requires m characters (including a three-digit + signed exponent), x is right adjusted in a field of Max(n, m) characters padded + with blanks at the left end. A plus sign of the mantissa is not written. *) PROCEDURE LongReal*(x: LONGREAL; n: INTEGER); BEGIN RealP(x, n, TRUE); END LongReal; @@ -224,4 +238,10 @@ END LongReal; BEGIN IsConsole := Platform.IsConsole(Platform.StdOut); in := 0 + +(** This module originally was designed by Martin Reiser + for the book "Programming in Oberon". + the specification was proposed by H. Moessenbock *) + END Out. + diff --git a/src/tools/browser/BrowserCmd.Mod b/src/tools/browser/BrowserCmd.Mod index 14df830f..30871d59 100644 --- a/src/tools/browser/BrowserCmd.Mod +++ b/src/tools/browser/BrowserCmd.Mod @@ -63,6 +63,14 @@ MODULE BrowserCmd; (* RC 29.10.93 *) (* object model 4.12.93, command line ver IF obj # NIL THEN Objects(obj^.left, mode); IF obj^.mode IN mode THEN + (* Output comment if present *) + IF obj^.comment # NIL THEN + Indent(1); + Ws("(** "); + Ws(obj^.comment^); + Ws(" *)"); + Wln + END; CASE obj^.mode OF |OPT.Con: Indent(2); Ws(obj^.name); Ws(" = "); CASE obj^.typ^.form OF From a9465ccfc6510de08b3daeadd4d5f38ed9d32aae Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 24 Jun 2025 18:27:35 +0400 Subject: [PATCH 236/241] bootstrap sources. --- bootstrap/SYSTEM.h | 8 +- bootstrap/unix-44/Compiler.c | 2 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 59 ++++++++------- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 42 ++++++++++- bootstrap/unix-44/OPM.h | 4 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 80 +++++++++++++++----- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 107 ++++++++++++++++++++++++++- bootstrap/unix-44/OPT.h | 3 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Out.c | 2 +- bootstrap/unix-44/Out.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/VT100.c | 2 +- bootstrap/unix-44/VT100.h | 2 +- bootstrap/unix-44/extTools.c | 4 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-48/Compiler.c | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 59 ++++++++------- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 42 ++++++++++- bootstrap/unix-48/OPM.h | 4 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 80 +++++++++++++++----- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 107 ++++++++++++++++++++++++++- bootstrap/unix-48/OPT.h | 3 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Out.c | 2 +- bootstrap/unix-48/Out.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/VT100.c | 2 +- bootstrap/unix-48/VT100.h | 2 +- bootstrap/unix-48/extTools.c | 4 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-88/Compiler.c | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 59 ++++++++------- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 42 ++++++++++- bootstrap/unix-88/OPM.h | 4 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 80 +++++++++++++++----- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 107 ++++++++++++++++++++++++++- bootstrap/unix-88/OPT.h | 3 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Out.c | 2 +- bootstrap/unix-88/Out.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/VT100.c | 2 +- bootstrap/unix-88/VT100.h | 2 +- bootstrap/unix-88/extTools.c | 4 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/windows-48/Compiler.c | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 59 ++++++++------- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 42 ++++++++++- bootstrap/windows-48/OPM.h | 4 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 80 +++++++++++++++----- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 107 ++++++++++++++++++++++++++- bootstrap/windows-48/OPT.h | 3 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Out.c | 2 +- bootstrap/windows-48/Out.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/VT100.c | 2 +- bootstrap/windows-48/VT100.h | 2 +- bootstrap/windows-48/extTools.c | 4 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-88/Compiler.c | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 59 ++++++++------- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 42 ++++++++++- bootstrap/windows-88/OPM.h | 4 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 80 +++++++++++++++----- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 107 ++++++++++++++++++++++++++- bootstrap/windows-88/OPT.h | 3 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Out.c | 2 +- bootstrap/windows-88/Out.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/VT100.c | 2 +- bootstrap/windows-88/VT100.h | 2 +- bootstrap/windows-88/extTools.c | 4 +- bootstrap/windows-88/extTools.h | 2 +- src/library/ooc/oocIntStr.Mod | 20 ++--- 187 files changed, 1390 insertions(+), 443 deletions(-) diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 2ecdc7f9..39d594ed 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -116,9 +116,11 @@ extern void Modules_AssertFail(INT32 x); // Index checking -static inline INT64 __XF(UINT64 i, UINT64 ub) {if (i >= ub) {__HALT(-2);} return i;} -#define __X(i, ub) (((i)<(ub))?i:(__HALT(-2),0)) - +static inline INT64 __XF(INT64 i, UINT64 ub) { + if (i < 0 || (UINT64)i >= ub) __HALT(-2); + return i; +} +#define __X(i, ub) (((i) >= 0 && (i) < (ub)) ? (i) : (__HALT(-2),0)) // Range checking, and checked SHORT and CHR functions diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 1807e545..4460479d 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index fb7a8f35..fa87c9de 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index c8bae246..c3c54eed 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 7ce57bc2..54341368 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 3622bbe7..ccdabcc2 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index df721094..42552415 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index dbc11b6f..3cde1c3b 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 00137463..535721e8 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 22468d7d..26d86b38 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 4d4925c6..913fbf2d 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index cb41ad3d..f66fcd66 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index dc9da7db..7b92ccc1 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -618,31 +618,33 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty) { if (obj != NIL) { OPC_DefineTProcMacros(obj->left, &*empty); - if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) { - OPM_WriteString((CHAR*)"#define __", 11); - OPC_Ident(obj); - OPC_DeclareParams(obj->link, 1); - OPM_WriteString((CHAR*)" __SEND(", 9); - if (obj->link->typ->form == 11) { - OPM_WriteString((CHAR*)"__TYPEOF(", 10); - OPC_Ident(obj->link); + if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) { + if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) { + OPM_WriteString((CHAR*)"#define __", 11); + OPC_Ident(obj); + OPC_DeclareParams(obj->link, 1); + OPM_WriteString((CHAR*)" __SEND(", 9); + if (obj->link->typ->form == 11) { + OPM_WriteString((CHAR*)"__TYPEOF(", 10); + OPC_Ident(obj->link); + OPM_Write(')'); + } else { + OPC_Ident(obj->link); + OPM_WriteString((CHAR*)"__typ", 6); + } + OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); + if (obj->typ == OPT_notyp) { + OPM_WriteString((CHAR*)"void", 5); + } else { + OPC_Ident(obj->typ->strobj); + } + OPM_WriteString((CHAR*)"(*)", 4); + OPC_AnsiParamList(obj->link, 0); + OPM_WriteString((CHAR*)", ", 3); + OPC_DeclareParams(obj->link, 1); OPM_Write(')'); - } else { - OPC_Ident(obj->link); - OPM_WriteString((CHAR*)"__typ", 6); + OPM_WriteLn(); } - OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); - if (obj->typ == OPT_notyp) { - OPM_WriteString((CHAR*)"void", 5); - } else { - OPC_Ident(obj->typ->strobj); - } - OPM_WriteString((CHAR*)"(*)", 4); - OPC_AnsiParamList(obj->link, 0); - OPM_WriteString((CHAR*)", ", 3); - OPC_DeclareParams(obj->link, 1); - OPM_Write(')'); - OPM_WriteLn(); } OPC_DefineTProcMacros(obj->right, &*empty); } @@ -652,7 +654,7 @@ static void OPC_DefineType (OPT_Struct str) { OPT_Object obj = NIL, field = NIL, par = NIL; BOOLEAN empty; - if (OPM_currFile == 1 || str->ref < 255) { + if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) { obj = str->strobj; if (obj == NIL || OPC_Undefined(obj)) { if (obj != NIL) { @@ -719,6 +721,13 @@ static void OPC_DefineType (OPT_Struct str) if (!empty) { OPM_WriteLn(); } + } else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) { + empty = 1; + OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty); + OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty); + if (!empty) { + OPM_WriteLn(); + } } } } diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index fd7ddb5e..3bfd88b8 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index d2462ff6..bcb39247 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,8 @@ typedef CHAR OPM_FileName[32]; +static CHAR OPM_currentComment[256]; +static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; export CHAR OPM_Model[10]; @@ -59,6 +61,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); +export void OPM_GetComment (CHAR *text, ADDRESS text__len); export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); @@ -82,6 +85,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); +export void OPM_StoreComment (CHAR *text, ADDRESS text__len); export void OPM_SymRCh (CHAR *ch); export INT32 OPM_SymRInt (void); export INT64 OPM_SymRInt64 (void); @@ -157,6 +161,36 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) __DEL(modname); } +void OPM_StoreComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; + i += 1; + } + OPM_currentComment[__X(i, 256)] = 0x00; + OPM_hasComment = 1; + __DEL(text); +} + +void OPM_GetComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + if (OPM_hasComment) { + i = 0; + while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; + i += 1; + } + text[__X(i, text__len)] = 0x00; + OPM_hasComment = 0; + } else { + text[0] = 0x00; + } +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -763,7 +797,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x83) { + if (tag != 0xf7 || ver != 0x84) { if (!__IN(4, OPM_Options, 32)) { OPM_err(-306); } @@ -834,7 +868,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x84); } else { OPM_err(153); } @@ -1143,5 +1177,7 @@ export void *OPM__init(void) OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; OPM_FindInstallDir(); + OPM_hasComment = 0; + OPM_currentComment[0] = 0x00; __ENDMOD; } diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 14ef9200..64c15a28 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -30,6 +30,7 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); +import void OPM_GetComment (CHAR *text, ADDRESS text__len); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); @@ -48,6 +49,7 @@ import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); import INT64 OPM_SignedMinimum (INT32 bytecount); +import void OPM_StoreComment (CHAR *text, ADDRESS text__len); import void OPM_SymRCh (CHAR *ch); import INT32 OPM_SymRInt (void); import INT64 OPM_SymRInt64 (void); diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 2bbed37b..ad4a370a 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 5980afc3..3d8cefe8 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 95456407..a25a2c12 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -279,32 +279,74 @@ static void Comment__2 (void); static void Comment__2 (void) { + BOOLEAN isExported; + CHAR commentText[256]; + INT16 i, nestLevel; + CHAR prevCh, nextCh; + i = 0; + while (i <= 255) { + commentText[__X(i, 256)] = 0x00; + i += 1; + } + isExported = 0; + i = 0; + nestLevel = 1; + prevCh = 0x00; OPM_Get(&OPS_ch); - for (;;) { - for (;;) { - while (OPS_ch == '(') { + if (OPS_ch == '*') { + isExported = 1; + OPM_Get(&OPS_ch); + if (OPS_ch == ')') { + commentText[0] = 0x00; + OPM_StoreComment(commentText, 256); + OPM_Get(&OPS_ch); + return; + } + } + while ((nestLevel > 0 && OPS_ch != 0x00)) { + if ((prevCh == '(' && OPS_ch == '*')) { + nestLevel += 1; + prevCh = 0x00; + } else if ((prevCh == '*' && OPS_ch == ')')) { + nestLevel -= 1; + if (nestLevel == 0) { OPM_Get(&OPS_ch); - if (OPS_ch == '*') { - Comment__2(); + } else { + prevCh = 0x00; + } + } else { + if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; } } - if (OPS_ch == '*') { - OPM_Get(&OPS_ch); - break; - } - if (OPS_ch == 0x00) { - break; - } + prevCh = OPS_ch; + } + if (nestLevel > 0) { OPM_Get(&OPS_ch); } - if (OPS_ch == ')') { - OPM_Get(&OPS_ch); - break; + } + if (OPS_ch == 0x00) { + OPS_err(5); + } + if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; + } else { + OPM_LogWStr((CHAR*)"Truncating final comment character", 35); + OPM_LogWLn(); } - if (OPS_ch == 0x00) { - OPS_err(5); - break; + } + if (isExported) { + if (i >= 256) { + OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); + OPM_LogWLn(); + i = 255; } + commentText[__X(i, 256)] = 0x00; + OPM_StoreComment(commentText, 256); } } diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index f4851b8a..19e222ac 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 9e34302b..72261b24 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -83,6 +83,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef @@ -173,6 +174,7 @@ static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj); +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len); export OPT_Struct OPT_SetType (INT32 size); export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir); export INT32 OPT_SizeAlignment (INT32 size); @@ -388,6 +390,10 @@ OPT_Object OPT_NewObj (void) { OPT_Object obj = NIL; __NEW(obj, OPT_ObjDesc); + obj->typ = NIL; + obj->conval = NIL; + obj->comment = NIL; + obj->name[0] = 0x00; return obj; } @@ -554,6 +560,8 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; + CHAR commentText[256]; + INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; left = 0; @@ -585,6 +593,16 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) __COPY(name, ob1->name, 256); mnolev = OPT_topScope->mnolev; ob1->mnolev = mnolev; + OPM_GetComment((void*)commentText, 256); + if (commentText[0] != 0x00) { + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { + (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*ob1->comment)[__X(j, 256)] = 0x00; + } break; } } @@ -1103,6 +1121,13 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) tag = OPM_SymRInt(); last = NIL; while (tag != 18) { + if (tag < 0 || tag > 100) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return; + } new = OPT_NewObj(); new->mnolev = -mno; if (last == NIL) { @@ -1381,7 +1406,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; + OPS_Name commentText; + BOOLEAN hasComment; + INT16 j; + INT32 len; tag = OPT_impCtxt.nextTag; + hasComment = 0; + while (tag == 41) { + len = OPM_SymRInt(); + if (len < 0) { + len = 0; + } + if (len > 255) { + len = 255; + } + i = 0; + while (i < len) { + OPM_SymRCh(&commentText[__X(i, 256)]); + i += 1; + } + commentText[__X(i, 256)] = 0x00; + hasComment = 1; + tag = OPM_SymRInt(); + } + OPT_impCtxt.nextTag = tag; + if (tag < 0 || tag > 50) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; + } if (tag == 19) { OPT_InStruct(&typ); obj = typ->strobj; @@ -1397,7 +1452,7 @@ static OPT_Object OPT_InObj (INT8 mno) obj->conval = OPT_NewConst(); OPT_InConstant(tag, obj->conval); obj->typ = OPT_InTyp(tag); - } else if (tag >= 31) { + } else if ((tag >= 31 && tag <= 33)) { obj->conval = OPT_NewConst(); obj->conval->intval = -1; OPT_InSign(mno, &obj->typ, &obj->link); @@ -1424,20 +1479,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32); OPM_LogWNum(tag, 0); OPM_LogWLn(); + OPM_err(155); + return NIL; break; } } else if (tag == 20) { obj->mode = 5; OPT_InStruct(&obj->typ); - } else { + } else if (tag == 21 || tag == 22) { obj->mode = 1; if (tag == 22) { obj->vis = 2; } OPT_InStruct(&obj->typ); + } else { + OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; } OPT_InName((void*)obj->name, 256); } + if ((hasComment && obj != NIL)) { + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { + (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*obj->comment)[__X(j, 256)] = 0x00; + } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255); @@ -1780,13 +1852,40 @@ static void OPT_OutConstant (OPT_Object obj) } } +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_SymWCh(text[__X(i, text__len)]); + i += 1; + } + OPM_SymWCh(0x00); + __DEL(text); +} + static void OPT_OutObj (OPT_Object obj) { INT16 i, j; OPT_ConstExt ext = NIL; + INT16 k, l; if (obj != NIL) { OPT_OutObj(obj->left); if (__IN(obj->mode, 0x06ea, 32)) { + if (obj->comment != NIL) { + OPM_SymWInt(41); + k = 0; + while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 256)]); + l += 1; + } + } if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { @@ -2026,7 +2125,7 @@ static void EnumPtrs(void (*P)(void*)) } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 32), {0, -8}}; -__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 304), {0, 4, 8, 12, 284, 288, -28}}; +__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 308), {0, 4, 8, 12, 284, 288, 304, -32}}; __TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 56), {44, 48, 52, -16}}; __TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 28), {0, 4, 8, 16, 20, 24, -28}}; __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index d2f8d9fe..cf456af5 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h @@ -61,6 +61,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index ecef063d..0425b2e0 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 44652222..fbabd8f4 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Out.c b/bootstrap/unix-44/Out.c index d5a45e43..ce936589 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Out.h b/bootstrap/unix-44/Out.h index a008c089..a72547f4 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 61463b51..befa6033 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 89ce40d3..fbeef8c7 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index f4cc31eb..512ec2c4 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 04ff0d7c..93e7fa75 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 629009fa..4b18812f 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 6acdef43..f0e3ae34 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 369d0244..7e7522c2 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 3c805fbe..dc569fa9 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/VT100.c b/bootstrap/unix-44/VT100.c index c5e8a3ba..346fb37b 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-44/VT100.h b/bootstrap/unix-44/VT100.h index 94b7b846..4e708647 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index cf90fa2a..ce2fc413 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { __DUP(additionalopts, additionalopts__len, CHAR); - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 6b1b37eb..686f0b4e 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/Compiler.c b/bootstrap/unix-48/Compiler.c index 1807e545..4460479d 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index fb7a8f35..fa87c9de 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index c8bae246..c3c54eed 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 7ce57bc2..54341368 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 3622bbe7..ccdabcc2 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index df721094..42552415 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index dbc11b6f..3cde1c3b 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 00137463..535721e8 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 22468d7d..26d86b38 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 4d4925c6..913fbf2d 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index cb41ad3d..f66fcd66 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index dc9da7db..7b92ccc1 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -618,31 +618,33 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty) { if (obj != NIL) { OPC_DefineTProcMacros(obj->left, &*empty); - if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) { - OPM_WriteString((CHAR*)"#define __", 11); - OPC_Ident(obj); - OPC_DeclareParams(obj->link, 1); - OPM_WriteString((CHAR*)" __SEND(", 9); - if (obj->link->typ->form == 11) { - OPM_WriteString((CHAR*)"__TYPEOF(", 10); - OPC_Ident(obj->link); + if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) { + if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) { + OPM_WriteString((CHAR*)"#define __", 11); + OPC_Ident(obj); + OPC_DeclareParams(obj->link, 1); + OPM_WriteString((CHAR*)" __SEND(", 9); + if (obj->link->typ->form == 11) { + OPM_WriteString((CHAR*)"__TYPEOF(", 10); + OPC_Ident(obj->link); + OPM_Write(')'); + } else { + OPC_Ident(obj->link); + OPM_WriteString((CHAR*)"__typ", 6); + } + OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); + if (obj->typ == OPT_notyp) { + OPM_WriteString((CHAR*)"void", 5); + } else { + OPC_Ident(obj->typ->strobj); + } + OPM_WriteString((CHAR*)"(*)", 4); + OPC_AnsiParamList(obj->link, 0); + OPM_WriteString((CHAR*)", ", 3); + OPC_DeclareParams(obj->link, 1); OPM_Write(')'); - } else { - OPC_Ident(obj->link); - OPM_WriteString((CHAR*)"__typ", 6); + OPM_WriteLn(); } - OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); - if (obj->typ == OPT_notyp) { - OPM_WriteString((CHAR*)"void", 5); - } else { - OPC_Ident(obj->typ->strobj); - } - OPM_WriteString((CHAR*)"(*)", 4); - OPC_AnsiParamList(obj->link, 0); - OPM_WriteString((CHAR*)", ", 3); - OPC_DeclareParams(obj->link, 1); - OPM_Write(')'); - OPM_WriteLn(); } OPC_DefineTProcMacros(obj->right, &*empty); } @@ -652,7 +654,7 @@ static void OPC_DefineType (OPT_Struct str) { OPT_Object obj = NIL, field = NIL, par = NIL; BOOLEAN empty; - if (OPM_currFile == 1 || str->ref < 255) { + if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) { obj = str->strobj; if (obj == NIL || OPC_Undefined(obj)) { if (obj != NIL) { @@ -719,6 +721,13 @@ static void OPC_DefineType (OPT_Struct str) if (!empty) { OPM_WriteLn(); } + } else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) { + empty = 1; + OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty); + OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty); + if (!empty) { + OPM_WriteLn(); + } } } } diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index fd7ddb5e..3bfd88b8 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index d2462ff6..bcb39247 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,8 @@ typedef CHAR OPM_FileName[32]; +static CHAR OPM_currentComment[256]; +static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; export CHAR OPM_Model[10]; @@ -59,6 +61,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); +export void OPM_GetComment (CHAR *text, ADDRESS text__len); export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); @@ -82,6 +85,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); +export void OPM_StoreComment (CHAR *text, ADDRESS text__len); export void OPM_SymRCh (CHAR *ch); export INT32 OPM_SymRInt (void); export INT64 OPM_SymRInt64 (void); @@ -157,6 +161,36 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) __DEL(modname); } +void OPM_StoreComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; + i += 1; + } + OPM_currentComment[__X(i, 256)] = 0x00; + OPM_hasComment = 1; + __DEL(text); +} + +void OPM_GetComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + if (OPM_hasComment) { + i = 0; + while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; + i += 1; + } + text[__X(i, text__len)] = 0x00; + OPM_hasComment = 0; + } else { + text[0] = 0x00; + } +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -763,7 +797,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x83) { + if (tag != 0xf7 || ver != 0x84) { if (!__IN(4, OPM_Options, 32)) { OPM_err(-306); } @@ -834,7 +868,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x84); } else { OPM_err(153); } @@ -1143,5 +1177,7 @@ export void *OPM__init(void) OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; OPM_FindInstallDir(); + OPM_hasComment = 0; + OPM_currentComment[0] = 0x00; __ENDMOD; } diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 14ef9200..64c15a28 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -30,6 +30,7 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); +import void OPM_GetComment (CHAR *text, ADDRESS text__len); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); @@ -48,6 +49,7 @@ import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); import INT64 OPM_SignedMinimum (INT32 bytecount); +import void OPM_StoreComment (CHAR *text, ADDRESS text__len); import void OPM_SymRCh (CHAR *ch); import INT32 OPM_SymRInt (void); import INT64 OPM_SymRInt64 (void); diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 2bbed37b..ad4a370a 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 5980afc3..3d8cefe8 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 95456407..a25a2c12 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -279,32 +279,74 @@ static void Comment__2 (void); static void Comment__2 (void) { + BOOLEAN isExported; + CHAR commentText[256]; + INT16 i, nestLevel; + CHAR prevCh, nextCh; + i = 0; + while (i <= 255) { + commentText[__X(i, 256)] = 0x00; + i += 1; + } + isExported = 0; + i = 0; + nestLevel = 1; + prevCh = 0x00; OPM_Get(&OPS_ch); - for (;;) { - for (;;) { - while (OPS_ch == '(') { + if (OPS_ch == '*') { + isExported = 1; + OPM_Get(&OPS_ch); + if (OPS_ch == ')') { + commentText[0] = 0x00; + OPM_StoreComment(commentText, 256); + OPM_Get(&OPS_ch); + return; + } + } + while ((nestLevel > 0 && OPS_ch != 0x00)) { + if ((prevCh == '(' && OPS_ch == '*')) { + nestLevel += 1; + prevCh = 0x00; + } else if ((prevCh == '*' && OPS_ch == ')')) { + nestLevel -= 1; + if (nestLevel == 0) { OPM_Get(&OPS_ch); - if (OPS_ch == '*') { - Comment__2(); + } else { + prevCh = 0x00; + } + } else { + if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; } } - if (OPS_ch == '*') { - OPM_Get(&OPS_ch); - break; - } - if (OPS_ch == 0x00) { - break; - } + prevCh = OPS_ch; + } + if (nestLevel > 0) { OPM_Get(&OPS_ch); } - if (OPS_ch == ')') { - OPM_Get(&OPS_ch); - break; + } + if (OPS_ch == 0x00) { + OPS_err(5); + } + if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; + } else { + OPM_LogWStr((CHAR*)"Truncating final comment character", 35); + OPM_LogWLn(); } - if (OPS_ch == 0x00) { - OPS_err(5); - break; + } + if (isExported) { + if (i >= 256) { + OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); + OPM_LogWLn(); + i = 255; } + commentText[__X(i, 256)] = 0x00; + OPM_StoreComment(commentText, 256); } } diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index f4851b8a..19e222ac 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 85b0ef1c..ebb47dd8 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -83,6 +83,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef @@ -173,6 +174,7 @@ static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj); +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len); export OPT_Struct OPT_SetType (INT32 size); export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir); export INT32 OPT_SizeAlignment (INT32 size); @@ -388,6 +390,10 @@ OPT_Object OPT_NewObj (void) { OPT_Object obj = NIL; __NEW(obj, OPT_ObjDesc); + obj->typ = NIL; + obj->conval = NIL; + obj->comment = NIL; + obj->name[0] = 0x00; return obj; } @@ -554,6 +560,8 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; + CHAR commentText[256]; + INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; left = 0; @@ -585,6 +593,16 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) __COPY(name, ob1->name, 256); mnolev = OPT_topScope->mnolev; ob1->mnolev = mnolev; + OPM_GetComment((void*)commentText, 256); + if (commentText[0] != 0x00) { + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { + (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*ob1->comment)[__X(j, 256)] = 0x00; + } break; } } @@ -1103,6 +1121,13 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) tag = OPM_SymRInt(); last = NIL; while (tag != 18) { + if (tag < 0 || tag > 100) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return; + } new = OPT_NewObj(); new->mnolev = -mno; if (last == NIL) { @@ -1381,7 +1406,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; + OPS_Name commentText; + BOOLEAN hasComment; + INT16 j; + INT32 len; tag = OPT_impCtxt.nextTag; + hasComment = 0; + while (tag == 41) { + len = OPM_SymRInt(); + if (len < 0) { + len = 0; + } + if (len > 255) { + len = 255; + } + i = 0; + while (i < len) { + OPM_SymRCh(&commentText[__X(i, 256)]); + i += 1; + } + commentText[__X(i, 256)] = 0x00; + hasComment = 1; + tag = OPM_SymRInt(); + } + OPT_impCtxt.nextTag = tag; + if (tag < 0 || tag > 50) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; + } if (tag == 19) { OPT_InStruct(&typ); obj = typ->strobj; @@ -1397,7 +1452,7 @@ static OPT_Object OPT_InObj (INT8 mno) obj->conval = OPT_NewConst(); OPT_InConstant(tag, obj->conval); obj->typ = OPT_InTyp(tag); - } else if (tag >= 31) { + } else if ((tag >= 31 && tag <= 33)) { obj->conval = OPT_NewConst(); obj->conval->intval = -1; OPT_InSign(mno, &obj->typ, &obj->link); @@ -1424,20 +1479,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32); OPM_LogWNum(tag, 0); OPM_LogWLn(); + OPM_err(155); + return NIL; break; } } else if (tag == 20) { obj->mode = 5; OPT_InStruct(&obj->typ); - } else { + } else if (tag == 21 || tag == 22) { obj->mode = 1; if (tag == 22) { obj->vis = 2; } OPT_InStruct(&obj->typ); + } else { + OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; } OPT_InName((void*)obj->name, 256); } + if ((hasComment && obj != NIL)) { + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { + (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*obj->comment)[__X(j, 256)] = 0x00; + } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255); @@ -1780,13 +1852,40 @@ static void OPT_OutConstant (OPT_Object obj) } } +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_SymWCh(text[__X(i, text__len)]); + i += 1; + } + OPM_SymWCh(0x00); + __DEL(text); +} + static void OPT_OutObj (OPT_Object obj) { INT16 i, j; OPT_ConstExt ext = NIL; + INT16 k, l; if (obj != NIL) { OPT_OutObj(obj->left); if (__IN(obj->mode, 0x06ea, 32)) { + if (obj->comment != NIL) { + OPM_SymWInt(41); + k = 0; + while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 256)]); + l += 1; + } + } if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { @@ -2026,7 +2125,7 @@ static void EnumPtrs(void (*P)(void*)) } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -8}}; -__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 304), {0, 4, 8, 12, 284, 288, -28}}; +__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 308), {0, 4, 8, 12, 284, 288, 304, -32}}; __TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 56), {44, 48, 52, -16}}; __TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 28), {0, 4, 8, 16, 20, 24, -28}}; __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index d2f8d9fe..cf456af5 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h @@ -61,6 +61,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index ecef063d..0425b2e0 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 44652222..fbabd8f4 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Out.c b/bootstrap/unix-48/Out.c index d5a45e43..ce936589 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Out.h b/bootstrap/unix-48/Out.h index a008c089..a72547f4 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 61463b51..befa6033 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 89ce40d3..fbeef8c7 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index f4cc31eb..512ec2c4 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 04ff0d7c..93e7fa75 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 629009fa..4b18812f 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 6acdef43..f0e3ae34 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 2b57b307..43c3858f 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 75712cc1..fd0c0fa5 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/VT100.c b/bootstrap/unix-48/VT100.c index c5e8a3ba..346fb37b 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-48/VT100.h b/bootstrap/unix-48/VT100.h index 94b7b846..4e708647 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index cf90fa2a..ce2fc413 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { __DUP(additionalopts, additionalopts__len, CHAR); - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 6b1b37eb..686f0b4e 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/Compiler.c b/bootstrap/unix-88/Compiler.c index 1807e545..4460479d 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index fb7a8f35..fa87c9de 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index c8bae246..c3c54eed 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 940170c8..57e78310 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 375065c6..676f434c 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 980fab89..7b004b60 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index e188739a..45a9c6d2 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 011ac733..a5b989e5 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 34d0e538..ee65a938 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 4d4925c6..913fbf2d 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index cb41ad3d..f66fcd66 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index dc9da7db..7b92ccc1 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -618,31 +618,33 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty) { if (obj != NIL) { OPC_DefineTProcMacros(obj->left, &*empty); - if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) { - OPM_WriteString((CHAR*)"#define __", 11); - OPC_Ident(obj); - OPC_DeclareParams(obj->link, 1); - OPM_WriteString((CHAR*)" __SEND(", 9); - if (obj->link->typ->form == 11) { - OPM_WriteString((CHAR*)"__TYPEOF(", 10); - OPC_Ident(obj->link); + if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) { + if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) { + OPM_WriteString((CHAR*)"#define __", 11); + OPC_Ident(obj); + OPC_DeclareParams(obj->link, 1); + OPM_WriteString((CHAR*)" __SEND(", 9); + if (obj->link->typ->form == 11) { + OPM_WriteString((CHAR*)"__TYPEOF(", 10); + OPC_Ident(obj->link); + OPM_Write(')'); + } else { + OPC_Ident(obj->link); + OPM_WriteString((CHAR*)"__typ", 6); + } + OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); + if (obj->typ == OPT_notyp) { + OPM_WriteString((CHAR*)"void", 5); + } else { + OPC_Ident(obj->typ->strobj); + } + OPM_WriteString((CHAR*)"(*)", 4); + OPC_AnsiParamList(obj->link, 0); + OPM_WriteString((CHAR*)", ", 3); + OPC_DeclareParams(obj->link, 1); OPM_Write(')'); - } else { - OPC_Ident(obj->link); - OPM_WriteString((CHAR*)"__typ", 6); + OPM_WriteLn(); } - OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); - if (obj->typ == OPT_notyp) { - OPM_WriteString((CHAR*)"void", 5); - } else { - OPC_Ident(obj->typ->strobj); - } - OPM_WriteString((CHAR*)"(*)", 4); - OPC_AnsiParamList(obj->link, 0); - OPM_WriteString((CHAR*)", ", 3); - OPC_DeclareParams(obj->link, 1); - OPM_Write(')'); - OPM_WriteLn(); } OPC_DefineTProcMacros(obj->right, &*empty); } @@ -652,7 +654,7 @@ static void OPC_DefineType (OPT_Struct str) { OPT_Object obj = NIL, field = NIL, par = NIL; BOOLEAN empty; - if (OPM_currFile == 1 || str->ref < 255) { + if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) { obj = str->strobj; if (obj == NIL || OPC_Undefined(obj)) { if (obj != NIL) { @@ -719,6 +721,13 @@ static void OPC_DefineType (OPT_Struct str) if (!empty) { OPM_WriteLn(); } + } else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) { + empty = 1; + OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty); + OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty); + if (!empty) { + OPM_WriteLn(); + } } } } diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index fd7ddb5e..3bfd88b8 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index f298d2d5..b486b3b9 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,8 @@ typedef CHAR OPM_FileName[32]; +static CHAR OPM_currentComment[256]; +static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; export CHAR OPM_Model[10]; @@ -59,6 +61,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); +export void OPM_GetComment (CHAR *text, ADDRESS text__len); export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); @@ -82,6 +85,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); +export void OPM_StoreComment (CHAR *text, ADDRESS text__len); export void OPM_SymRCh (CHAR *ch); export INT32 OPM_SymRInt (void); export INT64 OPM_SymRInt64 (void); @@ -157,6 +161,36 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) __DEL(modname); } +void OPM_StoreComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; + i += 1; + } + OPM_currentComment[__X(i, 256)] = 0x00; + OPM_hasComment = 1; + __DEL(text); +} + +void OPM_GetComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + if (OPM_hasComment) { + i = 0; + while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; + i += 1; + } + text[__X(i, text__len)] = 0x00; + OPM_hasComment = 0; + } else { + text[0] = 0x00; + } +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -763,7 +797,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x83) { + if (tag != 0xf7 || ver != 0x84) { if (!__IN(4, OPM_Options, 32)) { OPM_err(-306); } @@ -834,7 +868,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x84); } else { OPM_err(153); } @@ -1143,5 +1177,7 @@ export void *OPM__init(void) OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; OPM_FindInstallDir(); + OPM_hasComment = 0; + OPM_currentComment[0] = 0x00; __ENDMOD; } diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 14ef9200..64c15a28 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -30,6 +30,7 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); +import void OPM_GetComment (CHAR *text, ADDRESS text__len); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); @@ -48,6 +49,7 @@ import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); import INT64 OPM_SignedMinimum (INT32 bytecount); +import void OPM_StoreComment (CHAR *text, ADDRESS text__len); import void OPM_SymRCh (CHAR *ch); import INT32 OPM_SymRInt (void); import INT64 OPM_SymRInt64 (void); diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index f98062ab..3fed2e31 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 5980afc3..3d8cefe8 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 95456407..a25a2c12 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -279,32 +279,74 @@ static void Comment__2 (void); static void Comment__2 (void) { + BOOLEAN isExported; + CHAR commentText[256]; + INT16 i, nestLevel; + CHAR prevCh, nextCh; + i = 0; + while (i <= 255) { + commentText[__X(i, 256)] = 0x00; + i += 1; + } + isExported = 0; + i = 0; + nestLevel = 1; + prevCh = 0x00; OPM_Get(&OPS_ch); - for (;;) { - for (;;) { - while (OPS_ch == '(') { + if (OPS_ch == '*') { + isExported = 1; + OPM_Get(&OPS_ch); + if (OPS_ch == ')') { + commentText[0] = 0x00; + OPM_StoreComment(commentText, 256); + OPM_Get(&OPS_ch); + return; + } + } + while ((nestLevel > 0 && OPS_ch != 0x00)) { + if ((prevCh == '(' && OPS_ch == '*')) { + nestLevel += 1; + prevCh = 0x00; + } else if ((prevCh == '*' && OPS_ch == ')')) { + nestLevel -= 1; + if (nestLevel == 0) { OPM_Get(&OPS_ch); - if (OPS_ch == '*') { - Comment__2(); + } else { + prevCh = 0x00; + } + } else { + if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; } } - if (OPS_ch == '*') { - OPM_Get(&OPS_ch); - break; - } - if (OPS_ch == 0x00) { - break; - } + prevCh = OPS_ch; + } + if (nestLevel > 0) { OPM_Get(&OPS_ch); } - if (OPS_ch == ')') { - OPM_Get(&OPS_ch); - break; + } + if (OPS_ch == 0x00) { + OPS_err(5); + } + if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; + } else { + OPM_LogWStr((CHAR*)"Truncating final comment character", 35); + OPM_LogWLn(); } - if (OPS_ch == 0x00) { - OPS_err(5); - break; + } + if (isExported) { + if (i >= 256) { + OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); + OPM_LogWLn(); + i = 255; } + commentText[__X(i, 256)] = 0x00; + OPM_StoreComment(commentText, 256); } } diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index f4851b8a..19e222ac 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 3b837866..c3999981 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -83,6 +83,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef @@ -173,6 +174,7 @@ static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj); +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len); export OPT_Struct OPT_SetType (INT32 size); export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir); export INT32 OPT_SizeAlignment (INT32 size); @@ -388,6 +390,10 @@ OPT_Object OPT_NewObj (void) { OPT_Object obj = NIL; __NEW(obj, OPT_ObjDesc); + obj->typ = NIL; + obj->conval = NIL; + obj->comment = NIL; + obj->name[0] = 0x00; return obj; } @@ -554,6 +560,8 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; + CHAR commentText[256]; + INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; left = 0; @@ -585,6 +593,16 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) __COPY(name, ob1->name, 256); mnolev = OPT_topScope->mnolev; ob1->mnolev = mnolev; + OPM_GetComment((void*)commentText, 256); + if (commentText[0] != 0x00) { + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + j = 0; + while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { + (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*ob1->comment)[__X(j, 256)] = 0x00; + } break; } } @@ -1103,6 +1121,13 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) tag = OPM_SymRInt(); last = NIL; while (tag != 18) { + if (tag < 0 || tag > 100) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return; + } new = OPT_NewObj(); new->mnolev = -mno; if (last == NIL) { @@ -1381,7 +1406,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; + OPS_Name commentText; + BOOLEAN hasComment; + INT16 j; + INT32 len; tag = OPT_impCtxt.nextTag; + hasComment = 0; + while (tag == 41) { + len = OPM_SymRInt(); + if (len < 0) { + len = 0; + } + if (len > 255) { + len = 255; + } + i = 0; + while (i < len) { + OPM_SymRCh(&commentText[__X(i, 256)]); + i += 1; + } + commentText[__X(i, 256)] = 0x00; + hasComment = 1; + tag = OPM_SymRInt(); + } + OPT_impCtxt.nextTag = tag; + if (tag < 0 || tag > 50) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; + } if (tag == 19) { OPT_InStruct(&typ); obj = typ->strobj; @@ -1397,7 +1452,7 @@ static OPT_Object OPT_InObj (INT8 mno) obj->conval = OPT_NewConst(); OPT_InConstant(tag, obj->conval); obj->typ = OPT_InTyp(tag); - } else if (tag >= 31) { + } else if ((tag >= 31 && tag <= 33)) { obj->conval = OPT_NewConst(); obj->conval->intval = -1; OPT_InSign(mno, &obj->typ, &obj->link); @@ -1424,20 +1479,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32); OPM_LogWNum(tag, 0); OPM_LogWLn(); + OPM_err(155); + return NIL; break; } } else if (tag == 20) { obj->mode = 5; OPT_InStruct(&obj->typ); - } else { + } else if (tag == 21 || tag == 22) { obj->mode = 1; if (tag == 22) { obj->vis = 2; } OPT_InStruct(&obj->typ); + } else { + OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; } OPT_InName((void*)obj->name, 256); } + if ((hasComment && obj != NIL)) { + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + j = 0; + while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { + (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*obj->comment)[__X(j, 256)] = 0x00; + } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255); @@ -1780,13 +1852,40 @@ static void OPT_OutConstant (OPT_Object obj) } } +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_SymWCh(text[__X(i, text__len)]); + i += 1; + } + OPM_SymWCh(0x00); + __DEL(text); +} + static void OPT_OutObj (OPT_Object obj) { INT16 i, j; OPT_ConstExt ext = NIL; + INT16 k, l; if (obj != NIL) { OPT_OutObj(obj->left); if (__IN(obj->mode, 0x06ea, 32)) { + if (obj->comment != NIL) { + OPM_SymWInt(41); + k = 0; + while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 256)]); + l += 1; + } + } if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { @@ -2026,7 +2125,7 @@ static void EnumPtrs(void (*P)(void*)) } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -16}}; -__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 336), {0, 8, 16, 24, 304, 312, -56}}; +__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 344), {0, 8, 16, 24, 304, 312, 336, -64}}; __TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 72), {48, 56, 64, -32}}; __TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 56), {0, 8, 16, 32, 40, 48, -56}}; __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 5184), {16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index d2f8d9fe..cf456af5 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h @@ -61,6 +61,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 2535e861..26c1c715 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 44652222..fbabd8f4 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Out.c b/bootstrap/unix-88/Out.c index d5a45e43..ce936589 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Out.h b/bootstrap/unix-88/Out.h index a008c089..a72547f4 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index c545b975..139181a0 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index c6cd7505..e827b641 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index f4cc31eb..512ec2c4 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 04ff0d7c..93e7fa75 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 629009fa..4b18812f 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 6acdef43..f0e3ae34 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 291ccf2b..77dc1bac 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 56bb9359..081eec2c 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/VT100.c b/bootstrap/unix-88/VT100.c index c5e8a3ba..346fb37b 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/unix-88/VT100.h b/bootstrap/unix-88/VT100.h index 94b7b846..4e708647 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index cf90fa2a..ce2fc413 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { __DUP(additionalopts, additionalopts__len, CHAR); - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 6b1b37eb..686f0b4e 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/Compiler.c b/bootstrap/windows-48/Compiler.c index 1807e545..4460479d 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index fb7a8f35..fa87c9de 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index c8bae246..c3c54eed 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 15dcd35d..553bb49a 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 6d39b035..dadf1ace 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index df721094..42552415 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index dbc11b6f..3cde1c3b 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 35b801dc..bdad4713 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 22468d7d..26d86b38 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 4d4925c6..913fbf2d 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index cb41ad3d..f66fcd66 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index dc9da7db..7b92ccc1 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -618,31 +618,33 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty) { if (obj != NIL) { OPC_DefineTProcMacros(obj->left, &*empty); - if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) { - OPM_WriteString((CHAR*)"#define __", 11); - OPC_Ident(obj); - OPC_DeclareParams(obj->link, 1); - OPM_WriteString((CHAR*)" __SEND(", 9); - if (obj->link->typ->form == 11) { - OPM_WriteString((CHAR*)"__TYPEOF(", 10); - OPC_Ident(obj->link); + if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) { + if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) { + OPM_WriteString((CHAR*)"#define __", 11); + OPC_Ident(obj); + OPC_DeclareParams(obj->link, 1); + OPM_WriteString((CHAR*)" __SEND(", 9); + if (obj->link->typ->form == 11) { + OPM_WriteString((CHAR*)"__TYPEOF(", 10); + OPC_Ident(obj->link); + OPM_Write(')'); + } else { + OPC_Ident(obj->link); + OPM_WriteString((CHAR*)"__typ", 6); + } + OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); + if (obj->typ == OPT_notyp) { + OPM_WriteString((CHAR*)"void", 5); + } else { + OPC_Ident(obj->typ->strobj); + } + OPM_WriteString((CHAR*)"(*)", 4); + OPC_AnsiParamList(obj->link, 0); + OPM_WriteString((CHAR*)", ", 3); + OPC_DeclareParams(obj->link, 1); OPM_Write(')'); - } else { - OPC_Ident(obj->link); - OPM_WriteString((CHAR*)"__typ", 6); + OPM_WriteLn(); } - OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); - if (obj->typ == OPT_notyp) { - OPM_WriteString((CHAR*)"void", 5); - } else { - OPC_Ident(obj->typ->strobj); - } - OPM_WriteString((CHAR*)"(*)", 4); - OPC_AnsiParamList(obj->link, 0); - OPM_WriteString((CHAR*)", ", 3); - OPC_DeclareParams(obj->link, 1); - OPM_Write(')'); - OPM_WriteLn(); } OPC_DefineTProcMacros(obj->right, &*empty); } @@ -652,7 +654,7 @@ static void OPC_DefineType (OPT_Struct str) { OPT_Object obj = NIL, field = NIL, par = NIL; BOOLEAN empty; - if (OPM_currFile == 1 || str->ref < 255) { + if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) { obj = str->strobj; if (obj == NIL || OPC_Undefined(obj)) { if (obj != NIL) { @@ -719,6 +721,13 @@ static void OPC_DefineType (OPT_Struct str) if (!empty) { OPM_WriteLn(); } + } else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) { + empty = 1; + OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty); + OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty); + if (!empty) { + OPM_WriteLn(); + } } } } diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index fd7ddb5e..3bfd88b8 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index d2462ff6..bcb39247 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,8 @@ typedef CHAR OPM_FileName[32]; +static CHAR OPM_currentComment[256]; +static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; export CHAR OPM_Model[10]; @@ -59,6 +61,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); +export void OPM_GetComment (CHAR *text, ADDRESS text__len); export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); @@ -82,6 +85,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); +export void OPM_StoreComment (CHAR *text, ADDRESS text__len); export void OPM_SymRCh (CHAR *ch); export INT32 OPM_SymRInt (void); export INT64 OPM_SymRInt64 (void); @@ -157,6 +161,36 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) __DEL(modname); } +void OPM_StoreComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; + i += 1; + } + OPM_currentComment[__X(i, 256)] = 0x00; + OPM_hasComment = 1; + __DEL(text); +} + +void OPM_GetComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + if (OPM_hasComment) { + i = 0; + while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; + i += 1; + } + text[__X(i, text__len)] = 0x00; + OPM_hasComment = 0; + } else { + text[0] = 0x00; + } +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -763,7 +797,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x83) { + if (tag != 0xf7 || ver != 0x84) { if (!__IN(4, OPM_Options, 32)) { OPM_err(-306); } @@ -834,7 +868,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x84); } else { OPM_err(153); } @@ -1143,5 +1177,7 @@ export void *OPM__init(void) OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; OPM_FindInstallDir(); + OPM_hasComment = 0; + OPM_currentComment[0] = 0x00; __ENDMOD; } diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 14ef9200..64c15a28 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -30,6 +30,7 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); +import void OPM_GetComment (CHAR *text, ADDRESS text__len); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); @@ -48,6 +49,7 @@ import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); import INT64 OPM_SignedMinimum (INT32 bytecount); +import void OPM_StoreComment (CHAR *text, ADDRESS text__len); import void OPM_SymRCh (CHAR *ch); import INT32 OPM_SymRInt (void); import INT64 OPM_SymRInt64 (void); diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 2bbed37b..ad4a370a 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 5980afc3..3d8cefe8 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 95456407..a25a2c12 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -279,32 +279,74 @@ static void Comment__2 (void); static void Comment__2 (void) { + BOOLEAN isExported; + CHAR commentText[256]; + INT16 i, nestLevel; + CHAR prevCh, nextCh; + i = 0; + while (i <= 255) { + commentText[__X(i, 256)] = 0x00; + i += 1; + } + isExported = 0; + i = 0; + nestLevel = 1; + prevCh = 0x00; OPM_Get(&OPS_ch); - for (;;) { - for (;;) { - while (OPS_ch == '(') { + if (OPS_ch == '*') { + isExported = 1; + OPM_Get(&OPS_ch); + if (OPS_ch == ')') { + commentText[0] = 0x00; + OPM_StoreComment(commentText, 256); + OPM_Get(&OPS_ch); + return; + } + } + while ((nestLevel > 0 && OPS_ch != 0x00)) { + if ((prevCh == '(' && OPS_ch == '*')) { + nestLevel += 1; + prevCh = 0x00; + } else if ((prevCh == '*' && OPS_ch == ')')) { + nestLevel -= 1; + if (nestLevel == 0) { OPM_Get(&OPS_ch); - if (OPS_ch == '*') { - Comment__2(); + } else { + prevCh = 0x00; + } + } else { + if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; } } - if (OPS_ch == '*') { - OPM_Get(&OPS_ch); - break; - } - if (OPS_ch == 0x00) { - break; - } + prevCh = OPS_ch; + } + if (nestLevel > 0) { OPM_Get(&OPS_ch); } - if (OPS_ch == ')') { - OPM_Get(&OPS_ch); - break; + } + if (OPS_ch == 0x00) { + OPS_err(5); + } + if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; + } else { + OPM_LogWStr((CHAR*)"Truncating final comment character", 35); + OPM_LogWLn(); } - if (OPS_ch == 0x00) { - OPS_err(5); - break; + } + if (isExported) { + if (i >= 256) { + OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); + OPM_LogWLn(); + i = 255; } + commentText[__X(i, 256)] = 0x00; + OPM_StoreComment(commentText, 256); } } diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index f4851b8a..19e222ac 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 85b0ef1c..ebb47dd8 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -83,6 +83,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef @@ -173,6 +174,7 @@ static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj); +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len); export OPT_Struct OPT_SetType (INT32 size); export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir); export INT32 OPT_SizeAlignment (INT32 size); @@ -388,6 +390,10 @@ OPT_Object OPT_NewObj (void) { OPT_Object obj = NIL; __NEW(obj, OPT_ObjDesc); + obj->typ = NIL; + obj->conval = NIL; + obj->comment = NIL; + obj->name[0] = 0x00; return obj; } @@ -554,6 +560,8 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; + CHAR commentText[256]; + INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; left = 0; @@ -585,6 +593,16 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) __COPY(name, ob1->name, 256); mnolev = OPT_topScope->mnolev; ob1->mnolev = mnolev; + OPM_GetComment((void*)commentText, 256); + if (commentText[0] != 0x00) { + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { + (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*ob1->comment)[__X(j, 256)] = 0x00; + } break; } } @@ -1103,6 +1121,13 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) tag = OPM_SymRInt(); last = NIL; while (tag != 18) { + if (tag < 0 || tag > 100) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return; + } new = OPT_NewObj(); new->mnolev = -mno; if (last == NIL) { @@ -1381,7 +1406,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; + OPS_Name commentText; + BOOLEAN hasComment; + INT16 j; + INT32 len; tag = OPT_impCtxt.nextTag; + hasComment = 0; + while (tag == 41) { + len = OPM_SymRInt(); + if (len < 0) { + len = 0; + } + if (len > 255) { + len = 255; + } + i = 0; + while (i < len) { + OPM_SymRCh(&commentText[__X(i, 256)]); + i += 1; + } + commentText[__X(i, 256)] = 0x00; + hasComment = 1; + tag = OPM_SymRInt(); + } + OPT_impCtxt.nextTag = tag; + if (tag < 0 || tag > 50) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; + } if (tag == 19) { OPT_InStruct(&typ); obj = typ->strobj; @@ -1397,7 +1452,7 @@ static OPT_Object OPT_InObj (INT8 mno) obj->conval = OPT_NewConst(); OPT_InConstant(tag, obj->conval); obj->typ = OPT_InTyp(tag); - } else if (tag >= 31) { + } else if ((tag >= 31 && tag <= 33)) { obj->conval = OPT_NewConst(); obj->conval->intval = -1; OPT_InSign(mno, &obj->typ, &obj->link); @@ -1424,20 +1479,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32); OPM_LogWNum(tag, 0); OPM_LogWLn(); + OPM_err(155); + return NIL; break; } } else if (tag == 20) { obj->mode = 5; OPT_InStruct(&obj->typ); - } else { + } else if (tag == 21 || tag == 22) { obj->mode = 1; if (tag == 22) { obj->vis = 2; } OPT_InStruct(&obj->typ); + } else { + OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; } OPT_InName((void*)obj->name, 256); } + if ((hasComment && obj != NIL)) { + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + j = 0; + while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { + (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*obj->comment)[__X(j, 256)] = 0x00; + } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255); @@ -1780,13 +1852,40 @@ static void OPT_OutConstant (OPT_Object obj) } } +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_SymWCh(text[__X(i, text__len)]); + i += 1; + } + OPM_SymWCh(0x00); + __DEL(text); +} + static void OPT_OutObj (OPT_Object obj) { INT16 i, j; OPT_ConstExt ext = NIL; + INT16 k, l; if (obj != NIL) { OPT_OutObj(obj->left); if (__IN(obj->mode, 0x06ea, 32)) { + if (obj->comment != NIL) { + OPM_SymWInt(41); + k = 0; + while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 256)]); + l += 1; + } + } if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { @@ -2026,7 +2125,7 @@ static void EnumPtrs(void (*P)(void*)) } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -8}}; -__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 304), {0, 4, 8, 12, 284, 288, -28}}; +__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 308), {0, 4, 8, 12, 284, 288, 304, -32}}; __TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 56), {44, 48, 52, -16}}; __TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 28), {0, 4, 8, 16, 20, 24, -28}}; __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 3140), {16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index d2f8d9fe..cf456af5 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h @@ -61,6 +61,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index ecef063d..0425b2e0 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 44652222..fbabd8f4 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Out.c b/bootstrap/windows-48/Out.c index d8b08478..b43e55f1 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Out.h b/bootstrap/windows-48/Out.h index a008c089..a72547f4 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index e57cfbc4..9b1f0e4f 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 543943d3..b1ed4c6f 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index f4cc31eb..512ec2c4 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 04ff0d7c..93e7fa75 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 629009fa..4b18812f 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 6acdef43..f0e3ae34 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 2b57b307..43c3858f 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 75712cc1..fd0c0fa5 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/VT100.c b/bootstrap/windows-48/VT100.c index c5e8a3ba..346fb37b 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-48/VT100.h b/bootstrap/windows-48/VT100.h index 94b7b846..4e708647 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index cf90fa2a..ce2fc413 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { __DUP(additionalopts, additionalopts__len, CHAR); - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 6b1b37eb..686f0b4e 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/Compiler.c b/bootstrap/windows-88/Compiler.c index 1807e545..4460479d 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index fb7a8f35..fa87c9de 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index c8bae246..c3c54eed 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 5412cd99..07655515 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 2bbdcf3c..8a7e59f8 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 980fab89..7b004b60 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index e188739a..45a9c6d2 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 8617e065..7a49b8ff 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 34d0e538..ee65a938 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 4d4925c6..913fbf2d 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index cb41ad3d..f66fcd66 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index dc9da7db..7b92ccc1 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -618,31 +618,33 @@ static void OPC_DefineTProcMacros (OPT_Object obj, BOOLEAN *empty) { if (obj != NIL) { OPC_DefineTProcMacros(obj->left, &*empty); - if ((((obj->mode == 13 && obj == OPC_BaseTProc(obj))) && (OPM_currFile != 0 || obj->vis == 1))) { - OPM_WriteString((CHAR*)"#define __", 11); - OPC_Ident(obj); - OPC_DeclareParams(obj->link, 1); - OPM_WriteString((CHAR*)" __SEND(", 9); - if (obj->link->typ->form == 11) { - OPM_WriteString((CHAR*)"__TYPEOF(", 10); - OPC_Ident(obj->link); + if ((obj->mode == 13 && obj == OPC_BaseTProc(obj))) { + if (OPM_currFile == 1 || (OPM_currFile == 0 && obj->vis == 1)) { + OPM_WriteString((CHAR*)"#define __", 11); + OPC_Ident(obj); + OPC_DeclareParams(obj->link, 1); + OPM_WriteString((CHAR*)" __SEND(", 9); + if (obj->link->typ->form == 11) { + OPM_WriteString((CHAR*)"__TYPEOF(", 10); + OPC_Ident(obj->link); + OPM_Write(')'); + } else { + OPC_Ident(obj->link); + OPM_WriteString((CHAR*)"__typ", 6); + } + OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); + if (obj->typ == OPT_notyp) { + OPM_WriteString((CHAR*)"void", 5); + } else { + OPC_Ident(obj->typ->strobj); + } + OPM_WriteString((CHAR*)"(*)", 4); + OPC_AnsiParamList(obj->link, 0); + OPM_WriteString((CHAR*)", ", 3); + OPC_DeclareParams(obj->link, 1); OPM_Write(')'); - } else { - OPC_Ident(obj->link); - OPM_WriteString((CHAR*)"__typ", 6); + OPM_WriteLn(); } - OPC_Str1((CHAR*)", #, ", 6, __ASHR(obj->adr, 16)); - if (obj->typ == OPT_notyp) { - OPM_WriteString((CHAR*)"void", 5); - } else { - OPC_Ident(obj->typ->strobj); - } - OPM_WriteString((CHAR*)"(*)", 4); - OPC_AnsiParamList(obj->link, 0); - OPM_WriteString((CHAR*)", ", 3); - OPC_DeclareParams(obj->link, 1); - OPM_Write(')'); - OPM_WriteLn(); } OPC_DefineTProcMacros(obj->right, &*empty); } @@ -652,7 +654,7 @@ static void OPC_DefineType (OPT_Struct str) { OPT_Object obj = NIL, field = NIL, par = NIL; BOOLEAN empty; - if (OPM_currFile == 1 || str->ref < 255) { + if ((OPM_currFile == 1 || str->ref < 255) || (((OPM_currFile == 0 && str->strobj != NIL)) && str->strobj->vis == 1)) { obj = str->strobj; if (obj == NIL || OPC_Undefined(obj)) { if (obj != NIL) { @@ -719,6 +721,13 @@ static void OPC_DefineType (OPT_Struct str) if (!empty) { OPM_WriteLn(); } + } else if ((obj->typ->form == 11 && obj->typ->BaseTyp->comp == 4)) { + empty = 1; + OPC_DeclareTProcs(obj->typ->BaseTyp->link, &empty); + OPC_DefineTProcMacros(obj->typ->BaseTyp->link, &empty); + if (!empty) { + OPM_WriteLn(); + } } } } diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index fd7ddb5e..3bfd88b8 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index f298d2d5..b486b3b9 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,6 +19,8 @@ typedef CHAR OPM_FileName[32]; +static CHAR OPM_currentComment[256]; +static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; export CHAR OPM_Model[10]; @@ -59,6 +61,7 @@ static void OPM_FindInstallDir (void); static void OPM_FindLine (Files_File f, Files_Rider *r, ADDRESS *r__typ, INT64 pos); static void OPM_FingerprintBytes (INT32 *fp, SYSTEM_BYTE *bytes, ADDRESS bytes__len); export void OPM_Get (CHAR *ch); +export void OPM_GetComment (CHAR *text, ADDRESS text__len); export void OPM_Init (BOOLEAN *done); export void OPM_InitOptions (void); export INT16 OPM_Integer (INT64 n); @@ -82,6 +85,7 @@ static void OPM_ScanOptions (CHAR *s, ADDRESS s__len); static void OPM_ShowLine (INT64 pos); export INT64 OPM_SignedMaximum (INT32 bytecount); export INT64 OPM_SignedMinimum (INT32 bytecount); +export void OPM_StoreComment (CHAR *text, ADDRESS text__len); export void OPM_SymRCh (CHAR *ch); export INT32 OPM_SymRInt (void); export INT64 OPM_SymRInt64 (void); @@ -157,6 +161,36 @@ void OPM_LogCompiling (CHAR *modname, ADDRESS modname__len) __DEL(modname); } +void OPM_StoreComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 256)] = text[__X(i, text__len)]; + i += 1; + } + OPM_currentComment[__X(i, 256)] = 0x00; + OPM_hasComment = 1; + __DEL(text); +} + +void OPM_GetComment (CHAR *text, ADDRESS text__len) +{ + INT16 i; + if (OPM_hasComment) { + i = 0; + while ((((i < text__len && i < 256)) && OPM_currentComment[__X(i, 256)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 256)]; + i += 1; + } + text[__X(i, text__len)] = 0x00; + OPM_hasComment = 0; + } else { + text[0] = 0x00; + } +} + INT64 OPM_SignedMaximum (INT32 bytecount) { INT64 result; @@ -763,7 +797,7 @@ void OPM_OldSym (CHAR *modName, ADDRESS modName__len, BOOLEAN *done) Files_Set(&OPM_oldSF, Files_Rider__typ, OPM_oldSFile, 0); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&tag); Files_Read(&OPM_oldSF, Files_Rider__typ, (void*)&ver); - if (tag != 0xf7 || ver != 0x83) { + if (tag != 0xf7 || ver != 0x84) { if (!__IN(4, OPM_Options, 32)) { OPM_err(-306); } @@ -834,7 +868,7 @@ void OPM_NewSym (CHAR *modName, ADDRESS modName__len) if (OPM_newSFile != NIL) { Files_Set(&OPM_newSF, Files_Rider__typ, OPM_newSFile, 0); Files_Write(&OPM_newSF, Files_Rider__typ, 0xf7); - Files_Write(&OPM_newSF, Files_Rider__typ, 0x83); + Files_Write(&OPM_newSF, Files_Rider__typ, 0x84); } else { OPM_err(153); } @@ -1143,5 +1177,7 @@ export void *OPM__init(void) OPM_MinReal = -OPM_MaxReal; OPM_MinLReal = -OPM_MaxLReal; OPM_FindInstallDir(); + OPM_hasComment = 0; + OPM_currentComment[0] = 0x00; __ENDMOD; } diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 14ef9200..64c15a28 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPM__h #define OPM__h @@ -30,6 +30,7 @@ import void OPM_FPrintLReal (INT32 *fp, LONGREAL val); import void OPM_FPrintReal (INT32 *fp, REAL val); import void OPM_FPrintSet (INT32 *fp, UINT64 val); import void OPM_Get (CHAR *ch); +import void OPM_GetComment (CHAR *text, ADDRESS text__len); import void OPM_Init (BOOLEAN *done); import void OPM_InitOptions (void); import INT16 OPM_Integer (INT64 n); @@ -48,6 +49,7 @@ import BOOLEAN OPM_OpenPar (void); import void OPM_RegisterNewSym (void); import INT64 OPM_SignedMaximum (INT32 bytecount); import INT64 OPM_SignedMinimum (INT32 bytecount); +import void OPM_StoreComment (CHAR *text, ADDRESS text__len); import void OPM_SymRCh (CHAR *ch); import INT32 OPM_SymRInt (void); import INT64 OPM_SymRInt64 (void); diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index f98062ab..3fed2e31 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 5980afc3..3d8cefe8 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 95456407..a25a2c12 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -279,32 +279,74 @@ static void Comment__2 (void); static void Comment__2 (void) { + BOOLEAN isExported; + CHAR commentText[256]; + INT16 i, nestLevel; + CHAR prevCh, nextCh; + i = 0; + while (i <= 255) { + commentText[__X(i, 256)] = 0x00; + i += 1; + } + isExported = 0; + i = 0; + nestLevel = 1; + prevCh = 0x00; OPM_Get(&OPS_ch); - for (;;) { - for (;;) { - while (OPS_ch == '(') { + if (OPS_ch == '*') { + isExported = 1; + OPM_Get(&OPS_ch); + if (OPS_ch == ')') { + commentText[0] = 0x00; + OPM_StoreComment(commentText, 256); + OPM_Get(&OPS_ch); + return; + } + } + while ((nestLevel > 0 && OPS_ch != 0x00)) { + if ((prevCh == '(' && OPS_ch == '*')) { + nestLevel += 1; + prevCh = 0x00; + } else if ((prevCh == '*' && OPS_ch == ')')) { + nestLevel -= 1; + if (nestLevel == 0) { OPM_Get(&OPS_ch); - if (OPS_ch == '*') { - Comment__2(); + } else { + prevCh = 0x00; + } + } else { + if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; } } - if (OPS_ch == '*') { - OPM_Get(&OPS_ch); - break; - } - if (OPS_ch == 0x00) { - break; - } + prevCh = OPS_ch; + } + if (nestLevel > 0) { OPM_Get(&OPS_ch); } - if (OPS_ch == ')') { - OPM_Get(&OPS_ch); - break; + } + if (OPS_ch == 0x00) { + OPS_err(5); + } + if ((((((isExported && nestLevel == 0)) && prevCh != 0x00)) && prevCh != '*')) { + if (i < 255) { + commentText[__X(i, 256)] = prevCh; + i += 1; + } else { + OPM_LogWStr((CHAR*)"Truncating final comment character", 35); + OPM_LogWLn(); } - if (OPS_ch == 0x00) { - OPS_err(5); - break; + } + if (isExported) { + if (i >= 256) { + OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); + OPM_LogWLn(); + i = 255; } + commentText[__X(i, 256)] = 0x00; + OPM_StoreComment(commentText, 256); } } diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index f4851b8a..19e222ac 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 3b837866..c3999981 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -83,6 +83,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef @@ -173,6 +174,7 @@ static void OPT_OutObj (OPT_Object obj); static void OPT_OutSign (OPT_Struct result, OPT_Object par); static void OPT_OutStr (OPT_Struct typ); static void OPT_OutTProcs (OPT_Struct typ, OPT_Object obj); +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len); export OPT_Struct OPT_SetType (INT32 size); export OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, INT16 dir); export INT32 OPT_SizeAlignment (INT32 size); @@ -388,6 +390,10 @@ OPT_Object OPT_NewObj (void) { OPT_Object obj = NIL; __NEW(obj, OPT_ObjDesc); + obj->typ = NIL; + obj->conval = NIL; + obj->comment = NIL; + obj->name[0] = 0x00; return obj; } @@ -554,6 +560,8 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; + CHAR commentText[256]; + INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; left = 0; @@ -585,6 +593,16 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) __COPY(name, ob1->name, 256); mnolev = OPT_topScope->mnolev; ob1->mnolev = mnolev; + OPM_GetComment((void*)commentText, 256); + if (commentText[0] != 0x00) { + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + j = 0; + while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { + (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*ob1->comment)[__X(j, 256)] = 0x00; + } break; } } @@ -1103,6 +1121,13 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) tag = OPM_SymRInt(); last = NIL; while (tag != 18) { + if (tag < 0 || tag > 100) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag value in InSign: ", 37); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return; + } new = OPT_NewObj(); new->mnolev = -mno; if (last == NIL) { @@ -1381,7 +1406,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; + OPS_Name commentText; + BOOLEAN hasComment; + INT16 j; + INT32 len; tag = OPT_impCtxt.nextTag; + hasComment = 0; + while (tag == 41) { + len = OPM_SymRInt(); + if (len < 0) { + len = 0; + } + if (len > 255) { + len = 255; + } + i = 0; + while (i < len) { + OPM_SymRCh(&commentText[__X(i, 256)]); + i += 1; + } + commentText[__X(i, 256)] = 0x00; + hasComment = 1; + tag = OPM_SymRInt(); + } + OPT_impCtxt.nextTag = tag; + if (tag < 0 || tag > 50) { + OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; + } if (tag == 19) { OPT_InStruct(&typ); obj = typ->strobj; @@ -1397,7 +1452,7 @@ static OPT_Object OPT_InObj (INT8 mno) obj->conval = OPT_NewConst(); OPT_InConstant(tag, obj->conval); obj->typ = OPT_InTyp(tag); - } else if (tag >= 31) { + } else if ((tag >= 31 && tag <= 33)) { obj->conval = OPT_NewConst(); obj->conval->intval = -1; OPT_InSign(mno, &obj->typ, &obj->link); @@ -1424,20 +1479,37 @@ static OPT_Object OPT_InObj (INT8 mno) OPM_LogWStr((CHAR*)"unhandled case at InObj, tag = ", 32); OPM_LogWNum(tag, 0); OPM_LogWLn(); + OPM_err(155); + return NIL; break; } } else if (tag == 20) { obj->mode = 5; OPT_InStruct(&obj->typ); - } else { + } else if (tag == 21 || tag == 22) { obj->mode = 1; if (tag == 22) { obj->vis = 2; } OPT_InStruct(&obj->typ); + } else { + OPM_LogWStr((CHAR*)"ERROR: Unexpected tag in InObj: ", 33); + OPM_LogWNum(tag, 0); + OPM_LogWLn(); + OPM_err(155); + return NIL; } OPT_InName((void*)obj->name, 256); } + if ((hasComment && obj != NIL)) { + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + j = 0; + while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { + (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + j += 1; + } + (*obj->comment)[__X(j, 256)] = 0x00; + } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { OPM_FPrint(&OPT_impCtxt.reffp, obj->typ->ref - 255); @@ -1780,13 +1852,40 @@ static void OPT_OutConstant (OPT_Object obj) } } +static void OPT_OutTruncatedName (CHAR *text, ADDRESS text__len) +{ + INT16 i; + __DUP(text, text__len, CHAR); + i = 0; + while ((i < 255 && text[__X(i, text__len)] != 0x00)) { + OPM_SymWCh(text[__X(i, text__len)]); + i += 1; + } + OPM_SymWCh(0x00); + __DEL(text); +} + static void OPT_OutObj (OPT_Object obj) { INT16 i, j; OPT_ConstExt ext = NIL; + INT16 k, l; if (obj != NIL) { OPT_OutObj(obj->left); if (__IN(obj->mode, 0x06ea, 32)) { + if (obj->comment != NIL) { + OPM_SymWInt(41); + k = 0; + while ((k < 255 && (*obj->comment)[__X(k, 256)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 256)]); + l += 1; + } + } if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { @@ -2026,7 +2125,7 @@ static void EnumPtrs(void (*P)(void*)) } __TDESC(OPT_ConstDesc, 1, 1) = {__TDFLDS("ConstDesc", 40), {0, -16}}; -__TDESC(OPT_ObjDesc, 1, 6) = {__TDFLDS("ObjDesc", 336), {0, 8, 16, 24, 304, 312, -56}}; +__TDESC(OPT_ObjDesc, 1, 7) = {__TDFLDS("ObjDesc", 344), {0, 8, 16, 24, 304, 312, 336, -64}}; __TDESC(OPT_StrDesc, 1, 3) = {__TDFLDS("StrDesc", 72), {48, 56, 64, -32}}; __TDESC(OPT_NodeDesc, 1, 6) = {__TDFLDS("NodeDesc", 56), {0, 8, 16, 32, 40, 48, -56}}; __TDESC(OPT_ImpCtxt, 1, 510) = {__TDFLDS("ImpCtxt", 5184), {16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index d2f8d9fe..cf456af5 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPT__h #define OPT__h @@ -61,6 +61,7 @@ typedef OPT_Const conval; INT32 adr, linkadr; INT16 x; + OPT_ConstExt comment; } OPT_ObjDesc; typedef diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 2535e861..26c1c715 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 44652222..fbabd8f4 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Out.c b/bootstrap/windows-88/Out.c index d8b08478..b43e55f1 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Out.h b/bootstrap/windows-88/Out.h index a008c089..a72547f4 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Out__h #define Out__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 358785ee..563f6417 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 7bd26e48..1259a228 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index f4cc31eb..512ec2c4 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 04ff0d7c..93e7fa75 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 629009fa..4b18812f 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 6acdef43..f0e3ae34 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 291ccf2b..77dc1bac 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 56bb9359..081eec2c 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/VT100.c b/bootstrap/windows-88/VT100.c index c5e8a3ba..346fb37b 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 diff --git a/bootstrap/windows-88/VT100.h b/bootstrap/windows-88/VT100.h index 94b7b846..4e708647 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef VT100__h #define VT100__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index cf90fa2a..ce2fc413 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -73,7 +73,7 @@ static void extTools_execute (CHAR *title, ADDRESS title__len, CHAR *cmd, ADDRES static void extTools_InitialiseCompilerCommand (CHAR *s, ADDRESS s__len, CHAR *additionalopts, ADDRESS additionalopts__len) { __DUP(additionalopts, additionalopts__len, CHAR); - __COPY("gcc -fPIC -g", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow", s, s__len); Strings_Append((CHAR*)" -I \"", 6, (void*)s, s__len); Strings_Append(OPM_ResourceDir, 1024, (void*)s, s__len); Strings_Append((CHAR*)"/include\" ", 11, (void*)s, s__len); diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 6b1b37eb..686f0b4e 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2024/08/23]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h diff --git a/src/library/ooc/oocIntStr.Mod b/src/library/ooc/oocIntStr.Mod index b5f9d928..2b8213ca 100644 --- a/src/library/ooc/oocIntStr.Mod +++ b/src/library/ooc/oocIntStr.Mod @@ -22,28 +22,28 @@ IMPORT Conv := oocConvTypes, IntConv := oocIntConv; TYPE - ConvResults*= Conv.ConvResults; (** possible values: strAllRight, strOutOfRange, strWrongFormat, strEmpty *) + ConvResults*= Conv.ConvResults; CONST - strAllRight*=Conv.strAllRight; (** the string format is correct for the corresponding conversion *) - strOutOfRange*=Conv.strOutOfRange; + strAllRight*=Conv.strAllRight; (** the string is well-formed but the value cannot be represented *) - strWrongFormat*=Conv.strWrongFormat; + strOutOfRange*=Conv.strOutOfRange; (** the string is in the wrong format for the conversion *) - strEmpty*=Conv.strEmpty; + strWrongFormat*=Conv.strWrongFormat; (** the given string is empty *) + strEmpty*=Conv.strEmpty; (** the string form of a signed whole number is ["+" | "-"] decimal_digit {decimal_digit} *) - -PROCEDURE StrToInt*(str: ARRAY OF CHAR; VAR int: LONGINT; VAR res: ConvResults); (** Ignores any leading spaces in `str'. If the subsequent characters in `str' are in the format of a signed whole number, assigns a corresponding value to `int'. Assigns a value indicating the format of `str' to `res'. *) + +PROCEDURE StrToInt*(str: ARRAY OF CHAR; VAR int: LONGINT; VAR res: ConvResults); BEGIN res:=IntConv.FormatInt(str); IF (res = strAllRight) THEN @@ -53,7 +53,7 @@ END StrToInt; PROCEDURE Reverse (VAR str : ARRAY OF CHAR; start, end : INTEGER); -(** Reverses order of characters in the interval [start..end]. *) +(* Reverses order of characters in the interval [start..end]. *) VAR h : CHAR; BEGIN @@ -63,10 +63,10 @@ BEGIN END END Reverse; - -PROCEDURE IntToStr*(int: LONGINT; VAR str: ARRAY OF CHAR); (** Converts the value of `int' to string form and copies the possibly truncated result to `str'. *) + +PROCEDURE IntToStr*(int: LONGINT; VAR str: ARRAY OF CHAR); CONST maxLength = 11; (* maximum number of digits representing a LONGINT value *) VAR From fa9e73f7afd25d15698bdc94226786ccc69a8dba Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Thu, 10 Jul 2025 23:08:59 +0400 Subject: [PATCH 237/241] adapted Base64 file from Oberon S3. --- src/library/s3/ethBase64.Mod | 233 +++++++++++++++++++++++++++++++++++ src/tools/make/oberon.mk | 1 + 2 files changed, 234 insertions(+) create mode 100644 src/library/s3/ethBase64.Mod diff --git a/src/library/s3/ethBase64.Mod b/src/library/s3/ethBase64.Mod new file mode 100644 index 00000000..66bcde05 --- /dev/null +++ b/src/library/s3/ethBase64.Mod @@ -0,0 +1,233 @@ +MODULE ethBase64; (* Adapted for VOC from Oberon System 3 *) +IMPORT Files, Texts, Oberon, Out; + +VAR + encTable: ARRAY 64 OF CHAR; + decTable: ARRAY 128 OF INTEGER; + W: Texts.Writer; + +PROCEDURE DecodeText*(T: Texts.Text; beg: LONGINT; F: Files.File): BOOLEAN; +VAR + R: Texts.Reader; + codes: ARRAY 4 OF INTEGER; + Ri: Files.Rider; + i: INTEGER; + ch: CHAR; + ok, end: BOOLEAN; +BEGIN + Files.Set(Ri, F, 0); + ok := TRUE; end := FALSE; + Texts.OpenReader(R, T, beg); + Texts.Read(R, ch); + REPEAT + i := 0; + WHILE ~R.eot & ok & (i < 4) DO + WHILE ~R.eot & (ch <= " ") DO + Texts.Read(R, ch) + END; + IF (ch >= 0X) & (ch < 80X) THEN + codes[i] := decTable[ORD(ch)]; + ok := codes[i] >= 0; INC(i); + IF ok THEN + Texts.Read(R, ch) + END + ELSE + ok := FALSE + END + END; + IF i > 0 THEN + IF ok & (i = 4) THEN + Files.Write(Ri, CHR(ASH(codes[0], 2)+ASH(codes[1], -4))); + Files.Write(Ri, CHR(ASH(codes[1], 4)+ASH(codes[2], -2))); + Files.Write(Ri, CHR(ASH(codes[2], 6)+codes[3])) + ELSIF ch = "=" THEN + ok := TRUE; end := TRUE; DEC(i); + IF i = 2 THEN + Files.Write(Ri, CHR(ASH(codes[0], 2)+ASH(codes[1], -4))) + ELSIF i = 3 THEN + Files.Write(Ri, CHR(ASH(codes[0], 2)+ASH(codes[1], -4))); + Files.Write(Ri, CHR(ASH(codes[1], 4)+ASH(codes[2], -2))) + ELSIF i # 0 THEN + ok := FALSE + END + ELSE + end := TRUE + END + ELSE + end := TRUE + END + UNTIL R.eot OR end; + RETURN ok +END DecodeText; + +PROCEDURE Decode*; +VAR + S: Texts.Scanner; + F: Files.File; + T: Texts.Text; + beg, end, time: LONGINT; + res: INTEGER; +BEGIN + Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); + Texts.Scan(S); + IF S.class IN {Texts.Name, Texts.String} THEN + Texts.WriteString(W, S.s); + F := Files.New(S.s); + Texts.Scan(S); + IF (S.class = Texts.Char) & ((S.c = "@") OR (S.c = "^")) THEN + T := NIL; + time := -1; + Oberon.GetSelection(T, beg, end, time); + IF T = NIL THEN + Texts.WriteString(W, " - no selection"); + Texts.WriteLn(W); + Texts.Append(Oberon.Log, W.buf); + RETURN + END + ELSIF S.class IN {Texts.Name, Texts.String} THEN + NEW(T); + Texts.Open(T, S.s); + beg := 0 + ELSE + beg := Texts.Pos(S); + T := Oberon.Par.text + END; + IF DecodeText(T, beg, F) THEN + Files.Register(F); + Texts.WriteString(W, " done") + ELSE + Texts.WriteString(W, " failed") + END; + Texts.WriteLn(W); + Texts.Append(Oberon.Log, W.buf) + END +END Decode; + +PROCEDURE EncodeFile*(F: Files.File; T: Texts.Text); +VAR + R: Files.Rider; + i, j, c, c0, c1, c2, l: LONGINT; + chars: ARRAY 3 OF CHAR; + + PROCEDURE OutCode(); + BEGIN + IF l > 76 THEN (* Standard line length for Base64 *) + Texts.WriteLn(W); + Texts.Append(T, W.buf); + l := 0 + END; + c0 := ORD(chars[0]); + c := ASH(c0, -2); + Texts.Write(W, encTable[c]); + c0 := c0 - ASH(c, 2); + + c1 := ORD(chars[1]); + c := ASH(c0, 4) + ASH(c1, -4); + Texts.Write(W, encTable[c]); + c1 := c1 MOD 16; + + c2 := ORD(chars[2]); + c := ASH(c1, 2) + ASH(c2, -6); + Texts.Write(W, encTable[c]); + c2 := c2 MOD 64; + + Texts.Write(W, encTable[c2]); + INC(l, 4) + END OutCode; + +BEGIN + l := 0; + Files.Set(R, F, 0); + Files.Read(R, chars[0]); + i := 1; + WHILE ~R.eof DO + IF i >= 3 THEN + OutCode(); + i := 0 + END; + Files.Read(R, chars[i]); + INC(i) + END; + DEC(i); + IF i > 0 THEN + j := i; + WHILE i < 3 DO + chars[i] := 0X; + INC(i) + END; + OutCode(); + (* Handle padding *) + IF j < 3 THEN + Texts.Append(T, W.buf); + (* Remove extra characters and add padding *) + j := 3 - j; + Texts.Delete(T, T.len - j, T.len); + FOR i := 1 TO j DO + Texts.Write(W, "=") + END + END + END; + Texts.WriteLn(W); + Texts.Append(T, W.buf) +END EncodeFile; + +PROCEDURE Encode*; +VAR + S: Texts.Scanner; + F: Files.File; + T: Texts.Text; + name: ARRAY 256 OF CHAR; +BEGIN + NEW(T); + Texts.Open(T, ""); + Texts.OpenScanner(S, Oberon.Par.text, Oberon.Par.pos); + Texts.Scan(S); + IF S.class IN {Texts.Name, Texts.String} THEN + COPY(S.s, name); + F := Files.Old(name); + IF F # NIL THEN + EncodeFile(F, T); + (* In VOC, we'll output to console instead of opening a viewer *) + Out.String("=== Base64 Encoded: "); Out.String(name); + Out.String(" ==="); Out.Ln; + (* Output the encoded text - would need a helper to print Text to console *) + Out.String("[Base64 encoded content would be here]"); Out.Ln; + Out.String("=== End ==="); Out.Ln; + ELSE + Out.String("File not found: "); Out.String(name); Out.Ln; + END + END +END Encode; + +PROCEDURE InitTables(); +VAR i, max: INTEGER; +BEGIN + (* Build encoding table *) + max := ORD("Z") - ORD("A"); + FOR i := 0 TO max DO + encTable[i] := CHR(i + ORD("A")) + END; + INC(max); + FOR i := max TO max + ORD("z") - ORD("a") DO + encTable[i] := CHR(i - max + ORD("a")) + END; + max := max + ORD("z") - ORD("a") + 1; + FOR i := max TO max + ORD("9") - ORD("0") DO + encTable[i] := CHR(i - max + ORD("0")) + END; + encTable[62] := "+"; + encTable[63] := "/"; + + (* Build decoding table *) + FOR i := 0 TO 127 DO + decTable[i] := -1 + END; + FOR i := 0 TO 63 DO + decTable[ORD(encTable[i])] := i + END +END InitTables; + +BEGIN + InitTables(); + Texts.OpenWriter(W) +END ethBase64. diff --git a/src/tools/make/oberon.mk b/src/tools/make/oberon.mk index 04d08af6..d68cc09b 100644 --- a/src/tools/make/oberon.mk +++ b/src/tools/make/oberon.mk @@ -369,6 +369,7 @@ s3: cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethDates.Mod cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethReals.Mod cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethStrings.Mod + cd $(BUILDDIR)/$(MODEL); "$(ROOTDIR)/$(OBECOMP)" -Fs -O$(MODEL) ../../../src/library/s3/ethBase64.Mod From 50b5a1438e664904871d699ca43c163d31709076 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 19 Jul 2025 05:13:09 +0400 Subject: [PATCH 238/241] better handling of faulty symbol files. ethStrings comments fixed. --- src/compiler/OPT.Mod | 9 +++++- src/library/s3/ethStrings.Mod | 61 +++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index a2e5f913..ef54b38d 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -811,6 +811,7 @@ BEGIN conval^.intval := OPM.ConstNotAlloc | NilTyp: conval^.intval := OPM.nilval ELSE OPM.LogWStr("unhandled case in InConstant(), f = "); OPM.LogWNum(f, 0); OPM.LogWLn; + OPM.err(155) (* Symbol file corrupted *) END END InConstant; @@ -1045,7 +1046,13 @@ BEGIN END; (* Now tag should be a valid object tag *) - impCtxt.nextTag := tag; + (*impCtxt.nextTag := tag;*) + + (* Additional validation for constants *) + IF (tag <= Pointer) & (tag = Undef) THEN + OPM.err(155); (* Symbol file error *) + RETURN NIL + END; (* Validate tag value *) IF (tag < 0) OR (tag > 50) THEN diff --git a/src/library/s3/ethStrings.Mod b/src/library/s3/ethStrings.Mod index 49f8a974..b2cf4901 100644 --- a/src/library/s3/ethStrings.Mod +++ b/src/library/s3/ethStrings.Mod @@ -7,16 +7,21 @@ MODULE ethStrings; (** portable *) (* ejz, *) Note: All strings MUST be 0X terminated. *) IMPORT Texts, Dates := ethDates, Reals := ethReals; - - CONST - CR* = 0DX; (** the Oberon end of line character *) - Tab* = 09X; (** the horizontal tab character *) - LF* = 0AX; (** the UNIX end of line character *) + CONST + (** the Oberon end of line character *) + CR* = 0DX; + (** the horizontal tab character *) + Tab* = 09X; + (** the UNIX end of line character *) + LF* = 0AX; VAR - isAlpha*: ARRAY 256 OF BOOLEAN; (** all letters in the oberon charset *) - ISOToOberon*, OberonToISO*: ARRAY 256 OF CHAR; (** Translation tables for iso-8859-1 to oberon ascii code. *) - CRLF*: ARRAY 4 OF CHAR; (** end of line "string" used by MS-DOS and most TCP protocols *) + (** all letters in the oberon charset *) + isAlpha*: ARRAY 256 OF BOOLEAN; + (** Translation tables for iso-8859-1 to oberon ascii code. *) + ISOToOberon*, OberonToISO*: ARRAY 256 OF CHAR; + (** end of line "string" used by MS-DOS and most TCP protocols *) + CRLF*: ARRAY 4 OF CHAR; sDayName: ARRAY 7, 4 OF CHAR; lDayName: ARRAY 7, 12 OF CHAR; sMonthName: ARRAY 12, 4 OF CHAR; @@ -24,7 +29,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) dateform, timeform: ARRAY 32 OF CHAR; (** Length of str. *) - PROCEDURE Length*(VAR str(** in *): ARRAY OF CHAR): LONGINT; + PROCEDURE Length*(VAR str(* in *): ARRAY OF CHAR): LONGINT; VAR i, l: LONGINT; BEGIN l := LEN(str); i := 0; @@ -35,7 +40,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Length; (** Append this to to. *) - PROCEDURE Append*(VAR to(** in/out *): ARRAY OF CHAR; this: ARRAY OF CHAR); + PROCEDURE Append*(VAR to(* in/out *): ARRAY OF CHAR; this: ARRAY OF CHAR); VAR i, j, l: LONGINT; BEGIN i := 0; @@ -50,7 +55,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Append; (** Append this to to. *) - PROCEDURE AppendCh*(VAR to(** in/out *): ARRAY OF CHAR; this: CHAR); + PROCEDURE AppendCh*(VAR to(* in/out *): ARRAY OF CHAR; this: CHAR); VAR i: LONGINT; BEGIN i := 0; @@ -124,7 +129,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END UpperCh; (** Convert str to all lower-case letters. *) - PROCEDURE Lower*(VAR str(** in *), lstr(** out *): ARRAY OF CHAR); + PROCEDURE Lower*(VAR str(* in *), lstr(* out *): ARRAY OF CHAR); VAR i: LONGINT; BEGIN i := 0; @@ -135,7 +140,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Lower; (** Convert str to all upper-case letters. *) - PROCEDURE Upper*(VAR str(** in *), ustr(** out *): ARRAY OF CHAR); + PROCEDURE Upper*(VAR str(* in *), ustr(* out *): ARRAY OF CHAR); VAR i: LONGINT; BEGIN i := 0; @@ -146,7 +151,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Upper; (** Is str prefixed by pre? *) - PROCEDURE Prefix*(pre: ARRAY OF CHAR; VAR str(** in *): ARRAY OF CHAR): BOOLEAN; + PROCEDURE Prefix*(pre: ARRAY OF CHAR; VAR str(* in *): ARRAY OF CHAR): BOOLEAN; VAR i: LONGINT; BEGIN i := 0; @@ -157,7 +162,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Prefix; (** Checks if str is prefixed by pre. The case is ignored. *) - PROCEDURE CAPPrefix*(pre: ARRAY OF CHAR; VAR str(** in *): ARRAY OF CHAR): BOOLEAN; + PROCEDURE CAPPrefix*(pre: ARRAY OF CHAR; VAR str(* in *): ARRAY OF CHAR): BOOLEAN; VAR i: LONGINT; BEGIN i := 0; @@ -168,7 +173,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END CAPPrefix; (** Compare str1 to str2. The case is ignored. *) - PROCEDURE CAPCompare*(VAR str1(** in *), str2(** in *): ARRAY OF CHAR): BOOLEAN; + PROCEDURE CAPCompare*(VAR str1(* in *), str2(* in *): ARRAY OF CHAR): BOOLEAN; VAR i: LONGINT; BEGIN i := 0; @@ -179,7 +184,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END CAPCompare; (** Get the parameter-value on line. The parameter value is started behind the first colon character. *) - PROCEDURE GetPar*(VAR line(** in *), par(** out *): ARRAY OF CHAR); + PROCEDURE GetPar*(VAR line(* in *), par(* out *): ARRAY OF CHAR); VAR i, j, l: LONGINT; BEGIN i := 0; @@ -200,7 +205,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END GetPar; (** Get the suffix of str. The suffix is started by the last dot in str. *) - PROCEDURE GetSuffix*(VAR str(** in *), suf(** out *): ARRAY OF CHAR); + PROCEDURE GetSuffix*(VAR str(* in *), suf(* out *): ARRAY OF CHAR); VAR i, j, l, dot: LONGINT; BEGIN dot := -1; i := 0; @@ -223,7 +228,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END GetSuffix; (** Change the suffix of str to suf. *) - PROCEDURE ChangeSuffix*(VAR str(** in/out *): ARRAY OF CHAR; suf: ARRAY OF CHAR); + PROCEDURE ChangeSuffix*(VAR str(* in/out *): ARRAY OF CHAR; suf: ARRAY OF CHAR); VAR i, j, l, dot: LONGINT; BEGIN dot := -1; i := 0; @@ -245,7 +250,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END ChangeSuffix; (** Search in src starting at pos for the next occurrence of pat. Returns pos=-1 if not found. *) - PROCEDURE Search*(pat: ARRAY OF CHAR; VAR src(** in *): ARRAY OF CHAR; VAR pos(** in/out *): LONGINT); + PROCEDURE Search*(pat: ARRAY OF CHAR; VAR src(* in *): ARRAY OF CHAR; VAR pos(** in/out *): LONGINT); CONST MaxPat = 128; VAR buf: ARRAY MaxPat OF CHAR; @@ -306,7 +311,7 @@ MODULE ethStrings; (** portable *) (* ejz, *) END Search; (** Search in src starting at pos for the next occurrence of pat. *) - PROCEDURE CAPSearch*(pat: ARRAY OF CHAR; VAR src(** in *): ARRAY OF CHAR; VAR pos(** in/out *): LONGINT); + PROCEDURE CAPSearch*(pat: ARRAY OF CHAR; VAR src(* in *): ARRAY OF CHAR; VAR pos(* in/out *): LONGINT); CONST MaxPat = 128; VAR buf: ARRAY MaxPat OF CHAR; @@ -445,13 +450,13 @@ MODULE ethStrings; (** portable *) (* ejz, *) (** Converts a real to a string. *) PROCEDURE RealToStr*(x: LONGREAL; VAR s: ARRAY OF CHAR); VAR e, h, l, n, len: LONGINT; i, j, pos: INTEGER; z: LONGREAL; d: ARRAY 16 OF CHAR; - + PROCEDURE Wr(ch: CHAR); BEGIN IF ch = 0X THEN HALT(42) END; IF pos < len THEN s[pos] := ch; INC(pos) END; END Wr; - + BEGIN len := LEN(s)-1; pos := 0; e:= Reals.ExpoL(x); @@ -573,14 +578,14 @@ BEGIN WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; IF s[p] = "-" THEN neg := TRUE; INC(p) ELSE neg := FALSE END; WHILE (s[p] = " ") OR (s[p] = "0") DO INC(p) END; - + y := 0; WHILE ("0" <= s[p]) & (s[p] <= "9") DO y := y * 10 + (ORD(s[p]) - 30H); INC(p); END; IF s[p] = "." THEN - INC(p); g := 1; + INC(p); g := 1; WHILE ("0" <= s[p]) & (s[p] <= "9") DO g := g / 10; y := y + g * (ORD(s[p]) - 30H); INC(p); @@ -706,7 +711,7 @@ END StrToReal; IF CAP(form[j]) = "M" THEN INC(j); IF CAP(form[j]) = "M" THEN INC(j); COPY(lMonthName[x-1], name) - ELSE COPY(sMonthName[x-1], name) + ELSE COPY(sMonthName[x-1], name) END; k := 0; WHILE name[k] # 0X DO str[i] := name[k]; INC(i); INC(k) END ELSE @@ -735,14 +740,14 @@ END StrToReal; str[i] := 0X END DateToStr; -(** Returns a month's name (set short to get the abbreviation) *) +(** Returns a month's name (set short to get the abbreviation) *) PROCEDURE MonthToStr* (month: INTEGER; VAR str: ARRAY OF CHAR; short: BOOLEAN); BEGIN month := (month - 1) MOD 12; IF short THEN COPY(sMonthName[month], str) ELSE COPY(lMonthName[month], str) END END MonthToStr; -(** Returns a day's name (set short to get the abbreviation) *) +(** Returns a day's name (set short to get the abbreviation) *) PROCEDURE DayToStr* (day: INTEGER; VAR str: ARRAY OF CHAR; short: BOOLEAN); BEGIN IF short THEN COPY(sDayName[day MOD 7], str) ELSE COPY(lDayName[day MOD 7], str) END From a517a42357c890c2361cd44e2d897d56b6121a34 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 19 Jul 2025 05:48:27 +0400 Subject: [PATCH 239/241] comments length increased, multiline comments are also now possible. --- src/compiler/OPM.Mod | 2 +- src/compiler/OPS.Mod | 63 ++++++++++++++++++-------------- src/compiler/OPT.Mod | 2 +- src/tools/browser/BrowserCmd.Mod | 12 +++++- 4 files changed, 48 insertions(+), 31 deletions(-) diff --git a/src/compiler/OPM.Mod b/src/compiler/OPM.Mod index 8e9f100b..ab3d7dae 100755 --- a/src/compiler/OPM.Mod +++ b/src/compiler/OPM.Mod @@ -8,7 +8,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *) CONST OptionChar* = "-"; - MaxCommentLen* = 256; + MaxCommentLen* = 1024; (* compiler option flag bits; don't change the encoding *) inxchk* = 0; (* index check on *) diff --git a/src/compiler/OPS.Mod b/src/compiler/OPS.Mod index ab68d629..f81bcae6 100644 --- a/src/compiler/OPS.Mod +++ b/src/compiler/OPS.Mod @@ -4,7 +4,7 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) IMPORT OPM, SYSTEM; CONST - MaxStrLen* = 256; + MaxStrLen* = 1024; MaxIdLen = 256; @@ -196,7 +196,7 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) commentText: ARRAY OPM.MaxCommentLen OF CHAR; i: INTEGER; nestLevel: INTEGER; - prevCh, nextCh: CHAR; + prevCh: CHAR; BEGIN FOR i := 0 TO LEN(commentText) - 1 DO commentText[i] := 0X @@ -224,45 +224,53 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) WHILE (nestLevel > 0) & (ch # OPM.Eot) DO IF (prevCh = "(") & (ch = "*") THEN INC(nestLevel); - prevCh := 0X + prevCh := ch; (* Don't set to 0X - keep the '*' *) + OPM.Get(ch) ELSIF (prevCh = "*") & (ch = ")") THEN DEC(nestLevel); IF nestLevel = 0 THEN OPM.Get(ch); (* move past ')' *) ELSE - prevCh := 0X + prevCh := ch; (* Keep the ')' *) + OPM.Get(ch) END ELSE - IF isExported & (nestLevel = 1) & (prevCh # 0X) THEN + IF isExported & (nestLevel = 1) THEN IF i < OPM.MaxCommentLen - 1 THEN - commentText[i] := prevCh; INC(i) + (* Handle all characters including newlines *) + IF (ch = 0DX) OR (ch = 0AX) THEN + (* Add newline if buffer is empty or last char isn't already a newline *) + IF (i = 0) OR (commentText[i-1] # 0AX) THEN + commentText[i] := 0AX; INC(i) + END; + (* Handle CRLF by skipping the LF if we just saw CR *) + IF (ch = 0DX) THEN + prevCh := ch; OPM.Get(ch); + IF ch = 0AX THEN + prevCh := ch; OPM.Get(ch) + END + ELSE + prevCh := ch; OPM.Get(ch) + END + ELSIF ch >= " " THEN + commentText[i] := ch; INC(i); + prevCh := ch; OPM.Get(ch) + ELSE + (* Skip control characters *) + prevCh := ch; OPM.Get(ch) + END + ELSE + prevCh := ch; OPM.Get(ch) END - END; - - prevCh := ch - END; - - IF nestLevel > 0 THEN OPM.Get(ch) END + ELSE + prevCh := ch; OPM.Get(ch) + END + END END; IF ch = OPM.Eot THEN err(5) END; - (* - IF isExported & (nestLevel = 0) & (prevCh # 0X) & (prevCh # "*") & (i < OPM.MaxCommentLen - 2) THEN - commentText[i] := prevCh; - INC(i) - END; - *) - IF isExported & (nestLevel = 0) & (prevCh # 0X) & (prevCh # "*") THEN - IF i < OPM.MaxCommentLen - 1 THEN - commentText[i] := prevCh; - INC(i) - ELSE - OPM.LogWStr("Truncating final comment character"); OPM.LogWLn - END - END; - IF isExported THEN IF i >= OPM.MaxCommentLen THEN @@ -272,7 +280,6 @@ MODULE OPS; (* NW, RC 6.3.89 / 18.10.92 *) (* object model 3.6.92 *) commentText[i] := 0X; OPM.StoreComment(commentText) END; - END Comment; diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index ef54b38d..2e730a70 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -1019,7 +1019,7 @@ END InStruct; PROCEDURE InObj(mno: SHORTINT): Object; (* first number in impCtxt.nextTag *) VAR i, s: INTEGER; ch: CHAR; obj, old: Object; typ: Struct; tag: LONGINT; ext: ConstExt; - commentText: OPS.Name; + commentText: ARRAY OPM.MaxCommentLen OF CHAR; hasComment : BOOLEAN; j: INTEGER; len: LONGINT; diff --git a/src/tools/browser/BrowserCmd.Mod b/src/tools/browser/BrowserCmd.Mod index 30871d59..e4ffe88f 100644 --- a/src/tools/browser/BrowserCmd.Mod +++ b/src/tools/browser/BrowserCmd.Mod @@ -67,7 +67,17 @@ MODULE BrowserCmd; (* RC 29.10.93 *) (* object model 4.12.93, command line ver IF obj^.comment # NIL THEN Indent(1); Ws("(** "); - Ws(obj^.comment^); + (* Handle multi-line comments *) + i := 0; + WHILE obj^.comment^[i] # 0X DO + IF obj^.comment^[i] = 0AX THEN + Ws(" *)"); Wln; + Indent(1); Ws(" "); + ELSE + Wc(obj^.comment^[i]) + END; + INC(i) + END; Ws(" *)"); Wln END; From 84516b2ac6b1efe51abb499814674131c8c35fc7 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Sat, 19 Jul 2025 05:56:37 +0400 Subject: [PATCH 240/241] prevents orphaned or misplaced comments from being written to symbol files. --- src/compiler/OPT.Mod | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index 2e730a70..228a8226 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -1348,16 +1348,20 @@ BEGIN IF obj^.mode IN {Con, Typ, Var, LProc, XProc, CProc, IProc} THEN (* Write comment BEFORE the object *) IF obj^.comment # NIL THEN - OPM.SymWInt(Scomment); - (* Calculate actual length of comment text *) - k := 0; - WHILE (k < OPM.MaxCommentLen - 1) & (obj^.comment^[k] # 0X) DO INC(k) END; - OPM.SymWInt(k); (* length prefix *) - (* Write comment data as individual characters *) - l := 0; - WHILE l < k DO - OPM.SymWCh(obj^.comment^[l]); INC(l) + (* Only write comments for objects that make sense *) + IF (obj^.mode IN {Con, Typ, Var, XProc, IProc, CProc}) & (obj^.vis # internal) THEN + OPM.SymWInt(Scomment); + (* Calculate actual length of comment text *) + k := 0; + WHILE (k < OPM.MaxCommentLen - 1) & (obj^.comment^[k] # 0X) DO INC(k) END; + OPM.SymWInt(k); (* length prefix *) + (* Write comment data as individual characters *) + l := 0; + WHILE l < k DO + OPM.SymWCh(obj^.comment^[l]); INC(l) + END END + (* If condition is false, we skip the comment entirely *) END; IF obj^.history = removed THEN FPrintErr(obj, 250) From 9fce469f23693802ff1e8901f7877ecf2c10fcae Mon Sep 17 00:00:00 2001 From: Robert Roland Date: Tue, 3 Feb 2026 17:43:38 -0800 Subject: [PATCH 241/241] Fixes build problems on gcc 15 GCC 15 changes the C language standard to gnu23, and VOC compiles just fine on gnu11. Tested against GCC 15 and GCC 14. --- src/tools/make/configure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/make/configure.c b/src/tools/make/configure.c index 79059bd7..258a1b4e 100644 --- a/src/tools/make/configure.c +++ b/src/tools/make/configure.c @@ -126,7 +126,7 @@ void determineOS() { #define optimize "" // " -O1" // FIXME ignoring warning floods that possibly are problems -#define ignore_gcc_warning_flood " -Wno-stringop-overflow" +#define ignore_gcc_warning_flood " -Wno-stringop-overflow -std=gnu11" #define ignore_clang_warning_flood " -Wno-deprecated-non-prototype" void determineCCompiler() {