projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix problem with only some 17m spots coming out in sh/dx on 17m
[spider.git]
/
perl
/
Spot.pm
diff --git
a/perl/Spot.pm
b/perl/Spot.pm
index f8925d3d51b33d2bcf63bfe2fffc120c5c7816bd..28a8dd7201a9690abb654aba76cec1cb75c2b0b6 100644
(file)
--- a/
perl/Spot.pm
+++ b/
perl/Spot.pm
@@
-19,6
+19,13
@@
use DXDupe;
use Data::Dumper;
use strict;
use Data::Dumper;
use strict;
+
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef);
$fp = undef;
use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef);
$fp = undef;
@@
-243,7
+250,7
@@
sub ftor
while (@b) {
my $aa = shift @a;
my $bb = shift @b;
while (@b) {
my $aa = shift @a;
my $bb = shift @b;
- if (@b < (length $d)
- 1
) {
+ if (@b < (length $d)) {
$out .= '\\d';
} elsif ($aa eq $bb) {
$out .= $aa;
$out .= '\\d';
} elsif ($aa eq $bb) {
$out .= $aa;
@@
-304,12
+311,19
@@
sub dup
$freq = sprintf "%.1f", $freq; # normalise frequency
chomp $text;
$freq = sprintf "%.1f", $freq; # normalise frequency
chomp $text;
+ $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
$text = substr($text, 0, $duplth) if length $text > $duplth;
unpad($text);
$text = substr($text, 0, $duplth) if length $text > $duplth;
unpad($text);
- $text =
~ s/[\\\%]\d+//g
;
+ $text =
pack("C*", map {$_ & 127} unpack("C*", $text))
;
$text =~ s/[^a-zA-Z0-9]//g;
$text =~ s/[^a-zA-Z0-9]//g;
+ for (0,60,120,180,240,300) {
+ my $dt = $d - $_;
+ my $dupkey = "X$freq|$call|$dt|\L$text";
+ return 1 if DXDupe::find($dupkey);
+ }
my $dupkey = "X$freq|$call|$d|\L$text";
my $dupkey = "X$freq|$call|$d|\L$text";
- return DXDupe::check($dupkey, $main::systime+$dupage);
+ DXDupe::add($dupkey, $main::systime+$dupage);
+ return 0;
}
sub listdups
}
sub listdups