track last word for debugging purposes.

This commit is contained in:
ehouse 2004-07-21 02:06:24 +00:00
parent c955c24dc3
commit bccdedea9e

View file

@ -392,6 +392,7 @@ sub parseAndSort() {
my @wordlist; my @wordlist;
my @word; my @word;
my $lastWord;
WORDLOOP: WORDLOOP:
for ( ; ; ) { for ( ; ; ) {
@ -409,14 +410,19 @@ sub parseAndSort() {
push @wordlist, [ @word ]; push @wordlist, [ @word ];
++$gWordCount; ++$gWordCount;
} }
$lastWord = "";
next WORDLOOP; next WORDLOOP;
} elsif ( exists( $gTableHash{$byt} ) ) { } elsif ( exists( $gTableHash{$byt} ) ) {
if ( !$dropWord ) { if ( !$dropWord ) {
push @word, $gTableHash{$byt}; push @word, $gTableHash{$byt};
die "word too long" if @word > 15; die "word too long" if @word > 15;
if ( $gKillIfMissing ) {
$lastWord .= $byt;
}
} }
} elsif ($gKillIfMissing) { } elsif ($gKillIfMissing) {
die "$0: chr $byt (", $byt+0, ") not in map file $gTableFile\n"; die "$0: chr $byt (", $byt+0, ") not in map file $gTableFile\n"
. "last word was $lastWord\n";
} else { } else {
$dropWord = 1; $dropWord = 1;
splice @word; # lose anything we already have splice @word; # lose anything we already have