summaryrefslogtreecommitdiff
path: root/src/preference_arrays.ads
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-01-08 19:13:43 +1100
committerJed Barber <jjbarber@y7mail.com>2017-01-08 19:13:43 +1100
commit1b6f0e17752445668237167e88229adbb14cb64d (patch)
tree49ec65249d88936f392e8620d32d6ea1ff953f20 /src/preference_arrays.ads
parent9c88780375c5fd42f305746156484257c02245c7 (diff)
New preference data array structure in Ada, currently won't link
Diffstat (limited to 'src/preference_arrays.ads')
-rw-r--r--src/preference_arrays.ads38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/preference_arrays.ads b/src/preference_arrays.ads
new file mode 100644
index 0000000..c8245e0
--- /dev/null
+++ b/src/preference_arrays.ads
@@ -0,0 +1,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;
+