Changeset 125
- Timestamp:
- 07.01.2007 14:13:19 (2 years ago)
- Files:
-
- tags/FuzzyOcr-3.4.3/FuzzyOcr.pm (modified) (12 diffs)
- tags/FuzzyOcr-3.5.1 (added)
- tags/FuzzyOcr-3.5.1/CHANGES (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.cf (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.mysql (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.preps (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.scansets (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr.words (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Config.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Deanimate.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Hashing.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Logging.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Misc.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Preprocessor.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Scanset.pm (added)
- tags/FuzzyOcr-3.5.1/FuzzyOcr/Scoring.pm (added)
- tags/FuzzyOcr-3.5.1/INSTALL (added)
- tags/FuzzyOcr-3.5.1/Utils (added)
- tags/FuzzyOcr-3.5.1/Utils/README (added)
- tags/FuzzyOcr-3.5.1/Utils/fuzzy-cleantmp (added)
- tags/FuzzyOcr-3.5.1/Utils/fuzzy-find (added)
- tags/FuzzyOcr-3.5.1/Utils/fuzzy-stats (added)
- tags/FuzzyOcr-3.5.1/samples (added)
- tags/FuzzyOcr-3.5.1/samples/README (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-animated.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-gif.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-jpg.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-multi.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-obfuscated.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-png.eml (added)
- tags/FuzzyOcr-3.5.1/samples/ocr-wrongext.eml (added)
- tags/tarballs/FuzzyOcr-3.5.1.tar.gz (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tags/FuzzyOcr-3.4.3/FuzzyOcr.pm
r56 r125 445 445 (my $retcode, @stdout_data) = save_execute("$App{gifsicle} --info $giffile", ">$imgdir/gifsicle.info", ">$imgdir/gifsicle.info.err", 1, $t); 446 446 447 if ($retcode ) {447 if ($retcode < 0) { 448 448 #FIXME: WARN HERE 449 449 } … … 658 658 #$rcode = $?; 659 659 #}); 660 if ($rcode ) {660 if ($rcode < 0) { 661 661 chomp $rcode; 662 662 debuglog("$App{pamfile}: Timed out [$rcode], skipping..."); 663 663 return (1, ''); 664 } 664 } elsif ($rcode > 0) { 665 chomp $rcode; 666 debuglog("$App{pamfile}: Error [$rcode], skipping..."); 667 return (1, ''); 668 } 669 665 670 if ($stdout_data[0] =~ m/(\d+) by (\d+)/) { 666 671 $w = $1; $h = $2; … … 673 678 #$rcode = $?; 674 679 # }); 675 if ($rcode) { 680 681 if ($rcode < 0) { 676 682 chomp $rcode; 677 683 debuglog("$App{ppmhist}: Timed out [$rcode], skipping..."); 678 684 return (1, ''); 679 } 685 } elsif ($rcode > 0) { 686 chomp $rcode; 687 debuglog("$App{ppmhist}: Error [$rcode], skipping..."); 688 return (1, ''); 689 } 690 680 691 my $cnt = 0; 681 692 my $c = scalar(@stdout_data); … … 930 941 ($retcode, @stdout_data) = save_execute("$App{giftext} $file", ">$imgdir/giftext.info", ">/dev/null", 1, $t); 931 942 932 if ($retcode ) {943 if ($retcode < 0) { 933 944 chomp $retcode; 934 945 debuglog("$App{giftext} Timed out [$retcode], skipping..."); … … 955 966 $retcode = save_execute("$App{giffix} $file", ">$tfile", ">>$efile", 0, $t); 956 967 957 if ($retcode ) {968 if ($retcode < 0) { 958 969 chomp $retcode; 959 970 debuglog("$App{giffix}: Timed out [$retcode], skipping..."); … … 1027 1038 $retcode = save_execute("$App{gifinter} $cfile", ">$tfile", ">>$efile", 0, $t); 1028 1039 1029 if ($retcode ) {1040 if ($retcode < 0) { 1030 1041 chomp $retcode; 1031 1042 debuglog("$App{gifinter}: Timed out [$retcode], skipping..."); … … 1038 1049 $retcode = save_execute("$App{giftopnm} $tfile", ">$pfile", ">>$efile", 0, $t); 1039 1050 1040 if ($retcode ) {1051 if ($retcode < 0) { 1041 1052 chomp $retcode; 1042 1053 debuglog("$App{giftopnm}: Timed out [$retcode], skipping..."); … … 1060 1071 $retcode = save_execute("$App{jpegtopnm} $file", ">$pfile", ">>$efile", 0, $t); 1061 1072 1062 if ($retcode ) {1073 if ($retcode < 0) { 1063 1074 chomp $retcode; 1064 1075 debuglog("$App{jpegtopnm}: Timed out [$retcode], skipping..."); … … 1081 1092 $retcode = save_execute("$App{pngtopnm} $file", ">$pfile", ">>$efile", 0, $t); 1082 1093 1083 if ($retcode ) {1094 if ($retcode < 0) { 1084 1095 chomp $retcode; 1085 1096 debuglog("$App{pngtopnm}: Timed out [$retcode], skipping..."); … … 1103 1114 $retcode = save_execute("$App{bmptopnm} $file", ">$pfile", ">>$efile", 0, $t); 1104 1115 1105 if ($retcode ) {1116 if ($retcode < 0) { 1106 1117 chomp $retcode; 1107 1118 debuglog("$App{bmptopnm}: Timed out [$retcode], skipping..."); … … 1123 1134 $retcode = save_execute("$App{tifftopnm} $file", ">$pfile", ">>$efile", 0, $t); 1124 1135 1125 if ($retcode ) {1136 if ($retcode < 0) { 1126 1137 chomp $retcode; 1127 1138 debuglog("$App{tifftopnm}: Timed out [$retcode], skipping..."); … … 1175 1186 ($retcode, @ocrdata) = save_execute("$scan", ">$imgdir/ocr.temp", ">>$efile", 1, $t); 1176 1187 1177 if ($retcode) { 1188 if ($retcode < 0) { 1189 debuglog("Timeout: \"$scanset\" took more than $Option{timeout} sec."); 1190 debuglog("Skipping scanset due to timeout, trying next..."); 1191 printf RAWERR qq(Timeout[$Option{timeout}]: $scanset\n) if ($haserr>0); 1192 next; 1193 } elsif ($retcode > 0) { 1178 1194 chomp $retcode; 1179 1195 open ERR,$efile;
