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,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
use vars qw(@month %patmap @ISA @EXPORT);
require Exporter;
filecopy ptimelist
print_all_fields cltounix unpad is_callsign is_latlong
is_qra is_freq is_digits is_pctext is_pcflag insertitem deleteitem
- is_prefix dd
+ is_prefix dd dxver
);
@$list = grep {$_ ne $item } @$list;
return $n - @$list;
}
+
+sub dxver
+{
+ my $s = shift;
+ my ($a, $b, $c, $d) = $s =~ /(\d+)\.(\d+)\.(?:(\d+)\.(\d+))?/;
+
+ my $v = sprintf( "%d.%03d", $a, $b) || 0;
+ my $br = sprintf( "%d.%03d", $c, $d) if defined $c;
+ $br ||= 0;
+
+ $main::build += $v;
+ $main::branch += $br;
+ return ($v, $br);
+}
+
+INIT {
+ ($VERSION, $BRANCH) = dxver(q$Revision$);
+}