summaryrefslogtreecommitdiff
path: root/src/stv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/stv.adb')
-rw-r--r--src/stv.adb29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/stv.adb b/src/stv.adb
index 78a3052..0b07891 100644
--- a/src/stv.adb
+++ b/src/stv.adb
@@ -43,7 +43,8 @@ procedure STV is
Further_Help : String := "Try ""stv --help"" for more information.";
- -- I'm not fond of accesses to string accesses
+ -- I'm not fond of accesses to string accesses.
+ -- Would be nice if the GNAT.Strings package would use Unbounded_Strings instead.
Verbose : aliased Boolean;
Version : aliased Boolean;
Help : aliased Boolean;
@@ -82,8 +83,8 @@ begin
Switch => "-V", Long_Switch => "--version",
Help => "show version number");
- -- technically not required, but included so
- -- it will show up in the help output
+ -- Technically not required, but included so
+ -- it will show up in the help output.
GCom.Define_Switch
(Config => Config, Output => Help'Access,
Switch => "-h", Long_Switch => "--help",
@@ -122,7 +123,7 @@ begin
"required for normal operation." & ASCII.LF);
- -- parse options
+ -- Parse options
begin
GCom.Getopt (Config);
exception
@@ -135,7 +136,7 @@ begin
end;
- -- version display functionality
+ -- Version display functionality
if Version then
Put_Line ("Australian STV Counter v0.2");
ACom.Set_Exit_Status (ACom.Failure);
@@ -143,7 +144,7 @@ begin
end if;
- -- check candidate data option is valid
+ -- Check candidate data option is valid
if Candidate_File.all = "" then
Put_Line ("Candidate data file not provided." & ASCII.LF & Further_Help);
ACom.Set_Exit_Status (ACom.Failure);
@@ -161,7 +162,7 @@ begin
end if;
- -- check preference data option is valid
+ -- Check preference data option is valid
if Preference_File.all = "" then
Put_Line ("Preference data file not provided." & ASCII.LF & Further_Help);
ACom.Set_Exit_Status (ACom.Failure);
@@ -179,7 +180,7 @@ begin
end if;
- -- check output directory option is valid
+ -- Check output directory option is valid
if Output_Dir.all = "" then
Put_Line ("Output logging directory not provided." & ASCII.LF & Further_Help);
ACom.Set_Exit_Status (ACom.Failure);
@@ -192,7 +193,7 @@ begin
end if;
- -- check number to elect option is valid
+ -- Check number to elect option is valid
if Number_To_Elect < 1 then
Put_Line ("Number of candidates to be elected too low." & ASCII.LF & Further_Help);
ACom.Set_Exit_Status (ACom.Failure);
@@ -200,7 +201,7 @@ begin
end if;
- -- check state option is valid
+ -- Check state option is valid
begin
State := Candidates.State_Name'Value (State_String.all);
exception
@@ -211,7 +212,7 @@ begin
end;
- -- set up logging
+ -- Set up logging
File.Create_Directory (Output_Dir.all);
Start_Time := Simple_Time.Now;
Main_Log := SU.To_Unbounded_String (Output_Dir.all & "/" & "log.txt");
@@ -224,7 +225,7 @@ begin
end if;
- -- read in candidate data, which is necessary for further setup
+ -- Read in candidate data, which is necessary for further setup
if Verbose then
Put_Line (Standard_Error, "Reading candidate data...");
end if;
@@ -232,7 +233,7 @@ begin
Candidates.Containers.Generate_Ballots (Candidate_Data, Above_Ballot, Below_Ballot);
- -- set up and run the election singleton
+ -- Set up and run the election singleton
declare
package Given_Prefs is new Preferences
(Pref_Size => Integer (Below_Ballot.Length),
@@ -259,7 +260,7 @@ begin
end;
- -- finish up logging
+ -- Finish up logging
Finish_Time := Simple_Time.Now;
Log_Msg := SU.To_Unbounded_String
("Finished election count at " & Simple_Time.To_String (Finish_Time) & ASCII.LF &