changed prefix searching so it goes from right to left instead of the other
way around. This may leave stuff out...
24Jun02=======================================================================
1. make set/badspotter non SSID sensitive. Set/badnode is left to be SSID
sensitive.
24Jun02=======================================================================
1. make set/badspotter non SSID sensitive. Set/badnode is left to be SSID
sensitive.
+2. added 3XA(=3X) and K1B(=KH1) also changed the logic of sh/prefix. This
+may break things, please test it.
19Jun02=======================================================================
1. make set/badspotter and set/badnode apply to announces and talks as well
as spots.
19Jun02=======================================================================
1. make set/badspotter and set/badnode apply to announces and talks as well
as spots.
#print "line: $line\n";
foreach $l (@list) {
my @ans = Prefix::extract($l);
#print "line: $line\n";
foreach $l (@list) {
my @ans = Prefix::extract($l);
- #print "ans:", @ans, "\n";
+ my $dd = new Data::Dumper([ \@ans ]);
+ print "ans:", $dd->Dumpxs;
next if !@ans;
my $pre = shift @ans;
my $a;
foreach $a (@ans) {
next if !@ans;
my $pre = shift @ans;
my $a;
foreach $a (@ans) {
- push @out, sprintf "%s DXCC: %d ITU: %d CQ: %d LL: %s %s (%s, %s)", uc $l, $a->dxcc(), $a->itu(), $a->cq(), slat($a->lat), slong($a->long), $pre, $a->name();
+ push @out, sprintf "%s DXCC: %d ITU: %d CQ: %d LL: %s %s (%s, %s)", uc $l, $a->dxcc, $a->itu, $a->cq, slat($a->lat), slong($a->long), $pre, $a->name;
$l = " " x length $l;
}
}
$l = " " x length $l;
}
}
Vietnam: 26: 49: AS: 10.80: -106.70: -7.0: 3W:\r
3W,XV;\r
Republic of Guinea: 35: 46: AF: 9.50: 13.70: 0.0: 3X:\r
Vietnam: 26: 49: AS: 10.80: -106.70: -7.0: 3W:\r
3W,XV;\r
Republic of Guinea: 35: 46: AF: 9.50: 13.70: 0.0: 3X:\r
Bouvet: 38: 67: AF: -54.50: -3.40: 0.0: 3Y/b:\r
3Y;\r
Peter I I.: 12: 72: SA: -68.80: 90.60: 6.0: 3Y/p:\r
Bouvet: 38: 67: AF: -54.50: -3.40: 0.0: 3Y/b:\r
3Y;\r
Peter I I.: 12: 72: SA: -68.80: 90.60: 6.0: 3Y/p:\r
Mariana Is.: 27: 64: OC: 15.20: -145.80: 10.0: KH0:\r
AH0,KG6SL,KH0,NH0,WH0;\r
Baker & Howland Is.: 31: 61: OC: 0.50: 176.00: 11.0: KH1:\r
Mariana Is.: 27: 64: OC: 15.20: -145.80: 10.0: KH0:\r
AH0,KG6SL,KH0,NH0,WH0;\r
Baker & Howland Is.: 31: 61: OC: 0.50: 176.00: 11.0: KH1:\r
Guam: 27: 64: OC: 13.50: -144.80: -10.0: KH2:\r
AH2,KG6ASO,KH2,NH2,WH2;\r
Johnston I.: 31: 61: OC: 16.80: 169.50: 10.0: KH3:\r
Guam: 27: 64: OC: 13.50: -144.80: -10.0: KH2:\r
AH2,KG6ASO,KH2,NH2,WH2;\r
Johnston I.: 31: 61: OC: 16.80: 169.50: 10.0: KH3:\r
'3V' => '13',
'3W' => '14',
'3X' => '15',
'3V' => '13',
'3W' => '14',
'3X' => '15',
'3Y' => '16,17',
'3Y/B' => '16',
'3Y/P' => '17',
'3Y' => '16,17',
'3Y/B' => '16',
'3Y/P' => '17',
'K0PP' => '293',
'K0TV' => '293',
'K1' => '473,474,475,476,477,478',
'K0PP' => '293',
'K0TV' => '293',
'K1' => '473,474,475,476,477,478',
'K1KY' => '293',
'K1VWL/BY1QH' => '68,346,347',
'K2' => '479,480',
'K1KY' => '293',
'K1VWL/BY1QH' => '68,346,347',
'K2' => '479,480',
# check that a field only has callsign characters in it
sub is_callsign
{
# check that a field only has callsign characters in it
sub is_callsign
{
- return $_[0] =~ /^(?:[A-Z]{1,2}\d+|\d[A-Z]\d+)[A-Z]{1,3}(?:-\d{1,2}|\/(?:[A-Z]{1,2}\d{0,2}|\d[A-Z]\d{0,2}))?$/;
+ return $_[0] =~ /^(?:[A-Z]{1,2}\d+|\d[A-Z]{1,2}\d+)[A-Z]{1,3}(?:-\d{1,2}|\/(?:[A-Z]{1,2}\d{0,2}|\d[A-Z]\d{0,2}))?$/;
}
# check that a PC protocol field is valid text
}
# check that a PC protocol field is valid text
foreach $p (@parts) {
$sp = $p if length $sp > length $p;
}
foreach $p (@parts) {
$sp = $p if length $sp > length $p;
}
- # now start to resolve it from the left hand end
- for ($i = 1; $i <= length $sp; ++$i) {
+# # now start to resolve it from the left hand end
+# for ($i = 1; $i <= length $sp; ++$i) {
+ # now start to resolve it from the right hand end
+ for ($i = length $sp; $i >= 1; --$i) {
my @wout = get(substr($sp, 0, $i));
last if @wout > 0 && $wout[0] gt $sp;
my @wout = get(substr($sp, 0, $i));
last if @wout > 0 && $wout[0] gt $sp;