//=================================
//  w_assert() by Matt Pietrek, 1992
//  File: W_ASSERT.H
//=================================

// prototype the __w_assertfail() function, and apply <extern "C"> if
// doing a C++ compile

#ifdef __cplusplus
extern "C" {
#endif
void __w_assertfail( char *msg, char *cond, char *file, int line);
#ifdef  __cplusplus
}
#endif

// Just a variation on the 'C' assert() macro with changed names

#ifdef NDEBUG
#define w_assert(p)   ((void)0)
#else
#define w_assert(p) ((p) ? (void)0 : (void) __w_assertfail( \
                    "Assertion failed: %s, file %s, line %d", \
                    #p, __FILE__, __LINE__ ) )
#endif
