diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-01-02 10:09:37 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-01-02 10:09:37 +0800 |
| commit | 1c8e37f63d413a559825020289178d442537449e (patch) | |
| tree | 9779a712b5eec91035272e7646eb6811979d7eab /src/ulib/assert.c | |
| parent | d8eaa13f2efc1eeca4e5f230d5a2d535aaf27338 (diff) | |
| download | lume-1c8e37f63d413a559825020289178d442537449e.tar.gz lume-1c8e37f63d413a559825020289178d442537449e.tar.xz | |
dev(sell): add simple libc and implement shell
please see the log for detail.
Diffstat (limited to 'src/ulib/assert.c')
| -rw-r--r-- | src/ulib/assert.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ulib/assert.c b/src/ulib/assert.c new file mode 100644 index 0000000..ca2da84 --- /dev/null +++ b/src/ulib/assert.c @@ -0,0 +1,8 @@ +#include "stdio.h" +#include "stdlib.h" + +void __assert_fail(const char *expr, const char *file, int line, const char *func) +{ + fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); + abort(); +}
\ No newline at end of file |
