-/* $NetBSD: progressbar.h,v 1.1 2003/01/21 16:08:08 jhawk Exp $ */
+/* $NetBSD: progressbar.h,v 1.2 2003/02/12 15:18:28 grant Exp $ */
/*-
* Copyright (c) 1996-2002 The NetBSD Foundation, Inc.
GLOBAL sigjmp_buf toplevel; /* non-local goto stuff for cmd scanner */
#endif /* !STANDALONE_PROGRESS */
+int foregroundproc(void);
void alarmtimer(int);
void progressmeter(int);
sigfunc xsignal(int, sigfunc);
sigfunc xsignal_restart(int, sigfunc, int);
#ifndef STANDALONE_PROGRESS
-int foregroundproc(void);
void psummary(int);
void ptransfer(int);
#endif /* !STANDALONE_PROGRESS */
-/* $NetBSD: progressbar.c,v 1.1 2003/01/21 16:08:08 jhawk Exp $ */
+/* $NetBSD: progressbar.c,v 1.2 2003/02/12 15:18:28 grant Exp $ */
/*-
* Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.1 2003/01/21 16:08:08 jhawk Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.2 2003/02/12 15:18:28 grant Exp $");
#endif /* not lint */
/*
#include "progressbar.h"
-#if !defined(NO_PROGRESS) && !defined(STANDALONE_PROGRESS)
+#if !defined(NO_PROGRESS)
/*
* return non-zero if we're the current foreground process
*/
return (tcgetpgrp(fileno(ttyout)) == pgrp);
}
-#endif /* !defined(NO_PROGRESS) && !defined(STANDALONE_PROGRESS) */
+#endif /* !defined(NO_PROGRESS) */
#ifndef NO_PROGRESS
return;
len = 0;
-#ifndef STANDALONE_PROGRESS
/*
* print progress bar only if we are foreground process.
*/
if (! foregroundproc())
return;
-#endif /* !STANDALONE_PROGRESS */
-
len += snprintf(buf + len, BUFLEFT, "\r");
if (filesize > 0) {