diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-04-30 20:13:59 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-04-30 20:13:59 +0000 |
commit | 9a6960e648022a8aaea5b761c3eb840f358b5b51 (patch) | |
tree | b0b55b6612b87e8e5361d6e7918185b0887ec19e | |
parent | 90c018e43472e2a8c17130272745dc247705e84d (diff) | |
download | drakx-backup-do-not-use-9a6960e648022a8aaea5b761c3eb840f358b5b51.tar drakx-backup-do-not-use-9a6960e648022a8aaea5b761c3eb840f358b5b51.tar.gz drakx-backup-do-not-use-9a6960e648022a8aaea5b761c3eb840f358b5b51.tar.bz2 drakx-backup-do-not-use-9a6960e648022a8aaea5b761c3eb840f358b5b51.tar.xz drakx-backup-do-not-use-9a6960e648022a8aaea5b761c3eb840f358b5b51.zip |
nicer layout for progressbar and statusreport, when update_progression
-rw-r--r-- | mdk-stage1/stdio-frontend.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mdk-stage1/stdio-frontend.c b/mdk-stage1/stdio-frontend.c index ec6601e9c..9033407de 100644 --- a/mdk-stage1/stdio-frontend.c +++ b/mdk-stage1/stdio-frontend.c @@ -211,20 +211,20 @@ void remove_wait_message(void) static int size_progress; static int actually_drawn; -#define PROGRESS_SIZE 60 +#define PROGRESS_SIZE 45 void init_progression(char *msg, int size) { int i; size_progress = size; - printf("%s\n", msg); + printf("%s ", msg); if (size) { - printf("["); actually_drawn = 0; for (i=0; i<PROGRESS_SIZE; i++) printf("."); - printf("]\033[G["); /* only works on ANSI-compatibles */ + printf("]\033[G%s [", msg); /* only works on ANSI-compatibles */ fflush(stdout); - } + } else + printf("\n"); } void update_progression(int current_size) @@ -236,7 +236,7 @@ void update_progression(int current_size) actually_drawn++; } } else - printf("\033[G%d bytes read", current_size); + printf("\033[GStatus: [%8d] bytes loaded...", current_size); fflush(stdout); } |