public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6753] [modula2] target independent doc and tools rebuilt
@ 2023-03-19 13:07 Gaius Mulley
0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2023-03-19 13:07 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8804eb0b880f81998fca6f77abdd01e124e565b7
commit r13-6753-g8804eb0b880f81998fca6f77abdd01e124e565b7
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Sun Mar 19 13:06:53 2023 +0000
[modula2] target independent doc and tools rebuilt
The target independent documentation needs to be rebuilt together with the
bootstrap tools after the library changes and after the <* noreturn *>
attribute has been implemented.
gcc/m2/ChangeLog:
* Make-maintainer.in (gm2.maintainer-clean): Remove.
(gm2.maintainer-help): Add gm2.maintainer-tools,
gm2.maintainer-doc. Remove gm2.maintainer-clean.
Change target-independent directory to target-independent/m2.
* gm2-compiler/ppg.mod: Correct __FILE_ typo to __FILE__.
* gm2-compiler/M2Options.def (SetAutoInit): Update comment.
* gm2-compiler/M2Options.mod (SetAutoInit): Update comment.
* gm2-gcc/m2color.cc (m2color_colorize_start): Rename name_len
to _name_high.
* gm2-gcc/m2color.def (colorize_start): change ARRAY OF CHAR to
ADDRESS and add _name_high.
* gm2-gcc/m2decl.cc (m2decl_BuildStartFunctionDeclaration): Change
int to bool.
* gm2-gcc/m2decl.h (m2decl_BuildStartFunctionDeclaration): Change
int to bool.
* gm2-gcc/m2expr.cc (m2expr_BuildBinarySetDo): Change int to bool.
(m2expr_BuildIfConstInVar): Change int to bool.
(m2expr_BuildIfNotConstInVar): Change int to bool.
(m2expr_BuildIfVarInVar): Change int to bool.
(m2expr_BuildIfNotVarInVar): Change int to bool.
(m2expr_BuildForeachWordInSetDoIfExpr): Change int to bool.
* gm2-gcc/m2expr.h (m2expr_BuildIfNotVarInVar): Change int to bool.
(m2expr_BuildIfVarInVar): Change int to bool.
(m2expr_BuildIfNotConstInVar): Change int to bool.
(m2expr_BuildIfConstInVar): Change int to bool.
* gm2-gcc/m2options.h (M2Options_SetAutoInit): Change int to bool.
(M2Options_SetNilCheck): Change int to bool.
(M2Options_SetReturnCheck): Change int to bool.
(M2Options_SetCaseCheck): Change int to bool.
(M2Options_SetCheckAll): Change int to bool.
(M2Options_SetVerboseUnbounded): Change int to bool.
(M2Options_SetUnboundedByReference): Change int to bool.
(M2Options_SetOptimizing): Change int to bool.
(M2Options_SetQuiet): Change int to bool.
(M2Options_SetCpp): Change int to bool.
(M2Options_SetM2g): Change int to bool.
(M2Options_SetLowerCaseKeywords): Change int to bool.
(M2Options_SetVerbose): Change int to bool.
* gm2-gcc/m2treelib.cc (m2treelib_get_rvalue): Change int to bool.
(m2treelib_get_field_no): Change int to bool.
(m2treelib_get_set_value): Change int to bool.
(m2treelib_get_set_address): Change int to bool.
(m2treelib_get_set_address_if_var): Change int to bool.
* gm2-gcc/m2treelib.def (get_set_address_if_var): Change int to bool.
(get_set_address): Change int to bool.
(get_set_value): Change int to bool.
(get_field_no): Change int to bool.
(get_rvalue): Change int to bool.
* gm2-gcc/m2treelib.h (m2treelib_get_field_no): Change int to bool.
(m2treelib_get_set_value): Change int to bool.
(m2treelib_get_set_address): Change int to bool.
(m2treelib_get_set_address_if_var): Change int to bool.
* gm2-gcc/m2type.cc (m2type_BuildEndFunctionType): Change int to bool.
* gm2-gcc/m2type.h (m2type_BuildEndFunctionType): Change int to bool.
* gm2-libs-ch/dtoa.cc (dtoa_calcsign): Change int to bool.
* gm2-libs-ch/ldtoa.cc (dtoa_calcsign): Change int to bool.
(ldtoa_ldtoa): Change int to bool.
* m2.flex (functionInfo): Change int to bool.
(pushFunction): Change parameter from int to bool.
* mc-boot/GDebug.cc (Debug_Halt): Rebuild.
* mc-boot/GDebug.h (Debug_Halt): Rebuild.
* mc-boot/GDynamicStrings.cc: Rebuild.
* mc-boot/GDynamicStrings.h: Rebuild.
* mc-boot/GFIO.cc: Rebuild.
* mc-boot/GM2RTS.cc: Rebuild.
* mc-boot/GM2RTS.h: Rebuild.
* mc-boot/GPushBackInput.cc: Rebuild.
* mc-boot/GRTExceptions.cc: Rebuild.
* mc-boot/GRTint.cc: Rebuild.
* mc-boot/GSysStorage.cc: Rebuild.
* mc-boot/Gdecl.cc: Rebuild.
* mc-boot/GsymbolKey.cc: Rebuild.
* mc/symbolKey.mod: Rebuild.
* target-independent/m2/Builtins.texi: Rebuild.
* target-independent/m2/SYSTEM-iso.texi: Rebuild.
* target-independent/m2/SYSTEM-pim.texi: Rebuild.
* target-independent/m2/gm2-libs.texi: Rebuild.
* tools-src/def2doc.py (PIM_Log): Change gm2-libs-pim to
gm2-lib-log.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diff:
---
gcc/m2/Make-maintainer.in | 34 +-
gcc/m2/gm2-compiler/M2Options.def | 4 +-
gcc/m2/gm2-compiler/M2Options.mod | 1 +
gcc/m2/gm2-compiler/ppg.mod | 22 +-
gcc/m2/gm2-gcc/m2color.cc | 4 +-
gcc/m2/gm2-gcc/m2color.def | 6 +-
gcc/m2/gm2-gcc/m2decl.cc | 2 +-
gcc/m2/gm2-gcc/m2decl.h | 2 +-
gcc/m2/gm2-gcc/m2expr.cc | 18 +-
gcc/m2/gm2-gcc/m2expr.h | 12 +-
gcc/m2/gm2-gcc/m2options.h | 26 +-
gcc/m2/gm2-gcc/m2treelib.cc | 14 +-
gcc/m2/gm2-gcc/m2treelib.def | 10 +-
gcc/m2/gm2-gcc/m2treelib.h | 10 +-
gcc/m2/gm2-gcc/m2type.cc | 2 +-
gcc/m2/gm2-gcc/m2type.h | 2 +-
gcc/m2/gm2-libs-ch/dtoa.cc | 6 +-
gcc/m2/gm2-libs-ch/ldtoa.cc | 4 +-
gcc/m2/m2.flex | 71 ++--
gcc/m2/mc-boot/GDebug.cc | 13 +-
gcc/m2/mc-boot/GDebug.h | 4 +-
gcc/m2/mc-boot/GDynamicStrings.cc | 12 +-
gcc/m2/mc-boot/GDynamicStrings.h | 4 +-
gcc/m2/mc-boot/GFIO.cc | 2 +-
gcc/m2/mc-boot/GM2RTS.cc | 12 +-
gcc/m2/mc-boot/GM2RTS.h | 4 +-
gcc/m2/mc-boot/GPushBackInput.cc | 6 +-
gcc/m2/mc-boot/GRTExceptions.cc | 32 +-
gcc/m2/mc-boot/GRTint.cc | 12 +-
gcc/m2/mc-boot/GSysStorage.cc | 8 +-
gcc/m2/mc-boot/Gdecl.cc | 10 +-
gcc/m2/mc-boot/GsymbolKey.cc | 6 +-
gcc/m2/mc/symbolKey.mod | 6 +-
gcc/m2/target-independent/m2/Builtins.texi | 6 +-
gcc/m2/target-independent/m2/SYSTEM-iso.texi | 2 +-
gcc/m2/target-independent/m2/SYSTEM-pim.texi | 2 +-
gcc/m2/target-independent/m2/gm2-libs.texi | 466 +++++++++++++--------------
gcc/m2/tools-src/def2doc.py | 2 +-
38 files changed, 412 insertions(+), 447 deletions(-)
diff --git a/gcc/m2/Make-maintainer.in b/gcc/m2/Make-maintainer.in
index 184c5128199..17bd9a2d37e 100644
--- a/gcc/m2/Make-maintainer.in
+++ b/gcc/m2/Make-maintainer.in
@@ -698,28 +698,28 @@ gm2.maintainer-reconfigure: force
( cd $(srcdir)/m2/gm2-libs ; autoheader config-host.in )
( cd $(srcdir)/m2 ; autoconf configure.in > configure )
-gm2.maintainer-clean: force
- -rm -f $(srcdir)/m2/gm2-auto/*
- -rm -f $(srcdir)/m2/gm2-libs.texi
- -rm -f $(srcdir)/m2/gm2-ebnf.texi
- -rm -f $(srcdir)/m2/images/gnu.eps
-
gm2.maintainer-help: force
@echo "make knows about:"
@echo " "
@echo "make gm2.maintainer-help this command"
@echo "make gm2.maintainer-reconfigure rebuild the configure scripts"
- @echo "make gm2.maintainer-clean clean pre-built images and texi files"
+ @echo "make gm2.maintainer-tools rebuild mc and ppg bootstrap tools"
+ @echo " note gm2.maintainer-tools requires a working gm2 to be in your path"
+ @echo "make gm2.maintainer-doc rebuild target independent documentation sections"
+ @echo "make pge-help sub commands to build pge"
+ @echo "make mc-help sub commands to build mc"
+
+gm2.maintainer-tools: mc-maintainer pge-maintainer
+
+gm2.maintainer-doc: m2-target-independent-doc
-#
# verify the compiler can be built across three generations of cc1gm2 diffing assembly output.
# m2/stage1/cc1gm2 built by translating all M2 sources into C++.
# m2/m2obj2/cc1gm2 built from m2/stage1/cc1gm2.
# m2/m2obj3/cc1gm2 built from m2/m2obj2/cc1gm2.
#
# This test only makes sense if host = target = build
-#
# GM2-VERIFY-MODS is a list of modules which have no __DATE__ stamp inside them
# and thus they can be built by the different versions of gm2.
@@ -1004,20 +1004,20 @@ m2-target-independent-doc: m2-target-independent-doc-texi # m2-target-independen
m2-target-independent-doc-texi: force
ifeq ($(HAVE_PYTHON),yes)
- python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-iso.texi
- python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-pim.texi
- python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/Builtins.texi
- python3 $(srcdir)/m2/tools-src/def2doc.py -t -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/gm2-libs.texi
+ python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/m2/SYSTEM-iso.texi
+ python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/m2/SYSTEM-pim.texi
+ python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/m2/Builtins.texi
+ python3 $(srcdir)/m2/tools-src/def2doc.py -t -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/m2/gm2-libs.texi
else
echo "m2-target-independent-doc-texi will only work if Python3 was detected during configure"
endif
m2-target-independent-doc-rst: force
ifeq ($(HAVE_PYTHON),yes)
- python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-iso.rst
- python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-pim.rst
- python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/Builtins.rst
- python3 $(srcdir)/m2/tools-src/def2doc.py -x -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/gm2-libs.rst
+ python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/m2/SYSTEM-iso.rst
+ python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/m2/SYSTEM-pim.rst
+ python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/m2/Builtins.rst
+ python3 $(srcdir)/m2/tools-src/def2doc.py -x -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/m2/gm2-libs.rst
else
echo "m2-target-independent-doc-rst will only work if Python3 was detected during configure"
endif
diff --git a/gcc/m2/gm2-compiler/M2Options.def b/gcc/m2/gm2-compiler/M2Options.def
index 67b92fa46f6..2be92d594b7 100644
--- a/gcc/m2/gm2-compiler/M2Options.def
+++ b/gcc/m2/gm2-compiler/M2Options.def
@@ -382,7 +382,7 @@ PROCEDURE SetWholeProgram (value: BOOLEAN) ;
(*
SetAutoInit - set the auto initialization flag to value. If the value
is true then all pointers are automatically
- initialized to NIL.
+ initialized to NIL. TRUE is returned.
*)
PROCEDURE SetAutoInit (value: BOOLEAN) : BOOLEAN ;
@@ -390,7 +390,7 @@ PROCEDURE SetAutoInit (value: BOOLEAN) : BOOLEAN ;
(*
SetReturnCheck - set return statement checking in procedure functions
- to value.
+ to value. TRUE is returned.
*)
PROCEDURE SetReturnCheck (value: BOOLEAN) : BOOLEAN ;
diff --git a/gcc/m2/gm2-compiler/M2Options.mod b/gcc/m2/gm2-compiler/M2Options.mod
index 95dc6070330..2b3ed81f95a 100644
--- a/gcc/m2/gm2-compiler/M2Options.mod
+++ b/gcc/m2/gm2-compiler/M2Options.mod
@@ -420,6 +420,7 @@ END SetCheckAll ;
(*
SetAutoInit - -fauto-init turns on automatic initialization of pointers to NIL.
+ TRUE is returned.
*)
PROCEDURE SetAutoInit (value: BOOLEAN) ;
diff --git a/gcc/m2/gm2-compiler/ppg.mod b/gcc/m2/gm2-compiler/ppg.mod
index a17227fa31a..8daa8261412 100644
--- a/gcc/m2/gm2-compiler/ppg.mod
+++ b/gcc/m2/gm2-compiler/ppg.mod
@@ -381,7 +381,7 @@ BEGIN
IF f=NIL
THEN
Halt('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
RETURN( f^.epsilon )
END
@@ -416,7 +416,7 @@ BEGIN
IF f=NIL
THEN
Halt('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
RETURN( f^.reachend )
END
@@ -433,7 +433,7 @@ BEGIN
IF calcfollow
THEN
Halt('why are we reassigning this follow set?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
follow := s ;
calcfollow := TRUE
@@ -450,7 +450,7 @@ BEGIN
IF f=NIL
THEN
Halt ('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
WITH f^ DO
IF calcfollow
@@ -458,7 +458,7 @@ BEGIN
RETURN( follow )
ELSE
Halt('not calculated the follow set yet..',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END
END
@@ -2502,7 +2502,7 @@ BEGIN
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END CodeCondition ;
@@ -2528,7 +2528,7 @@ BEGIN
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
OnLineStart := TRUE
END CodeThenDo ;
@@ -2612,7 +2612,7 @@ BEGIN
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
OnLineStart := FALSE
END CodeEnd ;
@@ -2870,7 +2870,7 @@ BEGIN
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END RecoverCondition ;
@@ -2890,7 +2890,7 @@ BEGIN
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END ConditionIndent ;
@@ -3949,7 +3949,7 @@ BEGIN
ELSE
Halt('unknown element in enumeration type',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END ;
from := from^.next
diff --git a/gcc/m2/gm2-gcc/m2color.cc b/gcc/m2/gm2-gcc/m2color.cc
index 53633dab0ff..f85b1fb93ae 100644
--- a/gcc/m2/gm2-gcc/m2color.cc
+++ b/gcc/m2/gm2-gcc/m2color.cc
@@ -27,9 +27,9 @@ along with GNU Modula-2; see the file COPYING3. If not see
char *
-m2color_colorize_start (bool show_color, char *name, unsigned int name_len)
+m2color_colorize_start (bool show_color, char *name, unsigned int _name_high)
{
- return const_cast<char*> (colorize_start (show_color, name, name_len));
+ return const_cast<char*> (colorize_start (show_color, name, _name_high));
}
diff --git a/gcc/m2/gm2-gcc/m2color.def b/gcc/m2/gm2-gcc/m2color.def
index 74725f1a89d..13983894f48 100644
--- a/gcc/m2/gm2-gcc/m2color.def
+++ b/gcc/m2/gm2-gcc/m2color.def
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. *)
-DEFINITION MODULE m2color ;
+DEFINITION MODULE FOR "C" m2color ;
FROM SYSTEM IMPORT ADDRESS ;
@@ -33,8 +33,8 @@ TYPE
note, range1, range2, quote, locus, fixit-insert, fixit-delete,
diff-filename, diff-hunk, diff-delete, diff-insert, type-diff. *)
-PROCEDURE colorize_start (show_color: BOOLEAN;
- name: ARRAY OF CHAR; name_len: CARDINAL) : PtrToChar ;
+PROCEDURE colorize_start (show_color: BOOLEAN; name: ADDRESS;
+ _name_high: CARDINAL) : PtrToChar ;
(* colorize_stop return a C string containing the escape sequences to
stop text colorization. *)
diff --git a/gcc/m2/gm2-gcc/m2decl.cc b/gcc/m2/gm2-gcc/m2decl.cc
index a3f9c4ba0a8..e44bb351c58 100644
--- a/gcc/m2/gm2-gcc/m2decl.cc
+++ b/gcc/m2/gm2-gcc/m2decl.cc
@@ -194,7 +194,7 @@ m2decl_BuildParameterDeclaration (location_t location, char *name, tree type,
for building a function. */
void
-m2decl_BuildStartFunctionDeclaration (int uses_varargs)
+m2decl_BuildStartFunctionDeclaration (bool uses_varargs)
{
if (uses_varargs)
param_type_list = NULL_TREE;
diff --git a/gcc/m2/gm2-gcc/m2decl.h b/gcc/m2/gm2-gcc/m2decl.h
index 28d5a136511..0efaab6a186 100644
--- a/gcc/m2/gm2-gcc/m2decl.h
+++ b/gcc/m2/gm2-gcc/m2decl.h
@@ -62,7 +62,7 @@ EXTERN tree m2decl_BuildEndFunctionDeclaration (
location_t location_begin, location_t location_end, const char *name,
tree returntype, bool isexternal, bool isnested, bool ispublic,
bool isnoreturn);
-EXTERN void m2decl_BuildStartFunctionDeclaration (int uses_varargs);
+EXTERN void m2decl_BuildStartFunctionDeclaration (bool uses_varargs);
EXTERN tree m2decl_BuildParameterDeclaration (location_t location, char *name,
tree type, bool isreference);
EXTERN tree m2decl_DeclareKnownConstant (location_t location, tree type,
diff --git a/gcc/m2/gm2-gcc/m2expr.cc b/gcc/m2/gm2-gcc/m2expr.cc
index 0470f7c7f8f..c172039e940 100644
--- a/gcc/m2/gm2-gcc/m2expr.cc
+++ b/gcc/m2/gm2-gcc/m2expr.cc
@@ -824,8 +824,8 @@ m2expr_BuildBinarySetDo (location_t location, tree settype, tree op1, tree op2,
tree leftproc, tree rightproc)
{
tree size = m2expr_GetSizeOf (location, settype);
- int is_const = false;
- int is_left = false;
+ bool is_const = false;
+ bool is_left = false;
m2assert_AssertLocation (location);
@@ -3185,7 +3185,7 @@ m2expr_BuildIsNotSubset (location_t location, tree op1, tree op2)
void
m2expr_BuildIfConstInVar (location_t location, tree type, tree varset,
- tree constel, int is_lvalue, int fieldno,
+ tree constel, bool is_lvalue, int fieldno,
char *label)
{
tree size = m2expr_GetSizeOf (location, type);
@@ -3220,7 +3220,7 @@ m2expr_BuildIfConstInVar (location_t location, tree type, tree varset,
void
m2expr_BuildIfNotConstInVar (location_t location, tree type, tree varset,
- tree constel, int is_lvalue, int fieldno,
+ tree constel, bool is_lvalue, int fieldno,
char *label)
{
tree size = m2expr_GetSizeOf (location, type);
@@ -3256,7 +3256,7 @@ m2expr_BuildIfNotConstInVar (location_t location, tree type, tree varset,
void
m2expr_BuildIfVarInVar (location_t location, tree type, tree varset,
- tree varel, int is_lvalue, tree low,
+ tree varel, bool is_lvalue, tree low,
tree high ATTRIBUTE_UNUSED, char *label)
{
tree size = m2expr_GetSizeOf (location, type);
@@ -3308,7 +3308,7 @@ m2expr_BuildIfVarInVar (location_t location, tree type, tree varset,
void
m2expr_BuildIfNotVarInVar (location_t location, tree type, tree varset,
- tree varel, int is_lvalue, tree low,
+ tree varel, bool is_lvalue, tree low,
tree high ATTRIBUTE_UNUSED, char *label)
{
tree size = m2expr_GetSizeOf (location, type);
@@ -3364,9 +3364,9 @@ m2expr_BuildIfNotVarInVar (location_t location, tree type, tree varset,
void
m2expr_BuildForeachWordInSetDoIfExpr (location_t location, tree type, tree op1,
- tree op2, int is_op1lvalue,
- int is_op2lvalue, int is_op1const,
- int is_op2const,
+ tree op2, bool is_op1lvalue,
+ bool is_op2lvalue, bool is_op1const,
+ bool is_op2const,
tree (*expr) (location_t, tree, tree),
char *label)
{
diff --git a/gcc/m2/gm2-gcc/m2expr.h b/gcc/m2/gm2-gcc/m2expr.h
index 041dfa61c37..64169c163c6 100644
--- a/gcc/m2/gm2-gcc/m2expr.h
+++ b/gcc/m2/gm2-gcc/m2expr.h
@@ -61,23 +61,23 @@ EXTERN void m2expr_BuildIfNotInRangeGoto (location_t location, tree var,
EXTERN void m2expr_BuildIfInRangeGoto (location_t location, tree var, tree low,
tree high, char *label);
EXTERN void m2expr_BuildForeachWordInSetDoIfExpr (
- location_t location, tree type, tree op1, tree op2, int is_op1lvalue,
- int is_op2lvalue, int is_op1const, int is_op2const,
+ location_t location, tree type, tree op1, tree op2, bool is_op1lvalue,
+ bool is_op2lvalue, bool is_op1const, bool is_op2const,
tree (*expr) (location_t, tree, tree), char *label);
EXTERN void m2expr_BuildIfNotVarInVar (location_t location, tree type,
- tree varset, tree varel, int is_lvalue,
+ tree varset, tree varel, bool is_lvalue,
tree low, tree high ATTRIBUTE_UNUSED,
char *label);
EXTERN void m2expr_BuildIfVarInVar (location_t location, tree type,
- tree varset, tree varel, int is_lvalue,
+ tree varset, tree varel, bool is_lvalue,
tree low, tree high ATTRIBUTE_UNUSED,
char *label);
EXTERN void m2expr_BuildIfNotConstInVar (location_t location, tree type,
tree varset, tree constel,
- int is_lvalue, int fieldno,
+ bool is_lvalue, int fieldno,
char *label);
EXTERN void m2expr_BuildIfConstInVar (location_t location, tree type,
- tree varset, tree constel, int is_lvalue,
+ tree varset, tree constel, bool is_lvalue,
int fieldno, char *label);
EXTERN tree m2expr_BuildIsNotSubset (location_t location, tree op1, tree op2);
EXTERN tree m2expr_BuildIsSubset (location_t location, tree op1, tree op2);
diff --git a/gcc/m2/gm2-gcc/m2options.h b/gcc/m2/gm2-gcc/m2options.h
index ec49faf9947..bcec299cffe 100644
--- a/gcc/m2/gm2-gcc/m2options.h
+++ b/gcc/m2/gm2-gcc/m2options.h
@@ -65,34 +65,34 @@ EXTERN void M2Options_SetPPOnly (bool value);
EXTERN bool M2Options_GetPPOnly (void);
EXTERN void M2Options_SetUselist (bool value, const char *filename);
-EXTERN void M2Options_SetAutoInit (bool value);
+EXTERN bool M2Options_SetAutoInit (bool value);
EXTERN void M2Options_SetPositiveModFloor (bool value);
-EXTERN void M2Options_SetNilCheck (bool value);
+EXTERN bool M2Options_SetNilCheck (bool value);
EXTERN void M2Options_SetWholeDiv (bool value);
EXTERN void M2Options_SetIndex (bool value);
EXTERN void M2Options_SetRange (bool value);
-EXTERN void M2Options_SetReturnCheck (bool value);
-EXTERN void M2Options_SetCaseCheck (bool value);
-EXTERN void M2Options_SetCheckAll (bool value);
+EXTERN bool M2Options_SetReturnCheck (bool value);
+EXTERN bool M2Options_SetCaseCheck (bool value);
+EXTERN bool M2Options_SetCheckAll (bool value);
EXTERN void M2Options_SetExceptions (bool value);
EXTERN void M2Options_SetStyle (bool value);
EXTERN void M2Options_SetPedantic (bool value);
EXTERN void M2Options_SetPedanticParamNames (bool value);
EXTERN void M2Options_SetPedanticCast (bool value);
EXTERN void M2Options_SetExtendedOpaque (bool value);
-EXTERN void M2Options_SetVerboseUnbounded (bool value);
+EXTERN bool M2Options_SetVerboseUnbounded (bool value);
EXTERN void M2Options_SetXCode (bool value);
EXTERN void M2Options_SetCompilerDebugging (bool value);
EXTERN void M2Options_SetQuadDebugging (bool value);
EXTERN void M2Options_SetDebugTraceQuad (bool value);
EXTERN void M2Options_SetDebugTraceAPI (bool value);
EXTERN void M2Options_SetSources (bool value);
-EXTERN void M2Options_SetUnboundedByReference (bool value);
+EXTERN bool M2Options_SetUnboundedByReference (bool value);
EXTERN void M2Options_SetDumpSystemExports (bool value);
-EXTERN void M2Options_SetOptimizing (bool value);
-EXTERN void M2Options_SetQuiet (bool value);
+EXTERN void M2Options_SetOptimizing (unsigned int value);
+EXTERN bool M2Options_SetQuiet (bool value);
EXTERN void M2Options_SetCC1Quiet (bool value);
-EXTERN void M2Options_SetCpp (bool value);
+EXTERN bool M2Options_SetCpp (bool value);
EXTERN void M2Options_SetSwig (bool value);
EXTERN void M2Options_SetForcedLocation (location_t location);
EXTERN location_t M2Options_OverrideLocation (location_t location);
@@ -105,9 +105,9 @@ EXTERN void M2Options_SetDebugFunctionLineNumbers (bool value);
EXTERN void M2Options_SetGenerateStatementNote (bool value);
EXTERN bool M2Options_GetCpp (void);
EXTERN bool M2Options_GetM2g (void);
-EXTERN void M2Options_SetM2g (bool value);
-EXTERN void M2Options_SetLowerCaseKeywords (bool value);
-EXTERN void M2Options_SetVerbose (bool value);
+EXTERN bool M2Options_SetM2g (bool value);
+EXTERN bool M2Options_SetLowerCaseKeywords (bool value);
+EXTERN bool M2Options_SetVerbose (bool value);
EXTERN void M2Options_SetUnusedVariableChecking (bool value);
EXTERN void M2Options_SetUnusedParameterChecking (bool value);
EXTERN void M2Options_SetStrictTypeChecking (bool value);
diff --git a/gcc/m2/gm2-gcc/m2treelib.cc b/gcc/m2/gm2-gcc/m2treelib.cc
index 79c1e5638e2..9ec095d5284 100644
--- a/gcc/m2/gm2-gcc/m2treelib.cc
+++ b/gcc/m2/gm2-gcc/m2treelib.cc
@@ -237,7 +237,7 @@ m2treelib_DoCall3 (location_t location, tree rettype, tree funcptr, tree arg0,
type to be copied upon indirection. */
tree
-m2treelib_get_rvalue (location_t location, tree t, tree type, int is_lvalue)
+m2treelib_get_rvalue (location_t location, tree t, tree type, bool is_lvalue)
{
if (is_lvalue)
return m2expr_BuildIndirect (location, t, type);
@@ -252,7 +252,7 @@ m2treelib_get_rvalue (location_t location, tree t, tree type, int is_lvalue)
field list and return the appropriate field number. */
tree
-m2treelib_get_field_no (tree type, tree op, int is_const, unsigned int fieldNo)
+m2treelib_get_field_no (tree type, tree op, bool is_const, unsigned int fieldNo)
{
ASSERT_BOOL (is_const);
if (is_const)
@@ -273,8 +273,8 @@ m2treelib_get_field_no (tree type, tree op, int is_const, unsigned int fieldNo)
Either p->field or the constant(op.fieldNo) is returned. */
tree
-m2treelib_get_set_value (location_t location, tree p, tree field, int is_const,
- int is_lvalue, tree op, unsigned int fieldNo)
+m2treelib_get_set_value (location_t location, tree p, tree field, bool is_const,
+ bool is_lvalue, tree op, unsigned int fieldNo)
{
tree value;
constructor_elt *ce;
@@ -323,7 +323,7 @@ m2treelib_get_set_value (location_t location, tree p, tree field, int is_const,
/* get_set_address - returns the address of op1. */
tree
-m2treelib_get_set_address (location_t location, tree op1, int is_lvalue)
+m2treelib_get_set_address (location_t location, tree op1, bool is_lvalue)
{
if (is_lvalue)
return op1;
@@ -368,8 +368,8 @@ m2treelib_get_set_field_des (location_t location, tree p, tree field)
is not a constant. NULL is returned if, op, is a constant. */
tree
-m2treelib_get_set_address_if_var (location_t location, tree op, int is_lvalue,
- int is_const)
+m2treelib_get_set_address_if_var (location_t location, tree op, bool is_lvalue,
+ bool is_const)
{
if (is_const)
return NULL;
diff --git a/gcc/m2/gm2-gcc/m2treelib.def b/gcc/m2/gm2-gcc/m2treelib.def
index ecf6c760e27..fdeeb60faf7 100644
--- a/gcc/m2/gm2-gcc/m2treelib.def
+++ b/gcc/m2/gm2-gcc/m2treelib.def
@@ -35,7 +35,7 @@ TYPE
NULL is returned if, op, is a constant.
*)
-PROCEDURE get_set_address_if_var (location: location_t; op: Tree; is_lvalue: INTEGER; is_const: INTEGER) : Tree ;
+PROCEDURE get_set_address_if_var (location: location_t; op: Tree; is_lvalue, is_const: BOOLEAN) : Tree ;
(*
@@ -56,7 +56,7 @@ PROCEDURE get_set_field_lhs (location: location_t; p: Tree; field: Tree) : Tree
get_set_address - returns the address of op1.
*)
-PROCEDURE get_set_address (location: location_t; op1: Tree; is_lvalue: INTEGER) : Tree ;
+PROCEDURE get_set_address (location: location_t; op1: Tree; is_lvalue: BOOLEAN) : Tree ;
(*
@@ -64,7 +64,7 @@ PROCEDURE get_set_address (location: location_t; op1: Tree; is_lvalue: INTEGER)
Either p->field or the constant(op.fieldNo) is returned.
*)
-PROCEDURE get_set_value (location: location_t; p: Tree; field: Tree; is_const: INTEGER; op: Tree; fieldNo: CARDINAL) : Tree ;
+PROCEDURE get_set_value (location: location_t; p: Tree; field: Tree; is_const: BOOLEAN; op: Tree; fieldNo: CARDINAL) : Tree ;
(*
@@ -76,7 +76,7 @@ PROCEDURE get_set_value (location: location_t; p: Tree; field: Tree; is_const: I
appropriate field number.
*)
-PROCEDURE get_field_no (type: Tree; op: Tree; is_const: INTEGER; fieldNo: CARDINAL) : Tree ;
+PROCEDURE get_field_no (type: Tree; op: Tree; is_const: BOOLEAN; fieldNo: CARDINAL) : Tree ;
(*
@@ -84,7 +84,7 @@ PROCEDURE get_field_no (type: Tree; op: Tree; is_const: INTEGER; fieldNo: CARDIN
copied upon indirection.
*)
-PROCEDURE get_rvalue (location: location_t; t: Tree; type: Tree; is_lvalue: INTEGER) : Tree ;
+PROCEDURE get_rvalue (location: location_t; t: Tree; type: Tree; is_lvalue: BOOLEAN) : Tree ;
(*
diff --git a/gcc/m2/gm2-gcc/m2treelib.h b/gcc/m2/gm2-gcc/m2treelib.h
index 2131ee42015..3bbc6678b84 100644
--- a/gcc/m2/gm2-gcc/m2treelib.h
+++ b/gcc/m2/gm2-gcc/m2treelib.h
@@ -42,20 +42,20 @@ EXTERN tree m2treelib_DoCall2 (location_t location, tree rettype, tree funcptr,
EXTERN tree m2treelib_DoCall3 (location_t location, tree rettype, tree funcptr,
tree arg0, tree arg1, tree arg2);
EXTERN tree m2treelib_get_rvalue (location_t location, tree t, tree type,
- int is_lvalue);
-EXTERN tree m2treelib_get_field_no (tree type, tree op, int is_const,
+ bool is_lvalue);
+EXTERN tree m2treelib_get_field_no (tree type, tree op, bool is_const,
unsigned int fieldNo);
EXTERN tree m2treelib_get_set_value (location_t location, tree p, tree field,
- int is_const, int is_lvalue, tree op,
+ bool is_const, bool is_lvalue, tree op,
unsigned int fieldNo);
EXTERN tree m2treelib_get_set_address (location_t location, tree op1,
- int is_lvalue);
+ bool is_lvalue);
EXTERN tree m2treelib_get_set_field_lhs (location_t location, tree p,
tree field);
EXTERN tree m2treelib_get_set_field_rhs (location_t location, tree p,
tree field);
EXTERN tree m2treelib_get_set_address_if_var (location_t location, tree op,
- int is_lvalue, int is_const);
+ bool is_lvalue, bool is_const);
EXTERN tree m2treelib_get_set_field_des (location_t location, tree p,
tree field);
diff --git a/gcc/m2/gm2-gcc/m2type.cc b/gcc/m2/gm2-gcc/m2type.cc
index 6ee68a9b520..fb7e196fc8b 100644
--- a/gcc/m2/gm2-gcc/m2type.cc
+++ b/gcc/m2/gm2-gcc/m2type.cc
@@ -1179,7 +1179,7 @@ m2type_BuildProcTypeParameterDeclaration (location_t location, tree type,
BuildParameterDeclaration. */
tree
-m2type_BuildEndFunctionType (tree func, tree return_type, int uses_varargs)
+m2type_BuildEndFunctionType (tree func, tree return_type, bool uses_varargs)
{
tree last;
diff --git a/gcc/m2/gm2-gcc/m2type.h b/gcc/m2/gm2-gcc/m2type.h
index ab0488c46b4..71861162e05 100644
--- a/gcc/m2/gm2-gcc/m2type.h
+++ b/gcc/m2/gm2-gcc/m2type.h
@@ -171,7 +171,7 @@ EXTERN tree m2type_DeclareKnownType (location_t location, char *name,
tree type);
EXTERN tree m2type_GetTreeType (tree type);
EXTERN tree m2type_BuildEndFunctionType (tree func, tree type,
- int uses_varargs);
+ bool uses_varargs);
EXTERN tree m2type_BuildStartFunctionType (
location_t location ATTRIBUTE_UNUSED, char *name ATTRIBUTE_UNUSED);
EXTERN void m2type_InitFunctionTypeParameters (void);
diff --git a/gcc/m2/gm2-libs-ch/dtoa.cc b/gcc/m2/gm2-libs-ch/dtoa.cc
index 19663238bfb..19ce3574026 100644
--- a/gcc/m2/gm2-libs-ch/dtoa.cc
+++ b/gcc/m2/gm2-libs-ch/dtoa.cc
@@ -130,16 +130,16 @@ dtoa_calcdecimal (char *p, int str_size, int ndigits)
return x;
}
-int
+bool
dtoa_calcsign (char *p, int str_size)
{
if (p[0] == '-')
{
memmove (p, p + 1, str_size - 1);
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
char *
diff --git a/gcc/m2/gm2-libs-ch/ldtoa.cc b/gcc/m2/gm2-libs-ch/ldtoa.cc
index 9d01fa1cc01..96b8735ae9c 100644
--- a/gcc/m2/gm2-libs-ch/ldtoa.cc
+++ b/gcc/m2/gm2-libs-ch/ldtoa.cc
@@ -43,7 +43,7 @@ typedef enum Mode { maxsignicant, decimaldigits } Mode;
extern int dtoa_calcmaxsig (char *p, int ndigits);
extern int dtoa_calcdecimal (char *p, int str_size, int ndigits);
-extern int dtoa_calcsign (char *p, int str_size);
+extern bool dtoa_calcsign (char *p, int str_size);
/* maxsignicant: return a string containing max(1,ndigits)
significant digits. The return string contains the string
@@ -72,7 +72,7 @@ ldtoa_strtold (const char *s, bool *error)
}
char *
-ldtoa_ldtoa (long double d, int mode, int ndigits, int *decpt, int *sign)
+ldtoa_ldtoa (long double d, int mode, int ndigits, int *decpt, bool *sign)
{
char format[50];
char *p;
diff --git a/gcc/m2/m2.flex b/gcc/m2/m2.flex
index 198088beeff..db0c388bf0d 100644
--- a/gcc/m2/m2.flex
+++ b/gcc/m2/m2.flex
@@ -57,14 +57,14 @@ static int cpreprocessor = 0; /* Replace this with correct getter. */
int nextpos; /* position after token */
int lineno; /* line number of this line */
int column; /* first column number of token on this line */
- int inuse; /* do we need to keep this line info? */
+ bool inuse; /* do we need to keep this line info? */
location_t location; /* the corresponding gcc location_t */
struct lineInfo *next;
};
struct functionInfo {
char *name; /* function name */
- int module; /* is it really a module? */
+ bool module; /* is it really a module? */
struct functionInfo *next; /* list of nested functions */
};
@@ -74,10 +74,10 @@ static int cpreprocessor = 0; /* Replace this with correct getter. */
static int commentCLevel=0;
static struct lineInfo *currentLine=NULL;
static struct functionInfo *currentFunction=NULL;
- static int seenFunctionStart=FALSE;
- static int seenEnd=FALSE;
- static int seenModuleStart=FALSE;
- static int isDefinitionModule=FALSE;
+ static bool seenFunctionStart=false;
+ static bool seenEnd=false;
+ static bool seenModuleStart=false;
+ static bool isDefinitionModule=false;
static int totalLines=0;
static void pushLine (void);
@@ -96,13 +96,13 @@ static void handleLine (void);
static void handleFile (void);
static void handleFunction (void);
static void handleColumn (void);
-static void pushFunction (char *function, int module);
+static void pushFunction (char *function, bool module);
static void popFunction (void);
static void checkFunction (void);
EXTERN void m2flex_M2Error (const char *);
EXTERN location_t m2flex_GetLocation (void);
EXTERN int m2flex_GetColumnNo (void);
-EXTERN int m2flex_OpenSource (char *s);
+EXTERN bool m2flex_OpenSource (char *s);
EXTERN int m2flex_GetLineNo (void);
EXTERN void m2flex_CloseSource (void);
EXTERN char *m2flex_GetToken (void);
@@ -110,13 +110,6 @@ EXTERN void _M2_m2flex_init (void);
EXTERN int m2flex_GetTotalLines (void);
extern void yylex (void);
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
#define YY_DECL void yylex (void)
%}
@@ -249,13 +242,13 @@ BEGIN { updatepos(); M2LexBuf_AddTok(M2Reserved_begintok);
BY { updatepos(); M2LexBuf_AddTok(M2Reserved_bytok); return; }
CASE { updatepos(); M2LexBuf_AddTok(M2Reserved_casetok); return; }
CONST { updatepos(); M2LexBuf_AddTok(M2Reserved_consttok); return; }
-DEFINITION { updatepos(); isDefinitionModule = TRUE;
+DEFINITION { updatepos(); isDefinitionModule = true;
M2LexBuf_AddTok(M2Reserved_definitiontok); return; }
DIV { updatepos(); M2LexBuf_AddTok(M2Reserved_divtok); return; }
DO { updatepos(); M2LexBuf_AddTok(M2Reserved_dotok); return; }
ELSE { updatepos(); M2LexBuf_AddTok(M2Reserved_elsetok); return; }
ELSIF { updatepos(); M2LexBuf_AddTok(M2Reserved_elsiftok); return; }
-END { updatepos(); seenEnd=TRUE;
+END { updatepos(); seenEnd=true;
M2LexBuf_AddTok(M2Reserved_endtok); return; }
EXCEPT { updatepos(); M2LexBuf_AddTok(M2Reserved_excepttok); return; }
EXIT { updatepos(); M2LexBuf_AddTok(M2Reserved_exittok); return; }
@@ -269,14 +262,14 @@ IMPORT { updatepos(); M2LexBuf_AddTok(M2Reserved_importtok);
IN { updatepos(); M2LexBuf_AddTok(M2Reserved_intok); return; }
LOOP { updatepos(); M2LexBuf_AddTok(M2Reserved_looptok); return; }
MOD { updatepos(); M2LexBuf_AddTok(M2Reserved_modtok); return; }
-MODULE { updatepos(); seenModuleStart=TRUE;
+MODULE { updatepos(); seenModuleStart=true;
M2LexBuf_AddTok(M2Reserved_moduletok); return; }
NOT { updatepos(); M2LexBuf_AddTok(M2Reserved_nottok); return; }
OF { updatepos(); M2LexBuf_AddTok(M2Reserved_oftok); return; }
OR { updatepos(); M2LexBuf_AddTok(M2Reserved_ortok); return; }
PACKEDSET { updatepos(); M2LexBuf_AddTok(M2Reserved_packedsettok); return; }
POINTER { updatepos(); M2LexBuf_AddTok(M2Reserved_pointertok); return; }
-PROCEDURE { updatepos(); seenFunctionStart=TRUE;
+PROCEDURE { updatepos(); seenFunctionStart=true;
M2LexBuf_AddTok(M2Reserved_proceduretok); return; }
QUALIFIED { updatepos(); M2LexBuf_AddTok(M2Reserved_qualifiedtok); return; }
UNQUALIFIED { updatepos(); M2LexBuf_AddTok(M2Reserved_unqualifiedtok); return; }
@@ -410,7 +403,7 @@ static void handleFunction (void)
* pushFunction - pushes the function name onto the stack.
*/
-static void pushFunction (char *function, int module)
+static void pushFunction (char *function, bool module)
{
if (currentFunction == NULL) {
currentFunction = (struct functionInfo *)xmalloc (sizeof (struct functionInfo));
@@ -548,9 +541,9 @@ static void assert_location (location_t location ATTRIBUTE_UNUSED)
static void splitSlashStar (void)
{
- seenFunctionStart = FALSE;
- seenEnd = FALSE;
- seenModuleStart = FALSE;
+ seenFunctionStart = false;
+ seenEnd = false;
+ seenModuleStart = false;
currentLine->nextpos = currentLine->tokenpos+1; /* "/". */
currentLine->toklen = 1;
currentLine->column = currentLine->tokenpos+1;
@@ -579,9 +572,9 @@ static void splitSlashStar (void)
static void updatepos (void)
{
- seenFunctionStart = FALSE;
- seenEnd = FALSE;
- seenModuleStart = FALSE;
+ seenFunctionStart = false;
+ seenEnd = false;
+ seenModuleStart = false;
currentLine->nextpos = currentLine->tokenpos+yyleng;
currentLine->toklen = yyleng;
/* if (currentLine->column == 0) */
@@ -609,9 +602,9 @@ static void checkFunction (void)
(strcmp(currentFunction->name, yytext) == 0))
popFunction();
}
- seenFunctionStart = FALSE;
- seenEnd = FALSE;
- seenModuleStart = FALSE;
+ seenFunctionStart = false;
+ seenEnd = false;
+ seenModuleStart = false;
}
/*
@@ -641,7 +634,7 @@ static void initLine (void)
currentLine->nextpos = 0;
currentLine->lineno = lineno;
currentLine->column = 0;
- currentLine->inuse = TRUE;
+ currentLine->inuse = true;
currentLine->next = NULL;
}
@@ -671,7 +664,7 @@ static void pushLine (void)
l->next = currentLine;
currentLine = l;
}
- currentLine->inuse = TRUE;
+ currentLine->inuse = true;
}
/*
@@ -701,13 +694,13 @@ static void resetpos (void)
}
/*
- * finishedLine - indicates that the current line does not need to be preserved when a pushLine
- * occurs.
+ * finishedLine - indicates that the current line does not need to be
+ * preserved when a pushLine occurs.
*/
static void finishedLine (void)
{
- currentLine->inuse = FALSE;
+ currentLine->inuse = false;
}
/*
@@ -735,18 +728,18 @@ EXTERN void m2flex_CloseSource (void)
}
/*
- * OpenSource - returns TRUE if file s can be opened and
+ * OpenSource - returns true if file s can be opened and
* all tokens are taken from this file.
*/
-EXTERN int m2flex_OpenSource (char *s)
+EXTERN bool m2flex_OpenSource (char *s)
{
FILE *f = fopen(s, "r");
if (f == NULL)
- return( FALSE );
+ return( false );
else {
- isDefinitionModule = FALSE;
+ isDefinitionModule = false;
while (currentFunction != NULL)
{
struct functionInfo *f = currentFunction;
@@ -765,7 +758,7 @@ EXTERN int m2flex_OpenSource (char *s)
currentLine->lineno = lineno;
START_FILE (filename, lineno);
BEGIN INITIAL; resetpos ();
- return TRUE;
+ return true;
}
}
diff --git a/gcc/m2/mc-boot/GDebug.cc b/gcc/m2/mc-boot/GDebug.cc
index 98de9dfb4e3..9d878c8186a 100644
--- a/gcc/m2/mc-boot/GDebug.cc
+++ b/gcc/m2/mc-boot/GDebug.cc
@@ -47,12 +47,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/*
Halt - writes a message in the format:
- Module:Line:Message
+ Module:Function:Line:Message
It then terminates by calling HALT.
*/
-extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, unsigned int LineNo, const char *Module_, unsigned int _Module_high);
+extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, const char *Module_, unsigned int _Module_high, const char *Function_, unsigned int _Function_high, unsigned int LineNo);
/*
DebugString - writes a string to the debugging device (Scn.Write).
@@ -84,12 +84,12 @@ static void WriteLn (void)
/*
Halt - writes a message in the format:
- Module:Line:Message
+ Module:Function:Line:Message
It then terminates by calling HALT.
*/
-extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, unsigned int LineNo, const char *Module_, unsigned int _Module_high)
+extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, const char *Module_, unsigned int _Module_high, const char *Function_, unsigned int _Function_high, unsigned int LineNo)
{
typedef struct Halt__T1_a Halt__T1;
@@ -97,12 +97,17 @@ extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, un
Halt__T1 No;
char Message[_Message_high+1];
char Module[_Module_high+1];
+ char Function[_Function_high+1];
/* make a local copy of each unbounded array. */
memcpy (Message, Message_, _Message_high+1);
memcpy (Module, Module_, _Module_high+1);
+ memcpy (Function, Function_, _Function_high+1);
Debug_DebugString ((const char *) Module, _Module_high); /* should be large enough for most source files.. */
+ Debug_DebugString ((const char *) ":", 1);
+ Debug_DebugString ((const char *) Function, _Function_high);
+ Debug_DebugString ((const char *) ":", 1);
NumberIO_CardToStr (LineNo, 0, (char *) &No.array[0], MaxNoOfDigits);
Debug_DebugString ((const char *) ":", 1);
Debug_DebugString ((const char *) &No.array[0], MaxNoOfDigits);
diff --git a/gcc/m2/mc-boot/GDebug.h b/gcc/m2/mc-boot/GDebug.h
index 3a02b54c819..8ec800c94fc 100644
--- a/gcc/m2/mc-boot/GDebug.h
+++ b/gcc/m2/mc-boot/GDebug.h
@@ -51,12 +51,12 @@ extern "C" {
/*
Halt - writes a message in the format:
- Module:Line:Message
+ Module:Function:Line:Message
It then terminates by calling HALT.
*/
-EXTERN void Debug_Halt (const char *Message_, unsigned int _Message_high, unsigned int LineNo, const char *Module_, unsigned int _Module_high);
+EXTERN void Debug_Halt (const char *Message_, unsigned int _Message_high, const char *Module_, unsigned int _Module_high, const char *Function_, unsigned int _Function_high, unsigned int LineNo);
/*
DebugString - writes a string to the debugging device (Scn.Write).
diff --git a/gcc/m2/mc-boot/GDynamicStrings.cc b/gcc/m2/mc-boot/GDynamicStrings.cc
index 41d25f1d4bf..e97764db71a 100644
--- a/gcc/m2/mc-boot/GDynamicStrings.cc
+++ b/gcc/m2/mc-boot/GDynamicStrings.cc
@@ -368,8 +368,8 @@ extern "C" void DynamicStrings_PopAllocation (bool halt);
/*
PopAllocationExemption - test to see that all strings are deallocated, except
- string, e, since the last push.
- Then it pops to the previous allocation/deallocation
+ string e since the last push.
+ Post-condition: it pops to the previous allocation/deallocation
lists.
If halt is true then the application terminates
@@ -2609,8 +2609,8 @@ extern "C" void DynamicStrings_PopAllocation (bool halt)
/*
PopAllocationExemption - test to see that all strings are deallocated, except
- string, e, since the last push.
- Then it pops to the previous allocation/deallocation
+ string e since the last push.
+ Post-condition: it pops to the previous allocation/deallocation
lists.
If halt is true then the application terminates
@@ -2630,11 +2630,11 @@ extern "C" DynamicStrings_String DynamicStrings_PopAllocationExemption (bool hal
if (frameHead == NULL)
{
stop ();
- /* writeString ("mismatched number of PopAllocation's compared to PushAllocation's") */
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
+ M2RTS_Halt ((const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, (const char *) "PopAllocationExemption", 22, 177);
}
else
{
+ /* writeString ("mismatched number of PopAllocation's compared to PushAllocation's") */
if (frameHead->alloc != NULL)
{
b = false;
diff --git a/gcc/m2/mc-boot/GDynamicStrings.h b/gcc/m2/mc-boot/GDynamicStrings.h
index a69f70344f3..d20d618ec9f 100644
--- a/gcc/m2/mc-boot/GDynamicStrings.h
+++ b/gcc/m2/mc-boot/GDynamicStrings.h
@@ -315,9 +315,9 @@ EXTERN void DynamicStrings_PopAllocation (bool halt);
/*
PopAllocationExemption - test to see that all strings are
- deallocated, except string, e, since
+ deallocated, except string e since
the last push.
- Then it pops to the previous
+ Post-condition: it pops to the previous
allocation/deallocation lists.
If halt is true then the application
diff --git a/gcc/m2/mc-boot/GFIO.cc b/gcc/m2/mc-boot/GFIO.cc
index c25d75440f2..ce7f0bc7b5c 100644
--- a/gcc/m2/mc-boot/GFIO.cc
+++ b/gcc/m2/mc-boot/GFIO.cc
@@ -727,7 +727,7 @@ static int ReadFromBuffer (FIO_File f, void * a, unsigned int nBytes)
(*p) = static_cast<unsigned char> ((*fd->buffer->contents).array[fd->buffer->position]);
fd->buffer->left -= 1; /* remove consumed bytes */
fd->buffer->position += 1; /* move onwards n bytes */
- nBytes = 0;
+ nBytes = 0; /* reduce the amount for future direct */
/* read */
return 1;
}
diff --git a/gcc/m2/mc-boot/GM2RTS.cc b/gcc/m2/mc-boot/GM2RTS.cc
index 93bb9c20d19..cc3f559d3a2 100644
--- a/gcc/m2/mc-boot/GM2RTS.cc
+++ b/gcc/m2/mc-boot/GM2RTS.cc
@@ -181,7 +181,7 @@ extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn));
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high) __attribute__ ((noreturn));
+extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line) __attribute__ ((noreturn));
/*
HaltC - provides a more user friendly version of HALT, which takes
@@ -189,7 +189,7 @@ extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high,
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
+extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line) __attribute__ ((noreturn));
/*
ExitOnHalt - if HALT is executed then call exit with the exit code, e.
@@ -585,16 +585,16 @@ extern "C" void M2RTS_HALT (int exitcode)
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high)
+extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line)
{
+ char description[_description_high+1];
char filename[_filename_high+1];
char function[_function_high+1];
- char description[_description_high+1];
/* make a local copy of each unbounded array. */
+ memcpy (description, description_, _description_high+1);
memcpy (filename, filename_, _filename_high+1);
memcpy (function, function_, _function_high+1);
- memcpy (description, description_, _description_high+1);
M2RTS_ErrorMessage ((const char *) description, _description_high, (const char *) filename, _filename_high, line, (const char *) function, _function_high);
}
@@ -606,7 +606,7 @@ extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high,
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description)
+extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line)
{
ErrorMessageC (description, filename, line, function);
}
diff --git a/gcc/m2/mc-boot/GM2RTS.h b/gcc/m2/mc-boot/GM2RTS.h
index 85a553225d0..8d2387683c4 100644
--- a/gcc/m2/mc-boot/GM2RTS.h
+++ b/gcc/m2/mc-boot/GM2RTS.h
@@ -131,7 +131,7 @@ EXTERN void M2RTS_HALT (int exitcode) __attribute__ ((noreturn));
to stderr and calls exit (1).
*/
-EXTERN void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high) __attribute__ ((noreturn));
+EXTERN void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line) __attribute__ ((noreturn));
/*
HaltC - provides a more user friendly version of HALT, which takes
@@ -139,7 +139,7 @@ EXTERN void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsi
to stderr and calls exit (1).
*/
-EXTERN void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
+EXTERN void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line) __attribute__ ((noreturn));
/*
ExitOnHalt - if HALT is executed then call exit with the exit code, e.
diff --git a/gcc/m2/mc-boot/GPushBackInput.cc b/gcc/m2/mc-boot/GPushBackInput.cc
index fa052b4d6c3..d5b878d5c5b 100644
--- a/gcc/m2/mc-boot/GPushBackInput.cc
+++ b/gcc/m2/mc-boot/GPushBackInput.cc
@@ -275,7 +275,7 @@ extern "C" char PushBackInput_PutCh (char ch)
}
else
{
- Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
+ Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54, (const char *) "PutCh", 5, 151);
}
return ch;
/* static analysis guarentees a RETURN statement will be used before here. */
@@ -301,7 +301,7 @@ extern "C" void PushBackInput_PutString (const char *a_, unsigned int _a_high)
l -= 1;
if ((PushBackInput_PutCh (a[l])) != a[l])
{
- Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
+ Debug_Halt ((const char *) "assert failed", 13, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54, (const char *) "PutString", 9, 132);
}
}
}
@@ -322,7 +322,7 @@ extern "C" void PushBackInput_PutStr (DynamicStrings_String s)
i -= 1;
if ((PushBackInput_PutCh (DynamicStrings_char (s, static_cast<int> (i)))) != (DynamicStrings_char (s, static_cast<int> (i))))
{
- Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
+ Debug_Halt ((const char *) "assert failed", 13, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54, (const char *) "PutStr", 6, 113);
}
}
}
diff --git a/gcc/m2/mc-boot/GRTExceptions.cc b/gcc/m2/mc-boot/GRTExceptions.cc
index 21624a9cf3c..2986aad4936 100644
--- a/gcc/m2/mc-boot/GRTExceptions.cc
+++ b/gcc/m2/mc-boot/GRTExceptions.cc
@@ -722,7 +722,7 @@ static void AddHandler (RTExceptions_EHBlock e, RTExceptions_Handler h)
static void indexf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 614, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
}
@@ -732,7 +732,7 @@ static void indexf (void * a)
static void range (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 626, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
}
@@ -742,7 +742,7 @@ static void range (void * a)
static void casef (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 638, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
}
@@ -752,7 +752,7 @@ static void casef (void * a)
static void invalidloc (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 650, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
}
@@ -762,7 +762,7 @@ static void invalidloc (void * a)
static void function (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 662, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
}
@@ -772,7 +772,7 @@ static void function (void * a)
static void wholevalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 674, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
@@ -782,7 +782,7 @@ static void wholevalue (void * a)
static void wholediv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 686, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
@@ -792,7 +792,7 @@ static void wholediv (void * a)
static void realvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 698, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
}
@@ -802,7 +802,7 @@ static void realvalue (void * a)
static void realdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 710, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
}
@@ -812,7 +812,7 @@ static void realdiv (void * a)
static void complexvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 722, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
}
@@ -822,7 +822,7 @@ static void complexvalue (void * a)
static void complexdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 734, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
}
@@ -832,7 +832,7 @@ static void complexdiv (void * a)
static void protection (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 746, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
}
@@ -842,7 +842,7 @@ static void protection (void * a)
static void systemf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 758, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
}
@@ -852,7 +852,7 @@ static void systemf (void * a)
static void coroutine (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 770, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
}
@@ -862,7 +862,7 @@ static void coroutine (void * a)
static void exception (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 782, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
}
@@ -1181,7 +1181,7 @@ extern "C" RTExceptions_EHBlock RTExceptions_GetBaseExceptionBlock (void)
{
if (currentEHB == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
+ M2RTS_Halt ((const char *) "currentEHB has not been initialized yet", 39, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, (const char *) "GetBaseExceptionBlock", 21, 600);
}
else
{
diff --git a/gcc/m2/mc-boot/GRTint.cc b/gcc/m2/mc-boot/GRTint.cc
index f8e26c105ac..d44db637ba5 100644
--- a/gcc/m2/mc-boot/GRTint.cc
+++ b/gcc/m2/mc-boot/GRTint.cc
@@ -751,7 +751,7 @@ extern "C" void RTint_ReArmTimeVector (unsigned int vec, unsigned int micro, uns
vptr = FindVectorNo (vec);
if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 286, (const char *) "ReArmTimeVector", 15, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "cannot find vector supplied", 27, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "ReArmTimeVector", 15, 287);
}
else
{
@@ -776,7 +776,7 @@ extern "C" void RTint_GetTimeVector (unsigned int vec, unsigned int *micro, unsi
vptr = FindVectorNo (vec);
if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 312, (const char *) "GetTimeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "cannot find vector supplied", 27, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "GetTimeVector", 13, 313);
}
else
{
@@ -802,7 +802,7 @@ extern "C" void * RTint_AttachVector (unsigned int vec, void * ptr)
vptr = FindVectorNo (vec);
if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 339, (const char *) "AttachVector", 12, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "cannot find vector supplied", 27, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "AttachVector", 12, 340);
}
else
{
@@ -841,7 +841,7 @@ extern "C" void RTint_IncludeVector (unsigned int vec)
vptr = FindVectorNo (vec);
if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 372, (const char *) "IncludeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "cannot find vector supplied", 27, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "IncludeVector", 13, 374);
}
else
{
@@ -887,7 +887,7 @@ extern "C" void RTint_ExcludeVector (unsigned int vec)
vptr = FindPendingVector (vec);
if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 414, (const char *) "ExcludeVector", 13, (const char *) "cannot find pending vector supplied", 35);
+ M2RTS_Halt ((const char *) "cannot find pending vector supplied", 35, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "ExcludeVector", 13, 416);
}
else
{
@@ -1001,7 +1001,7 @@ extern "C" void RTint_Listen (bool untilInterrupt, RTint_DispatchVector call, un
}
if (((untilInterrupt && (inSet == NULL)) && (outSet == NULL)) && ! found)
{
- M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 730, (const char *) "Listen", 6, (const char *) "deadlock found, no more processes to run and no interrupts active", 65);
+ M2RTS_Halt ((const char *) "deadlock found, no more processes to run and no interrupts active", 65, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, (const char *) "Listen", 6, 732);
}
/* printf('}
') ; */
diff --git a/gcc/m2/mc-boot/GSysStorage.cc b/gcc/m2/mc-boot/GSysStorage.cc
index ea7d4730870..9e980eb6961 100644
--- a/gcc/m2/mc-boot/GSysStorage.cc
+++ b/gcc/m2/mc-boot/GSysStorage.cc
@@ -54,7 +54,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# include "GSYSTEM.h"
# define enableDeallocation true
-# define enableZero false
+# define enableZero true
# define enableTrace false
static unsigned int callno;
static bool zero;
@@ -94,7 +94,7 @@ extern "C" void SysStorage_ALLOCATE (void * *a, unsigned int size)
(*a) = libc_malloc (static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
+ Debug_Halt ((const char *) "out of memory error", 19, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51, (const char *) "ALLOCATE", 8, 51);
}
if (enableTrace && trace)
{
@@ -119,7 +119,7 @@ extern "C" void SysStorage_DEALLOCATE (void * *a, unsigned int size)
}
if ((libc_memset ((*a), 0, static_cast<size_t> (size))) != (*a))
{
- Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
+ Debug_Halt ((const char *) "memset should have returned the first parameter", 47, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51, (const char *) "DEALLOCATE", 10, 78);
}
}
if (enableDeallocation)
@@ -164,7 +164,7 @@ extern "C" void SysStorage_REALLOCATE (void * *a, unsigned int size)
(*a) = libc_realloc ((*a), static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
+ Debug_Halt ((const char *) "out of memory error", 19, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51, (const char *) "REALLOCATE", 10, 122);
}
if (enableTrace && trace)
{
diff --git a/gcc/m2/mc-boot/Gdecl.cc b/gcc/m2/mc-boot/Gdecl.cc
index a9712d3da24..21949b3fa69 100644
--- a/gcc/m2/mc-boot/Gdecl.cc
+++ b/gcc/m2/mc-boot/Gdecl.cc
@@ -1038,8 +1038,8 @@ extern "C" bool M2RTS_InstallInitialProcedure (PROC p);
extern "C" void M2RTS_ExecuteTerminationProcedures (void);
extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn));
extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn));
-extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high) __attribute__ ((noreturn));
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
+extern "C" void M2RTS_Halt (const char *description_, unsigned int _description_high, const char *filename_, unsigned int _filename_high, const char *function_, unsigned int _function_high, unsigned int line) __attribute__ ((noreturn));
+extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line) __attribute__ ((noreturn));
extern "C" void M2RTS_ExitOnHalt (int e);
extern "C" void M2RTS_ErrorMessage (const char *message_, unsigned int _message_high, const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high) __attribute__ ((noreturn));
extern "C" unsigned int M2RTS_Length (const char *a_, unsigned int _a_high);
@@ -2697,8 +2697,8 @@ extern "C" void DynamicStrings_PopAllocation (bool halt);
/*
PopAllocationExemption - test to see that all strings are deallocated, except
- string, e, since the last push.
- Then it pops to the previous allocation/deallocation
+ string e since the last push.
+ Post-condition: it pops to the previous allocation/deallocation
lists.
If halt is true then the application terminates
@@ -3389,7 +3389,7 @@ extern "C" void NumberIO_StrToBin (const char *a_, unsigned int _a_high, unsigne
extern "C" void NumberIO_StrToBinInt (const char *a_, unsigned int _a_high, int *x);
extern "C" void NumberIO_StrToHexInt (const char *a_, unsigned int _a_high, int *x);
extern "C" void NumberIO_StrToOctInt (const char *a_, unsigned int _a_high, int *x);
-extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, unsigned int LineNo, const char *Module_, unsigned int _Module_high);
+extern "C" void Debug_Halt (const char *Message_, unsigned int _Message_high, const char *Module_, unsigned int _Module_high, const char *Function_, unsigned int _Function_high, unsigned int LineNo);
extern "C" void Debug_DebugString (const char *a_, unsigned int _a_high);
extern "C" void Assertion_Assert (bool Condition);
extern "C" void StdIO_Read (char *ch);
diff --git a/gcc/m2/mc-boot/GsymbolKey.cc b/gcc/m2/mc-boot/GsymbolKey.cc
index 2920951ad8f..94265a6328c 100644
--- a/gcc/m2/mc-boot/GsymbolKey.cc
+++ b/gcc/m2/mc-boot/GsymbolKey.cc
@@ -143,7 +143,7 @@ static void findNodeAndParentInTree (symbolKey_symbolTree t, nameKey_Name n, sym
(*father) = t;
if (t == NULL)
{
- Debug_Halt ((const char *) "parameter t should never be NIL", 31, 203, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
+ Debug_Halt ((const char *) "parameter t should never be NIL", 31, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44, (const char *) "findNodeAndParentInTree", 23, 203);
}
(*child) = t->left;
if ((*child) != NULL)
@@ -286,7 +286,7 @@ extern "C" void symbolKey_putSymKey (symbolKey_symbolTree t, nameKey_Name name,
}
else
{
- Debug_Halt ((const char *) "symbol already stored", 21, 119, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
+ Debug_Halt ((const char *) "symbol already stored", 21, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44, (const char *) "putSymKey", 9, 119);
}
}
@@ -353,7 +353,7 @@ extern "C" void symbolKey_delSymKey (symbolKey_symbolTree t, nameKey_Name name)
}
else
{
- Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 186, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
+ Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44, (const char *) "delSymKey", 9, 186);
}
}
diff --git a/gcc/m2/mc/symbolKey.mod b/gcc/m2/mc/symbolKey.mod
index a2c6e3a836a..e9b48b8f0bb 100644
--- a/gcc/m2/mc/symbolKey.mod
+++ b/gcc/m2/mc/symbolKey.mod
@@ -116,7 +116,7 @@ BEGIN
child^.key := key ;
child^.name := name
ELSE
- Halt ('symbol already stored', __LINE__, __FILE__)
+ Halt ('symbol already stored', __FILE__, __FUNCTION__, __LINE__)
END
END putSymKey ;
@@ -183,7 +183,7 @@ BEGIN
END
ELSE
Halt ('trying to delete a symbol that is not in the tree - the compiler never expects this to occur',
- __LINE__, __FILE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END delSymKey ;
@@ -200,7 +200,7 @@ BEGIN
father := t ;
IF t=NIL
THEN
- Halt ('parameter t should never be NIL', __LINE__, __FILE__)
+ Halt ('parameter t should never be NIL', __FILE__, __FUNCTION__, __LINE__)
END ;
child := t^.left ;
IF child#NIL
diff --git a/gcc/m2/target-independent/m2/Builtins.texi b/gcc/m2/target-independent/m2/Builtins.texi
index bf0afe1b8a4..6f50bfa338e 100644
--- a/gcc/m2/target-independent/m2/Builtins.texi
+++ b/gcc/m2/target-independent/m2/Builtins.texi
@@ -7,11 +7,11 @@ FROM SYSTEM IMPORT ADDRESS ;
(* floating point intrinsic procedure functions *)
@findex isfinitef
-PROCEDURE __BUILTIN__ isfinitef (x: SHORTREAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinitef (x: SHORTREAL) : INTEGER ;
@findex isfinite
-PROCEDURE __BUILTIN__ isfinite (x: REAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinite (x: REAL) : INTEGER ;
@findex isfinitel
-PROCEDURE __BUILTIN__ isfinitel (x: LONGREAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinitel (x: LONGREAL) : INTEGER ;
@findex sinf
PROCEDURE __BUILTIN__ sinf (x: SHORTREAL) : SHORTREAL ;
diff --git a/gcc/m2/target-independent/m2/SYSTEM-iso.texi b/gcc/m2/target-independent/m2/SYSTEM-iso.texi
index ece68a1fcdc..dbcc53479f5 100644
--- a/gcc/m2/target-independent/m2/SYSTEM-iso.texi
+++ b/gcc/m2/target-independent/m2/SYSTEM-iso.texi
@@ -141,7 +141,7 @@ PROCEDURE TSIZE (<type>; ... ): CARDINAL;
*)
@findex THROW
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
(*
THROW is a GNU extension and was not part of the PIM or ISO
standards. It throws an exception which will be caught by the
diff --git a/gcc/m2/target-independent/m2/SYSTEM-pim.texi b/gcc/m2/target-independent/m2/SYSTEM-pim.texi
index e2afa9d67cc..bd446bdd511 100644
--- a/gcc/m2/target-independent/m2/SYSTEM-pim.texi
+++ b/gcc/m2/target-independent/m2/SYSTEM-pim.texi
@@ -74,7 +74,7 @@ PROCEDURE SHIFT (val: <a set type>;
*)
@findex THROW
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
(*
THROW is a GNU extension and was not part of the PIM or ISO
standards. It throws an exception which will be caught by the
diff --git a/gcc/m2/target-independent/m2/gm2-libs.texi b/gcc/m2/target-independent/m2/gm2-libs.texi
index 9eaab560bca..4af9d123968 100644
--- a/gcc/m2/target-independent/m2/gm2-libs.texi
+++ b/gcc/m2/target-independent/m2/gm2-libs.texi
@@ -244,11 +244,11 @@ FROM SYSTEM IMPORT ADDRESS ;
(* floating point intrinsic procedure functions *)
@findex isfinitef
-PROCEDURE __BUILTIN__ isfinitef (x: SHORTREAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinitef (x: SHORTREAL) : INTEGER ;
@findex isfinite
-PROCEDURE __BUILTIN__ isfinite (x: REAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinite (x: REAL) : INTEGER ;
@findex isfinitel
-PROCEDURE __BUILTIN__ isfinitel (x: LONGREAL) : BOOLEAN ;
+PROCEDURE __BUILTIN__ isfinitel (x: LONGREAL) : INTEGER ;
@findex sinf
PROCEDURE __BUILTIN__ sinf (x: SHORTREAL) : SHORTREAL ;
@@ -327,13 +327,6 @@ PROCEDURE __BUILTIN__ huge_valf () : SHORTREAL ;
@findex huge_vall
PROCEDURE __BUILTIN__ huge_vall () : LONGREAL ;
-@findex significand
-PROCEDURE __BUILTIN__ significand (r: REAL) : REAL ;
-@findex significandf
-PROCEDURE __BUILTIN__ significandf (s: SHORTREAL) : SHORTREAL ;
-@findex significandl
-PROCEDURE __BUILTIN__ significandl (l: LONGREAL) : LONGREAL ;
-
@findex modf
PROCEDURE __BUILTIN__ modf (x: REAL; VAR y: REAL) : REAL ;
@findex modff
@@ -363,13 +356,6 @@ PROCEDURE __BUILTIN__ nexttowardf (x, y: SHORTREAL) : LONGREAL ;
@findex nexttowardl
PROCEDURE __BUILTIN__ nexttowardl (x, y: LONGREAL) : LONGREAL ;
-@findex scalb
-PROCEDURE __BUILTIN__ scalb (x, n: REAL) : REAL ;
-@findex scalbf
-PROCEDURE __BUILTIN__ scalbf (x, n: SHORTREAL) : SHORTREAL ;
-@findex scalbl
-PROCEDURE __BUILTIN__ scalbl (x, n: LONGREAL) : LONGREAL ;
-
@findex scalbln
PROCEDURE __BUILTIN__ scalbln (x: REAL; n: LONGINT) : REAL ;
@findex scalblnf
@@ -643,15 +629,16 @@ EXPORT QUALIFIED Halt, DebugString ;
(*
Halt - writes a message in the format:
- Module:Line:Message
+ Module:Function:Line:Message
It then terminates by calling HALT.
*)
@findex Halt
-PROCEDURE Halt (Message: ARRAY OF CHAR;
- LineNo: CARDINAL;
- Module: ARRAY OF CHAR) ;
+PROCEDURE Halt (Message,
+ Module,
+ Function: ARRAY OF CHAR ;
+ LineNo : CARDINAL) ;
(*
@@ -1044,9 +1031,9 @@ PROCEDURE PopAllocation (halt: BOOLEAN) ;
(*
PopAllocationExemption - test to see that all strings are
- deallocated, except string, e, since
+ deallocated, except string e since
the last push.
- Then it pops to the previous
+ Post-condition: it pops to the previous
allocation/deallocation lists.
If halt is true then the application
@@ -1957,11 +1944,11 @@ TYPE
@findex ConstructModules
-PROCEDURE ConstructModules (applicationmodule: ADDRESS;
+PROCEDURE ConstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@findex DeconstructModules
-PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
+PROCEDURE DeconstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@@ -1972,18 +1959,20 @@ PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
*)
@findex RegisterModule
-PROCEDURE RegisterModule (name: ADDRESS;
+PROCEDURE RegisterModule (modulename, libname: ADDRESS;
init, fini: ArgCVEnvP;
dependencies: PROC) ;
(*
- RequestDependant - used to specify that modulename is dependant upon
- module dependantmodule.
+ RequestDependant - used to specify that modulename:libname
+ is dependant upon
+ module dependantmodule:dependantlibname
*)
@findex RequestDependant
-PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+PROCEDURE RequestDependant (modulename, libname,
+ dependantmodule, dependantlibname: ADDRESS) ;
END M2Dependent.
@@ -2069,11 +2058,11 @@ TYPE
@findex ConstructModules
-PROCEDURE ConstructModules (applicationmodule: ADDRESS;
+PROCEDURE ConstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@findex DeconstructModules
-PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
+PROCEDURE DeconstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@@ -2084,7 +2073,7 @@ PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
*)
@findex RegisterModule
-PROCEDURE RegisterModule (name: ADDRESS;
+PROCEDURE RegisterModule (name, libname: ADDRESS;
init, fini: ArgCVEnvP;
dependencies: PROC) ;
@@ -2095,7 +2084,8 @@ PROCEDURE RegisterModule (name: ADDRESS;
*)
@findex RequestDependant
-PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+PROCEDURE RequestDependant (modulename, libname,
+ dependantmodule, dependantlibname: ADDRESS) ;
(*
@@ -2165,13 +2155,24 @@ PROCEDURE HALT ([exitcode: INTEGER = -1]) <* noreturn *> ;
(*
Halt - provides a more user friendly version of HALT, which takes
- four parameters to aid debugging.
+ four parameters to aid debugging. It writes an error message
+ to stderr and calls exit (1).
*)
@findex Halt
-PROCEDURE Halt (file: ARRAY OF CHAR; line: CARDINAL;
- function: ARRAY OF CHAR; description: ARRAY OF CHAR)
- <* noreturn *> ;
+PROCEDURE Halt (description, filename, function: ARRAY OF CHAR;
+ line: CARDINAL) <* noreturn *> ;
+
+
+(*
+ HaltC - provides a more user friendly version of HALT, which takes
+ four parameters to aid debugging. It writes an error message
+ to stderr and calls exit (1).
+*)
+
+@findex HaltC
+PROCEDURE HaltC (description, filename, function: ADDRESS;
+ line: CARDINAL) <* noreturn *> ;
(*
@@ -2188,7 +2189,7 @@ PROCEDURE ExitOnHalt (e: INTEGER) ;
@findex ErrorMessage
PROCEDURE ErrorMessage (message: ARRAY OF CHAR;
- file: ARRAY OF CHAR;
+ filename: ARRAY OF CHAR;
line: CARDINAL;
function: ARRAY OF CHAR) <* noreturn *> ;
@@ -2208,53 +2209,53 @@ PROCEDURE Length (a: ARRAY OF CHAR) : CARDINAL ;
*)
@findex AssignmentException
-PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ReturnException
-PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex IncException
-PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex DecException
-PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex InclException
-PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ExclException
-PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ShiftException
-PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex RotateException
-PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex StaticArraySubscriptException
-PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex DynamicArraySubscriptException
-PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopBeginException
-PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopToException
-PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopEndException
-PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex PointerNilException
-PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex NoReturnException
-PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex CaseException
-PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeNonPosDivException
-PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeNonPosModException
-PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeZeroDivException
-PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeZeroRemException
-PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeValueException
-PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex RealValueException
-PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ParameterException
-PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex NoException
-PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
END M2RTS.
@@ -2676,7 +2677,7 @@ TYPE
PROCEDURE Raise (number: CARDINAL;
file: ADDRESS; line: CARDINAL;
column: CARDINAL; function: ADDRESS;
- message: ADDRESS) ;
+ message: ADDRESS) <* noreturn *> ;
(*
@@ -2904,7 +2905,7 @@ PROCEDURE GetTimeVector (vec: CARDINAL; VAR micro, secs: CARDINAL) ;
*)
@findex AttachVector
-PROCEDURE AttachVector (vec: CARDINAL; p: ADDRESS) : ADDRESS ;
+PROCEDURE AttachVector (vec: CARDINAL; ptr: ADDRESS) : ADDRESS ;
(*
@@ -3249,7 +3250,7 @@ PROCEDURE SHIFT (val: <a set type>;
*)
@findex THROW
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
(*
THROW is a GNU extension and was not part of the PIM or ISO
standards. It throws an exception which will be caught by the
@@ -4907,7 +4908,8 @@ EXPORT UNQUALIFIED time_t, timeb, tm, ptrToTM,
memcpy, memset, memmove, printf, realloc,
rand, srand,
time, localtime, ftime,
- shutdown, rename, setjmp, longjmp, atexit,
+ shutdown, snprintf,
+ rename, setjmp, longjmp, atexit,
ttyname, sleep, execv ;
@@ -5262,6 +5264,14 @@ PROCEDURE memmove (dest, src: ADDRESS; size: CSIZE_T) : [ ADDRESS ] ;
PROCEDURE printf (format: ARRAY OF CHAR; ...) : [ INTEGER ] ;
+(*
+ int snprintf(char *str, size_t size, const char *format, ...);
+*)
+
+@findex snprintf
+PROCEDURE snprintf (dest: ADDRESS; size: CSIZE_T;
+ format: ARRAY OF CHAR; ...) : [ INTEGER ] ;
+
(*
setenv - sets environment variable, name, to value.
It will overwrite an existing value if, overwrite,
@@ -5515,14 +5525,14 @@ END libm.
DEFINITION MODULE sckt ;
FROM SYSTEM IMPORT ADDRESS ;
-EXPORT UNQUALIFIED tcpServerState,
- tcpServerEstablish, tcpServerEstablishPort,
- tcpServerAccept, getLocalIP,
- tcpServerPortNo, tcpServerIP, tcpServerSocketFd,
- tcpServerClientIP, tcpServerClientPortNo,
- tcpClientState,
- tcpClientSocket, tcpClientSocketIP, tcpClientConnect,
- tcpClientPortNo, tcpClientIP, tcpClientSocketFd ;
+EXPORT QUALIFIED tcpServerState,
+ tcpServerEstablish, tcpServerEstablishPort,
+ tcpServerAccept, getLocalIP,
+ tcpServerPortNo, tcpServerIP, tcpServerSocketFd,
+ tcpServerClientIP, tcpServerClientPortNo,
+ tcpClientState,
+ tcpClientSocket, tcpClientSocketIP, tcpClientConnect,
+ tcpClientPortNo, tcpClientIP, tcpClientSocketFd ;
TYPE
@findex tcpServerState (type)
@@ -6077,35 +6087,35 @@ PIM).
The following libraries are Logitech-3.0 compatible but fall outside
the base GNU Modula-2 libraries.
@menu
-* gm2-libs-pim/BitBlockOps::BitBlockOps.def
-* gm2-libs-pim/BitByteOps::BitByteOps.def
-* gm2-libs-pim/BitWordOps::BitWordOps.def
-* gm2-libs-pim/BlockOps::BlockOps.def
-* gm2-libs-pim/Break::Break.def
-* gm2-libs-pim/CardinalIO::CardinalIO.def
-* gm2-libs-pim/Conversions::Conversions.def
-* gm2-libs-pim/DebugPMD::DebugPMD.def
-* gm2-libs-pim/DebugTrace::DebugTrace.def
-* gm2-libs-pim/Delay::Delay.def
-* gm2-libs-pim/Display::Display.def
-* gm2-libs-pim/ErrorCode::ErrorCode.def
-* gm2-libs-pim/FileSystem::FileSystem.def
-* gm2-libs-pim/FloatingUtilities::FloatingUtilities.def
-* gm2-libs-pim/InOut::InOut.def
-* gm2-libs-pim/Keyboard::Keyboard.def
-* gm2-libs-pim/LongIO::LongIO.def
-* gm2-libs-pim/NumberConversion::NumberConversion.def
-* gm2-libs-pim/Random::Random.def
-* gm2-libs-pim/RealConversions::RealConversions.def
-* gm2-libs-pim/RealInOut::RealInOut.def
-* gm2-libs-pim/Strings::Strings.def
-* gm2-libs-pim/Termbase::Termbase.def
-* gm2-libs-pim/Terminal::Terminal.def
-* gm2-libs-pim/TimeDate::TimeDate.def
+* gm2-libs-log/BitBlockOps::BitBlockOps.def
+* gm2-libs-log/BitByteOps::BitByteOps.def
+* gm2-libs-log/BitWordOps::BitWordOps.def
+* gm2-libs-log/BlockOps::BlockOps.def
+* gm2-libs-log/Break::Break.def
+* gm2-libs-log/CardinalIO::CardinalIO.def
+* gm2-libs-log/Conversions::Conversions.def
+* gm2-libs-log/DebugPMD::DebugPMD.def
+* gm2-libs-log/DebugTrace::DebugTrace.def
+* gm2-libs-log/Delay::Delay.def
+* gm2-libs-log/Display::Display.def
+* gm2-libs-log/ErrorCode::ErrorCode.def
+* gm2-libs-log/FileSystem::FileSystem.def
+* gm2-libs-log/FloatingUtilities::FloatingUtilities.def
+* gm2-libs-log/InOut::InOut.def
+* gm2-libs-log/Keyboard::Keyboard.def
+* gm2-libs-log/LongIO::LongIO.def
+* gm2-libs-log/NumberConversion::NumberConversion.def
+* gm2-libs-log/Random::Random.def
+* gm2-libs-log/RealConversions::RealConversions.def
+* gm2-libs-log/RealInOut::RealInOut.def
+* gm2-libs-log/Strings::Strings.def
+* gm2-libs-log/Termbase::Termbase.def
+* gm2-libs-log/Terminal::Terminal.def
+* gm2-libs-log/TimeDate::TimeDate.def
@end menu
-@node gm2-libs-pim/BitBlockOps, gm2-libs-pim/BitByteOps, , PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/BitBlockOps
+@node gm2-libs-log/BitBlockOps, gm2-libs-log/BitByteOps, , PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/BitBlockOps
@example
DEFINITION MODULE BitBlockOps ;
@@ -6225,8 +6235,8 @@ END BitBlockOps.
@end example
@page
-@node gm2-libs-pim/BitByteOps, gm2-libs-pim/BitWordOps, gm2-libs-pim/BitBlockOps, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/BitByteOps
+@node gm2-libs-log/BitByteOps, gm2-libs-log/BitWordOps, gm2-libs-log/BitBlockOps, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/BitByteOps
@example
DEFINITION MODULE BitByteOps ;
@@ -6363,8 +6373,8 @@ END BitByteOps.
@end example
@page
-@node gm2-libs-pim/BitWordOps, gm2-libs-pim/BlockOps, gm2-libs-pim/BitByteOps, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/BitWordOps
+@node gm2-libs-log/BitWordOps, gm2-libs-log/BlockOps, gm2-libs-log/BitByteOps, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/BitWordOps
@example
DEFINITION MODULE BitWordOps ;
@@ -6501,8 +6511,8 @@ END BitWordOps.
@end example
@page
-@node gm2-libs-pim/BlockOps, gm2-libs-pim/Break, gm2-libs-pim/BitWordOps, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/BlockOps
+@node gm2-libs-log/BlockOps, gm2-libs-log/Break, gm2-libs-log/BitWordOps, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/BlockOps
@example
DEFINITION MODULE BlockOps ;
@@ -6578,8 +6588,8 @@ END BlockOps.
@end example
@page
-@node gm2-libs-pim/Break, gm2-libs-pim/CardinalIO, gm2-libs-pim/BlockOps, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Break
+@node gm2-libs-log/Break, gm2-libs-log/CardinalIO, gm2-libs-log/BlockOps, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Break
@example
DEFINITION MODULE Break ;
@@ -6628,8 +6638,8 @@ END Break.
@end example
@page
-@node gm2-libs-pim/CardinalIO, gm2-libs-pim/Conversions, gm2-libs-pim/Break, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/CardinalIO
+@node gm2-libs-log/CardinalIO, gm2-libs-log/Conversions, gm2-libs-log/Break, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/CardinalIO
@example
DEFINITION MODULE CardinalIO ;
@@ -6768,8 +6778,8 @@ END CardinalIO.
@end example
@page
-@node gm2-libs-pim/Conversions, gm2-libs-pim/DebugPMD, gm2-libs-pim/CardinalIO, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Conversions
+@node gm2-libs-log/Conversions, gm2-libs-log/DebugPMD, gm2-libs-log/CardinalIO, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Conversions
@example
DEFINITION MODULE Conversions ;
@@ -6810,8 +6820,8 @@ END Conversions.
@end example
@page
-@node gm2-libs-pim/DebugPMD, gm2-libs-pim/DebugTrace, gm2-libs-pim/Conversions, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/DebugPMD
+@node gm2-libs-log/DebugPMD, gm2-libs-log/DebugTrace, gm2-libs-log/Conversions, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/DebugPMD
@example
DEFINITION MODULE DebugPMD ;
@@ -6820,8 +6830,8 @@ END DebugPMD.
@end example
@page
-@node gm2-libs-pim/DebugTrace, gm2-libs-pim/Delay, gm2-libs-pim/DebugPMD, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/DebugTrace
+@node gm2-libs-log/DebugTrace, gm2-libs-log/Delay, gm2-libs-log/DebugPMD, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/DebugTrace
@example
DEFINITION MODULE DebugTrace ;
@@ -6830,8 +6840,8 @@ END DebugTrace.
@end example
@page
-@node gm2-libs-pim/Delay, gm2-libs-pim/Display, gm2-libs-pim/DebugTrace, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Delay
+@node gm2-libs-log/Delay, gm2-libs-log/Display, gm2-libs-log/DebugTrace, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Delay
@example
DEFINITION MODULE Delay ;
@@ -6851,8 +6861,8 @@ END Delay.
@end example
@page
-@node gm2-libs-pim/Display, gm2-libs-pim/ErrorCode, gm2-libs-pim/Delay, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Display
+@node gm2-libs-log/Display, gm2-libs-log/ErrorCode, gm2-libs-log/Delay, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Display
@example
DEFINITION MODULE Display ;
@@ -6874,8 +6884,8 @@ END Display.
@end example
@page
-@node gm2-libs-pim/ErrorCode, gm2-libs-pim/FileSystem, gm2-libs-pim/Display, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/ErrorCode
+@node gm2-libs-log/ErrorCode, gm2-libs-log/FileSystem, gm2-libs-log/Display, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/ErrorCode
@example
DEFINITION MODULE ErrorCode ;
@@ -6914,8 +6924,8 @@ END ErrorCode.
@end example
@page
-@node gm2-libs-pim/FileSystem, gm2-libs-pim/FloatingUtilities, gm2-libs-pim/ErrorCode, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/FileSystem
+@node gm2-libs-log/FileSystem, gm2-libs-log/FloatingUtilities, gm2-libs-log/ErrorCode, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/FileSystem
@example
DEFINITION MODULE FileSystem ;
@@ -7201,8 +7211,8 @@ END FileSystem.
@end example
@page
-@node gm2-libs-pim/FloatingUtilities, gm2-libs-pim/InOut, gm2-libs-pim/FileSystem, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/FloatingUtilities
+@node gm2-libs-log/FloatingUtilities, gm2-libs-log/InOut, gm2-libs-log/FileSystem, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/FloatingUtilities
@example
DEFINITION MODULE FloatingUtilities ;
@@ -7297,8 +7307,8 @@ END FloatingUtilities.
@end example
@page
-@node gm2-libs-pim/InOut, gm2-libs-pim/Keyboard, gm2-libs-pim/FloatingUtilities, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/InOut
+@node gm2-libs-log/InOut, gm2-libs-log/Keyboard, gm2-libs-log/FloatingUtilities, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/InOut
@example
DEFINITION MODULE InOut ;
@@ -7488,8 +7498,8 @@ END InOut.
@end example
@page
-@node gm2-libs-pim/Keyboard, gm2-libs-pim/LongIO, gm2-libs-pim/InOut, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Keyboard
+@node gm2-libs-log/Keyboard, gm2-libs-log/LongIO, gm2-libs-log/InOut, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Keyboard
@example
DEFINITION MODULE Keyboard ;
@@ -7519,8 +7529,8 @@ END Keyboard.
@end example
@page
-@node gm2-libs-pim/LongIO, gm2-libs-pim/NumberConversion, gm2-libs-pim/Keyboard, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/LongIO
+@node gm2-libs-log/LongIO, gm2-libs-log/NumberConversion, gm2-libs-log/Keyboard, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/LongIO
@example
DEFINITION MODULE LongIO ;
@@ -7541,8 +7551,8 @@ END LongIO.
@end example
@page
-@node gm2-libs-pim/NumberConversion, gm2-libs-pim/Random, gm2-libs-pim/LongIO, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/NumberConversion
+@node gm2-libs-log/NumberConversion, gm2-libs-log/Random, gm2-libs-log/LongIO, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/NumberConversion
@example
DEFINITION MODULE NumberConversion ;
@@ -7553,8 +7563,8 @@ END NumberConversion.
@end example
@page
-@node gm2-libs-pim/Random, gm2-libs-pim/RealConversions, gm2-libs-pim/NumberConversion, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Random
+@node gm2-libs-log/Random, gm2-libs-log/RealConversions, gm2-libs-log/NumberConversion, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Random
@example
DEFINITION MODULE Random ;
@@ -7624,8 +7634,8 @@ END Random.
@end example
@page
-@node gm2-libs-pim/RealConversions, gm2-libs-pim/RealInOut, gm2-libs-pim/Random, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/RealConversions
+@node gm2-libs-log/RealConversions, gm2-libs-log/RealInOut, gm2-libs-log/Random, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/RealConversions
@example
DEFINITION MODULE RealConversions ;
@@ -7745,8 +7755,8 @@ END RealConversions.
@end example
@page
-@node gm2-libs-pim/RealInOut, gm2-libs-pim/Strings, gm2-libs-pim/RealConversions, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/RealInOut
+@node gm2-libs-log/RealInOut, gm2-libs-log/Strings, gm2-libs-log/RealConversions, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/RealInOut
@example
DEFINITION MODULE RealInOut ;
@@ -7862,8 +7872,8 @@ END RealInOut.
@end example
@page
-@node gm2-libs-pim/Strings, gm2-libs-pim/Termbase, gm2-libs-pim/RealInOut, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Strings
+@node gm2-libs-log/Strings, gm2-libs-log/Termbase, gm2-libs-log/RealInOut, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Strings
@example
DEFINITION MODULE Strings ;
@@ -7943,8 +7953,8 @@ END Strings.
@end example
@page
-@node gm2-libs-pim/Termbase, gm2-libs-pim/Terminal, gm2-libs-pim/Strings, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Termbase
+@node gm2-libs-log/Termbase, gm2-libs-log/Terminal, gm2-libs-log/Strings, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Termbase
@example
DEFINITION MODULE Termbase ;
@@ -8041,8 +8051,8 @@ END Termbase.
@end example
@page
-@node gm2-libs-pim/Terminal, gm2-libs-pim/TimeDate, gm2-libs-pim/Termbase, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/Terminal
+@node gm2-libs-log/Terminal, gm2-libs-log/TimeDate, gm2-libs-log/Termbase, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/Terminal
@example
DEFINITION MODULE Terminal ;
@@ -8120,8 +8130,8 @@ END Terminal.
@end example
@page
-@node gm2-libs-pim/TimeDate, , gm2-libs-pim/Terminal, PIM and Logitech 3.0 Compatible
-@subsection gm2-libs-pim/TimeDate
+@node gm2-libs-log/TimeDate, , gm2-libs-log/Terminal, PIM and Logitech 3.0 Compatible
+@subsection gm2-libs-log/TimeDate
@example
DEFINITION MODULE TimeDate ;
@@ -8218,74 +8228,13 @@ END TimeDate.
This directory contains a PIM @code{SYSTEM} containing the
@code{PROCESS} primitives built on top of @code{gthread}s.
@menu
-* gm2-libs-coroutines/Debug::Debug.def
* gm2-libs-coroutines/Executive::Executive.def
* gm2-libs-coroutines/KeyBoardLEDs::KeyBoardLEDs.def
* gm2-libs-coroutines/SYSTEM::SYSTEM.def
* gm2-libs-coroutines/TimerHandler::TimerHandler.def
@end menu
-@node gm2-libs-coroutines/Debug, gm2-libs-coroutines/Executive, , PIM coroutine support
-@subsection gm2-libs-coroutines/Debug
-
-@example
-DEFINITION MODULE Debug ;
-
-(*
- Description: provides some simple debugging routines.
-*)
-
-EXPORT QUALIFIED Halt, DebugString, PushOutput ;
-
-TYPE
-@findex WriteP (type)
- WriteP = PROCEDURE (CHAR) ;
-
-
-(*
- Halt - writes a message in the format:
- Module:Line:Message
-
- It then terminates by calling HALT.
-*)
-
-@findex Halt
-PROCEDURE Halt (File : ARRAY OF CHAR;
- LineNo : CARDINAL;
- Function,
- Message : ARRAY OF CHAR) ;
-
-
-(*
- DebugString - writes a string to the debugging device (Scn.Write).
- It interprets \n as carriage return, linefeed.
-*)
-
-@findex DebugString
-PROCEDURE DebugString (a: ARRAY OF CHAR) ;
-
-
-(*
- PushOutput - pushes the output procedure, p, which is used Debug.
-*)
-
-@findex PushOutput
-PROCEDURE PushOutput (p: WriteP) ;
-
-
-(*
- PopOutput - pops the current output procedure from the stack.
-*)
-
-@findex PopOutput
-PROCEDURE PopOutput ;
-
-
-END Debug.
-@end example
-@page
-
-@node gm2-libs-coroutines/Executive, gm2-libs-coroutines/KeyBoardLEDs, gm2-libs-coroutines/Debug, PIM coroutine support
+@node gm2-libs-coroutines/Executive, gm2-libs-coroutines/KeyBoardLEDs, , PIM coroutine support
@subsection gm2-libs-coroutines/Executive
@example
@@ -8647,7 +8596,7 @@ PROCEDURE SHIFT (val: <a set type>;
*)
@findex THROW
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
(*
THROW is a GNU extension and was not part of the PIM or ISO
standards. It throws an exception which will be caught by the EXCEPT
@@ -9523,7 +9472,8 @@ PROCEDURE AllocateSource(VAR newSource: ExceptionSource);
@findex RAISE
PROCEDURE RAISE (source: ExceptionSource;
- number: ExceptionNumber; message: ARRAY OF CHAR);
+ number: ExceptionNumber; message: ARRAY OF CHAR)
+ <* noreturn *> ;
(* Associates the given values of source, number and message with
the current context and raises an exception.
*)
@@ -10011,7 +9961,7 @@ TYPE
@findex RAISEdevException
PROCEDURE RAISEdevException (cid: IOChan.ChanId; did: DeviceId;
- x: DevExceptionRange; s: ARRAY OF CHAR);
+ x: DevExceptionRange; s: ARRAY OF CHAR) <* noreturn *> ;
(* If the device module identified by did is not the module that made the channel
identified by cid, the exception wrongDevice is raised; otherwise the given exception
@@ -10879,11 +10829,11 @@ TYPE
@findex ConstructModules
-PROCEDURE ConstructModules (applicationmodule: ADDRESS;
+PROCEDURE ConstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@findex DeconstructModules
-PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
+PROCEDURE DeconstructModules (applicationmodule, libname: ADDRESS;
argc: INTEGER; argv, envp: ADDRESS) ;
@@ -10894,7 +10844,7 @@ PROCEDURE DeconstructModules (applicationmodule: ADDRESS;
*)
@findex RegisterModule
-PROCEDURE RegisterModule (name: ADDRESS;
+PROCEDURE RegisterModule (name, libname: ADDRESS;
init, fini: ArgCVEnvP;
dependencies: PROC) ;
@@ -10905,7 +10855,8 @@ PROCEDURE RegisterModule (name: ADDRESS;
*)
@findex RequestDependant
-PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+PROCEDURE RequestDependant (modulename, libname,
+ dependantmodule, dependantlibname: ADDRESS) ;
(*
@@ -10960,17 +10911,30 @@ PROCEDURE InstallInitialProcedure (p: PROC) : BOOLEAN ;
*)
@findex HALT
-PROCEDURE HALT ([exitcode: INTEGER = -1]) ;
+PROCEDURE HALT ([exitcode: INTEGER = -1]) <* noreturn *> ;
(*
Halt - provides a more user friendly version of HALT, which takes
- four parameters to aid debugging.
+ four parameters to aid debugging. It writes an error message
+ to stderr and calls exit (1).
*)
@findex Halt
-PROCEDURE Halt (file: ARRAY OF CHAR; line: CARDINAL;
- function: ARRAY OF CHAR; description: ARRAY OF CHAR) ;
+PROCEDURE Halt (description, filename, function: ARRAY OF CHAR;
+ line: CARDINAL) <* noreturn *> ;
+
+
+(*
+ HaltC - provides a more user friendly version of HALT, which takes
+ four parameters to aid debugging. It writes an error message
+ to stderr and calls exit (1).
+*)
+
+@findex HaltC
+PROCEDURE HaltC (description, filename, function: ADDRESS;
+ line: CARDINAL) <* noreturn *> ;
+
(*
@@ -10987,9 +10951,9 @@ PROCEDURE ExitOnHalt (e: INTEGER) ;
@findex ErrorMessage
PROCEDURE ErrorMessage (message: ARRAY OF CHAR;
- file: ARRAY OF CHAR;
+ filename: ARRAY OF CHAR;
line: CARDINAL;
- function: ARRAY OF CHAR) ;
+ function: ARRAY OF CHAR) <* noreturn *> ;
(*
@@ -11025,53 +10989,53 @@ PROCEDURE Length (a: ARRAY OF CHAR) : CARDINAL ;
*)
@findex AssignmentException
-PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE AssignmentException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ReturnException
-PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex IncException
-PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE IncException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex DecException
-PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE DecException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex InclException
-PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE InclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ExclException
-PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ExclException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ShiftException
-PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ShiftException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex RotateException
-PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE RotateException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex StaticArraySubscriptException
-PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE StaticArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex DynamicArraySubscriptException
-PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE DynamicArraySubscriptException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopBeginException
-PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopBeginException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopToException
-PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopToException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ForLoopEndException
-PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ForLoopEndException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex PointerNilException
-PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE PointerNilException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex NoReturnException
-PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE NoReturnException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex CaseException
-PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE CaseException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeNonPosDivException
-PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeNonPosDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeNonPosModException
-PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeNonPosModException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeZeroDivException
-PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeZeroDivException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeZeroRemException
-PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeZeroRemException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex WholeValueException
-PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE WholeValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex RealValueException
-PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE RealValueException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex ParameterException
-PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE ParameterException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
@findex NoException
-PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) ;
+PROCEDURE NoException (filename: ADDRESS; line, column: CARDINAL; scope, message: ADDRESS) <* noreturn *> ;
END M2RTS.
@@ -11422,10 +11386,12 @@ END ProgramArgs.
@subsection gm2-libs-iso/RTco
@example
-DEFINITION MODULE RTco ;
+DEFINITION MODULE FOR "C" RTco ;
FROM SYSTEM IMPORT ADDRESS ;
+IMPORT RTentity ; (* Imported so the initialization call graph
+ understands that RTco.cc depends upon RTentity. *)
(* init initializes the module and allows the application to lazily invoke threads. *)
@@ -13261,7 +13227,7 @@ PROCEDURE TSIZE (<type>; ... ): CARDINAL;
*)
@findex THROW
-PROCEDURE THROW (i: INTEGER) ;
+PROCEDURE THROW (i: INTEGER) <* noreturn *> ;
(*
THROW is a GNU extension and was not part of the PIM or ISO
standards. It throws an exception which will be caught by the
diff --git a/gcc/m2/tools-src/def2doc.py b/gcc/m2/tools-src/def2doc.py
index 47e75d874b4..fbc7497edfd 100644
--- a/gcc/m2/tools-src/def2doc.py
+++ b/gcc/m2/tools-src/def2doc.py
@@ -29,7 +29,7 @@ import sys
Base_Libs = ['gm2-libs', 'Base libraries', 'Basic M2F compatible libraries']
PIM_Log_Desc = 'PIM and Logitech 3.0 compatible libraries'
-PIM_Log = ['gm2-libs-pim', 'PIM and Logitech 3.0 Compatible', PIM_Log_Desc]
+PIM_Log = ['gm2-libs-log', 'PIM and Logitech 3.0 Compatible', PIM_Log_Desc]
PIM_Cor_Desc = 'PIM compatible process support'
PIM_Cor = ['gm2-libs-coroutines', 'PIM coroutine support', PIM_Cor_Desc]
ISO_Libs = ['gm2-libs-iso', 'M2 ISO Libraries', 'ISO defined libraries']
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-19 13:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 13:07 [gcc r13-6753] [modula2] target independent doc and tools rebuilt Gaius Mulley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).