projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try to fix PC39s deleting more of the table than they should
[spider.git]
/
perl
/
DXLogPrint.pm
diff --git
a/perl/DXLogPrint.pm
b/perl/DXLogPrint.pm
index 58f18ffdd7604eae03239eb7fb48cbecbb793270..c2434aba48f8f5eda22edc3c2c909e7371ffc095 100644
(file)
--- a/
perl/DXLogPrint.pm
+++ b/
perl/DXLogPrint.pm
@@
-27,7
+27,7
@@
sub print
my $fcb = $DXLog::log;
my $from = shift;
my $to = shift;
my $fcb = $DXLog::log;
my $from = shift;
my $to = shift;
- my
@date = Julian::unixtojm
(shift);
+ my
$jdate = $fcb->unixtoj
(shift);
my $pattern = shift;
my $who = uc shift;
my $search;
my $pattern = shift;
my $who = uc shift;
my $search;
@@
-37,12
+37,10
@@
sub print
my $count;
my $hint = "";
my $count;
my $hint = "";
- $search = '1' unless $pattern || $who;
if ($pattern) {
if ($pattern) {
- $search = "\$ref->[1] =~ m{$pattern}i";
+ $search = "\$ref->[1] =~ m{
^
$pattern}i";
$hint = "m{$pattern}i";
}
$hint = "m{$pattern}i";
}
-
if ($who) {
if ($search) {
$search .= ' && ';
if ($who) {
if ($search) {
$search .= ' && ';
@@
-52,6
+50,7
@@
sub print
$hint .= 'm{$who}i';
}
$hint = "next unless $hint" if $hint;
$hint .= 'm{$who}i';
}
$hint = "next unless $hint" if $hint;
+ $search = "1" unless $search;
$eval = qq(
\@in = ();
$eval = qq(
\@in = ();
@@
-68,7
+67,7
@@
sub print
if ($search) {
\$count++;
next if \$count < $from;
if ($search) {
\$count++;
next if \$count < $from;
-
push
\@out, print_item(\$ref);
+
unshift
\@out, print_item(\$ref);
last if \$count >= \$to; # stop after n
}
}
last if \$count >= \$to; # stop after n
}
}
@@
-76,7
+75,7
@@
sub print
$fcb->close; # close any open files
$fcb->close; # close any open files
- my $fh = $fcb->open(
@
date);
+ my $fh = $fcb->open(
$j
date);
for ($count = 0; $count < $to; ) {
my $ref;
if ($fh) {
for ($count = 0; $count < $to; ) {
my $ref;
if ($fh) {