summaryrefslogtreecommitdiff
path: root/client/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/util.c')
-rw-r--r--client/util.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/client/util.c b/client/util.c
new file mode 100644
index 00000000..65a1fb20
--- /dev/null
+++ b/client/util.c
@@ -0,0 +1,40 @@
+/*
+ * BIRD Client -- Utility Functions
+ *
+ * (c) 1999--2000 Martin Mares <mj@ucw.cz>
+ *
+ * Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "nest/bird.h"
+#include "client/client.h"
+
+/* Client versions of logging functions */
+
+void
+bug(char *msg, ...)
+{
+ va_list args;
+
+ va_start(args, msg);
+ fputs("Internal error: ", stderr);
+ vfprintf(stderr, msg, args);
+ fputc('\n', stderr);
+ exit(1);
+}
+
+void
+die(char *msg, ...)
+{
+ va_list args;
+
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ fputc('\n', stderr);
+ exit(1);
+}