version 1.23, 2007/02/03 04:09:30
|
version 1.24, 2007/02/08 06:28:30
|
Line 259 sub make_new_child {
|
Line 259 sub make_new_child {
|
while (my $cmd=<$client>) { |
while (my $cmd=<$client>) { |
&status('Processing command'); |
&status('Processing command'); |
print $command &unescape($cmd); |
print $command &unescape($cmd); |
my ($reply,$finished,$syntaxerr) = &getmaximaoutput($command); |
my ($reply,$finished,$syntaxerr); |
if ((!$finished) && (!$syntaxerr) && ($reply !~ /^Error\:/)) { |
while ((!$finished) && (!$syntaxerr) && ($reply !~ /^Error\:/)) { |
($reply,$finished,$syntaxerr) = &getmaximaoutput($command); |
($reply,$finished,$syntaxerr) = &getmaximaoutput($command); |
} |
} |
print $client &escape($reply)."\n"; |
print $client &escape($reply)."\n"; |
Line 304 sub make_new_child {
|
Line 304 sub make_new_child {
|
|
|
sub getmaximaoutput { |
sub getmaximaoutput { |
my ($command)=@_; |
my ($command)=@_; |
my (undef,$error,undef,$output)=$command->expect(20, -re => '\(\%i\d+\)'); |
my (undef,$error,undef,$output)=$command->expect(20, -re => '^\(\%i\d+\)'); |
if ($error) { |
if ($error) { |
return 'Error: '.$error; |
return 'Error: '.$error; |
} |
} |