summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.h
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-07 14:24:08 +0800
committerGravatar rcg4u2010-06-09 17:17:29 +0800
commita274554b753880dd7042b6013d0158a0b81124c7 (patch)
treeb114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/idevicerestore.h
parent9279f889d7e296880fd7ea9d6c7cec499db62ea4 (diff)
downloadidevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.gz
idevicerestore-a274554b753880dd7042b6013d0158a0b81124c7.tar.bz2
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r--src/idevicerestore.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index af66892..f92aad2 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -111,4 +111,18 @@ inline static void debug_plist(plist_t plist) {
free(data);
}
+inline static void print_progress_bar(const char* operation, double progress) {
+ int i = 0;
+ if(progress < 0) return;
+ if(progress > 100) progress = 100;
+ info("\r%s [", operation);
+ for(i = 0; i < 50; i++) {
+ if(i < progress / 2) info("=");
+ else info(" ");
+ }
+ info("] %3.1f%%", progress);
+ if(progress == 100) info("\n");
+ fflush(stdout);
+}
+
#endif