mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
track last word for debugging purposes.
This commit is contained in:
parent
c955c24dc3
commit
bccdedea9e
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue