Use DEBUG instead of NDEBUG
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
MT_CDECL int MT_QueryAssert(const char *file, int line, const char *predicate, int *do_assert);
|
MT_CDECL int MT_QueryAssert(const char *file, int line, const char *predicate, int *do_assert);
|
||||||
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#if !defined(DEBUG)
|
||||||
#define MT_assert(predicate) ((void)0)
|
#define MT_assert(predicate) ((void)0)
|
||||||
#define BREAKPOINT() ((void)0)
|
#define BREAKPOINT() ((void)0)
|
||||||
#else
|
#else
|
||||||
@@ -93,7 +93,7 @@ abort();
|
|||||||
}
|
}
|
||||||
#endif /* windows */
|
#endif /* windows */
|
||||||
|
|
||||||
#endif /* NDEBUG */
|
#endif /* !defined(DEBUG) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1607,7 +1607,7 @@ void BLI_where_am_i(char *fullname, const char *name)
|
|||||||
} while (temp);
|
} while (temp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
if (strcmp(name, fullname)) {
|
if (strcmp(name, fullname)) {
|
||||||
printf("guessing '%s' == '%s'\n", name, fullname);
|
printf("guessing '%s' == '%s'\n", name, fullname);
|
||||||
}
|
}
|
||||||
@@ -1620,7 +1620,7 @@ void BLI_where_am_i(char *fullname, const char *name)
|
|||||||
// with spawnv(P_WAIT, bprogname, argv) instead of system() but
|
// with spawnv(P_WAIT, bprogname, argv) instead of system() but
|
||||||
// that's even uglier
|
// that's even uglier
|
||||||
GetShortPathName(fullname, fullname, FILE_MAXDIR+FILE_MAXFILE);
|
GetShortPathName(fullname, fullname, FILE_MAXDIR+FILE_MAXFILE);
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
printf("Shortname = '%s'\n", fullname);
|
printf("Shortname = '%s'\n", fullname);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -41,7 +41,7 @@ int BLO_read_runtime( char *file);
|
|||||||
BLO_readblenfilememory(
|
BLO_readblenfilememory(
|
||||||
char *fromBuffer, int fromBufferSize)
|
char *fromBuffer, int fromBufferSize)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
fprintf(GEN_errorstream,
|
fprintf(GEN_errorstream,
|
||||||
"Error BLO_readblenfilename is a stub\n");
|
"Error BLO_readblenfilename is a stub\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -52,7 +52,7 @@ BLO_readblenfilememory(
|
|||||||
BLO_readblenfilename(
|
BLO_readblenfilename(
|
||||||
char *fileName)
|
char *fileName)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
fprintf(GEN_errorstream,
|
fprintf(GEN_errorstream,
|
||||||
"Error BLO_readblenfilename is a stub\n");
|
"Error BLO_readblenfilename is a stub\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -63,7 +63,7 @@ BLO_readblenfilename(
|
|||||||
BLO_readblenfilehandle(
|
BLO_readblenfilehandle(
|
||||||
int fileHandle)
|
int fileHandle)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
fprintf(GEN_errorstream,
|
fprintf(GEN_errorstream,
|
||||||
"Error BLO_readblenfilehandle is a stub\n");
|
"Error BLO_readblenfilehandle is a stub\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -74,7 +74,7 @@ BLO_readblenfilehandle(
|
|||||||
BLO_is_a_runtime(
|
BLO_is_a_runtime(
|
||||||
char *file)
|
char *file)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
fprintf(GEN_errorstream,
|
fprintf(GEN_errorstream,
|
||||||
"Error BLO_is_a_runtime is a stub\n");
|
"Error BLO_is_a_runtime is a stub\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -85,7 +85,7 @@ BLO_is_a_runtime(
|
|||||||
BLO_read_runtime(
|
BLO_read_runtime(
|
||||||
char *file)
|
char *file)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
fprintf(GEN_errorstream,
|
fprintf(GEN_errorstream,
|
||||||
"Error BLO_read_runtime is a stub\n");
|
"Error BLO_read_runtime is a stub\n");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -95,9 +95,9 @@ extern char btempdir[]; /* use this to store a valid temp directory */
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef NDEBUG
|
#if !defined(DEBUG)
|
||||||
#include <wincon.h>
|
#include <wincon.h>
|
||||||
#endif // NDEBUG
|
#endif // !defined(DEBUG)
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
const int kMinWindowWidth = 100;
|
const int kMinWindowWidth = 100;
|
||||||
@@ -391,7 +391,7 @@ int main(int argc, char** argv)
|
|||||||
IMB_init();
|
IMB_init();
|
||||||
|
|
||||||
// Parse command line options
|
// Parse command line options
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
printf("argv[0] = '%s'\n", argv[0]);
|
printf("argv[0] = '%s'\n", argv[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ int main(int argc, char** argv)
|
|||||||
;)
|
;)
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
printf("argv[%d] = '%s' , %i\n", i, argv[i],argc);
|
printf("argv[%d] = '%s' , %i\n", i, argv[i],argc);
|
||||||
#endif
|
#endif
|
||||||
if (argv[i][0] == '-')
|
if (argv[i][0] == '-')
|
||||||
@@ -469,7 +469,7 @@ int main(int argc, char** argv)
|
|||||||
SYS_WriteCommandLineInt(syshandle, paramname, atoi(argv[i]));
|
SYS_WriteCommandLineInt(syshandle, paramname, atoi(argv[i]));
|
||||||
SYS_WriteCommandLineFloat(syshandle, paramname, atof(argv[i]));
|
SYS_WriteCommandLineFloat(syshandle, paramname, atof(argv[i]));
|
||||||
SYS_WriteCommandLineString(syshandle, paramname, argv[i]);
|
SYS_WriteCommandLineString(syshandle, paramname, argv[i]);
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
printf("%s = '%s'\n", paramname, argv[i]);
|
printf("%s = '%s'\n", paramname, argv[i]);
|
||||||
#endif
|
#endif
|
||||||
i++;
|
i++;
|
||||||
@@ -542,9 +542,9 @@ int main(int argc, char** argv)
|
|||||||
printf("error: too few options for parent window argument.\n");
|
printf("error: too few options for parent window argument.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#if defined(DEBUG)
|
||||||
printf("XWindows ID = %d\n", parentWindow);
|
printf("XWindows ID = %d\n", parentWindow);
|
||||||
#endif //NDEBUG
|
#endif // defined(DEBUG)
|
||||||
|
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
case 'c':
|
case 'c':
|
||||||
@@ -745,12 +745,12 @@ int main(int argc, char** argv)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifdef NDEBUG
|
#if !defined(DEBUG)
|
||||||
if (closeConsole)
|
if (closeConsole)
|
||||||
{
|
{
|
||||||
//::FreeConsole(); // Close a console window
|
//::FreeConsole(); // Close a console window
|
||||||
}
|
}
|
||||||
#endif // NDEBUG
|
#endif // !defined(DEBUG)
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
Main *maggie = bfd->main;
|
Main *maggie = bfd->main;
|
||||||
Scene *scene = bfd->curscene;
|
Scene *scene = bfd->curscene;
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include "RAS_TexVert.h"
|
#include "RAS_TexVert.h"
|
||||||
#include "MT_assert.h"
|
#include "MT_assert.h"
|
||||||
|
|
||||||
//#ifndef NDEBUG
|
//#if defined(DEBUG)
|
||||||
//#ifdef WIN32
|
//#ifdef WIN32
|
||||||
//#define spit(x) std::cout << x << std::endl;
|
//#define spit(x) std::cout << x << std::endl;
|
||||||
//#endif //WIN32
|
//#endif //WIN32
|
||||||
|
Reference in New Issue
Block a user