diff --git a/xwords4/common/mempool.c b/xwords4/common/mempool.c index b442a0ffb..4bbdb8f9a 100644 --- a/xwords4/common/mempool.c +++ b/xwords4/common/mempool.c @@ -47,7 +47,7 @@ struct MemPoolCtx { /*--------------------------------------------------------------------------*/ MemPoolCtx* -mpool_make() +mpool_make( void ) { MemPoolCtx* result = (MemPoolCtx*)XP_PLATMALLOC( sizeof(*result) ); XP_MEMSET( result, 0, sizeof(*result) ); diff --git a/xwords4/common/mempool.h b/xwords4/common/mempool.h index 4565dfac3..d34c39771 100644 --- a/xwords4/common/mempool.h +++ b/xwords4/common/mempool.h @@ -30,7 +30,7 @@ extern "C" { typedef struct MemPoolCtx MemPoolCtx; -MemPoolCtx* mpool_make(); +MemPoolCtx* mpool_make(void); void mpool_destroy( MemPoolCtx* mpool ); void* mpool_alloc( MemPoolCtx* mpool, XP_U32 size, diff --git a/xwords4/palm/Makefile b/xwords4/palm/Makefile index 5cd53802a..6b6369d79 100644 --- a/xwords4/palm/Makefile +++ b/xwords4/palm/Makefile @@ -100,10 +100,6 @@ OBJ-RES = m68k-palmos-obj-res MULTILINK_OPTIONS = -basename $(ROOTNAME) -segmentsize 27k -g \ -deadstrip -verbose -gdb-script app.gdb -ifneq (x$(OWNERNAME)x,xx) -HASHDEF = -DOWNER_HASH=$$(./namehash $(OWNERNAME)) -endif - MYDEFS_COMMON = $(PASSTHRU) -DXW_FEATURE_UTILS -DPOINTER_SUPPORT \ -DKEY_SUPPORT -DOVERRIDE_EDGE_FOR_INDEX -DCOLOR_SUPPORT \ -DSHOW_PROGRESS $(HASHDEF) -DNO_REG_REQUIRED -DPERIMETER_FOCUS @@ -302,8 +298,6 @@ LocalizedStrIncludes.h StrL03e8.bin: \ ./mkstrsres StrL03e8.bin LocalizedStrIncludes.h rm -f mkstrsres -namehash: namehash.c ownerhash.h - ifneq (x$(BUILD_AS_PNOLET)x, xx) .PHONY : pnolet diff --git a/xwords4/palm/gameutil.c b/xwords4/palm/gameutil.c index 51411f8e3..cede9b72c 100644 --- a/xwords4/palm/gameutil.c +++ b/xwords4/palm/gameutil.c @@ -42,7 +42,6 @@ countGameRecords( PalmAppGlobals* globals ) return numRecs; } -#if defined OWNER_HASH || defined NO_REG_REQUIRED void deleteGameRecord( PalmAppGlobals* globals, XP_S16 index ) { @@ -82,7 +81,6 @@ duplicateGameRecord( PalmAppGlobals* globals, XP_S16 fromIndex ) return newIndex; } /* duplicateGameRecord */ -#endif void streamToGameRecord( PalmAppGlobals* globals, XWStreamCtxt* stream, diff --git a/xwords4/palm/l10n/StrRes_en_US.pre b/xwords4/palm/l10n/StrRes_en_US.pre index 89529901d..800a3c307 100644 --- a/xwords4/palm/l10n/StrRes_en_US.pre +++ b/xwords4/palm/l10n/StrRes_en_US.pre @@ -54,10 +54,6 @@ "turn trading tiles?" }, { "STR_TRADING_REMINDER", "Click D when done." }, -#ifndef NO_REG_REQUIRED -{ "STR_NOT_UNREG_VERS", "Feature not available in unregistered version." }, -#endif - { "STR_LOCAL_NAME", "%s" }, { "STR_NONLOCAL_NAME", "%s (remote)" }, { "STRSD_SUMMARYSCORED", "%s:%d" }, diff --git a/xwords4/palm/l10n/StrRes_fr_FR.pre b/xwords4/palm/l10n/StrRes_fr_FR.pre index 77fa107a0..70c9aa9d0 100644 --- a/xwords4/palm/l10n/StrRes_fr_FR.pre +++ b/xwords4/palm/l10n/StrRes_fr_FR.pre @@ -57,10 +57,6 @@ "vos lettres ?" }, { "STR_TRADING_REMINDER", "Cliquez D une fois fini." }, -#ifndef NO_REG_REQUIRED -{ "STR_NOT_UNREG_VERS", "Disposition non disponible dans la version non enregistrée." }, -#endif - { "STR_LOCAL_NAME", "%s" }, { "STR_NONLOCAL_NAME", "%s (remote)" }, { "STRSD_SUMMARYSCORED", "%s:%d" }, diff --git a/xwords4/palm/ownerhash.h b/xwords4/palm/ownerhash.h deleted file mode 100644 index 3baddfb73..000000000 --- a/xwords4/palm/ownerhash.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */ -/* - * Copyright 1999 - 2002 by Eric House (xwords@eehouse.org). All rights reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef _OWNERHASH_H_ -#ifndef NO_REG_REQUIRED -static unsigned long -my_hash( unsigned char* str ) { - unsigned char ch; - unsigned long result = 0; - while ( ( ch = *str++ ) != '\0' ) { - result += result << 2 ^ ~ch; - } - return result; -} /* my_hash */ - -#define HASH(s) my_hash(s) -#endif -#endif diff --git a/xwords4/palm/pace_man.h b/xwords4/palm/pace_man.h index 1e99d695a..b182fe4f8 100644 --- a/xwords4/palm/pace_man.h +++ b/xwords4/palm/pace_man.h @@ -123,7 +123,7 @@ void flipBtSocketListenInfoArm268K( unsigned char* out, # define SWAP_BTLIBSOCKETLISTENINFOTYPE_68K_TO_ARM( out, in ) /* nothing for now */ #endif /* XWFEATURE_BLUETOOTH */ -PNOState* getStorageLoc(); +PNOState* getStorageLoc(void); #define GET_CALLBACK_STATE() getStorageLoc() #define crash() *(int*)1L = 1 diff --git a/xwords4/palm/palmmain.c b/xwords4/palm/palmmain.c index 711a01a0e..4e513a5a5 100644 --- a/xwords4/palm/palmmain.c +++ b/xwords4/palm/palmmain.c @@ -1192,7 +1192,7 @@ startApplication( PalmAppGlobals** globalsP ) /* if we're here because dict missing, don't re-init all prefs! */ if ( !prefsFound ) { palmInitPrefs( globals ); - } else if ( checkUserName() ) { + } else { /* increment count so we get a new game rather than replace existing one. We want it still there if somebody puts the missing dict back. */ @@ -1328,13 +1328,11 @@ stopApplication( PalmAppGlobals* globals ) XP_FREE( globals->mpool, globals->prefsDlgState ); } -#if defined OWNER_HASH || defined NO_REG_REQUIRED if ( !!globals->savedGamesState && !globals->isFirstLaunch ) { freeSavedGamesData( MPPARM(globals->mpool) globals->savedGamesState ); XP_FREE( globals->mpool, globals->savedGamesState ); } -#endif uninitHighResGlobals( globals ); @@ -1504,11 +1502,9 @@ applicationHandleEvent( EventPtr event ) handler = ConnsFormHandleEvent; break; #endif -#if defined OWNER_HASH || defined NO_REG_REQUIRED case XW_SAVEDGAMES_DIALOG_ID: handler = savedGamesHandleEvent; break; -#endif } if ( !!handler ) { XP_ASSERT( !!frm ); @@ -2681,20 +2677,11 @@ mainViewHandleEvent( EventPtr event ) break; case XW_SAVEDGAMES_PULLDOWN_ID: - if ( 0 ) { -#if defined OWNER_HASH || defined NO_REG_REQUIRED - } else if ( checkUserName() ) { - saveOpenGame( globals );/* so it can be accurately duped */ - /* save game changes state; reflect on screen before - popping up dialog */ - drawChangedBoard( globals ); - FrmPopupForm( XW_SAVEDGAMES_DIALOG_ID ); -#endif -#ifndef NO_REG_REQUIRED - } else { - userErrorFromStrId( globals, STR_NOT_UNREG_VERS ); -#endif - } + saveOpenGame( globals );/* so it can be accurately duped */ + /* save game changes state; reflect on screen before + popping up dialog */ + drawChangedBoard( globals ); + FrmPopupForm( XW_SAVEDGAMES_DIALOG_ID ); break; case XW_FINISH_PULLDOWN_ID: @@ -2968,14 +2955,12 @@ askStartNewGame( PalmAppGlobals* globals ) /* do nothing; popping up the NEWGAMES dlg will do it -- if not cancelled */ globals->newGameIsNew = XP_FALSE; - } else if ( checkUserName() ) { + } else { saveOpenGame( globals ); drawChangedBoard( globals ); globals->newGameIsNew = XP_TRUE; - } else { - return; } globals->isNewGame = true; globals->isFirstLaunch = false; diff --git a/xwords4/palm/palmmain.h b/xwords4/palm/palmmain.h index 81dd90af7..99aa1d855 100644 --- a/xwords4/palm/palmmain.h +++ b/xwords4/palm/palmmain.h @@ -233,9 +233,7 @@ typedef enum { struct PalmAppGlobals { FormPtr mainForm; PrefsDlgState* prefsDlgState; -#if defined OWNER_HASH || defined NO_REG_REQUIRED SavedGamesState* savedGamesState; -#endif XWGame game; DrawCtx* draw; XW_UtilCtxt util; diff --git a/xwords4/palm/palmsavg.c b/xwords4/palm/palmsavg.c index 800330c84..ae840114a 100644 --- a/xwords4/palm/palmsavg.c +++ b/xwords4/palm/palmsavg.c @@ -19,8 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ****************************************************************************/ -#if defined OWNER_HASH || defined NO_REG_REQUIRED - #include #include #include @@ -31,7 +29,6 @@ #include "palmmain.h" #include "palmutil.h" #include "gameutil.h" -#include "ownerhash.h" #include "xwords4defines.h" #include "LocalizedStrIncludes.h" @@ -41,29 +38,6 @@ static void populateGameList( SavedGamesState* state ); static void setFieldToSelText( SavedGamesState* state ); static void listDrawFunc(Int16 index, RectanglePtr bounds, char** itemsText); -#ifndef NO_REG_REQUIRED -Boolean -checkUserName() -{ -#ifdef FOR_GREMLINS - return true; -#else - XP_UCHAR ownerName[dlkMaxUserNameLength + 1]; - Boolean result; - Err err; - - ownerName[0] = '\0'; - /* Try and use the user's name */ - err = DlkGetSyncInfo( NULL, NULL, NULL, ownerName, NULL, NULL ); - XP_ASSERT( err == 0 ); - - result = HASH(ownerName)==((unsigned long)OWNER_HASH); - - return result; -#endif -} /* checkUserName */ -#endif - /***************************************************************************** * Handler for dictionary info form. ****************************************************************************/ @@ -286,5 +260,3 @@ listDrawFunc( Int16 index, RectanglePtr bounds, char** itemsText ) CALLBACK_EPILOGUE(); } /* listDrawFunc */ - -#endif /* OWNER_HASH */ diff --git a/xwords4/palm/palmsavg.h b/xwords4/palm/palmsavg.h index 20a15bbbe..06a5db645 100644 --- a/xwords4/palm/palmsavg.h +++ b/xwords4/palm/palmsavg.h @@ -28,12 +28,4 @@ typedef struct OpenSavedGameData { Boolean savedGamesHandleEvent( EventPtr event ); -#if defined NO_REG_REQUIRED -# define checkUserName() XP_TRUE -#elif defined OWNER_HASH - Boolean checkUserName(); -#else -# define checkUserName() XP_FALSE -#endif - #endif diff --git a/xwords4/palm/palmutil.h b/xwords4/palm/palmutil.h index 3e9367df0..ef7e816ad 100644 --- a/xwords4/palm/palmutil.h +++ b/xwords4/palm/palmutil.h @@ -87,7 +87,7 @@ XP_Bool tryRockerKey( XP_U16 key, XP_U16 selGadget, # endif void setFormRefcon( void* refcon ); -void* getFormRefcon(); +void* getFormRefcon(void); void fitButtonToString( XP_U16 id ); diff --git a/xwords4/palm/pnolet.c b/xwords4/palm/pnolet.c index 766cee2d3..f8349fd07 100644 --- a/xwords4/palm/pnolet.c +++ b/xwords4/palm/pnolet.c @@ -144,10 +144,10 @@ realArmletEntryPoint( const void *emulStateP, asm( "mov r10, %0" : : "r" (oldR10) ); return result; -} +} /* realArmletEntryPoint( */ PNOState* -getStorageLoc() +getStorageLoc( void ) { asm( "adr r0,data" ); asm( "mov pc,lr" );