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/list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/list.c') diff --git a/src/pacman/list.c b/src/pacman/list.c index 0c271978..c95e8f3d 100644 --- a/src/pacman/list.c +++ b/src/pacman/list.c @@ -28,8 +28,6 @@ #include "util.h" #include "list.h" -extern int maxcols; - static list_t *list_last(list_t *list); list_t *list_new() @@ -127,6 +125,7 @@ void list_display(const char *title, list_t *list) if(list) { for(lp = list, cols = len; lp; lp = lp->next) { int s = strlen((char *)lp->data)+1; + unsigned int maxcols = getcols(); if(s+cols >= maxcols) { int i; cols = len; @@ -155,6 +154,7 @@ void pmlist_display(const char *title, pmlist_t *list) if(list) { for(lp = list, cols = len; lp; lp = alpm_list_next(lp)) { int s = strlen(alpm_list_getdata(lp))+1; + unsigned int maxcols = getcols(); if(s+cols >= maxcols) { int i; cols = len; -- cgit v1.2.3