Changeset 76

Show
Ignore:
Timestamp:
01.12.2006 20:53:32 (2 years ago)
Author:
decoder
Message:

DONT USE THIS REVISION (Stick to 67 for now)

Critical bugfixes here
Might contain more bugs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/devel/FuzzyOcr/Misc.pm

    r75 r76  
    9696                debuglog("Exec  : $cmd"); 
    9797                debuglog("Stdin : $stdin") if (defined $stdin); 
    98                 debuglog("Stdout: $stdout") if (defouted $stdout); 
    99                 debuglog("Stderr: $stderr") if (deferred $stderr); 
     98                debuglog("Stdout: $stdout") if (defined $stdout); 
     99                debuglog("Stderr: $stderr") if (defined $stderr); 
    100100                if (defined $stdin) { 
    101101                    open(STDIN, $stdin); 
  • trunk/devel/FuzzyOcr/Scanset.pm

    r70 r76  
    3737        $rcmd = $conf->{$t} if defined $conf->{$t}; 
    3838    } 
     39     
     40    $rcmd .= ' ' . $args; 
    3941 
    4042    # First, run all preprocessors 
    4143    my $preprocessors = $self->{preprocessors}; 
    42         if ($preprocessors) { 
     44    if ($preprocessors) { 
    4345        $preprocessors =~ s/ //g; 
    4446        my @prep = split(',', $preprocessors); 
     
    5254            $retcode = $proc->run($input); 
    5355            if ($retcode<0) { 
    54                 errorlog("Cannot find/execute preprocesor($plabel): $command"); 
     56                errorlog("Cannot find/execute preprocessor($plabel): $command"); 
    5557                return ($retcode,@result); 
    5658            } elsif ($retcode>0) { 
    57                 errorlog("Error running preprocesor($plabel): $command"); 
     59                errorlog("Error running preprocessor($plabel): $command"); 
    5860                open ERR, "<$tmpdir/prep.$plabel.err"; 
    5961                @result = <ERR>; 
     
    6870    # All preprocessors done, filename with result of last is in $input 
    6971    # 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/
    7274    } else { 
    7375        $stdin = "<$input"; 
     
    7577 
    7678    # Does it output to file or to stdout? 
    77     if($args =~ /\$output/) { 
    78         $rcmd .= " $output"
     79    if($rcmd =~ /\$output/) { 
     80        $rcmd =~ s/\$output/$output/
    7981    } else { 
    8082        $stdout = ">$output";