projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change legend on data to bytes
[spider.git]
/
perl
/
Spot.pm
diff --git
a/perl/Spot.pm
b/perl/Spot.pm
index 9fa0086ffa1e5595978a4309638f08d38f61b8f5..2863a449d54adbd4ae33bf6411a8e52cc0286101 100644
(file)
--- a/
perl/Spot.pm
+++ b/
perl/Spot.pm
@@
-22,11
+22,11
@@
use strict;
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
) || 0
;
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
|| (0,0))
;
$main::build += $VERSION;
$main::branch += $BRANCH;
$main::build += $VERSION;
$main::branch += $BRANCH;
-use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef);
+use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef
$totalspots $hfspots $vhfspots
);
$fp = undef;
$statp = undef;
$fp = undef;
$statp = undef;
@@
-52,7
+52,7
@@
$filterdef = bless ([
['by_zone', 'nz', 11],
['channel', 'c', 12],
], 'Filter::Cmd');
['by_zone', 'nz', 11],
['channel', 'c', 12],
], 'Filter::Cmd');
-
+$totalspots = $hfspots = $vhfspots = 0;
# create a Spot Object
sub new
# create a Spot Object
sub new
@@
-140,6
+140,12
@@
sub add
{
my $buf = join("\^", @_[0..7]);
$fp->writeunix($_[2], $buf);
{
my $buf = join("\^", @_[0..7]);
$fp->writeunix($_[2], $buf);
+ $totalspots++;
+ if ($_[0] <= 30000) {
+ $hfspots++;
+ } else {
+ $vhfspots++;
+ }
}
# search the spot database for records based on the field no and an expression
}
# search the spot database for records based on the field no and an expression
@@
-299,6
+305,7
@@
sub dup
return 2 if $d < $main::systime - $dupage;
$freq = sprintf "%.1f", $freq; # normalise frequency
return 2 if $d < $main::systime - $dupage;
$freq = sprintf "%.1f", $freq; # normalise frequency
+ $call = substr($call, 0, 12) if length $call > 12;
chomp $text;
$text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
$text = substr($text, 0, $duplth) if length $text > $duplth;
chomp $text;
$text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
$text = substr($text, 0, $duplth) if length $text > $duplth;