projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added loginfo stuff
[spider.git]
/
perl
/
console.pl
diff --git
a/perl/console.pl
b/perl/console.pl
index cec17ab4495b5fc2e14833df17cf2b6b7de174f6..594bc67eea73c0c8762b1c6598a455616b50ba52 100755
(executable)
--- a/
perl/console.pl
+++ b/
perl/console.pl
@@
-28,6
+28,7
@@
BEGIN {
use Msg;
use DXVars;
use DXDebug;
use Msg;
use DXVars;
use DXDebug;
+use DXUtil;
use IO::File;
use Curses;
use IO::File;
use Curses;
@@
-137,7
+138,7
@@
sub measure
# display the top screen
sub show_screen
{
# display the top screen
sub show_screen
{
- if ($spos
>
= @shistory - 1) {
+ if ($spos
=
= @shistory - 1) {
# if we really are scrolling thru at the end of the history
my $line = $shistory[$spos];
# if we really are scrolling thru at the end of the history
my $line = $shistory[$spos];
@@
-176,7
+177,10
@@
sub show_screen
}
my $shl = @shistory;
my $add = "-$spos-$shl";
}
my $shl = @shistory;
my $add = "-$spos-$shl";
- $scr->addstr(LINES()-4, 0, '-' x (COLS() - (length($call) + length($add))));
+ my $time = ztime(time);
+ my $str = "-" . $time . '-' x (COLS() - (length($call) + length($add) + length($time) + 1));
+ $scr->addstr(LINES()-4, 0, $str);
+
$scr->attrset($mycallcolor) if $has_colors;
$scr->addstr("$call");
$scr->attrset(COLOR_PAIR(0)) if $has_colors;
$scr->attrset($mycallcolor) if $has_colors;
$scr->addstr("$call");
$scr->attrset(COLOR_PAIR(0)) if $has_colors;
@@
-188,9
+192,11
@@
sub show_screen
# add a line to the end of the top screen
sub addtotop
{
# add a line to the end of the top screen
sub addtotop
{
- my $inbuf = shift;
- push @shistory, $inbuf;
- shift @shistory if @shistory > $maxshist;
+ while (@_) {
+ my $inbuf = shift;
+ push @shistory, $inbuf;
+ shift @shistory if @shistory > $maxshist;
+ }
show_screen();
}
show_screen();
}
@@
-427,12
+433,13
@@
Msg->set_event_handler(\*STDIN, "read" => \&rec_stdin);
for (;;) {
my $t;
Msg->event_loop(1, 1);
for (;;) {
my $t;
Msg->event_loop(1, 1);
- $top->refresh() if $top->is_wintouched;
- $bot->refresh();
$t = time;
if ($t > $lasttime) {
$t = time;
if ($t > $lasttime) {
+ show_screen();
$lasttime = $t;
}
$lasttime = $t;
}
+ $top->refresh() if $top->is_wintouched;
+ $bot->refresh();
}
exit(0);
}
exit(0);