From ed96190995aa228ca30398b06c3cc0af1a59bf54 Mon Sep 17 00:00:00 2001
From: Dirk Koopman <djk@tobit.co.uk>
Date: Mon, 12 May 2008 23:01:57 +0100
Subject: [PATCH] add 'exact' keyword to sh/dx

this allows an exact match for a callsign.
---
 Changes             | 3 +++
 cmd/Commands_en.hlp | 2 ++
 cmd/show/dx.pl      | 6 ++++++
 perl/Version.pm     | 2 +-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Changes b/Changes
index 446b8752..f7335648 100644
--- 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.
diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp
index f1f26cc1..a1ab2305 100644
--- a/cmd/Commands_en.hlp
+++ b/cmd/Commands_en.hlp
@@ -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 
diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl
index f99a2b6c..f2629bff 100644
--- a/cmd/show/dx.pl
+++ b/cmd/show/dx.pl
@@ -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}";
diff --git a/perl/Version.pm b/perl/Version.pm
index 34f9aaff..219b2486 100644
--- a/perl/Version.pm
+++ b/perl/Version.pm
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.55';
 $subversion = '0';
-$build = '6';
+$build = '7';
 
 1;
-- 
2.43.0