Add Iains Windoze manual
[spider.git] / perl / winclient.pl
index a8188b9dcb49abb5d5137ff6104b9f31b2d2fc87..58db0b8c95f4ce960f4adbddabac9cd618738335 100755 (executable)
@@ -70,11 +70,13 @@ die "can't fork: $!" unless defined($childpid = fork());
 
 # 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)([^\|]+)\|(.*)$/;
+               next unless defined $sort;
+               $line =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
                if ($sort eq 'Z') {
                        kill 'TERM', $childpid;
                        exit(0);