Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions Generals/Code/GameEngine/Include/Common/Language.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,6 @@ typedef enum

} LanguageID;

#define GameStrcpy wcscpy
#define GameStrlen wcslen
#define GameStrcat wcscat
#define GameStrcmp wcscmp
#define GameStrncmp wcsncmp
#define GameStricmp wcsicmp
#define GameStrnicmp wcsnicmp
#define GameStrtok wcstok
#define GameSprintf swprintf
#define GameVsprintf vswprintf
/// @todo -- add a non-malloc-based string dup func #define GameStrdup wcsdup
#define GameAtoi(S) wcstol( (S), NULL, 10)
#define GameAtod(S) wcstod( (S), NULL )
#define GameItoa _itow
#define GameSscanf swscanf
#define GameStrstr wcsstr
#define GameStrchr wcschr
#define GameIsDigit iswdigit
#define GameIsAscii iswascii
#define GameIsAlNum iswalnum
#define GameIsAlpha iswalpha
#define GameArrayEnd(array) (array)[(sizeof(array)/sizeof((array)[0]))-1] = 0

// INLINING ///////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include "PreRTS.h" // This must go first in EVERY cpp file int the GameEngine

// USER INCLUDES //////////////////////////////////////////////////////////////
#include "Common/Language.h"
#include "GameClient/Image.h"
#include "GameClient/Display.h"
#include "GameClient/GameWindowManager.h"
Expand Down Expand Up @@ -196,7 +195,7 @@ Int GameWindowManager::winFontHeight( GameFont *font )
Int GameWindowManager::winIsDigit( Int c )
{

return GameIsDigit( c );
return iswdigit( c );

}

Expand All @@ -206,7 +205,7 @@ Int GameWindowManager::winIsDigit( Int c )
Int GameWindowManager::winIsAscii( Int c )
{

return GameIsAscii( c );
return iswascii( c );

}

Expand All @@ -216,7 +215,7 @@ Int GameWindowManager::winIsAscii( Int c )
Int GameWindowManager::winIsAlNum( Int c )
{

return GameIsAlNum( c );
return iswalnum( c );

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ void IMEManager::updateCompositionString( void )
else
{
m_compositionCursorPos = (ImmGetCompositionString( m_context, GCS_CURSORPOS, NULL, 0) & 0xffff );
convRes = GameStrlen ( m_compositionString );
convRes = wcslen( m_compositionString );
}

// m_compositionCursorPos is in DBCS characters, need to convert it to Wide characters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ WideChar Keyboard::translateKey( WideChar keyCode )
return( m_keyNames[ ubKeyCode ].shifted2 );
}

if( isShift() || getCapsState() && GameIsAlpha( m_keyNames[ ubKeyCode ].stdKey ) )
if( isShift() || getCapsState() && iswalpha( m_keyNames[ ubKeyCode ].stdKey ) )
{
return( m_keyNames[ ubKeyCode ].shifted );
}
Expand Down
21 changes: 0 additions & 21 deletions GeneralsMD/Code/GameEngine/Include/Common/Language.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,27 +75,6 @@ typedef enum

} LanguageID;

#define GameStrcpy wcscpy
#define GameStrlen wcslen
#define GameStrcat wcscat
#define GameStrcmp wcscmp
#define GameStrncmp wcsncmp
#define GameStricmp wcsicmp
#define GameStrnicmp wcsnicmp
#define GameStrtok wcstok
#define GameSprintf swprintf
#define GameVsprintf vswprintf
/// @todo -- add a non-malloc-based string dup func #define GameStrdup wcsdup
#define GameAtoi(S) wcstol( (S), NULL, 10)
#define GameAtod(S) wcstod( (S), NULL )
#define GameItoa _itow
#define GameSscanf swscanf
#define GameStrstr wcsstr
#define GameStrchr wcschr
#define GameIsDigit iswdigit
#define GameIsAscii iswascii
#define GameIsAlNum iswalnum
#define GameIsAlpha iswalpha
#define GameArrayEnd(array) (array)[(sizeof(array)/sizeof((array)[0]))-1] = 0

// INLINING ///////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include "PreRTS.h" // This must go first in EVERY cpp file int the GameEngine

// USER INCLUDES //////////////////////////////////////////////////////////////
#include "Common/Language.h"
#include "GameClient/Image.h"
#include "GameClient/Display.h"
#include "GameClient/GameWindowManager.h"
Expand Down Expand Up @@ -196,7 +195,7 @@ Int GameWindowManager::winFontHeight( GameFont *font )
Int GameWindowManager::winIsDigit( Int c )
{

return GameIsDigit( c );
return iswdigit( c );

}

Expand All @@ -206,7 +205,7 @@ Int GameWindowManager::winIsDigit( Int c )
Int GameWindowManager::winIsAscii( Int c )
{

return GameIsAscii( c );
return iswascii( c );

}

Expand All @@ -216,7 +215,7 @@ Int GameWindowManager::winIsAscii( Int c )
Int GameWindowManager::winIsAlNum( Int c )
{

return GameIsAlNum( c );
return iswalnum( c );

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ void IMEManager::updateCompositionString( void )
else
{
m_compositionCursorPos = (ImmGetCompositionString( m_context, GCS_CURSORPOS, NULL, 0) & 0xffff );
convRes = GameStrlen ( m_compositionString );
convRes = wcslen( m_compositionString );
}

// m_compositionCursorPos is in DBCS characters, need to convert it to Wide characters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ WideChar Keyboard::translateKey( WideChar keyCode )
return( m_keyNames[ ubKeyCode ].shifted2 );
}

if( isShift() || getCapsState() && GameIsAlpha( m_keyNames[ ubKeyCode ].stdKey ) )
if( isShift() || getCapsState() && iswalpha( m_keyNames[ ubKeyCode ].stdKey ) )
{
return( m_keyNames[ ubKeyCode ].shifted );
}
Expand Down
Loading