home *** CD-ROM | disk | FTP | other *** search
- /***
- *assert.h - define the assert macro
- *
- * Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved.
- *
- *Purpose:
- * Defines the assert(exp) macro.
- * [ANSI/System V]
- *
- ****/
-
- #if defined(_DLL) && !defined(_MT)
- #error Cannot define _DLL without _MT
- #endif
-
- #ifdef _MT
- #define _FAR_ __far
- #else
- #define _FAR_
- #endif
-
- #if (_MSC_VER <= 600)
- #define __cdecl _cdecl
- #define __far _far
- #define __loadds _loadds
- #endif
-
- #undef assert
-
- #ifdef NDEBUG
-
- #define assert(exp) ((void)0)
-
- #else
- #ifdef __cplusplus
- extern "C" {
- #endif
- void _FAR_ __cdecl _assert(void _FAR_ *, void _FAR_ *, unsigned);
- #ifdef __cplusplus
- }
- #endif
-
- #define assert(exp) \
- ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) )
-
- #endif /* NDEBUG */
-