Line data Source code
1 : /* do not edit automatically generated by mc from M2Quiet. */
2 : /* M2Quiet.mod provides a wrapper to M2Printf.
3 :
4 : Copyright (C) 2001-2026 Free Software Foundation, Inc.
5 : Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
6 :
7 : This file is part of GNU Modula-2.
8 :
9 : GNU Modula-2 is free software; you can redistribute it and/or modify
10 : it under the terms of the GNU General Public License as published by
11 : the Free Software Foundation; either version 3, or (at your option)
12 : any later version.
13 :
14 : GNU Modula-2 is distributed in the hope that it will be useful, but
15 : WITHOUT ANY WARRANTY; without even the implied warranty of
16 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : General Public License for more details.
18 :
19 : You should have received a copy of the GNU General Public License
20 : along with GNU Modula-2; see the file COPYING3. If not see
21 : <http://www.gnu.org/licenses/>. */
22 :
23 : #include "config.h"
24 : #include "system.h"
25 : #include "gcc-consolidation.h"
26 :
27 : #include <stdbool.h>
28 : # if !defined (PROC_D)
29 : # define PROC_D
30 : typedef void (*PROC_t) (void);
31 : typedef struct { PROC_t proc; } PROC;
32 : # endif
33 :
34 : #define _M2Quiet_C
35 :
36 : #include "GM2Quiet.h"
37 : # include "GM2Options.h"
38 : # include "GM2Printf.h"
39 :
40 : extern "C" void M2Quiet_qprintf0 (const char *a_, unsigned int _a_high);
41 : extern "C" void M2Quiet_qprintf1 (const char *a_, unsigned int _a_high, const unsigned char *w_, unsigned int _w_high);
42 : extern "C" void M2Quiet_qprintf2 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high);
43 : extern "C" void M2Quiet_qprintf3 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high);
44 : extern "C" void M2Quiet_qprintf4 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high, const unsigned char *w4_, unsigned int _w4_high);
45 :
46 470963 : extern "C" void M2Quiet_qprintf0 (const char *a_, unsigned int _a_high)
47 : {
48 470963 : char a[_a_high+1];
49 :
50 : /* make a local copy of each unbounded array. */
51 470963 : memcpy (a, a_, _a_high+1);
52 :
53 : /* importing from M2Options is the reason why it is not a good idea to put this into M2Printf */
54 470963 : if (! M2Options_Quiet)
55 : {
56 0 : M2Printf_printf0 ((const char *) a, _a_high);
57 : }
58 470963 : }
59 :
60 241400 : extern "C" void M2Quiet_qprintf1 (const char *a_, unsigned int _a_high, const unsigned char *w_, unsigned int _w_high)
61 : {
62 241400 : char a[_a_high+1];
63 241400 : unsigned char w[_w_high+1];
64 :
65 : /* make a local copy of each unbounded array. */
66 241400 : memcpy (a, a_, _a_high+1);
67 241400 : memcpy (w, w_, _w_high+1);
68 :
69 241400 : if (! M2Options_Quiet)
70 : {
71 0 : M2Printf_printf1 ((const char *) a, _a_high, (const unsigned char *) w, _w_high);
72 : }
73 241400 : }
74 :
75 244843 : extern "C" void M2Quiet_qprintf2 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high)
76 : {
77 244843 : char a[_a_high+1];
78 244843 : unsigned char w1[_w1_high+1];
79 244843 : unsigned char w2[_w2_high+1];
80 :
81 : /* make a local copy of each unbounded array. */
82 244843 : memcpy (a, a_, _a_high+1);
83 244843 : memcpy (w1, w1_, _w1_high+1);
84 244843 : memcpy (w2, w2_, _w2_high+1);
85 :
86 244843 : if (! M2Options_Quiet)
87 : {
88 0 : M2Printf_printf2 ((const char *) a, _a_high, (const unsigned char *) w1, _w1_high, (const unsigned char *) w2, _w2_high);
89 : }
90 244843 : }
91 :
92 0 : extern "C" void M2Quiet_qprintf3 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high)
93 : {
94 0 : char a[_a_high+1];
95 0 : unsigned char w1[_w1_high+1];
96 0 : unsigned char w2[_w2_high+1];
97 0 : unsigned char w3[_w3_high+1];
98 :
99 : /* make a local copy of each unbounded array. */
100 0 : memcpy (a, a_, _a_high+1);
101 0 : memcpy (w1, w1_, _w1_high+1);
102 0 : memcpy (w2, w2_, _w2_high+1);
103 0 : memcpy (w3, w3_, _w3_high+1);
104 :
105 0 : if (! M2Options_Quiet)
106 : {
107 0 : M2Printf_printf3 ((const char *) a, _a_high, (const unsigned char *) w1, _w1_high, (const unsigned char *) w2, _w2_high, (const unsigned char *) w3, _w3_high);
108 : }
109 0 : }
110 :
111 0 : extern "C" void M2Quiet_qprintf4 (const char *a_, unsigned int _a_high, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high, const unsigned char *w3_, unsigned int _w3_high, const unsigned char *w4_, unsigned int _w4_high)
112 : {
113 0 : char a[_a_high+1];
114 0 : unsigned char w1[_w1_high+1];
115 0 : unsigned char w2[_w2_high+1];
116 0 : unsigned char w3[_w3_high+1];
117 0 : unsigned char w4[_w4_high+1];
118 :
119 : /* make a local copy of each unbounded array. */
120 0 : memcpy (a, a_, _a_high+1);
121 0 : memcpy (w1, w1_, _w1_high+1);
122 0 : memcpy (w2, w2_, _w2_high+1);
123 0 : memcpy (w3, w3_, _w3_high+1);
124 0 : memcpy (w4, w4_, _w4_high+1);
125 :
126 0 : if (! M2Options_Quiet)
127 : {
128 0 : M2Printf_printf4 ((const char *) a, _a_high, (const unsigned char *) w1, _w1_high, (const unsigned char *) w2, _w2_high, (const unsigned char *) w3, _w3_high, (const unsigned char *) w4, _w4_high);
129 : }
130 0 : }
131 :
132 0 : extern "C" void _M2_M2Quiet_init (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
133 : {
134 0 : }
135 :
136 0 : extern "C" void _M2_M2Quiet_fini (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
137 : {
138 0 : }
|