Added ntassert() mechanism for Windows based port use.

This commit is contained in:
Bart House
2018-05-12 13:59:06 -07:00
parent 99474c864f
commit 3467b9f087
3 changed files with 41 additions and 0 deletions

View File

@@ -246,4 +246,14 @@ extern int FDECL(set_win32_option, (const char *, const char *));
extern int FDECL(alternative_palette, (char *));
#endif
#ifdef NDEBUG
#define ntassert(expression) ((void)0)
#else
extern void FDECL(ntassert_failed, (const char * exp, const char * file,
int line));
#define ntassert(expression) (void)((!!(expression)) || \
(ntassert_failed(#expression, __FILE__, __LINE__), 0))
#endif
#endif /* NTCONF_H */