summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-10-24 06:46:07 +0200
committerAaron Griffin <aaron@archlinux.org>2006-10-24 06:46:07 +0200
commit52363b43277aa250498d9f86e035fa070a917b67 (patch)
treeca7c36fb5cd76ec1848490d2c07b0a2ef1c1d0ad
parente21f4c8f2e7eb9f974c1bb1ecac03eb947982be6 (diff)
downloadpacman-52363b43277aa250498d9f86e035fa070a917b67.tar.gz
pacman-52363b43277aa250498d9f86e035fa070a917b67.tar.xz
Attempted fix for x86_64 - switched some unsigned char variables to ints, and
prefixed sync_fnm with the length when outputting - waiting for verification
-rw-r--r--src/pacman/download.c6
-rw-r--r--src/pacman/download.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pacman/download.c b/src/pacman/download.c
index 2b0ad096..1b28cccf 100644
--- a/src/pacman/download.c
+++ b/src/pacman/download.c
@@ -45,7 +45,7 @@ int offset;
struct timeval t0, t;
float rate;
int xfered1;
-unsigned char eta_h, eta_m, eta_s;
+unsigned int eta_h, eta_m, eta_s;
/* pacman options */
extern config_t *config;
@@ -105,9 +105,9 @@ int log_progress(netbuf *ctl, int xfered, void *arg)
}
if(rate > 1000) {
- printf("%s %6dK %6.0fK/s %02d:%02d:%02d [", sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
+ printf("%*s %6dK %6.0fK/s %02d:%02d:%02d [", PM_DLFNM_LEN, sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
} else {
- printf("%s %6dK %6.1fK/s %02d:%02d:%02d [", sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
+ printf("%*s %6dK %6.1fK/s %02d:%02d:%02d [", PM_DLFNM_LEN, sync_fnm, ((xfered+offset) / 1024), rate, eta_h, eta_m, eta_s);
}
cur = (int)((maxcols-57)*pct/100);
for(i = 0; i < maxcols-57; i++) {
diff --git a/src/pacman/download.h b/src/pacman/download.h
index fb65a4c0..80364f9c 100644
--- a/src/pacman/download.h
+++ b/src/pacman/download.h
@@ -26,7 +26,7 @@ extern int offset;
extern struct timeval t0, t;
extern float rate;
extern int xfered1;
-extern unsigned char eta_h, eta_m, eta_s;
+extern unsigned int eta_h, eta_m, eta_s;
#ifdef __FTPLIB_H
int log_progress(netbuf *ctl, int xfered, void *arg);