23 lines
330 B
C
23 lines
330 B
C
/*
|
|
* assert.h
|
|
*
|
|
* defines the assert macro.
|
|
*
|
|
* Copyright (C) Microsoft Corporation, 1984
|
|
*/
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#define assert(exp) { \
|
|
if (!(exp)) { \
|
|
fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__); \
|
|
exit(1); \
|
|
} \
|
|
}
|
|
|
|
#else
|
|
|
|
#define assert(exp)
|
|
|
|
#endif /* NDEBUG */
|