From dca053702555260c6d77ff345ae1e214787b1373 Mon Sep 17 00:00:00 2001 From: jb Date: Fri, 20 Feb 1998 05:11:42 +0000 Subject: gcc wants to see long long variables passed to %q printf formats, so cast to that instead of quad_t. --- usr.bin/fetch/http.c | 6 +++--- usr.bin/fetch/main.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'usr.bin') 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 @@ -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 @@ -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)); } } -- cgit v1.1