dos_compilers/Intel iC-86 Compiler v4.5/INC/ASSERT.H

32 lines
582 B
C++
Raw Normal View History

2024-07-02 16:18:39 +02:00
/* assert.h - define the assert macro
* $Version: 1.9 $
* Copyright (c) 1984, 85 Computer Innovations Inc, ALL RIGHTS RESERVED.
* Copyright (c) 1988, 89 Intel Corporation, ALL RIGHTS RESERVED.
*/
#undef assert
#ifndef NDEBUG
#ifndef _stdioh
#include <stdio.h>
#endif
#ifndef _stdlibh
#include <stdlib.h>
#endif
#define assert(_exp_) { \
if (!(_exp_)) { \
fprintf(stderr, "Assertion failed: %s, file %s, line %d\n", \
#_exp_, __FILE__, __LINE__); \
abort(); \
} \
}
#else
#define assert(ignore)
#endif /* NDEBUG */