Debian Codegraph @

gcc/m2/mc-boot/Gkeyc.h

raw
1 /* do not edit automatically generated by mc from keyc. */
2 /* keyc.def provides an interface to emitting symbols which.
3
4 Copyright (C) 2016-2025 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <[email protected]>.
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
24 #if !defined (_keyc_H)
25 # define _keyc_H
26
27 #include "config.h"
28 #include "system.h"
29 # ifdef __cplusplus
30 extern "C" {
31 # endif
32 #include <stdbool.h>
33 # if !defined (PROC_D)
34 # define PROC_D
35 typedef void (*PROC_t) (void);
36 typedef struct { PROC_t proc; } PROC;
37 # endif
38
39 # include "GmcPretty.h"
40 # include "GDynamicStrings.h"
41 # include "Gdecl.h"
42 # include "GnameKey.h"
43
44 # if defined (_keyc_C)
45 # define EXTERN
46 # else
47 # define EXTERN extern
48 # endif
49
50
51 /*
52 useGccTree - indicate we have imported tree from gcctypes.
53 */
54
55 EXTERN void keyc_useGccTree (void);
56
57 /*
58 useGccLocation - indicate we have imported tree from gcctypes.
59 */
60
61 EXTERN void keyc_useGccLocation (void);
62
63 /*
64 useUnistd - need to use unistd.h call using open/close/read/write require this header.
65 */
66
67 EXTERN void keyc_useUnistd (void);
68
69 /*
70 useThrow - use the throw function.
71 */
72
73 EXTERN void keyc_useThrow (void);
74
75 /*
76 useStorage - indicate we have used storage.
77 */
78
79 EXTERN void keyc_useStorage (void);
80
81 /*
82 useFree - indicate we have used free.
83 */
84
85 EXTERN void keyc_useFree (void);
86
87 /*
88 useMalloc - indicate we have used malloc.
89 */
90
91 EXTERN void keyc_useMalloc (void);
92
93 /*
94 useProc - indicate we have used proc.
95 */
96
97 EXTERN void keyc_useProc (void);
98
99 /*
100 useTrue - indicate we have used TRUE.
101 */
102
103 EXTERN void keyc_useTrue (void);
104
105 /*
106 useFalse - indicate we have used FALSE.
107 */
108
109 EXTERN void keyc_useFalse (void);
110
111 /*
112 useNull - indicate we have used NULL.
113 */
114
115 EXTERN void keyc_useNull (void);
116
117 /*
118 useMemcpy - indicate we have used memcpy.
119 */
120
121 EXTERN void keyc_useMemcpy (void);
122
123 /*
124 useIntMin - indicate we have used INT_MIN.
125 */
126
127 EXTERN void keyc_useIntMin (void);
128
129 /*
130 useUIntMin - indicate we have used UINT_MIN.
131 */
132
133 EXTERN void keyc_useUIntMin (void);
134
135 /*
136 useLongMin - indicate we have used LONG_MIN.
137 */
138
139 EXTERN void keyc_useLongMin (void);
140
141 /*
142 useULongMin - indicate we have used ULONG_MIN.
143 */
144
145 EXTERN void keyc_useULongMin (void);
146
147 /*
148 useCharMin - indicate we have used CHAR_MIN.
149 */
150
151 EXTERN void keyc_useCharMin (void);
152
153 /*
154 useUCharMin - indicate we have used UCHAR_MIN.
155 */
156
157 EXTERN void keyc_useUCharMin (void);
158
159 /*
160 useIntMax - indicate we have used INT_MAX.
161 */
162
163 EXTERN void keyc_useIntMax (void);
164
165 /*
166 useUIntMax - indicate we have used UINT_MAX.
167 */
168
169 EXTERN void keyc_useUIntMax (void);
170
171 /*
172 useLongMax - indicate we have used LONG_MAX.
173 */
174
175 EXTERN void keyc_useLongMax (void);
176
177 /*
178 useULongMax - indicate we have used ULONG_MAX.
179 */
180
181 EXTERN void keyc_useULongMax (void);
182
183 /*
184 useCharMax - indicate we have used CHAR_MAX.
185 */
186
187 EXTERN void keyc_useCharMax (void);
188
189 /*
190 useUCharMax - indicate we have used UChar_MAX.
191 */
192
193 EXTERN void keyc_useUCharMax (void);
194
195 /*
196 useSize_t - indicate we have used size_t.
197 */
198
199 EXTERN void keyc_useSize_t (void);
200
201 /*
202 useSSize_t - indicate we have used ssize_t.
203 */
204
205 EXTERN void keyc_useSSize_t (void);
206
207 /*
208 useLabs - indicate we have used labs.
209 */
210
211 EXTERN void keyc_useLabs (void);
212
213 /*
214 useAbs - indicate we have used abs.
215 */
216
217 EXTERN void keyc_useAbs (void);
218
219 /*
220 useFabs - indicate we have used fabs.
221 */
222
223 EXTERN void keyc_useFabs (void);
224
225 /*
226 useFabsl - indicate we have used fabsl.
227 */
228
229 EXTERN void keyc_useFabsl (void);
230
231 /*
232 useException - use the exceptions module, mcrts.
233 */
234
235 EXTERN void keyc_useException (void);
236
237 /*
238 useComplex - use the complex data type.
239 */
240
241 EXTERN void keyc_useComplex (void);
242
243 /*
244 useM2RTS - indicate we have used M2RTS in the converted code.
245 */
246
247 EXTERN void keyc_useM2RTS (void);
248
249 /*
250 useStrlen - indicate we have used strlen in the converted code.
251 */
252
253 EXTERN void keyc_useStrlen (void);
254
255 /*
256 useCtype - indicate we have used the toupper function.
257 */
258
259 EXTERN void keyc_useCtype (void);
260
261 /*
262 genDefs - generate definitions or includes for all
263 macros and prototypes used.
264 */
265
266 EXTERN void keyc_genDefs (mcPretty_pretty p);
267
268 /*
269 genConfigSystem - generate include files for config.h and system.h
270 within the GCC framework.
271 */
272
273 EXTERN void keyc_genConfigSystem (mcPretty_pretty p);
274
275 /*
276 enterScope - enter a scope defined by, n.
277 */
278
279 EXTERN void keyc_enterScope (decl_node n);
280
281 /*
282 leaveScope - leave the scope defined by, n.
283 */
284
285 EXTERN void keyc_leaveScope (decl_node n);
286
287 /*
288 cname - attempts to declare a symbol with name, n, in the
289 current scope. If there is no conflict with the
290 target language then NIL is returned, otherwise
291 a mangled name is returned as a String.
292 If scopes is FALSE then only the keywords and
293 macros are detected for a clash (all scoping
294 is ignored).
295 */
296
297 EXTERN DynamicStrings_String keyc_cname (nameKey_Name n, bool scopes);
298
299 /*
300 cnamen - attempts to declare a symbol with name, n, in the
301 current scope. If there is no conflict with the
302 target language then NIL is returned, otherwise
303 a mangled name is returned as a Name
304 If scopes is FALSE then only the keywords and
305 macros are detected for a clash (all scoping
306 is ignored).
307 */
308
309 EXTERN nameKey_Name keyc_cnamen (nameKey_Name n, bool scopes);
310
311 /*
312 cp - include C++ keywords and standard declarations to avoid.
313 */
314
315 EXTERN void keyc_cp (void);
316 # ifdef __cplusplus
317 }
318 # endif
319
320 # undef EXTERN
321 #endif