Changeset 76
- Timestamp:
- 01.12.2006 20:53:32 (2 years ago)
- Files:
-
- trunk/devel/FuzzyOcr/Misc.pm (modified) (1 diff)
- trunk/devel/FuzzyOcr/Scanset.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/devel/FuzzyOcr/Misc.pm
r75 r76 96 96 debuglog("Exec : $cmd"); 97 97 debuglog("Stdin : $stdin") if (defined $stdin); 98 debuglog("Stdout: $stdout") if (def outed $stdout);99 debuglog("Stderr: $stderr") if (def erred $stderr);98 debuglog("Stdout: $stdout") if (defined $stdout); 99 debuglog("Stderr: $stderr") if (defined $stderr); 100 100 if (defined $stdin) { 101 101 open(STDIN, $stdin); trunk/devel/FuzzyOcr/Scanset.pm
r70 r76 37 37 $rcmd = $conf->{$t} if defined $conf->{$t}; 38 38 } 39 40 $rcmd .= ' ' . $args; 39 41 40 42 # First, run all preprocessors 41 43 my $preprocessors = $self->{preprocessors}; 42 if ($preprocessors) {44 if ($preprocessors) { 43 45 $preprocessors =~ s/ //g; 44 46 my @prep = split(',', $preprocessors); … … 52 54 $retcode = $proc->run($input); 53 55 if ($retcode<0) { 54 errorlog("Cannot find/execute preproces or($plabel): $command");56 errorlog("Cannot find/execute preprocessor($plabel): $command"); 55 57 return ($retcode,@result); 56 58 } elsif ($retcode>0) { 57 errorlog("Error running preproces or($plabel): $command");59 errorlog("Error running preprocessor($plabel): $command"); 58 60 open ERR, "<$tmpdir/prep.$plabel.err"; 59 61 @result = <ERR>; … … 68 70 # All preprocessors done, filename with result of last is in $input 69 71 # Does the scanner expect input from file or from stdin? 70 if($ args=~ /\$input/) {71 $rcmd .= " $input";72 if($rcmd =~ /\$input/) { 73 $rcmd =~ s/\$input/$input/; 72 74 } else { 73 75 $stdin = "<$input"; … … 75 77 76 78 # Does it output to file or to stdout? 77 if($ args=~ /\$output/) {78 $rcmd .= " $output";79 if($rcmd =~ /\$output/) { 80 $rcmd =~ s/\$output/$output/; 79 81 } else { 80 82 $stdout = ">$output";
