From 3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 7 Nov 2012 22:11:57 +0100 Subject: change info(), error(), and debug() into functions and allow redirecting the output --- src/common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index dae1eea..9a27262 100644 --- a/src/common.h +++ b/src/common.h @@ -31,10 +31,6 @@ extern "C" { #include "idevicerestore.h" -#define info(...) printf(__VA_ARGS__) -#define error(...) fprintf(stderr, __VA_ARGS__) -#define debug(...) if(idevicerestore_debug) fprintf(stderr, __VA_ARGS__) - #define MODE_UNKNOWN -1 #define MODE_WTF 0 #define MODE_DFU 1 @@ -102,6 +98,10 @@ static struct idevicerestore_mode_t idevicerestore_modes[] = { extern int idevicerestore_debug; +void info(const char* format, ...); +void error(const char* format, ...); +void debug(const char* format, ...); + void debug_plist(plist_t plist); void print_progress_bar(double progress); int read_file(const char* filename, void** data, size_t* size); -- cgit v1.1-32-gdbae