mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
implementation of debug assert
svn path=/trunk/; revision=266
This commit is contained in:
parent
e66f3f0e7b
commit
d9625dff78
1 changed files with 13 additions and 0 deletions
13
reactos/lib/crtdll/assert/assert.c
Normal file
13
reactos/lib/crtdll/assert/assert.c
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
void _assert(const char *msg, const char *file, int line)
|
||||||
|
{
|
||||||
|
/* Assertion failed at foo.c line 45: x<y */
|
||||||
|
fprintf(stderr, "Assertion failed at %s line %d: %s\n", file, line, msg);
|
||||||
|
raise(SIGABRT);
|
||||||
|
exit(1);
|
||||||
|
}
|
Loading…
Reference in a new issue