garbled [Thu, 12 Jan 2006 20:33:20 +0000 (20:33 +0000)]
Apply patch from PR bin/28717
This adds a -e option to progress which causes the progress bar to be
sent to stderr. This allows using progress mid-pipe, such as:
tar -cf . | progress -e bzip -1c | ssh host "cat > file"
Revert back to using an int (instead of size_t) for holding a value that may
be negative.
Fixes progressbar display on terminals <43 columns wide.
Bug noted and solution suggested by Gavan Fantom.
dsl [Wed, 23 Feb 2005 22:32:31 +0000 (22:32 +0000)]
Exit with any failure code from the cmd or gzip.
Decode gzip -l output with strtoimax() (not sscanf()) so we don't use an
uninitialised variable if the output format isn't what we expect.
This might fix some installation PRs (no error being reported)
lukem [Fri, 5 Mar 2004 05:58:29 +0000 (05:58 +0000)]
Explicitly use base 10 when parsing numbers, to enforce the "decimal number"
semantics that the comments referred to and as per dd(1) (which was the
origin of this functionality).
lukem [Mon, 27 Oct 2003 00:12:41 +0000 (00:12 +0000)]
Overhaul how `build.sh tools' are used:
* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
ross [Mon, 10 Feb 2003 09:10:01 +0000 (09:10 +0000)]
Fix a race that can abort a sysinst run.
Closes bin/20275, thank you Takao Shinohara: good analysis.
This program appeared less than 3 weeks ago and it has already been
pulled up to 1.6.1? At the last minute? And with serious bugs?
ISTM that the release branch isn't supposed to work that way. It
isn't stable, it had 4 patches in 2 days, and has averaged a
patch every 4 days during its short lifetime.
jhawk [Wed, 22 Jan 2003 00:14:12 +0000 (00:14 +0000)]
progress(1) is a standalone version of lukemftp's progress bar
(pulled in via reachover makefile) suitable for measuring the
input to arbitrary pipes.
This is intended for use by sysinst.
lukem [Fri, 29 Nov 2002 12:58:14 +0000 (12:58 +0000)]
add strsuftoll(3) and strsuftollx(3) - parse a string for a number
with an optional suffix, product (two numbers separated by `x'), and
provide range checking