1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00

Attempted fix for x86_64 - switched some unsigned char variables to ints, and

prefixed sync_fnm with the length when outputting - waiting for verification
This commit is contained in:
Aaron Griffin 2006-10-24 04:46:07 +00:00
parent e21f4c8f2e
commit 52363b4327
2 changed files with 4 additions and 4 deletions

View File

@ -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++) {

View File

@ -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);