diff options
author | Martin Szulecki | 2012-11-07 22:11:57 +0100 |
---|---|---|
committer | Martin Szulecki | 2012-11-07 22:11:57 +0100 |
commit | 3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b (patch) | |
tree | 124ea4690334903f57007fbf5efafd0730b320fb /src/common.h | |
parent | b65a7ce7ebca6730fce5dcbfd820d8ef4124e18f (diff) | |
download | idevicerestore-3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b.tar.gz idevicerestore-3bd16a8b8b79cd9af20260cdbd5d3ac7ee3dbd8b.tar.bz2 |
change info(), error(), and debug() into functions and allow redirecting the output
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 8 |
1 files changed, 4 insertions, 4 deletions
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); |