index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-03-05 15:09:14 -0800 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-03-06 09:28:13 +1000 |
commit | e578903b60081bb8a7ddd094ed67946d5e48b719 (patch) | |
tree | ee281dfe477f4f01ef037c197e2b67547d1876a8 /src | |
parent | aff69f43b1bd9cf602dd5bf2c0b6d1bbe5e336f2 (diff) |
-rw-r--r-- | src/pacman/callback.c | 18 |
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 548e2df2..8fb89b39 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -160,6 +160,16 @@ static void fill_progress(const int bar_percent, const int disp_percent, fflush(stdout); } +static void flush_output_list(void) { + alpm_list_t *i = NULL; + fflush(stdout); + for(i = output; i; i = i->next) { + fputs((const char *)i->data, stderr); + } + fflush(stderr); + FREELIST(output); +} + static int number_length(size_t n) { int digits = 1; @@ -610,14 +620,8 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent, fill_progress(percent, percent, cols - infolen); if(percent == 100) { - alpm_list_t *i = NULL; + flush_output_list(); on_progress = 0; - fflush(stdout); - for(i = output; i; i = i->next) { - fputs((const char *)i->data, stderr); - } - fflush(stderr); - FREELIST(output); } else { on_progress = 1; } |