Windows2000/private/windbg64/debugger/ee/cxassert.h

43 lines
757 B
C
Raw Normal View History

2001-01-01 00:00:00 +01:00
/***
*assert.h - define the assert macro
*
* Copyright (c) 1985-1987, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the assert(exp) macro.
* [ANSI/System V]
*
*Modified:
* Allent 3/14/88 - call Quit instead of abort
*******************************************************************************/
#ifndef _ASSERT_DEFINED
#ifdef __cplusplus
extern "C" {
#endif
#ifdef DEBUGVER
static char _assertstring[] = "Assertion failed: %s, file %s, line %d\n";
#define assert(exp) { \
if (!(exp)) { \
AssertOut( #exp, __FILE__, __LINE__ );\
quit(2); \
} \
}
#else
#define assert(exp)
#endif /* NDEBUG */
#define _ASSERT_DEFINED
#ifdef __cplusplus
} // extern "C" {
#endif
#endif /* _ASSERT_DEFINED */