home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
ansi
/
assert.h
< prev
next >
Wrap
Text File
|
1992-01-08
|
717b
|
32 lines
/* assert.h 4.2 85/01/21 */
/* Copyright (c) 1988 NeXT, Inc. - 9/13/88 CCH */
#ifndef _ASSERT_H
#define _ASSERT_H
#ifdef __STRICT_BSD__
extern void abort(void);
#else
#import <stdio.h>
#import <stdlib.h>
#endif /* __STRICT_BSD__ */
/* for BSD compatibility */
#define _assert(x) assert(x)
#endif /* _ASSERT_H */
/* placed outside so can be multiply included after a #define or #undef
* NDEBUG to turn assertion checking on and off within a compile */
#undef assert
#ifdef NDEBUG
#define assert(ignore) ((void)0)
#else
#define assert(expression) \
((expression) ? (void) 0 : \
(fprintf (stderr, "Assertion failed: " #expression \
", file " __FILE__ ", line %d.\n", __LINE__), \
abort ()))
#endif