projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69392cc
)
add wrapping to overlength lines
author
minima
<minima>
Thu, 23 Nov 2006 16:01:42 +0000
(16:01 +0000)
committer
minima
<minima>
Thu, 23 Nov 2006 16:01:42 +0000
(16:01 +0000)
Changes
patch
|
blob
|
history
perl/console.pl
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 65df80a055b4022e1689e1f648549b0f4539ce1e..f7fe8c7cf0b30c6c5893801a2c1b712a3311518c 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,3
+1,5
@@
+23Nov06=======================================================================
+1. added wrapping to over length lines in console.pl.
03Nov06=======================================================================
1. add CTY-1609 changes
2. add back Geo::Taf code with submitted mods
03Nov06=======================================================================
1. add CTY-1609 changes
2. add back Geo::Taf code with submitted mods
diff --git
a/perl/console.pl
b/perl/console.pl
index 597c5eff0ee2010764a9e533732c14b8cd23a38b..88ffb92787589a527ebf03f51983b053de466bdb 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-23,14
+23,6
@@
BEGIN {
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
-
- sub main::mkver
- {
- my $s = shift;
- my ($v, $b) = $s =~ /(\d+\.\d+)(?:\.(\d+\.\d+))?/;
- $main::build += sprintf "%.3f", $v;
- $main::branch += sprintf("%.3f", $b) if $b;
- }
}
use Msg;
}
use Msg;
@@
-42,6
+34,7
@@
use DXDebug;
use IO::File;
use Time::HiRes qw(gettimeofday tv_interval);
use Curses 1.06;
use IO::File;
use Time::HiRes qw(gettimeofday tv_interval);
use Curses 1.06;
+use Text::Wrap;
use Console;
use Console;
@@
-237,8
+230,13
@@
sub addtotop
if ($inbuf =~ s/\x07+$//) {
beep();
}
if ($inbuf =~ s/\x07+$//) {
beep();
}
- push @shistory, $inbuf;
- shift @shistory if @shistory > $maxshist;
+ if (length $inbuf > $cols) {
+ $Text::Wrap::Columns = $cols;
+ push @shistory, wrap('',"\t", $inbuf);
+ } else {
+ push @shistory, $inbuf;
+ }
+ shift @shistory while @shistory > $maxshist;
}
show_screen();
}
}
show_screen();
}
@@
-500,6
+498,8
@@
$conn->send_later("I$call|set/page $maxshist");
#Msg->set_event_handler(\*STDIN, "read" => \&rec_stdin);
#Msg->set_event_handler(\*STDIN, "read" => \&rec_stdin);
+$Text::Wrap::Columns = $cols;
+
my $lastmin = 0;
for (;;) {
my $t;
my $lastmin = 0;
for (;;) {
my $t;