#include <stdio.h> | |
#include <stdlib.h> | |
#ifndef _NO_RTL_ASSERT | |
#include <windows.h> | |
#include <nt.h> | |
#endif | |
#define FORMAT "%s:%d: Assertion `%s' failed." | |
void _assert(const char *msg, const char *file, int line) { | |
printf(FORMAT, file, line, msg); | |
putchar('\n'); | |
#ifndef _NO_RTL_ASSERT | |
RtlAssert(msg, file, line, NULL); | |
#endif | |
abort(); | |
} |