diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 |
commit | e1265fa32837f457ee2c2fa259d12c9545af4bbf (patch) | |
tree | 64b8d5f1c81c14f019047b0cb00cb77c2dcecf55 /error.c | |
parent | a37beb44d59cca329d0d9345c21505af81030688 (diff) | |
download | ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.gz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.bz2 ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.xz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.zip |
First stand-alone ipecamera implementation
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/error.c b/error.c deleted file mode 100644 index b4f6e2e..0000000 --- a/error.c +++ /dev/null @@ -1,27 +0,0 @@ -#define _PCILIB_ERROR_C - -#include <stdio.h> -#include <stdarg.h> - -#include "error.h" - -static void pcilib_print_error(const char *msg, ...) { - va_list va; - - va_start(va, msg); - vprintf(msg, va); - va_end(va); - 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; - else pcilib_error = pcilib_print_error; - if (warn) pcilib_warning = warn; - else pcilib_warning = pcilib_print_error; - - return 0; -} |