]>
Commit | Line | Data |
---|---|---|
fbd2eda1 GM |
1 | /* do not edit automatically generated by mc from Storage. */ |
2 | /* Storage.mod provides access to the dynamic Storage handler. | |
3 | ||
a945c346 | 4 | Copyright (C) 2001-2024 Free Software Foundation, Inc. |
fbd2eda1 GM |
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 | Under Section 7 of GPL version 3, you are granted additional | |
20 | permissions described in the GCC Runtime Library Exception, version | |
21 | 3.1, as published by the Free Software Foundation. | |
22 | ||
23 | You should have received a copy of the GNU General Public License and | |
24 | a copy of the GCC Runtime Library Exception along with this program; | |
25 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
26 | <http://www.gnu.org/licenses/>. */ | |
27 | ||
9525daf0 | 28 | #include <stdbool.h> |
fbd2eda1 GM |
29 | # if !defined (PROC_D) |
30 | # define PROC_D | |
31 | typedef void (*PROC_t) (void); | |
32 | typedef struct { PROC_t proc; } PROC; | |
33 | # endif | |
34 | ||
35 | #define _Storage_H | |
36 | #define _Storage_C | |
37 | ||
38 | # include "GSysStorage.h" | |
39 | ||
40 | extern "C" void Storage_ALLOCATE (void * *a, unsigned int Size); | |
41 | extern "C" void Storage_DEALLOCATE (void * *a, unsigned int Size); | |
42 | extern "C" void Storage_REALLOCATE (void * *a, unsigned int Size); | |
9525daf0 | 43 | extern "C" bool Storage_Available (unsigned int Size); |
fbd2eda1 GM |
44 | |
45 | extern "C" void Storage_ALLOCATE (void * *a, unsigned int Size) | |
46 | { | |
47 | SysStorage_ALLOCATE (a, Size); | |
48 | } | |
49 | ||
50 | extern "C" void Storage_DEALLOCATE (void * *a, unsigned int Size) | |
51 | { | |
52 | SysStorage_DEALLOCATE (a, Size); | |
53 | } | |
54 | ||
55 | extern "C" void Storage_REALLOCATE (void * *a, unsigned int Size) | |
56 | { | |
57 | SysStorage_REALLOCATE (a, Size); | |
58 | } | |
59 | ||
9525daf0 | 60 | extern "C" bool Storage_Available (unsigned int Size) |
fbd2eda1 GM |
61 | { |
62 | return SysStorage_Available (Size); | |
63 | /* static analysis guarentees a RETURN statement will be used before here. */ | |
64 | __builtin_unreachable (); | |
65 | } | |
66 | ||
67 | extern "C" void _M2_Storage_init (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[]) | |
68 | { | |
69 | } | |
70 | ||
71 | extern "C" void _M2_Storage_fini (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[]) | |
72 | { | |
73 | } |