projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix sh/dx on 14050 so it works as expected
[spider.git]
/
perl
/
console.pl
diff --git
a/perl/console.pl
b/perl/console.pl
index 88ffb92787589a527ebf03f51983b053de466bdb..0a6d7404ba62c066539afd4697ba2d2fafba6771 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-10,7
+10,7
@@
#
# Copyright (c) 1999 Dirk Koopman G1TLH
#
#
# Copyright (c) 1999 Dirk Koopman G1TLH
#
-#
$Id$
+#
#
require 5.004;
#
require 5.004;
@@
-23,6
+23,7
@@
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";
+ $is_win = ($^O =~ /^MS/ || $^O =~ /^OS-2/) ? 1 : 0; # is it Windows?
}
use Msg;
}
use Msg;
@@
-54,7
+55,7
@@
$spos = $pos = $lth = 0;
$inbuf = "";
@time = ();
$inbuf = "";
@time = ();
-$SIG{WINCH} = sub {@time = gettimeofday};
+
#
$SIG{WINCH} = sub {@time = gettimeofday};
sub mydbg
{
sub mydbg
{
@@
-84,9
+85,9
@@
sub do_initscr
init_pair(12, COLOR_MAGENTA, COLOR_BLUE);
init_pair(13, COLOR_YELLOW, COLOR_GREEN);
init_pair(14, COLOR_RED, COLOR_GREEN);
init_pair(12, COLOR_MAGENTA, COLOR_BLUE);
init_pair(13, COLOR_YELLOW, COLOR_GREEN);
init_pair(14, COLOR_RED, COLOR_GREEN);
- eval { assume_default_colors($foreground, $background) };
+ eval { assume_default_colors($foreground, $background) }
unless $is_win
;
}
}
-
+
$top = $scr->subwin($lines-4, $cols, 0, 0);
$top->intrflush(0);
$top->scrollok(1);
$top = $scr->subwin($lines-4, $cols, 0, 0);
$top->intrflush(0);
$top->scrollok(1);
@@
-230,7
+231,7
@@
sub addtotop
if ($inbuf =~ s/\x07+$//) {
beep();
}
if ($inbuf =~ s/\x07+$//) {
beep();
}
- if (length $inbuf > $cols) {
+ if (length $inbuf >
=
$cols) {
$Text::Wrap::Columns = $cols;
push @shistory, wrap('',"\t", $inbuf);
} else {
$Text::Wrap::Columns = $cols;
push @shistory, wrap('',"\t", $inbuf);
} else {
@@
-340,7
+341,7
@@
sub rec_stdin
} elsif ($r eq KEY_PPAGE || $r eq "\032") {
if ($spos > 0) {
my ($i, $l);
} elsif ($r eq KEY_PPAGE || $r eq "\032") {
if ($spos > 0) {
my ($i, $l);
- for ($i = 0; $i <
=
$pagel-1 && $spos >= 0; ) {
+ for ($i = 0; $i < $pagel-1 && $spos >= 0; ) {
$l = measure($shistory[$spos]);
$i += $l;
$spos-- if $i <= $pagel;
$l = measure($shistory[$spos]);
$i += $l;
$spos-- if $i <= $pagel;