diff options
author | Zheng Da <zhengda1936@gmail.com> | 2010-01-01 14:58:00 +0100 |
---|---|---|
committer | Zheng Da <zhengda1936@gmail.com> | 2010-01-01 14:58:00 +0100 |
commit | e87cd850f373309c7e71625a60fd0fbed6f16b88 (patch) | |
tree | 3c8febd55b966c756c01b67051aea0cabea87875 /libddekit/panic.c | |
parent | 7460caca37c30536b7b507d141cf5b7c51697cf3 (diff) |
check in panic.c
Diffstat (limited to 'libddekit/panic.c')
-rw-r--r-- | libddekit/panic.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libddekit/panic.c b/libddekit/panic.c new file mode 100644 index 00000000..40ba80f4 --- /dev/null +++ b/libddekit/panic.c @@ -0,0 +1,28 @@ +#include "ddekit/panic.h" +#include "ddekit/printf.h" + +#include <error.h> +#include <stdarg.h> + +void ddekit_panic(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + ddekit_vprintf(fmt, va); + va_end(va); + ddekit_printf("\n"); + + error (1, 0, "ddekit_panic()"); +} + +void ddekit_debug(char *fmt, ...) { + va_list va; + + va_start(va, fmt); + ddekit_vprintf(fmt, va); + va_end(va); + ddekit_printf("\n"); + + error (0, 0, "ddekit_debug()"); +} + |