-
Notifications
You must be signed in to change notification settings - Fork 0
/
b~test_jeu.adb
247 lines (224 loc) · 8.36 KB
/
b~test_jeu.adb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
pragma Ada_95;
pragma Warnings (Off);
pragma Source_File_Name (ada_main, Spec_File_Name => "b~test_jeu.ads");
pragma Source_File_Name (ada_main, Body_File_Name => "b~test_jeu.adb");
pragma Suppress (Overflow_Check);
with Ada.Exceptions;
package body ada_main is
E079 : Short_Integer; pragma Import (Ada, E079, "system__os_lib_E");
E011 : Short_Integer; pragma Import (Ada, E011, "system__soft_links_E");
E021 : Short_Integer; pragma Import (Ada, E021, "system__exception_table_E");
E054 : Short_Integer; pragma Import (Ada, E054, "ada__io_exceptions_E");
E056 : Short_Integer; pragma Import (Ada, E056, "ada__tags_E");
E053 : Short_Integer; pragma Import (Ada, E053, "ada__streams_E");
E077 : Short_Integer; pragma Import (Ada, E077, "interfaces__c_E");
E023 : Short_Integer; pragma Import (Ada, E023, "system__exceptions_E");
E082 : Short_Integer; pragma Import (Ada, E082, "system__file_control_block_E");
E072 : Short_Integer; pragma Import (Ada, E072, "system__file_io_E");
E075 : Short_Integer; pragma Import (Ada, E075, "system__finalization_root_E");
E073 : Short_Integer; pragma Import (Ada, E073, "ada__finalization_E");
E112 : Short_Integer; pragma Import (Ada, E112, "system__storage_pools_E");
E106 : Short_Integer; pragma Import (Ada, E106, "system__finalization_masters_E");
E118 : Short_Integer; pragma Import (Ada, E118, "system__storage_pools__subpools_E");
E114 : Short_Integer; pragma Import (Ada, E114, "system__pool_global_E");
E015 : Short_Integer; pragma Import (Ada, E015, "system__secondary_stack_E");
E051 : Short_Integer; pragma Import (Ada, E051, "ada__text_io_E");
E104 : Short_Integer; pragma Import (Ada, E104, "liste_generique_E");
Local_Priority_Specific_Dispatching : constant String := "";
Local_Interrupt_States : constant String := "";
Is_Elaborated : Boolean := False;
procedure finalize_library is
begin
E051 := E051 - 1;
declare
procedure F1;
pragma Import (Ada, F1, "ada__text_io__finalize_spec");
begin
F1;
end;
declare
procedure F2;
pragma Import (Ada, F2, "system__file_io__finalize_body");
begin
E072 := E072 - 1;
F2;
end;
E106 := E106 - 1;
E118 := E118 - 1;
E114 := E114 - 1;
declare
procedure F3;
pragma Import (Ada, F3, "system__pool_global__finalize_spec");
begin
F3;
end;
declare
procedure F4;
pragma Import (Ada, F4, "system__storage_pools__subpools__finalize_spec");
begin
F4;
end;
declare
procedure F5;
pragma Import (Ada, F5, "system__finalization_masters__finalize_spec");
begin
F5;
end;
declare
procedure Reraise_Library_Exception_If_Any;
pragma Import (Ada, Reraise_Library_Exception_If_Any, "__gnat_reraise_library_exception_if_any");
begin
Reraise_Library_Exception_If_Any;
end;
end finalize_library;
procedure adafinal is
procedure s_stalib_adafinal;
pragma Import (C, s_stalib_adafinal, "system__standard_library__adafinal");
procedure Runtime_Finalize;
pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize");
begin
if not Is_Elaborated then
return;
end if;
Is_Elaborated := False;
Runtime_Finalize;
s_stalib_adafinal;
end adafinal;
type No_Param_Proc is access procedure;
procedure adainit is
Main_Priority : Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
Time_Slice_Value : Integer;
pragma Import (C, Time_Slice_Value, "__gl_time_slice_val");
WC_Encoding : Character;
pragma Import (C, WC_Encoding, "__gl_wc_encoding");
Locking_Policy : Character;
pragma Import (C, Locking_Policy, "__gl_locking_policy");
Queuing_Policy : Character;
pragma Import (C, Queuing_Policy, "__gl_queuing_policy");
Task_Dispatching_Policy : Character;
pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy");
Priority_Specific_Dispatching : System.Address;
pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching");
Num_Specific_Dispatching : Integer;
pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching");
Main_CPU : Integer;
pragma Import (C, Main_CPU, "__gl_main_cpu");
Interrupt_States : System.Address;
pragma Import (C, Interrupt_States, "__gl_interrupt_states");
Num_Interrupt_States : Integer;
pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states");
Unreserve_All_Interrupts : Integer;
pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
Detect_Blocking : Integer;
pragma Import (C, Detect_Blocking, "__gl_detect_blocking");
Default_Stack_Size : Integer;
pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
Leap_Seconds_Support : Integer;
pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support");
Bind_Env_Addr : System.Address;
pragma Import (C, Bind_Env_Addr, "__gl_bind_env_addr");
procedure Runtime_Initialize (Install_Handler : Integer);
pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize");
Finalize_Library_Objects : No_Param_Proc;
pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects");
begin
if Is_Elaborated then
return;
end if;
Is_Elaborated := True;
Main_Priority := -1;
Time_Slice_Value := -1;
WC_Encoding := 'b';
Locking_Policy := ' ';
Queuing_Policy := ' ';
Task_Dispatching_Policy := ' ';
Priority_Specific_Dispatching :=
Local_Priority_Specific_Dispatching'Address;
Num_Specific_Dispatching := 0;
Main_CPU := -1;
Interrupt_States := Local_Interrupt_States'Address;
Num_Interrupt_States := 0;
Unreserve_All_Interrupts := 0;
Detect_Blocking := 0;
Default_Stack_Size := -1;
Leap_Seconds_Support := 0;
Runtime_Initialize (1);
Finalize_Library_Objects := finalize_library'access;
System.Soft_Links'Elab_Spec;
System.Exception_Table'Elab_Body;
E021 := E021 + 1;
Ada.Io_Exceptions'Elab_Spec;
E054 := E054 + 1;
Ada.Tags'Elab_Spec;
Ada.Streams'Elab_Spec;
E053 := E053 + 1;
Interfaces.C'Elab_Spec;
System.Exceptions'Elab_Spec;
E023 := E023 + 1;
System.File_Control_Block'Elab_Spec;
E082 := E082 + 1;
System.Finalization_Root'Elab_Spec;
E075 := E075 + 1;
Ada.Finalization'Elab_Spec;
E073 := E073 + 1;
System.Storage_Pools'Elab_Spec;
E112 := E112 + 1;
System.Finalization_Masters'Elab_Spec;
System.Storage_Pools.Subpools'Elab_Spec;
System.Pool_Global'Elab_Spec;
E114 := E114 + 1;
E118 := E118 + 1;
System.Finalization_Masters'Elab_Body;
E106 := E106 + 1;
System.File_Io'Elab_Body;
E072 := E072 + 1;
E077 := E077 + 1;
Ada.Tags'Elab_Body;
E056 := E056 + 1;
System.Soft_Links'Elab_Body;
E011 := E011 + 1;
System.Os_Lib'Elab_Body;
E079 := E079 + 1;
System.Secondary_Stack'Elab_Body;
E015 := E015 + 1;
Ada.Text_Io'Elab_Spec;
Ada.Text_Io'Elab_Body;
E051 := E051 + 1;
E104 := E104 + 1;
end adainit;
procedure Ada_Main_Program;
pragma Import (Ada, Ada_Main_Program, "_ada_test_jeu");
function main
(argc : Integer;
argv : System.Address;
envp : System.Address)
return Integer
is
procedure Initialize (Addr : System.Address);
pragma Import (C, Initialize, "__gnat_initialize");
procedure Finalize;
pragma Import (C, Finalize, "__gnat_finalize");
SEH : aliased array (1 .. 2) of Integer;
Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address;
pragma Volatile (Ensure_Reference);
begin
gnat_argc := argc;
gnat_argv := argv;
gnat_envp := envp;
Initialize (SEH'Address);
adainit;
Ada_Main_Program;
adafinal;
Finalize;
return (gnat_exit_status);
end;
-- BEGIN Object file/option list
-- ./liste_generique.o
-- ./test_jeu.o
-- -L./
-- -L/usr/lib/gcc/x86_64-linux-gnu/6/adalib/
-- -shared
-- -lgnat-6
-- END Object file/option list
end ada_main;