From: minima Date: Tue, 9 Jul 2002 11:16:53 +0000 (+0000) Subject: improve is_qra checker X-Git-Tag: R_1_50~30 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=0a9f4ecdeafc3212539009b96c64baa977555454 improve is_qra checker --- diff --git a/Changes b/Changes index 10203196..c36cc516 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +09Jul02======================================================================= +1. make the is_qra more accurate (from Mark HB9DBM). 04Jul02======================================================================= 1. added another fix to Prefix.pm so that it resolves Japan callsigns again also you can 'set/debug prefix' to see what it is trying to do. diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl index 6d9ad3ad..f9d03f62 100644 --- a/cmd/show/dx.pl +++ b/cmd/show/dx.pl @@ -82,7 +82,7 @@ while ($f = shift @list) { # next field my ($a, $b); # $DB::single =1; - if ($list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d?\d\d)/oi)) { + if (@list && $list[0] && (($a, $b) = $list[0] =~ /(AF|AN|NA|SA|EU|AS|OC)-?(\d?\d\d)/oi)) { $a = uc $a; $doiota = "\\b$a\[\-\ \]\?$b\\b"; shift @list; @@ -91,7 +91,7 @@ while ($f = shift @list) { # next field next; } if (lc $f eq 'qra') { - $doqra = uc shift @list if $list[0] =~ /[A-Z][A-Z]\d\d/oi; + $doqra = uc shift @list if @list && $list[0] =~ /[A-Z][A-Z]\d\d/oi; $doqra = '\b([A-Z][A-Z]\d\d|[A-Z][A-Z]\d\d[A-Z][A-Z])\b' unless $doqra; next; } diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 4ea3782e..d88ec0af 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -371,7 +371,7 @@ sub is_digits # does it look like a qra locator? sub is_qra { - return $_[0] =~ /^[A-Za-z][A-Za-z]\d\d[A-Za-z][A-Za-z]$/o; + return $_[0] =~ /^[A-Ra-r][A-Ra-r]\d\d[A-Xa-x][A-xa-x]$/; } # does it look like a valid lat/long