projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6daf175
)
fix line beginning for >
author
minima
<minima>
Sat, 3 Mar 2001 20:32:06 +0000
(20:32 +0000)
committer
minima
<minima>
Sat, 3 Mar 2001 20:32:06 +0000
(20:32 +0000)
perl/winclient.pl
patch
|
blob
|
history
diff --git
a/perl/winclient.pl
b/perl/winclient.pl
index e0c89efe4174a3e21b5a228794fd97a96b108554..cf0da0a2ffef78deeceeac86b0356e9a8e3f64e1 100755
(executable)
--- a/
perl/winclient.pl
+++ b/
perl/winclient.pl
@@
-70,6
+70,8
@@
die "can't fork: $!" unless defined($childpid = fork());
# the communication .....
if ($childpid) {
# the communication .....
if ($childpid) {
+ my ($lastend, $end);
+
STDOUT->autoflush(1);
while (defined (my $msg = <$handle>)) {
my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
STDOUT->autoflush(1);
while (defined (my $msg = <$handle>)) {
my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
@@
-79,11
+81,13
@@
if ($childpid) {
;
} else {
# newline ends all lines except a prompt
;
} else {
# newline ends all lines except a prompt
- my $end = "\n";
+ $lastend = $end;
+ $end = "\n";
if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/) {
$end = ' ';
}
if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/) {
$end = ' ';
}
- print $line . $end;
+ my $begin = ($lastend eq "\n") ? '' : "\n";
+ print $begin . $line . $end;
}
}
kill 'TERM', $childpid;
}
}
kill 'TERM', $childpid;