From 93c0198f1828194da1f2028f13b57a4e949122a2 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Fri, 10 Jul 2026 04:05:39 +0400 Subject: [PATCH] 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 | 8 +-- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 8 +-- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 14 ++--- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 22 ++++++-- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 84 +++++++++++++++++----------- bootstrap/unix-44/OPS.h | 4 +- bootstrap/unix-44/OPT.c | 84 ++++++++++++++++------------ bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 20 ++++--- 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 | 8 +-- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 8 +-- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 14 ++--- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 22 ++++++-- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 84 +++++++++++++++++----------- bootstrap/unix-48/OPS.h | 4 +- bootstrap/unix-48/OPT.c | 84 ++++++++++++++++------------ bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 20 ++++--- 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 | 8 +-- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 8 +-- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 14 ++--- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 22 ++++++-- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 84 +++++++++++++++++----------- bootstrap/unix-88/OPS.h | 4 +- bootstrap/unix-88/OPT.c | 84 ++++++++++++++++------------ bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 20 ++++--- 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 | 8 ++- 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 | 8 +-- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 8 +-- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 14 ++--- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 22 ++++++-- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 84 +++++++++++++++++----------- bootstrap/windows-48/OPS.h | 4 +- bootstrap/windows-48/OPT.c | 84 ++++++++++++++++------------ bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 20 ++++--- 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 | 8 +-- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 8 +-- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 14 ++--- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 22 ++++++-- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 84 +++++++++++++++++----------- bootstrap/windows-88/OPS.h | 4 +- bootstrap/windows-88/OPT.c | 84 ++++++++++++++++------------ bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 20 ++++--- 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, 889 insertions(+), 647 deletions(-) diff --git a/bootstrap/unix-44/Compiler.c b/bootstrap/unix-44/Compiler.c index 4460479d..5fb197fa 100644 --- a/bootstrap/unix-44/Compiler.c +++ b/bootstrap/unix-44/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2026/07/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 fa87c9de..28930ae6 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2026/07/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 c3c54eed..06b2322e 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 54341368..ba5910fd 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ccdabcc2..8966b74a 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 42552415..d00d1bec 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 3cde1c3b..3064651b 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 535721e8..0612b10d 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 26d86b38..23f2dd74 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 913fbf2d..5a53405b 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) break; case 2: node = OPT_NewNode(1); + node->readonly = obj->vis == 3; break; case 3: node = OPT_NewNode(7); @@ -253,7 +254,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(); - __MOVE(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 1024); return x; } @@ -1626,7 +1627,6 @@ 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) { @@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) } else { OPB_CheckLeaf(ap, 0); } - if (ap->readonly) { + if ((ap->readonly && fp->vis != 3)) { OPB_err(76); } if (fp->typ->comp == 3) { diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index f66fcd66..0872ee74 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b92ccc1..061511af 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) INT16 i; __DUP(y, y__len, CHAR); i = 0; - while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { + while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) { i += 1; } __DEL(y); @@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis) _for__7 = (INT16)(*obj->conval->ext)[0]; i = i; while (i <= _for__7) { - OPM_Write((*obj->conval->ext)[__X(i, 256)]); + OPM_Write((*obj->conval->ext)[__X(i, 1024)]); i += 1; } OPM_WriteLn(); @@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form) } break; case 8: - OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); + OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1); break; case 9: OPM_WriteString((CHAR*)"NIL", 4); diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 3bfd88b8..5642d227 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 bcb39247..0ad16dc2 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,7 +19,7 @@ typedef CHAR OPM_FileName[32]; -static CHAR OPM_currentComment[256]; +static CHAR OPM_currentComment[1024]; static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; @@ -166,11 +166,11 @@ 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)]; + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)]; i += 1; } - OPM_currentComment[__X(i, 256)] = 0x00; + OPM_currentComment[__X(i, 1024)] = 0x00; OPM_hasComment = 1; __DEL(text); } @@ -180,8 +180,8 @@ 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)]; + while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)]; i += 1; } text[__X(i, text__len)] = 0x00; diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 64c15a28..f6ffb505 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ad4a370a..73f219fe 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp) if (OPP_sym == 38) { OPT_Insert(OPS_name, &par); OPS_Get(&OPP_sym); - par->mode = mode; + if (OPP_sym == 7) { + if (mode == 2) { + OPP_err(246); + } + OPS_Get(&OPP_sym); + par->mode = 2; + par->vis = 3; + } else { + par->mode = mode; + par->vis = 0; + } par->link = NIL; if (first == NIL) { first = par; @@ -939,8 +949,8 @@ static void GetCode__19 (void) (*ProcedureDeclaration__16_s->proc)->conval->ext = ext; n = 0; if (OPP_sym == 37) { - while (OPS_str[__X(n, 256)] != 0x00) { - (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; + while (OPS_str[__X(n, 1024)] != 0x00) { + (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)]; n += 1; } (*ext)[0] = __CHR(n); @@ -950,13 +960,13 @@ static void GetCode__19 (void) if (OPP_sym == 35) { c = OPS_intval; n += 1; - if ((c < 0 || c > 255) || n == 256) { + if ((c < 0 || c > 255) || n == 1024) { OPP_err(64); c = 1; n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = __CHR(c); + (*ext)[__X(n, 1024)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 3d8cefe8..8d5b805a 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a25a2c12..30e0c23a 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -12,7 +12,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; export OPS_Name OPS_name; @@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym) OPS_err(3); break; } - if (i == 255) { + if (i == 1023) { OPS_err(241); break; } - OPS_str[__X(i, 256)] = OPS_ch; + OPS_str[__X(i, 1024)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[__X(i, 256)] = 0x00; + OPS_str[__X(i, 1024)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -280,12 +280,12 @@ static void Comment__2 (void); static void Comment__2 (void) { BOOLEAN isExported; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 i, nestLevel; - CHAR prevCh, nextCh; + CHAR prevCh; i = 0; - while (i <= 255) { - commentText[__X(i, 256)] = 0x00; + while (i <= 1023) { + commentText[__X(i, 1024)] = 0x00; i += 1; } isExported = 0; @@ -298,7 +298,7 @@ static void Comment__2 (void) OPM_Get(&OPS_ch); if (OPS_ch == ')') { commentText[0] = 0x00; - OPM_StoreComment(commentText, 256); + OPM_StoreComment(commentText, 1024); OPM_Get(&OPS_ch); return; } @@ -306,47 +306,65 @@ static void Comment__2 (void) while ((nestLevel > 0 && OPS_ch != 0x00)) { if ((prevCh == '(' && OPS_ch == '*')) { nestLevel += 1; - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } else if ((prevCh == '*' && OPS_ch == ')')) { nestLevel -= 1; if (nestLevel == 0) { OPM_Get(&OPS_ch); } else { - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } } else { - if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { - if (i < 255) { - commentText[__X(i, 256)] = prevCh; - i += 1; + if ((isExported && nestLevel == 1)) { + if (i < 1023) { + if (OPS_ch == 0x0d || OPS_ch == 0x0a) { + if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) { + commentText[__X(i, 1024)] = 0x0a; + i += 1; + } + if (OPS_ch == 0x0d) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + if (OPS_ch == 0x0a) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else if (OPS_ch >= ' ') { + commentText[__X(i, 1024)] = OPS_ch; + i += 1; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } - prevCh = OPS_ch; - } - if (nestLevel > 0) { - OPM_Get(&OPS_ch); } } 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 (isExported) { - if (i >= 256) { + if (i >= 1024) { OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWLn(); - i = 255; + i = 1023; } - commentText[__X(i, 256)] = 0x00; - OPM_StoreComment(commentText, 256); + commentText[__X(i, 1024)] = 0x00; + OPM_StoreComment(commentText, 1024); } } diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 19e222ac..23609a77 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h @@ -9,7 +9,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; import OPS_Name OPS_name; diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 72261b24..cd5fcdc8 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class) OPT_ConstExt OPT_NewExt (void) { OPT_ConstExt ext = NIL; - ext = __NEWARR(NIL, 1, 1, 1, 0, 256); + ext = __NEWARR(NIL, 1, 1, 1, 0, 1024); return ext; } @@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; @@ -593,15 +593,15 @@ 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); + OPM_GetComment((void*)commentText, 1024); if (commentText[0] != 0x00) { - ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { - (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) { + (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*ob1->comment)[__X(j, 256)] = 0x00; + (*ob1->comment)[__X(j, 1024)] = 0x00; } break; } @@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrintLReal(&fprint, obj->conval->realval); break; case 8: - OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); + OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024); break; case 9: break; @@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj) f = 1; OPM_FPrint(&fprint, m); while (f <= m) { - OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); + OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]); f += 1; } } else if (obj->mode == 5) { @@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) i = 0; do { OPM_SymRCh(&ch); - (*ext)[__X(i, 256)] = ch; + (*ext)[__X(i, 1024)] = ch; i += 1; } while (!(ch == 0x00)); conval->intval2 = i; @@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWNum(f, 0); OPM_LogWLn(); + OPM_err(155); break; } } @@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) } if (tag == 23) { new->mode = 1; + } else if (tag == 42) { + new->mode = 2; + new->vis = 3; } else { new->mode = 2; } @@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag) return OPT_IntType(OPM_SymRInt()); } else if (tag == 7) { return OPT_SetType(OPM_SymRInt()); + } else if (tag == 12) { + return OPT_adrtyp; } else { return OPT_impCtxt.ref[__X(tag, 255)]; } @@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; - OPS_Name commentText; + CHAR commentText[1024]; BOOLEAN hasComment; INT16 j; INT32 len; @@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno) if (len < 0) { len = 0; } - if (len > 255) { - len = 255; + if (len > 1023) { + len = 1023; } i = 0; while (i < len) { - OPM_SymRCh(&commentText[__X(i, 256)]); + OPM_SymRCh(&commentText[__X(i, 1024)]); i += 1; } - commentText[__X(i, 256)] = 0x00; + commentText[__X(i, 1024)] = 0x00; hasComment = 1; tag = OPM_SymRInt(); } - OPT_impCtxt.nextTag = tag; + if ((tag <= 11 && tag == 0)) { + OPM_err(155); + return NIL; + } if (tag < 0 || tag > 50) { OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWNum(tag, 0); @@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno) (*ext)[0] = __CHR(s); i = 1; while (i <= s) { - OPM_SymRCh(&(*ext)[__X(i, 256)]); + OPM_SymRCh(&(*ext)[__X(i, 1024)]); i += 1; } break; @@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_InName((void*)obj->name, 256); } if ((hasComment && obj != NIL)) { - obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { - (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) { + (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*obj->comment)[__X(j, 256)] = 0x00; + (*obj->comment)[__X(j, 1024)] = 0x00; } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { @@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par) while (par != NIL) { if (par->mode == 1) { OPM_SymWInt(23); + } else if (par->vis == 3) { + OPM_SymWInt(42); } else { OPM_SymWInt(24); } @@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWLReal(obj->conval->realval); break; case 8: - OPT_OutName((void*)*obj->conval->ext, 256); + OPT_OutName((void*)*obj->conval->ext, 1024); break; case 9: break; @@ -1857,7 +1868,7 @@ 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)) { + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { OPM_SymWCh(text[__X(i, text__len)]); i += 1; } @@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj) 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 ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) { + OPM_SymWInt(41); + k = 0; + while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 1024)]); + l += 1; + } } } if (obj->history == 4) { @@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj) i = 1; OPM_SymWInt(j); while (i <= j) { - OPM_SymWCh((*ext)[__X(i, 256)]); + OPM_SymWCh((*ext)[__X(i, 1024)]); i += 1; } OPT_OutName((void*)obj->name, 256); @@ -2191,6 +2204,7 @@ export void *OPT__init(void) OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); + OPT_adrtyp->ref = 12; OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index cf456af5..ae1b41ca 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 0425b2e0..fe8d0057 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) } } } else { - if ((((mode == 2 && typ != n->typ)) && prec == -1)) { + if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) { OPM_WriteString((CHAR*)"(void*)", 8); } } @@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteInt(r->conval->intval2); } else if (r->typ->comp == 3) { OPM_WriteString((CHAR*)"__X(", 5); - OPC_Len(r->obj, r->typ, 0); + OPV_Len(r, 0); OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); @@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) } if (l->typ == r->typ) { OPV_expr(r, -1); - } else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { - OPM_Write('('); - OPC_Ident(l->typ->strobj); - OPM_Write(')'); + } else if ((l->typ->form == 11 && r->typ->form != 9)) { + if (l->typ->strobj != NIL) { + OPM_Write('('); + OPC_Ident(l->typ->strobj); + OPM_Write(')'); + } else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) { + OPM_Write('('); + OPC_Ident(l->typ->BaseTyp->strobj); + OPM_WriteString((CHAR*)"*)", 3); + } OPV_expr(r, -1); } else if (l->typ->comp == 4) { OPM_WriteString((CHAR*)"*(", 3); diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index fbabd8f4..259d2274 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce936589..a58df1bd 100644 --- a/bootstrap/unix-44/Out.c +++ b/bootstrap/unix-44/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a72547f4..da4c375e 100644 --- a/bootstrap/unix-44/Out.h +++ b/bootstrap/unix-44/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 befa6033..031b76f2 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 fbeef8c7..d05e1a4b 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 512ec2c4..17e02efc 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 93e7fa75..72cdeac9 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4b18812f..33402210 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 f0e3ae34..94c330de 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7e7522c2..54ead86f 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 dc569fa9..beb22949 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 346fb37b..2dbabfac 100644 --- a/bootstrap/unix-44/VT100.c +++ b/bootstrap/unix-44/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4e708647..d93196f4 100644 --- a/bootstrap/unix-44/VT100.h +++ b/bootstrap/unix-44/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce2fc413..b927caed 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. 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 -Wno-stringop-overflow", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", 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 686f0b4e..7b30a000 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4460479d..5fb197fa 100644 --- a/bootstrap/unix-48/Compiler.c +++ b/bootstrap/unix-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2026/07/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 fa87c9de..28930ae6 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2026/07/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 c3c54eed..06b2322e 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 54341368..ba5910fd 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ccdabcc2..8966b74a 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 42552415..d00d1bec 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 3cde1c3b..3064651b 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 535721e8..0612b10d 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 26d86b38..23f2dd74 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 913fbf2d..5a53405b 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) break; case 2: node = OPT_NewNode(1); + node->readonly = obj->vis == 3; break; case 3: node = OPT_NewNode(7); @@ -253,7 +254,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(); - __MOVE(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 1024); return x; } @@ -1626,7 +1627,6 @@ 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) { @@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) } else { OPB_CheckLeaf(ap, 0); } - if (ap->readonly) { + if ((ap->readonly && fp->vis != 3)) { OPB_err(76); } if (fp->typ->comp == 3) { diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index f66fcd66..0872ee74 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b92ccc1..061511af 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) INT16 i; __DUP(y, y__len, CHAR); i = 0; - while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { + while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) { i += 1; } __DEL(y); @@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis) _for__7 = (INT16)(*obj->conval->ext)[0]; i = i; while (i <= _for__7) { - OPM_Write((*obj->conval->ext)[__X(i, 256)]); + OPM_Write((*obj->conval->ext)[__X(i, 1024)]); i += 1; } OPM_WriteLn(); @@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form) } break; case 8: - OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); + OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1); break; case 9: OPM_WriteString((CHAR*)"NIL", 4); diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 3bfd88b8..5642d227 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 bcb39247..0ad16dc2 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,7 +19,7 @@ typedef CHAR OPM_FileName[32]; -static CHAR OPM_currentComment[256]; +static CHAR OPM_currentComment[1024]; static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; @@ -166,11 +166,11 @@ 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)]; + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)]; i += 1; } - OPM_currentComment[__X(i, 256)] = 0x00; + OPM_currentComment[__X(i, 1024)] = 0x00; OPM_hasComment = 1; __DEL(text); } @@ -180,8 +180,8 @@ 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)]; + while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)]; i += 1; } text[__X(i, text__len)] = 0x00; diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 64c15a28..f6ffb505 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ad4a370a..73f219fe 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp) if (OPP_sym == 38) { OPT_Insert(OPS_name, &par); OPS_Get(&OPP_sym); - par->mode = mode; + if (OPP_sym == 7) { + if (mode == 2) { + OPP_err(246); + } + OPS_Get(&OPP_sym); + par->mode = 2; + par->vis = 3; + } else { + par->mode = mode; + par->vis = 0; + } par->link = NIL; if (first == NIL) { first = par; @@ -939,8 +949,8 @@ static void GetCode__19 (void) (*ProcedureDeclaration__16_s->proc)->conval->ext = ext; n = 0; if (OPP_sym == 37) { - while (OPS_str[__X(n, 256)] != 0x00) { - (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; + while (OPS_str[__X(n, 1024)] != 0x00) { + (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)]; n += 1; } (*ext)[0] = __CHR(n); @@ -950,13 +960,13 @@ static void GetCode__19 (void) if (OPP_sym == 35) { c = OPS_intval; n += 1; - if ((c < 0 || c > 255) || n == 256) { + if ((c < 0 || c > 255) || n == 1024) { OPP_err(64); c = 1; n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = __CHR(c); + (*ext)[__X(n, 1024)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 3d8cefe8..8d5b805a 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a25a2c12..30e0c23a 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -12,7 +12,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; export OPS_Name OPS_name; @@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym) OPS_err(3); break; } - if (i == 255) { + if (i == 1023) { OPS_err(241); break; } - OPS_str[__X(i, 256)] = OPS_ch; + OPS_str[__X(i, 1024)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[__X(i, 256)] = 0x00; + OPS_str[__X(i, 1024)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -280,12 +280,12 @@ static void Comment__2 (void); static void Comment__2 (void) { BOOLEAN isExported; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 i, nestLevel; - CHAR prevCh, nextCh; + CHAR prevCh; i = 0; - while (i <= 255) { - commentText[__X(i, 256)] = 0x00; + while (i <= 1023) { + commentText[__X(i, 1024)] = 0x00; i += 1; } isExported = 0; @@ -298,7 +298,7 @@ static void Comment__2 (void) OPM_Get(&OPS_ch); if (OPS_ch == ')') { commentText[0] = 0x00; - OPM_StoreComment(commentText, 256); + OPM_StoreComment(commentText, 1024); OPM_Get(&OPS_ch); return; } @@ -306,47 +306,65 @@ static void Comment__2 (void) while ((nestLevel > 0 && OPS_ch != 0x00)) { if ((prevCh == '(' && OPS_ch == '*')) { nestLevel += 1; - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } else if ((prevCh == '*' && OPS_ch == ')')) { nestLevel -= 1; if (nestLevel == 0) { OPM_Get(&OPS_ch); } else { - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } } else { - if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { - if (i < 255) { - commentText[__X(i, 256)] = prevCh; - i += 1; + if ((isExported && nestLevel == 1)) { + if (i < 1023) { + if (OPS_ch == 0x0d || OPS_ch == 0x0a) { + if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) { + commentText[__X(i, 1024)] = 0x0a; + i += 1; + } + if (OPS_ch == 0x0d) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + if (OPS_ch == 0x0a) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else if (OPS_ch >= ' ') { + commentText[__X(i, 1024)] = OPS_ch; + i += 1; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } - prevCh = OPS_ch; - } - if (nestLevel > 0) { - OPM_Get(&OPS_ch); } } 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 (isExported) { - if (i >= 256) { + if (i >= 1024) { OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWLn(); - i = 255; + i = 1023; } - commentText[__X(i, 256)] = 0x00; - OPM_StoreComment(commentText, 256); + commentText[__X(i, 1024)] = 0x00; + OPM_StoreComment(commentText, 1024); } } diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 19e222ac..23609a77 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h @@ -9,7 +9,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; import OPS_Name OPS_name; diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index ebb47dd8..73f8eef3 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class) OPT_ConstExt OPT_NewExt (void) { OPT_ConstExt ext = NIL; - ext = __NEWARR(NIL, 1, 1, 1, 0, 256); + ext = __NEWARR(NIL, 1, 1, 1, 0, 1024); return ext; } @@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; @@ -593,15 +593,15 @@ 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); + OPM_GetComment((void*)commentText, 1024); if (commentText[0] != 0x00) { - ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { - (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) { + (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*ob1->comment)[__X(j, 256)] = 0x00; + (*ob1->comment)[__X(j, 1024)] = 0x00; } break; } @@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrintLReal(&fprint, obj->conval->realval); break; case 8: - OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); + OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024); break; case 9: break; @@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj) f = 1; OPM_FPrint(&fprint, m); while (f <= m) { - OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); + OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]); f += 1; } } else if (obj->mode == 5) { @@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) i = 0; do { OPM_SymRCh(&ch); - (*ext)[__X(i, 256)] = ch; + (*ext)[__X(i, 1024)] = ch; i += 1; } while (!(ch == 0x00)); conval->intval2 = i; @@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWNum(f, 0); OPM_LogWLn(); + OPM_err(155); break; } } @@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) } if (tag == 23) { new->mode = 1; + } else if (tag == 42) { + new->mode = 2; + new->vis = 3; } else { new->mode = 2; } @@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag) return OPT_IntType(OPM_SymRInt()); } else if (tag == 7) { return OPT_SetType(OPM_SymRInt()); + } else if (tag == 12) { + return OPT_adrtyp; } else { return OPT_impCtxt.ref[__X(tag, 255)]; } @@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; - OPS_Name commentText; + CHAR commentText[1024]; BOOLEAN hasComment; INT16 j; INT32 len; @@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno) if (len < 0) { len = 0; } - if (len > 255) { - len = 255; + if (len > 1023) { + len = 1023; } i = 0; while (i < len) { - OPM_SymRCh(&commentText[__X(i, 256)]); + OPM_SymRCh(&commentText[__X(i, 1024)]); i += 1; } - commentText[__X(i, 256)] = 0x00; + commentText[__X(i, 1024)] = 0x00; hasComment = 1; tag = OPM_SymRInt(); } - OPT_impCtxt.nextTag = tag; + if ((tag <= 11 && tag == 0)) { + OPM_err(155); + return NIL; + } if (tag < 0 || tag > 50) { OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWNum(tag, 0); @@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno) (*ext)[0] = __CHR(s); i = 1; while (i <= s) { - OPM_SymRCh(&(*ext)[__X(i, 256)]); + OPM_SymRCh(&(*ext)[__X(i, 1024)]); i += 1; } break; @@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_InName((void*)obj->name, 256); } if ((hasComment && obj != NIL)) { - obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { - (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) { + (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*obj->comment)[__X(j, 256)] = 0x00; + (*obj->comment)[__X(j, 1024)] = 0x00; } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { @@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par) while (par != NIL) { if (par->mode == 1) { OPM_SymWInt(23); + } else if (par->vis == 3) { + OPM_SymWInt(42); } else { OPM_SymWInt(24); } @@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWLReal(obj->conval->realval); break; case 8: - OPT_OutName((void*)*obj->conval->ext, 256); + OPT_OutName((void*)*obj->conval->ext, 1024); break; case 9: break; @@ -1857,7 +1868,7 @@ 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)) { + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { OPM_SymWCh(text[__X(i, text__len)]); i += 1; } @@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj) 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 ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) { + OPM_SymWInt(41); + k = 0; + while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 1024)]); + l += 1; + } } } if (obj->history == 4) { @@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj) i = 1; OPM_SymWInt(j); while (i <= j) { - OPM_SymWCh((*ext)[__X(i, 256)]); + OPM_SymWCh((*ext)[__X(i, 1024)]); i += 1; } OPT_OutName((void*)obj->name, 256); @@ -2191,6 +2204,7 @@ export void *OPT__init(void) OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); + OPT_adrtyp->ref = 12; OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index cf456af5..ae1b41ca 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 0425b2e0..fe8d0057 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) } } } else { - if ((((mode == 2 && typ != n->typ)) && prec == -1)) { + if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) { OPM_WriteString((CHAR*)"(void*)", 8); } } @@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteInt(r->conval->intval2); } else if (r->typ->comp == 3) { OPM_WriteString((CHAR*)"__X(", 5); - OPC_Len(r->obj, r->typ, 0); + OPV_Len(r, 0); OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); @@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) } if (l->typ == r->typ) { OPV_expr(r, -1); - } else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { - OPM_Write('('); - OPC_Ident(l->typ->strobj); - OPM_Write(')'); + } else if ((l->typ->form == 11 && r->typ->form != 9)) { + if (l->typ->strobj != NIL) { + OPM_Write('('); + OPC_Ident(l->typ->strobj); + OPM_Write(')'); + } else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) { + OPM_Write('('); + OPC_Ident(l->typ->BaseTyp->strobj); + OPM_WriteString((CHAR*)"*)", 3); + } OPV_expr(r, -1); } else if (l->typ->comp == 4) { OPM_WriteString((CHAR*)"*(", 3); diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index fbabd8f4..259d2274 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce936589..a58df1bd 100644 --- a/bootstrap/unix-48/Out.c +++ b/bootstrap/unix-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a72547f4..da4c375e 100644 --- a/bootstrap/unix-48/Out.h +++ b/bootstrap/unix-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 befa6033..031b76f2 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 fbeef8c7..d05e1a4b 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 512ec2c4..17e02efc 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 93e7fa75..72cdeac9 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4b18812f..33402210 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 f0e3ae34..94c330de 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 43c3858f..322ce28b 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 fd0c0fa5..d1d92b87 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 346fb37b..2dbabfac 100644 --- a/bootstrap/unix-48/VT100.c +++ b/bootstrap/unix-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4e708647..d93196f4 100644 --- a/bootstrap/unix-48/VT100.h +++ b/bootstrap/unix-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce2fc413..b927caed 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. 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 -Wno-stringop-overflow", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", 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 686f0b4e..7b30a000 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4460479d..5fb197fa 100644 --- a/bootstrap/unix-88/Compiler.c +++ b/bootstrap/unix-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2026/07/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 fa87c9de..28930ae6 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2026/07/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 c3c54eed..06b2322e 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 57e78310..4cec8d13 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 676f434c..9d0b8b12 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b004b60..15a6e3b6 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 45a9c6d2..ec34eede 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 a5b989e5..32b7cccc 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ee65a938..8a333379 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 913fbf2d..5a53405b 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) break; case 2: node = OPT_NewNode(1); + node->readonly = obj->vis == 3; break; case 3: node = OPT_NewNode(7); @@ -253,7 +254,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(); - __MOVE(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 1024); return x; } @@ -1626,7 +1627,6 @@ 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) { @@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) } else { OPB_CheckLeaf(ap, 0); } - if (ap->readonly) { + if ((ap->readonly && fp->vis != 3)) { OPB_err(76); } if (fp->typ->comp == 3) { diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index f66fcd66..0872ee74 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b92ccc1..061511af 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) INT16 i; __DUP(y, y__len, CHAR); i = 0; - while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { + while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) { i += 1; } __DEL(y); @@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis) _for__7 = (INT16)(*obj->conval->ext)[0]; i = i; while (i <= _for__7) { - OPM_Write((*obj->conval->ext)[__X(i, 256)]); + OPM_Write((*obj->conval->ext)[__X(i, 1024)]); i += 1; } OPM_WriteLn(); @@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form) } break; case 8: - OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); + OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1); break; case 9: OPM_WriteString((CHAR*)"NIL", 4); diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 3bfd88b8..5642d227 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 b486b3b9..6f26cfe8 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,7 +19,7 @@ typedef CHAR OPM_FileName[32]; -static CHAR OPM_currentComment[256]; +static CHAR OPM_currentComment[1024]; static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; @@ -166,11 +166,11 @@ 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)]; + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)]; i += 1; } - OPM_currentComment[__X(i, 256)] = 0x00; + OPM_currentComment[__X(i, 1024)] = 0x00; OPM_hasComment = 1; __DEL(text); } @@ -180,8 +180,8 @@ 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)]; + while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)]; i += 1; } text[__X(i, text__len)] = 0x00; diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 64c15a28..f6ffb505 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 3fed2e31..b4f5f6bb 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp) if (OPP_sym == 38) { OPT_Insert(OPS_name, &par); OPS_Get(&OPP_sym); - par->mode = mode; + if (OPP_sym == 7) { + if (mode == 2) { + OPP_err(246); + } + OPS_Get(&OPP_sym); + par->mode = 2; + par->vis = 3; + } else { + par->mode = mode; + par->vis = 0; + } par->link = NIL; if (first == NIL) { first = par; @@ -939,8 +949,8 @@ static void GetCode__19 (void) (*ProcedureDeclaration__16_s->proc)->conval->ext = ext; n = 0; if (OPP_sym == 37) { - while (OPS_str[__X(n, 256)] != 0x00) { - (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; + while (OPS_str[__X(n, 1024)] != 0x00) { + (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)]; n += 1; } (*ext)[0] = __CHR(n); @@ -950,13 +960,13 @@ static void GetCode__19 (void) if (OPP_sym == 35) { c = OPS_intval; n += 1; - if ((c < 0 || c > 255) || n == 256) { + if ((c < 0 || c > 255) || n == 1024) { OPP_err(64); c = 1; n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = __CHR(c); + (*ext)[__X(n, 1024)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 3d8cefe8..8d5b805a 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a25a2c12..30e0c23a 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -12,7 +12,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; export OPS_Name OPS_name; @@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym) OPS_err(3); break; } - if (i == 255) { + if (i == 1023) { OPS_err(241); break; } - OPS_str[__X(i, 256)] = OPS_ch; + OPS_str[__X(i, 1024)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[__X(i, 256)] = 0x00; + OPS_str[__X(i, 1024)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -280,12 +280,12 @@ static void Comment__2 (void); static void Comment__2 (void) { BOOLEAN isExported; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 i, nestLevel; - CHAR prevCh, nextCh; + CHAR prevCh; i = 0; - while (i <= 255) { - commentText[__X(i, 256)] = 0x00; + while (i <= 1023) { + commentText[__X(i, 1024)] = 0x00; i += 1; } isExported = 0; @@ -298,7 +298,7 @@ static void Comment__2 (void) OPM_Get(&OPS_ch); if (OPS_ch == ')') { commentText[0] = 0x00; - OPM_StoreComment(commentText, 256); + OPM_StoreComment(commentText, 1024); OPM_Get(&OPS_ch); return; } @@ -306,47 +306,65 @@ static void Comment__2 (void) while ((nestLevel > 0 && OPS_ch != 0x00)) { if ((prevCh == '(' && OPS_ch == '*')) { nestLevel += 1; - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } else if ((prevCh == '*' && OPS_ch == ')')) { nestLevel -= 1; if (nestLevel == 0) { OPM_Get(&OPS_ch); } else { - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } } else { - if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { - if (i < 255) { - commentText[__X(i, 256)] = prevCh; - i += 1; + if ((isExported && nestLevel == 1)) { + if (i < 1023) { + if (OPS_ch == 0x0d || OPS_ch == 0x0a) { + if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) { + commentText[__X(i, 1024)] = 0x0a; + i += 1; + } + if (OPS_ch == 0x0d) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + if (OPS_ch == 0x0a) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else if (OPS_ch >= ' ') { + commentText[__X(i, 1024)] = OPS_ch; + i += 1; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } - prevCh = OPS_ch; - } - if (nestLevel > 0) { - OPM_Get(&OPS_ch); } } 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 (isExported) { - if (i >= 256) { + if (i >= 1024) { OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWLn(); - i = 255; + i = 1023; } - commentText[__X(i, 256)] = 0x00; - OPM_StoreComment(commentText, 256); + commentText[__X(i, 1024)] = 0x00; + OPM_StoreComment(commentText, 1024); } } diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index 19e222ac..23609a77 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h @@ -9,7 +9,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; import OPS_Name OPS_name; diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index c3999981..53898c63 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class) OPT_ConstExt OPT_NewExt (void) { OPT_ConstExt ext = NIL; - ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); return ext; } @@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; @@ -593,15 +593,15 @@ 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); + OPM_GetComment((void*)commentText, 1024); if (commentText[0] != 0x00) { - ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); j = 0; - while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { - (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) { + (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*ob1->comment)[__X(j, 256)] = 0x00; + (*ob1->comment)[__X(j, 1024)] = 0x00; } break; } @@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrintLReal(&fprint, obj->conval->realval); break; case 8: - OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); + OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024); break; case 9: break; @@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj) f = 1; OPM_FPrint(&fprint, m); while (f <= m) { - OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); + OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]); f += 1; } } else if (obj->mode == 5) { @@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) i = 0; do { OPM_SymRCh(&ch); - (*ext)[__X(i, 256)] = ch; + (*ext)[__X(i, 1024)] = ch; i += 1; } while (!(ch == 0x00)); conval->intval2 = i; @@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWNum(f, 0); OPM_LogWLn(); + OPM_err(155); break; } } @@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) } if (tag == 23) { new->mode = 1; + } else if (tag == 42) { + new->mode = 2; + new->vis = 3; } else { new->mode = 2; } @@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag) return OPT_IntType(OPM_SymRInt()); } else if (tag == 7) { return OPT_SetType(OPM_SymRInt()); + } else if (tag == 12) { + return OPT_adrtyp; } else { return OPT_impCtxt.ref[__X(tag, 255)]; } @@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; - OPS_Name commentText; + CHAR commentText[1024]; BOOLEAN hasComment; INT16 j; INT32 len; @@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno) if (len < 0) { len = 0; } - if (len > 255) { - len = 255; + if (len > 1023) { + len = 1023; } i = 0; while (i < len) { - OPM_SymRCh(&commentText[__X(i, 256)]); + OPM_SymRCh(&commentText[__X(i, 1024)]); i += 1; } - commentText[__X(i, 256)] = 0x00; + commentText[__X(i, 1024)] = 0x00; hasComment = 1; tag = OPM_SymRInt(); } - OPT_impCtxt.nextTag = tag; + if ((tag <= 11 && tag == 0)) { + OPM_err(155); + return NIL; + } if (tag < 0 || tag > 50) { OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWNum(tag, 0); @@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno) (*ext)[0] = __CHR(s); i = 1; while (i <= s) { - OPM_SymRCh(&(*ext)[__X(i, 256)]); + OPM_SymRCh(&(*ext)[__X(i, 1024)]); i += 1; } break; @@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_InName((void*)obj->name, 256); } if ((hasComment && obj != NIL)) { - obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); j = 0; - while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { - (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) { + (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*obj->comment)[__X(j, 256)] = 0x00; + (*obj->comment)[__X(j, 1024)] = 0x00; } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { @@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par) while (par != NIL) { if (par->mode == 1) { OPM_SymWInt(23); + } else if (par->vis == 3) { + OPM_SymWInt(42); } else { OPM_SymWInt(24); } @@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWLReal(obj->conval->realval); break; case 8: - OPT_OutName((void*)*obj->conval->ext, 256); + OPT_OutName((void*)*obj->conval->ext, 1024); break; case 9: break; @@ -1857,7 +1868,7 @@ 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)) { + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { OPM_SymWCh(text[__X(i, text__len)]); i += 1; } @@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj) 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 ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) { + OPM_SymWInt(41); + k = 0; + while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 1024)]); + l += 1; + } } } if (obj->history == 4) { @@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj) i = 1; OPM_SymWInt(j); while (i <= j) { - OPM_SymWCh((*ext)[__X(i, 256)]); + OPM_SymWCh((*ext)[__X(i, 1024)]); i += 1; } OPT_OutName((void*)obj->name, 256); @@ -2191,6 +2204,7 @@ export void *OPT__init(void) OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); + OPT_adrtyp->ref = 12; OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index cf456af5..ae1b41ca 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 26c1c715..82ed398e 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) } } } else { - if ((((mode == 2 && typ != n->typ)) && prec == -1)) { + if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) { OPM_WriteString((CHAR*)"(void*)", 8); } } @@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteInt(r->conval->intval2); } else if (r->typ->comp == 3) { OPM_WriteString((CHAR*)"__X(", 5); - OPC_Len(r->obj, r->typ, 0); + OPV_Len(r, 0); OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); @@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) } if (l->typ == r->typ) { OPV_expr(r, -1); - } else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { - OPM_Write('('); - OPC_Ident(l->typ->strobj); - OPM_Write(')'); + } else if ((l->typ->form == 11 && r->typ->form != 9)) { + if (l->typ->strobj != NIL) { + OPM_Write('('); + OPC_Ident(l->typ->strobj); + OPM_Write(')'); + } else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) { + OPM_Write('('); + OPC_Ident(l->typ->BaseTyp->strobj); + OPM_WriteString((CHAR*)"*)", 3); + } OPV_expr(r, -1); } else if (l->typ->comp == 4) { OPM_WriteString((CHAR*)"*(", 3); diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index fbabd8f4..259d2274 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce936589..a58df1bd 100644 --- a/bootstrap/unix-88/Out.c +++ b/bootstrap/unix-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a72547f4..da4c375e 100644 --- a/bootstrap/unix-88/Out.h +++ b/bootstrap/unix-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 139181a0..7cac29f9 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 e827b641..31339f8c 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 512ec2c4..17e02efc 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 93e7fa75..72cdeac9 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4b18812f..33402210 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 f0e3ae34..94c330de 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 77dc1bac..667cd440 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 081eec2c..b39a4f55 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 346fb37b..2dbabfac 100644 --- a/bootstrap/unix-88/VT100.c +++ b/bootstrap/unix-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4e708647..d93196f4 100644 --- a/bootstrap/unix-88/VT100.h +++ b/bootstrap/unix-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce2fc413..b927caed 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. 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 -Wno-stringop-overflow", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", 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 686f0b4e..7b30a000 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4460479d..5fb197fa 100644 --- a/bootstrap/windows-48/Compiler.c +++ b/bootstrap/windows-48/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2026/07/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 fa87c9de..28930ae6 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2026/07/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 c3c54eed..06b2322e 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 553bb49a..ba84e061 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -33,7 +33,8 @@ typedef Files_FileName workName, registerName; BOOLEAN tempFile; Platform_FileIdentity identity; - INT32 fd, len, pos; + INT32 fd; + INT32 len, pos; Files_Buffer bufs[4]; INT16 swapper, state; struct Files_FileDesc *next; @@ -754,7 +755,8 @@ void Files_Delete (CHAR *name, ADDRESS name__len, INT16 *res) void Files_Rename (CHAR *old, ADDRESS old__len, CHAR *new, ADDRESS new__len, INT16 *res) { - INT32 fdold, fdnew, n; + INT32 fdold, fdnew; + INT32 n; INT16 error, ignore; Platform_FileIdentity oldidentity, newidentity; CHAR buf[4096]; diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index dadf1ace..9228f5c8 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 42552415..d00d1bec 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 3cde1c3b..3064651b 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 bdad4713..5afcfa92 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 26d86b38..23f2dd74 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 913fbf2d..5a53405b 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) break; case 2: node = OPT_NewNode(1); + node->readonly = obj->vis == 3; break; case 3: node = OPT_NewNode(7); @@ -253,7 +254,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(); - __MOVE(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 1024); return x; } @@ -1626,7 +1627,6 @@ 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) { @@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) } else { OPB_CheckLeaf(ap, 0); } - if (ap->readonly) { + if ((ap->readonly && fp->vis != 3)) { OPB_err(76); } if (fp->typ->comp == 3) { diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index f66fcd66..0872ee74 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b92ccc1..061511af 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) INT16 i; __DUP(y, y__len, CHAR); i = 0; - while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { + while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) { i += 1; } __DEL(y); @@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis) _for__7 = (INT16)(*obj->conval->ext)[0]; i = i; while (i <= _for__7) { - OPM_Write((*obj->conval->ext)[__X(i, 256)]); + OPM_Write((*obj->conval->ext)[__X(i, 1024)]); i += 1; } OPM_WriteLn(); @@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form) } break; case 8: - OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); + OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1); break; case 9: OPM_WriteString((CHAR*)"NIL", 4); diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 3bfd88b8..5642d227 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 bcb39247..0ad16dc2 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,7 +19,7 @@ typedef CHAR OPM_FileName[32]; -static CHAR OPM_currentComment[256]; +static CHAR OPM_currentComment[1024]; static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; @@ -166,11 +166,11 @@ 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)]; + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)]; i += 1; } - OPM_currentComment[__X(i, 256)] = 0x00; + OPM_currentComment[__X(i, 1024)] = 0x00; OPM_hasComment = 1; __DEL(text); } @@ -180,8 +180,8 @@ 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)]; + while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)]; i += 1; } text[__X(i, text__len)] = 0x00; diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 64c15a28..f6ffb505 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ad4a370a..73f219fe 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp) if (OPP_sym == 38) { OPT_Insert(OPS_name, &par); OPS_Get(&OPP_sym); - par->mode = mode; + if (OPP_sym == 7) { + if (mode == 2) { + OPP_err(246); + } + OPS_Get(&OPP_sym); + par->mode = 2; + par->vis = 3; + } else { + par->mode = mode; + par->vis = 0; + } par->link = NIL; if (first == NIL) { first = par; @@ -939,8 +949,8 @@ static void GetCode__19 (void) (*ProcedureDeclaration__16_s->proc)->conval->ext = ext; n = 0; if (OPP_sym == 37) { - while (OPS_str[__X(n, 256)] != 0x00) { - (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; + while (OPS_str[__X(n, 1024)] != 0x00) { + (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)]; n += 1; } (*ext)[0] = __CHR(n); @@ -950,13 +960,13 @@ static void GetCode__19 (void) if (OPP_sym == 35) { c = OPS_intval; n += 1; - if ((c < 0 || c > 255) || n == 256) { + if ((c < 0 || c > 255) || n == 1024) { OPP_err(64); c = 1; n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = __CHR(c); + (*ext)[__X(n, 1024)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 3d8cefe8..8d5b805a 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a25a2c12..30e0c23a 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -12,7 +12,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; export OPS_Name OPS_name; @@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym) OPS_err(3); break; } - if (i == 255) { + if (i == 1023) { OPS_err(241); break; } - OPS_str[__X(i, 256)] = OPS_ch; + OPS_str[__X(i, 1024)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[__X(i, 256)] = 0x00; + OPS_str[__X(i, 1024)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -280,12 +280,12 @@ static void Comment__2 (void); static void Comment__2 (void) { BOOLEAN isExported; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 i, nestLevel; - CHAR prevCh, nextCh; + CHAR prevCh; i = 0; - while (i <= 255) { - commentText[__X(i, 256)] = 0x00; + while (i <= 1023) { + commentText[__X(i, 1024)] = 0x00; i += 1; } isExported = 0; @@ -298,7 +298,7 @@ static void Comment__2 (void) OPM_Get(&OPS_ch); if (OPS_ch == ')') { commentText[0] = 0x00; - OPM_StoreComment(commentText, 256); + OPM_StoreComment(commentText, 1024); OPM_Get(&OPS_ch); return; } @@ -306,47 +306,65 @@ static void Comment__2 (void) while ((nestLevel > 0 && OPS_ch != 0x00)) { if ((prevCh == '(' && OPS_ch == '*')) { nestLevel += 1; - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } else if ((prevCh == '*' && OPS_ch == ')')) { nestLevel -= 1; if (nestLevel == 0) { OPM_Get(&OPS_ch); } else { - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } } else { - if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { - if (i < 255) { - commentText[__X(i, 256)] = prevCh; - i += 1; + if ((isExported && nestLevel == 1)) { + if (i < 1023) { + if (OPS_ch == 0x0d || OPS_ch == 0x0a) { + if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) { + commentText[__X(i, 1024)] = 0x0a; + i += 1; + } + if (OPS_ch == 0x0d) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + if (OPS_ch == 0x0a) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else if (OPS_ch >= ' ') { + commentText[__X(i, 1024)] = OPS_ch; + i += 1; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } - prevCh = OPS_ch; - } - if (nestLevel > 0) { - OPM_Get(&OPS_ch); } } 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 (isExported) { - if (i >= 256) { + if (i >= 1024) { OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWLn(); - i = 255; + i = 1023; } - commentText[__X(i, 256)] = 0x00; - OPM_StoreComment(commentText, 256); + commentText[__X(i, 1024)] = 0x00; + OPM_StoreComment(commentText, 1024); } } diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 19e222ac..23609a77 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h @@ -9,7 +9,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; import OPS_Name OPS_name; diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index ebb47dd8..73f8eef3 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class) OPT_ConstExt OPT_NewExt (void) { OPT_ConstExt ext = NIL; - ext = __NEWARR(NIL, 1, 1, 1, 0, 256); + ext = __NEWARR(NIL, 1, 1, 1, 0, 1024); return ext; } @@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; @@ -593,15 +593,15 @@ 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); + OPM_GetComment((void*)commentText, 1024); if (commentText[0] != 0x00) { - ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { - (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) { + (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*ob1->comment)[__X(j, 256)] = 0x00; + (*ob1->comment)[__X(j, 1024)] = 0x00; } break; } @@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrintLReal(&fprint, obj->conval->realval); break; case 8: - OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); + OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024); break; case 9: break; @@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj) f = 1; OPM_FPrint(&fprint, m); while (f <= m) { - OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); + OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]); f += 1; } } else if (obj->mode == 5) { @@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) i = 0; do { OPM_SymRCh(&ch); - (*ext)[__X(i, 256)] = ch; + (*ext)[__X(i, 1024)] = ch; i += 1; } while (!(ch == 0x00)); conval->intval2 = i; @@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWNum(f, 0); OPM_LogWLn(); + OPM_err(155); break; } } @@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) } if (tag == 23) { new->mode = 1; + } else if (tag == 42) { + new->mode = 2; + new->vis = 3; } else { new->mode = 2; } @@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag) return OPT_IntType(OPM_SymRInt()); } else if (tag == 7) { return OPT_SetType(OPM_SymRInt()); + } else if (tag == 12) { + return OPT_adrtyp; } else { return OPT_impCtxt.ref[__X(tag, 255)]; } @@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; - OPS_Name commentText; + CHAR commentText[1024]; BOOLEAN hasComment; INT16 j; INT32 len; @@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno) if (len < 0) { len = 0; } - if (len > 255) { - len = 255; + if (len > 1023) { + len = 1023; } i = 0; while (i < len) { - OPM_SymRCh(&commentText[__X(i, 256)]); + OPM_SymRCh(&commentText[__X(i, 1024)]); i += 1; } - commentText[__X(i, 256)] = 0x00; + commentText[__X(i, 1024)] = 0x00; hasComment = 1; tag = OPM_SymRInt(); } - OPT_impCtxt.nextTag = tag; + if ((tag <= 11 && tag == 0)) { + OPM_err(155); + return NIL; + } if (tag < 0 || tag > 50) { OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWNum(tag, 0); @@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno) (*ext)[0] = __CHR(s); i = 1; while (i <= s) { - OPM_SymRCh(&(*ext)[__X(i, 256)]); + OPM_SymRCh(&(*ext)[__X(i, 1024)]); i += 1; } break; @@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_InName((void*)obj->name, 256); } if ((hasComment && obj != NIL)) { - obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 256); + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, 1024); j = 0; - while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { - (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) { + (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*obj->comment)[__X(j, 256)] = 0x00; + (*obj->comment)[__X(j, 1024)] = 0x00; } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { @@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par) while (par != NIL) { if (par->mode == 1) { OPM_SymWInt(23); + } else if (par->vis == 3) { + OPM_SymWInt(42); } else { OPM_SymWInt(24); } @@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWLReal(obj->conval->realval); break; case 8: - OPT_OutName((void*)*obj->conval->ext, 256); + OPT_OutName((void*)*obj->conval->ext, 1024); break; case 9: break; @@ -1857,7 +1868,7 @@ 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)) { + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { OPM_SymWCh(text[__X(i, text__len)]); i += 1; } @@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj) 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 ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) { + OPM_SymWInt(41); + k = 0; + while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 1024)]); + l += 1; + } } } if (obj->history == 4) { @@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj) i = 1; OPM_SymWInt(j); while (i <= j) { - OPM_SymWCh((*ext)[__X(i, 256)]); + OPM_SymWCh((*ext)[__X(i, 1024)]); i += 1; } OPT_OutName((void*)obj->name, 256); @@ -2191,6 +2204,7 @@ export void *OPT__init(void) OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); + OPT_adrtyp->ref = 12; OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index cf456af5..ae1b41ca 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 0425b2e0..fe8d0057 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) } } } else { - if ((((mode == 2 && typ != n->typ)) && prec == -1)) { + if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) { OPM_WriteString((CHAR*)"(void*)", 8); } } @@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteInt(r->conval->intval2); } else if (r->typ->comp == 3) { OPM_WriteString((CHAR*)"__X(", 5); - OPC_Len(r->obj, r->typ, 0); + OPV_Len(r, 0); OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); @@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) } if (l->typ == r->typ) { OPV_expr(r, -1); - } else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { - OPM_Write('('); - OPC_Ident(l->typ->strobj); - OPM_Write(')'); + } else if ((l->typ->form == 11 && r->typ->form != 9)) { + if (l->typ->strobj != NIL) { + OPM_Write('('); + OPC_Ident(l->typ->strobj); + OPM_Write(')'); + } else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) { + OPM_Write('('); + OPC_Ident(l->typ->BaseTyp->strobj); + OPM_WriteString((CHAR*)"*)", 3); + } OPV_expr(r, -1); } else if (l->typ->comp == 4) { OPM_WriteString((CHAR*)"*(", 3); diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index fbabd8f4..259d2274 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 b43e55f1..acf43c6e 100644 --- a/bootstrap/windows-48/Out.c +++ b/bootstrap/windows-48/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a72547f4..da4c375e 100644 --- a/bootstrap/windows-48/Out.h +++ b/bootstrap/windows-48/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 9b1f0e4f..e3e23663 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 b1ed4c6f..7fc5f72f 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 512ec2c4..17e02efc 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 93e7fa75..72cdeac9 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4b18812f..33402210 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 f0e3ae34..94c330de 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 43c3858f..322ce28b 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 fd0c0fa5..d1d92b87 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 346fb37b..2dbabfac 100644 --- a/bootstrap/windows-48/VT100.c +++ b/bootstrap/windows-48/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4e708647..d93196f4 100644 --- a/bootstrap/windows-48/VT100.h +++ b/bootstrap/windows-48/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce2fc413..b927caed 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. 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 -Wno-stringop-overflow", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", 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 686f0b4e..7b30a000 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4460479d..5fb197fa 100644 --- a/bootstrap/windows-88/Compiler.c +++ b/bootstrap/windows-88/Compiler.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */ +/* voc 2.1.0 [2026/07/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 fa87c9de..28930ae6 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8.", Configuration_versionLong, 76); + __MOVE("2.1.0 [2026/07/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 c3c54eed..06b2322e 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 07655515..3f3d514c 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 8a7e59f8..6074566d 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b004b60..15a6e3b6 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 45a9c6d2..ec34eede 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */ +/* voc 2.1.0 [2026/07/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 7a49b8ff..aa5708c8 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ee65a938..8a333379 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 913fbf2d..5a53405b 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -82,6 +82,7 @@ OPT_Node OPB_NewLeaf (OPT_Object obj) break; case 2: node = OPT_NewNode(1); + node->readonly = obj->vis == 3; break; case 3: node = OPT_NewNode(7); @@ -253,7 +254,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(); - __MOVE(str, *x->conval->ext, 256); + __MOVE(str, *x->conval->ext, 1024); return x; } @@ -1626,7 +1627,6 @@ 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) { @@ -2423,7 +2423,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) } else { OPB_CheckLeaf(ap, 0); } - if (ap->readonly) { + if ((ap->readonly && fp->vis != 3)) { OPB_err(76); } if (fp->typ->comp == 3) { diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index f66fcd66..0872ee74 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 7b92ccc1..061511af 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -738,7 +738,7 @@ static BOOLEAN OPC_Prefixed (OPT_ConstExt x, CHAR *y, ADDRESS y__len) INT16 i; __DUP(y, y__len, CHAR); i = 0; - while ((*x)[__X(i + 1, 256)] == y[__X(i, y__len)]) { + while ((*x)[__X(i + 1, 1024)] == y[__X(i, y__len)]) { i += 1; } __DEL(y); @@ -764,7 +764,7 @@ static void OPC_CProcDefs (OPT_Object obj, INT16 vis) _for__7 = (INT16)(*obj->conval->ext)[0]; i = i; while (i <= _for__7) { - OPM_Write((*obj->conval->ext)[__X(i, 256)]); + OPM_Write((*obj->conval->ext)[__X(i, 1024)]); i += 1; } OPM_WriteLn(); @@ -1909,7 +1909,7 @@ void OPC_Constant (OPT_Const con, INT16 form) } break; case 8: - OPC_StringLiteral(*con->ext, 256, con->intval2 - 1); + OPC_StringLiteral(*con->ext, 1024, con->intval2 - 1); break; case 9: OPM_WriteString((CHAR*)"NIL", 4); diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 3bfd88b8..5642d227 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 b486b3b9..6f26cfe8 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -19,7 +19,7 @@ typedef CHAR OPM_FileName[32]; -static CHAR OPM_currentComment[256]; +static CHAR OPM_currentComment[1024]; static BOOLEAN OPM_hasComment; static CHAR OPM_SourceFileName[256]; static CHAR OPM_GlobalModel[10]; @@ -166,11 +166,11 @@ 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)]; + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { + OPM_currentComment[__X(i, 1024)] = text[__X(i, text__len)]; i += 1; } - OPM_currentComment[__X(i, 256)] = 0x00; + OPM_currentComment[__X(i, 1024)] = 0x00; OPM_hasComment = 1; __DEL(text); } @@ -180,8 +180,8 @@ 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)]; + while ((((i < text__len && i < 1024)) && OPM_currentComment[__X(i, 1024)] != 0x00)) { + text[__X(i, text__len)] = OPM_currentComment[__X(i, 1024)]; i += 1; } text[__X(i, text__len)] = 0x00; diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 64c15a28..f6ffb505 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 3fed2e31..b4f5f6bb 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -365,7 +365,17 @@ static void OPP_FormalParameters (OPT_Object *firstPar, OPT_Struct *resTyp) if (OPP_sym == 38) { OPT_Insert(OPS_name, &par); OPS_Get(&OPP_sym); - par->mode = mode; + if (OPP_sym == 7) { + if (mode == 2) { + OPP_err(246); + } + OPS_Get(&OPP_sym); + par->mode = 2; + par->vis = 3; + } else { + par->mode = mode; + par->vis = 0; + } par->link = NIL; if (first == NIL) { first = par; @@ -939,8 +949,8 @@ static void GetCode__19 (void) (*ProcedureDeclaration__16_s->proc)->conval->ext = ext; n = 0; if (OPP_sym == 37) { - while (OPS_str[__X(n, 256)] != 0x00) { - (*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)]; + while (OPS_str[__X(n, 1024)] != 0x00) { + (*ext)[__X(n + 1, 1024)] = OPS_str[__X(n, 1024)]; n += 1; } (*ext)[0] = __CHR(n); @@ -950,13 +960,13 @@ static void GetCode__19 (void) if (OPP_sym == 35) { c = OPS_intval; n += 1; - if ((c < 0 || c > 255) || n == 256) { + if ((c < 0 || c > 255) || n == 1024) { OPP_err(64); c = 1; n = 1; } OPS_Get(&OPP_sym); - (*ext)[__X(n, 256)] = __CHR(c); + (*ext)[__X(n, 1024)] = __CHR(c); } if (OPP_sym == 19) { OPS_Get(&OPP_sym); diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 3d8cefe8..8d5b805a 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a25a2c12..30e0c23a 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -12,7 +12,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; export OPS_Name OPS_name; @@ -52,15 +52,15 @@ static void OPS_Str (INT8 *sym) OPS_err(3); break; } - if (i == 255) { + if (i == 1023) { OPS_err(241); break; } - OPS_str[__X(i, 256)] = OPS_ch; + OPS_str[__X(i, 1024)] = OPS_ch; i += 1; } OPM_Get(&OPS_ch); - OPS_str[__X(i, 256)] = 0x00; + OPS_str[__X(i, 1024)] = 0x00; OPS_intval = i + 1; if (OPS_intval == 2) { *sym = 35; @@ -280,12 +280,12 @@ static void Comment__2 (void); static void Comment__2 (void) { BOOLEAN isExported; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 i, nestLevel; - CHAR prevCh, nextCh; + CHAR prevCh; i = 0; - while (i <= 255) { - commentText[__X(i, 256)] = 0x00; + while (i <= 1023) { + commentText[__X(i, 1024)] = 0x00; i += 1; } isExported = 0; @@ -298,7 +298,7 @@ static void Comment__2 (void) OPM_Get(&OPS_ch); if (OPS_ch == ')') { commentText[0] = 0x00; - OPM_StoreComment(commentText, 256); + OPM_StoreComment(commentText, 1024); OPM_Get(&OPS_ch); return; } @@ -306,47 +306,65 @@ static void Comment__2 (void) while ((nestLevel > 0 && OPS_ch != 0x00)) { if ((prevCh == '(' && OPS_ch == '*')) { nestLevel += 1; - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } else if ((prevCh == '*' && OPS_ch == ')')) { nestLevel -= 1; if (nestLevel == 0) { OPM_Get(&OPS_ch); } else { - prevCh = 0x00; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } } else { - if ((((isExported && nestLevel == 1)) && prevCh != 0x00)) { - if (i < 255) { - commentText[__X(i, 256)] = prevCh; - i += 1; + if ((isExported && nestLevel == 1)) { + if (i < 1023) { + if (OPS_ch == 0x0d || OPS_ch == 0x0a) { + if (i == 0 || commentText[__X(i - 1, 1024)] != 0x0a) { + commentText[__X(i, 1024)] = 0x0a; + i += 1; + } + if (OPS_ch == 0x0d) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + if (OPS_ch == 0x0a) { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else if (OPS_ch >= ' ') { + commentText[__X(i, 1024)] = OPS_ch; + i += 1; + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); + } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } + } else { + prevCh = OPS_ch; + OPM_Get(&OPS_ch); } - prevCh = OPS_ch; - } - if (nestLevel > 0) { - OPM_Get(&OPS_ch); } } 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 (isExported) { - if (i >= 256) { + if (i >= 1024) { OPM_LogWStr((CHAR*)"Warning: commentText overflow", 30); OPM_LogWLn(); - i = 255; + i = 1023; } - commentText[__X(i, 256)] = 0x00; - OPM_StoreComment(commentText, 256); + commentText[__X(i, 1024)] = 0x00; + OPM_StoreComment(commentText, 1024); } } diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index 19e222ac..23609a77 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef OPS__h #define OPS__h @@ -9,7 +9,7 @@ typedef CHAR OPS_Name[256]; typedef - CHAR OPS_String[256]; + CHAR OPS_String[1024]; import OPS_Name OPS_name; diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index c3999981..53898c63 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -423,7 +423,7 @@ OPT_Node OPT_NewNode (INT8 class) OPT_ConstExt OPT_NewExt (void) { OPT_ConstExt ext = NIL; - ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + ext = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); return ext; } @@ -560,7 +560,7 @@ void OPT_Insert (OPS_Name name, OPT_Object *obj) OPT_Object ob0 = NIL, ob1 = NIL; BOOLEAN left; INT8 mnolev; - CHAR commentText[256]; + CHAR commentText[1024]; INT16 j; ob0 = OPT_topScope; ob1 = ob0->right; @@ -593,15 +593,15 @@ 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); + OPM_GetComment((void*)commentText, 1024); if (commentText[0] != 0x00) { - ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + ob1->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); j = 0; - while ((j < 255 && commentText[__X(j, 256)] != 0x00)) { - (*ob1->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((j < 1023 && commentText[__X(j, 1024)] != 0x00)) { + (*ob1->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*ob1->comment)[__X(j, 256)] = 0x00; + (*ob1->comment)[__X(j, 1024)] = 0x00; } break; } @@ -868,7 +868,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrintLReal(&fprint, obj->conval->realval); break; case 8: - OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 256); + OPT_FPrintName(&fprint, (void*)*obj->conval->ext, 1024); break; case 9: break; @@ -889,7 +889,7 @@ void OPT_FPrintObj (OPT_Object obj) f = 1; OPM_FPrint(&fprint, m); while (f <= m) { - OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 256)]); + OPM_FPrint(&fprint, (INT16)(*ext)[__X(f, 1024)]); f += 1; } } else if (obj->mode == 5) { @@ -1096,7 +1096,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) i = 0; do { OPM_SymRCh(&ch); - (*ext)[__X(i, 256)] = ch; + (*ext)[__X(i, 1024)] = ch; i += 1; } while (!(ch == 0x00)); conval->intval2 = i; @@ -1109,6 +1109,7 @@ static void OPT_InConstant (INT32 f, OPT_Const conval) OPM_LogWStr((CHAR*)"unhandled case in InConstant(), f = ", 37); OPM_LogWNum(f, 0); OPM_LogWLn(); + OPM_err(155); break; } } @@ -1137,6 +1138,9 @@ static void OPT_InSign (INT8 mno, OPT_Struct *res, OPT_Object *par) } if (tag == 23) { new->mode = 1; + } else if (tag == 42) { + new->mode = 2; + new->vis = 3; } else { new->mode = 2; } @@ -1210,6 +1214,8 @@ static OPT_Struct OPT_InTyp (INT32 tag) return OPT_IntType(OPM_SymRInt()); } else if (tag == 7) { return OPT_SetType(OPM_SymRInt()); + } else if (tag == 12) { + return OPT_adrtyp; } else { return OPT_impCtxt.ref[__X(tag, 255)]; } @@ -1406,7 +1412,7 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_Struct typ = NIL; INT32 tag; OPT_ConstExt ext = NIL; - OPS_Name commentText; + CHAR commentText[1024]; BOOLEAN hasComment; INT16 j; INT32 len; @@ -1417,19 +1423,22 @@ static OPT_Object OPT_InObj (INT8 mno) if (len < 0) { len = 0; } - if (len > 255) { - len = 255; + if (len > 1023) { + len = 1023; } i = 0; while (i < len) { - OPM_SymRCh(&commentText[__X(i, 256)]); + OPM_SymRCh(&commentText[__X(i, 1024)]); i += 1; } - commentText[__X(i, 256)] = 0x00; + commentText[__X(i, 1024)] = 0x00; hasComment = 1; tag = OPM_SymRInt(); } - OPT_impCtxt.nextTag = tag; + if ((tag <= 11 && tag == 0)) { + OPM_err(155); + return NIL; + } if (tag < 0 || tag > 50) { OPM_LogWStr((CHAR*)"ERROR: Invalid tag in InObj: ", 30); OPM_LogWNum(tag, 0); @@ -1471,7 +1480,7 @@ static OPT_Object OPT_InObj (INT8 mno) (*ext)[0] = __CHR(s); i = 1; while (i <= s) { - OPM_SymRCh(&(*ext)[__X(i, 256)]); + OPM_SymRCh(&(*ext)[__X(i, 1024)]); i += 1; } break; @@ -1502,13 +1511,13 @@ static OPT_Object OPT_InObj (INT8 mno) OPT_InName((void*)obj->name, 256); } if ((hasComment && obj != NIL)) { - obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(256))); + obj->comment = __NEWARR(NIL, 1, 1, 1, 0, ((INT64)(1024))); j = 0; - while ((((j < 255 && j < len)) && commentText[__X(j, 256)] != 0x00)) { - (*obj->comment)[__X(j, 256)] = commentText[__X(j, 256)]; + while ((((j < 1023 && j < len)) && commentText[__X(j, 1024)] != 0x00)) { + (*obj->comment)[__X(j, 1024)] = commentText[__X(j, 1024)]; j += 1; } - (*obj->comment)[__X(j, 256)] = 0x00; + (*obj->comment)[__X(j, 1024)] = 0x00; } OPT_FPrintObj(obj); if ((obj->mode == 1 && (obj->typ->strobj == NIL || obj->typ->strobj->name[0] == 0x00))) { @@ -1688,6 +1697,8 @@ static void OPT_OutSign (OPT_Struct result, OPT_Object par) while (par != NIL) { if (par->mode == 1) { OPM_SymWInt(23); + } else if (par->vis == 3) { + OPM_SymWInt(42); } else { OPM_SymWInt(24); } @@ -1842,7 +1853,7 @@ static void OPT_OutConstant (OPT_Object obj) OPM_SymWLReal(obj->conval->realval); break; case 8: - OPT_OutName((void*)*obj->conval->ext, 256); + OPT_OutName((void*)*obj->conval->ext, 1024); break; case 9: break; @@ -1857,7 +1868,7 @@ 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)) { + while ((i < 1023 && text[__X(i, text__len)] != 0x00)) { OPM_SymWCh(text[__X(i, text__len)]); i += 1; } @@ -1874,16 +1885,18 @@ static void OPT_OutObj (OPT_Object obj) 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 ((__IN(obj->mode, 0x06aa, 32) && obj->vis != 0)) { + OPM_SymWInt(41); + k = 0; + while ((k < 1023 && (*obj->comment)[__X(k, 1024)] != 0x00)) { + k += 1; + } + OPM_SymWInt(k); + l = 0; + while (l < k) { + OPM_SymWCh((*obj->comment)[__X(l, 1024)]); + l += 1; + } } } if (obj->history == 4) { @@ -1952,7 +1965,7 @@ static void OPT_OutObj (OPT_Object obj) i = 1; OPM_SymWInt(j); while (i <= j) { - OPM_SymWCh((*ext)[__X(i, 256)]); + OPM_SymWCh((*ext)[__X(i, 1024)]); i += 1; } OPT_OutName((void*)obj->name, 256); @@ -2191,6 +2204,7 @@ export void *OPT__init(void) OPT_EnterTyp((CHAR*)"BYTE", 1, 1, &OPT_bytetyp); OPT_EnterTyp((CHAR*)"PTR", 11, -1, &OPT_sysptrtyp); OPT_EnterTyp((CHAR*)"ADDRESS", 4, -1, &OPT_adrtyp); + OPT_adrtyp->ref = 12; OPT_EnterTyp((CHAR*)"INT8", 4, 1, &OPT_int8typ); OPT_EnterTyp((CHAR*)"INT16", 4, 2, &OPT_int16typ); OPT_EnterTyp((CHAR*)"INT32", 4, 4, &OPT_int32typ); diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index cf456af5..ae1b41ca 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 26c1c715..82ed398e 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #define SHORTINT INT8 #define INTEGER INT16 @@ -676,7 +676,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) } } } else { - if ((((mode == 2 && typ != n->typ)) && prec == -1)) { + if (((((mode == 2 || typ->BaseTyp->form == 13) && typ != n->typ)) && prec == -1)) { OPM_WriteString((CHAR*)"(void*)", 8); } } @@ -1299,7 +1299,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteInt(r->conval->intval2); } else if (r->typ->comp == 3) { OPM_WriteString((CHAR*)"__X(", 5); - OPC_Len(r->obj, r->typ, 0); + OPV_Len(r, 0); OPM_WriteString((CHAR*)" * ", 4); OPM_WriteInt(r->typ->BaseTyp->size); OPM_WriteString((CHAR*)", ", 3); @@ -1327,10 +1327,16 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) } if (l->typ == r->typ) { OPV_expr(r, -1); - } else if ((((l->typ->form == 11 && r->typ->form != 9)) && l->typ->strobj != NIL)) { - OPM_Write('('); - OPC_Ident(l->typ->strobj); - OPM_Write(')'); + } else if ((l->typ->form == 11 && r->typ->form != 9)) { + if (l->typ->strobj != NIL) { + OPM_Write('('); + OPC_Ident(l->typ->strobj); + OPM_Write(')'); + } else if ((((l->typ->BaseTyp != NIL && l->typ->BaseTyp->strobj != NIL)) && l->typ->BaseTyp != r->typ->BaseTyp)) { + OPM_Write('('); + OPC_Ident(l->typ->BaseTyp->strobj); + OPM_WriteString((CHAR*)"*)", 3); + } OPV_expr(r, -1); } else if (l->typ->comp == 4) { OPM_WriteString((CHAR*)"*(", 3); diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index fbabd8f4..259d2274 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 b43e55f1..acf43c6e 100644 --- a/bootstrap/windows-88/Out.c +++ b/bootstrap/windows-88/Out.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 a72547f4..da4c375e 100644 --- a/bootstrap/windows-88/Out.h +++ b/bootstrap/windows-88/Out.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 563f6417..11bc33ff 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 1259a228..d708716a 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 512ec2c4..17e02efc 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 93e7fa75..72cdeac9 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4b18812f..33402210 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 f0e3ae34..94c330de 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 77dc1bac..667cd440 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 081eec2c..b39a4f55 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 346fb37b..2dbabfac 100644 --- a/bootstrap/windows-88/VT100.c +++ b/bootstrap/windows-88/VT100.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 4e708647..d93196f4 100644 --- a/bootstrap/windows-88/VT100.h +++ b/bootstrap/windows-88/VT100.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/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 ce2fc413..b927caed 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. 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 -Wno-stringop-overflow", s, s__len); + __COPY("gcc -fPIC -g -Wno-stringop-overflow -std=gnu11", 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 686f0b4e..7b30a000 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 2.1.0 [2025/06/24]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ +/* voc 2.1.0 [2026/07/10]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */ #ifndef extTools__h #define extTools__h