lilium-voyager/lcc/lib/assert.c

16 lines
303 B
C
Raw Normal View History

2005-08-26 04:48:05 +00:00
#include <stdio.h>
#include <stdlib.h>
int _assert(char *e, char *file, int line) {
fprintf(stderr, "assertion failed:");
if (e)
fprintf(stderr, " %s", e);
if (file)
fprintf(stderr, " file %s", file);
fprintf(stderr, " line %d\n", line);
fflush(stderr);
abort();
return 0;
}