From d6c3dcf29ce178b71d7d3a51cef5259e3482545a Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 25 Feb 2005 03:36:25 +0000 Subject: [PATCH] hack around string concat issues. to be fixed later --- symbian/src/symdict.cpp | 49 ++++++++++++++++++++++++++++++++++++--- symbian/src/xwappview.cpp | 4 ++++ 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/symbian/src/symdict.cpp b/symbian/src/symdict.cpp index 8e9ab1ceb..1ceb5bf1b 100644 --- a/symbian/src/symdict.cpp +++ b/symbian/src/symdict.cpp @@ -20,6 +20,7 @@ extern "C" { #include "dictnryp.h" #include "mempool.h" +#include "xptypes.h" } #include @@ -78,6 +79,35 @@ symCountSpecials( SymDictCtxt* ctxt ) return result; } /* symCountSpecials */ +#ifdef DEBUG +static void +printBitmap( CFbsBitmap* bmp ) +{ + TSize bmpSize = bmp->SizeInPixels(); + TBitmapUtil butil( bmp ); + butil.Begin( TPoint(0,0) ); + TInt row, col; + + for ( row = 0; row < bmpSize.iHeight; ++row ) { + char buf[64]; + for ( col = 0; col < bmpSize.iWidth; ++col ) { + butil.SetPos( TPoint(col, row) ); + if ( butil.GetPixel() ) { + buf[col] = '*'; + } else { + buf[col] = '_'; + } + } + buf[col] = '\0'; + XP_LOGF( "row %d: %s", row, buf ); + } + + butil.End(); +} +#else +#define printBitmap(b) +#endif + static XP_Bitmap* symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file ) { @@ -89,7 +119,6 @@ symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file ) XP_U8 nRows = readXP_U8( file ); XP_U8 srcByte = 0; - XP_U8 destByte = 0; XP_U8 nBits; XP_U16 i; bitmap = new (ELeave) CFbsBitmap(); @@ -120,6 +149,8 @@ symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file ) } } butil.End(); + + printBitmap( bitmap ); } return (XP_Bitmap*)bitmap; @@ -192,10 +223,22 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName ) return &ctxt->super; } else { -#if defined __WINS__ +#ifdef XWORDS_DIR +# if defined __WINS__ _LIT( dir,"z:\\system\\apps\\" XWORDS_DIR "\\" ); -#elif defined __MARM__ +# elif defined __MARM__ _LIT( dir,"c:\\system\\apps\\" XWORDS_DIR "\\" ); +# endif +#else + /* Symbian's broken compiler won't let me concatenate XWORDS_DIR with + strings nor pass it in defined, so hack here. If you're using the + broken ABLD.BAT system, you get to deal with it. :-) */ +# if defined __WINS__ + _LIT( dir,"z:\\system\\apps\\xwords_80\\" ); +# elif defined __MARM__ + _LIT( dir,"c:\\system\\apps\\XWORDS_80\\" ); +# endif + #endif TFileName nameD; /* need the full path to name in this */ nameD.Copy( dir ); diff --git a/symbian/src/xwappview.cpp b/symbian/src/xwappview.cpp index e43595bde..2ad90c430 100644 --- a/symbian/src/xwappview.cpp +++ b/symbian/src/xwappview.cpp @@ -919,7 +919,11 @@ CXWordsAppView::GetXwordsRWDir( TFileName* aPathRef, TDriveReason aWhy ) break; /* don't want a drive */ } +#ifdef XWORDS_DIR _LIT( dir,"\\system\\apps\\" XWORDS_DIR "\\" ); +#else + _LIT( dir,"\\system\\apps\\xwords_80\\" ); +#endif aPathRef->Append( dir ); } /* GetXwordsRWDir */