-/* $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.
#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 */
/*
/*
* 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 */
#endif
};
#define NSUFFIXES (int)(sizeof(suffixes) / sizeof(suffixes[0]))
+#endif
/*
* Display a transfer progress bar if progress is non-zero.
* 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 */
/*