+19Nov21=======================================================================
+1. Add the ability of console.pl to resize and have dx spots also resize so
+ that the comment field's size will increase accordingly. Sh/dx amd sh/mydx
+ also work similarly. If you make the console width smaller or wider then
+ spots already on the screen will not resize.
+2. For client programs that parse the output (why? use set/ve7cc to get more
+ easily machine parsed output), a new command "set/columns <width>" is
+ available.
18Nov21=======================================================================
1. Add a dx spot cache which will store 2 days worth (configurable) of spots.
This is then used by the vast majority of simple sh/dx queries without
--- /dev/null
+#
+# set the page width for this invocation of the client
+#
+# Copyright (c) 2021 - Dirk Koopman G1TLH
+#
+#
+#
+my $self = shift;
+my $l = shift;
+$l = 80 if $l < 80;
+$self->width($l);
+return (1, $self->msg('pagewidth', $l));
push @out, DXCommandmode::format_dx_spot($self, @$ref);
}
else {
- push @out, Spot::formatl(@$ref);
+ push @out, Spot::formatl($self->{width}, @$ref);
}
}
}
push @out, DXCommandmode::format_dx_spot($self, @$ref);
}
else {
- push @out, Spot::formatl(@$ref);
+ push @out, Spot::formatl($self->{width}, @$ref);
}
}
}
$self->enhanced($line);
} elsif ($sort eq 'A' || $sort eq 'O' || $sort eq 'W') {
$self->start($line, $sort);
+ } elsif ($sort eq 'C') {
+ $self->width($line); # change number of columns
} elsif ($sort eq 'Z') {
$self->disconnect;
} elsif ($sort eq 'D') {
my $t = ztime($_[2]);
my $loc = '';
- my $clth = 30;
+ my $clth = 30 + $self->{width} - 80; # allow comment to grow according the screen width
# --$clth if $self->{consort} eq 'local';
my $comment = substr (($_[3] || ''), 0, $clth);
ok => 'Operation successful',
outconn => 'Outstanding connect to $_[0]',
page => 'Press Enter to continue, A to abort ($_[0] lines) >',
- pagelth => 'Page Length is now $_[0]',
+ pagelth => 'Page Length is now $_[0] lines',
+ pagewidth => 'Page width is now $_[0] columns',
passerr => 'Please use: SET/PASS <password> <callsign>',
passphrase => 'Passphrase set or changed for $_[0]',
passphraseu => 'Passphrase removed for $_[0]',
# format a spot for user output in list mode
sub formatl
{
- my $t = ztime($_[2]);
- my $d = cldate($_[2]);
- return sprintf "%8.1f %-11s %s %s %-28.28s%7s>", $_[0], $_[1], $d, $t, ($_[3]||''), "<$_[4]" ;
+ my $t = ztime($_[3]);
+ my $d = cldate($_[3]);
+ my $width = ($_[0] ? $_[0] : 80) - 80 + 28;
+ my $comment = $_[4] || '';
+ $comment = substr $comment, 0, $width if length $comment > $width;
+ $comment .= ' ' x ($width - length($comment)) if $comment < $width;
+
+# return sprintf "%8.1f %-11s %s %s %-28.28s%7s>", $_[0], $_[1], $d, $t, ($_[3]||''), "<$_[4]" ;
+ return sprintf "%8.1f %-11s %s %s ${comment}%7s>", $_[1], $_[2], $d, $t, "<$_[5]" ;
}
# enter the spot for dup checking and return true if it is already a dup
$inscroll = 0;
$spos = @sh < $pagel ? 0 : @sh - $pagel;
show_screen();
+ $conn->send_later("C$call|$cols") if $conn;
}
# cease communications