diff options
author | phk <phk@FreeBSD.org> | 1996-10-31 14:24:35 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-10-31 14:24:35 +0000 |
commit | 7c5a2b76a65182b32831e0a0953769029b147570 (patch) | |
tree | 4fcbd22f89ec42d4f31491440bd9cb2b3493a588 /usr.bin/fetch | |
parent | fe5b7d008ff1dab070a4bbd588889a133844c5d6 (diff) | |
download | FreeBSD-src-7c5a2b76a65182b32831e0a0953769029b147570.zip FreeBSD-src-7c5a2b76a65182b32831e0a0953769029b147570.tar.gz |
bin/1933: don't print negative % for huge files (80Mb)
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c index 62a84fe..b9440bb 100644 --- a/usr.bin/fetch/main.c +++ b/usr.bin/fetch/main.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -/* $Id: main.c,v 1.24 1996/10/06 00:44:24 jmz Exp $ */ +/* $Id: main.c,v 1.25 1996/10/24 00:15:44 adam Exp $ */ #include <sys/types.h> #include <sys/socket.h> @@ -443,7 +443,9 @@ display (int size, int n) return; t0 = t; pr++; - if (size > 0) + if (size > 1000000) + printf ("\r%s: %2d%%", s, bytes/(size/100)); + else if (size > 0) printf ("\r%s: %2d%%", s, 100*bytes/size); else printf ("\r%s: %d Kbytes", s, bytes/1024); |