2. Fixed the problem with certain things not being shown in sh/log (because of
a regex that rejected too many things).
3. Speeded up sh/log quite a bit at the same time.
+4. Add a default limit of the last 36 months for sh/log querys.
14Jan06=======================================================================
1. undo frequency rounding change, it causes more problems than it solves.
11Jan06=======================================================================
use strict;
-use vars qw($VERSION $BRANCH);
+use vars qw($VERSION $BRANCH $maxmonths);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;
+$maxmonths = 36;
+
#
# print some items from the log backwards in time
#
$fcb->close; # close any open files
+ my $months;
my $fh = $fcb->open($jdate);
- L1: for (;@in < $to;) {
+ L1: for ($months = 0; $months < $maxmonths && @in < $tot; $months++) {
my $ref;
my $ring = RingBuf->new($tot);
$fh = $fcb->openprev(); # get the next file
last if !$fh;
}
+
+ @in = splice @in, -$tot, $tot if @in > $tot;
+
for (@in) {
my @line = split /\^/ ;
push @out, print_item(\@line);