Get rid of unused parameter

This commit is contained in:
ehouse 2009-01-14 13:02:08 +00:00
parent b40d8e3f2d
commit cacf676bfd
4 changed files with 13 additions and 15 deletions

View file

@ -1103,7 +1103,7 @@ ceLoadSavedGame( CEAppGlobals* globals )
snprintf( buf, VSIZE(buf), "Unable to open dictionary: %s",
dictName );
buf[VSIZE(buf)-1] = '\0';
ceOops( globals, NULL, buf );
ceOops( globals, buf );
}
XP_FREE( globals->mpool, dictName );
@ -1130,7 +1130,7 @@ ceLoadSavedGame( CEAppGlobals* globals )
if ( !!dict ) {
dict_destroy( dict );
}
ceOops( globals, NULL, "Saved game cannot be opened." );
ceOops( globals, "Saved game cannot be opened." );
}
}
@ -2660,7 +2660,7 @@ messageBoxStream( CEAppGlobals* globals, XWStreamCtxt* stream, wchar_t* title,
int result;
assertOnTop( globals->hWnd );
result = ceMessageBoxChar( globals, NULL, buf, title, buttons );
result = ceMessageBoxChar( globals, buf, title, buttons );
XP_FREE( globals->mpool, buf );
return result;
@ -2986,7 +2986,7 @@ ce_util_userError( XW_UtilCtxt* uc, UtilErrID id )
break;
}
ceOops( globals, NULL, message );
ceOops( globals, message );
} /* ce_util_userError */
static XP_Bool
@ -3357,7 +3357,7 @@ ce_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi,
sprintf( msgBuf, "Word[s] %s not found in dictionary.", wordsBuf );
if ( turnLost ) {
ceMessageBoxChar( globals, NULL, msgBuf, L"Illegal word",
ceMessageBoxChar( globals, msgBuf, L"Illegal word",
MB_OK | MB_ICONHAND );
isOk = XP_TRUE;
} else {

View file

@ -333,7 +333,7 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
break;
case IDC_CHECKHINTSLIMITS:
if ( IS_SMARTPHONE(globals) ) {
ceMessageBoxChar( globals, hDlg, "This feature "
ceMessageBoxChar( globals, "This feature "
"requires a touch screen.",
L"Sorry", MB_OK | MB_ICONHAND );
ceSetChecked( hDlg, IDC_CHECKHINTSLIMITS, XP_FALSE );

View file

@ -881,9 +881,10 @@ ceGetPath( CEAppGlobals* globals, CePathType typ,
} /* ceGetPath */
int
ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), HWND parent,
const XP_UCHAR* str, const wchar_t* title, XP_U16 buttons )
ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), const XP_UCHAR* str,
const wchar_t* title, XP_U16 buttons )
{
HWND parent;
/* Get the length required, then alloc and go. This is technically
correct, but everywhere else I assume a 2:1 ratio for wchar_t:char. */
XP_U16 clen = 1 + strlen(str);
@ -893,16 +894,13 @@ ceMessageBoxChar( CEAppGlobals* XP_UNUSED(globals), HWND parent,
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, str, clen, widebuf, wlen );
/* if ( !parent ) { */
/* parent = globals->hWnd; */
/* } */
parent = GetForegroundWindow();
return MessageBox( parent, widebuf, title, buttons );
} /* ceMessageBoxChar */
int
ceOops( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str )
ceOops( CEAppGlobals* globals, const XP_UCHAR* str )
{
return ceMessageBoxChar( globals, parent, str, L"Oops!",
return ceMessageBoxChar( globals, str, L"Oops!",
MB_OK | MB_ICONHAND );
}

View file

@ -47,9 +47,9 @@ void ceCheckMenus( const CEAppGlobals* globals );
void ceGetItemRect( HWND hDlg, XP_U16 resID, RECT* rect );
void ceMoveItem( HWND hDlg, XP_U16 resID, XP_S16 byX, XP_S16 byY );
int ceMessageBoxChar( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str,
int ceMessageBoxChar( CEAppGlobals* globals, const XP_UCHAR* str,
const wchar_t* title, XP_U16 buttons );
int ceOops( CEAppGlobals* globals, HWND parent, const XP_UCHAR* str );
int ceOops( CEAppGlobals* globals, const XP_UCHAR* str );
typedef enum {
PREFS_FILE_PATH_L