add 'exact' keyword to sh/dx
authorDirk Koopman <djk@tobit.co.uk>
Mon, 12 May 2008 22:01:57 +0000 (23:01 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 12 May 2008 22:01:57 +0000 (23:01 +0100)
this allows an exact match for a callsign.

Changes
cmd/Commands_en.hlp
cmd/show/dx.pl
perl/Version.pm

diff --git a/Changes b/Changes
index 446b8752d6b02abfa01eebd2a3558d7418e29495..f7335648c23ce102434265475c3bad267add7ace 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+12May08=======================================================================
+1. add 'exact' keyword on sh/dx to allow for an exact match to a callsign.
+From a request by Robert HB9DZA.
 10May08=======================================================================
 1. add some privileges to (un)set/bad* and show/bad* commands. Thanks to
 Mauro IV3SCP for pointing this out to me.
index f1f26cc1ee471943ccb9560d04331b5a13297548..a1ab2305bbf944d3e4aa9e612a6801034d689f52 100644 (file)
@@ -1999,6 +1999,7 @@ any order to the basic SHOW/DX command, they are:-
  <prefix>        - for a spotted callsign beginning with <prefix>
  *<suffix>       - for a spotted callsign ending in <suffix>
  *<string>*      - for a spotted callsign containing <string>
+ <call> exact    - for a spotted callsign *exactly* as typed.
    
  day <number>    - starting <number> days ago
  day <from>-<to> - <from> days <to> days ago
@@ -2069,6 +2070,7 @@ any order to the basic SHOW/DX command, they are:-
    SH/DX by_zone 4,5,6
    SH/DX state in,oh
    SH/DX by_state in,oh
+   SH/DX hb2008g exact
   
 === 0^SHOW/DXCC <prefix>^Interrogate the spot database by country
 This command takes the <prefix> (which can be a full or partial 
index f99a2b6cf8c1a08c81bb6e5aee15e1da5e05ad61..f2629bfff0e225ef7249e358a17b166f46d38708 100644 (file)
@@ -28,6 +28,7 @@ my $bystate;
 my $itu;
 my $byitu;
 my $fromdxcc;
+my $exact;
 my ($doqsl, $doiota, $doqra, $dofilter);
 
 while ($f = shift @list) {             # next field
@@ -40,6 +41,10 @@ while ($f = shift @list) {           # next field
                ($to) = $f =~ /^(\d+)$/o if !$to; # is it a to count?
                next if $to;
        }
+       if (lc $f eq 'exact') {
+               $exact = 1;
+               next;
+       }
        if (lc $f eq 'dxcc') {
                $dxcc = 1;
                next;
@@ -180,6 +185,7 @@ if ($pre) {
                } else {
                        $pre =~ s/\.\*\$$//;
                }
+               $pre .= '$' if $exact;
                $expr = "\$f1 =~ m{$pre}";
                $pre =~ s/[\^\$]//g;
                $hint = "m{\U$pre}";
index 34f9aaff27e4bf953f3369911c12ecdd5006965e..219b248611a8272c63a08c18ebcde25120cda747 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.55';
 $subversion = '0';
-$build = '6';
+$build = '7';
 
 1;