diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-11-22 05:53:10 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-11-22 05:53:10 +0100 |
commit | 54691771831c97c7366bf8ee7c54da3952c22120 (patch) | |
tree | 6db658673d8009bb798c7c053621d431d171c891 /src/pacman/downloadprog.c | |
parent | 3c7f616805b4e7b29a1b5ef8cf218627c9da34bd (diff) | |
download | pacman-54691771831c97c7366bf8ee7c54da3952c22120.tar.gz pacman-54691771831c97c7366bf8ee7c54da3952c22120.tar.xz |
Removed global maxcols - it is looked up on the fly now, so the progress bar is
resized. Also used ioctl in place of the COLUMNS env variable
Diffstat (limited to 'src/pacman/downloadprog.c')
-rw-r--r-- | src/pacman/downloadprog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c index f831656b..06345782 100644 --- a/src/pacman/downloadprog.c +++ b/src/pacman/downloadprog.c @@ -47,8 +47,6 @@ struct timeval initial_time; /* pacman options */ extern config_t *config; -extern unsigned int maxcols; - #define FILENAME_TRIM_LEN 21 #define UPDATE_SPEED_SEC 0.1 @@ -58,6 +56,7 @@ void log_progress(const char *filename, int xfered, int total) int i, hash; long chomp = 0; char *fname, *p; + unsigned int maxcols = getcols(); unsigned int progresslen = maxcols - 57; int percent = ((float)xfered) / ((float)total) * 100; struct timeval current_time; |