From 5122a003b69dcfdd08e1bc0b527a9db5fdb1e0a9 Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 8 Nov 2004 14:44:52 +0000 Subject: [PATCH] wrap launch-68K option in compile-time flag off by default --- palm/Makefile | 3 +++ palm/enter68k.c | 2 ++ palm/palmdict.c | 4 ++++ palm/palmmain.c | 2 +- palm/palmmain.h | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/palm/Makefile b/palm/Makefile index a7a361225..544c8737c 100644 --- a/palm/Makefile +++ b/palm/Makefile @@ -93,6 +93,9 @@ MYDEFS_68K = -DPLATFORM_PALM -D__BIG_ENDIAN $(MYDEFS_COMMON) -DAPPNAME=\"$(APPNA ifneq (x$(BUILD_AS_PNOLET)x, xx) # comment out for ARM-only build FEATURE_PNOAND68K = -DFEATURE_PNOAND68K +# Turn this on for a menu that lets you relaunch as 68K or ARM. Good +# for testing but not the way to ship to users +# FEATURE_PNOAND68K += -DFEATURE_DUALCHOOSE endif diff --git a/palm/enter68k.c b/palm/enter68k.c index 61bf3c451..8c202b437 100644 --- a/palm/enter68k.c +++ b/palm/enter68k.c @@ -180,12 +180,14 @@ shouldRunPnolet() if ( ( err == errNone ) && sysFtrNumProcessorIsARM( value ) ) { runArm = true; } +#ifdef FEATURE_DUALCHOOSE if ( runArm ) { err = FtrGet( APPID, FEATURE_WANTS_68K, &value ); if ( (err == errNone) && (value == WANTS_68K) ) { runArm = false; } } +#endif return runArm; } /* shouldRunPnolet */ diff --git a/palm/palmdict.c b/palm/palmdict.c index 565b76405..5b3cf6784 100644 --- a/palm/palmdict.c +++ b/palm/palmdict.c @@ -395,15 +395,19 @@ palm_dictionary_destroy( DictionaryCtxt* dict ) XP_FREE( dict->mpool, ctxt->super.faces16 ); +#ifdef XWFEATURE_COMBINEDAWG /* Try first to delete the feature. */ if ( FtrPtrFree( APPID, DAWG_STORE_FEATURE ) == ftrErrNoSuchFeature ) { +#endif for ( i = 0; i < ctxt->nRecords; ++i ) { XP_ASSERT( !!ctxt->dictStarts[i].array ); MemPtrUnlock( ctxt->dictStarts[i].array ); } +#ifdef XWFEATURE_COMBINEDAWG } else { XP_ASSERT( ctxt->dictStarts[0].array == NULL ); } +#endif MemPtrUnlock( headerRecP ); diff --git a/palm/palmmain.c b/palm/palmmain.c index 31874d313..eed9d464e 100644 --- a/palm/palmmain.c +++ b/palm/palmmain.c @@ -2313,7 +2313,7 @@ mainViewHandleEvent( EventPtr event ) beamBoard( globals ); break; -#ifdef FEATURE_PNOAND68K +#ifdef FEATURE_DUALCHOOSE /* This probably goes away at ship.... */ case XW_RUN68K_PULLDOWN_ID: case XW_RUNARM_PULLDOWN_ID: { diff --git a/palm/palmmain.h b/palm/palmmain.h index cd083d422..156797e7e 100644 --- a/palm/palmmain.h +++ b/palm/palmmain.h @@ -331,9 +331,13 @@ enum { dictSelectedEvent = firstUserEvent /* 0x6000 */ enum { PNOLET_STORE_FEATURE = 1 /* where FtrPtr to pnolet code lives */ , GLOBALS_FEATURE /* for passing globals to form handlers */ +#ifdef FEATURE_DUALCHOOSE , FEATURE_WANTS_68K /* support for (pre-ship) ability to choose armlet or 68K */ +#endif +#ifdef XWFEATURE_COMBINEDAWG , DAWG_STORE_FEATURE +#endif }; enum { WANTS_68K, WANTS_ARM };