minor bugs with factors

This commit is contained in:
phikoehn 2014-06-06 14:14:35 +01:00
parent 7fc3ccd968
commit ac7670c5e7
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,7 @@ while (my $line = <STDIN>) {
elsif ($inXML == 0) {
if ($c eq " ") {
$prevSpace = 1;
$prevBar = 0;
$prevBar = 0;
}
elsif ($c eq "|") {
$prevSpace = 0;
@ -33,7 +33,7 @@ while (my $line = <STDIN>) {
}
else {
$prevSpace = 0;
$prevBar = 0;
$prevBar = 0;
}
print $c;
}

View File

@ -754,7 +754,9 @@ sub reduce_factors {
$firstline =~ s/^\s*//;
$firstline =~ s/\s.*//;
# count factors
my $maxfactorindex = $firstline =~ tr/$___FACTOR_DELIMITER/$___FACTOR_DELIMITER/;
my @WORD = split(/ /,$firstline);
my @FACTOR = split(/$___FACTOR_DELIMITER/,$WORD[0]);
my $maxfactorindex = scalar(@FACTOR)-1;
if (join(",", @INCLUDE) eq join(",", 0..$maxfactorindex)) {
# create just symlink; preserving compression
my $realfull = $full;