renamed assert function to debug_assert_failed (now portable, in sysdep)
This was SVN commit r750.
This commit is contained in:
parent
a79add7fa0
commit
a3926fb382
@ -17,10 +17,16 @@ extern "C" {
|
||||
|
||||
extern void display_msg(const char* caption, const char* msg);
|
||||
extern void wdisplay_msg(const wchar_t* caption, const wchar_t* msg);
|
||||
extern void debug_out(const char* fmt, ...);
|
||||
|
||||
extern void debug_out(const char* fmt, ...);
|
||||
extern void debug_break();
|
||||
|
||||
|
||||
// assert with stack trace (including variable / parameter types and values)
|
||||
// shown in a dialog, which offers
|
||||
// continue, break, suppress (ignore this assert), and exit
|
||||
extern int debug_assert_failed(const char* file, int line, const char* expr);
|
||||
|
||||
extern void check_heap();
|
||||
|
||||
|
||||
|
@ -612,7 +612,7 @@ static void set_exception_handler()
|
||||
|
||||
|
||||
|
||||
int wdbg_show_assert_dlg(char* file, int line, char* expr)
|
||||
int debug_assert_failed(const char* file, int line, const char* expr)
|
||||
{
|
||||
ONCE(dbg_init());
|
||||
|
||||
|
@ -8,28 +8,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// assert with stack trace (including variable / parameter types and values)
|
||||
// shown in a dialog, which offers
|
||||
// continue, break, suppress (ignore this assert), and exit
|
||||
|
||||
// recommended use: assert2(expr && "descriptive string")
|
||||
#define assert2(expr)\
|
||||
{\
|
||||
static int suppress__;\
|
||||
if(!suppress__ && !expr)\
|
||||
switch(wdbg_show_assert_dlg(__FILE__, __LINE__, #expr))\
|
||||
{\
|
||||
case 1:\
|
||||
suppress__ = 1;\
|
||||
break;\
|
||||
\
|
||||
case 2:\
|
||||
win_debug_break();\
|
||||
break;\
|
||||
}\
|
||||
}
|
||||
|
||||
extern int wdbg_show_assert_dlg(char* file, int line, char* expr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user