Browse Source

VOC update

Arthur Yefimov 4 years ago
parent
commit
f48ebde0b3
100 changed files with 1063 additions and 1199 deletions
  1. 15 0
      data/bin/voc/Configuration.Make
  2. 18 0
      data/bin/voc/Configuration.Mod
  3. 0 0
      data/bin/voc/Errors.Txt
  4. 0 0
      data/bin/voc/LICENSE
  5. 5 7
      data/bin/voc/ReadMe.md
  6. 0 0
      data/bin/voc/bootstrap/SYSTEM.c
  7. 5 1
      data/bin/voc/bootstrap/SYSTEM.h
  8. 0 0
      data/bin/voc/bootstrap/WindowsWrapper.h
  9. 1 1
      data/bin/voc/bootstrap/unix-44/Compiler.c
  10. 2 2
      data/bin/voc/bootstrap/unix-44/Configuration.c
  11. 1 1
      data/bin/voc/bootstrap/unix-44/Configuration.h
  12. 110 108
      data/bin/voc/bootstrap/unix-44/Files.c
  13. 3 2
      data/bin/voc/bootstrap/unix-44/Files.h
  14. 1 1
      data/bin/voc/bootstrap/unix-44/Heap.c
  15. 1 1
      data/bin/voc/bootstrap/unix-44/Heap.h
  16. 2 2
      data/bin/voc/bootstrap/unix-44/Modules.c
  17. 1 1
      data/bin/voc/bootstrap/unix-44/Modules.h
  18. 44 54
      data/bin/voc/bootstrap/unix-44/OPB.c
  19. 1 1
      data/bin/voc/bootstrap/unix-44/OPB.h
  20. 16 10
      data/bin/voc/bootstrap/unix-44/OPC.c
  21. 1 1
      data/bin/voc/bootstrap/unix-44/OPC.h
  22. 49 23
      data/bin/voc/bootstrap/unix-44/OPM.c
  23. 1 1
      data/bin/voc/bootstrap/unix-44/OPM.h
  24. 7 7
      data/bin/voc/bootstrap/unix-44/OPP.c
  25. 1 1
      data/bin/voc/bootstrap/unix-44/OPP.h
  26. 10 10
      data/bin/voc/bootstrap/unix-44/OPS.c
  27. 1 1
      data/bin/voc/bootstrap/unix-44/OPS.h
  28. 27 28
      data/bin/voc/bootstrap/unix-44/OPT.c
  29. 1 1
      data/bin/voc/bootstrap/unix-44/OPT.h
  30. 34 35
      data/bin/voc/bootstrap/unix-44/OPV.c
  31. 1 1
      data/bin/voc/bootstrap/unix-44/OPV.h
  32. 9 144
      data/bin/voc/bootstrap/unix-44/Out.c
  33. 1 4
      data/bin/voc/bootstrap/unix-44/Out.h
  34. 19 4
      data/bin/voc/bootstrap/unix-44/Platform.c
  35. 3 1
      data/bin/voc/bootstrap/unix-44/Platform.h
  36. 10 10
      data/bin/voc/bootstrap/unix-44/Reals.c
  37. 1 1
      data/bin/voc/bootstrap/unix-44/Reals.h
  38. 3 3
      data/bin/voc/bootstrap/unix-44/Strings.c
  39. 1 1
      data/bin/voc/bootstrap/unix-44/Strings.h
  40. 14 14
      data/bin/voc/bootstrap/unix-44/Texts.c
  41. 1 1
      data/bin/voc/bootstrap/unix-44/Texts.h
  42. 2 2
      data/bin/voc/bootstrap/unix-44/VT100.c
  43. 1 1
      data/bin/voc/bootstrap/unix-44/VT100.h
  44. 2 2
      data/bin/voc/bootstrap/unix-44/extTools.c
  45. 1 1
      data/bin/voc/bootstrap/unix-44/extTools.h
  46. 1 1
      data/bin/voc/bootstrap/unix-48/Compiler.c
  47. 2 2
      data/bin/voc/bootstrap/unix-48/Configuration.c
  48. 1 1
      data/bin/voc/bootstrap/unix-48/Configuration.h
  49. 110 108
      data/bin/voc/bootstrap/unix-48/Files.c
  50. 3 2
      data/bin/voc/bootstrap/unix-48/Files.h
  51. 1 1
      data/bin/voc/bootstrap/unix-48/Heap.c
  52. 1 1
      data/bin/voc/bootstrap/unix-48/Heap.h
  53. 2 2
      data/bin/voc/bootstrap/unix-48/Modules.c
  54. 1 1
      data/bin/voc/bootstrap/unix-48/Modules.h
  55. 44 54
      data/bin/voc/bootstrap/unix-48/OPB.c
  56. 1 1
      data/bin/voc/bootstrap/unix-48/OPB.h
  57. 16 10
      data/bin/voc/bootstrap/unix-48/OPC.c
  58. 1 1
      data/bin/voc/bootstrap/unix-48/OPC.h
  59. 49 23
      data/bin/voc/bootstrap/unix-48/OPM.c
  60. 1 1
      data/bin/voc/bootstrap/unix-48/OPM.h
  61. 7 7
      data/bin/voc/bootstrap/unix-48/OPP.c
  62. 1 1
      data/bin/voc/bootstrap/unix-48/OPP.h
  63. 10 10
      data/bin/voc/bootstrap/unix-48/OPS.c
  64. 1 1
      data/bin/voc/bootstrap/unix-48/OPS.h
  65. 27 28
      data/bin/voc/bootstrap/unix-48/OPT.c
  66. 1 1
      data/bin/voc/bootstrap/unix-48/OPT.h
  67. 34 35
      data/bin/voc/bootstrap/unix-48/OPV.c
  68. 1 1
      data/bin/voc/bootstrap/unix-48/OPV.h
  69. 9 144
      data/bin/voc/bootstrap/unix-48/Out.c
  70. 1 4
      data/bin/voc/bootstrap/unix-48/Out.h
  71. 19 4
      data/bin/voc/bootstrap/unix-48/Platform.c
  72. 3 1
      data/bin/voc/bootstrap/unix-48/Platform.h
  73. 10 10
      data/bin/voc/bootstrap/unix-48/Reals.c
  74. 1 1
      data/bin/voc/bootstrap/unix-48/Reals.h
  75. 3 3
      data/bin/voc/bootstrap/unix-48/Strings.c
  76. 1 1
      data/bin/voc/bootstrap/unix-48/Strings.h
  77. 14 14
      data/bin/voc/bootstrap/unix-48/Texts.c
  78. 1 1
      data/bin/voc/bootstrap/unix-48/Texts.h
  79. 2 2
      data/bin/voc/bootstrap/unix-48/VT100.c
  80. 1 1
      data/bin/voc/bootstrap/unix-48/VT100.h
  81. 2 2
      data/bin/voc/bootstrap/unix-48/extTools.c
  82. 1 1
      data/bin/voc/bootstrap/unix-48/extTools.h
  83. 1 1
      data/bin/voc/bootstrap/unix-88/Compiler.c
  84. 2 2
      data/bin/voc/bootstrap/unix-88/Configuration.c
  85. 1 1
      data/bin/voc/bootstrap/unix-88/Configuration.h
  86. 110 108
      data/bin/voc/bootstrap/unix-88/Files.c
  87. 3 2
      data/bin/voc/bootstrap/unix-88/Files.h
  88. 1 1
      data/bin/voc/bootstrap/unix-88/Heap.c
  89. 1 1
      data/bin/voc/bootstrap/unix-88/Heap.h
  90. 2 2
      data/bin/voc/bootstrap/unix-88/Modules.c
  91. 1 1
      data/bin/voc/bootstrap/unix-88/Modules.h
  92. 44 54
      data/bin/voc/bootstrap/unix-88/OPB.c
  93. 1 1
      data/bin/voc/bootstrap/unix-88/OPB.h
  94. 16 10
      data/bin/voc/bootstrap/unix-88/OPC.c
  95. 1 1
      data/bin/voc/bootstrap/unix-88/OPC.h
  96. 49 23
      data/bin/voc/bootstrap/unix-88/OPM.c
  97. 1 1
      data/bin/voc/bootstrap/unix-88/OPM.h
  98. 7 7
      data/bin/voc/bootstrap/unix-88/OPP.c
  99. 1 1
      data/bin/voc/bootstrap/unix-88/OPP.h
  100. 10 10
      data/bin/voc/bootstrap/unix-88/OPS.c

+ 15 - 0
data/bin/voc/Configuration.Make

@@ -0,0 +1,15 @@
+OLANGDIR=/home/kekc/prg/FreeOberon/data/bin/voc
+COMPILER=gcc
+OS=ubuntu
+VERSION=2.1.0
+ONAME=voc
+DATAMODEL=LP64
+ADRSIZE=8
+ALIGNMENT=8
+INSTALLDIR=/opt/voc
+PLATFORM=unix
+BINEXT=
+DYNEXT=.so
+COMPILE=gcc -fPIC -g
+STATICLINK= -static
+BRANCH=master

+ 18 - 0
data/bin/voc/Configuration.Mod

@@ -0,0 +1,18 @@
+MODULE Configuration;
+CONST
+  name*        = 'voc';
+  objext*      = '.o';
+  objflag*     = ' -o ';
+  linkflags*   = ' -L"';
+  libspec*     = ' -lvoc';
+  libext*      = '';
+  os*          = 'ubuntu';
+  compiler*    = 'gcc';
+  compile*     = 'gcc -fPIC -g';
+  installdir*  = '/opt/voc';
+  staticLink*  = ' -static';
+VAR
+  versionLong-: ARRAY 42 OF CHAR;
+BEGIN
+  versionLong := '2.1.0 [2021/07/05] for gcc LP64 on ubuntu';
+END Configuration.

+ 0 - 0
data/bin/voc/src/Errors.Txt → data/bin/voc/Errors.Txt


+ 0 - 0
data/bin/voc/src/LICENSE → data/bin/voc/LICENSE


+ 5 - 7
data/bin/voc/src/ReadMe.md → data/bin/voc/ReadMe.md

@@ -1,4 +1,4 @@
-[![Build status](http://brownsmeet.com/build-status.svg)](http://brownsmeet.com/log/)
+![Build status](https://brownsmeet.com/githubhook/vishaps-status)
 
 # Ѵishap Oberon
 
@@ -74,7 +74,7 @@ for your OS as follows:
 | ------- | --------------------------------------                |
 | Linux   | `/opt/voc`                                            |
 | BSD     | `/usr/local/share/voc`                                |
-| Windows | See [**Windows installation**](/doc/WInstallation.md) |
+| Windows | See [**Windows installation**](/doc/Winstallation.md) |
 | Termux  | `/data/data/com.termux/files/opt/voc`                 |
 
 `make install` updates `ldconfg` with the new library locations.
@@ -95,7 +95,7 @@ For reference this will be:
 | Just `make full`          | `export PATH="your-repository-clone/install/bin:$PATH"`       |
 | `make install` on Linux   | `export PATH="/opt/voc/bin:$PATH"`                            |
 | `make install` on BSD     | `export PATH="/usr/local/share/voc/bin:$PATH"`                |
-| `make install` on Windows | See [**Windows installation**](/doc/WInstallation.md)         |
+| `make install` on Windows | See [**Windows installation**](/doc/Winstallation.md)         |
 | `make install` on Termux  | `export PATH="/data/data/com.termux/files/opt/voc/bin:$PATH"` |
 
 Also see [**Installation**](/doc/Installation.md).
@@ -245,9 +245,7 @@ Norayr Chilingarian forked ofront in 2013, porting extensive libraries from [ULM
 
 David Brown has worked on adding support for more platforms incuding windows using MSC, cygwin or mingw since January 2016. More recently he has generalised basic type support within the compiler to allow e.g. 64 bit LONGINT on 32 bit systems, and 32 bit LONGINT on 64 bit systems.
 
-## Origin of the name "Ѵishap Oberon"
-
-#### Oberon
+## Oberon
 
 Oberon is a programming language, an operating system and a graphical
 user interface. Originally designed and implemented by by Niklaus Wirth and
@@ -266,7 +264,7 @@ of Einstein and Antoine de Saint-Exupéry:
 >  when there is no longer anything to take away. (Antoine de Saint-Exupéry,
 >  translated by Lewis Galantière.)
 
-#### Ѵishap
+## Origin of the name "Ѵishap Oberon"
 
 Vishaps are dragons inhabiting the Armenian Highlands.
 We decided to name the project “Vishap” because ties between compilers and dragons have ancient traditions.

+ 0 - 0
data/bin/voc/src/bootstrap/SYSTEM.c → data/bin/voc/bootstrap/SYSTEM.c


+ 5 - 1
data/bin/voc/src/bootstrap/SYSTEM.h → data/bin/voc/bootstrap/SYSTEM.h

@@ -19,7 +19,11 @@
     typedef unsigned long      size_t;
   #endif
 #else
-  typedef unsigned int         size_t;
+  #if defined(__OpenBSD__)
+    typedef unsigned long      size_t;
+  #else
+    typedef unsigned int       size_t;
+  #endif
 #endif
 
 #define _SIZE_T_DECLARED // For FreeBSD

+ 0 - 0
data/bin/voc/src/bootstrap/WindowsWrapper.h → data/bin/voc/bootstrap/WindowsWrapper.h


+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Compiler.c → data/bin/voc/bootstrap/unix-44/Compiler.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 2 - 2
data/bin/voc/src/bootstrap/unix-48/Configuration.c → data/bin/voc/bootstrap/unix-44/Configuration.c

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

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Configuration.h → data/bin/voc/bootstrap/unix-44/Configuration.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Configuration__h
 #define Configuration__h

+ 110 - 108
data/bin/voc/src/bootstrap/unix-44/Files.c → data/bin/voc/bootstrap/unix-44/Files.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -26,7 +26,7 @@ typedef
 	Files_BufDesc *Files_Buffer;
 
 typedef
-	CHAR Files_FileName[101];
+	CHAR Files_FileName[256];
 
 typedef
 	struct Files_FileDesc {
@@ -48,6 +48,7 @@ typedef
 	} Files_Rider;
 
 
+export INT16 Files_MaxPathLength, Files_MaxNameLength;
 static Files_FileDesc *Files_files;
 static INT16 Files_tempno;
 static CHAR Files_HOME[1024];
@@ -129,17 +130,17 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 	Out_String((CHAR*)": ", 3);
 	if (f != NIL) {
 		if (f->registerName[0] != 0x00) {
-			Out_String(f->registerName, 101);
+			Out_String(f->registerName, 256);
 		} else {
-			Out_String(f->workName, 101);
+			Out_String(f->workName, 256);
 		}
 		if (f->fd != 0) {
-			Out_String((CHAR*)"f.fd = ", 8);
+			Out_String((CHAR*)", f.fd = ", 10);
 			Out_Int(f->fd, 1);
 		}
 	}
 	if (errcode != 0) {
-		Out_String((CHAR*)" errcode = ", 12);
+		Out_String((CHAR*)", errcode = ", 13);
 		Out_Int(errcode, 1);
 	}
 	Out_Ln();
@@ -149,76 +150,75 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 
 static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len)
 {
-	INT16 i, j;
+	INT16 i, j, ld, ln;
 	__DUP(dir, dir__len, CHAR);
 	__DUP(name, name__len, CHAR);
+	ld = Strings_Length(dir, dir__len);
+	ln = Strings_Length(name, name__len);
+	while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) {
+		ld -= 1;
+	}
+	if (((ld + ln) + 2) > dest__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
 	i = 0;
-	j = 0;
-	while (dir[i] != 0x00) {
-		dest[i] = dir[i];
+	while (i < ld) {
+		dest[__X(i, dest__len)] = dir[__X(i, dir__len)];
 		i += 1;
 	}
-	if (dest[i - 1] != '/') {
-		dest[i] = '/';
+	if (i > 0) {
+		dest[__X(i, dest__len)] = '/';
 		i += 1;
 	}
-	while (name[j] != 0x00) {
-		dest[i] = name[j];
+	j = 0;
+	while (j < ln) {
+		dest[__X(i, dest__len)] = name[__X(j, name__len)];
 		i += 1;
 		j += 1;
 	}
-	dest[i] = 0x00;
+	dest[__X(i, dest__len)] = 0x00;
 	__DEL(dir);
 	__DEL(name);
 }
 
 static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len)
 {
-	INT32 n, i, j;
+	INT16 i, n;
 	__DUP(finalName, finalName__len, CHAR);
-	Files_tempno += 1;
-	n = Files_tempno;
-	i = 0;
-	if (finalName[0] != '/') {
-		while (Platform_CWD[i] != 0x00) {
-			name[i] = Platform_CWD[i];
-			i += 1;
-		}
-		if (Platform_CWD[i - 1] != '/') {
-			name[i] = '/';
-			i += 1;
-		}
-	}
-	j = 0;
-	while (finalName[j] != 0x00) {
-		name[i] = finalName[j];
-		i += 1;
-		j += 1;
+	if (finalName[0] == '/') {
+		__COPY(finalName, name, name__len);
+	} else {
+		Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len);
 	}
-	i -= 1;
-	while (name[i] != '/') {
+	i = Strings_Length(name, name__len) - 1;
+	while ((i > 0 && name[__X(i, name__len)] != '/')) {
 		i -= 1;
 	}
-	name[i + 1] = '.';
-	name[i + 2] = 't';
-	name[i + 3] = 'm';
-	name[i + 4] = 'p';
-	name[i + 5] = '.';
+	if ((i + 16) >= name__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
+	Files_tempno += 1;
+	n = Files_tempno;
+	name[__X(i + 1, name__len)] = '.';
+	name[__X(i + 2, name__len)] = 't';
+	name[__X(i + 3, name__len)] = 'm';
+	name[__X(i + 4, name__len)] = 'p';
+	name[__X(i + 5, name__len)] = '.';
 	i += 6;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = '.';
+	name[__X(i, name__len)] = '.';
 	i += 1;
 	n = Platform_PID;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = 0x00;
+	name[__X(i, name__len)] = 0x00;
 	__DEL(finalName);
 }
 
@@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
 		if (osfile != NIL) {
 			__ASSERT(!osfile->tempFile, 0);
 			__ASSERT(osfile->fd >= 0, 0);
-			__MOVE(osfile->workName, osfile->registerName, 101);
-			Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101);
+			__MOVE(osfile->workName, osfile->registerName, 256);
+			Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256);
 			osfile->tempFile = 1;
 			osfile->state = 0;
-			error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101);
+			error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256);
 			if (error != 0) {
 				Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
 			}
@@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
 	CHAR err[32];
 	if (f->fd == -1) {
 		if (f->state == 1) {
-			Files_GetTempName(f->registerName, 101, (void*)f->workName, 101);
+			Files_GetTempName(f->registerName, 256, (void*)f->workName, 256);
 			f->tempFile = 1;
 		} else {
 			__ASSERT(f->state == 2, 0);
-			Files_Deregister(f->registerName, 101);
-			__MOVE(f->registerName, f->workName, 101);
+			Files_Deregister(f->registerName, 256);
+			__MOVE(f->registerName, f->workName, 256);
 			f->registerName[0] = 0x00;
 			f->tempFile = 0;
 		}
-		error = Platform_Unlink((void*)f->workName, 101);
-		error = Platform_New((void*)f->workName, 101, &f->fd);
+		error = Platform_Unlink((void*)f->workName, 256);
+		error = Platform_New((void*)f->workName, 256, &f->fd);
 		done = error == 0;
 		if (done) {
 			f->next = Files_files;
@@ -319,8 +319,8 @@ void Files_Close (Files_File f)
 	if (f->state != 1 || f->registerName[0] != 0x00) {
 		Files_Create(f);
 		i = 0;
-		while ((i < 4 && f->bufs[i] != NIL)) {
-			Files_Flush(f->bufs[i]);
+		while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) {
+			Files_Flush(f->bufs[__X(i, 4)]);
 			i += 1;
 		}
 	}
@@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
 	__DUP(name, name__len, CHAR);
 	__NEW(f, Files_FileDesc);
 	f->workName[0] = 0x00;
-	__COPY(name, f->registerName, 101);
+	__COPY(name, f->registerName, 256);
 	f->fd = -1;
 	f->state = 1;
 	f->len = 0;
@@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len)
 			*pos += 1;
 		}
 	} else {
-		ch = (Files_SearchPath->data)[*pos];
+		ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		while (ch == ' ' || ch == ';') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
 		if (ch == '~') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
-			while (Files_HOME[i] != 0x00) {
-				dir[i] = Files_HOME[i];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
+			while (Files_HOME[__X(i, 1024)] != 0x00) {
+				dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)];
 				i += 1;
 			}
 			if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) {
-				while ((i > 0 && dir[i - 1] != '/')) {
+				while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) {
 					i -= 1;
 				}
 			}
 		}
 		while ((ch != 0x00 && ch != ';')) {
-			dir[i] = ch;
+			dir[__X(i, dir__len)] = ch;
 			i += 1;
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
-		while ((i > 0 && dir[i - 1] == ' ')) {
+		while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) {
 			i -= 1;
 		}
 	}
-	dir[i] = 0x00;
+	dir[__X(i, dir__len)] = 0x00;
 }
 
 static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
@@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
 	ch = name[0];
 	while ((ch != 0x00 && ch != '/')) {
 		i += 1;
-		ch = name[i];
+		ch = name[__X(i, name__len)];
 	}
 	return ch == '/';
 }
@@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity)
 			if (!Platform_SameFileTime(identity, f->identity)) {
 				i = 0;
 				while (i < 4) {
-					if (f->bufs[i] != NIL) {
-						f->bufs[i]->org = -1;
-						f->bufs[i] = NIL;
+					if (f->bufs[__X(i, 4)] != NIL) {
+						f->bufs[__X(i, 4)]->org = -1;
+						f->bufs[__X(i, 4)] = NIL;
 					}
 					i += 1;
 				}
@@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
 					f->pos = 0;
 					f->swapper = -1;
 					error = Platform_Size(fd, &f->len);
-					__COPY(name, f->workName, 101);
+					__COPY(name, f->workName, 256);
 					f->registerName[0] = 0x00;
 					f->tempFile = 0;
 					f->identity = identity;
@@ -514,9 +514,9 @@ void Files_Purge (Files_File f)
 	INT16 error;
 	i = 0;
 	while (i < 4) {
-		if (f->bufs[i] != NIL) {
-			f->bufs[i]->org = -1;
-			f->bufs[i] = NIL;
+		if (f->bufs[__X(i, 4)] != NIL) {
+			f->bufs[__X(i, 4)]->org = -1;
+			f->bufs[__X(i, 4)] = NIL;
 		}
 		i += 1;
 	}
@@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
 		offset = __MASK(pos, -4096);
 		org = pos - offset;
 		i = 0;
-		while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) {
+		while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) {
 			i += 1;
 		}
 		if (i < 4) {
-			if (f->bufs[i] == NIL) {
+			if (f->bufs[__X(i, 4)] == NIL) {
 				__NEW(buf, Files_BufDesc);
 				buf->chg = 0;
 				buf->org = -1;
 				buf->f = f;
-				f->bufs[i] = buf;
+				f->bufs[__X(i, 4)] = buf;
 			} else {
-				buf = f->bufs[i];
+				buf = f->bufs[__X(i, 4)];
 			}
 		} else {
 			f->swapper = __MASK(f->swapper + 1, -4);
-			buf = f->bufs[f->swapper];
+			buf = f->bufs[__X(f->swapper, 4)];
 			Files_Flush(buf);
 		}
 		if (buf->org != org) {
@@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
 	}
 	Files_Assert(offset <= buf->size);
 	if (offset < buf->size) {
-		*x = buf->data[offset];
+		*x = buf->data[__X(offset, 4096)];
 		(*r).offset = offset + 1;
 	} else if ((*r).org + offset < buf->f->len) {
 		Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset);
@@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min);
+		__MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min);
 		offset += min;
 		(*r).offset = offset;
 		xpos += min;
@@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
 		offset = (*r).offset;
 	}
 	Files_Assert(offset < 4096);
-	buf->data[offset] = x;
+	buf->data[__X(offset, 4096)] = x;
 	buf->chg = 1;
 	if (offset == buf->size) {
 		buf->size += 1;
@@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min);
+		__MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min);
 		offset += min;
 		(*r).offset = offset;
 		Files_Assert(offset <= 4096);
@@ -817,12 +817,12 @@ void Files_Register (Files_File f)
 	}
 	Files_Close(f);
 	if (f->registerName[0] != 0x00) {
-		Files_Deregister(f->registerName, 101);
-		Files_Rename(f->workName, 101, f->registerName, 101, &errcode);
+		Files_Deregister(f->registerName, 256);
+		Files_Rename(f->workName, 256, f->registerName, 256, &errcode);
 		if (errcode != 0) {
 			Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
 		}
-		__MOVE(f->registerName, f->workName, 101);
+		__MOVE(f->registerName, f->workName, 256);
 		f->registerName[0] = 0x00;
 		f->tempFile = 0;
 	}
@@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de
 		j = 0;
 		while (i > 0) {
 			i -= 1;
-			dest[j] = src[i];
+			dest[__X(j, dest__len)] = src[__X(i, src__len)];
 			j += 1;
 		}
 	} else {
@@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	i = 0;
 	do {
 		Files_Read(&*R, R__typ, (void*)&ch);
-		x[i] = ch;
+		x[__X(i, x__len)] = ch;
 		i += 1;
 	} while (!(ch == 0x00));
 }
@@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	INT16 i;
 	i = 0;
 	do {
-		Files_Read(&*R, R__typ, (void*)&x[i]);
+		Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]);
 		i += 1;
-	} while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a));
-	if (x[i - 1] == 0x0a) {
+	} while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a));
+	if (x[__X(i - 1, x__len)] == 0x0a) {
 		i -= 1;
 	}
-	if ((i > 0 && x[i - 1] == 0x0d)) {
+	if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) {
 		i -= 1;
 	}
-	x[i] = 0x00;
+	x[__X(i, x__len)] = 0x00;
 }
 
 void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len)
@@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x)
 void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x)
 {
 	CHAR b[2];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2);
 }
 
 void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x)
 {
 	CHAR b[4];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
-	b[2] = (CHAR)__ASHR(x, 16);
-	b[3] = (CHAR)__ASHR(x, 24);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
+	b[2] = __CHR(__ASHR(x, 16));
+	b[3] = __CHR(__ASHR(x, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x)
 	CHAR b[4];
 	INT32 i;
 	i = (INT32)x;
-	b[0] = (CHAR)i;
-	b[1] = (CHAR)__ASHR(i, 8);
-	b[2] = (CHAR)__ASHR(i, 16);
-	b[3] = (CHAR)__ASHR(i, 24);
+	b[0] = __CHR(i);
+	b[1] = __CHR(__ASHR(i, 8));
+	b[2] = __CHR(__ASHR(i, 16));
+	b[3] = __CHR(__ASHR(i, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 {
 	INT16 i;
 	i = 0;
-	while (x[i] != 0x00) {
+	while (x[__X(i, x__len)] != 0x00) {
 		i += 1;
 	}
 	Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1);
@@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x)
 {
 	while (x < -64 || x > 63) {
-		Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128));
+		Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128));
 		x = __ASHR(x, 7);
 	}
-	Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128));
+	Files_Write(&*R, R__typ, __CHR(__MASK(x, -128)));
 }
 
 void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len)
@@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
 	if (f->fd >= 0) {
 		Files_CloseOSFile(f);
 		if (f->tempFile) {
-			res = Platform_Unlink((void*)f->workName, 101);
+			res = Platform_Unlink((void*)f->workName, 256);
 		}
 	}
 }
@@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
 	P(Files_SearchPath);
 }
 
-__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}};
+__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}};
 __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}};
 __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}};
 
@@ -1083,5 +1083,7 @@ export void *Files__init(void)
 	Heap_FileCount = 0;
 	Files_HOME[0] = 0x00;
 	Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024);
+	Files_MaxPathLength = Platform_MaxPathLength();
+	Files_MaxNameLength = Platform_MaxNameLength();
 	__ENDMOD;
 }

+ 3 - 2
data/bin/voc/src/bootstrap/unix-44/Files.h → data/bin/voc/bootstrap/unix-44/Files.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Files__h
 #define Files__h
@@ -11,7 +11,7 @@ typedef
 typedef
 	struct Files_FileDesc {
 		INT32 _prvt0;
-		char _prvt1[248];
+		char _prvt1[560];
 	} Files_FileDesc;
 
 typedef
@@ -22,6 +22,7 @@ typedef
 	} Files_Rider;
 
 
+import INT16 Files_MaxPathLength, Files_MaxNameLength;
 
 import ADDRESS *Files_FileDesc__typ;
 import ADDRESS *Files_Rider__typ;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/Heap.c → data/bin/voc/bootstrap/unix-44/Heap.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Heap.h → data/bin/voc/bootstrap/unix-44/Heap.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #ifndef Heap__h
 #define Heap__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-44/Modules.c → data/bin/voc/bootstrap/unix-44/Modules.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -404,7 +404,7 @@ static void Modules_errint (INT32 l)
 	if (l >= 10) {
 		Modules_errint(__DIV(l, 10));
 	}
-	Modules_errch((CHAR)((int)__MOD(l, 10) + 48));
+	Modules_errch(__CHR((int)__MOD(l, 10) + 48));
 }
 
 static void Modules_DisplayHaltCode (INT32 code)

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Modules.h → data/bin/voc/bootstrap/unix-44/Modules.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Modules__h
 #define Modules__h

+ 44 - 54
data/bin/voc/src/bootstrap/unix-44/OPB.c → data/bin/voc/bootstrap/unix-44/OPB.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n)
 {
 	CHAR ch;
 	n->typ = OPT_stringtyp;
-	ch = (CHAR)n->conval->intval;
+	ch = __CHR(n->conval->intval);
 	n->conval->ext = OPT_NewExt();
 	if (ch == 0x00) {
 		n->conval->intval2 = 1;
@@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x)
 			case 22: 
 				if (f == 3) {
 					if (z->class == 7) {
-						z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval);
+						z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval));
 						z->obj = NIL;
 					} else {
 						z = NewOp__29(op, typ, z);
@@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ)
 					OPB_err(203);
 					r = (LONGREAL)1;
 				}
-				(*x)->conval->intval = (INT32)__ENTIER(r);
+				(*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL);
 				OPB_SetIntType(*x);
 			}
 		}
@@ -1738,16 +1738,6 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 			}
 			x->typ = OPT_linttyp;
 			break;
-		case 12: 
-			if (x->class == 8 || x->class == 9) {
-				OPB_err(126);
-			} else if (__IN(f, 0x60, 32)) {
-				OPB_Convert(&x, OPT_inttyp);
-			} else {
-				OPB_err(111);
-			}
-			x->typ = OPT_inttyp;
-			break;
 		case 6: 
 			OPB_MOp(23, &x);
 			break;
@@ -1857,7 +1847,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 14: case 15: 
+		case 13: case 14: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f != 4) {
@@ -1866,7 +1856,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (x->typ->form != 7) {
@@ -1876,12 +1866,12 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 18: 
+		case 17: 
 			if (!__IN(x->typ->comp, 0x0c, 32)) {
 				OPB_err(131);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if ((x->class == 7 && f == 3)) {
 				OPB_CharToString(x);
 				f = 8;
@@ -1892,7 +1882,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -1904,11 +1894,11 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_linttyp;
 			}
 			break;
-		case 21: 
+		case 20: 
 			OPB_CheckLeaf(x, 0);
 			OPB_MOp(24, &x);
 			break;
-		case 13: 
+		case 12: 
 			if (x->class != 8) {
 				OPB_err(110);
 				x = OPB_NewIntConst(1);
@@ -1921,17 +1911,17 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x = OPB_NewIntConst(1);
 			}
 			break;
-		case 22: 
+		case 21: 
 			OPB_MOp(25, &x);
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (!__IN(f, 0x9a, 32)) {
 				OPB_err(111);
 			}
 			break;
-		case 25: case 26: case 29: case 32: 
+		case 24: case 25: case 28: case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -1941,7 +1931,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_adrtyp;
 			}
 			break;
-		case 27: case 28: 
+		case 26: case 27: 
 			if ((f == 4 && x->class == 7)) {
 				if (x->conval->intval < 0 || x->conval->intval > -1) {
 					OPB_err(220);
@@ -1950,14 +1940,14 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(69);
 			}
 			break;
-		case 30: 
+		case 29: 
 			if (x->class != 8) {
 				OPB_err(110);
 			} else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) {
 				OPB_err(111);
 			}
 			break;
-		case 31: 
+		case 30: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f == 11) {
@@ -1965,7 +1955,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 33: 
+		case 32: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				x = OPB_NewBoolConst(0);
@@ -2012,7 +2002,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 	p = *par0;
 	f = x->typ->form;
 	switch (fctno) {
-		case 14: case 15: 
+		case 13: case 14: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				p->typ = OPT_notyp;
@@ -2028,7 +2018,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = OPT_notyp;
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2041,7 +2031,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 18: 
+		case 17: 
 			if (!(f == 4) || x->class != 7) {
 				OPB_err(69);
 			} else if (x->typ->size == 1) {
@@ -2072,7 +2062,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(132);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) {
@@ -2082,13 +2072,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				t = x;
 				x = p;
 				p = t;
-				p = NewOp__54(19, 19, p, x);
+				p = NewOp__54(19, 18, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2132,13 +2122,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(64);
 			}
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f != 4) {
 				OPB_err(111);
 			} else {
-				if (fctno == 23) {
+				if (fctno == 22) {
 					p = NewOp__54(12, 27, p, x);
 				} else {
 					p = NewOp__54(12, 28, p, x);
@@ -2146,11 +2136,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = p->left->typ;
 			}
 			break;
-		case 25: case 26: case 27: case 28: 
+		case 24: case 25: case 26: case 27: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (__IN(f, 0x18ff, 32)) {
-				if (fctno == 25 || fctno == 27) {
+				if (fctno == 24 || fctno == 26) {
 					if (OPB_NotVar(x)) {
 						OPB_err(112);
 					}
@@ -2164,7 +2154,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 29: 
+		case 28: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2174,7 +2164,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_booltyp;
 			break;
-		case 30: 
+		case 29: 
 			if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) {
 				OPB_err(126);
 			}
@@ -2194,17 +2184,17 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p = x;
 			break;
-		case 31: 
+		case 30: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
-				p = NewOp__54(19, 31, p, x);
+				p = NewOp__54(19, 30, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 32: 
+		case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -2215,7 +2205,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->link = x;
 			break;
-		case 33: 
+		case 32: 
 			if ((f == 4 && x->class == 7)) {
 				if ((0 <= x->conval->intval && x->conval->intval <= 255)) {
 					OPB_BindNodes(28, OPT_notyp, &x, x);
@@ -2230,7 +2220,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 					} else if (p->class == 28) {
 						OPB_err(99);
 					} else {
-						p->subcl = 33;
+						p->subcl = 32;
 					}
 				} else {
 					OPB_err(218);
@@ -2272,12 +2262,12 @@ void OPB_StParN (OPT_Node *par0, OPT_Node x, INT16 fctno, INT16 n)
 		} else {
 			OPB_err(111);
 		}
-	} else if ((fctno == 32 && n == 2)) {
+	} else if ((fctno == 31 && n == 2)) {
 		if (x->class == 8 || x->class == 9) {
 			OPB_err(126);
 		} else if (f == 4) {
 			node = OPT_NewNode(19);
-			node->subcl = 32;
+			node->subcl = 31;
 			node->right = p;
 			node->left = p->link;
 			p->link = x;
@@ -2297,22 +2287,22 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 	INT16 dim;
 	OPT_Node x = NIL, p = NIL;
 	p = *par0;
-	if (fctno <= 20) {
+	if (fctno <= 19) {
 		if ((fctno == 1 && p->typ != OPT_notyp)) {
 			if (p->typ->comp == 3) {
 				OPB_err(65);
 			}
 			p->typ = OPT_notyp;
-		} else if (fctno <= 13) {
+		} else if (fctno <= 12) {
 			if (parno < 1) {
 				OPB_err(65);
 			}
 		} else {
-			if (((fctno == 14 || fctno == 15) && parno == 1)) {
+			if (((fctno == 13 || fctno == 14) && parno == 1)) {
 				OPB_BindNodes(19, OPT_notyp, &p, OPB_NewIntConst(1));
 				p->subcl = fctno;
 				p->right->typ = p->left->typ;
-			} else if ((fctno == 18 && parno == 1)) {
+			} else if ((fctno == 17 && parno == 1)) {
 				if (p->typ->comp == 3) {
 					dim = 0;
 					while (p->class == 4) {
@@ -2328,7 +2318,7 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 				OPB_err(65);
 			}
 		}
-	} else if (fctno == 33) {
+	} else if (fctno == 32) {
 		if (parno == 1) {
 			x = NIL;
 			OPB_BindNodes(28, OPT_notyp, &x, OPB_NewIntConst(0));
@@ -2343,13 +2333,13 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 			} else if (p->class == 28) {
 				OPB_err(99);
 			} else {
-				p->subcl = 33;
+				p->subcl = 32;
 			}
 		} else if (parno < 1) {
 			OPB_err(65);
 		}
 	} else {
-		if ((parno < 1 || (fctno > 22 && parno < 2)) || (fctno == 32 && parno < 3)) {
+		if ((parno < 1 || (fctno > 21 && parno < 2)) || (fctno == 31 && parno < 3)) {
 			OPB_err(65);
 		}
 	}

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPB.h → data/bin/voc/bootstrap/unix-44/OPB.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPB__h
 #define OPB__h

+ 16 - 10
data/bin/voc/src/bootstrap/unix-88/OPC.c → data/bin/voc/bootstrap/unix-44/OPC.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str)
 					OPC_DefineType(str->BaseTyp);
 				}
 			} else if (__IN(str->comp, 0x0c, 32)) {
+				if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) {
+					OPM_Mark(244, str->txtpos);
+					str->BaseTyp->strobj->linkadr = 2;
+				}
 				OPC_DefineType(str->BaseTyp);
 			} else if (str->form == 12) {
 				if (str->BaseTyp != OPT_notyp) {
@@ -1739,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c)
 		if ((c == 92 || c == 39) || c == 63) {
 			OPM_Write('\\');
 		}
-		OPM_Write((CHAR)c);
+		OPM_Write(__CHR(c));
 		OPM_Write('\'');
 	}
 }
@@ -1755,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l)
 		c = (INT16)s[__X(i, s__len)];
 		if (c < 32 || c > 126) {
 			OPM_Write('\\');
-			OPM_Write((CHAR)(48 + __ASHR(c, 6)));
+			OPM_Write(__CHR(48 + __ASHR(c, 6)));
 			c = __MASK(c, -64);
-			OPM_Write((CHAR)(48 + __ASHR(c, 3)));
+			OPM_Write(__CHR(48 + __ASHR(c, 3)));
 			c = __MASK(c, -8);
-			OPM_Write((CHAR)(48 + c));
+			OPM_Write(__CHR(48 + c));
 		} else {
 			if ((c == 92 || c == 34) || c == 63) {
 				OPM_Write('\\');
 			}
-			OPM_Write((CHAR)c);
+			OPM_Write(__CHR(c));
 		}
 		i += 1;
 	}
@@ -1830,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size)
 
 void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 {
+	INT64 d;
+	d = dim;
+	while (d > 0) {
+		array = array->BaseTyp;
+		d -= 1;
+	}
 	if (array->comp == 3) {
 		OPC_CompleteIdent(obj);
 		OPM_WriteString((CHAR*)"__len", 6);
@@ -1837,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 			OPM_WriteInt(dim);
 		}
 	} else {
-		while (dim > 0) {
-			array = array->BaseTyp;
-			dim -= 1;
-		}
 		OPM_WriteInt(array->n);
 	}
 }

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/OPC.h → data/bin/voc/bootstrap/unix-44/OPC.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPC__h
 #define OPC__h

+ 49 - 23
data/bin/voc/src/bootstrap/windows-48/OPM.c → data/bin/voc/bootstrap/unix-44/OPM.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos)
 	if (pos >= (INT64)OPM_ErrorLineLimitPos) {
 		pos = OPM_ErrorLineLimitPos - 1;
 	}
-	i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos);
+	i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768);
 	while (i > 0) {
 		OPM_LogW(' ');
 		i -= 1;
@@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i)
 {
 	CHAR s[3];
 	INT32 digit;
-	digit = __ASHR((INT32)i, 4);
+	digit = __ASHR(__SHORT(i, 2147483648LL), 4);
 	if (digit < 10) {
-		s[0] = (CHAR)(48 + digit);
+		s[0] = __CHR(48 + digit);
 	} else {
-		s[0] = (CHAR)(87 + digit);
+		s[0] = __CHR(87 + digit);
 	}
-	digit = __MASK((INT32)i, -16);
+	digit = __MASK(__SHORT(i, 2147483648LL), -16);
 	if (digit < 10) {
-		s[1] = (CHAR)(48 + digit);
+		s[1] = __CHR(48 + digit);
 	} else {
-		s[1] = (CHAR)(87 + digit);
+		s[1] = __CHR(87 + digit);
 	}
 	s[2] = 0x00;
 	OPM_WriteString(s, 3);
@@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i)
 			__MOVE("LL", s, 3);
 			k = 2;
 		}
-		s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+		s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 		i1 = __DIV(i1, 10);
 		k += 1;
 		while (i1 > 0) {
-			s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+			s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 			i1 = __DIV(i1, 10);
 			k += 1;
 		}
@@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx)
 	CHAR s[32];
 	CHAR ch;
 	INT16 i;
-	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) {
+	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) {
 		if (suffx == 'f') {
 			OPM_WriteString((CHAR*)"(REAL)", 7);
 		} else {
 			OPM_WriteString((CHAR*)"(LONGREAL)", 11);
 		}
-		OPM_WriteInt((INT32)__ENTIER(r));
+		OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL));
 	} else {
 		Texts_OpenWriter(&W, Texts_Writer__typ);
 		if (suffx == 'f') {
@@ -1050,27 +1050,53 @@ static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len)
 {
 	CHAR testpath[4096];
 	Platform_FileIdentity identity;
-	BOOLEAN result;
 	__DUP(s, s__len, CHAR);
 	__COPY(OPM_InstallDir, testpath, 4096);
-	Strings_Append((CHAR*)"/voc.exe", 9, (void*)testpath, 4096);
-	result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
-	if (!result) {
-		__COPY(OPM_InstallDir, testpath, 4096);
-		Strings_Append((CHAR*)"/voc", 5, (void*)testpath, 4096);
-		result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
+	Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
 	}
 	__DEL(s);
-	return result;
+	return 1;
 }
 
 static void OPM_FindInstallDir (void)
 {
+	INT16 i;
+	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024);
+	if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+		return;
+	}
 	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
-	if (!OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
-		__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	i = Strings_Length(OPM_InstallDir, 1024);
+	while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) {
+		i -= 1;
+	}
+	if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) {
+		OPM_InstallDir[__X(i - 1, 1024)] = 0x00;
+		if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+			return;
+		}
 	}
-	__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	__COPY("", OPM_InstallDir, 1024);
 }
 
 static void EnumPtrs(void (*P)(void*))

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/OPM.h → data/bin/voc/bootstrap/unix-44/OPM.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPM__h
 #define OPM__h

+ 7 - 7
data/bin/voc/src/bootstrap/windows-48/OPP.c → data/bin/voc/bootstrap/unix-44/OPP.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	OPT_Node y = NIL;
 	INT8 m;
 	INT16 n;
-	m = (INT8)((INT16)(*x)->obj->adr);
+	m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128);
 	n = 0;
 	if (OPP_sym == 30) {
 		OPS_Get(&OPP_sym);
@@ -669,7 +669,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	} else {
 		OPP_err(30);
 	}
-	if ((OPP_level > 0 && (m == 1 || m == 31))) {
+	if ((OPP_level > 0 && (m == 1 || m == 30))) {
 		OPT_topScope->link->leaf = 0;
 	}
 }
@@ -943,7 +943,7 @@ static void GetCode__19 (void)
 			(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)];
 			n += 1;
 		}
-		(*ext)[0] = (CHAR)n;
+		(*ext)[0] = __CHR(n);
 		OPS_Get(&OPP_sym);
 	} else {
 		for (;;) {
@@ -956,14 +956,14 @@ static void GetCode__19 (void)
 					n = 1;
 				}
 				OPS_Get(&OPP_sym);
-				(*ext)[__X(n, 256)] = (CHAR)c;
+				(*ext)[__X(n, 256)] = __CHR(c);
 			}
 			if (OPP_sym == 19) {
 				OPS_Get(&OPP_sym);
 			} else if (OPP_sym == 35) {
 				OPP_err(19);
 			} else {
-				(*ext)[0] = (CHAR)n;
+				(*ext)[0] = __CHR(n);
 				break;
 			}
 		}
@@ -1501,7 +1501,7 @@ static void OPP_StatSeq (OPT_Node *stat)
 				OPP_CheckSym(27);
 				OPP_StatSeq(&s);
 				y = OPB_NewLeaf(id);
-				OPB_StPar1(&y, z, 14);
+				OPB_StPar1(&y, z, 13);
 				SetPos__35(y);
 				if (s == NIL) {
 					s = y;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/OPP.h → data/bin/voc/bootstrap/unix-44/OPP.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPP__h
 #define OPP__h

+ 10 - 10
data/bin/voc/src/bootstrap/unix-88/OPS.c → data/bin/voc/bootstrap/unix-44/OPS.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym)
 			OPS_err(241);
 			break;
 		}
-		OPS_str[i] = OPS_ch;
+		OPS_str[__X(i, 256)] = OPS_ch;
 		i += 1;
 	}
 	OPM_Get(&OPS_ch);
-	OPS_str[i] = 0x00;
+	OPS_str[__X(i, 256)] = 0x00;
 	OPS_intval = i + 1;
 	if (OPS_intval == 2) {
 		*sym = 35;
@@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym)
 	INT16 i;
 	i = 0;
 	do {
-		OPS_name[i] = OPS_ch;
+		OPS_name[__X(i, 256)] = OPS_ch;
 		i += 1;
 		OPM_Get(&OPS_ch);
 	} while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256));
@@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym)
 		OPS_err(240);
 		i -= 1;
 	}
-	OPS_name[i] = 0x00;
+	OPS_name[__X(i, 256)] = 0x00;
 	*sym = 38;
 }
 
@@ -143,7 +143,7 @@ static void OPS_Number (void)
 		if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) {
 			if (m > 0 || OPS_ch != '0') {
 				if (n < 24) {
-					dig[n] = OPS_ch;
+					dig[__X(n, 24)] = OPS_ch;
 					n += 1;
 				}
 				m += 1;
@@ -173,7 +173,7 @@ static void OPS_Number (void)
 				OPS_numtyp = 1;
 				if (n <= 2) {
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -187,7 +187,7 @@ static void OPS_Number (void)
 						OPS_intval = -1;
 					}
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -196,7 +196,7 @@ static void OPS_Number (void)
 			} else {
 				OPS_numtyp = 2;
 				while (i < n) {
-					d = Ord__7(dig[i], 0);
+					d = Ord__7(dig[__X(i, 24)], 0);
 					i += 1;
 					if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) {
 						OPS_intval = OPS_intval * 10 + (INT64)d;
@@ -214,7 +214,7 @@ static void OPS_Number (void)
 		expCh = 'E';
 		while (n > 0) {
 			n -= 1;
-			f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10;
+			f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10;
 		}
 		if (OPS_ch == 'E' || OPS_ch == 'D') {
 			expCh = OPS_ch;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPS.h → data/bin/voc/bootstrap/unix-44/OPS.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPS__h
 #define OPS__h

+ 27 - 28
data/bin/voc/src/bootstrap/unix-44/OPT.c → data/bin/voc/bootstrap/unix-44/OPT.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ)
 			}
 			typ->size = offset;
 			typ->align = base;
-			typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8);
+			typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768);
 		} else if (c == 2) {
 			OPT_TypSize(typ->BaseTyp);
 			typ->size = typ->n * typ->BaseTyp->size;
@@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ)
 		obj->vis = 0;
 		tag = OPM_SymRInt();
 		if (tag == 35) {
-			(*typ)->sysflag = (INT16)OPM_SymRInt();
+			(*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768);
 			tag = OPM_SymRInt();
 		}
 		switch (tag) {
@@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno)
 					obj->mode = 9;
 					ext = OPT_NewExt();
 					obj->conval->ext = ext;
-					s = (INT16)OPM_SymRInt();
-					(*ext)[0] = (CHAR)s;
+					s = __SHORTF(OPM_SymRInt(), 32768);
+					(*ext)[0] = __CHR(s);
 					i = 1;
 					while (i <= s) {
 						OPM_SymRCh(&(*ext)[__X(i, 256)]);
@@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj)
 	OPM_SymWInt(f);
 	switch (f) {
 		case 2: case 3: 
-			OPM_SymWCh((CHAR)obj->conval->intval);
+			OPM_SymWCh(__CHR(obj->conval->intval));
 			break;
 		case 4: 
 			OPM_SymWInt(obj->conval->intval);
@@ -2098,18 +2098,18 @@ export void *OPT__init(void)
 	OPT_EnterTyp((CHAR*)"INT64", 4, 8, &OPT_int64typ);
 	OPT_EnterTyp((CHAR*)"SET32", 7, 4, &OPT_set32typ);
 	OPT_EnterTyp((CHAR*)"SET64", 7, 8, &OPT_set64typ);
-	OPT_EnterProc((CHAR*)"ADR", 21);
-	OPT_EnterProc((CHAR*)"CC", 22);
-	OPT_EnterProc((CHAR*)"LSH", 23);
-	OPT_EnterProc((CHAR*)"ROT", 24);
-	OPT_EnterProc((CHAR*)"GET", 25);
-	OPT_EnterProc((CHAR*)"PUT", 26);
-	OPT_EnterProc((CHAR*)"GETREG", 27);
-	OPT_EnterProc((CHAR*)"PUTREG", 28);
-	OPT_EnterProc((CHAR*)"BIT", 29);
-	OPT_EnterProc((CHAR*)"VAL", 30);
-	OPT_EnterProc((CHAR*)"NEW", 31);
-	OPT_EnterProc((CHAR*)"MOVE", 32);
+	OPT_EnterProc((CHAR*)"ADR", 20);
+	OPT_EnterProc((CHAR*)"CC", 21);
+	OPT_EnterProc((CHAR*)"LSH", 22);
+	OPT_EnterProc((CHAR*)"ROT", 23);
+	OPT_EnterProc((CHAR*)"GET", 24);
+	OPT_EnterProc((CHAR*)"PUT", 25);
+	OPT_EnterProc((CHAR*)"GETREG", 26);
+	OPT_EnterProc((CHAR*)"PUTREG", 27);
+	OPT_EnterProc((CHAR*)"BIT", 28);
+	OPT_EnterProc((CHAR*)"VAL", 29);
+	OPT_EnterProc((CHAR*)"NEW", 30);
+	OPT_EnterProc((CHAR*)"MOVE", 31);
 	OPT_syslink = OPT_topScope->right;
 	OPT_universe = OPT_topScope;
 	OPT_topScope->right = NIL;
@@ -2131,22 +2131,21 @@ export void *OPT__init(void)
 	OPT_EnterProc((CHAR*)"CAP", 3);
 	OPT_EnterProc((CHAR*)"ORD", 4);
 	OPT_EnterProc((CHAR*)"ENTIER", 5);
-	OPT_EnterProc((CHAR*)"FLOOR", 12);
 	OPT_EnterProc((CHAR*)"ODD", 6);
 	OPT_EnterProc((CHAR*)"MIN", 7);
 	OPT_EnterProc((CHAR*)"MAX", 8);
 	OPT_EnterProc((CHAR*)"CHR", 9);
 	OPT_EnterProc((CHAR*)"SHORT", 10);
 	OPT_EnterProc((CHAR*)"LONG", 11);
-	OPT_EnterProc((CHAR*)"SIZE", 13);
-	OPT_EnterProc((CHAR*)"INC", 14);
-	OPT_EnterProc((CHAR*)"DEC", 15);
-	OPT_EnterProc((CHAR*)"INCL", 16);
-	OPT_EnterProc((CHAR*)"EXCL", 17);
-	OPT_EnterProc((CHAR*)"LEN", 18);
-	OPT_EnterProc((CHAR*)"COPY", 19);
-	OPT_EnterProc((CHAR*)"ASH", 20);
-	OPT_EnterProc((CHAR*)"ASSERT", 33);
+	OPT_EnterProc((CHAR*)"SIZE", 12);
+	OPT_EnterProc((CHAR*)"INC", 13);
+	OPT_EnterProc((CHAR*)"DEC", 14);
+	OPT_EnterProc((CHAR*)"INCL", 15);
+	OPT_EnterProc((CHAR*)"EXCL", 16);
+	OPT_EnterProc((CHAR*)"LEN", 17);
+	OPT_EnterProc((CHAR*)"COPY", 18);
+	OPT_EnterProc((CHAR*)"ASH", 19);
+	OPT_EnterProc((CHAR*)"ASSERT", 32);
 	OPT_impCtxt.ref[0] = OPT_undftyp;
 	OPT_impCtxt.ref[1] = OPT_bytetyp;
 	OPT_impCtxt.ref[2] = OPT_booltyp;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/OPT.h → data/bin/voc/bootstrap/unix-44/OPT.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPT__h
 #define OPT__h

+ 34 - 35
data/bin/voc/src/bootstrap/unix-44/OPV.c → data/bin/voc/bootstrap/unix-44/OPV.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -29,7 +29,6 @@ static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc);
 static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec);
 static void OPV_DefineTDescs (OPT_Node n);
 static void OPV_Entier (OPT_Node n, INT16 prec);
-static void OPV_Floor (OPT_Node n, INT16 prec);
 static void OPV_GetTProcNum (OPT_Object obj);
 static void OPV_IfStat (OPT_Node n, BOOLEAN withtrap, OPT_Object outerProc);
 static BOOLEAN OPV_ImplicitReturn (OPT_Node n);
@@ -113,7 +112,7 @@ static void OPV_Stamp (OPS_Name s)
 	i += 2;
 	k = 0;
 	do {
-		n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48);
+		n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48);
 		j = __DIV(j, 10);
 		k += 1;
 	} while (!(j == 0));
@@ -318,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp
 
 static void OPV_Len (OPT_Node n, INT64 dim)
 {
+	INT64 d;
+	OPT_Struct array = NIL;
 	while ((n->class == 4 && n->typ->comp == 3)) {
 		dim += 1;
 		n = n->left;
 	}
 	if ((n->class == 3 && n->typ->comp == 3)) {
-		OPV_design(n->left, 10);
-		OPM_WriteString((CHAR*)"->len[", 7);
-		OPM_WriteInt(dim);
-		OPM_Write(']');
+		d = dim;
+		array = n->typ;
+		while (d > 0) {
+			array = array->BaseTyp;
+			d -= 1;
+		}
+		if (array->comp == 3) {
+			OPV_design(n->left, 10);
+			OPM_WriteString((CHAR*)"->len[", 7);
+			OPM_WriteInt(dim);
+			OPM_Write(']');
+		} else {
+			OPM_WriteInt(array->n);
+		}
 	} else {
 		OPC_Len(n->obj, n->typ, dim);
 	}
@@ -353,17 +364,6 @@ static void OPV_Entier (OPT_Node n, INT16 prec)
 	}
 }
 
-static void OPV_Floor (OPT_Node n, INT16 prec)
-{
-	if (__IN(n->typ->form, 0x60, 32)) {
-		OPM_WriteString((CHAR*)"__FLOOR(", 9);
-		OPV_expr(n, -1);
-		OPM_Write(')');
-	} else {
-		OPV_expr(n, prec);
-	}
-}
-
 static void OPV_SizeCast (OPT_Node n, INT32 to)
 {
 	if ((to < n->typ->size && __IN(2, OPM_Options, 32))) {
@@ -382,6 +382,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to)
 			OPM_WriteInt(__ASHL(to, 3));
 			OPM_WriteString((CHAR*)")", 2);
 		}
+		OPV_Entier(n, 9);
 	}
 }
 
@@ -393,7 +394,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec)
 	if (to == 7) {
 		if (from == 7) {
 			OPV_SizeCast(n, newtype->size);
-			OPV_Entier(n, 9);
 		} else {
 			OPM_WriteString((CHAR*)"__SETOF(", 9);
 			OPV_Entier(n, -1);
@@ -403,7 +403,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec)
 		}
 	} else if (to == 4) {
 		OPV_SizeCast(n, newtype->size);
-		OPV_Entier(n, 9);
 	} else if (to == 3) {
 		if (__IN(2, OPM_Options, 32)) {
 			OPM_WriteString((CHAR*)"__CHR", 6);
@@ -467,7 +466,7 @@ static void OPV_design (OPT_Node n, INT16 prec)
 	OPT_Struct typ = NIL;
 	INT16 class, designPrec, comp;
 	OPT_Node d = NIL, x = NIL;
-	INT16 dims, i, _for__27;
+	INT16 dims, i, _for__26;
 	comp = n->typ->comp;
 	obj = n->obj;
 	class = n->class;
@@ -543,9 +542,9 @@ static void OPV_design (OPT_Node n, INT16 prec)
 					}
 					x = x->left;
 				}
-				_for__27 = dims;
+				_for__26 = dims;
 				i = 1;
-				while (i <= _for__27) {
+				while (i <= _for__26) {
 					OPM_Write(')');
 					i += 1;
 				}
@@ -1195,7 +1194,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x)
 		base = base->BaseTyp;
 	}
 	if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) {
-		OPC_Ident(base->strobj);
+		OPC_Andent(base);
 		OPM_WriteString((CHAR*)"__typ", 6);
 	} else if (base->form == 11) {
 		OPM_WriteString((CHAR*)"POINTER__typ", 13);
@@ -1354,21 +1353,21 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 							OPV_NewArr(n->left, n->right);
 						}
 						break;
-					case 14: case 15: 
+					case 13: case 14: 
 						OPV_expr(n->left, -1);
-						OPC_Increment(n->subcl == 15);
+						OPC_Increment(n->subcl == 14);
 						OPV_expr(n->right, -1);
 						break;
-					case 16: case 17: 
+					case 15: case 16: 
 						OPV_expr(n->left, -1);
-						OPC_SetInclude(n->subcl == 17);
+						OPC_SetInclude(n->subcl == 16);
 						OPM_WriteString((CHAR*)"__SETOF(", 9);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)",", 2);
 						OPM_WriteInt(__ASHL(n->left->typ->size, 3));
 						OPM_Write(')');
 						break;
-					case 19: 
+					case 18: 
 						OPM_WriteString((CHAR*)"__COPY(", 8);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1377,7 +1376,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPV_Len(n->left, 0);
 						OPM_Write(')');
 						break;
-					case 32: 
+					case 31: 
 						OPM_WriteString((CHAR*)"__MOVE(", 8);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1386,7 +1385,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPV_expr(n->right->link, -1);
 						OPM_Write(')');
 						break;
-					case 25: 
+					case 24: 
 						OPM_WriteString((CHAR*)"__GET(", 7);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1395,7 +1394,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPC_Ident(n->left->typ->strobj);
 						OPM_Write(')');
 						break;
-					case 26: 
+					case 25: 
 						OPM_WriteString((CHAR*)"__PUT(", 7);
 						OPV_expr(n->left, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1404,10 +1403,10 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPC_Ident(n->right->typ->strobj);
 						OPM_Write(')');
 						break;
-					case 27: case 28: 
+					case 26: case 27: 
 						OPM_err(200);
 						break;
-					case 31: 
+					case 30: 
 						OPM_WriteString((CHAR*)"__SYSNEW(", 10);
 						OPV_design(n->left, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1439,7 +1438,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 				OPV_ActualPar(n->right, n->obj);
 				break;
 			case 20: 
-				if (n->subcl != 33) {
+				if (n->subcl != 32) {
 					OPV_IfStat(n, 0, outerProc);
 				} else if (__IN(7, OPM_Options, 32)) {
 					OPM_WriteString((CHAR*)"__ASSERT(", 10);

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPV.h → data/bin/voc/bootstrap/unix-44/OPV.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPV__h
 #define OPV__h

+ 9 - 144
data/bin/voc/src/bootstrap/unix-44/Out.c → data/bin/voc/bootstrap/unix-44/Out.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -16,8 +16,6 @@ static INT16 Out_in;
 
 
 export void Out_Char (CHAR ch);
-export void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len);
-export INT16 Out_Expo (REAL x);
 export void Out_Flush (void);
 export void Out_Hex (INT64 x, INT64 n);
 export void Out_Int (INT64 x, INT64 n);
@@ -26,7 +24,6 @@ export void Out_Ln (void);
 export void Out_LongReal (LONGREAL x, INT16 n);
 export void Out_Open (void);
 export void Out_Real (REAL x, INT16 n);
-export void Out_RealFix (REAL x, INT16 n, INT16 k);
 static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_);
 export void Out_String (CHAR *str, ADDRESS str__len);
 export LONGREAL Out_Ten (INT16 e);
@@ -83,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len)
 		error = Platform_Write(1, (ADDRESS)str, l);
 	} else {
 		__MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l);
-		Out_in += (INT16)l;
+		Out_in += __SHORT(l, 32768);
 	}
 	__DEL(str);
 }
@@ -101,11 +98,11 @@ void Out_Int (INT64 x, INT64 n)
 		if (x < 0) {
 			x = -x;
 		}
-		s[0] = (CHAR)(48 + __MOD(x, 10));
+		s[0] = __CHR(48 + __MOD(x, 10));
 		x = __DIV(x, 10);
 		i = 1;
 		while (x != 0) {
-			s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10));
+			s[__X(i, 22)] = __CHR(48 + __MOD(x, 10));
 			x = __DIV(x, 10);
 			i += 1;
 		}
@@ -141,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n)
 		x = __ROTL(x, 4, 64);
 		n -= 1;
 		if (__MASK(x, -16) < 10) {
-			Out_Char((CHAR)(__MASK(x, -16) + 48));
+			Out_Char(__CHR(__MASK(x, -16) + 48));
 		} else {
-			Out_Char((CHAR)((__MASK(x, -16) - 10) + 65));
+			Out_Char(__CHR((__MASK(x, -16) - 10) + 65));
 		}
 	}
 }
@@ -157,7 +154,7 @@ void Out_Ln (void)
 static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i)
 {
 	*i -= 1;
-	s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48);
+	s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48);
 }
 
 static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i)
@@ -169,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16
 	if (l > *i) {
 		l = *i;
 	}
-	*i -= (INT16)l;
+	*i -= __SHORT(l, 32768);
 	j = 0;
 	while (j < l) {
 		s[__X(*i + j, s__len)] = t[__X(j, t__len)];
@@ -251,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_)
 			if (nn) {
 				x = -x;
 			}
-			e = (INT16)__ASHR((e - 1023) * 77, 8);
+			e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768);
 			if (e >= 0) {
 				x = x / (LONGREAL)Out_Ten(e);
 			} else {
@@ -331,138 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n)
 	Out_RealP(x, n, 1);
 }
 
-void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len)
-{
-	INT32 i, j, k;
-	if (x < (LONGREAL)0) {
-		x = -x;
-	}
-	k = 0;
-	if (n > 9) {
-		i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
-		j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000);
-		if (j < 0) {
-			j = 0;
-		}
-		while (k < 9) {
-			d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48);
-			j = __DIV(j, 10);
-			k += 1;
-		}
-	} else {
-		i = (INT32)__ENTIER(x);
-	}
-	while (k < n) {
-		d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48);
-		i = __DIV(i, 10);
-		k += 1;
-	}
-}
-
-INT16 Out_Expo (REAL x)
-{
-	INT16 i;
-	__GET((ADDRESS)&x + 2, i, INT16);
-	return __MASK(__ASHR(i, 7), -256);
-}
-
-static struct RealFix__13 {
-	INT16 *i;
-	CHAR (*d)[9];
-	struct RealFix__13 *lnk;
-} *RealFix__13_s;
-
-static void dig__14 (INT16 n);
-static void seq__16 (CHAR ch, INT16 n);
-
-static void seq__16 (CHAR ch, INT16 n)
-{
-	while (n > 0) {
-		Out_Char(ch);
-		n -= 1;
-	}
-}
-
-static void dig__14 (INT16 n)
-{
-	while (n > 0) {
-		*RealFix__13_s->i -= 1;
-		Out_Char((*RealFix__13_s->d)[__X(*RealFix__13_s->i, 9)]);
-		n -= 1;
-	}
-}
-
-void Out_RealFix (REAL x, INT16 n, INT16 k)
-{
-	INT16 e, i;
-	CHAR sign;
-	REAL x0;
-	CHAR d[9];
-	struct RealFix__13 _s;
-	_s.i = &i;
-	_s.d = (void*)d;
-	_s.lnk = RealFix__13_s;
-	RealFix__13_s = &_s;
-	e = Out_Expo(x);
-	if (k < 0) {
-		k = 0;
-	}
-	if (e == 0) {
-		seq__16(' ', (n - k) - 2);
-		Out_Char('0');
-		seq__16(' ', k + 1);
-	} else if (e == 255) {
-		Out_String((CHAR*)" NaN", 5);
-		seq__16(' ', n - 4);
-	} else {
-		e = __ASHR((e - 127) * 77, 8);
-		if (x < (REAL)0) {
-			sign = '-';
-			x = -x;
-		} else {
-			sign = ' ';
-		}
-		if (e >= 0) {
-			x = (x / (LONGREAL)Out_Ten(e));
-		} else {
-			x = (Out_Ten(-e) * x);
-		}
-		if (x >= (REAL)10) {
-			x =   1.0000000e-001 * x;
-			e += 1;
-		}
-		if (k + e >= 8) {
-			k = 8 - e;
-		} else if (k + e < 0) {
-			k = -e;
-			x = (REAL)0;
-		}
-		x0 = Out_Ten(k + e);
-		x = x0 * x +   5.0000000e-001;
-		if (x >= (REAL)10 * x0) {
-			e += 1;
-		}
-		e += 1;
-		i = k + e;
-		Out_ConvertL(x, i, (void*)d, 9);
-		if (e > 0) {
-			seq__16(' ', ((n - e) - k) - 2);
-			Out_Char(sign);
-			dig__14(e);
-			Out_Char('.');
-			dig__14(k);
-		} else {
-			seq__16(' ', (n - k) - 3);
-			Out_Char(sign);
-			Out_Char('0');
-			Out_Char('.');
-			seq__16('0', -e);
-			dig__14(k + e);
-		}
-	}
-	RealFix__13_s = _s.lnk;
-}
-
 
 export void *Out__init(void)
 {

+ 1 - 4
data/bin/voc/src/bootstrap/unix-44/Out.h → data/bin/voc/bootstrap/unix-44/Out.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Out__h
 #define Out__h
@@ -10,8 +10,6 @@ import BOOLEAN Out_IsConsole;
 
 
 import void Out_Char (CHAR ch);
-import void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len);
-import INT16 Out_Expo (REAL x);
 import void Out_Flush (void);
 import void Out_Hex (INT64 x, INT64 n);
 import void Out_Int (INT64 x, INT64 n);
@@ -19,7 +17,6 @@ import void Out_Ln (void);
 import void Out_LongReal (LONGREAL x, INT16 n);
 import void Out_Open (void);
 import void Out_Real (REAL x, INT16 n);
-import void Out_RealFix (REAL x, INT16 n, INT16 k);
 import void Out_String (CHAR *str, ADDRESS str__len);
 import LONGREAL Out_Ten (INT16 e);
 import void *Out__init(void);

+ 19 - 4
data/bin/voc/src/bootstrap/unix-44/Platform.c → data/bin/voc/bootstrap/unix-44/Platform.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -42,6 +42,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e);
 export BOOLEAN Platform_Interrupted (INT16 e);
 export BOOLEAN Platform_IsConsole (INT32 h);
 export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
+export INT16 Platform_MaxNameLength (void);
+export INT16 Platform_MaxPathLength (void);
 export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
 export BOOLEAN Platform_NoSuchDirectory (INT16 e);
 export INT32 Platform_OSAllocate (INT32 size);
@@ -79,6 +81,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS
 #include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #define Platform_EACCES()	EACCES
@@ -94,6 +97,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS
 #define Platform_EROFS()	EROFS
 #define Platform_ETIMEDOUT()	ETIMEDOUT
 #define Platform_EXDEV()	EXDEV
+#define Platform_NAMEMAX()	NAME_MAX
+#define Platform_PATHMAX()	PATH_MAX
 #define Platform_allocate(size)	(ADDRESS)((void*)malloc((size_t)size))
 #define Platform_chdir(n, n__len)	chdir((char*)n)
 #define Platform_closefile(fd)	close(fd)
@@ -178,6 +183,16 @@ BOOLEAN Platform_Interrupted (INT16 e)
 	return e == Platform_EINTR();
 }
 
+INT16 Platform_MaxNameLength (void)
+{
+	return Platform_NAMEMAX();
+}
+
+INT16 Platform_MaxPathLength (void)
+{
+	return Platform_PATHMAX();
+}
+
 INT32 Platform_OSAllocate (INT32 size)
 {
 	return Platform_allocate(size);
@@ -189,13 +204,13 @@ void Platform_OSFree (INT32 address)
 }
 
 typedef
-	CHAR (*EnvPtr__78)[1024];
+	CHAR (*EnvPtr__83)[1024];
 
 BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len)
 {
-	EnvPtr__78 p = NIL;
+	EnvPtr__83 p = NIL;
 	__DUP(var, var__len, CHAR);
-	p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len);
+	p = (EnvPtr__83)(ADDRESS)Platform_getenv(var, var__len);
 	if (p != NIL) {
 		__COPY(*p, val, val__len);
 	}

+ 3 - 1
data/bin/voc/src/bootstrap/unix-48/Platform.h → data/bin/voc/bootstrap/unix-44/Platform.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Platform__h
 #define Platform__h
@@ -40,6 +40,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e);
 import BOOLEAN Platform_Interrupted (INT16 e);
 import BOOLEAN Platform_IsConsole (INT32 h);
 import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
+import INT16 Platform_MaxNameLength (void);
+import INT16 Platform_MaxPathLength (void);
 import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
 import BOOLEAN Platform_NoSuchDirectory (INT16 e);
 import INT32 Platform_OSAllocate (INT32 size);

+ 10 - 10
data/bin/voc/src/bootstrap/unix-44/Reals.c → data/bin/voc/bootstrap/unix-44/Reals.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex)
 {
 	CHAR c;
 	__GET((ADDRESS)x + 3, c, CHAR);
-	__PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
+	__PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
 	__GET((ADDRESS)x + 2, c, CHAR);
-	__PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
+	__PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
 }
 
 INT16 Reals_ExpoL (LONGREAL x)
@@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len)
 	}
 	k = 0;
 	if (n > 9) {
-		i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
-		j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000);
+		i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL);
+		j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL);
 		if (j < 0) {
 			j = 0;
 		}
 		while (k < 9) {
-			d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48);
+			d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48);
 			j = __DIV(j, 10);
 			k += 1;
 		}
 	} else {
-		i = (INT32)__ENTIER(x);
+		i = __SHORT(__ENTIER(x), 2147483648LL);
 	}
 	while (k < n) {
-		d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48);
+		d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48);
 		i = __DIV(i, 10);
 		k += 1;
 	}
@@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len)
 static CHAR Reals_ToHex (INT16 i)
 {
 	if (i < 10) {
-		return (CHAR)(i + 48);
+		return __CHR(i + 48);
 	} else {
-		return (CHAR)(i + 55);
+		return __CHR(i + 55);
 	}
 	__RETCHK;
 }

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Reals.h → data/bin/voc/bootstrap/unix-44/Reals.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Reals__h
 #define Reals__h

+ 3 - 3
data/bin/voc/src/bootstrap/unix-88/Strings.c → data/bin/voc/bootstrap/unix-44/Strings.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len)
 	}
 	if (i <= 32767) {
 		__DEL(s);
-		return (INT16)i;
+		return __SHORT(i, 32768);
 	} else {
 		__DEL(s);
 		return 32767;
@@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA
 	INT16 len, destLen, i;
 	__DUP(source, source__len, CHAR);
 	len = Strings_Length(source, source__len);
-	destLen = (INT16)dest__len - 1;
+	destLen = __SHORT(dest__len, 32768) - 1;
 	if (pos < 0) {
 		pos = 0;
 	}

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/Strings.h → data/bin/voc/bootstrap/unix-44/Strings.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Strings__h
 #define Strings__h

+ 14 - 14
data/bin/voc/src/bootstrap/unix-44/Texts.c → data/bin/voc/bootstrap/unix-44/Texts.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ)
 				if ('9' < ch) {
 					if (('A' <= ch && ch <= 'F')) {
 						hex = 1;
-						ch = (CHAR)((INT16)ch - 7);
+						ch = __CHR((INT16)ch - 7);
 					} else if (('a' <= ch && ch <= 'f')) {
 						hex = 1;
-						ch = (CHAR)((INT16)ch - 39);
+						ch = __CHR((INT16)ch - 39);
 					} else {
 						break;
 					}
@@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n)
 		x0 = x;
 	}
 	do {
-		a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48);
+		a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48);
 		x0 = __DIV(x0, 10);
 		i += 1;
 	} while (!(x0 == 0));
@@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x)
 	do {
 		y = __MASK(x, -16);
 		if (y < 10) {
-			a[__X(i, 20)] = (CHAR)(y + 48);
+			a[__X(i, 20)] = __CHR(y + 48);
 		} else {
-			a[__X(i, 20)] = (CHAR)(y + 55);
+			a[__X(i, 20)] = __CHR(y + 55);
 		}
 		x = __ASHR(x, 4);
 		i += 1;
@@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, '+');
 		}
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48));
-		Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48));
 	}
 }
 
@@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, ' ');
 		}
-		e = (INT16)__ASHR((e - 1023) * 77, 8);
+		e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768);
 		if (e >= 0) {
 			x = x / (LONGREAL)Reals_TenL(e);
 		} else {
@@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, '+');
 		}
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48));
 		e = (int)__MOD(e, 100);
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48));
-		Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48));
 	}
 }
 
@@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x);
 static void WritePair__44 (CHAR ch, INT32 x)
 {
 	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch);
-	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48));
-	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48));
+	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48));
+	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48));
 }
 
 void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d)

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Texts.h → data/bin/voc/bootstrap/unix-44/Texts.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Texts__h
 #define Texts__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-44/VT100.c → data/bin/voc/bootstrap/unix-44/VT100.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len)
 		}
 		e = s;
 		do {
-			b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48);
+			b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48);
 			int_ = __DIV(int_, 10);
 			e += 1;
 		} while (!(int_ == 0));

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/VT100.h → data/bin/voc/bootstrap/unix-44/VT100.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef VT100__h
 #define VT100__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-88/extTools.c → data/bin/voc/bootstrap/unix-44/extTools.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati
 		Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096);
 		Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096);
-		Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096);
+		Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096);
 		Strings_Append(OPM_Model, 10, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"", 1, (void*)cmd, 4096);

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/extTools.h → data/bin/voc/bootstrap/unix-44/extTools.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef extTools__h
 #define extTools__h

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Compiler.c → data/bin/voc/bootstrap/unix-48/Compiler.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 2 - 2
data/bin/voc/src/bootstrap/unix-88/Configuration.c → data/bin/voc/bootstrap/unix-48/Configuration.c

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

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/Configuration.h → data/bin/voc/bootstrap/unix-48/Configuration.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Configuration__h
 #define Configuration__h

+ 110 - 108
data/bin/voc/src/bootstrap/unix-48/Files.c → data/bin/voc/bootstrap/unix-48/Files.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -26,7 +26,7 @@ typedef
 	Files_BufDesc *Files_Buffer;
 
 typedef
-	CHAR Files_FileName[101];
+	CHAR Files_FileName[256];
 
 typedef
 	struct Files_FileDesc {
@@ -48,6 +48,7 @@ typedef
 	} Files_Rider;
 
 
+export INT16 Files_MaxPathLength, Files_MaxNameLength;
 static Files_FileDesc *Files_files;
 static INT16 Files_tempno;
 static CHAR Files_HOME[1024];
@@ -129,17 +130,17 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 	Out_String((CHAR*)": ", 3);
 	if (f != NIL) {
 		if (f->registerName[0] != 0x00) {
-			Out_String(f->registerName, 101);
+			Out_String(f->registerName, 256);
 		} else {
-			Out_String(f->workName, 101);
+			Out_String(f->workName, 256);
 		}
 		if (f->fd != 0) {
-			Out_String((CHAR*)"f.fd = ", 8);
+			Out_String((CHAR*)", f.fd = ", 10);
 			Out_Int(f->fd, 1);
 		}
 	}
 	if (errcode != 0) {
-		Out_String((CHAR*)" errcode = ", 12);
+		Out_String((CHAR*)", errcode = ", 13);
 		Out_Int(errcode, 1);
 	}
 	Out_Ln();
@@ -149,76 +150,75 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 
 static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len)
 {
-	INT16 i, j;
+	INT16 i, j, ld, ln;
 	__DUP(dir, dir__len, CHAR);
 	__DUP(name, name__len, CHAR);
+	ld = Strings_Length(dir, dir__len);
+	ln = Strings_Length(name, name__len);
+	while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) {
+		ld -= 1;
+	}
+	if (((ld + ln) + 2) > dest__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
 	i = 0;
-	j = 0;
-	while (dir[i] != 0x00) {
-		dest[i] = dir[i];
+	while (i < ld) {
+		dest[__X(i, dest__len)] = dir[__X(i, dir__len)];
 		i += 1;
 	}
-	if (dest[i - 1] != '/') {
-		dest[i] = '/';
+	if (i > 0) {
+		dest[__X(i, dest__len)] = '/';
 		i += 1;
 	}
-	while (name[j] != 0x00) {
-		dest[i] = name[j];
+	j = 0;
+	while (j < ln) {
+		dest[__X(i, dest__len)] = name[__X(j, name__len)];
 		i += 1;
 		j += 1;
 	}
-	dest[i] = 0x00;
+	dest[__X(i, dest__len)] = 0x00;
 	__DEL(dir);
 	__DEL(name);
 }
 
 static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len)
 {
-	INT32 n, i, j;
+	INT16 i, n;
 	__DUP(finalName, finalName__len, CHAR);
-	Files_tempno += 1;
-	n = Files_tempno;
-	i = 0;
-	if (finalName[0] != '/') {
-		while (Platform_CWD[i] != 0x00) {
-			name[i] = Platform_CWD[i];
-			i += 1;
-		}
-		if (Platform_CWD[i - 1] != '/') {
-			name[i] = '/';
-			i += 1;
-		}
-	}
-	j = 0;
-	while (finalName[j] != 0x00) {
-		name[i] = finalName[j];
-		i += 1;
-		j += 1;
+	if (finalName[0] == '/') {
+		__COPY(finalName, name, name__len);
+	} else {
+		Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len);
 	}
-	i -= 1;
-	while (name[i] != '/') {
+	i = Strings_Length(name, name__len) - 1;
+	while ((i > 0 && name[__X(i, name__len)] != '/')) {
 		i -= 1;
 	}
-	name[i + 1] = '.';
-	name[i + 2] = 't';
-	name[i + 3] = 'm';
-	name[i + 4] = 'p';
-	name[i + 5] = '.';
+	if ((i + 16) >= name__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
+	Files_tempno += 1;
+	n = Files_tempno;
+	name[__X(i + 1, name__len)] = '.';
+	name[__X(i + 2, name__len)] = 't';
+	name[__X(i + 3, name__len)] = 'm';
+	name[__X(i + 4, name__len)] = 'p';
+	name[__X(i + 5, name__len)] = '.';
 	i += 6;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = '.';
+	name[__X(i, name__len)] = '.';
 	i += 1;
 	n = Platform_PID;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = 0x00;
+	name[__X(i, name__len)] = 0x00;
 	__DEL(finalName);
 }
 
@@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
 		if (osfile != NIL) {
 			__ASSERT(!osfile->tempFile, 0);
 			__ASSERT(osfile->fd >= 0, 0);
-			__MOVE(osfile->workName, osfile->registerName, 101);
-			Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101);
+			__MOVE(osfile->workName, osfile->registerName, 256);
+			Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256);
 			osfile->tempFile = 1;
 			osfile->state = 0;
-			error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101);
+			error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256);
 			if (error != 0) {
 				Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
 			}
@@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
 	CHAR err[32];
 	if (f->fd == -1) {
 		if (f->state == 1) {
-			Files_GetTempName(f->registerName, 101, (void*)f->workName, 101);
+			Files_GetTempName(f->registerName, 256, (void*)f->workName, 256);
 			f->tempFile = 1;
 		} else {
 			__ASSERT(f->state == 2, 0);
-			Files_Deregister(f->registerName, 101);
-			__MOVE(f->registerName, f->workName, 101);
+			Files_Deregister(f->registerName, 256);
+			__MOVE(f->registerName, f->workName, 256);
 			f->registerName[0] = 0x00;
 			f->tempFile = 0;
 		}
-		error = Platform_Unlink((void*)f->workName, 101);
-		error = Platform_New((void*)f->workName, 101, &f->fd);
+		error = Platform_Unlink((void*)f->workName, 256);
+		error = Platform_New((void*)f->workName, 256, &f->fd);
 		done = error == 0;
 		if (done) {
 			f->next = Files_files;
@@ -319,8 +319,8 @@ void Files_Close (Files_File f)
 	if (f->state != 1 || f->registerName[0] != 0x00) {
 		Files_Create(f);
 		i = 0;
-		while ((i < 4 && f->bufs[i] != NIL)) {
-			Files_Flush(f->bufs[i]);
+		while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) {
+			Files_Flush(f->bufs[__X(i, 4)]);
 			i += 1;
 		}
 	}
@@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
 	__DUP(name, name__len, CHAR);
 	__NEW(f, Files_FileDesc);
 	f->workName[0] = 0x00;
-	__COPY(name, f->registerName, 101);
+	__COPY(name, f->registerName, 256);
 	f->fd = -1;
 	f->state = 1;
 	f->len = 0;
@@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len)
 			*pos += 1;
 		}
 	} else {
-		ch = (Files_SearchPath->data)[*pos];
+		ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		while (ch == ' ' || ch == ';') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
 		if (ch == '~') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
-			while (Files_HOME[i] != 0x00) {
-				dir[i] = Files_HOME[i];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
+			while (Files_HOME[__X(i, 1024)] != 0x00) {
+				dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)];
 				i += 1;
 			}
 			if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) {
-				while ((i > 0 && dir[i - 1] != '/')) {
+				while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) {
 					i -= 1;
 				}
 			}
 		}
 		while ((ch != 0x00 && ch != ';')) {
-			dir[i] = ch;
+			dir[__X(i, dir__len)] = ch;
 			i += 1;
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
-		while ((i > 0 && dir[i - 1] == ' ')) {
+		while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) {
 			i -= 1;
 		}
 	}
-	dir[i] = 0x00;
+	dir[__X(i, dir__len)] = 0x00;
 }
 
 static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
@@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
 	ch = name[0];
 	while ((ch != 0x00 && ch != '/')) {
 		i += 1;
-		ch = name[i];
+		ch = name[__X(i, name__len)];
 	}
 	return ch == '/';
 }
@@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity)
 			if (!Platform_SameFileTime(identity, f->identity)) {
 				i = 0;
 				while (i < 4) {
-					if (f->bufs[i] != NIL) {
-						f->bufs[i]->org = -1;
-						f->bufs[i] = NIL;
+					if (f->bufs[__X(i, 4)] != NIL) {
+						f->bufs[__X(i, 4)]->org = -1;
+						f->bufs[__X(i, 4)] = NIL;
 					}
 					i += 1;
 				}
@@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
 					f->pos = 0;
 					f->swapper = -1;
 					error = Platform_Size(fd, &f->len);
-					__COPY(name, f->workName, 101);
+					__COPY(name, f->workName, 256);
 					f->registerName[0] = 0x00;
 					f->tempFile = 0;
 					f->identity = identity;
@@ -514,9 +514,9 @@ void Files_Purge (Files_File f)
 	INT16 error;
 	i = 0;
 	while (i < 4) {
-		if (f->bufs[i] != NIL) {
-			f->bufs[i]->org = -1;
-			f->bufs[i] = NIL;
+		if (f->bufs[__X(i, 4)] != NIL) {
+			f->bufs[__X(i, 4)]->org = -1;
+			f->bufs[__X(i, 4)] = NIL;
 		}
 		i += 1;
 	}
@@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
 		offset = __MASK(pos, -4096);
 		org = pos - offset;
 		i = 0;
-		while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) {
+		while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) {
 			i += 1;
 		}
 		if (i < 4) {
-			if (f->bufs[i] == NIL) {
+			if (f->bufs[__X(i, 4)] == NIL) {
 				__NEW(buf, Files_BufDesc);
 				buf->chg = 0;
 				buf->org = -1;
 				buf->f = f;
-				f->bufs[i] = buf;
+				f->bufs[__X(i, 4)] = buf;
 			} else {
-				buf = f->bufs[i];
+				buf = f->bufs[__X(i, 4)];
 			}
 		} else {
 			f->swapper = __MASK(f->swapper + 1, -4);
-			buf = f->bufs[f->swapper];
+			buf = f->bufs[__X(f->swapper, 4)];
 			Files_Flush(buf);
 		}
 		if (buf->org != org) {
@@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
 	}
 	Files_Assert(offset <= buf->size);
 	if (offset < buf->size) {
-		*x = buf->data[offset];
+		*x = buf->data[__X(offset, 4096)];
 		(*r).offset = offset + 1;
 	} else if ((*r).org + offset < buf->f->len) {
 		Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset);
@@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min);
+		__MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min);
 		offset += min;
 		(*r).offset = offset;
 		xpos += min;
@@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
 		offset = (*r).offset;
 	}
 	Files_Assert(offset < 4096);
-	buf->data[offset] = x;
+	buf->data[__X(offset, 4096)] = x;
 	buf->chg = 1;
 	if (offset == buf->size) {
 		buf->size += 1;
@@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min);
+		__MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min);
 		offset += min;
 		(*r).offset = offset;
 		Files_Assert(offset <= 4096);
@@ -817,12 +817,12 @@ void Files_Register (Files_File f)
 	}
 	Files_Close(f);
 	if (f->registerName[0] != 0x00) {
-		Files_Deregister(f->registerName, 101);
-		Files_Rename(f->workName, 101, f->registerName, 101, &errcode);
+		Files_Deregister(f->registerName, 256);
+		Files_Rename(f->workName, 256, f->registerName, 256, &errcode);
 		if (errcode != 0) {
 			Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
 		}
-		__MOVE(f->registerName, f->workName, 101);
+		__MOVE(f->registerName, f->workName, 256);
 		f->registerName[0] = 0x00;
 		f->tempFile = 0;
 	}
@@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de
 		j = 0;
 		while (i > 0) {
 			i -= 1;
-			dest[j] = src[i];
+			dest[__X(j, dest__len)] = src[__X(i, src__len)];
 			j += 1;
 		}
 	} else {
@@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	i = 0;
 	do {
 		Files_Read(&*R, R__typ, (void*)&ch);
-		x[i] = ch;
+		x[__X(i, x__len)] = ch;
 		i += 1;
 	} while (!(ch == 0x00));
 }
@@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	INT16 i;
 	i = 0;
 	do {
-		Files_Read(&*R, R__typ, (void*)&x[i]);
+		Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]);
 		i += 1;
-	} while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a));
-	if (x[i - 1] == 0x0a) {
+	} while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a));
+	if (x[__X(i - 1, x__len)] == 0x0a) {
 		i -= 1;
 	}
-	if ((i > 0 && x[i - 1] == 0x0d)) {
+	if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) {
 		i -= 1;
 	}
-	x[i] = 0x00;
+	x[__X(i, x__len)] = 0x00;
 }
 
 void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len)
@@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x)
 void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x)
 {
 	CHAR b[2];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2);
 }
 
 void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x)
 {
 	CHAR b[4];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
-	b[2] = (CHAR)__ASHR(x, 16);
-	b[3] = (CHAR)__ASHR(x, 24);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
+	b[2] = __CHR(__ASHR(x, 16));
+	b[3] = __CHR(__ASHR(x, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x)
 	CHAR b[4];
 	INT32 i;
 	i = (INT32)x;
-	b[0] = (CHAR)i;
-	b[1] = (CHAR)__ASHR(i, 8);
-	b[2] = (CHAR)__ASHR(i, 16);
-	b[3] = (CHAR)__ASHR(i, 24);
+	b[0] = __CHR(i);
+	b[1] = __CHR(__ASHR(i, 8));
+	b[2] = __CHR(__ASHR(i, 16));
+	b[3] = __CHR(__ASHR(i, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 {
 	INT16 i;
 	i = 0;
-	while (x[i] != 0x00) {
+	while (x[__X(i, x__len)] != 0x00) {
 		i += 1;
 	}
 	Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1);
@@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x)
 {
 	while (x < -64 || x > 63) {
-		Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128));
+		Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128));
 		x = __ASHR(x, 7);
 	}
-	Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128));
+	Files_Write(&*R, R__typ, __CHR(__MASK(x, -128)));
 }
 
 void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len)
@@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
 	if (f->fd >= 0) {
 		Files_CloseOSFile(f);
 		if (f->tempFile) {
-			res = Platform_Unlink((void*)f->workName, 101);
+			res = Platform_Unlink((void*)f->workName, 256);
 		}
 	}
 }
@@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
 	P(Files_SearchPath);
 }
 
-__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 252), {228, 232, 236, 240, -20}};
+__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 564), {540, 544, 548, 552, -20}};
 __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4112), {0, -8}};
 __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 20), {8, -8}};
 
@@ -1083,5 +1083,7 @@ export void *Files__init(void)
 	Heap_FileCount = 0;
 	Files_HOME[0] = 0x00;
 	Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024);
+	Files_MaxPathLength = Platform_MaxPathLength();
+	Files_MaxNameLength = Platform_MaxNameLength();
 	__ENDMOD;
 }

+ 3 - 2
data/bin/voc/src/bootstrap/unix-48/Files.h → data/bin/voc/bootstrap/unix-48/Files.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Files__h
 #define Files__h
@@ -11,7 +11,7 @@ typedef
 typedef
 	struct Files_FileDesc {
 		INT32 _prvt0;
-		char _prvt1[248];
+		char _prvt1[560];
 	} Files_FileDesc;
 
 typedef
@@ -22,6 +22,7 @@ typedef
 	} Files_Rider;
 
 
+import INT16 Files_MaxPathLength, Files_MaxNameLength;
 
 import ADDRESS *Files_FileDesc__typ;
 import ADDRESS *Files_Rider__typ;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/Heap.c → data/bin/voc/bootstrap/unix-48/Heap.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/Heap.h → data/bin/voc/bootstrap/unix-48/Heap.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #ifndef Heap__h
 #define Heap__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-48/Modules.c → data/bin/voc/bootstrap/unix-48/Modules.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -404,7 +404,7 @@ static void Modules_errint (INT32 l)
 	if (l >= 10) {
 		Modules_errint(__DIV(l, 10));
 	}
-	Modules_errch((CHAR)((int)__MOD(l, 10) + 48));
+	Modules_errch(__CHR((int)__MOD(l, 10) + 48));
 }
 
 static void Modules_DisplayHaltCode (INT32 code)

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/Modules.h → data/bin/voc/bootstrap/unix-48/Modules.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Modules__h
 #define Modules__h

+ 44 - 54
data/bin/voc/src/bootstrap/unix-88/OPB.c → data/bin/voc/bootstrap/unix-48/OPB.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n)
 {
 	CHAR ch;
 	n->typ = OPT_stringtyp;
-	ch = (CHAR)n->conval->intval;
+	ch = __CHR(n->conval->intval);
 	n->conval->ext = OPT_NewExt();
 	if (ch == 0x00) {
 		n->conval->intval2 = 1;
@@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x)
 			case 22: 
 				if (f == 3) {
 					if (z->class == 7) {
-						z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval);
+						z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval));
 						z->obj = NIL;
 					} else {
 						z = NewOp__29(op, typ, z);
@@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ)
 					OPB_err(203);
 					r = (LONGREAL)1;
 				}
-				(*x)->conval->intval = (INT32)__ENTIER(r);
+				(*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL);
 				OPB_SetIntType(*x);
 			}
 		}
@@ -1738,16 +1738,6 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 			}
 			x->typ = OPT_linttyp;
 			break;
-		case 12: 
-			if (x->class == 8 || x->class == 9) {
-				OPB_err(126);
-			} else if (__IN(f, 0x60, 32)) {
-				OPB_Convert(&x, OPT_inttyp);
-			} else {
-				OPB_err(111);
-			}
-			x->typ = OPT_inttyp;
-			break;
 		case 6: 
 			OPB_MOp(23, &x);
 			break;
@@ -1857,7 +1847,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 14: case 15: 
+		case 13: case 14: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f != 4) {
@@ -1866,7 +1856,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (x->typ->form != 7) {
@@ -1876,12 +1866,12 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 18: 
+		case 17: 
 			if (!__IN(x->typ->comp, 0x0c, 32)) {
 				OPB_err(131);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if ((x->class == 7 && f == 3)) {
 				OPB_CharToString(x);
 				f = 8;
@@ -1892,7 +1882,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -1904,11 +1894,11 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_linttyp;
 			}
 			break;
-		case 21: 
+		case 20: 
 			OPB_CheckLeaf(x, 0);
 			OPB_MOp(24, &x);
 			break;
-		case 13: 
+		case 12: 
 			if (x->class != 8) {
 				OPB_err(110);
 				x = OPB_NewIntConst(1);
@@ -1921,17 +1911,17 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x = OPB_NewIntConst(1);
 			}
 			break;
-		case 22: 
+		case 21: 
 			OPB_MOp(25, &x);
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (!__IN(f, 0x9a, 32)) {
 				OPB_err(111);
 			}
 			break;
-		case 25: case 26: case 29: case 32: 
+		case 24: case 25: case 28: case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -1941,7 +1931,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_adrtyp;
 			}
 			break;
-		case 27: case 28: 
+		case 26: case 27: 
 			if ((f == 4 && x->class == 7)) {
 				if (x->conval->intval < 0 || x->conval->intval > -1) {
 					OPB_err(220);
@@ -1950,14 +1940,14 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(69);
 			}
 			break;
-		case 30: 
+		case 29: 
 			if (x->class != 8) {
 				OPB_err(110);
 			} else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) {
 				OPB_err(111);
 			}
 			break;
-		case 31: 
+		case 30: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f == 11) {
@@ -1965,7 +1955,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 33: 
+		case 32: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				x = OPB_NewBoolConst(0);
@@ -2012,7 +2002,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 	p = *par0;
 	f = x->typ->form;
 	switch (fctno) {
-		case 14: case 15: 
+		case 13: case 14: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				p->typ = OPT_notyp;
@@ -2028,7 +2018,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = OPT_notyp;
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2041,7 +2031,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 18: 
+		case 17: 
 			if (!(f == 4) || x->class != 7) {
 				OPB_err(69);
 			} else if (x->typ->size == 1) {
@@ -2072,7 +2062,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(132);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) {
@@ -2082,13 +2072,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				t = x;
 				x = p;
 				p = t;
-				p = NewOp__54(19, 19, p, x);
+				p = NewOp__54(19, 18, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2132,13 +2122,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(64);
 			}
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f != 4) {
 				OPB_err(111);
 			} else {
-				if (fctno == 23) {
+				if (fctno == 22) {
 					p = NewOp__54(12, 27, p, x);
 				} else {
 					p = NewOp__54(12, 28, p, x);
@@ -2146,11 +2136,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = p->left->typ;
 			}
 			break;
-		case 25: case 26: case 27: case 28: 
+		case 24: case 25: case 26: case 27: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (__IN(f, 0x18ff, 32)) {
-				if (fctno == 25 || fctno == 27) {
+				if (fctno == 24 || fctno == 26) {
 					if (OPB_NotVar(x)) {
 						OPB_err(112);
 					}
@@ -2164,7 +2154,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 29: 
+		case 28: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2174,7 +2164,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_booltyp;
 			break;
-		case 30: 
+		case 29: 
 			if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) {
 				OPB_err(126);
 			}
@@ -2194,17 +2184,17 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p = x;
 			break;
-		case 31: 
+		case 30: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
-				p = NewOp__54(19, 31, p, x);
+				p = NewOp__54(19, 30, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 32: 
+		case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -2215,7 +2205,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->link = x;
 			break;
-		case 33: 
+		case 32: 
 			if ((f == 4 && x->class == 7)) {
 				if ((0 <= x->conval->intval && x->conval->intval <= 255)) {
 					OPB_BindNodes(28, OPT_notyp, &x, x);
@@ -2230,7 +2220,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 					} else if (p->class == 28) {
 						OPB_err(99);
 					} else {
-						p->subcl = 33;
+						p->subcl = 32;
 					}
 				} else {
 					OPB_err(218);
@@ -2272,12 +2262,12 @@ void OPB_StParN (OPT_Node *par0, OPT_Node x, INT16 fctno, INT16 n)
 		} else {
 			OPB_err(111);
 		}
-	} else if ((fctno == 32 && n == 2)) {
+	} else if ((fctno == 31 && n == 2)) {
 		if (x->class == 8 || x->class == 9) {
 			OPB_err(126);
 		} else if (f == 4) {
 			node = OPT_NewNode(19);
-			node->subcl = 32;
+			node->subcl = 31;
 			node->right = p;
 			node->left = p->link;
 			p->link = x;
@@ -2297,22 +2287,22 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 	INT16 dim;
 	OPT_Node x = NIL, p = NIL;
 	p = *par0;
-	if (fctno <= 20) {
+	if (fctno <= 19) {
 		if ((fctno == 1 && p->typ != OPT_notyp)) {
 			if (p->typ->comp == 3) {
 				OPB_err(65);
 			}
 			p->typ = OPT_notyp;
-		} else if (fctno <= 13) {
+		} else if (fctno <= 12) {
 			if (parno < 1) {
 				OPB_err(65);
 			}
 		} else {
-			if (((fctno == 14 || fctno == 15) && parno == 1)) {
+			if (((fctno == 13 || fctno == 14) && parno == 1)) {
 				OPB_BindNodes(19, OPT_notyp, &p, OPB_NewIntConst(1));
 				p->subcl = fctno;
 				p->right->typ = p->left->typ;
-			} else if ((fctno == 18 && parno == 1)) {
+			} else if ((fctno == 17 && parno == 1)) {
 				if (p->typ->comp == 3) {
 					dim = 0;
 					while (p->class == 4) {
@@ -2328,7 +2318,7 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 				OPB_err(65);
 			}
 		}
-	} else if (fctno == 33) {
+	} else if (fctno == 32) {
 		if (parno == 1) {
 			x = NIL;
 			OPB_BindNodes(28, OPT_notyp, &x, OPB_NewIntConst(0));
@@ -2343,13 +2333,13 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 			} else if (p->class == 28) {
 				OPB_err(99);
 			} else {
-				p->subcl = 33;
+				p->subcl = 32;
 			}
 		} else if (parno < 1) {
 			OPB_err(65);
 		}
 	} else {
-		if ((parno < 1 || (fctno > 22 && parno < 2)) || (fctno == 32 && parno < 3)) {
+		if ((parno < 1 || (fctno > 21 && parno < 2)) || (fctno == 31 && parno < 3)) {
 			OPB_err(65);
 		}
 	}

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/OPB.h → data/bin/voc/bootstrap/unix-48/OPB.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPB__h
 #define OPB__h

+ 16 - 10
data/bin/voc/src/bootstrap/unix-48/OPC.c → data/bin/voc/bootstrap/unix-48/OPC.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str)
 					OPC_DefineType(str->BaseTyp);
 				}
 			} else if (__IN(str->comp, 0x0c, 32)) {
+				if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) {
+					OPM_Mark(244, str->txtpos);
+					str->BaseTyp->strobj->linkadr = 2;
+				}
 				OPC_DefineType(str->BaseTyp);
 			} else if (str->form == 12) {
 				if (str->BaseTyp != OPT_notyp) {
@@ -1739,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c)
 		if ((c == 92 || c == 39) || c == 63) {
 			OPM_Write('\\');
 		}
-		OPM_Write((CHAR)c);
+		OPM_Write(__CHR(c));
 		OPM_Write('\'');
 	}
 }
@@ -1755,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l)
 		c = (INT16)s[__X(i, s__len)];
 		if (c < 32 || c > 126) {
 			OPM_Write('\\');
-			OPM_Write((CHAR)(48 + __ASHR(c, 6)));
+			OPM_Write(__CHR(48 + __ASHR(c, 6)));
 			c = __MASK(c, -64);
-			OPM_Write((CHAR)(48 + __ASHR(c, 3)));
+			OPM_Write(__CHR(48 + __ASHR(c, 3)));
 			c = __MASK(c, -8);
-			OPM_Write((CHAR)(48 + c));
+			OPM_Write(__CHR(48 + c));
 		} else {
 			if ((c == 92 || c == 34) || c == 63) {
 				OPM_Write('\\');
 			}
-			OPM_Write((CHAR)c);
+			OPM_Write(__CHR(c));
 		}
 		i += 1;
 	}
@@ -1830,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size)
 
 void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 {
+	INT64 d;
+	d = dim;
+	while (d > 0) {
+		array = array->BaseTyp;
+		d -= 1;
+	}
 	if (array->comp == 3) {
 		OPC_CompleteIdent(obj);
 		OPM_WriteString((CHAR*)"__len", 6);
@@ -1837,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 			OPM_WriteInt(dim);
 		}
 	} else {
-		while (dim > 0) {
-			array = array->BaseTyp;
-			dim -= 1;
-		}
 		OPM_WriteInt(array->n);
 	}
 }

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPC.h → data/bin/voc/bootstrap/unix-48/OPC.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPC__h
 #define OPC__h

+ 49 - 23
data/bin/voc/src/bootstrap/unix-44/OPM.c → data/bin/voc/bootstrap/unix-48/OPM.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos)
 	if (pos >= (INT64)OPM_ErrorLineLimitPos) {
 		pos = OPM_ErrorLineLimitPos - 1;
 	}
-	i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos);
+	i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768);
 	while (i > 0) {
 		OPM_LogW(' ');
 		i -= 1;
@@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i)
 {
 	CHAR s[3];
 	INT32 digit;
-	digit = __ASHR((INT32)i, 4);
+	digit = __ASHR(__SHORT(i, 2147483648LL), 4);
 	if (digit < 10) {
-		s[0] = (CHAR)(48 + digit);
+		s[0] = __CHR(48 + digit);
 	} else {
-		s[0] = (CHAR)(87 + digit);
+		s[0] = __CHR(87 + digit);
 	}
-	digit = __MASK((INT32)i, -16);
+	digit = __MASK(__SHORT(i, 2147483648LL), -16);
 	if (digit < 10) {
-		s[1] = (CHAR)(48 + digit);
+		s[1] = __CHR(48 + digit);
 	} else {
-		s[1] = (CHAR)(87 + digit);
+		s[1] = __CHR(87 + digit);
 	}
 	s[2] = 0x00;
 	OPM_WriteString(s, 3);
@@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i)
 			__MOVE("LL", s, 3);
 			k = 2;
 		}
-		s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+		s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 		i1 = __DIV(i1, 10);
 		k += 1;
 		while (i1 > 0) {
-			s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+			s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 			i1 = __DIV(i1, 10);
 			k += 1;
 		}
@@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx)
 	CHAR s[32];
 	CHAR ch;
 	INT16 i;
-	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) {
+	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) {
 		if (suffx == 'f') {
 			OPM_WriteString((CHAR*)"(REAL)", 7);
 		} else {
 			OPM_WriteString((CHAR*)"(LONGREAL)", 11);
 		}
-		OPM_WriteInt((INT32)__ENTIER(r));
+		OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL));
 	} else {
 		Texts_OpenWriter(&W, Texts_Writer__typ);
 		if (suffx == 'f') {
@@ -1050,27 +1050,53 @@ static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len)
 {
 	CHAR testpath[4096];
 	Platform_FileIdentity identity;
-	BOOLEAN result;
 	__DUP(s, s__len, CHAR);
 	__COPY(OPM_InstallDir, testpath, 4096);
-	Strings_Append((CHAR*)"/voc.exe", 9, (void*)testpath, 4096);
-	result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
-	if (!result) {
-		__COPY(OPM_InstallDir, testpath, 4096);
-		Strings_Append((CHAR*)"/voc", 5, (void*)testpath, 4096);
-		result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
+	Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
 	}
 	__DEL(s);
-	return result;
+	return 1;
 }
 
 static void OPM_FindInstallDir (void)
 {
+	INT16 i;
+	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024);
+	if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+		return;
+	}
 	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
-	if (!OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
-		__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	i = Strings_Length(OPM_InstallDir, 1024);
+	while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) {
+		i -= 1;
+	}
+	if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) {
+		OPM_InstallDir[__X(i - 1, 1024)] = 0x00;
+		if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+			return;
+		}
 	}
-	__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	__COPY("", OPM_InstallDir, 1024);
 }
 
 static void EnumPtrs(void (*P)(void*))

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/OPM.h → data/bin/voc/bootstrap/unix-48/OPM.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPM__h
 #define OPM__h

+ 7 - 7
data/bin/voc/src/bootstrap/unix-48/OPP.c → data/bin/voc/bootstrap/unix-48/OPP.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	OPT_Node y = NIL;
 	INT8 m;
 	INT16 n;
-	m = (INT8)((INT16)(*x)->obj->adr);
+	m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128);
 	n = 0;
 	if (OPP_sym == 30) {
 		OPS_Get(&OPP_sym);
@@ -669,7 +669,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	} else {
 		OPP_err(30);
 	}
-	if ((OPP_level > 0 && (m == 1 || m == 31))) {
+	if ((OPP_level > 0 && (m == 1 || m == 30))) {
 		OPT_topScope->link->leaf = 0;
 	}
 }
@@ -943,7 +943,7 @@ static void GetCode__19 (void)
 			(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)];
 			n += 1;
 		}
-		(*ext)[0] = (CHAR)n;
+		(*ext)[0] = __CHR(n);
 		OPS_Get(&OPP_sym);
 	} else {
 		for (;;) {
@@ -956,14 +956,14 @@ static void GetCode__19 (void)
 					n = 1;
 				}
 				OPS_Get(&OPP_sym);
-				(*ext)[__X(n, 256)] = (CHAR)c;
+				(*ext)[__X(n, 256)] = __CHR(c);
 			}
 			if (OPP_sym == 19) {
 				OPS_Get(&OPP_sym);
 			} else if (OPP_sym == 35) {
 				OPP_err(19);
 			} else {
-				(*ext)[0] = (CHAR)n;
+				(*ext)[0] = __CHR(n);
 				break;
 			}
 		}
@@ -1501,7 +1501,7 @@ static void OPP_StatSeq (OPT_Node *stat)
 				OPP_CheckSym(27);
 				OPP_StatSeq(&s);
 				y = OPB_NewLeaf(id);
-				OPB_StPar1(&y, z, 14);
+				OPB_StPar1(&y, z, 13);
 				SetPos__35(y);
 				if (s == NIL) {
 					s = y;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/OPP.h → data/bin/voc/bootstrap/unix-48/OPP.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPP__h
 #define OPP__h

+ 10 - 10
data/bin/voc/src/bootstrap/unix-48/OPS.c → data/bin/voc/bootstrap/unix-48/OPS.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym)
 			OPS_err(241);
 			break;
 		}
-		OPS_str[i] = OPS_ch;
+		OPS_str[__X(i, 256)] = OPS_ch;
 		i += 1;
 	}
 	OPM_Get(&OPS_ch);
-	OPS_str[i] = 0x00;
+	OPS_str[__X(i, 256)] = 0x00;
 	OPS_intval = i + 1;
 	if (OPS_intval == 2) {
 		*sym = 35;
@@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym)
 	INT16 i;
 	i = 0;
 	do {
-		OPS_name[i] = OPS_ch;
+		OPS_name[__X(i, 256)] = OPS_ch;
 		i += 1;
 		OPM_Get(&OPS_ch);
 	} while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256));
@@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym)
 		OPS_err(240);
 		i -= 1;
 	}
-	OPS_name[i] = 0x00;
+	OPS_name[__X(i, 256)] = 0x00;
 	*sym = 38;
 }
 
@@ -143,7 +143,7 @@ static void OPS_Number (void)
 		if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) {
 			if (m > 0 || OPS_ch != '0') {
 				if (n < 24) {
-					dig[n] = OPS_ch;
+					dig[__X(n, 24)] = OPS_ch;
 					n += 1;
 				}
 				m += 1;
@@ -173,7 +173,7 @@ static void OPS_Number (void)
 				OPS_numtyp = 1;
 				if (n <= 2) {
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -187,7 +187,7 @@ static void OPS_Number (void)
 						OPS_intval = -1;
 					}
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -196,7 +196,7 @@ static void OPS_Number (void)
 			} else {
 				OPS_numtyp = 2;
 				while (i < n) {
-					d = Ord__7(dig[i], 0);
+					d = Ord__7(dig[__X(i, 24)], 0);
 					i += 1;
 					if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) {
 						OPS_intval = OPS_intval * 10 + (INT64)d;
@@ -214,7 +214,7 @@ static void OPS_Number (void)
 		expCh = 'E';
 		while (n > 0) {
 			n -= 1;
-			f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10;
+			f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10;
 		}
 		if (OPS_ch == 'E' || OPS_ch == 'D') {
 			expCh = OPS_ch;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/OPS.h → data/bin/voc/bootstrap/unix-48/OPS.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPS__h
 #define OPS__h

+ 27 - 28
data/bin/voc/src/bootstrap/unix-48/OPT.c → data/bin/voc/bootstrap/unix-48/OPT.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -352,7 +352,7 @@ void OPT_TypSize (OPT_Struct typ)
 			}
 			typ->size = offset;
 			typ->align = base;
-			typ->sysflag = __MASK(typ->sysflag, -256) + (INT16)__ASHL(offset - off0, 8);
+			typ->sysflag = __MASK(typ->sysflag, -256) + __SHORT(__ASHL(offset - off0, 8), 32768);
 		} else if (c == 2) {
 			OPT_TypSize(typ->BaseTyp);
 			typ->size = typ->n * typ->BaseTyp->size;
@@ -1251,7 +1251,7 @@ static void OPT_InStruct (OPT_Struct *typ)
 		obj->vis = 0;
 		tag = OPM_SymRInt();
 		if (tag == 35) {
-			(*typ)->sysflag = (INT16)OPM_SymRInt();
+			(*typ)->sysflag = __SHORTF(OPM_SymRInt(), 32768);
 			tag = OPM_SymRInt();
 		}
 		switch (tag) {
@@ -1412,8 +1412,8 @@ static OPT_Object OPT_InObj (INT8 mno)
 					obj->mode = 9;
 					ext = OPT_NewExt();
 					obj->conval->ext = ext;
-					s = (INT16)OPM_SymRInt();
-					(*ext)[0] = (CHAR)s;
+					s = __SHORTF(OPM_SymRInt(), 32768);
+					(*ext)[0] = __CHR(s);
 					i = 1;
 					while (i <= s) {
 						OPM_SymRCh(&(*ext)[__X(i, 256)]);
@@ -1752,7 +1752,7 @@ static void OPT_OutConstant (OPT_Object obj)
 	OPM_SymWInt(f);
 	switch (f) {
 		case 2: case 3: 
-			OPM_SymWCh((CHAR)obj->conval->intval);
+			OPM_SymWCh(__CHR(obj->conval->intval));
 			break;
 		case 4: 
 			OPM_SymWInt(obj->conval->intval);
@@ -2098,18 +2098,18 @@ export void *OPT__init(void)
 	OPT_EnterTyp((CHAR*)"INT64", 4, 8, &OPT_int64typ);
 	OPT_EnterTyp((CHAR*)"SET32", 7, 4, &OPT_set32typ);
 	OPT_EnterTyp((CHAR*)"SET64", 7, 8, &OPT_set64typ);
-	OPT_EnterProc((CHAR*)"ADR", 21);
-	OPT_EnterProc((CHAR*)"CC", 22);
-	OPT_EnterProc((CHAR*)"LSH", 23);
-	OPT_EnterProc((CHAR*)"ROT", 24);
-	OPT_EnterProc((CHAR*)"GET", 25);
-	OPT_EnterProc((CHAR*)"PUT", 26);
-	OPT_EnterProc((CHAR*)"GETREG", 27);
-	OPT_EnterProc((CHAR*)"PUTREG", 28);
-	OPT_EnterProc((CHAR*)"BIT", 29);
-	OPT_EnterProc((CHAR*)"VAL", 30);
-	OPT_EnterProc((CHAR*)"NEW", 31);
-	OPT_EnterProc((CHAR*)"MOVE", 32);
+	OPT_EnterProc((CHAR*)"ADR", 20);
+	OPT_EnterProc((CHAR*)"CC", 21);
+	OPT_EnterProc((CHAR*)"LSH", 22);
+	OPT_EnterProc((CHAR*)"ROT", 23);
+	OPT_EnterProc((CHAR*)"GET", 24);
+	OPT_EnterProc((CHAR*)"PUT", 25);
+	OPT_EnterProc((CHAR*)"GETREG", 26);
+	OPT_EnterProc((CHAR*)"PUTREG", 27);
+	OPT_EnterProc((CHAR*)"BIT", 28);
+	OPT_EnterProc((CHAR*)"VAL", 29);
+	OPT_EnterProc((CHAR*)"NEW", 30);
+	OPT_EnterProc((CHAR*)"MOVE", 31);
 	OPT_syslink = OPT_topScope->right;
 	OPT_universe = OPT_topScope;
 	OPT_topScope->right = NIL;
@@ -2131,22 +2131,21 @@ export void *OPT__init(void)
 	OPT_EnterProc((CHAR*)"CAP", 3);
 	OPT_EnterProc((CHAR*)"ORD", 4);
 	OPT_EnterProc((CHAR*)"ENTIER", 5);
-	OPT_EnterProc((CHAR*)"FLOOR", 12);
 	OPT_EnterProc((CHAR*)"ODD", 6);
 	OPT_EnterProc((CHAR*)"MIN", 7);
 	OPT_EnterProc((CHAR*)"MAX", 8);
 	OPT_EnterProc((CHAR*)"CHR", 9);
 	OPT_EnterProc((CHAR*)"SHORT", 10);
 	OPT_EnterProc((CHAR*)"LONG", 11);
-	OPT_EnterProc((CHAR*)"SIZE", 13);
-	OPT_EnterProc((CHAR*)"INC", 14);
-	OPT_EnterProc((CHAR*)"DEC", 15);
-	OPT_EnterProc((CHAR*)"INCL", 16);
-	OPT_EnterProc((CHAR*)"EXCL", 17);
-	OPT_EnterProc((CHAR*)"LEN", 18);
-	OPT_EnterProc((CHAR*)"COPY", 19);
-	OPT_EnterProc((CHAR*)"ASH", 20);
-	OPT_EnterProc((CHAR*)"ASSERT", 33);
+	OPT_EnterProc((CHAR*)"SIZE", 12);
+	OPT_EnterProc((CHAR*)"INC", 13);
+	OPT_EnterProc((CHAR*)"DEC", 14);
+	OPT_EnterProc((CHAR*)"INCL", 15);
+	OPT_EnterProc((CHAR*)"EXCL", 16);
+	OPT_EnterProc((CHAR*)"LEN", 17);
+	OPT_EnterProc((CHAR*)"COPY", 18);
+	OPT_EnterProc((CHAR*)"ASH", 19);
+	OPT_EnterProc((CHAR*)"ASSERT", 32);
 	OPT_impCtxt.ref[0] = OPT_undftyp;
 	OPT_impCtxt.ref[1] = OPT_bytetyp;
 	OPT_impCtxt.ref[2] = OPT_booltyp;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/OPT.h → data/bin/voc/bootstrap/unix-48/OPT.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPT__h
 #define OPT__h

+ 34 - 35
data/bin/voc/src/bootstrap/windows-48/OPV.c → data/bin/voc/bootstrap/unix-48/OPV.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -29,7 +29,6 @@ static void OPV_CaseStat (OPT_Node n, OPT_Object outerProc);
 static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec);
 static void OPV_DefineTDescs (OPT_Node n);
 static void OPV_Entier (OPT_Node n, INT16 prec);
-static void OPV_Floor (OPT_Node n, INT16 prec);
 static void OPV_GetTProcNum (OPT_Object obj);
 static void OPV_IfStat (OPT_Node n, BOOLEAN withtrap, OPT_Object outerProc);
 static BOOLEAN OPV_ImplicitReturn (OPT_Node n);
@@ -113,7 +112,7 @@ static void OPV_Stamp (OPS_Name s)
 	i += 2;
 	k = 0;
 	do {
-		n[__X(k, 10)] = (CHAR)((int)__MOD(j, 10) + 48);
+		n[__X(k, 10)] = __CHR((int)__MOD(j, 10) + 48);
 		j = __DIV(j, 10);
 		k += 1;
 	} while (!(j == 0));
@@ -318,15 +317,27 @@ static INT16 OPV_Precedence (INT16 class, INT16 subclass, INT16 form, INT16 comp
 
 static void OPV_Len (OPT_Node n, INT64 dim)
 {
+	INT64 d;
+	OPT_Struct array = NIL;
 	while ((n->class == 4 && n->typ->comp == 3)) {
 		dim += 1;
 		n = n->left;
 	}
 	if ((n->class == 3 && n->typ->comp == 3)) {
-		OPV_design(n->left, 10);
-		OPM_WriteString((CHAR*)"->len[", 7);
-		OPM_WriteInt(dim);
-		OPM_Write(']');
+		d = dim;
+		array = n->typ;
+		while (d > 0) {
+			array = array->BaseTyp;
+			d -= 1;
+		}
+		if (array->comp == 3) {
+			OPV_design(n->left, 10);
+			OPM_WriteString((CHAR*)"->len[", 7);
+			OPM_WriteInt(dim);
+			OPM_Write(']');
+		} else {
+			OPM_WriteInt(array->n);
+		}
 	} else {
 		OPC_Len(n->obj, n->typ, dim);
 	}
@@ -353,17 +364,6 @@ static void OPV_Entier (OPT_Node n, INT16 prec)
 	}
 }
 
-static void OPV_Floor (OPT_Node n, INT16 prec)
-{
-	if (__IN(n->typ->form, 0x60, 32)) {
-		OPM_WriteString((CHAR*)"__FLOOR(", 9);
-		OPV_expr(n, -1);
-		OPM_Write(')');
-	} else {
-		OPV_expr(n, prec);
-	}
-}
-
 static void OPV_SizeCast (OPT_Node n, INT32 to)
 {
 	if ((to < n->typ->size && __IN(2, OPM_Options, 32))) {
@@ -382,6 +382,7 @@ static void OPV_SizeCast (OPT_Node n, INT32 to)
 			OPM_WriteInt(__ASHL(to, 3));
 			OPM_WriteString((CHAR*)")", 2);
 		}
+		OPV_Entier(n, 9);
 	}
 }
 
@@ -393,7 +394,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec)
 	if (to == 7) {
 		if (from == 7) {
 			OPV_SizeCast(n, newtype->size);
-			OPV_Entier(n, 9);
 		} else {
 			OPM_WriteString((CHAR*)"__SETOF(", 9);
 			OPV_Entier(n, -1);
@@ -403,7 +403,6 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, INT16 prec)
 		}
 	} else if (to == 4) {
 		OPV_SizeCast(n, newtype->size);
-		OPV_Entier(n, 9);
 	} else if (to == 3) {
 		if (__IN(2, OPM_Options, 32)) {
 			OPM_WriteString((CHAR*)"__CHR", 6);
@@ -467,7 +466,7 @@ static void OPV_design (OPT_Node n, INT16 prec)
 	OPT_Struct typ = NIL;
 	INT16 class, designPrec, comp;
 	OPT_Node d = NIL, x = NIL;
-	INT16 dims, i, _for__27;
+	INT16 dims, i, _for__26;
 	comp = n->typ->comp;
 	obj = n->obj;
 	class = n->class;
@@ -543,9 +542,9 @@ static void OPV_design (OPT_Node n, INT16 prec)
 					}
 					x = x->left;
 				}
-				_for__27 = dims;
+				_for__26 = dims;
 				i = 1;
-				while (i <= _for__27) {
+				while (i <= _for__26) {
 					OPM_Write(')');
 					i += 1;
 				}
@@ -1195,7 +1194,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x)
 		base = base->BaseTyp;
 	}
 	if ((base->comp == 4 && OPC_NofPtrs(base) != 0)) {
-		OPC_Ident(base->strobj);
+		OPC_Andent(base);
 		OPM_WriteString((CHAR*)"__typ", 6);
 	} else if (base->form == 11) {
 		OPM_WriteString((CHAR*)"POINTER__typ", 13);
@@ -1354,21 +1353,21 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 							OPV_NewArr(n->left, n->right);
 						}
 						break;
-					case 14: case 15: 
+					case 13: case 14: 
 						OPV_expr(n->left, -1);
-						OPC_Increment(n->subcl == 15);
+						OPC_Increment(n->subcl == 14);
 						OPV_expr(n->right, -1);
 						break;
-					case 16: case 17: 
+					case 15: case 16: 
 						OPV_expr(n->left, -1);
-						OPC_SetInclude(n->subcl == 17);
+						OPC_SetInclude(n->subcl == 16);
 						OPM_WriteString((CHAR*)"__SETOF(", 9);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)",", 2);
 						OPM_WriteInt(__ASHL(n->left->typ->size, 3));
 						OPM_Write(')');
 						break;
-					case 19: 
+					case 18: 
 						OPM_WriteString((CHAR*)"__COPY(", 8);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1377,7 +1376,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPV_Len(n->left, 0);
 						OPM_Write(')');
 						break;
-					case 32: 
+					case 31: 
 						OPM_WriteString((CHAR*)"__MOVE(", 8);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1386,7 +1385,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPV_expr(n->right->link, -1);
 						OPM_Write(')');
 						break;
-					case 25: 
+					case 24: 
 						OPM_WriteString((CHAR*)"__GET(", 7);
 						OPV_expr(n->right, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1395,7 +1394,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPC_Ident(n->left->typ->strobj);
 						OPM_Write(')');
 						break;
-					case 26: 
+					case 25: 
 						OPM_WriteString((CHAR*)"__PUT(", 7);
 						OPV_expr(n->left, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1404,10 +1403,10 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 						OPC_Ident(n->right->typ->strobj);
 						OPM_Write(')');
 						break;
-					case 27: case 28: 
+					case 26: case 27: 
 						OPM_err(200);
 						break;
-					case 31: 
+					case 30: 
 						OPM_WriteString((CHAR*)"__SYSNEW(", 10);
 						OPV_design(n->left, -1);
 						OPM_WriteString((CHAR*)", ", 3);
@@ -1439,7 +1438,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc)
 				OPV_ActualPar(n->right, n->obj);
 				break;
 			case 20: 
-				if (n->subcl != 33) {
+				if (n->subcl != 32) {
 					OPV_IfStat(n, 0, outerProc);
 				} else if (__IN(7, OPM_Options, 32)) {
 					OPM_WriteString((CHAR*)"__ASSERT(", 10);

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/OPV.h → data/bin/voc/bootstrap/unix-48/OPV.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPV__h
 #define OPV__h

+ 9 - 144
data/bin/voc/src/bootstrap/unix-48/Out.c → data/bin/voc/bootstrap/unix-48/Out.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -16,8 +16,6 @@ static INT16 Out_in;
 
 
 export void Out_Char (CHAR ch);
-export void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len);
-export INT16 Out_Expo (REAL x);
 export void Out_Flush (void);
 export void Out_Hex (INT64 x, INT64 n);
 export void Out_Int (INT64 x, INT64 n);
@@ -26,7 +24,6 @@ export void Out_Ln (void);
 export void Out_LongReal (LONGREAL x, INT16 n);
 export void Out_Open (void);
 export void Out_Real (REAL x, INT16 n);
-export void Out_RealFix (REAL x, INT16 n, INT16 k);
 static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_);
 export void Out_String (CHAR *str, ADDRESS str__len);
 export LONGREAL Out_Ten (INT16 e);
@@ -83,7 +80,7 @@ void Out_String (CHAR *str, ADDRESS str__len)
 		error = Platform_Write(1, (ADDRESS)str, l);
 	} else {
 		__MOVE((ADDRESS)str, (ADDRESS)&Out_buf[__X(Out_in, 128)], l);
-		Out_in += (INT16)l;
+		Out_in += __SHORT(l, 32768);
 	}
 	__DEL(str);
 }
@@ -101,11 +98,11 @@ void Out_Int (INT64 x, INT64 n)
 		if (x < 0) {
 			x = -x;
 		}
-		s[0] = (CHAR)(48 + __MOD(x, 10));
+		s[0] = __CHR(48 + __MOD(x, 10));
 		x = __DIV(x, 10);
 		i = 1;
 		while (x != 0) {
-			s[__X(i, 22)] = (CHAR)(48 + __MOD(x, 10));
+			s[__X(i, 22)] = __CHR(48 + __MOD(x, 10));
 			x = __DIV(x, 10);
 			i += 1;
 		}
@@ -141,9 +138,9 @@ void Out_Hex (INT64 x, INT64 n)
 		x = __ROTL(x, 4, 64);
 		n -= 1;
 		if (__MASK(x, -16) < 10) {
-			Out_Char((CHAR)(__MASK(x, -16) + 48));
+			Out_Char(__CHR(__MASK(x, -16) + 48));
 		} else {
-			Out_Char((CHAR)((__MASK(x, -16) - 10) + 65));
+			Out_Char(__CHR((__MASK(x, -16) - 10) + 65));
 		}
 	}
 }
@@ -157,7 +154,7 @@ void Out_Ln (void)
 static void Out_digit (INT64 n, CHAR *s, ADDRESS s__len, INT16 *i)
 {
 	*i -= 1;
-	s[__X(*i, s__len)] = (CHAR)(__MOD(n, 10) + 48);
+	s[__X(*i, s__len)] = __CHR(__MOD(n, 10) + 48);
 }
 
 static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16 *i)
@@ -169,7 +166,7 @@ static void Out_prepend (CHAR *t, ADDRESS t__len, CHAR *s, ADDRESS s__len, INT16
 	if (l > *i) {
 		l = *i;
 	}
-	*i -= (INT16)l;
+	*i -= __SHORT(l, 32768);
 	j = 0;
 	while (j < l) {
 		s[__X(*i + j, s__len)] = t[__X(j, t__len)];
@@ -251,7 +248,7 @@ static void Out_RealP (LONGREAL x, INT16 n, BOOLEAN long_)
 			if (nn) {
 				x = -x;
 			}
-			e = (INT16)__ASHR((e - 1023) * 77, 8);
+			e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768);
 			if (e >= 0) {
 				x = x / (LONGREAL)Out_Ten(e);
 			} else {
@@ -331,138 +328,6 @@ void Out_LongReal (LONGREAL x, INT16 n)
 	Out_RealP(x, n, 1);
 }
 
-void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len)
-{
-	INT32 i, j, k;
-	if (x < (LONGREAL)0) {
-		x = -x;
-	}
-	k = 0;
-	if (n > 9) {
-		i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
-		j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000);
-		if (j < 0) {
-			j = 0;
-		}
-		while (k < 9) {
-			d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48);
-			j = __DIV(j, 10);
-			k += 1;
-		}
-	} else {
-		i = (INT32)__ENTIER(x);
-	}
-	while (k < n) {
-		d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48);
-		i = __DIV(i, 10);
-		k += 1;
-	}
-}
-
-INT16 Out_Expo (REAL x)
-{
-	INT16 i;
-	__GET((ADDRESS)&x + 2, i, INT16);
-	return __MASK(__ASHR(i, 7), -256);
-}
-
-static struct RealFix__13 {
-	INT16 *i;
-	CHAR (*d)[9];
-	struct RealFix__13 *lnk;
-} *RealFix__13_s;
-
-static void dig__14 (INT16 n);
-static void seq__16 (CHAR ch, INT16 n);
-
-static void seq__16 (CHAR ch, INT16 n)
-{
-	while (n > 0) {
-		Out_Char(ch);
-		n -= 1;
-	}
-}
-
-static void dig__14 (INT16 n)
-{
-	while (n > 0) {
-		*RealFix__13_s->i -= 1;
-		Out_Char((*RealFix__13_s->d)[__X(*RealFix__13_s->i, 9)]);
-		n -= 1;
-	}
-}
-
-void Out_RealFix (REAL x, INT16 n, INT16 k)
-{
-	INT16 e, i;
-	CHAR sign;
-	REAL x0;
-	CHAR d[9];
-	struct RealFix__13 _s;
-	_s.i = &i;
-	_s.d = (void*)d;
-	_s.lnk = RealFix__13_s;
-	RealFix__13_s = &_s;
-	e = Out_Expo(x);
-	if (k < 0) {
-		k = 0;
-	}
-	if (e == 0) {
-		seq__16(' ', (n - k) - 2);
-		Out_Char('0');
-		seq__16(' ', k + 1);
-	} else if (e == 255) {
-		Out_String((CHAR*)" NaN", 5);
-		seq__16(' ', n - 4);
-	} else {
-		e = __ASHR((e - 127) * 77, 8);
-		if (x < (REAL)0) {
-			sign = '-';
-			x = -x;
-		} else {
-			sign = ' ';
-		}
-		if (e >= 0) {
-			x = (x / (LONGREAL)Out_Ten(e));
-		} else {
-			x = (Out_Ten(-e) * x);
-		}
-		if (x >= (REAL)10) {
-			x =   1.0000000e-001 * x;
-			e += 1;
-		}
-		if (k + e >= 8) {
-			k = 8 - e;
-		} else if (k + e < 0) {
-			k = -e;
-			x = (REAL)0;
-		}
-		x0 = Out_Ten(k + e);
-		x = x0 * x +   5.0000000e-001;
-		if (x >= (REAL)10 * x0) {
-			e += 1;
-		}
-		e += 1;
-		i = k + e;
-		Out_ConvertL(x, i, (void*)d, 9);
-		if (e > 0) {
-			seq__16(' ', ((n - e) - k) - 2);
-			Out_Char(sign);
-			dig__14(e);
-			Out_Char('.');
-			dig__14(k);
-		} else {
-			seq__16(' ', (n - k) - 3);
-			Out_Char(sign);
-			Out_Char('0');
-			Out_Char('.');
-			seq__16('0', -e);
-			dig__14(k + e);
-		}
-	}
-	RealFix__13_s = _s.lnk;
-}
-
 
 export void *Out__init(void)
 {

+ 1 - 4
data/bin/voc/src/bootstrap/unix-48/Out.h → data/bin/voc/bootstrap/unix-48/Out.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Out__h
 #define Out__h
@@ -10,8 +10,6 @@ import BOOLEAN Out_IsConsole;
 
 
 import void Out_Char (CHAR ch);
-import void Out_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len);
-import INT16 Out_Expo (REAL x);
 import void Out_Flush (void);
 import void Out_Hex (INT64 x, INT64 n);
 import void Out_Int (INT64 x, INT64 n);
@@ -19,7 +17,6 @@ import void Out_Ln (void);
 import void Out_LongReal (LONGREAL x, INT16 n);
 import void Out_Open (void);
 import void Out_Real (REAL x, INT16 n);
-import void Out_RealFix (REAL x, INT16 n, INT16 k);
 import void Out_String (CHAR *str, ADDRESS str__len);
 import LONGREAL Out_Ten (INT16 e);
 import void *Out__init(void);

+ 19 - 4
data/bin/voc/src/bootstrap/unix-48/Platform.c → data/bin/voc/bootstrap/unix-48/Platform.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -42,6 +42,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e);
 export BOOLEAN Platform_Interrupted (INT16 e);
 export BOOLEAN Platform_IsConsole (INT32 h);
 export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
+export INT16 Platform_MaxNameLength (void);
+export INT16 Platform_MaxPathLength (void);
 export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
 export BOOLEAN Platform_NoSuchDirectory (INT16 e);
 export INT32 Platform_OSAllocate (INT32 size);
@@ -79,6 +81,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS
 #include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #define Platform_EACCES()	EACCES
@@ -94,6 +97,8 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS
 #define Platform_EROFS()	EROFS
 #define Platform_ETIMEDOUT()	ETIMEDOUT
 #define Platform_EXDEV()	EXDEV
+#define Platform_NAMEMAX()	NAME_MAX
+#define Platform_PATHMAX()	PATH_MAX
 #define Platform_allocate(size)	(ADDRESS)((void*)malloc((size_t)size))
 #define Platform_chdir(n, n__len)	chdir((char*)n)
 #define Platform_closefile(fd)	close(fd)
@@ -178,6 +183,16 @@ BOOLEAN Platform_Interrupted (INT16 e)
 	return e == Platform_EINTR();
 }
 
+INT16 Platform_MaxNameLength (void)
+{
+	return Platform_NAMEMAX();
+}
+
+INT16 Platform_MaxPathLength (void)
+{
+	return Platform_PATHMAX();
+}
+
 INT32 Platform_OSAllocate (INT32 size)
 {
 	return Platform_allocate(size);
@@ -189,13 +204,13 @@ void Platform_OSFree (INT32 address)
 }
 
 typedef
-	CHAR (*EnvPtr__78)[1024];
+	CHAR (*EnvPtr__83)[1024];
 
 BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len)
 {
-	EnvPtr__78 p = NIL;
+	EnvPtr__83 p = NIL;
 	__DUP(var, var__len, CHAR);
-	p = (EnvPtr__78)(ADDRESS)Platform_getenv(var, var__len);
+	p = (EnvPtr__83)(ADDRESS)Platform_getenv(var, var__len);
 	if (p != NIL) {
 		__COPY(*p, val, val__len);
 	}

+ 3 - 1
data/bin/voc/src/bootstrap/unix-44/Platform.h → data/bin/voc/bootstrap/unix-48/Platform.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Platform__h
 #define Platform__h
@@ -40,6 +40,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e);
 import BOOLEAN Platform_Interrupted (INT16 e);
 import BOOLEAN Platform_IsConsole (INT32 h);
 import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
+import INT16 Platform_MaxNameLength (void);
+import INT16 Platform_MaxPathLength (void);
 import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
 import BOOLEAN Platform_NoSuchDirectory (INT16 e);
 import INT32 Platform_OSAllocate (INT32 size);

+ 10 - 10
data/bin/voc/src/bootstrap/unix-48/Reals.c → data/bin/voc/bootstrap/unix-48/Reals.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -67,9 +67,9 @@ void Reals_SetExpo (REAL *x, INT16 ex)
 {
 	CHAR c;
 	__GET((ADDRESS)x + 3, c, CHAR);
-	__PUT((ADDRESS)x + 3, (CHAR)(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
+	__PUT((ADDRESS)x + 3, __CHR(__ASHL(__ASHR((INT16)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
 	__GET((ADDRESS)x + 2, c, CHAR);
-	__PUT((ADDRESS)x + 2, (CHAR)(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
+	__PUT((ADDRESS)x + 2, __CHR(__MASK((INT16)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
 }
 
 INT16 Reals_ExpoL (LONGREAL x)
@@ -87,21 +87,21 @@ void Reals_ConvertL (LONGREAL x, INT16 n, CHAR *d, ADDRESS d__len)
 	}
 	k = 0;
 	if (n > 9) {
-		i = (INT32)__ENTIER(x / (LONGREAL)(LONGREAL)1000000000);
-		j = (INT32)__ENTIER(x - i * (LONGREAL)1000000000);
+		i = __SHORT(__ENTIER(x / (LONGREAL)(LONGREAL)1000000000), 2147483648LL);
+		j = __SHORT(__ENTIER(x - i * (LONGREAL)1000000000), 2147483648LL);
 		if (j < 0) {
 			j = 0;
 		}
 		while (k < 9) {
-			d[__X(k, d__len)] = (CHAR)((int)__MOD(j, 10) + 48);
+			d[__X(k, d__len)] = __CHR((int)__MOD(j, 10) + 48);
 			j = __DIV(j, 10);
 			k += 1;
 		}
 	} else {
-		i = (INT32)__ENTIER(x);
+		i = __SHORT(__ENTIER(x), 2147483648LL);
 	}
 	while (k < n) {
-		d[__X(k, d__len)] = (CHAR)((int)__MOD(i, 10) + 48);
+		d[__X(k, d__len)] = __CHR((int)__MOD(i, 10) + 48);
 		i = __DIV(i, 10);
 		k += 1;
 	}
@@ -115,9 +115,9 @@ void Reals_Convert (REAL x, INT16 n, CHAR *d, ADDRESS d__len)
 static CHAR Reals_ToHex (INT16 i)
 {
 	if (i < 10) {
-		return (CHAR)(i + 48);
+		return __CHR(i + 48);
 	} else {
-		return (CHAR)(i + 55);
+		return __CHR(i + 55);
 	}
 	__RETCHK;
 }

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/Reals.h → data/bin/voc/bootstrap/unix-48/Reals.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Reals__h
 #define Reals__h

+ 3 - 3
data/bin/voc/src/bootstrap/windows-48/Strings.c → data/bin/voc/bootstrap/unix-48/Strings.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -34,7 +34,7 @@ INT16 Strings_Length (CHAR *s, ADDRESS s__len)
 	}
 	if (i <= 32767) {
 		__DEL(s);
-		return (INT16)i;
+		return __SHORT(i, 32768);
 	} else {
 		__DEL(s);
 		return 32767;
@@ -126,7 +126,7 @@ void Strings_Extract (CHAR *source, ADDRESS source__len, INT16 pos, INT16 n, CHA
 	INT16 len, destLen, i;
 	__DUP(source, source__len, CHAR);
 	len = Strings_Length(source, source__len);
-	destLen = (INT16)dest__len - 1;
+	destLen = __SHORT(dest__len, 32768) - 1;
 	if (pos < 0) {
 		pos = 0;
 	}

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Strings.h → data/bin/voc/bootstrap/unix-48/Strings.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Strings__h
 #define Strings__h

+ 14 - 14
data/bin/voc/src/bootstrap/windows-48/Texts.c → data/bin/voc/bootstrap/unix-48/Texts.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -813,10 +813,10 @@ void Texts_Scan (Texts_Scanner *S, ADDRESS *S__typ)
 				if ('9' < ch) {
 					if (('A' <= ch && ch <= 'F')) {
 						hex = 1;
-						ch = (CHAR)((INT16)ch - 7);
+						ch = __CHR((INT16)ch - 7);
 					} else if (('a' <= ch && ch <= 'f')) {
 						hex = 1;
-						ch = (CHAR)((INT16)ch - 39);
+						ch = __CHR((INT16)ch - 39);
 					} else {
 						break;
 					}
@@ -1058,7 +1058,7 @@ void Texts_WriteInt (Texts_Writer *W, ADDRESS *W__typ, INT64 x, INT64 n)
 		x0 = x;
 	}
 	do {
-		a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48);
+		a[__X(i, 24)] = __CHR(__MOD(x0, 10) + 48);
 		x0 = __DIV(x0, 10);
 		i += 1;
 	} while (!(x0 == 0));
@@ -1085,9 +1085,9 @@ void Texts_WriteHex (Texts_Writer *W, ADDRESS *W__typ, INT32 x)
 	do {
 		y = __MASK(x, -16);
 		if (y < 10) {
-			a[__X(i, 20)] = (CHAR)(y + 48);
+			a[__X(i, 20)] = __CHR(y + 48);
 		} else {
-			a[__X(i, 20)] = (CHAR)(y + 55);
+			a[__X(i, 20)] = __CHR(y + 55);
 		}
 		x = __ASHR(x, 4);
 		i += 1;
@@ -1163,8 +1163,8 @@ void Texts_WriteReal (Texts_Writer *W, ADDRESS *W__typ, REAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, '+');
 		}
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48));
-		Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48));
 	}
 }
 
@@ -1314,7 +1314,7 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, ' ');
 		}
-		e = (INT16)__ASHR((e - 1023) * 77, 8);
+		e = __SHORT(__ASHR((e - 1023) * 77, 8), 32768);
 		if (e >= 0) {
 			x = x / (LONGREAL)Reals_TenL(e);
 		} else {
@@ -1345,10 +1345,10 @@ void Texts_WriteLongReal (Texts_Writer *W, ADDRESS *W__typ, LONGREAL x, INT16 n)
 		} else {
 			Texts_Write(&*W, W__typ, '+');
 		}
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 100) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 100) + 48));
 		e = (int)__MOD(e, 100);
-		Texts_Write(&*W, W__typ, (CHAR)(__DIV(e, 10) + 48));
-		Texts_Write(&*W, W__typ, (CHAR)((int)__MOD(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR(__DIV(e, 10) + 48));
+		Texts_Write(&*W, W__typ, __CHR((int)__MOD(e, 10) + 48));
 	}
 }
 
@@ -1375,8 +1375,8 @@ static void WritePair__44 (CHAR ch, INT32 x);
 static void WritePair__44 (CHAR ch, INT32 x)
 {
 	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, ch);
-	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)(__DIV(x, 10) + 48));
-	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, (CHAR)((int)__MOD(x, 10) + 48));
+	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR(__DIV(x, 10) + 48));
+	Texts_Write(&*WriteDate__43_s->W, WriteDate__43_s->W__typ, __CHR((int)__MOD(x, 10) + 48));
 }
 
 void Texts_WriteDate (Texts_Writer *W, ADDRESS *W__typ, INT32 t, INT32 d)

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/Texts.h → data/bin/voc/bootstrap/unix-48/Texts.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Texts__h
 #define Texts__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-48/VT100.c → data/bin/voc/bootstrap/unix-48/VT100.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -74,7 +74,7 @@ void VT100_IntToStr (INT32 int_, CHAR *str, ADDRESS str__len)
 		}
 		e = s;
 		do {
-			b[__X(e, 21)] = (CHAR)((int)__MOD(int_, 10) + 48);
+			b[__X(e, 21)] = __CHR((int)__MOD(int_, 10) + 48);
 			int_ = __DIV(int_, 10);
 			e += 1;
 		} while (!(int_ == 0));

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/VT100.h → data/bin/voc/bootstrap/unix-48/VT100.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef VT100__h
 #define VT100__h

+ 2 - 2
data/bin/voc/src/bootstrap/windows-48/extTools.c → data/bin/voc/bootstrap/unix-48/extTools.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -110,7 +110,7 @@ void extTools_LinkMain (CHAR *moduleName, ADDRESS moduleName__len, BOOLEAN stati
 		Strings_Append((CHAR*)" -L\"", 5, (void*)cmd, 4096);
 		Strings_Append(OPM_InstallDir, 1024, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"/lib\"", 6, (void*)cmd, 4096);
-		Strings_Append((CHAR*)" -l voc", 8, (void*)cmd, 4096);
+		Strings_Append((CHAR*)" -lvoc", 7, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"-O", 3, (void*)cmd, 4096);
 		Strings_Append(OPM_Model, 10, (void*)cmd, 4096);
 		Strings_Append((CHAR*)"", 1, (void*)cmd, 4096);

+ 1 - 1
data/bin/voc/src/bootstrap/unix-44/extTools.h → data/bin/voc/bootstrap/unix-48/extTools.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef extTools__h
 #define extTools__h

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/Compiler.c → data/bin/voc/bootstrap/unix-88/Compiler.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspamS */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspamS */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 2 - 2
data/bin/voc/src/bootstrap/unix-44/Configuration.c → data/bin/voc/bootstrap/unix-88/Configuration.c

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

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/Configuration.h → data/bin/voc/bootstrap/unix-88/Configuration.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Configuration__h
 #define Configuration__h

+ 110 - 108
data/bin/voc/src/bootstrap/unix-88/Files.c → data/bin/voc/bootstrap/unix-88/Files.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -26,7 +26,7 @@ typedef
 	Files_BufDesc *Files_Buffer;
 
 typedef
-	CHAR Files_FileName[101];
+	CHAR Files_FileName[256];
 
 typedef
 	struct Files_FileDesc {
@@ -48,6 +48,7 @@ typedef
 	} Files_Rider;
 
 
+export INT16 Files_MaxPathLength, Files_MaxNameLength;
 static Files_FileDesc *Files_files;
 static INT16 Files_tempno;
 static CHAR Files_HOME[1024];
@@ -129,17 +130,17 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 	Out_String((CHAR*)": ", 3);
 	if (f != NIL) {
 		if (f->registerName[0] != 0x00) {
-			Out_String(f->registerName, 101);
+			Out_String(f->registerName, 256);
 		} else {
-			Out_String(f->workName, 101);
+			Out_String(f->workName, 256);
 		}
 		if (f->fd != 0) {
-			Out_String((CHAR*)"f.fd = ", 8);
+			Out_String((CHAR*)", f.fd = ", 10);
 			Out_Int(f->fd, 1);
 		}
 	}
 	if (errcode != 0) {
-		Out_String((CHAR*)" errcode = ", 12);
+		Out_String((CHAR*)", errcode = ", 13);
 		Out_Int(errcode, 1);
 	}
 	Out_Ln();
@@ -149,76 +150,75 @@ static void Files_Err (CHAR *s, ADDRESS s__len, Files_File f, INT16 errcode)
 
 static void Files_MakeFileName (CHAR *dir, ADDRESS dir__len, CHAR *name, ADDRESS name__len, CHAR *dest, ADDRESS dest__len)
 {
-	INT16 i, j;
+	INT16 i, j, ld, ln;
 	__DUP(dir, dir__len, CHAR);
 	__DUP(name, name__len, CHAR);
+	ld = Strings_Length(dir, dir__len);
+	ln = Strings_Length(name, name__len);
+	while ((ld > 0 && dir[__X(ld - 1, dir__len)] == '/')) {
+		ld -= 1;
+	}
+	if (((ld + ln) + 2) > dest__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
 	i = 0;
-	j = 0;
-	while (dir[i] != 0x00) {
-		dest[i] = dir[i];
+	while (i < ld) {
+		dest[__X(i, dest__len)] = dir[__X(i, dir__len)];
 		i += 1;
 	}
-	if (dest[i - 1] != '/') {
-		dest[i] = '/';
+	if (i > 0) {
+		dest[__X(i, dest__len)] = '/';
 		i += 1;
 	}
-	while (name[j] != 0x00) {
-		dest[i] = name[j];
+	j = 0;
+	while (j < ln) {
+		dest[__X(i, dest__len)] = name[__X(j, name__len)];
 		i += 1;
 		j += 1;
 	}
-	dest[i] = 0x00;
+	dest[__X(i, dest__len)] = 0x00;
 	__DEL(dir);
 	__DEL(name);
 }
 
 static void Files_GetTempName (CHAR *finalName, ADDRESS finalName__len, CHAR *name, ADDRESS name__len)
 {
-	INT32 n, i, j;
+	INT16 i, n;
 	__DUP(finalName, finalName__len, CHAR);
-	Files_tempno += 1;
-	n = Files_tempno;
-	i = 0;
-	if (finalName[0] != '/') {
-		while (Platform_CWD[i] != 0x00) {
-			name[i] = Platform_CWD[i];
-			i += 1;
-		}
-		if (Platform_CWD[i - 1] != '/') {
-			name[i] = '/';
-			i += 1;
-		}
-	}
-	j = 0;
-	while (finalName[j] != 0x00) {
-		name[i] = finalName[j];
-		i += 1;
-		j += 1;
+	if (finalName[0] == '/') {
+		__COPY(finalName, name, name__len);
+	} else {
+		Files_MakeFileName(Platform_CWD, 256, finalName, finalName__len, (void*)name, name__len);
 	}
-	i -= 1;
-	while (name[i] != '/') {
+	i = Strings_Length(name, name__len) - 1;
+	while ((i > 0 && name[__X(i, name__len)] != '/')) {
 		i -= 1;
 	}
-	name[i + 1] = '.';
-	name[i + 2] = 't';
-	name[i + 3] = 'm';
-	name[i + 4] = 'p';
-	name[i + 5] = '.';
+	if ((i + 16) >= name__len) {
+		Files_Err((CHAR*)"File name too long", 19, NIL, 0);
+	}
+	Files_tempno += 1;
+	n = Files_tempno;
+	name[__X(i + 1, name__len)] = '.';
+	name[__X(i + 2, name__len)] = 't';
+	name[__X(i + 3, name__len)] = 'm';
+	name[__X(i + 4, name__len)] = 'p';
+	name[__X(i + 5, name__len)] = '.';
 	i += 6;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = '.';
+	name[__X(i, name__len)] = '.';
 	i += 1;
 	n = Platform_PID;
 	while (n > 0) {
-		name[i] = (CHAR)((int)__MOD(n, 10) + 48);
+		name[__X(i, name__len)] = __CHR((int)__MOD(n, 10) + 48);
 		n = __DIV(n, 10);
 		i += 1;
 	}
-	name[i] = 0x00;
+	name[__X(i, name__len)] = 0x00;
 	__DEL(finalName);
 }
 
@@ -236,11 +236,11 @@ static void Files_Deregister (CHAR *name, ADDRESS name__len)
 		if (osfile != NIL) {
 			__ASSERT(!osfile->tempFile, 0);
 			__ASSERT(osfile->fd >= 0, 0);
-			__MOVE(osfile->workName, osfile->registerName, 101);
-			Files_GetTempName(osfile->registerName, 101, (void*)osfile->workName, 101);
+			__MOVE(osfile->workName, osfile->registerName, 256);
+			Files_GetTempName(osfile->registerName, 256, (void*)osfile->workName, 256);
 			osfile->tempFile = 1;
 			osfile->state = 0;
-			error = Platform_Rename((void*)osfile->registerName, 101, (void*)osfile->workName, 101);
+			error = Platform_Rename((void*)osfile->registerName, 256, (void*)osfile->workName, 256);
 			if (error != 0) {
 				Files_Err((CHAR*)"Couldn't rename previous version of file being registered", 58, osfile, error);
 			}
@@ -256,17 +256,17 @@ static void Files_Create (Files_File f)
 	CHAR err[32];
 	if (f->fd == -1) {
 		if (f->state == 1) {
-			Files_GetTempName(f->registerName, 101, (void*)f->workName, 101);
+			Files_GetTempName(f->registerName, 256, (void*)f->workName, 256);
 			f->tempFile = 1;
 		} else {
 			__ASSERT(f->state == 2, 0);
-			Files_Deregister(f->registerName, 101);
-			__MOVE(f->registerName, f->workName, 101);
+			Files_Deregister(f->registerName, 256);
+			__MOVE(f->registerName, f->workName, 256);
 			f->registerName[0] = 0x00;
 			f->tempFile = 0;
 		}
-		error = Platform_Unlink((void*)f->workName, 101);
-		error = Platform_New((void*)f->workName, 101, &f->fd);
+		error = Platform_Unlink((void*)f->workName, 256);
+		error = Platform_New((void*)f->workName, 256, &f->fd);
 		done = error == 0;
 		if (done) {
 			f->next = Files_files;
@@ -319,8 +319,8 @@ void Files_Close (Files_File f)
 	if (f->state != 1 || f->registerName[0] != 0x00) {
 		Files_Create(f);
 		i = 0;
-		while ((i < 4 && f->bufs[i] != NIL)) {
-			Files_Flush(f->bufs[i]);
+		while ((i < 4 && f->bufs[__X(i, 4)] != NIL)) {
+			Files_Flush(f->bufs[__X(i, 4)]);
 			i += 1;
 		}
 	}
@@ -337,7 +337,7 @@ Files_File Files_New (CHAR *name, ADDRESS name__len)
 	__DUP(name, name__len, CHAR);
 	__NEW(f, Files_FileDesc);
 	f->workName[0] = 0x00;
-	__COPY(name, f->registerName, 101);
+	__COPY(name, f->registerName, 256);
 	f->fd = -1;
 	f->state = 1;
 	f->len = 0;
@@ -359,35 +359,35 @@ static void Files_ScanPath (INT16 *pos, CHAR *dir, ADDRESS dir__len)
 			*pos += 1;
 		}
 	} else {
-		ch = (Files_SearchPath->data)[*pos];
+		ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		while (ch == ' ' || ch == ';') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
 		if (ch == '~') {
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
-			while (Files_HOME[i] != 0x00) {
-				dir[i] = Files_HOME[i];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
+			while (Files_HOME[__X(i, 1024)] != 0x00) {
+				dir[__X(i, dir__len)] = Files_HOME[__X(i, 1024)];
 				i += 1;
 			}
 			if ((((((ch != '/' && ch != 0x00)) && ch != ';')) && ch != ' ')) {
-				while ((i > 0 && dir[i - 1] != '/')) {
+				while ((i > 0 && dir[__X(i - 1, dir__len)] != '/')) {
 					i -= 1;
 				}
 			}
 		}
 		while ((ch != 0x00 && ch != ';')) {
-			dir[i] = ch;
+			dir[__X(i, dir__len)] = ch;
 			i += 1;
 			*pos += 1;
-			ch = (Files_SearchPath->data)[*pos];
+			ch = (Files_SearchPath->data)[__X(*pos, Files_SearchPath->len[0])];
 		}
-		while ((i > 0 && dir[i - 1] == ' ')) {
+		while ((i > 0 && dir[__X(i - 1, dir__len)] == ' ')) {
 			i -= 1;
 		}
 	}
-	dir[i] = 0x00;
+	dir[__X(i, dir__len)] = 0x00;
 }
 
 static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
@@ -398,7 +398,7 @@ static BOOLEAN Files_HasDir (CHAR *name, ADDRESS name__len)
 	ch = name[0];
 	while ((ch != 0x00 && ch != '/')) {
 		i += 1;
-		ch = name[i];
+		ch = name[__X(i, name__len)];
 	}
 	return ch == '/';
 }
@@ -413,9 +413,9 @@ static Files_File Files_CacheEntry (Platform_FileIdentity identity)
 			if (!Platform_SameFileTime(identity, f->identity)) {
 				i = 0;
 				while (i < 4) {
-					if (f->bufs[i] != NIL) {
-						f->bufs[i]->org = -1;
-						f->bufs[i] = NIL;
+					if (f->bufs[__X(i, 4)] != NIL) {
+						f->bufs[__X(i, 4)]->org = -1;
+						f->bufs[__X(i, 4)] = NIL;
 					}
 					i += 1;
 				}
@@ -482,7 +482,7 @@ Files_File Files_Old (CHAR *name, ADDRESS name__len)
 					f->pos = 0;
 					f->swapper = -1;
 					error = Platform_Size(fd, &f->len);
-					__COPY(name, f->workName, 101);
+					__COPY(name, f->workName, 256);
 					f->registerName[0] = 0x00;
 					f->tempFile = 0;
 					f->identity = identity;
@@ -514,9 +514,9 @@ void Files_Purge (Files_File f)
 	INT16 error;
 	i = 0;
 	while (i < 4) {
-		if (f->bufs[i] != NIL) {
-			f->bufs[i]->org = -1;
-			f->bufs[i] = NIL;
+		if (f->bufs[__X(i, 4)] != NIL) {
+			f->bufs[__X(i, 4)]->org = -1;
+			f->bufs[__X(i, 4)] = NIL;
 		}
 		i += 1;
 	}
@@ -560,22 +560,22 @@ void Files_Set (Files_Rider *r, ADDRESS *r__typ, Files_File f, INT32 pos)
 		offset = __MASK(pos, -4096);
 		org = pos - offset;
 		i = 0;
-		while ((((i < 4 && f->bufs[i] != NIL)) && org != f->bufs[i]->org)) {
+		while ((((i < 4 && f->bufs[__X(i, 4)] != NIL)) && org != f->bufs[__X(i, 4)]->org)) {
 			i += 1;
 		}
 		if (i < 4) {
-			if (f->bufs[i] == NIL) {
+			if (f->bufs[__X(i, 4)] == NIL) {
 				__NEW(buf, Files_BufDesc);
 				buf->chg = 0;
 				buf->org = -1;
 				buf->f = f;
-				f->bufs[i] = buf;
+				f->bufs[__X(i, 4)] = buf;
 			} else {
-				buf = f->bufs[i];
+				buf = f->bufs[__X(i, 4)];
 			}
 		} else {
 			f->swapper = __MASK(f->swapper + 1, -4);
-			buf = f->bufs[f->swapper];
+			buf = f->bufs[__X(f->swapper, 4)];
 			Files_Flush(buf);
 		}
 		if (buf->org != org) {
@@ -622,7 +622,7 @@ void Files_Read (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x)
 	}
 	Files_Assert(offset <= buf->size);
 	if (offset < buf->size) {
-		*x = buf->data[offset];
+		*x = buf->data[__X(offset, 4096)];
 		(*r).offset = offset + 1;
 	} else if ((*r).org + offset < buf->f->len) {
 		Files_Set(&*r, r__typ, (*r).buf->f, (*r).org + offset);
@@ -660,7 +660,7 @@ void Files_ReadBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS x
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&buf->data[offset], (ADDRESS)&x[xpos], min);
+		__MOVE((ADDRESS)&buf->data[__X(offset, 4096)], (ADDRESS)&x[__X(xpos, x__len)], min);
 		offset += min;
 		(*r).offset = offset;
 		xpos += min;
@@ -689,7 +689,7 @@ void Files_Write (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE x)
 		offset = (*r).offset;
 	}
 	Files_Assert(offset < 4096);
-	buf->data[offset] = x;
+	buf->data[__X(offset, 4096)] = x;
 	buf->chg = 1;
 	if (offset == buf->size) {
 		buf->size += 1;
@@ -723,7 +723,7 @@ void Files_WriteBytes (Files_Rider *r, ADDRESS *r__typ, SYSTEM_BYTE *x, ADDRESS
 		} else {
 			min = n;
 		}
-		__MOVE((ADDRESS)&x[xpos], (ADDRESS)&buf->data[offset], min);
+		__MOVE((ADDRESS)&x[__X(xpos, x__len)], (ADDRESS)&buf->data[__X(offset, 4096)], min);
 		offset += min;
 		(*r).offset = offset;
 		Files_Assert(offset <= 4096);
@@ -817,12 +817,12 @@ void Files_Register (Files_File f)
 	}
 	Files_Close(f);
 	if (f->registerName[0] != 0x00) {
-		Files_Deregister(f->registerName, 101);
-		Files_Rename(f->workName, 101, f->registerName, 101, &errcode);
+		Files_Deregister(f->registerName, 256);
+		Files_Rename(f->workName, 256, f->registerName, 256, &errcode);
 		if (errcode != 0) {
 			Files_Err((CHAR*)"Couldn't rename temp name as register name", 43, f, errcode);
 		}
-		__MOVE(f->registerName, f->workName, 101);
+		__MOVE(f->registerName, f->workName, 256);
 		f->registerName[0] = 0x00;
 		f->tempFile = 0;
 	}
@@ -843,7 +843,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, ADDRESS src__len, SYSTEM_BYTE *de
 		j = 0;
 		while (i > 0) {
 			i -= 1;
-			dest[j] = src[i];
+			dest[__X(j, dest__len)] = src[__X(i, src__len)];
 			j += 1;
 		}
 	} else {
@@ -900,7 +900,7 @@ void Files_ReadString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	i = 0;
 	do {
 		Files_Read(&*R, R__typ, (void*)&ch);
-		x[i] = ch;
+		x[__X(i, x__len)] = ch;
 		i += 1;
 	} while (!(ch == 0x00));
 }
@@ -910,16 +910,16 @@ void Files_ReadLine (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len)
 	INT16 i;
 	i = 0;
 	do {
-		Files_Read(&*R, R__typ, (void*)&x[i]);
+		Files_Read(&*R, R__typ, (void*)&x[__X(i, x__len)]);
 		i += 1;
-	} while (!(x[i - 1] == 0x00 || x[i - 1] == 0x0a));
-	if (x[i - 1] == 0x0a) {
+	} while (!(x[__X(i - 1, x__len)] == 0x00 || x[__X(i - 1, x__len)] == 0x0a));
+	if (x[__X(i - 1, x__len)] == 0x0a) {
 		i -= 1;
 	}
-	if ((i > 0 && x[i - 1] == 0x0d)) {
+	if ((i > 0 && x[__X(i - 1, x__len)] == 0x0d)) {
 		i -= 1;
 	}
-	x[i] = 0x00;
+	x[__X(i, x__len)] = 0x00;
 }
 
 void Files_ReadNum (Files_Rider *R, ADDRESS *R__typ, SYSTEM_BYTE *x, ADDRESS x__len)
@@ -947,18 +947,18 @@ void Files_WriteBool (Files_Rider *R, ADDRESS *R__typ, BOOLEAN x)
 void Files_WriteInt (Files_Rider *R, ADDRESS *R__typ, INT16 x)
 {
 	CHAR b[2];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 2, 2);
 }
 
 void Files_WriteLInt (Files_Rider *R, ADDRESS *R__typ, INT32 x)
 {
 	CHAR b[4];
-	b[0] = (CHAR)x;
-	b[1] = (CHAR)__ASHR(x, 8);
-	b[2] = (CHAR)__ASHR(x, 16);
-	b[3] = (CHAR)__ASHR(x, 24);
+	b[0] = __CHR(x);
+	b[1] = __CHR(__ASHR(x, 8));
+	b[2] = __CHR(__ASHR(x, 16));
+	b[3] = __CHR(__ASHR(x, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -967,10 +967,10 @@ void Files_WriteSet (Files_Rider *R, ADDRESS *R__typ, UINT32 x)
 	CHAR b[4];
 	INT32 i;
 	i = (INT32)x;
-	b[0] = (CHAR)i;
-	b[1] = (CHAR)__ASHR(i, 8);
-	b[2] = (CHAR)__ASHR(i, 16);
-	b[3] = (CHAR)__ASHR(i, 24);
+	b[0] = __CHR(i);
+	b[1] = __CHR(__ASHR(i, 8));
+	b[2] = __CHR(__ASHR(i, 16));
+	b[3] = __CHR(__ASHR(i, 24));
 	Files_WriteBytes(&*R, R__typ, (void*)b, 4, 4);
 }
 
@@ -992,7 +992,7 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 {
 	INT16 i;
 	i = 0;
-	while (x[i] != 0x00) {
+	while (x[__X(i, x__len)] != 0x00) {
 		i += 1;
 	}
 	Files_WriteBytes(&*R, R__typ, (void*)x, x__len * 1, i + 1);
@@ -1001,10 +1001,10 @@ void Files_WriteString (Files_Rider *R, ADDRESS *R__typ, CHAR *x, ADDRESS x__len
 void Files_WriteNum (Files_Rider *R, ADDRESS *R__typ, INT64 x)
 {
 	while (x < -64 || x > 63) {
-		Files_Write(&*R, R__typ, (CHAR)(__MASK(x, -128) + 128));
+		Files_Write(&*R, R__typ, __CHR(__MASK(x, -128) + 128));
 		x = __ASHR(x, 7);
 	}
-	Files_Write(&*R, R__typ, (CHAR)__MASK(x, -128));
+	Files_Write(&*R, R__typ, __CHR(__MASK(x, -128)));
 }
 
 void Files_GetName (Files_File f, CHAR *name, ADDRESS name__len)
@@ -1041,7 +1041,7 @@ static void Files_Finalize (SYSTEM_PTR o)
 	if (f->fd >= 0) {
 		Files_CloseOSFile(f);
 		if (f->tempFile) {
-			res = Platform_Unlink((void*)f->workName, 101);
+			res = Platform_Unlink((void*)f->workName, 256);
 		}
 	}
 }
@@ -1063,7 +1063,7 @@ static void EnumPtrs(void (*P)(void*))
 	P(Files_SearchPath);
 }
 
-__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 280), {232, 240, 248, 256, -40}};
+__TDESC(Files_FileDesc, 1, 4) = {__TDFLDS("FileDesc", 592), {544, 552, 560, 568, -40}};
 __TDESC(Files_BufDesc, 1, 1) = {__TDFLDS("BufDesc", 4120), {0, -16}};
 __TDESC(Files_Rider, 1, 1) = {__TDFLDS("Rider", 24), {8, -16}};
 
@@ -1083,5 +1083,7 @@ export void *Files__init(void)
 	Heap_FileCount = 0;
 	Files_HOME[0] = 0x00;
 	Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024);
+	Files_MaxPathLength = Platform_MaxPathLength();
+	Files_MaxNameLength = Platform_MaxNameLength();
 	__ENDMOD;
 }

+ 3 - 2
data/bin/voc/src/bootstrap/windows-88/Files.h → data/bin/voc/bootstrap/unix-88/Files.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Files__h
 #define Files__h
@@ -11,7 +11,7 @@ typedef
 typedef
 	struct Files_FileDesc {
 		INT64 _prvt0;
-		char _prvt1[280];
+		char _prvt1[584];
 	} Files_FileDesc;
 
 typedef
@@ -23,6 +23,7 @@ typedef
 	} Files_Rider;
 
 
+import INT16 Files_MaxPathLength, Files_MaxNameLength;
 
 import ADDRESS *Files_FileDesc__typ;
 import ADDRESS *Files_Rider__typ;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Heap.c → data/bin/voc/bootstrap/unix-88/Heap.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Heap.h → data/bin/voc/bootstrap/unix-88/Heap.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tsSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. rtsSF */
 
 #ifndef Heap__h
 #define Heap__h

+ 2 - 2
data/bin/voc/src/bootstrap/unix-88/Modules.c → data/bin/voc/bootstrap/unix-88/Modules.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -404,7 +404,7 @@ static void Modules_errint (INT32 l)
 	if (l >= 10) {
 		Modules_errint(__DIV(l, 10));
 	}
-	Modules_errch((CHAR)((int)__MOD(l, 10) + 48));
+	Modules_errch(__CHR((int)__MOD(l, 10) + 48));
 }
 
 static void Modules_DisplayHaltCode (INT32 code)

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/Modules.h → data/bin/voc/bootstrap/unix-88/Modules.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef Modules__h
 #define Modules__h

+ 44 - 54
data/bin/voc/src/bootstrap/windows-48/OPB.c → data/bin/voc/bootstrap/unix-88/OPB.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -261,7 +261,7 @@ static void OPB_CharToString (OPT_Node n)
 {
 	CHAR ch;
 	n->typ = OPT_stringtyp;
-	ch = (CHAR)n->conval->intval;
+	ch = __CHR(n->conval->intval);
 	n->conval->ext = OPT_NewExt();
 	if (ch == 0x00) {
 		n->conval->intval2 = 1;
@@ -597,7 +597,7 @@ void OPB_MOp (INT8 op, OPT_Node *x)
 			case 22: 
 				if (f == 3) {
 					if (z->class == 7) {
-						z->conval->intval = (INT16)__CAP((CHAR)z->conval->intval);
+						z->conval->intval = (INT16)__CAP(__CHR(z->conval->intval));
 						z->obj = NIL;
 					} else {
 						z = NewOp__29(op, typ, z);
@@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ)
 					OPB_err(203);
 					r = (LONGREAL)1;
 				}
-				(*x)->conval->intval = (INT32)__ENTIER(r);
+				(*x)->conval->intval = __SHORT(__ENTIER(r), 2147483648LL);
 				OPB_SetIntType(*x);
 			}
 		}
@@ -1738,16 +1738,6 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 			}
 			x->typ = OPT_linttyp;
 			break;
-		case 12: 
-			if (x->class == 8 || x->class == 9) {
-				OPB_err(126);
-			} else if (__IN(f, 0x60, 32)) {
-				OPB_Convert(&x, OPT_inttyp);
-			} else {
-				OPB_err(111);
-			}
-			x->typ = OPT_inttyp;
-			break;
 		case 6: 
 			OPB_MOp(23, &x);
 			break;
@@ -1857,7 +1847,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 14: case 15: 
+		case 13: case 14: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f != 4) {
@@ -1866,7 +1856,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (x->typ->form != 7) {
@@ -1876,12 +1866,12 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(76);
 			}
 			break;
-		case 18: 
+		case 17: 
 			if (!__IN(x->typ->comp, 0x0c, 32)) {
 				OPB_err(131);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if ((x->class == 7 && f == 3)) {
 				OPB_CharToString(x);
 				f = 8;
@@ -1892,7 +1882,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -1904,11 +1894,11 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_linttyp;
 			}
 			break;
-		case 21: 
+		case 20: 
 			OPB_CheckLeaf(x, 0);
 			OPB_MOp(24, &x);
 			break;
-		case 13: 
+		case 12: 
 			if (x->class != 8) {
 				OPB_err(110);
 				x = OPB_NewIntConst(1);
@@ -1921,17 +1911,17 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x = OPB_NewIntConst(1);
 			}
 			break;
-		case 22: 
+		case 21: 
 			OPB_MOp(25, &x);
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (!__IN(f, 0x9a, 32)) {
 				OPB_err(111);
 			}
 			break;
-		case 25: case 26: case 29: case 32: 
+		case 24: case 25: case 28: case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -1941,7 +1931,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				x->typ = OPT_adrtyp;
 			}
 			break;
-		case 27: case 28: 
+		case 26: case 27: 
 			if ((f == 4 && x->class == 7)) {
 				if (x->conval->intval < 0 || x->conval->intval > -1) {
 					OPB_err(220);
@@ -1950,14 +1940,14 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(69);
 			}
 			break;
-		case 30: 
+		case 29: 
 			if (x->class != 8) {
 				OPB_err(110);
 			} else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) {
 				OPB_err(111);
 			}
 			break;
-		case 31: 
+		case 30: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if (f == 11) {
@@ -1965,7 +1955,7 @@ void OPB_StPar0 (OPT_Node *par0, INT16 fctno)
 				OPB_err(111);
 			}
 			break;
-		case 33: 
+		case 32: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				x = OPB_NewBoolConst(0);
@@ -2012,7 +2002,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 	p = *par0;
 	f = x->typ->form;
 	switch (fctno) {
-		case 14: case 15: 
+		case 13: case 14: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 				p->typ = OPT_notyp;
@@ -2028,7 +2018,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = OPT_notyp;
 			}
 			break;
-		case 16: case 17: 
+		case 15: case 16: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2041,7 +2031,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 18: 
+		case 17: 
 			if (!(f == 4) || x->class != 7) {
 				OPB_err(69);
 			} else if (x->typ->size == 1) {
@@ -2072,7 +2062,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(132);
 			}
 			break;
-		case 19: 
+		case 18: 
 			if (OPB_NotVar(x)) {
 				OPB_err(112);
 			} else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) {
@@ -2082,13 +2072,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				t = x;
 				x = p;
 				p = t;
-				p = NewOp__54(19, 19, p, x);
+				p = NewOp__54(19, 18, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 20: 
+		case 19: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2132,13 +2122,13 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				OPB_err(64);
 			}
 			break;
-		case 23: case 24: 
+		case 22: case 23: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f != 4) {
 				OPB_err(111);
 			} else {
-				if (fctno == 23) {
+				if (fctno == 22) {
 					p = NewOp__54(12, 27, p, x);
 				} else {
 					p = NewOp__54(12, 28, p, x);
@@ -2146,11 +2136,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 				p->typ = p->left->typ;
 			}
 			break;
-		case 25: case 26: case 27: case 28: 
+		case 24: case 25: case 26: case 27: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (__IN(f, 0x18ff, 32)) {
-				if (fctno == 25 || fctno == 27) {
+				if (fctno == 24 || fctno == 26) {
 					if (OPB_NotVar(x)) {
 						OPB_err(112);
 					}
@@ -2164,7 +2154,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 29: 
+		case 28: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
@@ -2174,7 +2164,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->typ = OPT_booltyp;
 			break;
-		case 30: 
+		case 29: 
 			if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) {
 				OPB_err(126);
 			}
@@ -2194,17 +2184,17 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p = x;
 			break;
-		case 31: 
+		case 30: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if (f == 4) {
-				p = NewOp__54(19, 31, p, x);
+				p = NewOp__54(19, 30, p, x);
 			} else {
 				OPB_err(111);
 			}
 			p->typ = OPT_notyp;
 			break;
-		case 32: 
+		case 31: 
 			if (x->class == 8 || x->class == 9) {
 				OPB_err(126);
 			} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
@@ -2215,7 +2205,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 			}
 			p->link = x;
 			break;
-		case 33: 
+		case 32: 
 			if ((f == 4 && x->class == 7)) {
 				if ((0 <= x->conval->intval && x->conval->intval <= 255)) {
 					OPB_BindNodes(28, OPT_notyp, &x, x);
@@ -2230,7 +2220,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, INT8 fctno)
 					} else if (p->class == 28) {
 						OPB_err(99);
 					} else {
-						p->subcl = 33;
+						p->subcl = 32;
 					}
 				} else {
 					OPB_err(218);
@@ -2272,12 +2262,12 @@ void OPB_StParN (OPT_Node *par0, OPT_Node x, INT16 fctno, INT16 n)
 		} else {
 			OPB_err(111);
 		}
-	} else if ((fctno == 32 && n == 2)) {
+	} else if ((fctno == 31 && n == 2)) {
 		if (x->class == 8 || x->class == 9) {
 			OPB_err(126);
 		} else if (f == 4) {
 			node = OPT_NewNode(19);
-			node->subcl = 32;
+			node->subcl = 31;
 			node->right = p;
 			node->left = p->link;
 			p->link = x;
@@ -2297,22 +2287,22 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 	INT16 dim;
 	OPT_Node x = NIL, p = NIL;
 	p = *par0;
-	if (fctno <= 20) {
+	if (fctno <= 19) {
 		if ((fctno == 1 && p->typ != OPT_notyp)) {
 			if (p->typ->comp == 3) {
 				OPB_err(65);
 			}
 			p->typ = OPT_notyp;
-		} else if (fctno <= 13) {
+		} else if (fctno <= 12) {
 			if (parno < 1) {
 				OPB_err(65);
 			}
 		} else {
-			if (((fctno == 14 || fctno == 15) && parno == 1)) {
+			if (((fctno == 13 || fctno == 14) && parno == 1)) {
 				OPB_BindNodes(19, OPT_notyp, &p, OPB_NewIntConst(1));
 				p->subcl = fctno;
 				p->right->typ = p->left->typ;
-			} else if ((fctno == 18 && parno == 1)) {
+			} else if ((fctno == 17 && parno == 1)) {
 				if (p->typ->comp == 3) {
 					dim = 0;
 					while (p->class == 4) {
@@ -2328,7 +2318,7 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 				OPB_err(65);
 			}
 		}
-	} else if (fctno == 33) {
+	} else if (fctno == 32) {
 		if (parno == 1) {
 			x = NIL;
 			OPB_BindNodes(28, OPT_notyp, &x, OPB_NewIntConst(0));
@@ -2343,13 +2333,13 @@ void OPB_StFct (OPT_Node *par0, INT8 fctno, INT16 parno)
 			} else if (p->class == 28) {
 				OPB_err(99);
 			} else {
-				p->subcl = 33;
+				p->subcl = 32;
 			}
 		} else if (parno < 1) {
 			OPB_err(65);
 		}
 	} else {
-		if ((parno < 1 || (fctno > 22 && parno < 2)) || (fctno == 32 && parno < 3)) {
+		if ((parno < 1 || (fctno > 21 && parno < 2)) || (fctno == 31 && parno < 3)) {
 			OPB_err(65);
 		}
 	}

+ 1 - 1
data/bin/voc/src/bootstrap/windows-48/OPB.h → data/bin/voc/bootstrap/unix-88/OPB.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPB__h
 #define OPB__h

+ 16 - 10
data/bin/voc/src/bootstrap/unix-44/OPC.c → data/bin/voc/bootstrap/unix-88/OPC.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -681,6 +681,10 @@ static void OPC_DefineType (OPT_Struct str)
 					OPC_DefineType(str->BaseTyp);
 				}
 			} else if (__IN(str->comp, 0x0c, 32)) {
+				if ((str->BaseTyp->strobj != NIL && str->BaseTyp->strobj->linkadr == 1)) {
+					OPM_Mark(244, str->txtpos);
+					str->BaseTyp->strobj->linkadr = 2;
+				}
 				OPC_DefineType(str->BaseTyp);
 			} else if (str->form == 12) {
 				if (str->BaseTyp != OPT_notyp) {
@@ -1739,7 +1743,7 @@ static void OPC_CharacterLiteral (INT64 c)
 		if ((c == 92 || c == 39) || c == 63) {
 			OPM_Write('\\');
 		}
-		OPM_Write((CHAR)c);
+		OPM_Write(__CHR(c));
 		OPM_Write('\'');
 	}
 }
@@ -1755,16 +1759,16 @@ static void OPC_StringLiteral (CHAR *s, ADDRESS s__len, INT32 l)
 		c = (INT16)s[__X(i, s__len)];
 		if (c < 32 || c > 126) {
 			OPM_Write('\\');
-			OPM_Write((CHAR)(48 + __ASHR(c, 6)));
+			OPM_Write(__CHR(48 + __ASHR(c, 6)));
 			c = __MASK(c, -64);
-			OPM_Write((CHAR)(48 + __ASHR(c, 3)));
+			OPM_Write(__CHR(48 + __ASHR(c, 3)));
 			c = __MASK(c, -8);
-			OPM_Write((CHAR)(48 + c));
+			OPM_Write(__CHR(48 + c));
 		} else {
 			if ((c == 92 || c == 34) || c == 63) {
 				OPM_Write('\\');
 			}
-			OPM_Write((CHAR)c);
+			OPM_Write(__CHR(c));
 		}
 		i += 1;
 	}
@@ -1830,6 +1834,12 @@ void OPC_IntLiteral (INT64 n, INT32 size)
 
 void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 {
+	INT64 d;
+	d = dim;
+	while (d > 0) {
+		array = array->BaseTyp;
+		d -= 1;
+	}
 	if (array->comp == 3) {
 		OPC_CompleteIdent(obj);
 		OPM_WriteString((CHAR*)"__len", 6);
@@ -1837,10 +1847,6 @@ void OPC_Len (OPT_Object obj, OPT_Struct array, INT64 dim)
 			OPM_WriteInt(dim);
 		}
 	} else {
-		while (dim > 0) {
-			array = array->BaseTyp;
-			dim -= 1;
-		}
 		OPM_WriteInt(array->n);
 	}
 }

+ 1 - 1
data/bin/voc/src/bootstrap/unix-48/OPC.h → data/bin/voc/bootstrap/unix-88/OPC.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPC__h
 #define OPC__h

+ 49 - 23
data/bin/voc/src/bootstrap/unix-88/OPM.c → data/bin/voc/bootstrap/unix-88/OPM.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -606,7 +606,7 @@ static void OPM_ShowLine (INT64 pos)
 	if (pos >= (INT64)OPM_ErrorLineLimitPos) {
 		pos = OPM_ErrorLineLimitPos - 1;
 	}
-	i = (INT16)OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos);
+	i = __SHORTF(OPM_Longint(pos - (INT64)OPM_ErrorLineStartPos), 32768);
 	while (i > 0) {
 		OPM_LogW(' ');
 		i -= 1;
@@ -865,17 +865,17 @@ void OPM_WriteHex (INT64 i)
 {
 	CHAR s[3];
 	INT32 digit;
-	digit = __ASHR((INT32)i, 4);
+	digit = __ASHR(__SHORT(i, 2147483648LL), 4);
 	if (digit < 10) {
-		s[0] = (CHAR)(48 + digit);
+		s[0] = __CHR(48 + digit);
 	} else {
-		s[0] = (CHAR)(87 + digit);
+		s[0] = __CHR(87 + digit);
 	}
-	digit = __MASK((INT32)i, -16);
+	digit = __MASK(__SHORT(i, 2147483648LL), -16);
 	if (digit < 10) {
-		s[1] = (CHAR)(48 + digit);
+		s[1] = __CHR(48 + digit);
 	} else {
-		s[1] = (CHAR)(87 + digit);
+		s[1] = __CHR(87 + digit);
 	}
 	s[2] = 0x00;
 	OPM_WriteString(s, 3);
@@ -897,11 +897,11 @@ void OPM_WriteInt (INT64 i)
 			__MOVE("LL", s, 3);
 			k = 2;
 		}
-		s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+		s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 		i1 = __DIV(i1, 10);
 		k += 1;
 		while (i1 > 0) {
-			s[__X(k, 26)] = (CHAR)(__MOD(i1, 10) + 48);
+			s[__X(k, 26)] = __CHR(__MOD(i1, 10) + 48);
 			i1 = __DIV(i1, 10);
 			k += 1;
 		}
@@ -924,13 +924,13 @@ void OPM_WriteReal (LONGREAL r, CHAR suffx)
 	CHAR s[32];
 	CHAR ch;
 	INT16 i;
-	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == ((INT32)__ENTIER(r)))) {
+	if ((((r < OPM_SignedMaximum(OPM_LongintSize) && r > OPM_SignedMinimum(OPM_LongintSize))) && r == (__SHORT(__ENTIER(r), 2147483648LL)))) {
 		if (suffx == 'f') {
 			OPM_WriteString((CHAR*)"(REAL)", 7);
 		} else {
 			OPM_WriteString((CHAR*)"(LONGREAL)", 11);
 		}
-		OPM_WriteInt((INT32)__ENTIER(r));
+		OPM_WriteInt(__SHORT(__ENTIER(r), 2147483648LL));
 	} else {
 		Texts_OpenWriter(&W, Texts_Writer__typ);
 		if (suffx == 'f') {
@@ -1050,27 +1050,53 @@ static BOOLEAN OPM_IsProbablyInstallDir (CHAR *s, ADDRESS s__len)
 {
 	CHAR testpath[4096];
 	Platform_FileIdentity identity;
-	BOOLEAN result;
 	__DUP(s, s__len, CHAR);
 	__COPY(OPM_InstallDir, testpath, 4096);
-	Strings_Append((CHAR*)"/voc.exe", 9, (void*)testpath, 4096);
-	result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
-	if (!result) {
-		__COPY(OPM_InstallDir, testpath, 4096);
-		Strings_Append((CHAR*)"/voc", 5, (void*)testpath, 4096);
-		result = Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0;
+	Strings_Append((CHAR*)"/lib/lib", 9, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"voc", 4, (void*)testpath, 4096);
+	Strings_Append((CHAR*)"-O2.a", 6, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/include/Oberon.h", 20, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
+	}
+	__COPY(OPM_InstallDir, testpath, 4096);
+	Strings_Append((CHAR*)"/2/sym/Files.sym", 17, (void*)testpath, 4096);
+	if (Platform_IdentifyByName(testpath, 4096, &identity, Platform_FileIdentity__typ) != 0) {
+		__DEL(s);
+		return 0;
 	}
 	__DEL(s);
-	return result;
+	return 1;
 }
 
 static void OPM_FindInstallDir (void)
 {
+	INT16 i;
+	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"/", 2, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)"voc", 4, (void*)OPM_InstallDir, 1024);
+	Strings_Append((CHAR*)".d", 3, (void*)OPM_InstallDir, 1024);
+	if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+		return;
+	}
 	__COPY(Modules_BinaryDir, OPM_InstallDir, 1024);
-	if (!OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
-		__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	i = Strings_Length(OPM_InstallDir, 1024);
+	while ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] != '/')) {
+		i -= 1;
+	}
+	if ((i > 0 && OPM_InstallDir[__X(i - 1, 1024)] == '/')) {
+		OPM_InstallDir[__X(i - 1, 1024)] = 0x00;
+		if (OPM_IsProbablyInstallDir(OPM_InstallDir, 1024)) {
+			return;
+		}
 	}
-	__COPY("../data/bin/voc", OPM_InstallDir, 1024);
+	__COPY("", OPM_InstallDir, 1024);
 }
 
 static void EnumPtrs(void (*P)(void*))

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPM.h → data/bin/voc/bootstrap/unix-88/OPM.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPM__h
 #define OPM__h

+ 7 - 7
data/bin/voc/src/bootstrap/unix-88/OPP.c → data/bin/voc/bootstrap/unix-88/OPP.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -634,7 +634,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	OPT_Node y = NIL;
 	INT8 m;
 	INT16 n;
-	m = (INT8)((INT16)(*x)->obj->adr);
+	m = __SHORT(__SHORT((*x)->obj->adr, 32768), 128);
 	n = 0;
 	if (OPP_sym == 30) {
 		OPS_Get(&OPP_sym);
@@ -669,7 +669,7 @@ static void OPP_StandProcCall (OPT_Node *x)
 	} else {
 		OPP_err(30);
 	}
-	if ((OPP_level > 0 && (m == 1 || m == 31))) {
+	if ((OPP_level > 0 && (m == 1 || m == 30))) {
 		OPT_topScope->link->leaf = 0;
 	}
 }
@@ -943,7 +943,7 @@ static void GetCode__19 (void)
 			(*ext)[__X(n + 1, 256)] = OPS_str[__X(n, 256)];
 			n += 1;
 		}
-		(*ext)[0] = (CHAR)n;
+		(*ext)[0] = __CHR(n);
 		OPS_Get(&OPP_sym);
 	} else {
 		for (;;) {
@@ -956,14 +956,14 @@ static void GetCode__19 (void)
 					n = 1;
 				}
 				OPS_Get(&OPP_sym);
-				(*ext)[__X(n, 256)] = (CHAR)c;
+				(*ext)[__X(n, 256)] = __CHR(c);
 			}
 			if (OPP_sym == 19) {
 				OPS_Get(&OPP_sym);
 			} else if (OPP_sym == 35) {
 				OPP_err(19);
 			} else {
-				(*ext)[0] = (CHAR)n;
+				(*ext)[0] = __CHR(n);
 				break;
 			}
 		}
@@ -1501,7 +1501,7 @@ static void OPP_StatSeq (OPT_Node *stat)
 				OPP_CheckSym(27);
 				OPP_StatSeq(&s);
 				y = OPB_NewLeaf(id);
-				OPB_StPar1(&y, z, 14);
+				OPB_StPar1(&y, z, 13);
 				SetPos__35(y);
 				if (s == NIL) {
 					s = y;

+ 1 - 1
data/bin/voc/src/bootstrap/unix-88/OPP.h → data/bin/voc/bootstrap/unix-88/OPP.h

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. xtspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #ifndef OPP__h
 #define OPP__h

+ 10 - 10
data/bin/voc/src/bootstrap/windows-48/OPS.c → data/bin/voc/bootstrap/unix-88/OPS.c

@@ -1,4 +1,4 @@
-/* voc 2.1.0 [2017/07/20]. Bootstrapping compiler for address size 8, alignment 8. tspaSF */
+/* voc 2.1.0 [2019/11/01]. Bootstrapping compiler for address size 8, alignment 8. xrtspaSF */
 
 #define SHORTINT INT8
 #define INTEGER  INT16
@@ -56,11 +56,11 @@ static void OPS_Str (INT8 *sym)
 			OPS_err(241);
 			break;
 		}
-		OPS_str[i] = OPS_ch;
+		OPS_str[__X(i, 256)] = OPS_ch;
 		i += 1;
 	}
 	OPM_Get(&OPS_ch);
-	OPS_str[i] = 0x00;
+	OPS_str[__X(i, 256)] = 0x00;
 	OPS_intval = i + 1;
 	if (OPS_intval == 2) {
 		*sym = 35;
@@ -76,7 +76,7 @@ static void OPS_Identifier (INT8 *sym)
 	INT16 i;
 	i = 0;
 	do {
-		OPS_name[i] = OPS_ch;
+		OPS_name[__X(i, 256)] = OPS_ch;
 		i += 1;
 		OPM_Get(&OPS_ch);
 	} while (!(((OPS_ch < '0' || ('9' < OPS_ch && __CAP(OPS_ch) < 'A')) || 'Z' < __CAP(OPS_ch)) || i == 256));
@@ -84,7 +84,7 @@ static void OPS_Identifier (INT8 *sym)
 		OPS_err(240);
 		i -= 1;
 	}
-	OPS_name[i] = 0x00;
+	OPS_name[__X(i, 256)] = 0x00;
 	*sym = 38;
 }
 
@@ -143,7 +143,7 @@ static void OPS_Number (void)
 		if (('0' <= OPS_ch && OPS_ch <= '9') || (((d == 0 && 'A' <= OPS_ch)) && OPS_ch <= 'F')) {
 			if (m > 0 || OPS_ch != '0') {
 				if (n < 24) {
-					dig[n] = OPS_ch;
+					dig[__X(n, 24)] = OPS_ch;
 					n += 1;
 				}
 				m += 1;
@@ -173,7 +173,7 @@ static void OPS_Number (void)
 				OPS_numtyp = 1;
 				if (n <= 2) {
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -187,7 +187,7 @@ static void OPS_Number (void)
 						OPS_intval = -1;
 					}
 					while (i < n) {
-						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[i], 1);
+						OPS_intval = __ASHL(OPS_intval, 4) + (INT64)Ord__7(dig[__X(i, 24)], 1);
 						i += 1;
 					}
 				} else {
@@ -196,7 +196,7 @@ static void OPS_Number (void)
 			} else {
 				OPS_numtyp = 2;
 				while (i < n) {
-					d = Ord__7(dig[i], 0);
+					d = Ord__7(dig[__X(i, 24)], 0);
 					i += 1;
 					if (OPS_intval <= __DIV(9223372036854775807LL - (INT64)d, 10)) {
 						OPS_intval = OPS_intval * 10 + (INT64)d;
@@ -214,7 +214,7 @@ static void OPS_Number (void)
 		expCh = 'E';
 		while (n > 0) {
 			n -= 1;
-			f = (Ord__7(dig[n], 0) + f) / (LONGREAL)(LONGREAL)10;
+			f = (Ord__7(dig[__X(n, 24)], 0) + f) / (LONGREAL)(LONGREAL)10;
 		}
 		if (OPS_ch == 'E' || OPS_ch == 'D') {
 			expCh = OPS_ch;

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