summaryrefslogtreecommitdiff
path: root/src/pacman/callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r--src/pacman/callback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 9fd9cc43..61f517c9 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -384,7 +384,7 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent,
int len, wclen, wcwid, padwid;
wchar_t *wcstr;
- const unsigned short cols = getcols();
+ const unsigned short cols = getcols(fileno(stdout));
if(config->noprogressbar || cols == 0) {
return;
@@ -544,7 +544,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
const char *rate_label, *xfered_label;
int file_percent = 0, total_percent = 0;
- const unsigned short cols = getcols();
+ const unsigned short cols = getcols(fileno(stdout));
if(config->noprogressbar || cols == 0 || file_total == -1) {
if(file_xfered == 0) {