mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
use clang instead of gcc for ndk builds
And make changes to C code to fix resulting warning. The .so file basically works but is not thoroughly tested.
This commit is contained in:
parent
a6992c373f
commit
1a830fbff2
9 changed files with 15 additions and 14 deletions
|
@ -104,13 +104,13 @@ andCountSpecials( AndDictionaryCtxt* ctxt )
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
|
andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
|
||||||
const XP_U8 const* end, XP_Bitmap* result )
|
const XP_U8* end, XP_Bitmap* result )
|
||||||
{
|
{
|
||||||
XP_Bool success = XP_TRUE;
|
XP_Bool success = XP_TRUE;
|
||||||
XP_U8 const* ptr = *ptrp;
|
XP_U8 const* ptr = *ptrp;
|
||||||
|
jobject bitmap = NULL;
|
||||||
CHECK_PTR( ptr, 1, end );
|
CHECK_PTR( ptr, 1, end );
|
||||||
XP_U8 nCols = *ptr++;
|
XP_U8 nCols = *ptr++;
|
||||||
jobject bitmap = NULL;
|
|
||||||
if ( nCols > 0 ) {
|
if ( nCols > 0 ) {
|
||||||
CHECK_PTR( ptr, 1, end );
|
CHECK_PTR( ptr, 1, end );
|
||||||
XP_U8 nRows = *ptr++;
|
XP_U8 nRows = *ptr++;
|
||||||
|
@ -157,7 +157,7 @@ andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
andLoadSpecialData( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
|
andLoadSpecialData( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
|
||||||
const XP_U8 const* end )
|
const XP_U8* end )
|
||||||
{
|
{
|
||||||
XP_Bool success = XP_TRUE;
|
XP_Bool success = XP_TRUE;
|
||||||
XP_U16 nSpecials = andCountSpecials( ctxt );
|
XP_U16 nSpecials = andCountSpecials( ctxt );
|
||||||
|
@ -305,7 +305,7 @@ parseDict( AndDictionaryCtxt* ctxt, XP_U8 const* ptr, XP_U32 dictLength,
|
||||||
{
|
{
|
||||||
XP_Bool success = XP_TRUE;
|
XP_Bool success = XP_TRUE;
|
||||||
XP_ASSERT( !!ptr );
|
XP_ASSERT( !!ptr );
|
||||||
const XP_U8 const* end = ptr + dictLength;
|
const XP_U8* end = ptr + dictLength;
|
||||||
XP_U32 offset;
|
XP_U32 offset;
|
||||||
XP_U16 nFaces, numFaceBytes = 0;
|
XP_U16 nFaces, numFaceBytes = 0;
|
||||||
XP_U16 flags;
|
XP_U16 flags;
|
||||||
|
|
|
@ -502,7 +502,7 @@ and_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi,
|
||||||
|
|
||||||
#ifdef XWFEATURE_CHAT
|
#ifdef XWFEATURE_CHAT
|
||||||
static void
|
static void
|
||||||
and_util_showChat( XW_UtilCtxt* uc, const XP_UCHAR const* msg, XP_S16 from )
|
and_util_showChat( XW_UtilCtxt* uc, const XP_UCHAR* msg, XP_S16 from )
|
||||||
{
|
{
|
||||||
UTIL_CBK_HEADER( "showChat", "(Ljava/lang/String;ILjava/lang/String;)V" );
|
UTIL_CBK_HEADER( "showChat", "(Ljava/lang/String;ILjava/lang/String;)V" );
|
||||||
jstring jname = NULL;
|
jstring jname = NULL;
|
||||||
|
|
|
@ -568,7 +568,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
|
|
||||||
Bundle args = getArguments();
|
Bundle args = getArguments();
|
||||||
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
|
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
|
||||||
DbgUtils.logf( "BoardActivity: opening rowid %d", m_rowid );
|
DbgUtils.logf( "BoardDelegate.init(): opening rowid %d", m_rowid );
|
||||||
m_haveInvited = args.getBoolean( GameUtils.INVITED, false );
|
m_haveInvited = args.getBoolean( GameUtils.INVITED, false );
|
||||||
m_overNotShown = true;
|
m_overNotShown = true;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ XWORDS_DEBUG_X86ONLY=${XWORDS_DEBUG_X86ONLYx:-""}
|
||||||
|
|
||||||
echo "# Generated by $0; do not edit!!!" > $TMP_MK
|
echo "# Generated by $0; do not edit!!!" > $TMP_MK
|
||||||
|
|
||||||
|
echo "NDK_TOOLCHAIN_VERSION := clang" >> $TMP_MK
|
||||||
|
|
||||||
if [ -n "$XWORDS_DEBUG_ARMONLY" ]; then
|
if [ -n "$XWORDS_DEBUG_ARMONLY" ]; then
|
||||||
echo "APP_ABI := armeabi" >> $TMP_MK
|
echo "APP_ABI := armeabi" >> $TMP_MK
|
||||||
elif [ -n "$XWORDS_DEBUG_X86ONLY" ]; then
|
elif [ -n "$XWORDS_DEBUG_X86ONLY" ]; then
|
||||||
|
|
|
@ -835,7 +835,7 @@ board_canHint( const BoardCtxt* board )
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
board_sendChat( const BoardCtxt* board, const XP_UCHAR const* msg )
|
board_sendChat( const BoardCtxt* board, const XP_UCHAR* msg )
|
||||||
{
|
{
|
||||||
server_sendChat( board->server, msg, board->selPlayer );
|
server_sendChat( board->server, msg, board->selPlayer );
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ XP_Bool board_canHideRack( const BoardCtxt* board );
|
||||||
XP_Bool board_canTrade( BoardCtxt* board );
|
XP_Bool board_canTrade( BoardCtxt* board );
|
||||||
XP_Bool board_canTogglePending( const BoardCtxt* board );
|
XP_Bool board_canTogglePending( const BoardCtxt* board );
|
||||||
XP_Bool board_canHint( const BoardCtxt* board );
|
XP_Bool board_canHint( const BoardCtxt* board );
|
||||||
void board_sendChat( const BoardCtxt* board, const XP_UCHAR const* msg );
|
void board_sendChat( const BoardCtxt* board, const XP_UCHAR* msg );
|
||||||
|
|
||||||
/* zoomBy: >0: zoom in; < 0: zoom out; 0: query only */
|
/* zoomBy: >0: zoom in; < 0: zoom out; 0: query only */
|
||||||
XP_Bool board_zoom( BoardCtxt* board, XP_S16 zoomBy, XP_Bool* canInOut );
|
XP_Bool board_zoom( BoardCtxt* board, XP_S16 zoomBy, XP_Bool* canInOut );
|
||||||
|
|
|
@ -514,9 +514,8 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
||||||
engine->searchHorizontal = XP_FALSE;
|
engine->searchHorizontal = XP_FALSE;
|
||||||
}
|
}
|
||||||
} /* forever */
|
} /* forever */
|
||||||
outer:
|
|
||||||
result = result; /* c++ wants a statement after the label */
|
|
||||||
}
|
}
|
||||||
|
outer:
|
||||||
/* Search is finished. Choose (or just return) the best move found. */
|
/* Search is finished. Choose (or just return) the best move found. */
|
||||||
if ( engine->returnNOW ) {
|
if ( engine->returnNOW ) {
|
||||||
result = XP_FALSE;
|
result = XP_FALSE;
|
||||||
|
|
|
@ -636,7 +636,7 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
|
||||||
|
|
||||||
#ifdef XWFEATURE_CHAT
|
#ifdef XWFEATURE_CHAT
|
||||||
static void
|
static void
|
||||||
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg,
|
sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR* msg,
|
||||||
XP_S8 from )
|
XP_S8 from )
|
||||||
{
|
{
|
||||||
if ( comms_canChat( server->vol.comms ) ) {
|
if ( comms_canChat( server->vol.comms ) ) {
|
||||||
|
@ -652,7 +652,7 @@ sendChatTo( ServerCtxt* server, XP_U16 devIndex, const XP_UCHAR const* msg,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sendChatToClientsExcept( ServerCtxt* server, XP_U16 skip,
|
sendChatToClientsExcept( ServerCtxt* server, XP_U16 skip,
|
||||||
const XP_UCHAR const* msg, XP_S8 from )
|
const XP_UCHAR* msg, XP_S8 from )
|
||||||
{
|
{
|
||||||
XP_U16 devIndex;
|
XP_U16 devIndex;
|
||||||
for ( devIndex = 1; devIndex < server->nv.nDevices; ++devIndex ) {
|
for ( devIndex = 1; devIndex < server->nv.nDevices; ++devIndex ) {
|
||||||
|
@ -663,7 +663,7 @@ sendChatToClientsExcept( ServerCtxt* server, XP_U16 skip,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
server_sendChat( ServerCtxt* server, const XP_UCHAR const* msg, XP_S16 from )
|
server_sendChat( ServerCtxt* server, const XP_UCHAR* msg, XP_S16 from )
|
||||||
{
|
{
|
||||||
if ( server->vol.gi->serverRole == SERVER_ISCLIENT ) {
|
if ( server->vol.gi->serverRole == SERVER_ISCLIENT ) {
|
||||||
sendChatTo( server, SERVER_DEVICE, msg, from );
|
sendChatTo( server, SERVER_DEVICE, msg, from );
|
||||||
|
|
|
@ -122,7 +122,7 @@ XP_Bool server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XWFEATURE_CHAT
|
#ifdef XWFEATURE_CHAT
|
||||||
void server_sendChat( ServerCtxt* server, const XP_UCHAR const* msg,
|
void server_sendChat( ServerCtxt* server, const XP_UCHAR* msg,
|
||||||
XP_S16 from );
|
XP_S16 from );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue