diff options
author | jb <jb@FreeBSD.org> | 1998-02-20 05:11:42 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-02-20 05:11:42 +0000 |
commit | dca053702555260c6d77ff345ae1e214787b1373 (patch) | |
tree | fb897a1e517345fac616cb086ea233078f04ece7 /usr.bin/fetch | |
parent | 46dfb7f7cd6fe9eecacce7e586125f2264dc3524 (diff) | |
download | FreeBSD-src-dca053702555260c6d77ff345ae1e214787b1373.zip FreeBSD-src-dca053702555260c6d77ff345ae1e214787b1373.tar.gz |
gcc wants to see long long variables passed to %q printf formats, so
cast to that instead of quad_t.
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r-- | usr.bin/fetch/http.c | 6 | ||||
-rw-r--r-- | usr.bin/fetch/main.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c index bf6ca9c..0c87209 100644 --- a/usr.bin/fetch/http.c +++ b/usr.bin/fetch/http.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: http.c,v 1.15 1997/11/18 03:27:34 jdp Exp $ + * $Id: http.c,v 1.16 1997/11/22 01:00:42 fenner Exp $ */ #include <sys/types.h> @@ -382,7 +382,7 @@ static void html_display(FILE *remote) { char *line; - int linelen; + size_t linelen; int inbracket = 0; @@ -559,7 +559,7 @@ retry: addstr(iov, n, format_http_date(stab.st_mtime)); addstr(iov, n, "\r\n"); sprintf(rangebuf, "Range: bytes=%qd-\r\n", - (quad_t)stab.st_size); + (long long)stab.st_size); addstr(iov, n, rangebuf); } else if (errno != 0 || !S_ISREG(stab.st_mode)) { if (errno != 0) diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c index eca45a8..76fc64d 100644 --- a/usr.bin/fetch/main.c +++ b/usr.bin/fetch/main.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -/* $Id: main.c,v 1.42 1997/08/05 20:18:39 ache Exp $ */ +/* $Id: main.c,v 1.43 1997/08/19 01:57:53 asami Exp $ */ #include <sys/types.h> @@ -327,12 +327,12 @@ display(struct fetch_state *fs, off_t size, ssize_t n) if (size > 0) fprintf (stderr, "\r%s: 100%%", s); else - fprintf (stderr, "\r%s: %qd Kbytes", s, (quad_t)bytes/1024); + fprintf (stderr, "\r%s: %qd Kbytes", s, (long long)bytes/1024); } bytes -= bytestart; d = t.tv_sec + t.tv_usec/1.e6 - t_start.tv_sec - t_start.tv_usec/1.e6; fprintf (stderr, "\n%qd bytes transfered in %.1f seconds", - (quad_t)bytes, d); + (long long)bytes, d); d = bytes/d; if (d < 1000) fprintf (stderr, " (%.0f bytes/s)\n", d); @@ -352,11 +352,11 @@ display(struct fetch_state *fs, off_t size, ssize_t n) pr++; if(stdoutatty) { if (size > 1000000) - fprintf (stderr, "\r%s: %2qd%%", s, (quad_t)bytes/(size/100)); + fprintf (stderr, "\r%s: %2qd%%", s, (long long)(bytes/(size/100))); else if (size > 0) - fprintf (stderr, "\r%s: %2qd%%", s, (quad_t)100*bytes/size); + fprintf (stderr, "\r%s: %2qd%%", s, (long long)(100*bytes/size)); else - fprintf (stderr, "\r%s: %qd Kbytes", s, (quad_t)bytes/1024); + fprintf (stderr, "\r%s: %qd Kbytes", s, (long long)(bytes/1024)); } } |