mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
Cleanup: remove dead code.
This commit is contained in:
parent
131d4c9bd4
commit
d6dc4bf30c
1 changed files with 0 additions and 72 deletions
|
@ -372,24 +372,6 @@ registerSubArray( NodeList& edgesR, int nodeLoc )
|
|||
gSubsHash[edgesR] = nodeLoc;
|
||||
} // registerSubArray
|
||||
|
||||
#if 0
|
||||
sub toWord($) {
|
||||
my ( $tileARef ) = @_;
|
||||
my $word = "";
|
||||
|
||||
foreach my $tile (@$tileARef) {
|
||||
foreach my $letter (keys (%gTableHash) ) {
|
||||
if ( $tile == $gTableHash{$letter} ) {
|
||||
$word .= $letter;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $word;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
readNextWord( void )
|
||||
{
|
||||
|
@ -445,46 +427,10 @@ readNextWord( void )
|
|||
static bool
|
||||
firstBeforeSecond( const char* lhs, const char* rhs )
|
||||
{
|
||||
char sl[16];
|
||||
char sr[16];
|
||||
|
||||
// tileToAscii( sl, lhs );
|
||||
// tileToAscii( sr, rhs );
|
||||
|
||||
bool gt = 0 > strcmp( lhs, rhs );
|
||||
// fprintf( stderr, "comparing %s, %s; returning %s\n",
|
||||
// sl, sr, gt?"true":"false" );
|
||||
|
||||
return gt;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// passed to sort. Should remain unprototyped for effeciency's sake
|
||||
|
||||
sub cmpWords {
|
||||
|
||||
my $lenA = @{$a};
|
||||
my $lenB = @{$b};
|
||||
my $min = $lenA > $lenB? $lenB: $lenA;
|
||||
|
||||
for ( my $i = 0; $i < $min; ++$i ) {
|
||||
my $ac = ${$a}[$i];
|
||||
my $bc = ${$b}[$i];
|
||||
|
||||
my $res = $ac <=> $bc;
|
||||
|
||||
if ( $res != 0 ) {
|
||||
return $res; // we're done
|
||||
}
|
||||
}
|
||||
|
||||
// If we got here, they match up to their common length. Longer is
|
||||
// greater.
|
||||
my $res = @{$a} <=> @{$b};
|
||||
return $res; // which is longer?
|
||||
} // cmpWords
|
||||
#endif
|
||||
|
||||
static char*
|
||||
tileToAscii( char* out, int outSize, const char* in )
|
||||
{
|
||||
|
@ -609,24 +555,6 @@ printWords( std::vector<char*>* strings )
|
|||
// }
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Print binary representation of trie array. This isn't used yet, but
|
||||
// eventually it'll want to dump to multiple files appropriate for Palm
|
||||
// that can be catenated together on other platforms. There'll need to
|
||||
// be a file giving the offset of the first node too. Also, might want
|
||||
// to move to 4-byte representation when the input can't otherwise be
|
||||
// handled.
|
||||
|
||||
sub dumpNodes {
|
||||
|
||||
for ( my $i = 0; $i < @gNodes; ++$i ) {
|
||||
my $node = $gNodes[$i];
|
||||
my $bstr = pack( "I", $node );
|
||||
print STDOUT $bstr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* Little node-field setters and getters to hide what bits represent
|
||||
* what.
|
||||
|
|
Loading…
Reference in a new issue