diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 16:47:49 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 16:47:49 +0300 |
commit | 0a131418899436b58a163978176d99c08cbddb0c (patch) | |
tree | abd0fe5c52ee39fca31ba562c934dbd6d0584705 /src/apk_print.h | |
parent | 92764088a2b09d4e322d21e769ecb51bb5f3b17c (diff) | |
download | apk-tools-0a131418899436b58a163978176d99c08cbddb0c.tar.gz apk-tools-0a131418899436b58a163978176d99c08cbddb0c.tar.bz2 apk-tools-0a131418899436b58a163978176d99c08cbddb0c.tar.xz apk-tools-0a131418899436b58a163978176d99c08cbddb0c.zip |
print: move progress printing to common functions
Diffstat (limited to 'src/apk_print.h')
-rw-r--r-- | src/apk_print.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/apk_print.h b/src/apk_print.h index 4c004be..61e27d4 100644 --- a/src/apk_print.h +++ b/src/apk_print.h @@ -18,6 +18,8 @@ #define apk_warning(args...) do { if (apk_verbosity > 0) { apk_log("WARNING: ", args); } } while (0) #define apk_message(args...) do { if (apk_verbosity > 0) { apk_log(NULL, args); } } while (0) +extern int apk_progress_fd; + void apk_log(const char *prefix, const char *format, ...); const char *apk_error_str(int error); @@ -29,7 +31,11 @@ struct apk_indent { int indent; }; -int apk_print_indented(struct apk_indent *i, apk_blob_t blob); +#define APK_PRINT_PROGRESS_MASK 0xff +#define APK_PRINT_PROGRESS_FORCE 0x100 + +void apk_print_progress(int percent); +int apk_print_indented(struct apk_indent *i, apk_blob_t blob); void apk_print_indented_words(struct apk_indent *i, const char *text); void apk_print_indented_fmt(struct apk_indent *i, const char *fmt, ...); |