From d6acf117002d8ca633d9d3b5e7039d11f03a28ed Mon Sep 17 00:00:00 2001 From: David Brown Date: Tue, 19 Jul 2016 15:37:07 +0100 Subject: [PATCH] Update bootstrap sources. --- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Console.c | 2 +- bootstrap/unix-44/Console.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/SYSTEM.c | 20 +++++----- bootstrap/unix-44/SYSTEM.h | 54 ++++++++++++++++----------- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/Vishap.c | 2 +- bootstrap/unix-44/WindowsWrapper.h | 7 ++-- bootstrap/unix-44/errors.c | 2 +- bootstrap/unix-44/errors.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-44/vt100.c | 2 +- bootstrap/unix-44/vt100.h | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Console.c | 2 +- bootstrap/unix-48/Console.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/SYSTEM.c | 20 +++++----- bootstrap/unix-48/SYSTEM.h | 54 ++++++++++++++++----------- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/Vishap.c | 2 +- bootstrap/unix-48/WindowsWrapper.h | 7 ++-- bootstrap/unix-48/errors.c | 2 +- bootstrap/unix-48/errors.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-48/vt100.c | 2 +- bootstrap/unix-48/vt100.h | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Console.c | 2 +- bootstrap/unix-88/Console.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/SYSTEM.c | 20 +++++----- bootstrap/unix-88/SYSTEM.h | 54 ++++++++++++++++----------- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/Vishap.c | 2 +- bootstrap/unix-88/WindowsWrapper.h | 7 ++-- bootstrap/unix-88/errors.c | 2 +- bootstrap/unix-88/errors.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/unix-88/vt100.c | 2 +- bootstrap/unix-88/vt100.h | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Console.c | 2 +- bootstrap/windows-48/Console.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/SYSTEM.c | 20 +++++----- bootstrap/windows-48/SYSTEM.h | 54 ++++++++++++++++----------- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/Vishap.c | 2 +- bootstrap/windows-48/WindowsWrapper.h | 7 ++-- bootstrap/windows-48/errors.c | 2 +- bootstrap/windows-48/errors.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-48/vt100.c | 2 +- bootstrap/windows-48/vt100.h | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Console.c | 2 +- bootstrap/windows-88/Console.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/SYSTEM.c | 20 +++++----- bootstrap/windows-88/SYSTEM.h | 54 ++++++++++++++++----------- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/Vishap.c | 2 +- bootstrap/windows-88/WindowsWrapper.h | 7 ++-- bootstrap/windows-88/errors.c | 2 +- bootstrap/windows-88/errors.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- bootstrap/windows-88/vt100.c | 2 +- bootstrap/windows-88/vt100.h | 2 +- src/tools/make/sourcechanges.sh | 4 +- 211 files changed, 432 insertions(+), 377 deletions(-) diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 6cc8caad..40ee14ce 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/11] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/07/19] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index a9c49d8e..bf6756e8 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Console.c b/bootstrap/unix-44/Console.c index e0c4cf80..a17cab07 100644 --- a/bootstrap/unix-44/Console.c +++ b/bootstrap/unix-44/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-44/Console.h b/bootstrap/unix-44/Console.h index 8df4d5f3..a4799f33 100644 --- a/bootstrap/unix-44/Console.h +++ b/bootstrap/unix-44/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 92d3593e..4ca7a5cf 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index bdb8f0a0..9e409adc 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 0e8d2178..d6248ab0 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index ce80df86..a7c115d1 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index a29a7f9b..5e0ba69f 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index c605ebc6..2387f45f 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 40d66396..a69a396f 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 0a4e9b21..9391eccb 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index f67f0cda..81cadc05 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 6209887e..27fe129c 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 397d4683..05ec3144 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 42e2c9d5..c5e413a3 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index 207e39fc..877f2dc0 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index b0c639c0..c7a155eb 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 3945d04c..e4fb2cf6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index d09d39b6..73fb31d0 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index db859ffa..34c1acb6 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 3c2cf4f3..998a6db8 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index fabbd4ab..1c086988 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 3d6bec56..c9a566de 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 03dad80c..2832d8d3 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 8fa874e7..f5315fd6 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index b9cd1c3d..146ece15 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index aefa8974..79518e88 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/SYSTEM.c b/bootstrap/unix-44/SYSTEM.c index 0fcc5ee2..50e91c6d 100644 --- a/bootstrap/unix-44/SYSTEM.c +++ b/bootstrap/unix-44/SYSTEM.c @@ -36,7 +36,7 @@ void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) { while (n > 0) { P((LONGINT)(uintptr_t)(*((void**)(adr)))); - adr = ((void**)adr) + 1; + adr = ((void**)adr) + 1; n--; } } @@ -49,18 +49,18 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) t = typ; off = *t; while (off >= 0) {P(*(LONGINT*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; + adr = ((char*)adr) + size; n--; } } -LONGINT SYSTEM_DIV(unsigned LONGINT x, unsigned LONGINT y) +LONGINT SYSTEM_DIV(U_LONGINT x, U_LONGINT y) { if ((LONGINT) x >= 0) return (x / y); else return -((y - 1 - x) / y); } -LONGINT SYSTEM_MOD(unsigned LONGINT x, unsigned LONGINT y) -{ unsigned LONGINT m; +LONGINT SYSTEM_MOD(U_LONGINT x, U_LONGINT y) +{ U_LONGINT m; if ((LONGINT) x >= 0) return (x % y); else { m = (-x) % y; if (m != 0) return (y - m); else return 0; @@ -171,29 +171,29 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler SystemSignalHandler SystemInterruptHandler = 0; SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; - + BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { SystemInterruptHandler(2); // SIGINT return TRUE; - } + } } else { // Close, logoff or shutdown - if (SystemQuitHandler) { + if (SystemQuitHandler) { SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - + void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); ConsoleCtrlHandlerSet = TRUE; } } - + void SystemSetInterruptHandler(uintptr_t h) { EnsureConsoleCtrlHandler(); SystemInterruptHandler = (SystemSignalHandler)h; diff --git a/bootstrap/unix-44/SYSTEM.h b/bootstrap/unix-44/SYSTEM.h index 41ef9995..34b69a8a 100644 --- a/bootstrap/unix-44/SYSTEM.h +++ b/bootstrap/unix-44/SYSTEM.h @@ -41,25 +41,35 @@ // Oberon types -#define BOOLEAN char -#define SYSTEM_BYTE unsigned char -#define CHAR unsigned char -#define SHORTINT signed char -#define REAL float -#define LONGREAL double -#define SYSTEM_PTR void* +typedef char BOOLEAN; +typedef unsigned char SYSTEM_BYTE; +typedef unsigned char CHAR; +typedef signed char SHORTINT; +typedef float REAL; +typedef double LONGREAL; +typedef void* SYSTEM_PTR; + +// Unsigned variants are for use by shift and rotate macros. + +typedef unsigned char U_SYSTEM_BYTE; +typedef unsigned char U_CHAR; +typedef unsigned char U_SHORTINT; // For 32 bit builds, the size of LONGINT depends on a make option: #if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64) - #define INTEGER int // INTEGER is 32 bit. - #define LONGINT long long // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef int INTEGER; // INTEGER is 32 bit. + typedef long long LONGINT; // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef unsigned int U_INTEGER; + typedef unsigned long long U_LONGINT; #else - #define INTEGER short int // INTEGER is 16 bit. - #define LONGINT long // LONGINT is 32 bit. + typedef short int INTEGER; // INTEGER is 16 bit. + typedef long LONGINT; // LONGINT is 32 bit. + typedef unsigned short int U_INTEGER; + typedef unsigned long U_LONGINT; #endif -#define SET unsigned LONGINT +typedef U_LONGINT SET; // OS Memory allocation interfaces are in PlatformXXX.Mod @@ -78,8 +88,8 @@ extern double SYSTEM_ABSD (double i); extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_DIV (unsigned LONGINT x, unsigned LONGINT y); -extern LONGINT SYSTEM_MOD (unsigned LONGINT x, unsigned LONGINT y); +extern LONGINT SYSTEM_DIV (U_LONGINT x, U_LONGINT y); +extern LONGINT SYSTEM_MOD (U_LONGINT x, U_LONGINT y); extern LONGINT SYSTEM_ENTIER (double x); @@ -127,22 +137,22 @@ static int __str_cmp(CHAR *x, CHAR *y){ #define __GET(a, x, t) x= *(t*)(uintptr_t)(a) #define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x -#define __LSHL(x, n, t) ((t)((unsigned t)(x)<<(n))) -#define __LSHR(x, n, t) ((t)((unsigned t)(x)>>(n))) +#define __LSHL(x, n, t) ((t)((U_##t)(x)<<(n))) +#define __LSHR(x, n, t) ((t)((U_##t)(x)>>(n))) #define __LSH(x, n, t) ((n)>=0? __LSHL(x, n, t): __LSHR(x, -(n), t)) #define __ASHL(x, n) ((LONGINT)(x)<<(n)) #define __ASHR(x, n) ((LONGINT)(x)>>(n)) #define __ASH(x, n) ((n)>=0?__ASHL(x,n):__ASHR(x,-(n))) -#define __ROTL(x, n, t) ((t)((unsigned t)(x)<<(n)|(unsigned t)(x)>>(8*sizeof(t)-(n)))) -#define __ROTR(x, n, t) ((t)((unsigned t)(x)>>(n)|(unsigned t)(x)<<(8*sizeof(t)-(n)))) +#define __ROTL(x, n, t) ((t)((U_##t)(x)<<(n)|(U_##t)(x)>>(8*sizeof(t)-(n)))) +#define __ROTR(x, n, t) ((t)((U_##t)(x)>>(n)|(U_##t)(x)<<(8*sizeof(t)-(n)))) #define __ROT(x, n, t) ((n)>=0? __ROTL(x, n, t): __ROTR(x, -(n), t)) -#define __BIT(x, n) (*(unsigned LONGINT*)(x)>>(n)&1) +#define __BIT(x, n) (*(U_LONGINT*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(uintptr_t)(d),(char*)(uintptr_t)(s),n) #define __ASHF(x, n) SYSTEM_ASH((LONGINT)(x), (LONGINT)(n)) -#define __SHORT(x, y) ((int)((unsigned LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) +#define __SHORT(x, y) ((int)((U_LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) #define __SHORTF(x, y) ((int)(__RF((x)+(y),(y)+(y))-(y))) #define __CHR(x) ((CHAR)__R(x, 256)) #define __CHRF(x) ((CHAR)__RF(x, 256)) @@ -165,9 +175,9 @@ static int __str_cmp(CHAR *x, CHAR *y){ // Runtime checks -#define __X(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-2),0)) #define __XF(i, ub) SYSTEM_XCHK((LONGINT)(i), (LONGINT)(ub)) -#define __R(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-8),0)) #define __RF(i, ub) SYSTEM_RCHK((LONGINT)(i),(LONGINT)(ub)) #define __RETCHK __retchk: __HALT(-3); return 0; #define __CASECHK __HALT(-4) diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 9b7cedf9..5ea5720d 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index 4e768eb2..3a8ef7a3 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index f975bd5d..3bec2632 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 7eaaec81..f8eeb41d 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/Vishap.c b/bootstrap/unix-44/Vishap.c index b1d58deb..a5d922e9 100644 --- a/bootstrap/unix-44/Vishap.c +++ b/bootstrap/unix-44/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-44/WindowsWrapper.h b/bootstrap/unix-44/WindowsWrapper.h index cdb8714c..b72c815a 100644 --- a/bootstrap/unix-44/WindowsWrapper.h +++ b/bootstrap/unix-44/WindowsWrapper.h @@ -2,8 +2,9 @@ // // Includes Windows.h while avoiding conflicts with Oberon types. + +#define BOOLEAN _BOOLEAN +#define CHAR _CHAR +#include #undef BOOLEAN #undef CHAR -#include -#define BOOLEAN char -#define CHAR unsigned char diff --git a/bootstrap/unix-44/errors.c b/bootstrap/unix-44/errors.c index 8a192c44..e8272348 100644 --- a/bootstrap/unix-44/errors.c +++ b/bootstrap/unix-44/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/errors.h b/bootstrap/unix-44/errors.h index faa4b1ce..7a085f56 100644 --- a/bootstrap/unix-44/errors.h +++ b/bootstrap/unix-44/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index cf9b6b4c..646b357b 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index ea47d26c..1c63c923 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-44/vt100.c b/bootstrap/unix-44/vt100.c index fdcd322d..67bed77e 100644 --- a/bootstrap/unix-44/vt100.c +++ b/bootstrap/unix-44/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-44/vt100.h b/bootstrap/unix-44/vt100.h index 88660721..83c4e777 100644 --- a/bootstrap/unix-44/vt100.h +++ b/bootstrap/unix-44/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index 6cc8caad..40ee14ce 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/11] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/07/19] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index a9c49d8e..bf6756e8 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Console.c b/bootstrap/unix-48/Console.c index e0c4cf80..a17cab07 100644 --- a/bootstrap/unix-48/Console.c +++ b/bootstrap/unix-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-48/Console.h b/bootstrap/unix-48/Console.h index 8df4d5f3..a4799f33 100644 --- a/bootstrap/unix-48/Console.h +++ b/bootstrap/unix-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 92d3593e..4ca7a5cf 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index bdb8f0a0..9e409adc 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 0e8d2178..d6248ab0 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index ce80df86..a7c115d1 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index a29a7f9b..5e0ba69f 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index c605ebc6..2387f45f 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 40d66396..a69a396f 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 0a4e9b21..9391eccb 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index f67f0cda..81cadc05 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 6209887e..27fe129c 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 397d4683..05ec3144 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 42e2c9d5..c5e413a3 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index 207e39fc..877f2dc0 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index b0c639c0..c7a155eb 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 3945d04c..e4fb2cf6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index d09d39b6..73fb31d0 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index db859ffa..34c1acb6 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 3c2cf4f3..998a6db8 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index fabbd4ab..1c086988 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 3d6bec56..c9a566de 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 03dad80c..2832d8d3 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 8fa874e7..f5315fd6 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index b9cd1c3d..146ece15 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index aefa8974..79518e88 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/SYSTEM.c b/bootstrap/unix-48/SYSTEM.c index 0fcc5ee2..50e91c6d 100644 --- a/bootstrap/unix-48/SYSTEM.c +++ b/bootstrap/unix-48/SYSTEM.c @@ -36,7 +36,7 @@ void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) { while (n > 0) { P((LONGINT)(uintptr_t)(*((void**)(adr)))); - adr = ((void**)adr) + 1; + adr = ((void**)adr) + 1; n--; } } @@ -49,18 +49,18 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) t = typ; off = *t; while (off >= 0) {P(*(LONGINT*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; + adr = ((char*)adr) + size; n--; } } -LONGINT SYSTEM_DIV(unsigned LONGINT x, unsigned LONGINT y) +LONGINT SYSTEM_DIV(U_LONGINT x, U_LONGINT y) { if ((LONGINT) x >= 0) return (x / y); else return -((y - 1 - x) / y); } -LONGINT SYSTEM_MOD(unsigned LONGINT x, unsigned LONGINT y) -{ unsigned LONGINT m; +LONGINT SYSTEM_MOD(U_LONGINT x, U_LONGINT y) +{ U_LONGINT m; if ((LONGINT) x >= 0) return (x % y); else { m = (-x) % y; if (m != 0) return (y - m); else return 0; @@ -171,29 +171,29 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler SystemSignalHandler SystemInterruptHandler = 0; SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; - + BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { SystemInterruptHandler(2); // SIGINT return TRUE; - } + } } else { // Close, logoff or shutdown - if (SystemQuitHandler) { + if (SystemQuitHandler) { SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - + void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); ConsoleCtrlHandlerSet = TRUE; } } - + void SystemSetInterruptHandler(uintptr_t h) { EnsureConsoleCtrlHandler(); SystemInterruptHandler = (SystemSignalHandler)h; diff --git a/bootstrap/unix-48/SYSTEM.h b/bootstrap/unix-48/SYSTEM.h index 41ef9995..34b69a8a 100644 --- a/bootstrap/unix-48/SYSTEM.h +++ b/bootstrap/unix-48/SYSTEM.h @@ -41,25 +41,35 @@ // Oberon types -#define BOOLEAN char -#define SYSTEM_BYTE unsigned char -#define CHAR unsigned char -#define SHORTINT signed char -#define REAL float -#define LONGREAL double -#define SYSTEM_PTR void* +typedef char BOOLEAN; +typedef unsigned char SYSTEM_BYTE; +typedef unsigned char CHAR; +typedef signed char SHORTINT; +typedef float REAL; +typedef double LONGREAL; +typedef void* SYSTEM_PTR; + +// Unsigned variants are for use by shift and rotate macros. + +typedef unsigned char U_SYSTEM_BYTE; +typedef unsigned char U_CHAR; +typedef unsigned char U_SHORTINT; // For 32 bit builds, the size of LONGINT depends on a make option: #if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64) - #define INTEGER int // INTEGER is 32 bit. - #define LONGINT long long // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef int INTEGER; // INTEGER is 32 bit. + typedef long long LONGINT; // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef unsigned int U_INTEGER; + typedef unsigned long long U_LONGINT; #else - #define INTEGER short int // INTEGER is 16 bit. - #define LONGINT long // LONGINT is 32 bit. + typedef short int INTEGER; // INTEGER is 16 bit. + typedef long LONGINT; // LONGINT is 32 bit. + typedef unsigned short int U_INTEGER; + typedef unsigned long U_LONGINT; #endif -#define SET unsigned LONGINT +typedef U_LONGINT SET; // OS Memory allocation interfaces are in PlatformXXX.Mod @@ -78,8 +88,8 @@ extern double SYSTEM_ABSD (double i); extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_DIV (unsigned LONGINT x, unsigned LONGINT y); -extern LONGINT SYSTEM_MOD (unsigned LONGINT x, unsigned LONGINT y); +extern LONGINT SYSTEM_DIV (U_LONGINT x, U_LONGINT y); +extern LONGINT SYSTEM_MOD (U_LONGINT x, U_LONGINT y); extern LONGINT SYSTEM_ENTIER (double x); @@ -127,22 +137,22 @@ static int __str_cmp(CHAR *x, CHAR *y){ #define __GET(a, x, t) x= *(t*)(uintptr_t)(a) #define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x -#define __LSHL(x, n, t) ((t)((unsigned t)(x)<<(n))) -#define __LSHR(x, n, t) ((t)((unsigned t)(x)>>(n))) +#define __LSHL(x, n, t) ((t)((U_##t)(x)<<(n))) +#define __LSHR(x, n, t) ((t)((U_##t)(x)>>(n))) #define __LSH(x, n, t) ((n)>=0? __LSHL(x, n, t): __LSHR(x, -(n), t)) #define __ASHL(x, n) ((LONGINT)(x)<<(n)) #define __ASHR(x, n) ((LONGINT)(x)>>(n)) #define __ASH(x, n) ((n)>=0?__ASHL(x,n):__ASHR(x,-(n))) -#define __ROTL(x, n, t) ((t)((unsigned t)(x)<<(n)|(unsigned t)(x)>>(8*sizeof(t)-(n)))) -#define __ROTR(x, n, t) ((t)((unsigned t)(x)>>(n)|(unsigned t)(x)<<(8*sizeof(t)-(n)))) +#define __ROTL(x, n, t) ((t)((U_##t)(x)<<(n)|(U_##t)(x)>>(8*sizeof(t)-(n)))) +#define __ROTR(x, n, t) ((t)((U_##t)(x)>>(n)|(U_##t)(x)<<(8*sizeof(t)-(n)))) #define __ROT(x, n, t) ((n)>=0? __ROTL(x, n, t): __ROTR(x, -(n), t)) -#define __BIT(x, n) (*(unsigned LONGINT*)(x)>>(n)&1) +#define __BIT(x, n) (*(U_LONGINT*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(uintptr_t)(d),(char*)(uintptr_t)(s),n) #define __ASHF(x, n) SYSTEM_ASH((LONGINT)(x), (LONGINT)(n)) -#define __SHORT(x, y) ((int)((unsigned LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) +#define __SHORT(x, y) ((int)((U_LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) #define __SHORTF(x, y) ((int)(__RF((x)+(y),(y)+(y))-(y))) #define __CHR(x) ((CHAR)__R(x, 256)) #define __CHRF(x) ((CHAR)__RF(x, 256)) @@ -165,9 +175,9 @@ static int __str_cmp(CHAR *x, CHAR *y){ // Runtime checks -#define __X(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-2),0)) #define __XF(i, ub) SYSTEM_XCHK((LONGINT)(i), (LONGINT)(ub)) -#define __R(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-8),0)) #define __RF(i, ub) SYSTEM_RCHK((LONGINT)(i),(LONGINT)(ub)) #define __RETCHK __retchk: __HALT(-3); return 0; #define __CASECHK __HALT(-4) diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 9b7cedf9..5ea5720d 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index 4e768eb2..3a8ef7a3 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 06256562..6e92e862 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 7d6146f4..169fe56b 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/Vishap.c b/bootstrap/unix-48/Vishap.c index b1d58deb..a5d922e9 100644 --- a/bootstrap/unix-48/Vishap.c +++ b/bootstrap/unix-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-48/WindowsWrapper.h b/bootstrap/unix-48/WindowsWrapper.h index cdb8714c..b72c815a 100644 --- a/bootstrap/unix-48/WindowsWrapper.h +++ b/bootstrap/unix-48/WindowsWrapper.h @@ -2,8 +2,9 @@ // // Includes Windows.h while avoiding conflicts with Oberon types. + +#define BOOLEAN _BOOLEAN +#define CHAR _CHAR +#include #undef BOOLEAN #undef CHAR -#include -#define BOOLEAN char -#define CHAR unsigned char diff --git a/bootstrap/unix-48/errors.c b/bootstrap/unix-48/errors.c index 8a192c44..e8272348 100644 --- a/bootstrap/unix-48/errors.c +++ b/bootstrap/unix-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/errors.h b/bootstrap/unix-48/errors.h index faa4b1ce..7a085f56 100644 --- a/bootstrap/unix-48/errors.h +++ b/bootstrap/unix-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index cf9b6b4c..646b357b 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index ea47d26c..1c63c923 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/vt100.c b/bootstrap/unix-48/vt100.c index fdcd322d..67bed77e 100644 --- a/bootstrap/unix-48/vt100.c +++ b/bootstrap/unix-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-48/vt100.h b/bootstrap/unix-48/vt100.h index 88660721..83c4e777 100644 --- a/bootstrap/unix-48/vt100.h +++ b/bootstrap/unix-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index 2e9247b8..bdec7223 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/11] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/07/19] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index b8c7482a..00d35df8 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Console.c b/bootstrap/unix-88/Console.c index 243cef3d..28a3d5cf 100644 --- a/bootstrap/unix-88/Console.c +++ b/bootstrap/unix-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-88/Console.h b/bootstrap/unix-88/Console.h index afcd718c..ae5997db 100644 --- a/bootstrap/unix-88/Console.h +++ b/bootstrap/unix-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index ec13a168..f8e3a46a 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 83125844..7b4ace20 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index a119ef7f..9122c75d 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 04fd5506..070c972a 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 1c649e58..0aae7575 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 29c581b4..39c8f674 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 8915bdff..592ee7e0 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index c363d1ef..3e8819ed 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 29166703..008bc7ca 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 957409f7..a80eedad 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 0e9f11f4..b5198578 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index e56dad24..56fcf196 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 478ec10b..3adde5cb 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 6e41e6d9..71e6e1fb 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index fcfc8cdf..8e85be6e 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index b0f099c1..dfa2d800 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index e9543cbc..57333946 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index a1d3e4b5..7f7aff33 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 875f2aed..1091acf3 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 9afa026c..0370a1d7 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index 228c634b..7f0a4d64 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 2868bffc..9ee31f1b 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 15cb6037..911df230 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 304178b9..f166c1b9 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/SYSTEM.c b/bootstrap/unix-88/SYSTEM.c index 0fcc5ee2..50e91c6d 100644 --- a/bootstrap/unix-88/SYSTEM.c +++ b/bootstrap/unix-88/SYSTEM.c @@ -36,7 +36,7 @@ void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) { while (n > 0) { P((LONGINT)(uintptr_t)(*((void**)(adr)))); - adr = ((void**)adr) + 1; + adr = ((void**)adr) + 1; n--; } } @@ -49,18 +49,18 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) t = typ; off = *t; while (off >= 0) {P(*(LONGINT*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; + adr = ((char*)adr) + size; n--; } } -LONGINT SYSTEM_DIV(unsigned LONGINT x, unsigned LONGINT y) +LONGINT SYSTEM_DIV(U_LONGINT x, U_LONGINT y) { if ((LONGINT) x >= 0) return (x / y); else return -((y - 1 - x) / y); } -LONGINT SYSTEM_MOD(unsigned LONGINT x, unsigned LONGINT y) -{ unsigned LONGINT m; +LONGINT SYSTEM_MOD(U_LONGINT x, U_LONGINT y) +{ U_LONGINT m; if ((LONGINT) x >= 0) return (x % y); else { m = (-x) % y; if (m != 0) return (y - m); else return 0; @@ -171,29 +171,29 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler SystemSignalHandler SystemInterruptHandler = 0; SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; - + BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { SystemInterruptHandler(2); // SIGINT return TRUE; - } + } } else { // Close, logoff or shutdown - if (SystemQuitHandler) { + if (SystemQuitHandler) { SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - + void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); ConsoleCtrlHandlerSet = TRUE; } } - + void SystemSetInterruptHandler(uintptr_t h) { EnsureConsoleCtrlHandler(); SystemInterruptHandler = (SystemSignalHandler)h; diff --git a/bootstrap/unix-88/SYSTEM.h b/bootstrap/unix-88/SYSTEM.h index 41ef9995..34b69a8a 100644 --- a/bootstrap/unix-88/SYSTEM.h +++ b/bootstrap/unix-88/SYSTEM.h @@ -41,25 +41,35 @@ // Oberon types -#define BOOLEAN char -#define SYSTEM_BYTE unsigned char -#define CHAR unsigned char -#define SHORTINT signed char -#define REAL float -#define LONGREAL double -#define SYSTEM_PTR void* +typedef char BOOLEAN; +typedef unsigned char SYSTEM_BYTE; +typedef unsigned char CHAR; +typedef signed char SHORTINT; +typedef float REAL; +typedef double LONGREAL; +typedef void* SYSTEM_PTR; + +// Unsigned variants are for use by shift and rotate macros. + +typedef unsigned char U_SYSTEM_BYTE; +typedef unsigned char U_CHAR; +typedef unsigned char U_SHORTINT; // For 32 bit builds, the size of LONGINT depends on a make option: #if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64) - #define INTEGER int // INTEGER is 32 bit. - #define LONGINT long long // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef int INTEGER; // INTEGER is 32 bit. + typedef long long LONGINT; // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef unsigned int U_INTEGER; + typedef unsigned long long U_LONGINT; #else - #define INTEGER short int // INTEGER is 16 bit. - #define LONGINT long // LONGINT is 32 bit. + typedef short int INTEGER; // INTEGER is 16 bit. + typedef long LONGINT; // LONGINT is 32 bit. + typedef unsigned short int U_INTEGER; + typedef unsigned long U_LONGINT; #endif -#define SET unsigned LONGINT +typedef U_LONGINT SET; // OS Memory allocation interfaces are in PlatformXXX.Mod @@ -78,8 +88,8 @@ extern double SYSTEM_ABSD (double i); extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_DIV (unsigned LONGINT x, unsigned LONGINT y); -extern LONGINT SYSTEM_MOD (unsigned LONGINT x, unsigned LONGINT y); +extern LONGINT SYSTEM_DIV (U_LONGINT x, U_LONGINT y); +extern LONGINT SYSTEM_MOD (U_LONGINT x, U_LONGINT y); extern LONGINT SYSTEM_ENTIER (double x); @@ -127,22 +137,22 @@ static int __str_cmp(CHAR *x, CHAR *y){ #define __GET(a, x, t) x= *(t*)(uintptr_t)(a) #define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x -#define __LSHL(x, n, t) ((t)((unsigned t)(x)<<(n))) -#define __LSHR(x, n, t) ((t)((unsigned t)(x)>>(n))) +#define __LSHL(x, n, t) ((t)((U_##t)(x)<<(n))) +#define __LSHR(x, n, t) ((t)((U_##t)(x)>>(n))) #define __LSH(x, n, t) ((n)>=0? __LSHL(x, n, t): __LSHR(x, -(n), t)) #define __ASHL(x, n) ((LONGINT)(x)<<(n)) #define __ASHR(x, n) ((LONGINT)(x)>>(n)) #define __ASH(x, n) ((n)>=0?__ASHL(x,n):__ASHR(x,-(n))) -#define __ROTL(x, n, t) ((t)((unsigned t)(x)<<(n)|(unsigned t)(x)>>(8*sizeof(t)-(n)))) -#define __ROTR(x, n, t) ((t)((unsigned t)(x)>>(n)|(unsigned t)(x)<<(8*sizeof(t)-(n)))) +#define __ROTL(x, n, t) ((t)((U_##t)(x)<<(n)|(U_##t)(x)>>(8*sizeof(t)-(n)))) +#define __ROTR(x, n, t) ((t)((U_##t)(x)>>(n)|(U_##t)(x)<<(8*sizeof(t)-(n)))) #define __ROT(x, n, t) ((n)>=0? __ROTL(x, n, t): __ROTR(x, -(n), t)) -#define __BIT(x, n) (*(unsigned LONGINT*)(x)>>(n)&1) +#define __BIT(x, n) (*(U_LONGINT*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(uintptr_t)(d),(char*)(uintptr_t)(s),n) #define __ASHF(x, n) SYSTEM_ASH((LONGINT)(x), (LONGINT)(n)) -#define __SHORT(x, y) ((int)((unsigned LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) +#define __SHORT(x, y) ((int)((U_LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) #define __SHORTF(x, y) ((int)(__RF((x)+(y),(y)+(y))-(y))) #define __CHR(x) ((CHAR)__R(x, 256)) #define __CHRF(x) ((CHAR)__RF(x, 256)) @@ -165,9 +175,9 @@ static int __str_cmp(CHAR *x, CHAR *y){ // Runtime checks -#define __X(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-2),0)) #define __XF(i, ub) SYSTEM_XCHK((LONGINT)(i), (LONGINT)(ub)) -#define __R(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-8),0)) #define __RF(i, ub) SYSTEM_RCHK((LONGINT)(i),(LONGINT)(ub)) #define __RETCHK __retchk: __HALT(-3); return 0; #define __CASECHK __HALT(-4) diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 77aeeac7..e767e842 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index daaf5699..94a70d57 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index bf7ca304..f5efee7c 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 9b0a8375..5d8e0c33 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/Vishap.c b/bootstrap/unix-88/Vishap.c index adda1b61..822287a3 100644 --- a/bootstrap/unix-88/Vishap.c +++ b/bootstrap/unix-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/WindowsWrapper.h b/bootstrap/unix-88/WindowsWrapper.h index cdb8714c..b72c815a 100644 --- a/bootstrap/unix-88/WindowsWrapper.h +++ b/bootstrap/unix-88/WindowsWrapper.h @@ -2,8 +2,9 @@ // // Includes Windows.h while avoiding conflicts with Oberon types. + +#define BOOLEAN _BOOLEAN +#define CHAR _CHAR +#include #undef BOOLEAN #undef CHAR -#include -#define BOOLEAN char -#define CHAR unsigned char diff --git a/bootstrap/unix-88/errors.c b/bootstrap/unix-88/errors.c index 53223732..a54d8e43 100644 --- a/bootstrap/unix-88/errors.c +++ b/bootstrap/unix-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/errors.h b/bootstrap/unix-88/errors.h index 12762322..205ba3a1 100644 --- a/bootstrap/unix-88/errors.h +++ b/bootstrap/unix-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 63030983..327aeac4 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 3efe7c26..f19d95a4 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/vt100.c b/bootstrap/unix-88/vt100.c index a59c9241..4b742768 100644 --- a/bootstrap/unix-88/vt100.c +++ b/bootstrap/unix-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/vt100.h b/bootstrap/unix-88/vt100.h index 9deec89a..dd08fa37 100644 --- a/bootstrap/unix-88/vt100.h +++ b/bootstrap/unix-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index 6cc8caad..40ee14ce 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/11] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/07/19] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index a9c49d8e..bf6756e8 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Console.c b/bootstrap/windows-48/Console.c index fc3b5226..84f4ea3b 100644 --- a/bootstrap/windows-48/Console.c +++ b/bootstrap/windows-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-48/Console.h b/bootstrap/windows-48/Console.h index 8df4d5f3..a4799f33 100644 --- a/bootstrap/windows-48/Console.h +++ b/bootstrap/windows-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index f28675b3..0eb0643d 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index ad0f8733..cac52834 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 0e8d2178..d6248ab0 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index ce80df86..a7c115d1 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index a29a7f9b..5e0ba69f 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index c605ebc6..2387f45f 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 40d66396..a69a396f 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 0a4e9b21..9391eccb 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index f67f0cda..81cadc05 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 6209887e..27fe129c 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 397d4683..05ec3144 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 42e2c9d5..c5e413a3 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index 207e39fc..877f2dc0 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index b0c639c0..c7a155eb 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 3945d04c..e4fb2cf6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index d09d39b6..73fb31d0 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index db859ffa..34c1acb6 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 3c2cf4f3..998a6db8 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index fabbd4ab..1c086988 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 3d6bec56..c9a566de 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index ec3a17f4..8de5b802 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index f0054fdb..c72e975f 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index b9cd1c3d..146ece15 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index aefa8974..79518e88 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/SYSTEM.c b/bootstrap/windows-48/SYSTEM.c index 0fcc5ee2..50e91c6d 100644 --- a/bootstrap/windows-48/SYSTEM.c +++ b/bootstrap/windows-48/SYSTEM.c @@ -36,7 +36,7 @@ void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) { while (n > 0) { P((LONGINT)(uintptr_t)(*((void**)(adr)))); - adr = ((void**)adr) + 1; + adr = ((void**)adr) + 1; n--; } } @@ -49,18 +49,18 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) t = typ; off = *t; while (off >= 0) {P(*(LONGINT*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; + adr = ((char*)adr) + size; n--; } } -LONGINT SYSTEM_DIV(unsigned LONGINT x, unsigned LONGINT y) +LONGINT SYSTEM_DIV(U_LONGINT x, U_LONGINT y) { if ((LONGINT) x >= 0) return (x / y); else return -((y - 1 - x) / y); } -LONGINT SYSTEM_MOD(unsigned LONGINT x, unsigned LONGINT y) -{ unsigned LONGINT m; +LONGINT SYSTEM_MOD(U_LONGINT x, U_LONGINT y) +{ U_LONGINT m; if ((LONGINT) x >= 0) return (x % y); else { m = (-x) % y; if (m != 0) return (y - m); else return 0; @@ -171,29 +171,29 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler SystemSignalHandler SystemInterruptHandler = 0; SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; - + BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { SystemInterruptHandler(2); // SIGINT return TRUE; - } + } } else { // Close, logoff or shutdown - if (SystemQuitHandler) { + if (SystemQuitHandler) { SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - + void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); ConsoleCtrlHandlerSet = TRUE; } } - + void SystemSetInterruptHandler(uintptr_t h) { EnsureConsoleCtrlHandler(); SystemInterruptHandler = (SystemSignalHandler)h; diff --git a/bootstrap/windows-48/SYSTEM.h b/bootstrap/windows-48/SYSTEM.h index 41ef9995..34b69a8a 100644 --- a/bootstrap/windows-48/SYSTEM.h +++ b/bootstrap/windows-48/SYSTEM.h @@ -41,25 +41,35 @@ // Oberon types -#define BOOLEAN char -#define SYSTEM_BYTE unsigned char -#define CHAR unsigned char -#define SHORTINT signed char -#define REAL float -#define LONGREAL double -#define SYSTEM_PTR void* +typedef char BOOLEAN; +typedef unsigned char SYSTEM_BYTE; +typedef unsigned char CHAR; +typedef signed char SHORTINT; +typedef float REAL; +typedef double LONGREAL; +typedef void* SYSTEM_PTR; + +// Unsigned variants are for use by shift and rotate macros. + +typedef unsigned char U_SYSTEM_BYTE; +typedef unsigned char U_CHAR; +typedef unsigned char U_SHORTINT; // For 32 bit builds, the size of LONGINT depends on a make option: #if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64) - #define INTEGER int // INTEGER is 32 bit. - #define LONGINT long long // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef int INTEGER; // INTEGER is 32 bit. + typedef long long LONGINT; // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef unsigned int U_INTEGER; + typedef unsigned long long U_LONGINT; #else - #define INTEGER short int // INTEGER is 16 bit. - #define LONGINT long // LONGINT is 32 bit. + typedef short int INTEGER; // INTEGER is 16 bit. + typedef long LONGINT; // LONGINT is 32 bit. + typedef unsigned short int U_INTEGER; + typedef unsigned long U_LONGINT; #endif -#define SET unsigned LONGINT +typedef U_LONGINT SET; // OS Memory allocation interfaces are in PlatformXXX.Mod @@ -78,8 +88,8 @@ extern double SYSTEM_ABSD (double i); extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_DIV (unsigned LONGINT x, unsigned LONGINT y); -extern LONGINT SYSTEM_MOD (unsigned LONGINT x, unsigned LONGINT y); +extern LONGINT SYSTEM_DIV (U_LONGINT x, U_LONGINT y); +extern LONGINT SYSTEM_MOD (U_LONGINT x, U_LONGINT y); extern LONGINT SYSTEM_ENTIER (double x); @@ -127,22 +137,22 @@ static int __str_cmp(CHAR *x, CHAR *y){ #define __GET(a, x, t) x= *(t*)(uintptr_t)(a) #define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x -#define __LSHL(x, n, t) ((t)((unsigned t)(x)<<(n))) -#define __LSHR(x, n, t) ((t)((unsigned t)(x)>>(n))) +#define __LSHL(x, n, t) ((t)((U_##t)(x)<<(n))) +#define __LSHR(x, n, t) ((t)((U_##t)(x)>>(n))) #define __LSH(x, n, t) ((n)>=0? __LSHL(x, n, t): __LSHR(x, -(n), t)) #define __ASHL(x, n) ((LONGINT)(x)<<(n)) #define __ASHR(x, n) ((LONGINT)(x)>>(n)) #define __ASH(x, n) ((n)>=0?__ASHL(x,n):__ASHR(x,-(n))) -#define __ROTL(x, n, t) ((t)((unsigned t)(x)<<(n)|(unsigned t)(x)>>(8*sizeof(t)-(n)))) -#define __ROTR(x, n, t) ((t)((unsigned t)(x)>>(n)|(unsigned t)(x)<<(8*sizeof(t)-(n)))) +#define __ROTL(x, n, t) ((t)((U_##t)(x)<<(n)|(U_##t)(x)>>(8*sizeof(t)-(n)))) +#define __ROTR(x, n, t) ((t)((U_##t)(x)>>(n)|(U_##t)(x)<<(8*sizeof(t)-(n)))) #define __ROT(x, n, t) ((n)>=0? __ROTL(x, n, t): __ROTR(x, -(n), t)) -#define __BIT(x, n) (*(unsigned LONGINT*)(x)>>(n)&1) +#define __BIT(x, n) (*(U_LONGINT*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(uintptr_t)(d),(char*)(uintptr_t)(s),n) #define __ASHF(x, n) SYSTEM_ASH((LONGINT)(x), (LONGINT)(n)) -#define __SHORT(x, y) ((int)((unsigned LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) +#define __SHORT(x, y) ((int)((U_LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) #define __SHORTF(x, y) ((int)(__RF((x)+(y),(y)+(y))-(y))) #define __CHR(x) ((CHAR)__R(x, 256)) #define __CHRF(x) ((CHAR)__RF(x, 256)) @@ -165,9 +175,9 @@ static int __str_cmp(CHAR *x, CHAR *y){ // Runtime checks -#define __X(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-2),0)) #define __XF(i, ub) SYSTEM_XCHK((LONGINT)(i), (LONGINT)(ub)) -#define __R(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-8),0)) #define __RF(i, ub) SYSTEM_RCHK((LONGINT)(i),(LONGINT)(ub)) #define __RETCHK __retchk: __HALT(-3); return 0; #define __CASECHK __HALT(-4) diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 9b7cedf9..5ea5720d 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index 4e768eb2..3a8ef7a3 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 06256562..6e92e862 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 7d6146f4..169fe56b 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/Vishap.c b/bootstrap/windows-48/Vishap.c index b1d58deb..a5d922e9 100644 --- a/bootstrap/windows-48/Vishap.c +++ b/bootstrap/windows-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/windows-48/WindowsWrapper.h b/bootstrap/windows-48/WindowsWrapper.h index cdb8714c..b72c815a 100644 --- a/bootstrap/windows-48/WindowsWrapper.h +++ b/bootstrap/windows-48/WindowsWrapper.h @@ -2,8 +2,9 @@ // // Includes Windows.h while avoiding conflicts with Oberon types. + +#define BOOLEAN _BOOLEAN +#define CHAR _CHAR +#include #undef BOOLEAN #undef CHAR -#include -#define BOOLEAN char -#define CHAR unsigned char diff --git a/bootstrap/windows-48/errors.c b/bootstrap/windows-48/errors.c index 8a192c44..e8272348 100644 --- a/bootstrap/windows-48/errors.c +++ b/bootstrap/windows-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/errors.h b/bootstrap/windows-48/errors.h index faa4b1ce..7a085f56 100644 --- a/bootstrap/windows-48/errors.h +++ b/bootstrap/windows-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index cf9b6b4c..646b357b 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index ea47d26c..1c63c923 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/vt100.c b/bootstrap/windows-48/vt100.c index fdcd322d..67bed77e 100644 --- a/bootstrap/windows-48/vt100.c +++ b/bootstrap/windows-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/windows-48/vt100.h b/bootstrap/windows-48/vt100.h index 88660721..83c4e777 100644 --- a/bootstrap/windows-48/vt100.h +++ b/bootstrap/windows-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index 2e9247b8..bdec7223 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/11] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/07/19] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index b8c7482a..00d35df8 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Console.c b/bootstrap/windows-88/Console.c index 49fab6b4..82ab9c30 100644 --- a/bootstrap/windows-88/Console.c +++ b/bootstrap/windows-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-88/Console.h b/bootstrap/windows-88/Console.h index afcd718c..ae5997db 100644 --- a/bootstrap/windows-88/Console.h +++ b/bootstrap/windows-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 5a4bcb4b..cdaf4440 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 23dca75b..03f88e71 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index a119ef7f..9122c75d 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 04fd5506..070c972a 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 1c649e58..0aae7575 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 29c581b4..39c8f674 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 8915bdff..592ee7e0 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index c363d1ef..3e8819ed 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 29166703..008bc7ca 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 957409f7..a80eedad 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 0e9f11f4..b5198578 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index e56dad24..56fcf196 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 478ec10b..3adde5cb 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 6e41e6d9..71e6e1fb 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index fcfc8cdf..8e85be6e 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index b0f099c1..dfa2d800 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index e9543cbc..57333946 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index a1d3e4b5..7f7aff33 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 875f2aed..1091acf3 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 9afa026c..0370a1d7 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index e16a72de..3d29e466 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index f229d6a9..a15fd477 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 15cb6037..911df230 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 304178b9..f166c1b9 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/SYSTEM.c b/bootstrap/windows-88/SYSTEM.c index 0fcc5ee2..50e91c6d 100644 --- a/bootstrap/windows-88/SYSTEM.c +++ b/bootstrap/windows-88/SYSTEM.c @@ -36,7 +36,7 @@ void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) { while (n > 0) { P((LONGINT)(uintptr_t)(*((void**)(adr)))); - adr = ((void**)adr) + 1; + adr = ((void**)adr) + 1; n--; } } @@ -49,18 +49,18 @@ void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) t = typ; off = *t; while (off >= 0) {P(*(LONGINT*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; + adr = ((char*)adr) + size; n--; } } -LONGINT SYSTEM_DIV(unsigned LONGINT x, unsigned LONGINT y) +LONGINT SYSTEM_DIV(U_LONGINT x, U_LONGINT y) { if ((LONGINT) x >= 0) return (x / y); else return -((y - 1 - x) / y); } -LONGINT SYSTEM_MOD(unsigned LONGINT x, unsigned LONGINT y) -{ unsigned LONGINT m; +LONGINT SYSTEM_MOD(U_LONGINT x, U_LONGINT y) +{ U_LONGINT m; if ((LONGINT) x >= 0) return (x % y); else { m = (-x) % y; if (m != 0) return (y - m); else return 0; @@ -171,29 +171,29 @@ typedef void (*SystemSignalHandler)(INTEGER); // = Platform_SignalHandler SystemSignalHandler SystemInterruptHandler = 0; SystemSignalHandler SystemQuitHandler = 0; BOOL ConsoleCtrlHandlerSet = FALSE; - + BOOL WINAPI SystemConsoleCtrlHandler(DWORD ctrlType) { if ((ctrlType == CTRL_C_EVENT) || (ctrlType == CTRL_BREAK_EVENT)) { if (SystemInterruptHandler) { SystemInterruptHandler(2); // SIGINT return TRUE; - } + } } else { // Close, logoff or shutdown - if (SystemQuitHandler) { + if (SystemQuitHandler) { SystemQuitHandler(3); // SIGQUIT return TRUE; } } return FALSE; } - + void EnsureConsoleCtrlHandler() { if (!ConsoleCtrlHandlerSet) { SetConsoleCtrlHandler(SystemConsoleCtrlHandler, TRUE); ConsoleCtrlHandlerSet = TRUE; } } - + void SystemSetInterruptHandler(uintptr_t h) { EnsureConsoleCtrlHandler(); SystemInterruptHandler = (SystemSignalHandler)h; diff --git a/bootstrap/windows-88/SYSTEM.h b/bootstrap/windows-88/SYSTEM.h index 41ef9995..34b69a8a 100644 --- a/bootstrap/windows-88/SYSTEM.h +++ b/bootstrap/windows-88/SYSTEM.h @@ -41,25 +41,35 @@ // Oberon types -#define BOOLEAN char -#define SYSTEM_BYTE unsigned char -#define CHAR unsigned char -#define SHORTINT signed char -#define REAL float -#define LONGREAL double -#define SYSTEM_PTR void* +typedef char BOOLEAN; +typedef unsigned char SYSTEM_BYTE; +typedef unsigned char CHAR; +typedef signed char SHORTINT; +typedef float REAL; +typedef double LONGREAL; +typedef void* SYSTEM_PTR; + +// Unsigned variants are for use by shift and rotate macros. + +typedef unsigned char U_SYSTEM_BYTE; +typedef unsigned char U_CHAR; +typedef unsigned char U_SHORTINT; // For 32 bit builds, the size of LONGINT depends on a make option: #if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64) - #define INTEGER int // INTEGER is 32 bit. - #define LONGINT long long // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef int INTEGER; // INTEGER is 32 bit. + typedef long long LONGINT; // LONGINT is 64 bit. (long long is always 64 bits, while long can be 32 bits e.g. under MSC/MingW) + typedef unsigned int U_INTEGER; + typedef unsigned long long U_LONGINT; #else - #define INTEGER short int // INTEGER is 16 bit. - #define LONGINT long // LONGINT is 32 bit. + typedef short int INTEGER; // INTEGER is 16 bit. + typedef long LONGINT; // LONGINT is 32 bit. + typedef unsigned short int U_INTEGER; + typedef unsigned long U_LONGINT; #endif -#define SET unsigned LONGINT +typedef U_LONGINT SET; // OS Memory allocation interfaces are in PlatformXXX.Mod @@ -78,8 +88,8 @@ extern double SYSTEM_ABSD (double i); extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_DIV (unsigned LONGINT x, unsigned LONGINT y); -extern LONGINT SYSTEM_MOD (unsigned LONGINT x, unsigned LONGINT y); +extern LONGINT SYSTEM_DIV (U_LONGINT x, U_LONGINT y); +extern LONGINT SYSTEM_MOD (U_LONGINT x, U_LONGINT y); extern LONGINT SYSTEM_ENTIER (double x); @@ -127,22 +137,22 @@ static int __str_cmp(CHAR *x, CHAR *y){ #define __GET(a, x, t) x= *(t*)(uintptr_t)(a) #define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x -#define __LSHL(x, n, t) ((t)((unsigned t)(x)<<(n))) -#define __LSHR(x, n, t) ((t)((unsigned t)(x)>>(n))) +#define __LSHL(x, n, t) ((t)((U_##t)(x)<<(n))) +#define __LSHR(x, n, t) ((t)((U_##t)(x)>>(n))) #define __LSH(x, n, t) ((n)>=0? __LSHL(x, n, t): __LSHR(x, -(n), t)) #define __ASHL(x, n) ((LONGINT)(x)<<(n)) #define __ASHR(x, n) ((LONGINT)(x)>>(n)) #define __ASH(x, n) ((n)>=0?__ASHL(x,n):__ASHR(x,-(n))) -#define __ROTL(x, n, t) ((t)((unsigned t)(x)<<(n)|(unsigned t)(x)>>(8*sizeof(t)-(n)))) -#define __ROTR(x, n, t) ((t)((unsigned t)(x)>>(n)|(unsigned t)(x)<<(8*sizeof(t)-(n)))) +#define __ROTL(x, n, t) ((t)((U_##t)(x)<<(n)|(U_##t)(x)>>(8*sizeof(t)-(n)))) +#define __ROTR(x, n, t) ((t)((U_##t)(x)>>(n)|(U_##t)(x)<<(8*sizeof(t)-(n)))) #define __ROT(x, n, t) ((n)>=0? __ROTL(x, n, t): __ROTR(x, -(n), t)) -#define __BIT(x, n) (*(unsigned LONGINT*)(x)>>(n)&1) +#define __BIT(x, n) (*(U_LONGINT*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(uintptr_t)(d),(char*)(uintptr_t)(s),n) #define __ASHF(x, n) SYSTEM_ASH((LONGINT)(x), (LONGINT)(n)) -#define __SHORT(x, y) ((int)((unsigned LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) +#define __SHORT(x, y) ((int)((U_LONGINT)(x)+(y)<(y)+(y)?(x):(__HALT(-8),0))) #define __SHORTF(x, y) ((int)(__RF((x)+(y),(y)+(y))-(y))) #define __CHR(x) ((CHAR)__R(x, 256)) #define __CHRF(x) ((CHAR)__RF(x, 256)) @@ -165,9 +175,9 @@ static int __str_cmp(CHAR *x, CHAR *y){ // Runtime checks -#define __X(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-2),0)) #define __XF(i, ub) SYSTEM_XCHK((LONGINT)(i), (LONGINT)(ub)) -#define __R(i, ub) (((unsigned LONGINT)(i)<(unsigned LONGINT)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((U_LONGINT)(i)<(U_LONGINT)(ub))?i:(__HALT(-8),0)) #define __RF(i, ub) SYSTEM_RCHK((LONGINT)(i),(LONGINT)(ub)) #define __RETCHK __retchk: __HALT(-3); return 0; #define __CASECHK __HALT(-4) diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 77aeeac7..e767e842 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index daaf5699..94a70d57 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index bf7ca304..f5efee7c 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 9b0a8375..5d8e0c33 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/Vishap.c b/bootstrap/windows-88/Vishap.c index adda1b61..822287a3 100644 --- a/bootstrap/windows-88/Vishap.c +++ b/bootstrap/windows-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/WindowsWrapper.h b/bootstrap/windows-88/WindowsWrapper.h index cdb8714c..b72c815a 100644 --- a/bootstrap/windows-88/WindowsWrapper.h +++ b/bootstrap/windows-88/WindowsWrapper.h @@ -2,8 +2,9 @@ // // Includes Windows.h while avoiding conflicts with Oberon types. + +#define BOOLEAN _BOOLEAN +#define CHAR _CHAR +#include #undef BOOLEAN #undef CHAR -#include -#define BOOLEAN char -#define CHAR unsigned char diff --git a/bootstrap/windows-88/errors.c b/bootstrap/windows-88/errors.c index 53223732..a54d8e43 100644 --- a/bootstrap/windows-88/errors.c +++ b/bootstrap/windows-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/errors.h b/bootstrap/windows-88/errors.h index 12762322..205ba3a1 100644 --- a/bootstrap/windows-88/errors.h +++ b/bootstrap/windows-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 63030983..327aeac4 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 3efe7c26..f19d95a4 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/vt100.c b/bootstrap/windows-88/vt100.c index a59c9241..4b742768 100644 --- a/bootstrap/windows-88/vt100.c +++ b/bootstrap/windows-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/vt100.h b/bootstrap/windows-88/vt100.h index 9deec89a..dd08fa37 100644 --- a/bootstrap/windows-88/vt100.h +++ b/bootstrap/windows-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/11] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/07/19] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/src/tools/make/sourcechanges.sh b/src/tools/make/sourcechanges.sh index 4c76f406..dcfb6552 100644 --- a/src/tools/make/sourcechanges.sh +++ b/src/tools/make/sourcechanges.sh @@ -14,8 +14,8 @@ changes="0" for f in $1/*; do fn=$(basename $f) - egrep -v "(^/\* voc )|Configuration_|__MOVE.* cmd, " $f >$fn.old - egrep -v "(^/\* voc )|Configuration_|__MOVE.* cmd, " $fn >$fn.new + egrep -v "(^/\* voc )|Configuration_|__MOVE.* cmd, |OPM_(IntSize|PointerSize|Alignment) =" $f >$fn.old + egrep -v "(^/\* voc )|Configuration_|__MOVE.* cmd, |OPM_(IntSize|PointerSize|Alignment) =" $fn >$fn.new if ! diff -U 2 -b $fn.old $fn.new >$fn.diff; then echo "" echo ""