4 # Copyright (c) 2001 Dirk Koopman G1TLH
21 my ($self, $line) = @_;
22 my @f = split /\s+/, $line;
29 if ($f =~ /^\d+$/ && $f < 366) { # no of days
33 if (my $utime = Date::Parse::str2time($f)) { # is it a parseable date?
35 $now = Julian::Day->new($utime);
36 $date = cldate($utime);
40 if (is_callsign($f)) {
50 if (my @ciz = Prefix::to_ciz('nc', $f)) {
51 push @dxcc, map {[$_, 2]} @ciz;
55 push @out, $self->msg('e27', $f);
60 # return error messages if any
61 return (1, @out) if @out;
64 unless (@pref) { # no prefix or callsign, use default prefix
65 push @dxcc, [$_, 2] for @main::my_cc;
66 push @pref, $main::mycall;
71 $now = Julian::Day->new(time); #no starting date
74 if ($self->{_nospawn} || $main::is_win == 1) {
75 @out = generate($self);
78 @out = $self->spawn_cmd("show/vhftable $line", sub {return (generate($self))});
91 # generate the spot list
92 for ($i = 0; $i < $days; $i++) {
93 my $fh = $Spot::statp->open($now); # get the next file
96 $fh = $Spot::statp->open($now);
101 next if $l[0] eq 'TOTALS';
102 next unless $all || grep $l[$_->[1]] eq $_->[0], @dxcc;
103 my $ref = $list{$l[0]} || [0,0,0,0,0,0,0,0,0,0];
105 foreach my $item (@l[14..16, 18..23]) {
110 $list{$l[0]} = $ref if $ref->[0];
118 my $l = join ',', @pref;
119 push @out, $self->msg('statvhft', $l, $date, $days);
120 #push @out, $self->msg('statvhft', join(',', @dxcc), cldate(time));
121 push @out, sprintf "%10s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|%4s|", qw(Callsign Tot 6m 4m 2m 70cm 23cm 13cm 9cm 6cm 3cm);
123 for (sort {$list{$b}->[0] <=> $list{$a}->[0] || $a cmp $b} keys %list) {
126 my @list = (sprintf "%10s", $_);
127 foreach my $j (0..9) {
131 $r = sprintf("%4d", $r);
138 push @out, join('|', @list, "");
139 last if $limit && $nocalls >= $limit;
142 $nocalls = sprintf "%10s", "$nocalls calls";
143 @tot = map {$_ ? sprintf("%4d", $_) : ' ' } @tot;
144 push @out, join('|', $nocalls, @tot, "");