projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added rinit command
[spider.git]
/
perl
/
winclient.pl
diff --git
a/perl/winclient.pl
b/perl/winclient.pl
index cf0da0a2ffef78deeceeac86b0356e9a8e3f64e1..58db0b8c95f4ce960f4adbddabac9cd618738335 100755
(executable)
--- a/
perl/winclient.pl
+++ b/
perl/winclient.pl
@@
-70,20
+70,23
@@
die "can't fork: $!" unless defined($childpid = fork());
# the communication .....
if ($childpid) {
# the communication .....
if ($childpid) {
- my ($lastend, $end);
+ my ($lastend, $end)
= ("\n", "\n")
;
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)([^\|]+)\|(.*)$/;
+ next unless defined $sort;
+ $line =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
if ($sort eq 'Z') {
kill 'TERM', $childpid;
if ($sort eq 'Z') {
kill 'TERM', $childpid;
+ exit(0);
} elsif ($sort eq 'E' || $sort eq 'B') {
;
} else {
# newline ends all lines except a prompt
$lastend = $end;
$end = "\n";
} elsif ($sort eq 'E' || $sort eq 'B') {
;
} else {
# newline ends all lines except a prompt
$lastend = $end;
$end = "\n";
- if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/) {
+ if ($line =~ /^$call de $mycall\s+\d+-\w\w\w-\d+\s+\d+Z >$/
o
) {
$end = ' ';
}
my $begin = ($lastend eq "\n") ? '' : "\n";
$end = ' ';
}
my $begin = ($lastend eq "\n") ? '' : "\n";