sub prf {
my $fmt = shift;
- printf "stage %d: ".$fmt, $stage, @_;
+ printf " ".$fmt, @_;
}
sub countballots () {
my $totalvalid = 0/1;
$totalvalid += $_->{Total} foreach values %cands;
$quota = floor($totalvalid / (1 + $seats) + 1);
- prf "total valid %s quota %s\n", (sv $totalvalid), (sv $quota);
+ prf "total valid %s\n", sv $totalvalid;
+ prf "quota %s\n", sv $quota;
}
sub total_history_cmp () {
for (;;) {
$stage++;
+ printf "stage %3d:\n", $stage;
sortballots @allvotes if $stage == 1;