Use DEBUG instead of NDEBUG

This commit is contained in:
Nathan Letwory
2010-10-18 06:52:10 +00:00
parent 4d37cf90b9
commit a293f76cdf
5 changed files with 19 additions and 19 deletions

View File

@@ -48,7 +48,7 @@
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 BREAKPOINT() ((void)0)
#else
@@ -93,7 +93,7 @@ abort();
}
#endif /* windows */
#endif /* NDEBUG */
#endif /* !defined(DEBUG) */
#endif

View File

@@ -1607,7 +1607,7 @@ void BLI_where_am_i(char *fullname, const char *name)
} while (temp);
}
}
#ifndef NDEBUG
#if defined(DEBUG)
if (strcmp(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
// that's even uglier
GetShortPathName(fullname, fullname, FILE_MAXDIR+FILE_MAXFILE);
#ifndef NDEBUG
#if defined(DEBUG)
printf("Shortname = '%s'\n", fullname);
#endif
#endif

View File

@@ -41,7 +41,7 @@ int BLO_read_runtime( char *file);
BLO_readblenfilememory(
char *fromBuffer, int fromBufferSize)
{
#ifndef NDEBUG
#if defined(DEBUG)
fprintf(GEN_errorstream,
"Error BLO_readblenfilename is a stub\n");
#endif
@@ -52,7 +52,7 @@ BLO_readblenfilememory(
BLO_readblenfilename(
char *fileName)
{
#ifndef NDEBUG
#if defined(DEBUG)
fprintf(GEN_errorstream,
"Error BLO_readblenfilename is a stub\n");
#endif
@@ -63,7 +63,7 @@ BLO_readblenfilename(
BLO_readblenfilehandle(
int fileHandle)
{
#ifndef NDEBUG
#if defined(DEBUG)
fprintf(GEN_errorstream,
"Error BLO_readblenfilehandle is a stub\n");
#endif
@@ -74,7 +74,7 @@ BLO_readblenfilehandle(
BLO_is_a_runtime(
char *file)
{
#ifndef NDEBUG
#if defined(DEBUG)
fprintf(GEN_errorstream,
"Error BLO_is_a_runtime is a stub\n");
#endif
@@ -85,7 +85,7 @@ BLO_is_a_runtime(
BLO_read_runtime(
char *file)
{
#ifndef NDEBUG
#if defined(DEBUG)
fprintf(GEN_errorstream,
"Error BLO_read_runtime is a stub\n");
#endif

View File

@@ -95,9 +95,9 @@ extern char btempdir[]; /* use this to store a valid temp directory */
#ifdef WIN32
#include <windows.h>
#ifdef NDEBUG
#if !defined(DEBUG)
#include <wincon.h>
#endif // NDEBUG
#endif // !defined(DEBUG)
#endif // WIN32
const int kMinWindowWidth = 100;
@@ -391,7 +391,7 @@ int main(int argc, char** argv)
IMB_init();
// Parse command line options
#ifndef NDEBUG
#if defined(DEBUG)
printf("argv[0] = '%s'\n", argv[0]);
#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);
#endif
if (argv[i][0] == '-')
@@ -469,7 +469,7 @@ int main(int argc, char** argv)
SYS_WriteCommandLineInt(syshandle, paramname, atoi(argv[i]));
SYS_WriteCommandLineFloat(syshandle, paramname, atof(argv[i]));
SYS_WriteCommandLineString(syshandle, paramname, argv[i]);
#ifndef NDEBUG
#if defined(DEBUG)
printf("%s = '%s'\n", paramname, argv[i]);
#endif
i++;
@@ -542,9 +542,9 @@ int main(int argc, char** argv)
printf("error: too few options for parent window argument.\n");
}
#ifndef NDEBUG
#if defined(DEBUG)
printf("XWindows ID = %d\n", parentWindow);
#endif //NDEBUG
#endif // defined(DEBUG)
#endif // _WIN32
case 'c':
@@ -745,12 +745,12 @@ int main(int argc, char** argv)
else
{
#ifdef WIN32
#ifdef NDEBUG
#if !defined(DEBUG)
if (closeConsole)
{
//::FreeConsole(); // Close a console window
}
#endif // NDEBUG
#endif // !defined(DEBUG)
#endif // WIN32
Main *maggie = bfd->main;
Scene *scene = bfd->curscene;

View File

@@ -13,7 +13,7 @@
#include "RAS_TexVert.h"
#include "MT_assert.h"
//#ifndef NDEBUG
//#if defined(DEBUG)
//#ifdef WIN32
//#define spit(x) std::cout << x << std::endl;
//#endif //WIN32