(trunk libT) new macro, tr_assert(). use it to help smoke out #1749

This commit is contained in:
Charles Kerr
2009-01-25 16:14:11 +00:00
parent f47cc0cf4d
commit 29661cf245
3 changed files with 46 additions and 4 deletions

View File

@@ -103,6 +103,15 @@ extern "C" {
*****
****/
void tr_assertImpl( const char * file, int line, const char * test, const char * fmt, ... ) TR_GNUC_PRINTF( 4, 5 );
#ifdef NDEBUG
#define tr_assert( test, fmt, ... )
#else
#define tr_assert( test, fmt, ... ) \
do { if( ! ( test ) ) tr_assertImpl( __FILE__, __LINE__, #test, fmt, __VA_ARGS__ ); } while( 0 )
#endif
int tr_msgLoggingIsActive( int level );
void tr_msg( const char * file,