diff --git a/xwords4/common/board.c b/xwords4/common/board.c index 113b79a24..d3543d7c3 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -66,6 +66,8 @@ static void boardGameOver( void* board ); static void setArrow( BoardCtxt* board, XP_U16 row, XP_U16 col ); static void setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col, XP_U16 row ); +static XP_Bool setArrowVisible( BoardCtxt* board, XP_Bool visible ); + static XP_S16 figureScorePlayerTapped( BoardCtxt* board, XP_U16 x, XP_U16 y ); static XP_Bool cellOccupied( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool inclPending ); @@ -2960,7 +2962,7 @@ getArrow( BoardCtxt* board, XP_U16* col, XP_U16* row ) return getArrowFor( board, board->selPlayer, col, row ); } /* getArrow */ -XP_Bool +static XP_Bool setArrowVisible( BoardCtxt* board, XP_Bool visible ) { return setArrowVisibleFor( board, board->selPlayer, visible ); diff --git a/xwords4/common/boardp.h b/xwords4/common/boardp.h index fe6e4f34c..7ab868852 100644 --- a/xwords4/common/boardp.h +++ b/xwords4/common/boardp.h @@ -190,7 +190,6 @@ XP_Bool rectContainsPt( XP_Rect* rect1, XP_S16 x, XP_S16 y ); XP_Bool checkRevealTray( BoardCtxt* board ); void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect ); XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 ); -XP_Bool setArrowVisible( BoardCtxt* board, XP_Bool visible ); #ifdef KEYBOARD_NAV XP_Bool tray_moveCursor( BoardCtxt* board, XP_Key cursorKey ); diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index ec38f7e77..0b08f0e48 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -418,27 +418,13 @@ comms_writeToStream( CommsCtxt* comms, XWStreamCtxt* stream ) #endif } /* comms_writeToStream */ -void +static void comms_getAddr( CommsCtxt* comms, CommsAddrRec* addr ) { XP_ASSERT( !!comms ); XP_MEMCPY( addr, &comms->addr, sizeof(*addr) ); } /* comms_getAddr */ -void -comms_getInitialAddr( CommsAddrRec* addr ) -{ - /* default values; default is still IR where there's a choice */ - addr->conType = COMMS_CONN_RELAY; - addr->u.ip_relay.ipAddr = 0L; /* force 'em to set it */ - addr->u.ip_relay.port = 10999; - { - char* name = "eehouse.org"; - XP_MEMCPY( addr->u.ip_relay.hostName, name, XP_STRLEN(name)+1 ); - } - addr->u.ip_relay.cookie[0] = '\0'; -} - void comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr ) { @@ -451,7 +437,7 @@ comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr ) relayConnect( comms ); } /* comms_setAddr */ -CommsConnType +static CommsConnType comms_getConType( CommsCtxt* comms ) { return comms->addr.conType; diff --git a/xwords4/common/comms.h b/xwords4/common/comms.h index 378dbc2a7..82fb12161 100644 --- a/xwords4/common/comms.h +++ b/xwords4/common/comms.h @@ -81,14 +81,12 @@ void comms_reset( CommsCtxt* comms, XP_Bool isServer ); void comms_destroy( CommsCtxt* comms ); void comms_setConnID( CommsCtxt* comms, XP_U32 connID ); +void comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr ); -void comms_getAddr( CommsCtxt* comms, CommsAddrRec* addr ); /* "static" method provides default when no comms present */ void comms_getInitialAddr( CommsAddrRec* addr ); void comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr ); -CommsConnType comms_getConType( CommsCtxt* comms ); - CommsCtxt* comms_makeFromStream( MPFORMAL XWStreamCtxt* stream, XW_UtilCtxt* util, TransportSend sendproc, void* closure ); diff --git a/xwords4/common/dictnry.c b/xwords4/common/dictnry.c index b7d93043a..3b29a22b3 100644 --- a/xwords4/common/dictnry.c +++ b/xwords4/common/dictnry.c @@ -50,11 +50,13 @@ setBlankTile( DictionaryCtxt* dctx ) } } /* setBlankTile */ +#if defined BLANKS_FIRST || defined DEBUG XP_Bool dict_hasBlankTile( DictionaryCtxt* dict ) { return dict->blankTile >= 0; } /* dict_hasBlankTile */ +#endif Tile dict_getBlankTile( DictionaryCtxt* dict ) diff --git a/xwords4/palm/palmmain.c b/xwords4/palm/palmmain.c index 94a4067ba..0e4a41308 100644 --- a/xwords4/palm/palmmain.c +++ b/xwords4/palm/palmmain.c @@ -144,7 +144,9 @@ static XP_Bool palm_util_engineProgressCallback( XW_UtilCtxt* uc ); static void palm_util_setTimer( XW_UtilCtxt* uc, XWTimerReason why, XP_U16 when, TimerProc proc, void* closure ); static XP_U32 palm_util_getCurSeconds( XW_UtilCtxt* uc ); +static void palm_util_requestTime( XW_UtilCtxt* uc ); static DictionaryCtxt* palm_util_makeEmptyDict( XW_UtilCtxt* uc ); + #ifndef XWFEATURE_STANDALONE_ONLY static XWStreamCtxt* palm_util_makeStreamFromAddr( XW_UtilCtxt* uc, XP_U16 channelNo ); @@ -3405,7 +3407,7 @@ palm_util_setTimer( XW_UtilCtxt* uc, XWTimerReason why, XP_U16 when, } } /* palm_util_setTimer */ -void +static void palm_util_requestTime( XW_UtilCtxt* uc ) { PalmAppGlobals* globals = (PalmAppGlobals*)uc->closure; diff --git a/xwords4/palm/palmmain.h b/xwords4/palm/palmmain.h index 617b59452..4004b269e 100644 --- a/xwords4/palm/palmmain.h +++ b/xwords4/palm/palmmain.h @@ -364,7 +364,6 @@ Boolean palmaskFromStrId( PalmAppGlobals* globals, XP_U16 strId, XP_S16 titleID ); void freeSavedGamesData( MPFORMAL SavedGamesState* state ); -void palm_util_requestTime( XW_UtilCtxt* uc ); /* so palmir can call */ void writeNameToGameRecord( PalmAppGlobals* globals, XP_S16 index, char* newName, XP_U16 len ); diff --git a/xwords4/palm/palmutil.c b/xwords4/palm/palmutil.c index ca6a6dce8..fafb53d33 100644 --- a/xwords4/palm/palmutil.c +++ b/xwords4/palm/palmutil.c @@ -114,18 +114,6 @@ disOrEnable( FormPtr form, UInt16 id, Boolean enable ) } } /* disOrEnable */ -void -disOrEnableSet( FormPtr form, const UInt16* ids, Boolean enable ) -{ - for ( ; ; ) { - XP_U16 id = *ids++; - if ( !id ) { - break; - } - disOrEnable( form, id, enable ); - } -} /* disOrEnableSet */ - /* Position a control at the horizontal center of its container. */ void