diff options
author | christos <christos@NetBSD.org> | 2019-06-22 23:40:33 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 2019-06-22 23:40:33 +0000 |
commit | bd2a5ade07560e428a57d482f1a336b08b14f2e0 (patch) | |
tree | 700ed7200ad6d84bf65ea76ce4f2553dabfba367 | |
parent | 5994883dc8b56e9b2049283bddff54f3962ed6c9 (diff) | |
download | bsd-progress-bd2a5ade07560e428a57d482f1a336b08b14f2e0.tar.gz bsd-progress-bd2a5ade07560e428a57d482f1a336b08b14f2e0.tar.zst bsd-progress-bd2a5ade07560e428a57d482f1a336b08b14f2e0.zip |
make this compile again with -DNO_PROGRESS
-rw-r--r-- | progressbar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/progressbar.c b/progressbar.c index 2350776..a6218bd 100644 --- a/progressbar.c +++ b/progressbar.c @@ -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 @@ updateprogressmeter(int dummy) /* * 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 @@ static const char * const suffixes[] = { #endif }; #define NSUFFIXES (int)(sizeof(suffixes) / sizeof(suffixes[0])) +#endif /* * Display a transfer progress bar if progress is non-zero. @@ -139,8 +141,10 @@ progressmeter(int flag) * 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 */ /* |