From 54691771831c97c7366bf8ee7c54da3952c22120 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 22 Nov 2006 04:53:10 +0000 Subject: 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 --- src/pacman/downloadprog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pacman/downloadprog.c') 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; -- cgit v1.2.3