Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp * use %lld instead of %qd to print out (long lon...
details: https://anonhg.NetBSD.org/src/rev/6b61412f6e77
branches: trunk
changeset: 476673:6b61412f6e77
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Sep 24 14:28:14 1999 +0000
description:
* use %lld instead of %qd to print out (long long) vars.
(slightly more portable; e.g, solaris supports this)
* remove some fluff (lint)
diffstat:
usr.bin/ftp/cmds.c | 8 ++++----
usr.bin/ftp/complete.c | 7 +++----
usr.bin/ftp/fetch.c | 10 +++++-----
usr.bin/ftp/ftp.c | 12 ++++++------
usr.bin/ftp/util.c | 12 ++++++------
5 files changed, 24 insertions(+), 25 deletions(-)
diffs (217 lines):
diff -r 1bbbcf8df63d -r 6b61412f6e77 usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c Fri Sep 24 13:35:21 1999 +0000
+++ b/usr.bin/ftp/cmds.c Fri Sep 24 14:28:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.60 1999/09/24 12:52:18 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.61 1999/09/24 14:28:14 lukem Exp $ */
/*
* Copyright (C) 1997 and 1998 WIDE Project.
@@ -107,7 +107,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: cmds.c,v 1.60 1999/09/24 12:52:18 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.61 1999/09/24 14:28:14 lukem Exp $");
#endif
#endif /* not lint */
@@ -2197,7 +2197,7 @@
else
fprintf(ttyout,
#ifndef NO_QUAD
- "Restarting at %qd for next get, put or append\n",
+ "Restarting at %lld for next get, put or append\n",
(long long)restart_point);
#else
"Restarting at %ld for next get, put or append\n",
@@ -2300,7 +2300,7 @@
if (size != -1)
fprintf(ttyout,
#ifndef NO_QUAD
- "%s\t%qd\n", argv[1], (long long)size);
+ "%s\t%lld\n", argv[1], (long long)size);
#else
"%s\t%ld\n", argv[1], (long)size);
#endif
diff -r 1bbbcf8df63d -r 6b61412f6e77 usr.bin/ftp/complete.c
--- a/usr.bin/ftp/complete.c Fri Sep 24 13:35:21 1999 +0000
+++ b/usr.bin/ftp/complete.c Fri Sep 24 14:28:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: complete.c,v 1.28 1999/09/24 05:35:09 lukem Exp $ */
+/* $NetBSD: complete.c,v 1.29 1999/09/24 14:28:14 lukem Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: complete.c,v 1.28 1999/09/24 05:35:09 lukem Exp $");
+__RCSID("$NetBSD: complete.c,v 1.29 1999/09/24 14:28:14 lukem Exp $");
#endif /* not lint */
/*
@@ -411,8 +411,7 @@
default:
return (CC_ERROR);
}
-
- return (CC_ERROR);
+ /* NOTREACHED */
}
#endif /* !NO_EDITCOMPLETE */
diff -r 1bbbcf8df63d -r 6b61412f6e77 usr.bin/ftp/fetch.c
--- a/usr.bin/ftp/fetch.c Fri Sep 24 13:35:21 1999 +0000
+++ b/usr.bin/ftp/fetch.c Fri Sep 24 14:28:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.74 1999/09/24 06:57:37 lukem Exp $ */
+/* $NetBSD: fetch.c,v 1.75 1999/09/24 14:28:14 lukem Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.74 1999/09/24 06:57:37 lukem Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.75 1999/09/24 14:28:14 lukem Exp $");
#endif /* not lint */
/*
@@ -237,7 +237,7 @@
if (EMPTYSTRING(url))
return;
- p = q = url;
+ p = q = (unsigned char *)url;
#define HEXTOINT(x) (x - (isdigit(x) ? '0' : (islower(x) ? 'a' : 'A') - 10))
while (*p) {
@@ -853,7 +853,7 @@
if (debug)
fprintf(ttyout,
#ifndef NO_QUAD
- "parsed length as: %qd\n",
+ "parsed length as: %lld\n",
(long long)filesize);
#else
"parsed length as: %ld\n",
@@ -1082,7 +1082,7 @@
if (debug)
fprintf(ttyout,
#ifndef NO_QUAD
- "got chunksize of %qd\n",
+ "got chunksize of %lld\n",
(long long)chunksize);
#else
"got chunksize of %ld\n",
diff -r 1bbbcf8df63d -r 6b61412f6e77 usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Fri Sep 24 13:35:21 1999 +0000
+++ b/usr.bin/ftp/ftp.c Fri Sep 24 14:28:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.65 1999/09/24 06:57:37 lukem Exp $ */
+/* $NetBSD: ftp.c,v 1.66 1999/09/24 14:28:14 lukem Exp $ */
/*
* Copyright (C) 1997 and 1998 WIDE Project.
@@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.65 1999/09/24 06:57:37 lukem Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.66 1999/09/24 14:28:14 lukem Exp $");
#endif
#endif /* not lint */
@@ -760,7 +760,7 @@
goto cleanupsend;
}
#ifndef NO_QUAD
- if (command("REST %qd", (long long) restart_point) !=
+ if (command("REST %lld", (long long) restart_point) !=
#else
if (command("REST %ld", (long) restart_point) !=
#endif
@@ -1092,7 +1092,7 @@
goto abort;
if (is_retr && restart_point &&
#ifndef NO_QUAD
- command("REST %qd", (long long) restart_point) != CONTINUE)
+ command("REST %lld", (long long) restart_point) != CONTINUE)
#else
command("REST %ld", (long) restart_point) != CONTINUE)
#endif
@@ -1933,7 +1933,7 @@
oldintr = signal(SIGINT, abortpt);
if ((restart_point &&
#ifndef NO_QUAD
- (command("REST %qd", (long long) restart_point) != CONTINUE)
+ (command("REST %lld", (long long) restart_point) != CONTINUE)
#else
(command("REST %ld", (long) restart_point) != CONTINUE)
#endif
@@ -1947,7 +1947,7 @@
secndflag++;
if ((restart_point &&
#ifndef NO_QUAD
- (command("REST %qd", (long long) restart_point) != CONTINUE)
+ (command("REST %lld", (long long) restart_point) != CONTINUE)
#else
(command("REST %ld", (long) restart_point) != CONTINUE)
#endif
diff -r 1bbbcf8df63d -r 6b61412f6e77 usr.bin/ftp/util.c
--- a/usr.bin/ftp/util.c Fri Sep 24 13:35:21 1999 +0000
+++ b/usr.bin/ftp/util.c Fri Sep 24 14:28:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.59 1999/09/24 00:48:24 lukem Exp $ */
+/* $NetBSD: util.c,v 1.60 1999/09/24 14:28:14 lukem Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.59 1999/09/24 00:48:24 lukem Exp $");
+__RCSID("$NetBSD: util.c,v 1.60 1999/09/24 14:28:14 lukem Exp $");
#endif /* not lint */
/*
@@ -893,7 +893,7 @@
abbrevsize >>= 10;
len += sprintf(buf + len,
#ifndef NO_QUAD
- " %5qd %c%c ", (long long)abbrevsize,
+ " %5lld %c%c ", (long long)abbrevsize,
#else
" %5ld %c%c ", (long)abbrevsize,
#endif
@@ -913,7 +913,7 @@
bytespersec >>= 10;
len += sprintf(buf + len,
#ifndef NO_QUAD
- " %3qd.%02d %cB/s ", (long long)bytespersec / 1024,
+ " %3lld.%02d %cB/s ", (long long)bytespersec / 1024,
#else
" %3ld.%02d %cB/s ", (long)bytespersec / 1024,
#endif
@@ -995,7 +995,7 @@
len = 0;
len += sprintf(buf + len,
#ifndef NO_QUAD
- "%qd byte%s %s in ", (long long)bytes,
+ "%lld byte%s %s in ", (long long)bytes,
#else
"%ld byte%s %s in ", (long)bytes,
#endif
@@ -1019,7 +1019,7 @@
bytespersec >>= 10;
len += sprintf(buf + len,
#ifndef NO_QUAD
- "(%qd.%02d %cB/s)", (long long)bytespersec / 1024,
+ "(%lld.%02d %cB/s)", (long long)bytespersec / 1024,
#else
"(%ld.%02d %cB/s)", (long)bytespersec / 1024,
#endif
Home |
Main Index |
Thread Index |
Old Index