Skip to content

Commit 02d4ad9

Browse files
OmniBladexezon
authored andcommitted
[GEN][ZH] Change _DEBUG macro to RTS_DEBUG (#780)
Resolves issue of debug instrumentation requiring debug CRT on windows.
1 parent dd2890c commit 02d4ad9

File tree

490 files changed

+1323
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

490 files changed

+1323
-1323
lines changed

Core/Libraries/Source/WWVegas/WWLib/Except.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,11 @@ int Exception_Handler(int exception_code, EXCEPTION_POINTERS *e_info)
783783
}
784784

785785
/*
786-
** If there was a breakpoint then chances are it was set by a debugger. In _DEBUG mode
786+
** If there was a breakpoint then chances are it was set by a debugger. In RTS_DEBUG mode
787787
** we probably should ignore breakpoints. Breakpoints become more significant in release
788788
** mode since there probably isn't a debugger present.
789789
*/
790-
#ifdef _DEBUG
790+
#ifdef RTS_DEBUG
791791
if (exception_code == EXCEPTION_BREAKPOINT) {
792792
return (EXCEPTION_CONTINUE_SEARCH);
793793
}
@@ -818,7 +818,7 @@ int Exception_Handler(int exception_code, EXCEPTION_POINTERS *e_info)
818818

819819
#if (0)
820820
#ifdef _DEBUG_PRINT
821-
#ifndef _DEBUG
821+
#ifndef RTS_DEBUG
822822
/*
823823
** Copy the exception debug file to the network. No point in doing this for the debug version
824824
** since symbols are not normally available.
@@ -852,7 +852,7 @@ int Exception_Handler(int exception_code, EXCEPTION_POINTERS *e_info)
852852
** EXCEPTION_EXECUTE_HANDLER to let us fall out of winmain.
853853
*/
854854
if (ExitOnException) {
855-
#ifdef _DEBUG
855+
#ifdef RTS_DEBUG
856856
_CrtSetDbgFlag(0);
857857
#endif //_DEBUG
858858
TryingToExit = true;

Core/Libraries/Source/WWVegas/WWLib/INDEX.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void IndexClass<INDEX, T>::Set_Archive(NodeElement const * node) const
547547
template<class INDEX, class T>
548548
bool IndexClass<INDEX, T>::Add_Index(INDEX const & id, T const & data)
549549
{
550-
#ifdef _DEBUG
550+
#ifdef RTS_DEBUG
551551
/*
552552
** Ensure that two elements with the same index are not added to the
553553
** array.

Core/Libraries/Source/WWVegas/WWLib/always.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
** This helps find leaks.
5656
*/
5757
//#define STEVES_NEW_CATCHER
58-
#ifdef _DEBUG
58+
#ifdef RTS_DEBUG
5959
#ifdef _MSC_VER
6060
#ifdef STEVES_NEW_CATCHER
6161

@@ -105,7 +105,7 @@
105105

106106
#endif
107107

108-
#if (defined(_DEBUG) || defined(_INTERNAL))
108+
#if (defined(RTS_DEBUG) || defined(_INTERNAL))
109109
#define MSGW3DNEW(MSG) new( MSG, 0 )
110110
#define MSGW3DNEWARRAY(MSG) new( MSG, 0 )
111111
#define W3DNEW new("W3D_" __FILE__, 0)

Core/Libraries/Source/WWVegas/WWLib/sharebuf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ShareBufferClass : public W3DMPO, public RefCountClass
7777

7878
protected:
7979

80-
#if (defined(_DEBUG) || defined(_INTERNAL))
80+
#if (defined(RTS_DEBUG) || defined(_INTERNAL))
8181
const char* Msg;
8282
#endif
8383
T * Array;
@@ -90,7 +90,7 @@ class ShareBufferClass : public W3DMPO, public RefCountClass
9090
template <class T>
9191
ShareBufferClass<T>::ShareBufferClass(int count, const char* msg) :
9292
Count(count)
93-
#if (defined(_DEBUG) || defined(_INTERNAL))
93+
#if (defined(RTS_DEBUG) || defined(_INTERNAL))
9494
, Msg(msg)
9595
#endif
9696
{
@@ -103,7 +103,7 @@ ShareBufferClass<T>::ShareBufferClass(const ShareBufferClass<T> & that) :
103103
Count(that.Count)
104104
{
105105
assert(Count > 0);
106-
#if (defined(_DEBUG) || defined(_INTERNAL))
106+
#if (defined(RTS_DEBUG) || defined(_INTERNAL))
107107
Msg = that.Msg;
108108
#endif
109109
Array = MSGW3DNEWARRAY(Msg) T[Count];

Core/Libraries/Source/WWVegas/WWLib/win.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ extern HINSTANCE ProgramInstance;
7575
extern HWND MainWindow;
7676
extern bool GameInFocus;
7777

78-
#ifdef _DEBUG
78+
#ifdef RTS_DEBUG
7979

8080
void __cdecl Print_Win32Error(unsigned long win32Error);
8181

82-
#else // _DEBUG
82+
#else // RTS_DEBUG
8383

8484
#define Print_Win32Error
8585

86-
#endif // _DEBUG
86+
#endif // RTS_DEBUG
8787

8888
#else // _WIN32
8989
//#include <unistd.h> // file does not exist

Core/Tools/Autorun/AUTORUN.RC

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ VERSIONINFO_1 VERSIONINFO
217217
FILEVERSION 1,0,0,0
218218
PRODUCTVERSION 1,0,0,0
219219
FILEFLAGSMASK 0x0L
220-
#ifdef _DEBUG
220+
#ifdef RTS_DEBUG
221221
FILEFLAGS 0x1L
222222
#else
223223
FILEFLAGS 0x0L

Core/Tools/Autorun/GETCD.CPP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int GetCDClass::Get_CD_Drive_For_This_Volume ( const char *volume_label )
206206

207207
} else {
208208

209-
#if _DEBUG
209+
#if RTS_DEBUG
210210
LPVOID lpMsgBuf;
211211
FormatMessage(
212212
FORMAT_MESSAGE_ALLOCATE_BUFFER |

Core/Tools/Autorun/Locale_API.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ int Locale_Init ( int language, char *file )
265265
266266
LanguageID = 0;
267267
268-
#if(_DEBUG)
268+
#if(RTS_DEBUG)
269269
switch( LanguageID ) {
270270
case 6:
271271
CodePage = 932;

Core/Tools/Autorun/WinFix.CPP

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ WindowsVersionInfo::WindowsVersionInfo(void) :
185185

186186
// } else {
187187

188-
#if( _DEBUG )
188+
#if( RTS_DEBUG )
189189
HKEY hKey;
190190
char szProductType[80];
191191
DWORD dwBufLen;
@@ -239,7 +239,7 @@ WindowsVersionInfo::WindowsVersionInfo(void) :
239239
//--------------------------------------------------------------------------
240240
// Send all info found to the debug output file.
241241
//--------------------------------------------------------------------------
242-
#if ( _DEBUG )
242+
#if ( RTS_DEBUG )
243243
Msg( __LINE__, __FILE__, "MajorVersionNumber = %d", MajorVersionNumber );
244244
Msg( __LINE__, __FILE__, "MinorVersionNumber = %d", MinorVersionNumber );
245245
Msg( __LINE__, __FILE__, "WindowsVersion = %d", WindowsVersion );

Core/Tools/Autorun/Wnd_File.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595

9696

97-
#ifdef _DEBUG
97+
#ifdef RTS_DEBUG
9898
void __cdecl Msg( int line, const char *file, const char *fmt, ... );
9999
void __cdecl Msg( int line, const char *filename, const wchar_t *fmt, unsigned int codepage=1252, ... );
100100
void Delete_Msg_File( void );

0 commit comments

Comments
 (0)