Reflect progress in process title.

Submitted by:	flz
MFC after:	2 weeks
This commit is contained in:
des 2005-12-30 18:17:11 +00:00
parent 31d71e45b2
commit b2e56535e3

View File

@ -202,8 +202,12 @@ stat_display(struct xferstat *xs, int force)
fprintf(stderr, "\r%-46.46s", xs->name);
if (xs->size <= 0) {
setproctitle("%s [%s]", xs->name, stat_bytes(xs->rcvd));
fprintf(stderr, " %s", stat_bytes(xs->rcvd));
} else {
setproctitle("%s [%d%% of %s]", xs->name,
(int)((100.0 * xs->rcvd) / xs->size),
stat_bytes(xs->size));
fprintf(stderr, "%3d%% of %s",
(int)((100.0 * xs->rcvd) / xs->size),
stat_bytes(xs->size));