summaryrefslogtreecommitdiffstats
path: root/src/pacman/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/trans.c')
-rw-r--r--src/pacman/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/trans.c b/src/pacman/trans.c
index 0b141906..1b9295e1 100644
--- a/src/pacman/trans.c
+++ b/src/pacman/trans.c
@@ -40,7 +40,6 @@
#define LOG_STR_LEN 256
extern config_t *config;
-extern unsigned int maxcols;
int prevpercent=0; /* for less progressbar output */
@@ -154,6 +153,7 @@ void cb_trans_evt(unsigned char event, void *data1, void *data2)
break;
case PM_TRANS_EVT_RETRIEVE_LOCAL:
MSG(NL, " %s [", (char*)data1);
+ unsigned int maxcols = getcols();
STRNCPY(out, (char*)data2, maxcols-42);
MSG(CL, "%s", out);
for(i = strlen(out); i < maxcols-43; i++) {
@@ -287,6 +287,7 @@ void cb_trans_progress(unsigned char event, char *pkgname, int percent, int howm
static int lasthash = 0, mouth = 0;
int i, hash;
long chomp = 0;
+ unsigned int maxcols = getcols();
unsigned int maxpkglen, progresslen = maxcols - 57;
char *ptr = NULL;