summaryrefslogtreecommitdiff
path: root/libddekit/panic.c
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-01-01 14:58:00 +0100
committerZheng Da <zhengda1936@gmail.com>2010-01-01 14:58:00 +0100
commite87cd850f373309c7e71625a60fd0fbed6f16b88 (patch)
tree3c8febd55b966c756c01b67051aea0cabea87875 /libddekit/panic.c
parent7460caca37c30536b7b507d141cf5b7c51697cf3 (diff)
check in panic.c
Diffstat (limited to 'libddekit/panic.c')
-rw-r--r--libddekit/panic.c28
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()");
+}
+