mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
cleanup: make module-local functions static
This commit is contained in:
parent
8faf6a670c
commit
e92234b324
8 changed files with 11 additions and 35 deletions
|
@ -66,6 +66,8 @@ static void boardGameOver( void* board );
|
||||||
static void setArrow( BoardCtxt* board, XP_U16 row, XP_U16 col );
|
static void setArrow( BoardCtxt* board, XP_U16 row, XP_U16 col );
|
||||||
static void setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col,
|
static void setArrowFor( BoardCtxt* board, XP_U16 player, XP_U16 col,
|
||||||
XP_U16 row );
|
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_S16 figureScorePlayerTapped( BoardCtxt* board, XP_U16 x, XP_U16 y );
|
||||||
static XP_Bool cellOccupied( BoardCtxt* board, XP_U16 col, XP_U16 row,
|
static XP_Bool cellOccupied( BoardCtxt* board, XP_U16 col, XP_U16 row,
|
||||||
XP_Bool inclPending );
|
XP_Bool inclPending );
|
||||||
|
@ -2960,7 +2962,7 @@ getArrow( BoardCtxt* board, XP_U16* col, XP_U16* row )
|
||||||
return getArrowFor( board, board->selPlayer, col, row );
|
return getArrowFor( board, board->selPlayer, col, row );
|
||||||
} /* getArrow */
|
} /* getArrow */
|
||||||
|
|
||||||
XP_Bool
|
static XP_Bool
|
||||||
setArrowVisible( BoardCtxt* board, XP_Bool visible )
|
setArrowVisible( BoardCtxt* board, XP_Bool visible )
|
||||||
{
|
{
|
||||||
return setArrowVisibleFor( board, board->selPlayer, visible );
|
return setArrowVisibleFor( board, board->selPlayer, visible );
|
||||||
|
|
|
@ -190,7 +190,6 @@ XP_Bool rectContainsPt( XP_Rect* rect1, XP_S16 x, XP_S16 y );
|
||||||
XP_Bool checkRevealTray( BoardCtxt* board );
|
XP_Bool checkRevealTray( BoardCtxt* board );
|
||||||
void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect );
|
void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect );
|
||||||
XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 );
|
XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 );
|
||||||
XP_Bool setArrowVisible( BoardCtxt* board, XP_Bool visible );
|
|
||||||
|
|
||||||
#ifdef KEYBOARD_NAV
|
#ifdef KEYBOARD_NAV
|
||||||
XP_Bool tray_moveCursor( BoardCtxt* board, XP_Key cursorKey );
|
XP_Bool tray_moveCursor( BoardCtxt* board, XP_Key cursorKey );
|
||||||
|
|
|
@ -418,27 +418,13 @@ comms_writeToStream( CommsCtxt* comms, XWStreamCtxt* stream )
|
||||||
#endif
|
#endif
|
||||||
} /* comms_writeToStream */
|
} /* comms_writeToStream */
|
||||||
|
|
||||||
void
|
static void
|
||||||
comms_getAddr( CommsCtxt* comms, CommsAddrRec* addr )
|
comms_getAddr( CommsCtxt* comms, CommsAddrRec* addr )
|
||||||
{
|
{
|
||||||
XP_ASSERT( !!comms );
|
XP_ASSERT( !!comms );
|
||||||
XP_MEMCPY( addr, &comms->addr, sizeof(*addr) );
|
XP_MEMCPY( addr, &comms->addr, sizeof(*addr) );
|
||||||
} /* comms_getAddr */
|
} /* 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
|
void
|
||||||
comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr )
|
comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr )
|
||||||
{
|
{
|
||||||
|
@ -451,7 +437,7 @@ comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr )
|
||||||
relayConnect( comms );
|
relayConnect( comms );
|
||||||
} /* comms_setAddr */
|
} /* comms_setAddr */
|
||||||
|
|
||||||
CommsConnType
|
static CommsConnType
|
||||||
comms_getConType( CommsCtxt* comms )
|
comms_getConType( CommsCtxt* comms )
|
||||||
{
|
{
|
||||||
return comms->addr.conType;
|
return comms->addr.conType;
|
||||||
|
|
|
@ -81,14 +81,12 @@ void comms_reset( CommsCtxt* comms, XP_Bool isServer );
|
||||||
void comms_destroy( CommsCtxt* comms );
|
void comms_destroy( CommsCtxt* comms );
|
||||||
|
|
||||||
void comms_setConnID( CommsCtxt* comms, XP_U32 connID );
|
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 */
|
/* "static" method provides default when no comms present */
|
||||||
void comms_getInitialAddr( CommsAddrRec* addr );
|
void comms_getInitialAddr( CommsAddrRec* addr );
|
||||||
void comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr );
|
void comms_setAddr( CommsCtxt* comms, CommsAddrRec* addr );
|
||||||
|
|
||||||
CommsConnType comms_getConType( CommsCtxt* comms );
|
|
||||||
|
|
||||||
CommsCtxt* comms_makeFromStream( MPFORMAL XWStreamCtxt* stream,
|
CommsCtxt* comms_makeFromStream( MPFORMAL XWStreamCtxt* stream,
|
||||||
XW_UtilCtxt* util, TransportSend sendproc,
|
XW_UtilCtxt* util, TransportSend sendproc,
|
||||||
void* closure );
|
void* closure );
|
||||||
|
|
|
@ -50,11 +50,13 @@ setBlankTile( DictionaryCtxt* dctx )
|
||||||
}
|
}
|
||||||
} /* setBlankTile */
|
} /* setBlankTile */
|
||||||
|
|
||||||
|
#if defined BLANKS_FIRST || defined DEBUG
|
||||||
XP_Bool
|
XP_Bool
|
||||||
dict_hasBlankTile( DictionaryCtxt* dict )
|
dict_hasBlankTile( DictionaryCtxt* dict )
|
||||||
{
|
{
|
||||||
return dict->blankTile >= 0;
|
return dict->blankTile >= 0;
|
||||||
} /* dict_hasBlankTile */
|
} /* dict_hasBlankTile */
|
||||||
|
#endif
|
||||||
|
|
||||||
Tile
|
Tile
|
||||||
dict_getBlankTile( DictionaryCtxt* dict )
|
dict_getBlankTile( DictionaryCtxt* dict )
|
||||||
|
|
|
@ -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,
|
static void palm_util_setTimer( XW_UtilCtxt* uc, XWTimerReason why, XP_U16 when,
|
||||||
TimerProc proc, void* closure );
|
TimerProc proc, void* closure );
|
||||||
static XP_U32 palm_util_getCurSeconds( XW_UtilCtxt* uc );
|
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 );
|
static DictionaryCtxt* palm_util_makeEmptyDict( XW_UtilCtxt* uc );
|
||||||
|
|
||||||
#ifndef XWFEATURE_STANDALONE_ONLY
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||||
static XWStreamCtxt* palm_util_makeStreamFromAddr( XW_UtilCtxt* uc,
|
static XWStreamCtxt* palm_util_makeStreamFromAddr( XW_UtilCtxt* uc,
|
||||||
XP_U16 channelNo );
|
XP_U16 channelNo );
|
||||||
|
@ -3405,7 +3407,7 @@ palm_util_setTimer( XW_UtilCtxt* uc, XWTimerReason why, XP_U16 when,
|
||||||
}
|
}
|
||||||
} /* palm_util_setTimer */
|
} /* palm_util_setTimer */
|
||||||
|
|
||||||
void
|
static void
|
||||||
palm_util_requestTime( XW_UtilCtxt* uc )
|
palm_util_requestTime( XW_UtilCtxt* uc )
|
||||||
{
|
{
|
||||||
PalmAppGlobals* globals = (PalmAppGlobals*)uc->closure;
|
PalmAppGlobals* globals = (PalmAppGlobals*)uc->closure;
|
||||||
|
|
|
@ -364,7 +364,6 @@ Boolean palmaskFromStrId( PalmAppGlobals* globals, XP_U16 strId,
|
||||||
XP_S16 titleID );
|
XP_S16 titleID );
|
||||||
void freeSavedGamesData( MPFORMAL SavedGamesState* state );
|
void freeSavedGamesData( MPFORMAL SavedGamesState* state );
|
||||||
|
|
||||||
void palm_util_requestTime( XW_UtilCtxt* uc ); /* so palmir can call */
|
|
||||||
void writeNameToGameRecord( PalmAppGlobals* globals, XP_S16 index,
|
void writeNameToGameRecord( PalmAppGlobals* globals, XP_S16 index,
|
||||||
char* newName, XP_U16 len );
|
char* newName, XP_U16 len );
|
||||||
|
|
||||||
|
|
|
@ -114,18 +114,6 @@ disOrEnable( FormPtr form, UInt16 id, Boolean enable )
|
||||||
}
|
}
|
||||||
} /* disOrEnable */
|
} /* 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.
|
/* Position a control at the horizontal center of its container.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Reference in a new issue