f248c8e23563389c79a0e378b1a150e8f6ce72f8
[reactos.git] / reactos / lib / sdk / crt / misc / assert.c
1 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2 #include <assert.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <signal.h>
6
7
8 /*
9 * @implemented
10 */
11 void _assert(const char *msg, const char *file, unsigned line)
12 {
13 /* Assertion failed at foo.c line 45: x<y */
14 fprintf(stderr, "Assertion failed at %s line %d: %s\n", file, line, msg);
15 DPRINT1("Assertion failed at %s line %d: %s\n", file, line, msg);
16 raise(SIGABRT);
17 for(;;); /* eliminate warning by mingw */
18 }