gcc wants to see long long variables passed to %q printf formats, so
cast to that instead of quad_t.
This commit is contained in:
parent
2ffc763234
commit
5362bb64c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33654
@ -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 @@ http_retrieve(struct fetch_state *fs)
|
||||
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)
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user