aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmc <jmc@NetBSD.org>2005-02-10 16:00:28 +0000
committerjmc <jmc@NetBSD.org>2005-02-10 16:00:28 +0000
commit85b5b7e2b20d528e3b292201aad9fb984011841a (patch)
treea189c117f0ad7076c41ae83fe9eff677c4b35f84
parenta8edcff75598aec0dbe14c2054d0381918877049 (diff)
downloadbsd-progress-85b5b7e2b20d528e3b292201aad9fb984011841a.tar.gz
bsd-progress-85b5b7e2b20d528e3b292201aad9fb984011841a.tar.zst
bsd-progress-85b5b7e2b20d528e3b292201aad9fb984011841a.zip
Fix compilation issues for NO_PROGRESS
-rw-r--r--progressbar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/progressbar.c b/progressbar.c
index 9c09147..d139490 100644
--- a/progressbar.c
+++ b/progressbar.c
@@ -1,4 +1,4 @@
-/* $NetBSD: progressbar.c,v 1.5 2004/03/09 17:04:24 hubertf Exp $ */
+/* $NetBSD: progressbar.c,v 1.6 2005/02/10 16:00:28 jmc Exp $ */
/*-
* Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.5 2004/03/09 17:04:24 hubertf Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.6 2005/02/10 16:00:28 jmc Exp $");
#endif /* not lint */
/*
@@ -76,7 +76,6 @@ foregroundproc(void)
#endif /* !defined(NO_PROGRESS) */
-#ifndef NO_PROGRESS
static void updateprogressmeter(int);
/*
@@ -90,8 +89,6 @@ updateprogressmeter(int dummy)
progressmeter(0);
errno = oerrno;
}
-#endif /* NO_PROGRESS */
-
/*
* List of order of magnitude prefixes.
@@ -124,7 +121,7 @@ progressmeter(int flag)
struct timeval td;
off_t abbrevsize, bytespersec;
double elapsed;
- int ratio, barlength, i, len, remaining;
+ int ratio, barlength, i, remaining;
/*
* Work variables for progress bar.
@@ -134,7 +131,10 @@ progressmeter(int flag)
* `static' portion of it), be sure to update
* these appropriately.
*/
+#endif
+ int len;
char buf[256]; /* workspace for progress bar */
+#ifndef NO_PROGRESS
#define BAROVERHEAD 43 /* non `*' portion of progress bar */
/*
* stars should contain at least