@code{-fm2-dump-filter=m2pim.StrIO.WriteString} and
@code{-fm2-dump-filter=StrLib.mod:StrIO.WriteString}.
+@item -fm2-file-offset-bits=
+force the type @code{SYSTEM.COFF_T} to be built using the specified
+number of bits. If this option is not used then default is 64 bits.
+
@item -fm2-g
improve the debugging experience for new programmers at the expense
of generating @code{nop} instructions if necessary to ensure single
FROM M2System IMPORT IsPseudoSystemFunction, IsSystemType,
GetSystemTypeMinMax, Address, Word, Byte, Loc,
System, IntegerN, CardinalN, WordN, RealN, SetN, ComplexN,
- CSizeT, CSSizeT ;
+ CSizeT, CSSizeT, COffT ;
FROM M2Bitset IMPORT Bitset, Bitnum ;
FROM SymbolConversion IMPORT AddModGcc, Mod2Gcc, GccKnowsAbout, Poison, RemoveMod2Gcc ;
GetM2Cardinal16, GetM2Cardinal32, GetM2Cardinal64, GetM2Word16, GetM2Word32,
GetM2Word64, GetM2Bitset8, GetM2Bitset16, GetM2Bitset32, GetM2Real32, GetM2Real64,
GetM2Real96, GetM2Real128, GetM2Complex32, GetM2Complex64, GetM2Complex96,
- GetM2Complex128, GetCSizeTType, GetCSSizeTType,
+ GetM2Complex128, GetCSizeTType, GetCSSizeTType, GetCOffTType,
GetPackedBooleanType, BuildConstPointerType,
BuildPointerType, BuildEnumerator, BuildStartEnumeration, BuildEndEnumeration,
SetAlignment, SetTypePacked, SetDeclPacked, BuildSmallestTypeRange,
DeclareDefaultType(ShortComplex, "SHORTCOMPLEX", GetM2ShortComplexType()) ;
DeclareDefaultType(CSizeT , "CSIZE_T" , GetCSizeTType()) ;
DeclareDefaultType(CSSizeT , "CSSIZE_T" , GetCSSizeTType()) ;
+ DeclareDefaultType(COffT , "COFF_T" , GetCOffTType()) ;
DeclareBoolean ;
THEN
RETURN GetSizeOfHighFromUnbounded(tokenno, param)
ELSE
- RETURN BuildSize(tokenno, Mod2Gcc(GetType(param)), FALSE)
+ RETURN BuildSize (TokenToLocation (tokenno), Mod2Gcc (GetType (param)), FALSE)
END
END GetParamSize ;
PROCEDURE SetEnableForward (value: BOOLEAN) ;
+(*
+ SetFileOffsetBits - set the number of bits used by SYSTEM.COFF_T to bits.
+*)
+
+PROCEDURE SetFileOffsetBits (value: BOOLEAN; bits: CARDINAL) : BOOLEAN ;
+
+
+(*
+ GetFileOffsetBits - return the number of bits used by SYSTEM.COFF_T.
+*)
+
+PROCEDURE GetFileOffsetBits () : CARDINAL ;
+
+
(*
FinaliseOptions - once all options have been parsed we set any inferred
values.
UselistFlag,
CC1Quiet,
SeenSources : BOOLEAN ;
+ OffTBits : CARDINAL ;
ForcedLocationValue : location_t ;
END SetEnableForward ;
+(*
+ SetFileOffsetBits - create SYSTEM.COFF_T as a signed integer of size bits.
+*)
+
+PROCEDURE SetFileOffsetBits (value: BOOLEAN; bits: CARDINAL) : BOOLEAN ;
+BEGIN
+ IF value
+ THEN
+ OffTBits := bits
+ END ;
+ RETURN TRUE
+END SetFileOffsetBits ;
+
+
+(*
+ GetFileOffsetBits - return the number of bits used to create SYSTEM.COFF_T.
+*)
+
+PROCEDURE GetFileOffsetBits () : CARDINAL ;
+BEGIN
+ RETURN OffTBits
+END GetFileOffsetBits ;
+
+
BEGIN
cflag := FALSE ; (* -c. *)
RuntimeModuleOverride := InitString (DefaultRuntimeModuleOverride) ;
DumpGimple := FALSE ;
M2Dump := NIL ;
M2DumpFilter := NIL ;
- EnableForward := TRUE
+ EnableForward := TRUE ;
+ OffTBits := 64 ; (* Default to 64bit OFF_T. *)
END M2Options.
Address, (* System Type *)
CSizeT, (* System Type *)
CSSizeT, (* System Type *)
+ COffT, (* System Type *)
Adr, (* System Function *)
TSize, (* System Function *)
Word, Byte,
Address,
CSizeT, CSSizeT,
+ COffT,
Adr,
TSize, TBitSize,
GetM2Real32, GetM2Real64, GetM2Real96, GetM2Real128,
GetM2Complex32, GetM2Complex64, GetM2Complex96, GetM2Complex128,
GetBitsetType, GetISOByteType, GetISOWordType,
- GetCSizeTType, GetCSSizeTType, InitSystemTypes ;
+ GetCSizeTType, GetCSSizeTType, GetCOffTType,
+ InitSystemTypes ;
FROM m2expr IMPORT BuildSize, GetSizeOf, AreConstantsEqual ;
PROCEDURE MakeExtraSystemTypes ;
BEGIN
CSizeT := CreateType ('CSIZE_T' , '', '', TRUE, GetCSizeTType ()) ;
- CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType ())
+ CSSizeT := CreateType ('CSSIZE_T', '', '', TRUE, GetCSSizeTType ()) ;
+ COffT := CreateType ('COFF_T', '', '', TRUE, GetCOffTType ()) ;
END MakeExtraSystemTypes ;
'first proper declaration of procedure {%1Ea}', ProcSym) ;
MetaErrorT1 (tok, 'procedure {%1Ea} has already been declared', ProcSym)
ELSE
- PutProcedureDeclaredTok (ProcSym, ProperProcedure, tok)
+ PutProcedureDeclaredTok (ProcSym, ProperProcedure, tok) ;
+ PutProcedureDefined (ProcSym, ProperProcedure)
END ;
Assert (NOT CompilingDefinitionModule()) ;
LeaveBlock
Debug - call stop if symbol name is name.
*)
-PROCEDURE Debug (sym: CARDINAL; name: ARRAY OF CHAR) ;
+PROCEDURE Debug (tok: CARDINAL; sym: CARDINAL; name: ARRAY OF CHAR) ;
BEGIN
IF MakeKey (name) = GetSymName (sym)
THEN
stop
- END
+ END ;
+ MetaErrorT1 (tok, 'procedure {%1Wa}', sym)
END Debug ;
PopT (ParamTotal) ;
ProcSym := CARDINAL (OperandT (3 + CARDINAL (OperandT (3)) + 2)) ;
tok := CARDINAL (OperandTok (3 + CARDINAL (OperandT (3)) + 2)) ;
- Debug (ProcSym, 'foo') ;
+ (* Debug (tok, ProcSym, 'foo') ; *)
curkind := GetProcedureKind (ProcSym, tok) ;
PushT (ParamTotal) ;
Annotate ("%1d||running total of no. of parameters") ;
HasVarArgs := FALSE ; (* Does the procedure use ... ? *)
HasOptArg := FALSE ; (* Does this procedure use [ ] ? *)
IsNoReturn := FALSE ; (* Declared attribute noreturn ? *)
- ReturnOptional := FALSE (* Is the return value optional? *)
+ ReturnOptional := FALSE ; (* Is the return value optional? *)
+ ProcedureTok := UnknownTokenNo
END
END InitProcedureDeclaration ;
DEFINITION MODULE gcctypes ;
-FROM SYSTEM IMPORT ADDRESS ;
+FROM SYSTEM IMPORT ADDRESS, CARDINAL64 ;
EXPORT UNQUALIFIED location_t, tree ;
TYPE
(* Not declared here by the bootstrap tool mc when
--gcc-config-system is used. *)
- location_t = CARDINAL ;
+ location_t = CARDINAL64 ;
tree = ADDRESS ;
linemap_add (line_table, LC_ENTER, false, xstrdup (m2linemap_GetFilenameFromLocation (start)), 1);
gcc_assert (inFile);
location_t location = make_location (caret, start, finish);
+ linemap_add (line_table, LC_LEAVE, false, NULL, 0);
return location;
}
return caret;
EXTERN void M2Options_SetForcedLocation (location_t location);
EXTERN location_t M2Options_OverrideLocation (location_t location);
EXTERN void M2Options_SetStatistics (bool on);
+EXTERN bool M2Options_SetFileOffsetBits (bool value, unsigned int bits);
+EXTERN unsigned int M2Options_GetFileOffsetBits (void);
EXTERN void M2Options_CppProg (const char *program);
EXTERN void M2Options_CppArg (const char *opt, const char *arg, bool joined);
EXTERN void M2Options_SetWholeProgram (bool value);
static GTY (()) tree m2_complex128_type_node;
static GTY (()) tree m2_packed_boolean_type_node;
static GTY (()) tree m2_cardinal_address_type_node;
+static GTY (()) tree m2_offt_type_node;
/* gm2_canonicalize_array - returns a unique array node based on
index_type and type. */
return integer_type_node;
}
-/* GetCSizeTType return a type representing, size_t on this system. */
+/* GetCSizeTType return a type representing size_t. */
tree
m2type_GetCSizeTType (void)
return sizetype;
}
-/* GetCSSizeTType return a type representing, size_t on this
- system. */
+/* GetCSSizeTType return a type representing size_t. */
tree
m2type_GetCSSizeTType (void)
return ssizetype;
}
+/* GetCSSizeTType return a type representing off_t. */
+
+tree
+m2type_GetCOffTType (void)
+{
+ return m2_offt_type_node;
+}
+
/* GetPackedBooleanType return the packed boolean data type node. */
tree
return c;
}
+static tree
+build_m2_offt_type_node (location_t location)
+{
+ m2assert_AssertLocation (location);
+ return build_m2_specific_size_type (location, INTEGER_TYPE,
+ M2Options_GetFileOffsetBits (), true);
+}
+
/* m2type_InitSystemTypes initialise loc and word derivatives. */
void
m2_word16_type_node = build_m2_word16_type_node (location, loc);
m2_word32_type_node = build_m2_word32_type_node (location, loc);
m2_word64_type_node = build_m2_word64_type_node (location, loc);
+ m2_offt_type_node = build_m2_offt_type_node (location);
}
static tree
(*
- GetCSizeTType - return a type representing, size_t on this system.
+ GetCSizeTType - return a type representing size_t.
*)
PROCEDURE GetCSizeTType () : tree ;
(*
- GetCSSizeTType - return a type representing, ssize_t on this system.
+ GetCSSizeTType - return a type representing ssize_t.
*)
PROCEDURE GetCSSizeTType () : tree ;
+(*
+ GetCOffTType - return a type representing OFF_T.
+*)
+
+PROCEDURE GetCOffTType () : tree ;
+
+
(*
BuildArrayStringConstructor - creates an array constructor for, arrayType,
consisting of the character elements
EXTERN tree m2type_GetProcType (void);
EXTERN tree m2type_GetCSizeTType (void);
EXTERN tree m2type_GetCSSizeTType (void);
-
+EXTERN tree m2type_GetCOffTType (void);
EXTERN tree m2type_GetM2CType (void);
EXTERN tree m2type_GetBitsetType (void);
return M2Options_SetUninitVariableChecking (value, "known");
case OPT_Wuninit_variable_checking_:
return M2Options_SetUninitVariableChecking (value, arg);
+ case OPT_fm2_file_offset_bits_:
+ {
+ if (arg != NULL)
+ {
+ unsigned int bits = atoi (arg);
+ if (bits > 0)
+ return M2Options_SetFileOffsetBits (value, bits);
+ }
+ return 0;
+ }
case OPT_fm2_strict_type:
M2Options_SetStrictTypeChecking (value);
return 1;
FROM COROUTINES IMPORT PROTECTION ;
EXPORT QUALIFIED (* the following are built into the compiler: *)
- ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *)
+ ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *)
ADR, TSIZE, ROTATE, SHIFT, THROW, TBITSIZE,
(* SIZE is exported depending upon -fpim2 and
-fpedantic. *)
(* The constants and types define underlying properties of storage *)
EXPORT QUALIFIED BITSPERLOC, LOCSPERWORD,
- LOC, BYTE, WORD, ADDRESS, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *)
+ LOC, BYTE, WORD, ADDRESS, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *)
ADDADR, SUBADR, DIFADR, MAKEADR, ADR, ROTATE,
SHIFT, CAST, TSIZE,
DEFINITION MODULE SYSTEM ;
EXPORT QUALIFIED BITSPERBYTE, BYTESPERWORD,
- ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *)
+ ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, (* @SYSTEM_DATATYPES@ *)
ADR, TSIZE ;
(* SIZE is also exported if -fpim2 is used *)
DEFINITION MODULE SYSTEM ;
EXPORT QUALIFIED BITSPERBYTE, BYTESPERWORD,
- ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, (* @SYSTEM_DATATYPES@ *)
+ ADDRESS, WORD, BYTE, CSIZE_T, CSSIZE_T, COFF_T, CARDINAL64, (* @SYSTEM_DATATYPES@ *)
ADR, TSIZE, ROTATE, SHIFT, THROW, TBITSIZE ;
(* SIZE is also exported if -fpim2 is used. *)
DEFINITION MODULE FOR "C" libc ;
-FROM SYSTEM IMPORT ADDRESS, CSIZE_T, CSSIZE_T ;
+FROM SYSTEM IMPORT ADDRESS, CSIZE_T, CSSIZE_T, COFF_T ;
EXPORT UNQUALIFIED time_t, timeb, tm, ptrToTM,
atof, atoi, atol, atoll,
off_t lseek(int fildes, off_t offset, int whence);
*)
-PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ CSSIZE_T ] ;
+PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ COFF_T ] ;
(*
Modula-2 Joined
filter the language dump using a comma separated list of procedures and modules
+fm2-file-offset-bits=
+Modula-2 Joined
+override the default 64 bit definition of SYSTEM.COFF_T with the argument specified
+
fm2-g
Modula-2
generate extra nops to improve debugging, producing an instruction for every code related keyword
libc_lseek (int fd, off_t offset, int whence)
{
tracedb ("libc_lseek (%s, %p, %d)\n", fd, offset, whence);
- int result = lseek (fd, offset, whence);
+ off_t result = lseek (fd, offset, whence);
tracedb_result (result);
return result;
}
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_ASCII_H)
# define _ASCII_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Args_H)
# define _Args_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Assertion_H)
# define _Assertion_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Break_H)
# define _Break_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_COROUTINES_H)
# define _COROUTINES_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_CmdArgs_H)
# define _CmdArgs_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Debug_H)
# define _Debug_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_DynamicStrings_H)
# define _DynamicStrings_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Environment_H)
# define _Environment_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_FIO_H)
# define _FIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_FormatStrings_H)
# define _FormatStrings_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_FpuIO_H)
# define _FpuIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_IO_H)
# define _IO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Indexing_H)
# define _Indexing_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_M2Dependent_H)
# define _M2Dependent_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_M2EXCEPTION_H)
# define _M2EXCEPTION_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
memcpy (function, function_, _function_high+1);
M2RTS_ErrorMessage ((const char *) description, _description_high, (const char *) filename, _filename_high, line, (const char *) function, _function_high);
+ libc_exit (1);
}
extern "C" void M2RTS_HaltC (void * description, void * filename, void * function, unsigned int line)
{
ErrorMessageC (description, filename, line, function);
+ libc_exit (1);
}
#if !defined (_M2RTS_H)
# define _M2RTS_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_MemUtils_H)
# define _MemUtils_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_NumberIO_H)
# define _NumberIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_PushBackInput_H)
# define _PushBackInput_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_RTExceptions_H)
# define _RTExceptions_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_RTco_H)
# define _RTco_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_RTentity_H)
# define _RTentity_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_RTint_H)
# define _RTint_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_SArgs_H)
# define _SArgs_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_SFIO_H)
# define _SFIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_SYSTEM_H)
# define _SYSTEM_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_Selective_H)
# define _Selective_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_StdIO_H)
# define _StdIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_Storage_H)
# define _Storage_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_StrCase_H)
# define _StrCase_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_StrIO_H)
# define _StrIO_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_StrLib_H)
# define _StrLib_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_StringConvert_H)
# define _StringConvert_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_SysExceptions_H)
# define _SysExceptions_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_SysStorage_H)
# define _SysStorage_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_TimeString_H)
# define _TimeString_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_UnixArgs_H)
# define _UnixArgs_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_alists_H)
# define _alists_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
typedef decl__T1 *decl_group;
-typedef enum {decl_explist, decl_funccall, decl_exit, decl_return, decl_stmtseq, decl_comment, decl_halt, decl_new, decl_dispose, decl_inc, decl_dec, decl_incl, decl_excl, decl_length, decl_nil, decl_true, decl_false, decl_address, decl_loc, decl_byte, decl_word, decl_csizet, decl_cssizet, decl_char, decl_cardinal, decl_longcard, decl_shortcard, decl_integer, decl_longint, decl_shortint, decl_real, decl_longreal, decl_shortreal, decl_bitset, decl_boolean, decl_proc, decl_ztype, decl_rtype, decl_complex, decl_longcomplex, decl_shortcomplex, decl_type, decl_record, decl_varient, decl_var, decl_enumeration, decl_subrange, decl_array, decl_subscript, decl_string, decl_const, decl_literal, decl_varparam, decl_param, decl_varargs, decl_optarg, decl_pointer, decl_recordfield, decl_varientfield, decl_enumerationfield, decl_set, decl_proctype, decl_procedure, decl_def, decl_imp, decl_module, decl_loop, decl_while, decl_for, decl_repeat, decl_case, decl_caselabellist, decl_caselist, decl_range, decl_assignment, decl_if, decl_elsif, decl_constexp, decl_neg, decl_cast, decl_val, decl_plus, decl_sub, decl_div, decl_mod, decl_mult, decl_divide, decl_in, decl_adr, decl_size, decl_tsize, decl_ord, decl_float, decl_trunc, decl_chr, decl_abs, decl_cap, decl_high, decl_throw, decl_unreachable, decl_cmplx, decl_re, decl_im, decl_min, decl_max, decl_componentref, decl_pointerref, decl_arrayref, decl_deref, decl_equal, decl_notequal, decl_less, decl_greater, decl_greequal, decl_lessequal, decl_lsl, decl_lsr, decl_lor, decl_land, decl_lnot, decl_lxor, decl_and, decl_or, decl_not, decl_identlist, decl_vardecl, decl_setvalue, decl_opaquecast} decl_nodeT;
+typedef enum {decl_explist, decl_funccall, decl_exit, decl_return, decl_stmtseq, decl_comment, decl_halt, decl_new, decl_dispose, decl_inc, decl_dec, decl_incl, decl_excl, decl_length, decl_nil, decl_true, decl_false, decl_address, decl_loc, decl_byte, decl_word, decl_csizet, decl_cssizet, decl_cofft, decl_cardinal64, decl_char, decl_cardinal, decl_longcard, decl_shortcard, decl_integer, decl_longint, decl_shortint, decl_real, decl_longreal, decl_shortreal, decl_bitset, decl_boolean, decl_proc, decl_ztype, decl_rtype, decl_complex, decl_longcomplex, decl_shortcomplex, decl_type, decl_record, decl_varient, decl_var, decl_enumeration, decl_subrange, decl_array, decl_subscript, decl_string, decl_const, decl_literal, decl_varparam, decl_param, decl_varargs, decl_optarg, decl_pointer, decl_recordfield, decl_varientfield, decl_enumerationfield, decl_set, decl_proctype, decl_procedure, decl_def, decl_imp, decl_module, decl_loop, decl_while, decl_for, decl_repeat, decl_case, decl_caselabellist, decl_caselist, decl_range, decl_assignment, decl_if, decl_elsif, decl_constexp, decl_neg, decl_cast, decl_val, decl_plus, decl_sub, decl_div, decl_mod, decl_mult, decl_divide, decl_in, decl_adr, decl_size, decl_tsize, decl_ord, decl_float, decl_trunc, decl_chr, decl_abs, decl_cap, decl_high, decl_throw, decl_unreachable, decl_cmplx, decl_re, decl_im, decl_min, decl_max, decl_componentref, decl_pointerref, decl_arrayref, decl_deref, decl_equal, decl_notequal, decl_less, decl_greater, decl_greequal, decl_lessequal, decl_lsl, decl_lsr, decl_lor, decl_land, decl_lnot, decl_lxor, decl_and, decl_or, decl_not, decl_identlist, decl_vardecl, decl_setvalue, decl_opaquecast} decl_nodeT;
typedef enum {decl_ansiC, decl_ansiCP, decl_pim4} decl_language;
static decl_node__opaque wordN;
static decl_node__opaque csizetN;
static decl_node__opaque cssizetN;
+static decl_node__opaque cofftN;
+static decl_node__opaque cardinal64N;
static decl_node__opaque adrN;
static decl_node__opaque sizeN;
static decl_node__opaque tsizeN;
extern "C" bool decl_isPointer (decl_node n);
/*
- isProcedure - returns TRUE if, n, is a procedure.
+ isProcedure - returns TRUE if node, n, is a procedure.
*/
extern "C" bool decl_isProcedure (decl_node n);
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_char:
case decl_cardinal:
case decl_longcard:
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_char:
case decl_integer:
case decl_longint:
return n;
break;
+ case decl_cofft:
+ return n;
+ break;
+
+ case decl_cardinal64:
+ return n;
+ break;
+
case decl_boolean:
/* base types. */
return n;
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
doSystemC (p, n);
break;
switch (n->kind)
{
case decl_address:
- return true;
- break;
-
case decl_loc:
- return true;
- break;
-
case decl_byte:
- return true;
- break;
-
case decl_word:
- return true;
- break;
-
case decl_csizet:
- return true;
- break;
-
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
return true;
break;
keyc_useSSize_t ();
break;
+ case decl_cofft:
+ outText (p, (const char *) "off_t", 5);
+ mcPretty_setNeedSpace (p);
+ break;
+
+ case decl_cardinal64:
+ outText (p, (const char *) "uint64_t", 8);
+ mcPretty_setNeedSpace (p);
+ break;
+
default:
CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_boolean:
case decl_char:
case decl_cardinal:
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_char:
case decl_cardinal:
case decl_longcard:
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_char:
case decl_cardinal:
case decl_longcard:
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
doNameM2 (p, n);
break;
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
case decl_boolean:
case decl_proc:
case decl_char:
wordN = makeBase (decl_word);
csizetN = makeBase (decl_csizet);
cssizetN = makeBase (decl_cssizet);
+ cofftN = makeBase (decl_cofft);
+ cardinal64N = makeBase (decl_cardinal64);
adrN = makeBase (decl_adr);
tsizeN = makeBase (decl_tsize);
throwN = makeBase (decl_throw);
wordN = addToScope (wordN);
csizetN = addToScope (csizetN);
cssizetN = addToScope (cssizetN);
+ cofftN = addToScope (cofftN);
+ cardinal64N = addToScope (cardinal64N);
adrN = addToScope (adrN);
tsizeN = addToScope (tsizeN);
throwN = addToScope (throwN);
addDone (wordN);
addDone (csizetN);
addDone (cssizetN);
+ addDone (cofftN);
+ addDone (cardinal64N);
}
return n;
break;
+ case decl_cofft:
+ return n;
+ break;
+
+ case decl_cardinal64:
+ return n;
+ break;
+
case decl_boolean:
/* base types. */
return n;
case decl_word:
case decl_csizet:
case decl_cssizet:
+ case decl_cofft:
+ case decl_cardinal64:
return static_cast<decl_node> (systemN);
break;
/*
- isProcedure - returns TRUE if, n, is a procedure.
+ isProcedure - returns TRUE if node, n, is a procedure.
*/
extern "C" bool decl_isProcedure (decl_node n)
return nameKey_makeKey ((const char *) "CSSIZE_T", 8);
break;
+ case decl_cofft:
+ return nameKey_makeKey ((const char *) "COFF_T", 6);
+ break;
+
+ case decl_cardinal64:
+ return nameKey_makeKey ((const char *) "CARDINAL64", 10);
+ break;
+
case decl_boolean:
/* base types. */
return nameKey_makeKey ((const char *) "BOOLEAN", 7);
#if !defined (_decl_H)
# define _decl_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_dtoa_H)
# define _dtoa_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_errno_H)
# define _errno_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
if (! initializedGCC)
{
initializedGCC = true;
+ mcPretty_print (p, (const char *) "#define INCLUDE_MEMORY\\n", 24);
mcPretty_print (p, (const char *) "#include \"config.h\"\\n", 21);
mcPretty_print (p, (const char *) "#include \"system.h\"\\n", 21);
checkGccTypes (p);
#if !defined (_keyc_H)
# define _keyc_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_ldtoa_H)
# define _ldtoa_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_libc_H)
# define _libc_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_libm_H)
# define _libm_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_lists_H)
# define _lists_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcComment_H)
# define _mcComment_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcComp_H)
# define _mcComp_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcDebug_H)
# define _mcDebug_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcError_H)
# define _mcError_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcFileName_H)
# define _mcFileName_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcLexBuf_H)
# define _mcLexBuf_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcMetaError_H)
# define _mcMetaError_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcOptions_H)
# define _mcOptions_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcPreprocess_H)
# define _mcPreprocess_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcPretty_H)
# define _mcPretty_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcPrintf_H)
# define _mcPrintf_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcQuiet_H)
# define _mcQuiet_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcReserved_H)
# define _mcReserved_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcSearch_H)
# define _mcSearch_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcStack_H)
# define _mcStack_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcStream_H)
# define _mcStream_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_mcflex_H)
# define _mcflex_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcp1_H)
# define _mcp1_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcp2_H)
# define _mcp2_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcp3_H)
# define _mcp3_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcp4_H)
# define _mcp4_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING. If not,
see <https://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_mcp5_H)
# define _mcp5_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_nameKey_H)
# define _nameKey_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_symbolKey_H)
# define _symbolKey_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_termios_H)
# define _termios_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_varargs_H)
# define _varargs_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
along with GNU Modula-2; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
#include <stdbool.h>
#if !defined (_wlists_H)
# define _wlists_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_wrapc_H)
# define _wrapc_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
nil, true, false,
(* system types. *)
address, loc, byte, word,
- csizet, cssizet,
+ csizet, cssizet, cofft,
+ cardinal64,
(* base types. *)
char,
cardinal, longcard, shortcard,
byte,
word,
csizet,
- cssizet : |
+ cssizet,
+ cofft,
+ cardinal64 : |
(* base types. *)
boolean,
proc,
wordN,
csizetN,
cssizetN,
+ cofftN,
+ cardinal64N,
adrN,
sizeN,
tsizeN,
END isAProcType ;
-(*
- isProcedure - returns TRUE if, n, is a procedure.
-*)
-
-PROCEDURE isProcedure (n: node) : BOOLEAN ;
-BEGIN
- assert (n # NIL) ;
- RETURN n^.kind = procedure
-END isProcedure ;
-
-
(*
isPointer - returns TRUE if, n, is a pointer.
*)
word : RETURN makeKey ('WORD') |
csizet : RETURN makeKey ('CSIZE_T') |
cssizet : RETURN makeKey ('CSSIZE_T') |
+ cofft : RETURN makeKey ('COFF_T') |
+ cardinal64 : RETURN makeKey ('CARDINAL64') |
+
(* base types. *)
boolean : RETURN makeKey ('BOOLEAN') |
proc : RETURN makeKey ('PROC') |
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
char,
cardinal,
longcard,
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
char,
integer,
longint,
word : RETURN n |
csizet : RETURN n |
cssizet : RETURN n |
+ cofft : RETURN n |
+ cardinal64 : RETURN n |
(* base types. *)
boolean : RETURN n |
proc : RETURN n |
word : RETURN n |
csizet : RETURN n |
cssizet : RETURN n |
+ cofft : RETURN n |
+ cardinal64 : RETURN n |
(* base types. *)
boolean : RETURN n |
proc : RETURN n |
byte,
word,
csizet,
- cssizet : RETURN systemN |
+ cssizet,
+ cofft,
+ cardinal64 : RETURN systemN |
(* base types. *)
boolean,
proc,
byte,
word,
csizet,
- cssizet : doSystemC (p, n) |
+ cssizet,
+ cofft,
+ cardinal64 : doSystemC (p, n) |
type : doTypeNameC (p, n) |
pointer : doTypeNameC (p, n)
BEGIN
CASE n^.kind OF
- address: RETURN TRUE |
- loc : RETURN TRUE |
- byte : RETURN TRUE |
- word : RETURN TRUE |
- csizet : RETURN TRUE |
- cssizet: RETURN TRUE
+ address,
+ loc,
+ byte,
+ word,
+ csizet,
+ cssizet,
+ cofft,
+ cardinal64: RETURN TRUE
ELSE
RETURN FALSE
byte : outText (p, 'unsigned char') ; setNeedSpace (p) |
word : outText (p, 'unsigned int') ; setNeedSpace (p) |
csizet : outText (p, 'size_t') ; setNeedSpace (p) ; keyc.useSize_t |
- cssizet: outText (p, 'ssize_t') ; setNeedSpace (p) ; keyc.useSSize_t
+ cssizet : outText (p, 'ssize_t') ; setNeedSpace (p) ; keyc.useSSize_t |
+ cofft : outText (p, 'off_t') ; setNeedSpace (p) |
+ cardinal64: outText (p, 'uint64_t') ; setNeedSpace (p)
END
END doSystemC ;
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
(* base types. *)
boolean,
char,
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
(* base types. *)
char,
cardinal,
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
char,
cardinal,
longcard,
address,
loc,
- byte ,
- word ,
- csizet ,
- cssizet: doNameM2 (p, n)
+ byte,
+ word,
+ csizet,
+ cssizet,
+ cofft,
+ cardinal64: doNameM2 (p, n)
END
END doSystemM2 ;
word,
csizet,
cssizet,
+ cofft,
+ cardinal64,
(* base types. *)
boolean,
proc,
wordN := makeBase (word) ;
csizetN := makeBase (csizet) ;
cssizetN := makeBase (cssizet) ;
+ cofftN := makeBase (cofft) ;
+ cardinal64N := makeBase (cardinal64) ;
adrN := makeBase (adr) ;
tsizeN := makeBase (tsize) ;
wordN := addToScope (wordN) ;
csizetN := addToScope (csizetN) ;
cssizetN := addToScope (cssizetN) ;
+ cofftN := addToScope (cofftN) ;
+ cardinal64N := addToScope (cardinal64N) ;
adrN := addToScope (adrN) ;
tsizeN := addToScope (tsizeN) ;
throwN := addToScope (throwN) ;
addDone (byteN) ;
addDone (wordN) ;
addDone (csizetN) ;
- addDone (cssizetN)
+ addDone (cssizetN) ;
+ addDone (cofftN) ;
+ addDone (cardinal64N)
END makeSystem ;
END useUCharMin ;
-(*
- useUIntMin - indicate we have used UINT_MIN.
-*)
-
-PROCEDURE useUIntMin ;
-BEGIN
- seenUIntMin := TRUE
-END useUIntMin ;
-
-
(*
useIntMax - indicate we have used INT_MAX.
*)
END useUCharMax ;
-(*
- useUIntMax - indicate we have used UINT_MAX.
-*)
-
-PROCEDURE useUIntMax ;
-BEGIN
- seenUIntMax := TRUE
-END useUIntMax ;
-
-
(*
useSize_t - indicate we have used size_t.
*)
#if !defined (_Indexing_H)
# define _Indexing_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_SEnvironment_H)
# define _SEnvironment_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
#if !defined (_Scan_H)
# define _Scan_H
+#define INCLUDE_MEMORY
#include "config.h"
#include "system.h"
# ifdef __cplusplus
off_t lseek(int fildes, off_t offset, int whence);
*/
-EXTERN ssize_t libc_lseek (int fd, ssize_t offset, int whence);
+EXTERN off_t libc_lseek (int fd, ssize_t offset, int whence);
/*
perror - writes errno and string. (ARRAY OF CHAR is translated onto ADDRESS).