|
|
1.1 root 1: /***
2: *assert.h - define the assert macro
3: *
1.1.1.3 ! root 4: * Copyright (c) 1985-1993, 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: #else
26:
27: /*
28: * Other compilers (e.g., MIPS)
29: */
30: #define _CRTAPI1
31: #define _CRTAPI2
32:
33: #endif
34:
1.1 root 35: #undef assert
36:
37: #ifdef NDEBUG
38:
39: #define assert(exp) ((void)0)
40:
41: #else
42:
43: #ifdef __cplusplus
44: extern "C" {
45: #endif
1.1.1.2 root 46: void _CRTAPI1 _assert(void *, void *, unsigned);
1.1 root 47: #ifdef __cplusplus
48: }
49: #endif
50:
1.1.1.3 ! root 51: #define assert(exp) (void)( (exp) || (_assert(#exp, __FILE__, __LINE__), 0) )
! 52:
1.1 root 53:
54: #endif /* NDEBUG */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.