Use DEBUG instead of NDEBUG
authorNathan Letwory <nathan@letworyinteractive.com>
Mon, 18 Oct 2010 06:52:10 +0000 (06:52 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Mon, 18 Oct 2010 06:52:10 +0000 (06:52 +0000)
intern/moto/include/MT_assert.h
source/blender/blenlib/intern/path_util.c
source/blender/readblenfile/stub/BLO_readblenfileSTUB.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp

index cc6f980..a0e97e6 100644 (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
 
index 23972c6..61b525d 100644 (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
index 33e9bfe..c5b523b 100644 (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
index e9dfd2a..94142e7 100644 (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;
index 12a255b..d793a2f 100644 (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