forked from KolibriOS/kolibrios
libc testsuite + fixes
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
21
programs/develop/ktcc/trunk/libc/stdlib/assert.c
Normal file
21
programs/develop/ktcc/trunk/libc/stdlib/assert.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <kolibrisys.h>
|
||||
|
||||
|
||||
void __assert_func (char *file, int line, char *ass)
|
||||
{
|
||||
char buf[100];
|
||||
|
||||
snprintf(buf,100,"Assertion failed: %s, file %s, line %d\n", ass, file, line);
|
||||
debug_out_str(buf);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
void __trace_func (char *file, int line, char *msg)
|
||||
{
|
||||
char buf[100];
|
||||
snprintf(buf,100,"Trace: %s, file %s, line %d\n", msg, file, line);
|
||||
debug_out_str(buf);
|
||||
}
|
Reference in New Issue
Block a user