Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp make this compile again with -DNO_PROGRESS



details:   https://anonhg.NetBSD.org/src/rev/5130d1e2b310
branches:  trunk
changeset: 842280:5130d1e2b310
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 22 23:40:33 2019 +0000

description:
make this compile again with -DNO_PROGRESS

diffstat:

 usr.bin/ftp/progressbar.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 69215ad18a01 -r 5130d1e2b310 usr.bin/ftp/progressbar.c
--- a/usr.bin/ftp/progressbar.c Sat Jun 22 22:50:39 2019 +0000
+++ b/usr.bin/ftp/progressbar.c Sat Jun 22 23:40:33 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: progressbar.c,v 1.22 2012/06/27 22:07:36 riastradh Exp $       */
+/*     $NetBSD: progressbar.c,v 1.23 2019/06/22 23:40:33 christos Exp $        */
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.22 2012/06/27 22:07:36 riastradh Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.23 2019/06/22 23:40:33 christos Exp $");
 #endif /* not lint */
 
 /*
@@ -87,6 +87,7 @@
 /*
  * List of order of magnitude suffixes, per IEC 60027-2.
  */
+#if !defined(NO_PROGRESS) || !defined(STANDALONE_PROGRESS)
 static const char * const suffixes[] = {
        "",     /* 2^0  (byte) */
        "KiB",  /* 2^10 Kibibyte */
@@ -102,6 +103,7 @@
 #endif
 };
 #define NSUFFIXES      (int)(sizeof(suffixes) / sizeof(suffixes[0]))
+#endif
 
 /*
  * Display a transfer progress bar if progress is non-zero.
@@ -139,8 +141,10 @@
                         *      these appropriately.
                         */
 #endif
+#if !defined(NO_PROGRESS) || !defined(STANDALONE_PROGRESS)
        size_t          len;
        char            buf[256];       /* workspace for progress bar */
+#endif
 #ifndef NO_PROGRESS
 #define        BAROVERHEAD     45              /* non `*' portion of progress bar */
                                        /*



Home | Main Index | Thread Index | Old Index