OutputData(): Change handover of LastIteration.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
eea296391c
commit
3e73346b20
|
@ -434,14 +434,13 @@ sub OutputData {
|
|||
### $LeadIn : print at start of output
|
||||
### $FileTempl: file name template (--filetemplate): filetempl-YYYY-MM
|
||||
### $DBQuery : database query handle with executed query,
|
||||
### containing $Month, $Key, $Value
|
||||
### containing $Month, $Key, $Value
|
||||
### $PadField : padding length for key field (optional) for 'pretty'
|
||||
### $PadValue : padding length for value field (optional) for 'pretty'
|
||||
my ($Format, $Comments, $GroupBy, $Precision, $ValidKeys, $LeadIn, $FileTempl,
|
||||
$DBQuery, $PadField, $PadValue) = @_;
|
||||
my %ValidKeys = %{$ValidKeys} if $ValidKeys;
|
||||
my ($FileName, $Handle, $OUT);
|
||||
our $LastIteration;
|
||||
my ($LastIteration, $FileName, $Handle, $OUT);
|
||||
|
||||
# define output types
|
||||
my %LegalOutput;
|
||||
|
@ -481,7 +480,7 @@ sub OutputData {
|
|||
$Handle = $OUT;
|
||||
};
|
||||
print $Handle &FormatOutput($Format, $Comments, $LeadIn, $Caption,
|
||||
$Key, $Value, $Precision, $PadField, $PadValue);
|
||||
$Key, $Value, $Precision, $PadField, $PadValue, $LastIteration);
|
||||
$LastIteration = $Caption;
|
||||
};
|
||||
close $OUT if ($FileTempl);
|
||||
|
@ -501,10 +500,8 @@ sub FormatOutput {
|
|||
### $PadValue : padding length for value field (optional) for 'pretty'
|
||||
### OUT: $Output: formatted output
|
||||
my ($Format, $Comments, $LeadIn, $Caption, $Key, $Value, $Precision, $PadField,
|
||||
$PadValue) = @_;
|
||||
$PadValue, $LastIteration) = @_;
|
||||
my ($Output);
|
||||
# keep last caption in mind
|
||||
our ($LastIteration);
|
||||
# create one line of output
|
||||
if ($Format eq 'dump') {
|
||||
# output as dump (key value)
|
||||
|
@ -583,7 +580,7 @@ sub SQLSortOrder {
|
|||
### IN : $GroupBy: primary sort by 'month' (default) or 'newsgroups'
|
||||
### $OrderBy: secondary sort by month/newsgroups (default)
|
||||
### or number of 'postings'
|
||||
### $Type : newsgroup, host, client
|
||||
### $Type : newsgroup, host or client+version
|
||||
### OUT: a SQL ORDER BY clause
|
||||
my ($GroupBy,$OrderBy,$Type) = @_;
|
||||
my ($GroupSort,$OrderSort) = ('','');
|
||||
|
|
Loading…
Reference in a new issue