1 /* do not edit automatically generated by mc from mcDebug. */
2 /* This file is part of GNU Modula-2.
4 GNU Modula-2 is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 3, or (at your option) any later
9 GNU Modula-2 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with GCC; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
21 # if !defined (PROC_D)
23 typedef void (*PROC_t
) (void);
24 typedef struct { PROC_t proc
; } PROC
;
31 # include "GmcOptions.h"
32 # include "GmcError.h"
36 assert - tests the boolean, q. If false then an error is reported
37 and the execution is terminated.
40 extern "C" void mcDebug_assert (bool q
);
43 writeDebug - only writes a string if internal debugging is on.
46 extern "C" void mcDebug_writeDebug (const char *a_
, unsigned int _a_high
);
50 assert - tests the boolean, q. If false then an error is reported
51 and the execution is terminated.
54 extern "C" void mcDebug_assert (bool q
)
58 mcError_internalError ((const char *) "assert failed", 13, (const char *) "../../gcc/m2/mc/mcDebug.mod", 27, 35);
64 writeDebug - only writes a string if internal debugging is on.
67 extern "C" void mcDebug_writeDebug (const char *a_
, unsigned int _a_high
)
71 /* make a local copy of each unbounded array. */
72 memcpy (a
, a_
, _a_high
+1);
74 if (mcOptions_getInternalDebugging ())
76 StrIO_WriteString ((const char *) a
, _a_high
);
81 extern "C" void _M2_mcDebug_init (__attribute__((unused
)) int argc
, __attribute__((unused
)) char *argv
[], __attribute__((unused
)) char *envp
[])
85 extern "C" void _M2_mcDebug_fini (__attribute__((unused
)) int argc
, __attribute__((unused
)) char *argv
[], __attribute__((unused
)) char *envp
[])