diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-15 18:39:03 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-15 18:39:03 +0000 |
commit | bf3971336f9b7b9ac95edf97649adb7f79b8a04c (patch) | |
tree | d9abf4d8f341b6503d3b019cda248859166832ad /navit/debug.h | |
parent | 244d149bd53729635eb09caa1693c2a2f0fb7b62 (diff) | |
download | navit-bf3971336f9b7b9ac95edf97649adb7f79b8a04c.tar.gz |
Fix:Core:Replaced g_assert with dbg_assert
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1477 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/debug.h')
-rw-r--r-- | navit/debug.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/debug.h b/navit/debug.h index 4bb7d52dc..0d9512372 100644 --- a/navit/debug.h +++ b/navit/debug.h @@ -30,6 +30,7 @@ extern int debug_level; #define dbg_str1(x) dbg_str2(x) #define dbg_module dbg_str1(MODULE) #define dbg(level,fmt...) ({ if (debug_level >= level) debug_printf(level,dbg_module,strlen(dbg_module),__PRETTY_FUNCTION__, strlen(__PRETTY_FUNCTION__),1,fmt); }) +#define dbg_assert(expr) ((expr) ? (void) 0 : debug_assert_fail(dbg_module,strlen(dbg_module),__PRETTY_FUNCTION__, strlen(__PRETTY_FUNCTION__),__FILE__,__LINE__,dbg_str1(expr))) /* prototypes */ void debug_init(const char *program_name); @@ -37,6 +38,7 @@ void debug_level_set(const char *name, int level); int debug_level_get(const char *name); void debug_vprintf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap); void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...); +void debug_assert_fail(char *module, const int mlen,const char *function, const int flen, char *file, int line, char *expr); /* end of prototypes */ #ifdef __cplusplus |