use Carp;
use strict;
-use vars qw(%bands %regions $bandsfn %valid);
+use vars qw(%bands %regions %aliases $bandsfn %valid);
%bands = (); # the 'raw' band data
%regions = (); # list of regions for shortcuts eg vhf ssb
+%aliases = (); # list of aliases
$bandsfn = "$main::data/bands.pl";
%valid = (
sub get
{
my $call = shift;
+ my $ncall = $aliases{$call};
+ $call = $ncall if $ncall;
return $bands{$call};
}
return keys(%bands);
}
+# get all the region keys
+sub get_region_keys
+{
+ return keys(%regions);
+}
+
+# get all the alias keys
+sub get_alias_keys
+{
+ return keys(%aliases);
+}
+
+# get a region
+sub get_region
+{
+ my $reg = shift;
+ return $regions{$reg};
+}
+
# get all the frequency pairs associated with the band and sub-band offered
# the band can be a region, sub-band can be missing
#