summaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-04-20 22:01:04 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-04-20 22:01:04 +0200
commit77c4d6e67debf0e729734d882df033c4c0f5b0c3 (patch)
tree4a59e86332d6cc78fc5c97110ecba281b0f67bc9 /error.c
parent0002c0cc260a6a8e2b6c53f19ae99a625eca4355 (diff)
downloadpcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.gz
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.bz2
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.tar.xz
pcitool-77c4d6e67debf0e729734d882df033c4c0f5b0c3.zip
Big redign of model structures
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;