summaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/error.c b/error.c
index b4f6e2e..f242209 100644
--- a/error.c
+++ b/error.c
@@ -1,11 +1,10 @@
-#define _PCILIB_ERROR_C
-
#include <stdio.h>
#include <stdarg.h>
+#include "config.h"
#include "error.h"
-static void pcilib_print_error(const char *msg, ...) {
+void pcilib_print_error(const char *msg, ...) {
va_list va;
va_start(va, msg);
@@ -14,8 +13,6 @@ static void pcilib_print_error(const char *msg, ...) {
printf("\n");
}
-void (*pcilib_error)(const char *msg, ...) = pcilib_print_error;
-void (*pcilib_warning)(const char *msg, ...) = pcilib_print_error;
int pcilib_set_error_handler(void (*err)(const char *msg, ...), void (*warn)(const char *msg, ...)) {
if (err) pcilib_error = err;