diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 01:10:45 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 01:10:45 +0100 |
commit | 0ce905c057c3215d1fc1b1beb1900e206024afad (patch) | |
tree | df7be519469ad2cf28c949e64a9d996fc371cc7f /FICS/assert_error.c | |
parent | a44358a8d1fafce871ded8085a732e36720a181f (diff) |
Added _assert_error()
Diffstat (limited to 'FICS/assert_error.c')
-rw-r--r-- | FICS/assert_error.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/FICS/assert_error.c b/FICS/assert_error.c new file mode 100644 index 0000000..2d26491 --- /dev/null +++ b/FICS/assert_error.c @@ -0,0 +1,12 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "assert_error.h" + +__dead void +_assert_error(const char *file, const long int line) +{ + (void) fprintf(stderr, "Assertion failed: file %s, line %ld.\n", + file, line); + abort(); +} |