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
|
with Interfaces.C;
with System;
package Preference_Arrays is
function Create_Preference_Array
(Number_Of_Ballots, Size_Of_Ballot : in Interfaces.C.int)
return System.Address;
pragma Export (C, Create_Preference_Array, "create_pref_array");
procedure Free_Preference_Array
(Number_Of_Ballots, Size_Of_Ballot : in Interfaces.C.int;
Pref_Array_Address : in System.Address);
pragma Export (C, Free_Preference_Array, "free_pref_array");
procedure Poke_Preference_Array
(Number_Of_Ballots, Size_Of_Ballot : in Interfaces.C.int;
Pref_Array_Address : in System.Address;
Ballot_Index, Box_Number, Rank : in Interfaces.C.int);
pragma Export (C, Poke_Preference_Array, "poke_pref_array");
function Peek_Preference_Array
(Number_Of_Ballots, Size_Of_Ballot : in Interfaces.C.int;
Pref_Array_Address : in System.Address;
Ballot_Index, Box_Number, Rank : in Interfaces.C.int)
return Interfaces.C.int;
pragma Export (C, Peek_Preference_Array, "peek_pref_array");
end Preference_Arrays;
|