|
|
1.1 root 1: /***
2: *assert.h - define the assert macro
3: *
1.1.1.2 ! root 4: * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1 root 5: *
6: *Purpose:
7: * Defines the assert(exp) macro.
8: * [ANSI/System V]
9: *
10: ****/
11:
12:
1.1.1.2 ! root 13: /*
! 14: * Conditional macro definition for function calling type and variable type
! 15: * qualifiers.
! 16: */
! 17: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
! 18:
! 19: /*
! 20: * Definitions for MS C8-32 (386/486) compiler
! 21: */
! 22: #define _CRTAPI1 __cdecl
! 23: #define _CRTAPI2 __cdecl
! 24:
! 25: #elif ( _MSC_VER == 600 )
! 26:
! 27: /*
! 28: * Definitions for old MS C6-386 compiler
! 29: */
! 30: #define _CRTAPI1 _cdecl
! 31: #define _CRTAPI2 _cdecl
! 32: #define _M_IX86 300
! 33:
! 34: #else
! 35:
! 36: /*
! 37: * Other compilers (e.g., MIPS)
! 38: */
! 39: #define _CRTAPI1
! 40: #define _CRTAPI2
! 41:
! 42: #endif
! 43:
1.1 root 44: #undef assert
45:
46: #ifdef NDEBUG
47:
48: #define assert(exp) ((void)0)
49:
50: #else
51:
52: #ifdef __cplusplus
53: extern "C" {
54: #endif
1.1.1.2 ! root 55: void _CRTAPI1 _assert(void *, void *, unsigned);
1.1 root 56: #ifdef __cplusplus
57: }
58: #endif
59:
1.1.1.2 ! root 60: #define assert(exp) if (exp) {(void)0;} else {_assert(#exp,__FILE__,__LINE__);}
1.1 root 61:
62: #endif /* NDEBUG */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.