remove excessive logging

This commit is contained in:
ehouse 2008-04-02 03:50:55 +00:00
parent f07a1f461a
commit 120592324a
4 changed files with 2 additions and 26 deletions

View file

@ -44,7 +44,6 @@ setBlankTile( DictionaryCtxt* dctx )
for ( i = 0; i < dctx->nFaces; ++i ) { for ( i = 0; i < dctx->nFaces; ++i ) {
if ( dctx->faces16[i] == 0 ) { if ( dctx->faces16[i] == 0 ) {
dctx->blankTile = (XP_S8)i; dctx->blankTile = (XP_S8)i;
XP_LOGF( "blank tile index: %d", i );
break; break;
} }
} }

View file

@ -66,7 +66,6 @@ ce_dictionary_make( CEAppGlobals* globals, XP_UCHAR* dictName )
XP_UCHAR buf[CE_MAX_PATH_LEN+1]; /* in case we have to look */ XP_UCHAR buf[CE_MAX_PATH_LEN+1]; /* in case we have to look */
XP_ASSERT( !!dictName ); XP_ASSERT( !!dictName );
XP_DEBUGF( "looking for dict %s", dictName );
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, dictName, -1, MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, dictName, -1,
nameBuf, VSIZE(nameBuf) ); nameBuf, VSIZE(nameBuf) );
@ -94,7 +93,6 @@ ce_dictionary_make( CEAppGlobals* globals, XP_UCHAR* dictName )
XP_U8 nodeSize; XP_U8 nodeSize;
flags = n_ptr_tohs( &ptr ); flags = n_ptr_tohs( &ptr );
XP_DEBUGF( "%s: flags=0x%x", __func__, flags );
#ifdef NODE_CAN_4 #ifdef NODE_CAN_4
if ( flags == 0x0002 ) { if ( flags == 0x0002 ) {
@ -117,11 +115,8 @@ ce_dictionary_make( CEAppGlobals* globals, XP_UCHAR* dictName )
ctxt->super.destructor = ce_dict_destroy; ctxt->super.destructor = ce_dict_destroy;
ctxt->super.func_dict_getShortName = ce_dict_getShortName; ctxt->super.func_dict_getShortName = ce_dict_getShortName;
XP_DEBUGF( "ptr starting at 0x%p", ptr );
numFaces = (XP_U16)(*ptr++); numFaces = (XP_U16)(*ptr++);
ctxt->super.nFaces = (XP_U8)numFaces; ctxt->super.nFaces = (XP_U8)numFaces;
XP_DEBUGF( "read %d faces from dict", (short)numFaces );
ctxt->super.faces16 = ctxt->super.faces16 =
XP_MALLOC( globals->mpool, XP_MALLOC( globals->mpool,
numFaces * sizeof(ctxt->super.faces16[0]) ); numFaces * sizeof(ctxt->super.faces16[0]) );
@ -171,7 +166,6 @@ ce_dictionary_make( CEAppGlobals* globals, XP_UCHAR* dictName )
} }
if ( dictLength > 0 ) { if ( dictLength > 0 ) {
XP_DEBUGF( "setting topEdge; offset = %ld", offset );
ctxt->super.base = (array_edge*)ptr; ctxt->super.base = (array_edge*)ptr;
#ifdef NODE_CAN_4 #ifdef NODE_CAN_4
ctxt->super.topEdge = ctxt->super.base ctxt->super.topEdge = ctxt->super.base
@ -234,7 +228,6 @@ ceLoadSpecialData( CEDictionaryCtxt* ctxt, XP_U8** ptrp )
XP_ASSERT( face < nSpecials ); XP_ASSERT( face < nSpecials );
texts[face] = text; texts[face] = text;
XP_DEBUGF( "making bitmaps for %s", texts[face] );
bitmaps[face].largeBM = ceMakeBitmap( ctxt, &ptr ); bitmaps[face].largeBM = ceMakeBitmap( ctxt, &ptr );
bitmaps[face].smallBM = ceMakeBitmap( ctxt, &ptr ); bitmaps[face].smallBM = ceMakeBitmap( ctxt, &ptr );
} }
@ -273,8 +266,6 @@ printBitmapData1( XP_U16 nCols, XP_U16 nRows, XP_U8* data )
++rowBytes; ++rowBytes;
} }
XP_DEBUGF( " printBitmapData (%dx%d):", nCols, nRows );
for ( row = 0; row < nRows; ++row ) { for ( row = 0; row < nRows; ++row ) {
for ( col = 0; col < nCols; ++col ) { for ( col = 0; col < nCols; ++col ) {
XP_UCHAR byt = data[col / 8]; XP_UCHAR byt = data[col / 8];
@ -287,13 +278,11 @@ printBitmapData1( XP_U16 nCols, XP_U16 nRows, XP_U8* data )
strs[nCols] = '\0'; strs[nCols] = '\0';
XP_DEBUGF( strs ); XP_DEBUGF( strs );
} }
XP_DEBUGF( " printBitmapData done" );
} /* printBitmapData1 */ } /* printBitmapData1 */
static void static void
printBitmapData2( XP_U16 nCols, XP_U16 nRows, XP_U8* data ) printBitmapData2( XP_U16 nCols, XP_U16 nRows, XP_U8* data )
{ {
XP_DEBUGF( " printBitmapData (%dx%d):", nCols, nRows );
while ( nRows-- ) { while ( nRows-- ) {
XP_UCHAR buf[100]; XP_UCHAR buf[100];
XP_UCHAR* ptr = buf; XP_UCHAR* ptr = buf;
@ -307,7 +296,6 @@ printBitmapData2( XP_U16 nCols, XP_U16 nRows, XP_U8* data )
} }
XP_DEBUGF( buf ); XP_DEBUGF( buf );
} }
XP_DEBUGF( " printBitmapData done" );
} /* printBitmapData2 */ } /* printBitmapData2 */
#if 0 #if 0
@ -454,7 +442,6 @@ openMappedFile( MPFORMAL const wchar_t* name, HANDLE* mappedFileP,
XP_DEBUGF( "open file failed: %ld", GetLastError() ); XP_DEBUGF( "open file failed: %ld", GetLastError() );
} else { } else {
HANDLE mappedFile; HANDLE mappedFile;
XP_DEBUGF( "open file succeeded!!!!" );
mappedFile = CreateFileMapping( hFile, mappedFile = CreateFileMapping( hFile,
NULL, NULL,
@ -487,7 +474,6 @@ openMappedFile( MPFORMAL const wchar_t* name, HANDLE* mappedFileP,
if ( hFile != INVALID_HANDLE_VALUE ) { if ( hFile != INVALID_HANDLE_VALUE ) {
DWORD size = GetFileSize( hFile, NULL ); DWORD size = GetFileSize( hFile, NULL );
XP_LOGF( "file size: %ld", size );
ptr = XP_MALLOC( mpool, size ); ptr = XP_MALLOC( mpool, size );
if ( ptr != NULL ) { if ( ptr != NULL ) {
@ -550,7 +536,6 @@ checkIfDictAndLegal( MPFORMAL wchar_t* path, XP_U16 pathLen,
int len = wcslen( pathBuf ); int len = wcslen( pathBuf );
len = WideCharToMultiByte( CP_ACP, 0, pathBuf, len + 1, len = WideCharToMultiByte( CP_ACP, 0, pathBuf, len + 1,
narrowName, len + 1, NULL, NULL ); narrowName, len + 1, NULL, NULL );
XP_LOGF( "%s ends in .xwd", narrowName );
} }
#endif #endif
@ -560,7 +545,6 @@ checkIfDictAndLegal( MPFORMAL wchar_t* path, XP_U16 pathLen,
XP_U8* ptr = base; XP_U8* ptr = base;
flags = n_ptr_tohs( &ptr ); flags = n_ptr_tohs( &ptr );
XP_LOGF( "checkIfDictAndLegal: flags=0x%x", flags );
closeMappedFile( MPPARM(mpool) base, mappedFile ); closeMappedFile( MPPARM(mpool) base, mappedFile );
#ifdef NODE_CAN_4 #ifdef NODE_CAN_4
/* are the flags what we expect */ /* are the flags what we expect */

View file

@ -177,8 +177,6 @@ loadFromGameInfo( HWND hDlg, CEAppGlobals* globals, GameInfoState* giState )
#ifndef STUBBED_DICT #ifndef STUBBED_DICT
if ( !!gi->dictName ) { if ( !!gi->dictName ) {
XP_LOGF( "%s: copying %s to giState->newDictName",
__func__, gi->dictName );
XP_MEMCPY( giState->newDictName, gi->dictName, XP_MEMCPY( giState->newDictName, gi->dictName,
(XP_U16)XP_STRLEN(gi->dictName)+1 ); (XP_U16)XP_STRLEN(gi->dictName)+1 );
} }
@ -423,8 +421,6 @@ ceSetAttrProc(void* closure, NewGameAttr attr, const NGValue value )
GameInfoState* giState = (GameInfoState*)closure; GameInfoState* giState = (GameInfoState*)closure;
XP_U16 resID = resIDForAttr( attr ); XP_U16 resID = resIDForAttr( attr );
LOG_FUNC();
switch ( attr ) { switch ( attr ) {
case NG_ATTR_NPLAYERS: case NG_ATTR_NPLAYERS:
SendDlgItemMessage( giState->hDlg, resID, SETCURSEL, SendDlgItemMessage( giState->hDlg, resID, SETCURSEL,

View file

@ -790,7 +790,6 @@ ceSavePrefs( CEAppGlobals* globals )
/* write prefs, including version num */ /* write prefs, including version num */
WriteFile( fileH, &globals->appPrefs, sizeof(globals->appPrefs), WriteFile( fileH, &globals->appPrefs, sizeof(globals->appPrefs),
&nWritten, NULL ); &nWritten, NULL );
XP_DEBUGF( "sizeof(appPrefs) => %d", sizeof( globals->appPrefs ) );
WriteFile( fileH, &nameLen, sizeof(nameLen), &nWritten, NULL ); WriteFile( fileH, &nameLen, sizeof(nameLen), &nWritten, NULL );
WriteFile( fileH, name, nameLen, &nWritten, NULL ); WriteFile( fileH, name, nameLen, &nWritten, NULL );
@ -1776,10 +1775,8 @@ handleScroll( CEAppGlobals* globals, XP_S16 pos, /* only valid for THUMB* */
} }
if ( newOffset >= 0 && newOffset <= globals->nHiddenRows ) { if ( newOffset >= 0 && newOffset <= globals->nHiddenRows ) {
result = curYOffset != newOffset; result = curYOffset != newOffset
if ( result ) { && board_setYOffset( globals->game.board, newOffset );
result = board_setYOffset( globals->game.board, newOffset );
}
} }
} }
return result; return result;