mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
MAX_COLS -> MAX_COLS_DICT for dict-related stuff (since dicts are
staying with fewer words for now.)
This commit is contained in:
parent
2eac8e70e0
commit
598be8b404
4 changed files with 7 additions and 6 deletions
|
@ -38,7 +38,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef struct _EdgeArray {
|
||||
array_edge* edges[MAX_COLS];
|
||||
array_edge* edges[MAX_COLS_DICT];
|
||||
XP_U16 nEdges;
|
||||
} EdgeArray;
|
||||
|
||||
|
@ -391,7 +391,7 @@ dict_makeIndex( const DictIter* iter, XP_U16 depth, IndexData* data )
|
|||
{
|
||||
ASSERT_INITED( iter );
|
||||
const DictionaryCtxt* dict = iter->dict;
|
||||
XP_ASSERT( depth < MAX_COLS );
|
||||
XP_ASSERT( depth < MAX_COLS_DICT );
|
||||
XP_U16 ii, needCount;
|
||||
const XP_U16 nFaces = dict_numTileFaces( dict );
|
||||
XP_U16 nNonBlankFaces = nFaces;
|
||||
|
|
|
@ -33,12 +33,13 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAX_COLS_DICT 15
|
||||
|
||||
/* API for iterating over a dict */
|
||||
typedef XP_S32 DictPosition;
|
||||
typedef struct _DictIter {
|
||||
XP_U16 nEdges;
|
||||
array_edge* edges[MAX_COLS];
|
||||
array_edge* edges[MAX_COLS_DICT];
|
||||
#ifdef XWFEATURE_WALKDICT_FILTER
|
||||
XP_U16 min;
|
||||
XP_U16 max;
|
||||
|
|
|
@ -482,7 +482,7 @@ dict_getWordCount( const DictionaryCtxt* dict )
|
|||
#ifdef XWFEATURE_WALKDICT
|
||||
if ( 0 == nWords ) {
|
||||
DictIter iter;
|
||||
dict_initIter( &iter, dict, 0, MAX_COLS );
|
||||
dict_initIter( &iter, dict, 0, MAX_COLS_DICT );
|
||||
nWords = dict_countWords( &iter );
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -956,7 +956,7 @@ walk_dict_test( const LaunchParams* params, const DictionaryCtxt* dict,
|
|||
XP_U16 min, max;
|
||||
if ( !testMinMax || !parsePair( testMinMax, &min, &max ) ) {
|
||||
min = 0;
|
||||
max = MAX_COLS;
|
||||
max = MAX_COLS_DICT;
|
||||
}
|
||||
|
||||
dict_initIter( &iter, dict, min, max );
|
||||
|
@ -1048,7 +1048,7 @@ walk_dict_test( const LaunchParams* params, const DictionaryCtxt* dict,
|
|||
guint count = g_slist_length( testPrefixes );
|
||||
for ( ii = 0; ii < count; ++ii ) {
|
||||
gchar* prefix = (gchar*)g_slist_nth_data( testPrefixes, ii );
|
||||
Tile tiles[MAX_COLS];
|
||||
Tile tiles[MAX_COLS_DICT];
|
||||
XP_U16 nTiles = VSIZE(tiles);
|
||||
if ( dict_tilesForString( dict, prefix, tiles, &nTiles ) ) {
|
||||
if ( dict_findStartsWith( &iter, NULL, tiles, nTiles ) ) {
|
||||
|
|
Loading…
Reference in a new issue