MAX_COLS -> MAX_COLS_DICT for dict-related stuff (since dicts are

staying with fewer words for now.)
This commit is contained in:
Andy2 2011-11-18 07:56:02 -08:00
parent 2eac8e70e0
commit 598be8b404
4 changed files with 7 additions and 6 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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 ) ) {