aboutsummaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
commit85bb4ad9cb820ac3b8e935a930084a06cbfd2847 (patch)
tree681fd9b2d9fa80931b2a8bec4bb6667865b7c569 /debug.h
parentea859f50d9438bc61ae96721a4d255b49de78653 (diff)
downloaddebian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.gz
debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.bz2
debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.zip
Imported Upstream version 0.6.3upstream/0.6.3
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/debug.h b/debug.h
index 8ef971d..1b89f66 100644
--- a/debug.h
+++ b/debug.h
@@ -1,22 +1,28 @@
-#ifdef DEBUG
+#if defined(DEBUG)
-#include "DebugMemory.h"
+ /* Full debug */
+ #include "DebugMemory.h"
+ #define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__)
+ #define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__, #x)
+ #define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__, #x)
+ #define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__)
+ #define free(x) DebugMemory_free(x, __FILE__, __LINE__)
+ #define debug_done() DebugMemory_report()
-#define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__);
-#define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__);
-#define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__);
-#define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__);
-#define free(x) DebugMemory_free(x, __FILE__, __LINE__);
+#elif defined(DEBUGLITE)
-#define debug_done() DebugMemory_report();
+ /* Assertions and core only */
+ #ifdef NDEBUG
+ #undef NDEBUG
+ #endif
+ #define debug_done() sleep(0)
-#endif
-
-#ifndef DEBUG
+#else
-#define NDEBUG
-
-#define debug_done() sleep(0)
+ /* No debugging */
+ #define NDEBUG
+ #define debug_done() sleep(0)
#endif
+

© 2014-2024 Faster IT GmbH | imprint | privacy policy