comment out dead code I keep reading

This commit is contained in:
Eric House 2019-02-22 19:59:55 -08:00
parent 0ad1697607
commit d5e68141bd
2 changed files with 39 additions and 38 deletions

1
xwords4/linux/dict.xwd Symbolic link
View file

@ -0,0 +1 @@
../android/app/src/main/assets/CollegeEng_2to8.xwd

View file

@ -536,54 +536,54 @@ linux_dict_getShortName( const DictionaryCtxt* dict )
* This guy reads in from a prc file, and probably hasn't worked in a year. * This guy reads in from a prc file, and probably hasn't worked in a year.
*/ */
#define RECS_BEFORE_DAWG 3 /* a hack */ #define RECS_BEFORE_DAWG 3 /* a hack */
static XP_Bool /* static XP_Bool */
initFromDictFile( LinuxDictionaryCtxt* dctx, const char* fileName ) /* initFromDictFile( LinuxDictionaryCtxt* dctx, const char* fileName ) */
{ /* { */
short i; /* short i; */
unsigned short* dataP; /* unsigned short* dataP; */
unsigned nRecs; /* unsigned nRecs; */
prc_record_t* prect; /* prc_record_t* prect; */
prc_t* pt = prcopen( fileName, PRC_OPEN_READ ); /* prc_t* pt = prcopen( fileName, PRC_OPEN_READ ); */
dctx->pt = pt; /* remember so we can close it later */ /* dctx->pt = pt; /\* remember so we can close it later *\/ */
nRecs = prcgetnrecords( pt ); /* nRecs = prcgetnrecords( pt ); */
/* record 0 holds a struct whose 5th byte is the record num of the first /* /\* record 0 holds a struct whose 5th byte is the record num of the first */
dawg record. 1 and 2 hold tile data. Let's assume 3 is the first dawg /* dawg record. 1 and 2 hold tile data. Let's assume 3 is the first dawg */
record for now. */ /* record for now. *\/ */
prect = prcgetrecord( pt, 1 ); /* prect = prcgetrecord( pt, 1 ); */
dctx->super.numFaces = prect->datalen; /* one char per byte */ /* dctx->super.numFaces = prect->datalen; /\* one char per byte *\/ */
dctx->super.faces = malloc( prect->datalen ); /* dctx->super.faces = malloc( prect->datalen ); */
memcpy( dctx->super.faces, prect->data, prect->datalen ); /* memcpy( dctx->super.faces, prect->data, prect->datalen ); */
dctx->super.counts = malloc( dctx->super.numFaces ); /* dctx->super.counts = malloc( dctx->super.numFaces ); */
dctx->super.values = malloc( dctx->super.numFaces ); /* dctx->super.values = malloc( dctx->super.numFaces ); */
prect = prcgetrecord( pt, 2 ); /* prect = prcgetrecord( pt, 2 ); */
dataP = (unsigned short*)prect->data + 1; /* skip the xloc header */ /* dataP = (unsigned short*)prect->data + 1; /\* skip the xloc header *\/ */
for ( ii = 0; ii < dctx->super.numFaces; ++ii ) { /* for ( ii = 0; ii < dctx->super.numFaces; ++ii ) { */
unsigned short byt = *dataP++; /* unsigned short byt = *dataP++; */
dctx->super.values[ii] = byt >> 8; /* dctx->super.values[ii] = byt >> 8; */
dctx->super.counts[ii] = byt & 0xFF; /* dctx->super.counts[ii] = byt & 0xFF; */
if ( dctx->super.values[ii] == 0 ) { /* if ( dctx->super.values[ii] == 0 ) { */
dctx->super.counts[ii] = 4; /* 4 blanks :-) */ /* dctx->super.counts[ii] = 4; /\* 4 blanks :-) *\/ */
} /* } */
} /* } */
dctx->numStarts = nRecs - RECS_BEFORE_DAWG; /* dctx->numStarts = nRecs - RECS_BEFORE_DAWG; */
dctx->starts = XP_MALLOC( dctx->numStarts * sizeof(*dctx->starts) ); /* dctx->starts = XP_MALLOC( dctx->numStarts * sizeof(*dctx->starts) ); */
for ( i = 0/* , offset = 0 */; i < dctx->numStarts; ++i ) { /* for ( i = 0/\* , offset = 0 *\/; i < dctx->numStarts; ++i ) { */
prect = prcgetrecord( pt, i + RECS_BEFORE_DAWG ); /* prect = prcgetrecord( pt, i + RECS_BEFORE_DAWG ); */
dctx->starts[i].numNodes = prect->datalen / 3; /* dctx->starts[i].numNodes = prect->datalen / 3; */
dctx->starts[i].array = (array_edge*)prect->data; /* dctx->starts[i].array = (array_edge*)prect->data; */
XP_ASSERT( (prect->datalen % 3) == 0 ); /* XP_ASSERT( (prect->datalen % 3) == 0 ); */
} /* } */
} /* initFromDictFile */ /* } /\* initFromDictFile *\/ */
void void
linux_dictionary_destroy( DictionaryCtxt* dict ) linux_dictionary_destroy( DictionaryCtxt* dict )