cleanup: make module-local functions static

This commit is contained in:
ehouse 2005-06-25 05:43:56 +00:00
parent 8faf6a670c
commit e92234b324
8 changed files with 11 additions and 35 deletions

View file

@ -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 );

View file

@ -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 );

View file

@ -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;

View file

@ -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 );

View file

@ -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 )

View file

@ -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;

View file

@ -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 );

View file

@ -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