Branch data 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-2024 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 <stdbool.h>
26 : : # if !defined (PROC_D)
27 : : # define PROC_D
28 : : typedef void (*PROC_t) (void);
29 : : typedef struct { PROC_t proc; } PROC;
30 : : # endif
31 : :
32 : : #define _M2Quiet_H
33 : : #define _M2Quiet_C
34 : :
35 : : # include "GM2Options.h"
36 : : # include "GM2Printf.h"
37 : :
38 : : extern "C" void M2Quiet_qprintf0 (const char *a_, unsigned int _a_high);
39 : : extern "C" void M2Quiet_qprintf1 (const char *a_, unsigned int _a_high, const unsigned char *w_, unsigned int _w_high);
40 : : 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);
41 : : 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);
42 : : 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);
43 : :
44 : 337939 : extern "C" void M2Quiet_qprintf0 (const char *a_, unsigned int _a_high)
45 : : {
46 : 337939 : char a[_a_high+1];
47 : :
48 : : /* make a local copy of each unbounded array. */
49 : 337939 : memcpy (a, a_, _a_high+1);
50 : :
51 : : /* importing from M2Options is the reason why it is not a good idea to put this into M2Printf */
52 : 337939 : if (! M2Options_Quiet)
53 : : {
54 : 0 : M2Printf_printf0 ((const char *) a, _a_high);
55 : : }
56 : 337939 : }
57 : :
58 : 163844 : extern "C" void M2Quiet_qprintf1 (const char *a_, unsigned int _a_high, const unsigned char *w_, unsigned int _w_high)
59 : : {
60 : 163844 : char a[_a_high+1];
61 : 163844 : unsigned char w[_w_high+1];
62 : :
63 : : /* make a local copy of each unbounded array. */
64 : 163844 : memcpy (a, a_, _a_high+1);
65 : 163844 : memcpy (w, w_, _w_high+1);
66 : :
67 : 163844 : if (! M2Options_Quiet)
68 : : {
69 : 0 : M2Printf_printf1 ((const char *) a, _a_high, (const unsigned char *) w, _w_high);
70 : : }
71 : 163844 : }
72 : :
73 : 166843 : 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)
74 : : {
75 : 166843 : char a[_a_high+1];
76 : 166843 : unsigned char w1[_w1_high+1];
77 : 166843 : unsigned char w2[_w2_high+1];
78 : :
79 : : /* make a local copy of each unbounded array. */
80 : 166843 : memcpy (a, a_, _a_high+1);
81 : 166843 : memcpy (w1, w1_, _w1_high+1);
82 : 166843 : memcpy (w2, w2_, _w2_high+1);
83 : :
84 : 166843 : if (! M2Options_Quiet)
85 : : {
86 : 0 : M2Printf_printf2 ((const char *) a, _a_high, (const unsigned char *) w1, _w1_high, (const unsigned char *) w2, _w2_high);
87 : : }
88 : 166843 : }
89 : :
90 : 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)
91 : : {
92 : 0 : char a[_a_high+1];
93 : 0 : unsigned char w1[_w1_high+1];
94 : 0 : unsigned char w2[_w2_high+1];
95 : 0 : unsigned char w3[_w3_high+1];
96 : :
97 : : /* make a local copy of each unbounded array. */
98 : 0 : memcpy (a, a_, _a_high+1);
99 : 0 : memcpy (w1, w1_, _w1_high+1);
100 : 0 : memcpy (w2, w2_, _w2_high+1);
101 : 0 : memcpy (w3, w3_, _w3_high+1);
102 : :
103 : 0 : if (! M2Options_Quiet)
104 : : {
105 : 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);
106 : : }
107 : 0 : }
108 : :
109 : 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)
110 : : {
111 : 0 : char a[_a_high+1];
112 : 0 : unsigned char w1[_w1_high+1];
113 : 0 : unsigned char w2[_w2_high+1];
114 : 0 : unsigned char w3[_w3_high+1];
115 : 0 : unsigned char w4[_w4_high+1];
116 : :
117 : : /* make a local copy of each unbounded array. */
118 : 0 : memcpy (a, a_, _a_high+1);
119 : 0 : memcpy (w1, w1_, _w1_high+1);
120 : 0 : memcpy (w2, w2_, _w2_high+1);
121 : 0 : memcpy (w3, w3_, _w3_high+1);
122 : 0 : memcpy (w4, w4_, _w4_high+1);
123 : :
124 : 0 : if (! M2Options_Quiet)
125 : : {
126 : 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);
127 : : }
128 : 0 : }
129 : :
130 : 0 : extern "C" void _M2_M2Quiet_init (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
131 : : {
132 : 0 : }
133 : :
134 : 0 : extern "C" void _M2_M2Quiet_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
135 : : {
136 : 0 : }
|