From 09ceb08b95978feb0a9b737f22ac0f662c7465d6 Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 11:52:00 +0000 Subject: * Replace Item_Text_Wrap with a version that actually makes sense * compiler warning or something --- src/game/bg_lib.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game') diff --git a/src/game/bg_lib.h b/src/game/bg_lib.h index d675cce4..c9ffd65b 100644 --- a/src/game/bg_lib.h +++ b/src/game/bg_lib.h @@ -76,6 +76,15 @@ typedef int cmp_t( const void *, const void * ); void qsort( void *a, size_t n, size_t es, cmp_t *cmp ); void srand( unsigned seed ); int rand( void ); +// FIXME: NDEBUG isn't defined for compiling the QVMs +#ifndef NDEBUG +#define str2(x) #x +#define str(x) str2(x) +#define assert(x) if(!(x)) Com_Error( ERR_DROP, \ + __FILE__ ":" str(__LINE__) ": assertion `" #x "' failed" ); +#else +#define assert(x) +#endif // String functions size_t strlen( const char *string ); -- cgit