( 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.
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
(*
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 ;
(*
SetReturnCheck - set return statement checking in procedure functions
- to value.
+ to value. TRUE is returned.
*)
PROCEDURE SetReturnCheck (value: BOOLEAN) : BOOLEAN ;
(*
SetAutoInit - -fauto-init turns on automatic initialization of pointers to NIL.
+ TRUE is returned.
*)
PROCEDURE SetAutoInit (value: BOOLEAN) ;
IF f=NIL
THEN
Halt('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
RETURN( f^.epsilon )
END
IF f=NIL
THEN
Halt('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
RETURN( f^.reachend )
END
IF calcfollow
THEN
Halt('why are we reassigning this follow set?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
follow := s ;
calcfollow := TRUE
IF f=NIL
THEN
Halt ('why is the follow info NIL?',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
ELSE
WITH f^ DO
IF calcfollow
RETURN( follow )
ELSE
Halt('not calculated the follow set yet..',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END
END
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END CodeCondition ;
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
OnLineStart := TRUE
END CodeThenDo ;
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END ;
OnLineStart := FALSE
END CodeEnd ;
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END RecoverCondition ;
ELSE
Halt('unrecognised m2condition',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END ConditionIndent ;
ELSE
Halt('unknown element in enumeration type',
- __FILE_, __FUNCTION__, __LINE__)
+ __FILE__, __FUNCTION__, __LINE__)
END
END ;
from := from^.next
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));
}
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 ;
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. *)
for building a function. */
void
-m2decl_BuildStartFunctionDeclaration (int uses_varargs)
+m2decl_BuildStartFunctionDeclaration (bool uses_varargs)
{
if (uses_varargs)
param_type_list = NULL_TREE;
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,
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);
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);
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);
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);
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);
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)
{
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);
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);
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);
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);
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)
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;
/* 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;
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;
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 ;
(*
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 ;
(*
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 ;
(*
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 ;
(*
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 ;
(*
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);
BuildParameterDeclaration. */
tree
-m2type_BuildEndFunctionType (tree func, tree return_type, int uses_varargs)
+m2type_BuildEndFunctionType (tree func, tree return_type, bool uses_varargs)
{
tree last;
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);
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 *
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
}
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;
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 */
};
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);
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);
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)
%}
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; }
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; }
* 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));
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;
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) */
(strcmp(currentFunction->name, yytext) == 0))
popFunction();
}
- seenFunctionStart = FALSE;
- seenEnd = FALSE;
- seenModuleStart = FALSE;
+ seenFunctionStart = false;
+ seenEnd = false;
+ seenModuleStart = false;
}
/*
currentLine->nextpos = 0;
currentLine->lineno = lineno;
currentLine->column = 0;
- currentLine->inuse = TRUE;
+ currentLine->inuse = true;
currentLine->next = NULL;
}
l->next = currentLine;
currentLine = l;
}
- currentLine->inuse = TRUE;
+ currentLine->inuse = true;
}
/*
}
/*
- * 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;
}
/*
}
/*
- * 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;
currentLine->lineno = lineno;
START_FILE (filename, lineno);
BEGIN INITIAL; resetpos ();
- return TRUE;
+ return true;
}
}
/*
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).
/*
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;
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);
/*
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).
/*
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
/*
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
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;
/*
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
(*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;
}
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
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.
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);
}
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);
}
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
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.
}
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. */
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);
}
}
}
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);
}
}
}
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")));
}
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")));
}
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")));
}
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")));
}
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 ? */
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
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")));
}
{
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
{
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
{
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
{
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
{
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
{
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
{
}
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('}
') ; */
# include "GSYSTEM.h"
# define enableDeallocation true
-# define enableZero false
+# define enableZero true
# define enableTrace false
static unsigned int callno;
static bool zero;
(*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)
{
}
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)
(*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)
{
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);
/*
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
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);
(*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)
}
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);
}
}
}
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);
}
}
child^.key := key ;
child^.name := name
ELSE
- Halt ('symbol already stored', __LINE__, __FILE__)
+ Halt ('symbol already stored', __FILE__, __FUNCTION__, __LINE__)
END
END putSymKey ;
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 ;
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
(* 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 ;
*)
@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
*)
@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
(* 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 ;
@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
@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
(*
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) ;
(*
(*
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
@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) ;
*)
@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.
@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) ;
*)
@findex RegisterModule
-PROCEDURE RegisterModule (name: ADDRESS;
+PROCEDURE RegisterModule (name, libname: ADDRESS;
init, fini: ArgCVEnvP;
dependencies: PROC) ;
*)
@findex RequestDependant
-PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+PROCEDURE RequestDependant (modulename, libname,
+ dependantmodule, dependantlibname: ADDRESS) ;
(*
(*
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 *> ;
(*
@findex ErrorMessage
PROCEDURE ErrorMessage (message: ARRAY OF CHAR;
- file: ARRAY OF CHAR;
+ filename: ARRAY OF CHAR;
line: CARDINAL;
function: ARRAY OF CHAR) <* noreturn *> ;
*)
@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.
PROCEDURE Raise (number: CARDINAL;
file: ADDRESS; line: CARDINAL;
column: CARDINAL; function: ADDRESS;
- message: ADDRESS) ;
+ message: ADDRESS) <* noreturn *> ;
(*
*)
@findex AttachVector
-PROCEDURE AttachVector (vec: CARDINAL; p: ADDRESS) : ADDRESS ;
+PROCEDURE AttachVector (vec: CARDINAL; ptr: ADDRESS) : ADDRESS ;
(*
*)
@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
memcpy, memset, memmove, printf, realloc,
rand, srand,
time, localtime, ftime,
- shutdown, rename, setjmp, longjmp, atexit,
+ shutdown, snprintf,
+ rename, setjmp, longjmp, atexit,
ttyname, sleep, execv ;
(*
+ 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,
is true. It returns 0 on success and -1 for an error.
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)
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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
@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 ;
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
*)
@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
@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.
*)
@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
@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) ;
*)
@findex RegisterModule
-PROCEDURE RegisterModule (name: ADDRESS;
+PROCEDURE RegisterModule (name, libname: ADDRESS;
init, fini: ArgCVEnvP;
dependencies: PROC) ;
*)
@findex RequestDependant
-PROCEDURE RequestDependant (modulename, dependantmodule: ADDRESS) ;
+PROCEDURE RequestDependant (modulename, libname,
+ dependantmodule, dependantlibname: ADDRESS) ;
(*
*)
@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 *> ;
+
(*
@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 *> ;
(*
*)
@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.
@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. *)
*)
@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
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']