pv-1.2.0/ 0000755 0000764 0000764 00000000000 11501641001 007734 5 ustar aw aw pv-1.2.0/doc/ 0000755 0000764 0000764 00000000000 11501641001 010501 5 ustar aw aw pv-1.2.0/doc/spec.in 0000644 0000764 0000764 00000011377 11501640520 012001 0 ustar aw aw Summary: Monitor the progress of data through a pipe
Name: @PACKAGE@
Version: @VERSION@
Release: 1%{?dist}
License: Artistic 2.0
Group: Development/Tools
Source: http://www.ivarch.com/programs/sources/@PACKAGE@-@VERSION@.tar.gz
Url: http://www.ivarch.com/programs/pv.shtml
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext
%description
PV ("Pipe Viewer") is a tool for monitoring the progress of data through a
pipeline. It can be inserted into any normal pipeline between two processes
to give a visual indication of how quickly data is passing through, how long
it has taken, how near to completion it is, and an estimate of how long it
will be until completion.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man1
mkdir -p "$RPM_BUILD_ROOT"/usr/share/locale
make DESTDIR="$RPM_BUILD_ROOT" install
%find_lang %{name}
%check
make test
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%doc README doc/NEWS doc/TODO doc/COPYING
%changelog
* Tue Dec 14 2010 Andrew Wood 1.2.0-1
- Integrated improved SI prefixes and --average-rate (Henry Gebhardt).
- Return nonzero if exiting due to SIGTERM (Martin Baum).
- Patch from Phil Rutschman to restore terminal properly on exit.
- Fix i18n especially for --help (Sebastian Kayser).
- Refactored pv_display.
- We now have a coherent, documented, exit status.
- Modified pipe test and new cksum test from Sebastian Kayser.
- Default CFLAGS to just "-O" for non-GCC (Kjetil Torgrim Homme).
- LFS compile fix for OS X 10.4 (Alexandre de Verteuil).
- Remove DESTDIR / suffix (Sam Nelson, Daniel Pape).
- Fixed potential NULL deref in transfer (Elias Pipping / LLVM/Clang).
* Thu Mar 6 2008 Andrew Wood 1.1.4-1
- Trap SIGINT/SIGHUP/SIGTERM so we clean up IPCs on exit (Laszlo Ersek).
- Abort if numeric option, eg -L, has non-numeric value (Boris Lohner).
- Compilation fixes for Darwin 9 and OS X.
* Thu Aug 30 2007 Andrew Wood 1.1.0-1
- New option "-R" to remotely control another @PACKAGE@ process.
- New option "-l" to count lines instead of bytes.
- Performance improvement for "-L" (rate) option.
- Some Mac OS X fixes, and packaging cleanups.
* Sat Aug 4 2007 Andrew Wood 1.0.1-1
- Changed license from Artistic to Artistic 2.0.
- Removed "--license" option.
* Thu Aug 2 2007 Andrew Wood 1.0.0-1
- We now act more like "cat" - just skip unreadable files, don't abort.
- Various code cleanups were done.
* Mon Feb 5 2007 Andrew Wood 0.9.9-1
- New option "-B" to set the buffer size, and a workaround for problems
- piping to dd(1).
* Mon Feb 27 2006 Andrew Wood
- Minor bugfixes, and on the final update, blank out the now-zero ETA.
* Thu Sep 1 2005 Andrew Wood
- Terminal locking now uses lockfiles if the terminal itself cannot be locked.
* Thu Jun 16 2005 Andrew Wood
- A minor problem with the spec file was fixed.
* Mon Nov 15 2004 Andrew Wood
- A minor bug in the NLS code was fixed.
* Sat Nov 6 2004 Andrew Wood
- Code cleanups and minor usability fixes.
* Tue Jun 29 2004 Andrew Wood
- A port of the terminal locking code to FreeBSD.
* Sun May 2 2004 Andrew Wood
- Major reliability improvements to the cursor positioning.
* Sat Apr 24 2004 Andrew Wood
- Rate and size parameters can now take suffixes such as "k", "m" etc.
* Mon Apr 19 2004 Andrew Wood
- A bug in the cursor positioning was fixed.
* Thu Feb 12 2004 Andrew Wood
- Code cleanups and portability fixes.
* Sun Feb 8 2004 Andrew Wood
- The display buffer is now dynamically allocated, fixing an overflow bug.
* Wed Jan 14 2004 Andrew Wood
- A minor bug triggered when installing the RPM was fixed.
* Mon Dec 22 2003 Andrew Wood
- Fixed a minor bug that occasionally reported "resource unavailable".
* Wed Aug 6 2003 Andrew Wood
- Block devices now have their size read correctly, so pv /dev/hda1 works
- Minor code cleanups (mainly removal of CVS "Id" tags)
* Sun Aug 3 2003 Andrew Wood
- Doing ^Z then "bg" then "fg" now continues displaying
* Tue Jul 16 2002 Andrew Wood
- First draft of spec file created.
pv-1.2.0/doc/lsm.in 0000644 0000764 0000764 00000001256 11501640341 011636 0 ustar aw aw Begin3
Title: @PACKAGE@
Version: @VERSION@
Entered-date: 14DEC10
Description: A tool for monitoring the progress of data through a
pipeline. It can be inserted into any normal pipeline
between two processes to give a visual indication of how
quickly data is passing through, how long it has taken, how
near to completion it is, and an estimate of how long it
will be until completion.
Keywords: progress bar, console, pipe, transfer rate
Author: Andrew Wood
Maintained-by: Andrew Wood
Primary-site: http://www.ivarch.com/programs/@PACKAGE@.shtml
Alternate-site:
Original-site:
Platforms:
Copying-policy: Artistic 2.0
End
pv-1.2.0/doc/PACKAGE 0000644 0000764 0000764 00000000003 10566326617 011477 0 ustar aw aw pv
pv-1.2.0/doc/quickref.1.in 0000644 0000764 0000764 00000023474 11501640062 013021 0 ustar aw aw .TH @UCPACKAGE@ 1 "December 2010" Linux "User Manuals"
.SH NAME
@PACKAGE@ \- monitor the progress of data through a pipe
.SH SYNOPSIS
.B @PACKAGE@
[\fIOPTION\fR]
[\fIFILE\fR]...
.br
.B @PACKAGE@
[\fI\-h\fR|\fI\-V\fR]
.SH DESCRIPTION
.B @PACKAGE@
allows a user to see the progress of data through a pipeline, by giving
information such as time elapsed, percentage completed (with progress bar),
current throughput rate, total data transferred, and ETA.
To use it, insert it in a pipeline between two processes, with the
appropriate options. Its standard input will be passed through to its
standard output and progress will be shown on standard error.
.B @PACKAGE@
will copy each supplied
.B FILE
in turn to standard output
.BR "" "(" -
means standard input), or if no
.BR FILE s
are specified just standard input is copied. This is the same behaviour
as
.BR cat (1).
A simple example to watch how quickly a file is transferred using
.BR nc (1):
.RS
.B @PACKAGE@ file | nc -w 1 somewhere.com 3000
.RE
A similar example, transferring a file from another process and passing the
expected size to
.BR @PACKAGE@ :
.RS
.B cat file | @PACKAGE@ -s 12345 | nc -w 1 somewhere.com 3000
.RE
A more complicated example using numeric output to feed into the
.BR dialog (1)
program for a full-screen progress display:
.RS
.B (tar cf - . \e
.br
.B " | @PACKAGE@ -n -s $(du -sb . | awk '{print $1}') \e"
.br
.B " | gzip -9 > out.tgz) 2>&1 \e"
.br
.B | dialog --gauge 'Progress' 7 70
.RE
Frequent use of this third form is not recommended as it may cause the
programmer to overheat.
.SH OPTIONS
.B @PACKAGE@
takes many options, which are divided into display switches, output
modifiers, and general options.
.SH DISPLAY SWITCHES
If no display switches are specified,
.B @PACKAGE@
behaves as if
.BR \-p ", " \-t ", " \-e ", " \-r ", and " \-b
had been given (i.e. everything except average rate is switched on).
Otherwise, only those display types that are explicitly switched on will be
shown.
.TP
.B \-p, \-\-progress
Turn the progress bar on. If standard input is not a file and no
size was given (with the
.B \-s
modifier), the progress bar cannot indicate how close to completion the
transfer is, so it will just move left and right to indicate that data is
moving.
.TP
.B \-t, \-\-timer
Turn the timer on. This will display the total elapsed time that
.B @PACKAGE@
has been running for.
.TP
.B \-e, \-\-eta
Turn the ETA timer on. This will attempt to guess, based on previous
transfer rates and the total data size, how long it will be before
completion. This option will have no effect if the total data size cannot
be determined.
.TP
.B \-r, \-\-rate
Turn the rate counter on. This will display the current rate of data
transfer.
.TP
.B \-a, \-\-average\-rate
Turn the average rate counter on. This will display the average rate of
data transfer so far.
.TP
.B \-b, \-\-bytes
Turn the total byte counter on. This will display the total amount of
data transferred so far.
.TP
.B \-n, \-\-numeric
Numeric output. Instead of giving a visual indication of progress,
.B @PACKAGE@
will give an integer percentage, one per line, on standard error, suitable
for piping (via convoluted redirection) into
.BR dialog (1).
Note that
.B \-f
is not required if
.B \-n
is being used.
.TP
.B \-q, \-\-quiet
No output. Useful if the
.B \-L
option is being used on its own to just limit the transfer rate of a pipe.
.SH OUTPUT MODIFIERS
.TP
.B \-W, \-\-wait
Wait until the first byte has been transferred before showing any progress
information or calculating any ETAs. Useful if the program you are piping to
or from requires extra information before it starts, eg piping data into
.BR gpg (1)
or
.BR mcrypt (1)
which require a passphrase before data can be processed.
.TP
.B \-s SIZE, \-\-size SIZE
Assume the total amount of data to be transferred is
.B SIZE
bytes when calculating percentages and ETAs. The same suffixes of "k", "m"
etc can be used as with
.BR -L .
.TP
.B \-l, \-\-line\-mode
Instead of counting bytes, count lines (newline characters). The progress
bar will only move when a new line is found, and the value passed to the
.B \-s
option will be interpreted as a line count.
.TP
.B \-i SEC, \-\-interval SEC
Wait
.B SEC
seconds between updates. The default is to update every second.
Note that this can be a decimal such as 0.1.
.TP
.B \-w WIDTH, \-\-width WIDTH
Assume the terminal is
.B WIDTH
characters wide, instead of trying to work it out (or assuming 80 if it
cannot be guessed).
.TP
.B \-H HEIGHT, \-\-height HEIGHT
Assume the terminal is
.B HEIGHT
rows high, instead of trying to work it out (or assuming 25 if it
cannot be guessed).
.TP
.B \-N NAME, \-\-name NAME
Prefix the output information with
.BR NAME .
Useful in conjunction with
.B \-c
if you have a complicated pipeline and you want to be able to tell different
parts of it apart.
.TP
.B \-f, \-\-force
Force output. Normally,
.B @PACKAGE@
will not output any visual display if standard error is not a terminal.
This option forces it to do so.
.TP
.B \-c, \-\-cursor
Use cursor positioning escape sequences instead of just using carriage
returns. This is useful in conjunction with
.B \-N
(name) if you are using multiple
.B @PACKAGE@
invocations in a single, long, pipeline.
.SH DATA TRANSFER MODIFIERS
.TP
.B \-L RATE, \-\-rate-limit RATE
Limit the transfer to a maximum of
.B RATE
bytes per second. A suffix of "k", "m", "g", or "t" can be added to denote
kilobytes (*1024), megabytes, and so on.
.TP
.B \-B BYTES, \-\-buffer-size BYTES
Use a transfer buffer size of
.B BYTES
bytes. A suffix of "k", "m", "g", or "t" can be added to denote
kilobytes (*1024), megabytes, and so on. The default buffer size is the
block size of the input file's filesystem multiplied by 32 (512kb max), or
400kb if the block size cannot be determined.
.TP
.B \-R PID, \-\-remote PID
If
.B PID
is an instance of
.B @PACKAGE@
that is already running,
.B \-R PID
will cause that instance to act as though it had been given
this instance's command line instead. For example, if
.B @PACKAGE@ -L 123k
is running with process ID 9876, then running
.B @PACKAGE@ -R 9876 -L 321k
will cause it to start using a rate limit of 321k instead of 123k.
Note that some options cannot be changed while running, such as
.BR \-c ,
.BR \-l ,
and
.BR \-f .
.SH GENERAL OPTIONS
.TP
.B \-h, \-\-help
Print a usage message on standard output and exit successfully.
.TP
.B \-V, \-\-version
Print version information on standard output and exit successfully.
.SH EXIT STATUS
An exit status of 1 indicates a problem with the
.B \-R
option.
Any other exit status is a bitmask of the following:
.TP
.B 2
One or more files could not be accessed,
.BR stat (2)ed,
or opened.
.TP
.B 4
An input file was the same as the output file.
.TP
.B 8
Internal error with closing a file or moving to the next file.
.TP
.B 16
There was an error while transferring data from one or more input files.
.TP
.B 32
A signal was caught that caused an early exit.
.TP
.B 64
Memory allocation failed.
A zero exit status indicates no problems.
.SH AUTHORS
Andrew Wood
.br
.I http://www.ivarch.com/
Kevin Coyner
.br
(Debian package maintainer)
Jakub Hrozek
.br
(Fedora package maintainer)
Cedric Delfosse
.br
(previous Debian package maintainer)
Eduardo Aguiar
.br
(provided Portuguese [Brazilian] translation)
Stephane Lacasse
.br
(provided French translation)
.br
.I http://gorfou.ca/
Marcos Kreinacke
.br
(provided German translation)
Bartosz Fenski
.br
(provided Polish translation, along with Krystian Zubel)
.br
.I http://skawina.eu.org/
Joshua Jensen
.br
(reported RPM installation bug)
Boris Folgmann
.br
(reported cursor handling bug)
.br
.I http://www.folgmann.com/en/
Mathias Gumz
.br
(reported NLS bug)
Daniel Roethlisberger
.br
(submitted patch to use lockfiles for -c if terminal locking fails)
Adam Buchbinder
.br
(lots of help with a Cygwin port of -c)
Mark Tomich
.br
(suggested -B option)
.br
.I http://metuchen.dyndns.org
Gert Menke
.br
(reported bug when piping to dd with a large input buffer size)
Ville Herva
.br
(informative bug report about rate limiting performance)
Elias Pipping
.br
(patch to compile properly on Darwin 9; potential NULL deref report)
Patrick Collison
.br
(similar patch for OS X)
Boris Lohner
.br
(reported problem that -L does not complain if given non-numeric value)
Sebastian Kayser
.br
(supplied testing for SIGPIPE, demonstrated internationalisation problem)
Laszlo Ersek
.br
(reported shared memory leak on SIGINT with -c)
.br
.I http://phptest11.atw.hu/
Phil Rutschman
.br
(provided a patch for fully restoring terminal state on exit)
.br
.I http://bandgap.rsnsoft.com/
Henry Precheur
.br
(reporting and suggestions for --rate-limit bug when rate is under 10)
.br
.I http://henry.precheur.org/
E. Rosten
.br
(supplied patch for block buffering in line mode)
.br
.I http://mi.eng.cam.ac.uk/~er258/
Kjetil Torgrim Homme
.br
(reported compilation error with default CFLAGS on non-GCC compilers)
Alexandre de Verteuil
.br
(reported bug in OS X build and supplied test environment to fix in)
Martin Baum
.br
(supplied patch to return nonzero exit status if terminated by signal)
Sam Nelson
.br
(supplied patch to fix trailing slash on DESTDIR)
.br
.I http://www.siliconfuture.net/
Daniel Pape
.br
(reported Cygwin installation problem due to DESTDIR)
Henry Gebhardt
.br
(supplied patches to improve SI prefixes and add --average-rate)
Vladimir Kokarev
.br
Alexander Leo
.br
(reported that exit status did not reflect file errors)
.SH BUGS
If you find any bugs, please contact the primary author, either by email or
by using the contact form on the web site.
.SH "SEE ALSO"
.BR cat (1),
.BR dialog (1)
.SH LICENSE
This is free software, distributed under the ARTISTIC 2.0 license.
pv-1.2.0/doc/release-checklist 0000644 0000764 0000764 00000001642 10654727640 014044 0 ustar aw aw Before releasing a new version, go through this checklist:
- check for patches from http://packages.qa.debian.org/p/pv.html
- bump doc/VERSION
- bump doc/lsm.in
- check doc/NEWS is up to date
- check doc/spec.in is up to date (changelog)
- check manual is up to date
- make indent indentclean
- make update-po
- make test
- commit to SVN
- wipe build directory, re-run generate.sh and configure
- make release
- make manhtml | tidy -asxhtml | sed -e '1,//d' -e '/<\/body>/,$d'
- update HTML for todo and news
- copy and sign tar.gz to HTML directory
- upload package files to Google Code
- submit new release to Freshmeat
- upload HTML
- check validator results for project page and manual
- upload package files to SourceForge
- svn copy https://pipeviewer.googlecode.com/svn/trunk/ \
https://pipeviewer.googlecode.com/svn/tags/v1_2_3 \
-m 'Tagging release 1.2.3'
pv-1.2.0/doc/NEWS 0000644 0000764 0000764 00000015672 11501640427 011226 0 ustar aw aw 1.2.0 - 14 December 2010
- integrated improved SI prefixes and --average-rate (Henry Gebhardt)
- return nonzero if exiting due to SIGTERM (Martin Baum)
- patch from Phil Rutschman to restore terminal properly on exit
- fix i18n especially for --help (Sebastian Kayser)
- refactored pv_display
- we now have a coherent, documented, exit status
- modified pipe test and new cksum test from Sebastian Kayser
- default CFLAGS to just "-O" for non-GCC (Kjetil Torgrim Homme)
- LFS compile fix for OS X 10.4 (Alexandre de Verteuil)
- remove DESTDIR / suffix (Sam Nelson, Daniel Pape)
- fixed potential NULL deref in transfer (Elias Pipping / LLVM/Clang)
1.1.4 - 6 March 2008
- patch from Elias Pipping correcting compilation failure on Darwin 9
- patch from Patrick Collison correcting similar problems on OS X
- trap SIGINT/SIGHUP/SIGTERM so we clean up IPCs on exit (Laszlo Ersek)
- abort if numeric option, eg -L, has non-numeric value (Boris Lohner)
1.1.0 - 30 August 2007
- new option --remote (-R) to control an already-running process
- new option --line-mode (-l) to count lines instead of bytes
- fix for "-L" to be less resource intensive
- fix for input/output equivalence check on Mac OS X
- fix for size calculation in pipelines on Mac OS X
- fixed "make uninstall"
- removed /debian directory at request of new Debian maintainer
1.0.1 - 4 August 2007
- licensing change from Artistic to Artistic 2.0
- removed the "-l" / "--license" option
1.0.0 - 2 August 2007
- act more like "cat" - just skip unreadable files, don't abort
- removed text version of manual page, and obsolete Info file generation
- code cleanup and separation of PV internals from CLI front-end
0.9.9 - 5 February 2007
- new option --buffer-size (-B) suggested by Mark Tomich
- build fix: HP/UX largefile compile fix from Timo Savinen
- maintain better buffer filling during transfers
- workaround: pv /dev/zero | dd bs=1M count=1k bug (reported by Gert Menke)
- dropped support for the Texinfo manual
0.9.6 - 27 February 2006
- bugfix: key_t incompatibility with Cygwin
- bugfix: interval (-i) parameter parses numbers after decimal point
- build fix: use static NLS if msgfmt is unavailable
- on the final update, blank out the now-zero ETA
0.9.2 - 1 September 2005
- Daniel Roethlisberger patch: use lockfiles if terminal locking fails
0.9.1 - 16 June 2005
- minor RPM spec file fix for Fedora Core 4
0.9.0 - 15 November 2004
- minor NLS bugfix
0.8.9 - 6 November 2004
- decimal values now accepted for rate and size, eg "-L 1.23M"
- code cleanup
- developers: "make help" now lists Makefile targets
0.8.6 - 29 June 2004
- use uu_lock() for terminal locking on FreeBSD
0.8.5 - 2 May 2004
- cursor positioning (-c) reliability improved on systems with IPC
- minor fix: made test 005 more reliable
- new option --height (-H)
0.8.2 - 24 April 2004
- allow k,m,g,t suffixes on numbers
- added "srpm" and "release" Makefile targets
0.8.1 - 19 April 2004
- bugfix in cursor positioning (-c)
0.8.0 - 12 February 2004
- replaced GNU getopt with my library code
- replaced GNU gettext with my very minimal replacement
- use DESTDIR instead of RPM_BUILD_ROOT for optional installation prefix
- looked for flaws using RATS, cleaned up code
0.7.0 - 8 February 2004
- display buffer management fixes (thanks Cédric Delfosse)
- replaced --enable-debug with --enable-debugging and --enable-profiling
0.6.4 - 14 January 2004
- fixed minor bug in RPM installation
- bugfix in "make index" (only of interest to developers)
0.6.3 - 22 December 2003
- fixed transient bug that reported "resource unavailable" occasionally
0.6.2 - 6 August 2003
- block devices now have their size read correctly, so pv /dev/hda1 works
- minor code cleanups (mainly removal of CVS "Id" tags)
0.6.0 - 3 August 2003
- doing ^Z then "bg" then "fg" now continues displaying
0.5.9 - 23 July 2003
- fix for test 007 when not in C locale
- fix for build process to use CPPFLAGS
- fix for build process to use correct i18n libraries
- fix for build process - more portable sed in dependency generator
- fix for install process - remember to mkinstalldirs before installing
- fixes for building on Mac OS X
0.5.3 - 4 May 2003
- added Polish translation thanks to Bartosz Feñski
and Krystian Zubel
- moved doc/debian to ./debian at insistence of common sense
- minor Solaris 8 compatibility fixes
- seems to compile and test OK on Mac OS X
0.5.0 - 15 April 2003
- added French translation thanks to Stéphane Lacasse
- added German translation thanks to Marcos Kreinacke
- switched LGPL reference from "Library" to "Lesser"
0.4.9 - 18 February 2003
- support for >2GB files added where available (Debian bug #180986)
- added doc/debian dir (from Cédric Delfosse)
- added "make rpm" and "make deb" targets to build RPM and Debian packages
- added a "make pv-static" rule to build a statically linked version
0.4.5 - 13 December 2002
- added Portuguese (Brazilian) translation thanks to Eduardo Aguiar
0.4.4 - 7 December 2002
- pause/resume support - don't count time while stopped
- stop output when resumed in the background
- terminal size change support
- bugfix: <=> indicator no longer sticks at right hand edge
0.4.0 - 27 November 2002
- allow decimal interval values, eg 0.1, 0.5, etc
- some simple tests added (`make check')
- smoother throughput limiting (--rate-limit), now done in 0.1sec chunks
- bounds-check interval values (-i) - max update interval now 10 minutes
- more reliable non-blocking output to keep display updated
- no longer rely on atoll()
- don't output final blank line if --numeric
- use fcntl() instead of flock() for Solaris compatibility
0.3.0 - 25 November 2002
- handle broken output pipe gracefully
- continue updating display even when output pipe is blocking
0.2.6 - 21 October 2002
- we now ignore EINTR on select()
- variable-size buffer (still need to add code to change size)
- added (tentative) support for internationalisation
- removed superfluous --no-progress, etc options
- optimised transfer by using bigger buffers, based on st_blksize
- added --wait option to wait until transfer begins before showing progress
- added --rate-limit option to limit rate to a maximum throughput
- added --quiet option (no output at all) to be used with --rate-limit
0.2.5 - 23 July 2002
- added [FILE]... arguments, like `cat'
- function separation in code
- some bug fixes related to numeric overflow
0.2.3 - 19 July 2002
- Texinfo manual written, man page updated
- byte counter added
0.2.0 - 18 July 2002
- ETA counter added
- screen width estimation added
- progress bar added
0.1.0 - 17 July 2002
- main loop created
- rate counter added
- elapsed time counter added
- percentage calculation added
0.0.1 - 16 July 2002
- package created
- first draft of man page written
pv-1.2.0/doc/lsm 0000644 0000764 0000764 00000001234 11501640751 011232 0 ustar aw aw Begin3
Title: pv
Version: 1.2.0
Entered-date: 14DEC10
Description: A tool for monitoring the progress of data through a
pipeline. It can be inserted into any normal pipeline
between two processes to give a visual indication of how
quickly data is passing through, how long it has taken, how
near to completion it is, and an estimate of how long it
will be until completion.
Keywords: progress bar, console, pipe, transfer rate
Author: Andrew Wood
Maintained-by: Andrew Wood
Primary-site: http://www.ivarch.com/programs/pv.shtml
Alternate-site:
Original-site:
Platforms:
Copying-policy: Artistic 2.0
End
pv-1.2.0/doc/TODO 0000644 0000764 0000764 00000002012 11473506037 011205 0 ustar aw aw Things still to do:
- fix rate-limit-under-10 bug (Henry Precheur)
- fix install on OSes without man page .gz (Bob Friesenhahn)
- integrate Sami Liedes patch for numeric with timer and bytes
- option for process title (Martin Sarsale)
as "pv - name:FooProcess -xyz - transferred: 1.3GB - 500KB/s - running:
10:15:30s"
- fix -c answerback on Solaris 10 (Bob Friesenhahn)
- add -m (line count, block buffer) patch (E. Rosten)
- add -O to allow ordering of -pterb output, eg -bertp (Vladimir Pal)
(http://unixstuff.ru), idea by Vladimir Ermakov
- look at effect of O_SYNC or fsync on performance
- add development support for http://clang.llvm.org/StaticAnalysis.html
- look at splice syscall (Коренберг Марк / socketpair)
- fix cursor positioning (-c) lockfiles when O_EXLOCK is unavailable
- fix cursor positioning (-c) to use semaphores instead of locking
- if the first pv exits, should the second become IPC leader?
- get more translations
Any assistance would be appreciated.
pv-1.2.0/doc/VERSION 0000644 0000764 0000764 00000000006 11501640042 011551 0 ustar aw aw 1.2.0
pv-1.2.0/doc/pv.spec 0000644 0000764 0000764 00000011342 11501640752 012017 0 ustar aw aw Summary: Monitor the progress of data through a pipe
Name: pv
Version: 1.2.0
Release: 1%{?dist}
License: Artistic 2.0
Group: Development/Tools
Source: http://www.ivarch.com/programs/sources/pv-1.2.0.tar.gz
Url: http://www.ivarch.com/programs/pv.shtml
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext
%description
PV ("Pipe Viewer") is a tool for monitoring the progress of data through a
pipeline. It can be inserted into any normal pipeline between two processes
to give a visual indication of how quickly data is passing through, how long
it has taken, how near to completion it is, and an estimate of how long it
will be until completion.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man1
mkdir -p "$RPM_BUILD_ROOT"/usr/share/locale
make DESTDIR="$RPM_BUILD_ROOT" install
%find_lang %{name}
%check
make test
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%doc README doc/NEWS doc/TODO doc/COPYING
%changelog
* Tue Dec 14 2010 Andrew Wood 1.2.0-1
- Integrated improved SI prefixes and --average-rate (Henry Gebhardt).
- Return nonzero if exiting due to SIGTERM (Martin Baum).
- Patch from Phil Rutschman to restore terminal properly on exit.
- Fix i18n especially for --help (Sebastian Kayser).
- Refactored pv_display.
- We now have a coherent, documented, exit status.
- Modified pipe test and new cksum test from Sebastian Kayser.
- Default CFLAGS to just "-O" for non-GCC (Kjetil Torgrim Homme).
- LFS compile fix for OS X 10.4 (Alexandre de Verteuil).
- Remove DESTDIR / suffix (Sam Nelson, Daniel Pape).
- Fixed potential NULL deref in transfer (Elias Pipping / LLVM/Clang).
* Thu Mar 6 2008 Andrew Wood 1.1.4-1
- Trap SIGINT/SIGHUP/SIGTERM so we clean up IPCs on exit (Laszlo Ersek).
- Abort if numeric option, eg -L, has non-numeric value (Boris Lohner).
- Compilation fixes for Darwin 9 and OS X.
* Thu Aug 30 2007 Andrew Wood 1.1.0-1
- New option "-R" to remotely control another pv process.
- New option "-l" to count lines instead of bytes.
- Performance improvement for "-L" (rate) option.
- Some Mac OS X fixes, and packaging cleanups.
* Sat Aug 4 2007 Andrew Wood 1.0.1-1
- Changed license from Artistic to Artistic 2.0.
- Removed "--license" option.
* Thu Aug 2 2007 Andrew Wood 1.0.0-1
- We now act more like "cat" - just skip unreadable files, don't abort.
- Various code cleanups were done.
* Mon Feb 5 2007 Andrew Wood 0.9.9-1
- New option "-B" to set the buffer size, and a workaround for problems
- piping to dd(1).
* Mon Feb 27 2006 Andrew Wood
- Minor bugfixes, and on the final update, blank out the now-zero ETA.
* Thu Sep 1 2005 Andrew Wood
- Terminal locking now uses lockfiles if the terminal itself cannot be locked.
* Thu Jun 16 2005 Andrew Wood
- A minor problem with the spec file was fixed.
* Mon Nov 15 2004 Andrew Wood
- A minor bug in the NLS code was fixed.
* Sat Nov 6 2004 Andrew Wood
- Code cleanups and minor usability fixes.
* Tue Jun 29 2004 Andrew Wood
- A port of the terminal locking code to FreeBSD.
* Sun May 2 2004 Andrew Wood
- Major reliability improvements to the cursor positioning.
* Sat Apr 24 2004 Andrew Wood
- Rate and size parameters can now take suffixes such as "k", "m" etc.
* Mon Apr 19 2004 Andrew Wood
- A bug in the cursor positioning was fixed.
* Thu Feb 12 2004 Andrew Wood
- Code cleanups and portability fixes.
* Sun Feb 8 2004 Andrew Wood
- The display buffer is now dynamically allocated, fixing an overflow bug.
* Wed Jan 14 2004 Andrew Wood
- A minor bug triggered when installing the RPM was fixed.
* Mon Dec 22 2003 Andrew Wood
- Fixed a minor bug that occasionally reported "resource unavailable".
* Wed Aug 6 2003 Andrew Wood
- Block devices now have their size read correctly, so pv /dev/hda1 works
- Minor code cleanups (mainly removal of CVS "Id" tags)
* Sun Aug 3 2003 Andrew Wood
- Doing ^Z then "bg" then "fg" now continues displaying
* Tue Jul 16 2002 Andrew Wood
- First draft of spec file created.
pv-1.2.0/doc/INSTALL 0000644 0000764 0000764 00000017230 10566326617 011564 0 ustar aw aw Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
pv-1.2.0/doc/COPYING 0000644 0000764 0000764 00000021253 10654726422 011562 0 ustar aw aw This package is free software, and is being distributed under the terms
of the Artistic License 2.0.
----------------------------------------------------------
Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed. Preamble
This license establishes the terms under which a given free software
Package may be copied, modified, distributed, and/or redistributed. The
intent is that the Copyright Holder maintains some artistic control
over the development of that Package while still keeping the Package
available as open source and free software.
You are always permitted to make arrangements wholly outside of this
license directly with the Copyright Holder of a given Package. If the
terms of this license do not permit the full use that you propose to
make of the Package, you should contact the Copyright Holder and seek
a different licensing arrangement. Definitions
"Copyright Holder" means the individual(s) or organization(s) named in
the copyright notice for the entire Package.
"Contributor" means any party that has contributed code or other material
to the Package, in accordance with the Copyright Holder's procedures.
"You" and "your" means any person who would like to copy, distribute,
or modify the Package.
"Package" means the collection of files distributed by the Copyright
Holder, and derivatives of that collection and/or of those files. A given
Package may consist of either the Standard Version, or a Modified Version.
"Distribute" means providing a copy of the Package or making it accessible
to anyone else, or in the case of a company or organization, to others
outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing this
Package or providing support for this Package to another party. It does
not mean licensing fees.
"Standard Version" refers to the Package if it has not been modified,
or has been modified only in ways explicitly requested by the Copyright
Holder.
"Modified Version" means the Package, if it has been changed, and such
changes were not explicitly requested by the Copyright Holder.
"Original License" means this Artistic License as Distributed with the
Standard Version of the Package, in its current version or as it may be
modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and
configuration files for the Package.
"Compiled" form means the compiled bytecode, object code, binary, or any
other form resulting from mechanical transformation or translation of
the Source form. Permission for Use and Modification Without Distribution
(1) You are permitted to use the Standard Version and create and use
Modified Versions for any purpose without restriction, provided that you
do not Distribute the Modified Version. Permissions for Redistribution
of the Standard Version
(2) You may Distribute verbatim copies of the Source form of the Standard
Version of this Package in any medium without restriction, either gratis
or for a Distributor Fee, provided that you duplicate all of the original
copyright notices and associated disclaimers. At your discretion, such
verbatim copies may or may not include a Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder. The resulting
Package will still be considered the Standard Version, and as such will
be subject to the Original License. Distribution of Modified Versions
of the Package as Source
(4) You may Distribute your Modified Version as Source (either gratis
or for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs
from the Standard Version, including, but not limited to, documenting
any non-standard features, executables, or modules, and provided that
you do at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder of the
Standard Version, under the Original License, so that the Copyright Holder
may include your modifications in the Standard Version.
(b) ensure that installation of your Modified Version does not prevent the
user installing or running the Standard Version. In addition, the Modified
Version must bear a name that is different from the name of the Standard
Version.
(c) allow anyone who receives a copy of the Modified Version to make
the Source form of the Modified Version available to others under
(i) the Original License or
(ii) a license that permits the licensee to freely copy, modify and
redistribute the Modified Version using the same licensing terms that apply
to the copy that the licensee received, and requires that the Source form of
the Modified Version, and of any works derived from it, be made freely
available in that license fees are prohibited but Distributor Fees are
allowed. Distribution of Compiled Forms of the Standard Version or Modified
Versions without the Source
(5) You may Distribute Compiled forms of the Standard Version without
the Source, provided that you include complete instructions on how to
get the Source of the Standard Version. Such instructions must be valid
at the time of your distribution. If these instructions, at any time
while you are carrying out such distribution, become invalid, you must
provide new instructions on demand or cease further distribution. If
you provide valid instructions or cease distribution within thirty days
after you become aware that the instructions are invalid, then you do
not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without the
Source, provided that you comply with Section 4 with respect to the
Source of the Modified Version. Aggregating or Linking the Package
(7) You may aggregate the Package (either the Standard Version or
Modified Version) with other packages and Distribute the resulting
aggregation provided that you do not charge a licensing fee for the
Package. Distributor Fees are permitted, and licensing fees for other
components in the aggregation are permitted. The terms of this license
apply to the use and Distribution of the Standard or Modified Versions
as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with other
works, to embed the Package in a larger work of your own, or to build
stand-alone binary or bytecode versions of applications that include the
Package, and Distribute the result without restriction, provided the
result does not expose a direct interface to the Package. Items That
are Not Considered Part of a Modified Version
(9) Works (including, but not limited to, modules and scripts) that
merely extend or make use of the Package, do not, by themselves, cause
the Package to be a Modified Version. In addition, such works are not
considered parts of the Package itself, and are not subject to the terms
of this license. General Provisions
(10) Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.
(11) If your Modified Version has been derived from a Modified Version
made by someone other than you, you are nevertheless required to ensure
that your Modified Version complies with the requirements of this license.
(12) This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.
(13) This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import
and otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the
Package. If you institute patent litigation (including a cross-claim or
counterclaim) against any party alleging that the Package constitutes
direct or contributory patent infringement, then this Artistic License
to you shall terminate on the date that such litigation is filed.
(14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT
HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT
PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER
OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------
pv-1.2.0/autoconf/ 0000755 0000764 0000764 00000000000 11501641001 011552 5 ustar aw aw pv-1.2.0/autoconf/header.in 0000644 0000764 0000764 00000003427 11325165557 013365 0 ustar aw aw /*!NOINDEX*/
/* Define if you have standard C headers. */
#undef STDC_HEADERS
/* Define if you have "config.h" (yes, you have). */
#undef HAVE_CONFIG_H
/* Various other header files. */
#undef HAVE_GETOPT_H
#undef HAVE_LIMITS_H
#undef HAVE_SYS_IPC_H
#undef HAVE_SYS_PARAM_H
#undef HAVE_LIBGEN_H
/* Functions. */
#undef HAVE_GETOPT
#undef HAVE_GETOPT_LONG
#undef HAVE_MEMCPY
#undef HAVE_BASENAME
#undef HAVE_SNPRINTF
#undef HAVE_STAT64
/* NLS stuff. */
#undef ENABLE_NLS
#undef HAVE_LIBINTL_H
#undef HAVE_LOCALE_H
#undef HAVE_GETTEXT
#ifdef ENABLE_NLS
# include "library/gettext.h"
#else
# define _(String) (String)
# define N_(String) (String)
#endif
/* The name of the program. */
#define PROGRAM_NAME "progname"
/* The name of the package. */
#define PACKAGE ""
/* The current package version. */
#define VERSION "0.0.0"
/* Various identification and legal stuff. */
#define COPYRIGHT_YEAR _("2010")
#define COPYRIGHT_HOLDER _("Andrew Wood ")
#define PROJECT_HOMEPAGE "http://www.ivarch.com/programs/" PROGRAM_NAME ".shtml"
#define BUG_REPORTS_TO _("Andrew Wood ")
/* LFS support. */
#undef ENABLE_LARGEFILE
#ifdef ENABLE_LARGEFILE
# define __USE_LARGEFILE64 1
# define _LARGEFILE64_SOURCE 1
#else
/*
* Some Macs have stat64 despite not having open64 while others don't have
* either, so here even if we don't have open64 or LFS is disabled, we have
* to check whether stat64 exists and only redefine it if it doesn't
* otherwise some Macs fail to compile.
*/
# ifdef __APPLE__
# ifndef HAVE_STAT64
# define stat64 stat
# define fstat64 fstat
# endif
# else
# define stat64 stat
# define fstat64 fstat
# endif
# define open64 open
# define lseek64 lseek
#endif
#undef HAVE_IPC
#ifdef HAVE_SYS_IPC_H
#define HAVE_IPC 1
#endif
/* EOF */
pv-1.2.0/autoconf/configure.in 0000644 0000764 0000764 00000007716 11346027151 014111 0 ustar aw aw dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main/version.c)
dnl We're using C.
dnl
AC_LANG_C
dnl Output a header file.
dnl
AC_CONFIG_HEADER(src/include/config.h:autoconf/header.in)
dnl Set directory to check for Configure scripts in.
dnl
AC_CONFIG_AUX_DIR(autoconf/scripts)
dnl Read in package details.
dnl
PACKAGE=`cat $srcdir/doc/PACKAGE`
VERSION=`cat $srcdir/doc/VERSION`
UCPACKAGE=`tr a-z A-Z < $srcdir/doc/PACKAGE`
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(UCPACKAGE)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(PROGRAM_NAME, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
dnl Check for compile-time options.
dnl
AC_ARG_ENABLE(debugging,
[ --enable-debugging compile with debugging symbols],
if test "$enable_debugging" = "yes"; then
CFLAGS="-g -Wall"
fi
)
AC_ARG_ENABLE(profiling,
[ --enable-profiling compile with profiling support],
if test "$enable_profiling" = "yes"; then
CFLAGS="-pg $CFLAGS"
fi
)
LFS_SUPPORT="no"
AC_ARG_ENABLE(lfs, [ --disable-lfs disable LFS support],
if test "$enable_lfs" = "yes"; then
LFS_SUPPORT="yes"
fi,
LFS_SUPPORT="yes"
)
STATIC_NLS="no"
AC_ARG_ENABLE(static-nls, [ --enable-static-nls hardcode NLS with no support files],
if test "$enable_static_nls" = "yes"; then
STATIC_NLS="yes"
fi,
STATIC_NLS="no"
)
NLS_SUPPORT="no"
AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support],
if test "$enable_nls" = "yes"; then
NLS_SUPPORT="yes"
fi,
NLS_SUPPORT="yes"
)
dnl Check for various programs.
dnl
CFLAGS=${CFLAGS:-"-O"}
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CHECK_PROG(DO_GZIP, gzip, gzip -f9, touch)
dnl NLS stuff.
dnl
ALL_LINGUAS="de fr pl pt"
if test "$NLS_SUPPORT" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_PATH_PROG(MSGFMT, msgfmt, NOMSGFMT)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AC_PATH_PROG(XGETTEXT, xgettext, xgettext)
if test "x$MSGFMT" = "xNOMSGFMT"; then
MSGFMT=""
STATIC_NLS="yes"
fi
if test "$STATIC_NLS" = "yes"; then
CATALOGS=""
NLSOBJ="src/nls/table.o"
else
AC_CHECK_LIB(intl, main)
AC_CHECK_LIB(i, main)
fi
CATOBJEXT=.mo
INSTOBJEXT=.mo
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES \$(srcdir)/src/nls/$lang.po"
CATALOGS="$CATALOGS src/nls/$lang$CATOBJEXT";
done
if test "$STATIC_NLS" = "yes"; then
CATALOGS=""
else
AC_CHECK_FUNC(gettext,
[AC_DEFINE(HAVE_GETTEXT)
NLSOBJ=""
], [CATALOGS=""; NLSOBJ="src/nls/table.o"
]
)
fi
fi
AC_CHECK_HEADERS(libintl.h)
AC_CHECK_HEADERS(locale.h)
AC_SUBST(MSGFMT)
AC_SUBST(GMSGFMT)
AC_SUBST(XGETTEXT)
AC_SUBST(CATOBJEXT)
AC_SUBST(INSTOBJEXT)
AC_SUBST(GMOFILES)
AC_SUBST(POFILES)
AC_SUBST(CATALOGS)
AC_SUBST(NLSOBJ)
dnl Getopt checks.
dnl
AC_CHECK_FUNCS(getopt_long getopt)
AC_CHECK_HEADERS(getopt.h)
dnl LFS checks.
dnl
if test "$LFS_SUPPORT" = "yes"; then
AC_CHECK_FUNCS(open64, AC_DEFINE(ENABLE_LARGEFILE))
fi
dnl Check for various header files and set various other macros.
dnl
AC_DEFINE(HAVE_CONFIG_H)
AC_HEADER_STDC
AC_CHECK_FUNCS(memcpy basename snprintf stat64)
AC_CHECK_HEADERS(limits.h sys/ipc.h sys/param.h libgen.h)
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)
dnl Fudging for separate build directories.
dnl
subdirs=""
for i in `find $srcdir/src -type d -print | sed s,$srcdir/,,`; do
subdirs="$subdirs $i"
done
dnl Stitch together the Makefile fragments.
dnl
mk_segments="autoconf/Makefile.in"
for i in vars.mk package.mk filelist.mk~ unreal.mk modules.mk~ \
rules.mk link.mk depend.mk~; do
mk_segments="$mk_segments:autoconf/make/$i"
done
dnl Output files (and create build directory structure too).
dnl
AC_OUTPUT(Makefile:$mk_segments doc/lsm:doc/lsm.in
doc/quickref.1:doc/quickref.1.in
doc/$PACKAGE.spec:doc/spec.in
src/.dummy:doc/NEWS,
rm -f src/.dummy
for i in $subdirs; do
test -d $i || mkdir $i
done
, subdirs="$subdirs")
dnl EOF
pv-1.2.0/autoconf/Makefile.in 0000644 0000764 0000764 00000000731 10566326623 013644 0 ustar aw aw #
# Files from which this is generated (inside directory `autoconf/make'):
#
# package.mk # package name and distribution details
# vars.mk # compilation, shell and linking variables
# filelist.mk~ # lists of files
# unreal.mk # phony targets
# modules.mk~ # module linking rules
# rules.mk # compilation rules
# link.mk # real top-level targets
# depend.mk~ # dependencies
#
#
pv-1.2.0/autoconf/scripts/ 0000755 0000764 0000764 00000000000 11501641001 013241 5 ustar aw aw pv-1.2.0/autoconf/scripts/mkinstalldirs 0000755 0000764 0000764 00000001261 10566326622 016072 0 ustar aw aw #!/bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman
# Created: 1993-05-16
# Last modified: 1994-03-25
# Public domain
errstatus=0
for file in ${1+"$@"} ; do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d in ${1+"$@"} ; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || errstatus=$?
chmod 755 $pathcomp 2>/dev/null
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here
pv-1.2.0/autoconf/scripts/depend.sh 0000755 0000764 0000764 00000000730 10566326623 015063 0 ustar aw aw #!/bin/sh
#
# Generate dependencies for a C source file.
#
CC=$1
shift
file=$1
shift
stem=$1
shift
srcdir=$1
abssrc=`echo $srcdir | sed ':1
s,^\./,,g
t1'`
shift
abssrc=`echo "$abssrc" | sed 's,\\.,\\\\.,g'`
srcdir=`echo "$srcdir" | sed 's,\\.,\\\\.,g'`
$CC -M -MG $* $file \
| sed -e 's, /[^ ]*,,g' -e "s,^.*\.o:,${stem}.d ${stem}.o:," \
-e '/^ \\$/d' -e 's/ \\$//' \
-e 's,'"$srcdir"'/,,g' -e 's,'"$abssrc"'/,,g' \
| tr '\n' ' ' \
| tr -s ' '
echo
# EOF
pv-1.2.0/autoconf/scripts/makemake.sh 0000755 0000764 0000764 00000005773 10654437376 015421 0 ustar aw aw #!/bin/sh
#
# Generate Makefile dependencies inclusion and module target file "depend.mk~"
# by scanning the directory "src" for files ending in ".c" and ".d", and for
# subdirectories not starting with "_".
#
# Modules live inside subdirectories called [^_]* - i.e. a directory "foo" will
# have a rule created which links all code inside it to "foo.o".
#
# The directory "src/include" is never scanned; neither are CVS or SVN
# directories.
#
outlist=$1
outlink=$2
FIND=find
GREP=grep
which gfind 2>/dev/null | grep /gfind >/dev/null && FIND=gfind
which ggrep 2>/dev/null | grep /ggrep >/dev/null && GREP=ggrep
echo '# Automatically generated file listings' > $outlist
echo '#' >> $outlist
echo "# Creation time: `date`" >> $outlist
echo >> $outlist
echo '# Automatically generated module linking rules' > $outlink
echo '#' >> $outlink
echo "# Creation time: `date`" >> $outlink
echo >> $outlink
echo -n "Scanning for source files: "
allsrc=`$FIND src -type f -name "*.c" -print`
allobj=`echo $allsrc | tr ' ' '\n' | sed 's/\.c$/.o/'`
alldep=`echo $allsrc | tr ' ' '\n' | sed 's/\.c$/.d/'`
echo `echo $allsrc | wc -w | tr -d ' '` found
echo -n "Scanning for modules: "
modules=`$FIND src -type d -print \
| $GREP -v '^src$' \
| $GREP -v '/_' \
| $GREP -v '^src/include' \
| $GREP -v 'CVS' \
| $GREP -v '.svn' \
| while read DIR; do \
CONTENT=\$(/bin/ls -d \$DIR/* \
| $GREP -v '.po$' \
| $GREP -v '.gmo$' \
| $GREP -v '.mo$' \
| $GREP -v '.h$' \
| sed -n '$p'); \
[ -n "\$CONTENT" ] || continue; \
echo \$DIR; \
done
`
echo up to `echo $modules | wc -w | tr -d ' '` found
echo "Writing module linking rules"
echo -n [
for i in $modules; do echo -n ' '; done
echo -n -e ']\r['
for i in $modules; do
echo -n '.'
allobj="$allobj $i.o"
deps=""
for j in $i/*.c; do
[ -f $j ] || continue
newobj=`echo $j | sed -e 's@\.c$@.o@'`
deps="$deps $newobj"
done
for j in $i/*; do
[ -d "$j" ] || continue
[ `basename $j` = "CVS" ] && continue
[ `basename $j` = ".svn" ] && continue
CONTENT=`/bin/ls -d $j/* \
| $GREP -v '.po$' \
| $GREP -v '.gmo$' \
| $GREP -v '.mo$' \
| $GREP -v '.h$' \
| sed -n '$p'`
[ -n "$CONTENT" ] || continue
deps="$deps $j.o"
done
[ -n "$deps" ] || continue
echo "$i.o: $deps" >> $outlink
echo ' $(LD) $(LDFLAGS) -o $@' "$deps" >> $outlink
echo >> $outlink
done
echo ']'
echo "Listing source, object and dependency files"
echo -n "allsrc = " >> $outlist
echo $allsrc | sed 's,src/nls/cat-id-tbl.c,,' | sed -e 's/ / \\!/g'\
| tr '!' '\n' >> $outlist
echo >> $outlist
echo -n "allobj = " >> $outlist
echo $allobj | sed -e 's/ / \\!/g' | tr '!' '\n' >> $outlist
echo >> $outlist
echo -n "alldep = " >> $outlist
echo $alldep | sed -e 's/ / \\!/g' | tr '!' '\n' >> $outlist
echo >> $outlist
echo >> $outlink
# EOF
pv-1.2.0/autoconf/scripts/index.sh 0000755 0000764 0000764 00000011730 10566326622 014734 0 ustar aw aw #!/bin/ash
#
# Script to generate an HTML index of all C code from the current directory
# downwards (skipping directories ending in ~). The header comment in each
# file is listed, and each function's prototype and comment are given. A
# list of "TODO:" comments is also generated.
#
# Outputs the HTML on standard output.
#
# If a parameter is given, it is the prefix to put before any "view file"
# links, eg ".." to link to "../dir/file.c" instead of "dir/file.c".
#
# Skips any files containing the string !NOINDEX.
#
# Requires ctags and cproto.
#
OFFS=$1
# Convert the given string to HTML-escaped values (<, >, & escaped) on
# stdout.
#
html_safe () {
echo "$*" \
| sed -e 's|&|\&|g;s|<|\<|g;s|>|\>|g'
}
# Convert the given string to HTML-escaped values (<, >, & escaped) on
# stdout, also adding a
to the end of each line.
#
html_safebr () {
echo "$*" \
| sed -e 's|&|\&|g;s|<|\<|g;s|>|\>|g;s/$/
/'
}
ALLFILES=`find . -name '*~' -prune -o -type f -name '*.c' \
-exec grep -FL '!NOINDEX' /dev/null '{}' ';'`
CTAGDATA=`echo "$ALLFILES" \
| ctags -nRf- -L- --c-types=f \
| sed 's/ .\// /;s/;" .*$//'`
FILELIST=`echo "$CTAGDATA" | cut -d ' ' -f 2 | sort | uniq`
echo ''
echo 'Source Code Index'
echo ''
echo ''
echo '
'
echo ''
echo ''
echo "$FILELIST" \
| sed -e \
's|^.*$|\0
|'
echo '
'
for FILE in $FILELIST; do
DIR=`dirname $FILE`
FUNCDEFS=`cproto -f1 -I. -Isrc/include -I$DIR $FILE 2>/dev/null \
| sed -n 's/^.*[ *]\([^ *(]*\)(.*$/\1/p'`
FILEHEAD="`sed -n -e \
'1,/\*\//{/\/\*/,/\*\//{s/^[\/ *]//;s/^\*[\/]*//;p;};}' \
< $FILE`"
FILESHORTDESC=`echo "$FILEHEAD" | sed -n '1,/^ *$/{/^ *[^ ]*/p;}'`
FILELONGDESC=`echo "$FILEHEAD" | sed '1,/^ *$/d'`
echo '
'
echo ''
echo ''
echo ''"$FILE"' | '
echo ' - | '
echo ''`html_safe "$FILESHORTDESC"`' | '
echo '
'
echo '[View File]
'
echo ''
echo "`html_safebr "$FILELONGDESC"`"
echo '
'
if [ -n "$FUNCDEFS" ]; then
echo 'Functions defined:
'
echo ''
echo "$FUNCDEFS" \
| sed 's|^.*$|\0|' \
| sed 's/^//;s|$|
|'
echo '
'
fi
echo '['
echo 'Top |'
echo 'To Do |'
echo 'Functions ]
'
done
echo ''
echo ''
echo "$CTAGDATA" | while read FUNC FILE LINENUM REST; do
echo -n ''
echo -n ''"$FUNC"'
'
echo '['"$FILE"'
] '
done
echo '
'
echo "$CTAGDATA" | while read FUNC FILE LINENUM REST; do
FUNCDEF=`sed -n "$LINENUM,/{/p" < $FILE \
| tr '\n' ' ' \
| tr -d '{'`
LASTCOMLINE=`sed -n '1,'"$LINENUM"'{/\/\*/=;}' < $FILE | sed -n '$p'`
[ -z "$LASTCOMLINE" ] && LASTCOMLINE=1
LASTENDFUNCLINE=`sed -n '1,'"$LINENUM"'{/}/=;}' < $FILE | sed -n '$p'`
[ -z "$LASTENDFUNCLINE" ] && LASTENDFUNCLINE=1
FUNCHEAD="`sed -n -e \
"$LASTCOMLINE,"'/\*\//{h;s/^[\/ *]//;s/^\*[\/]*//;p;x;/\*\//q;}' \
< $FILE`"
[ "$LASTCOMLINE" -le "$LASTENDFUNCLINE" ] && FUNCHEAD=""
echo '
'
echo ''
echo -n ''
echo -n "$FUNC"'
'
echo -n '['
echo "$FILE"'
]'
echo '
'
echo ''"`html_safe "$FUNCDEF"`"'
'
echo ''
echo "`html_safebr "$FUNCHEAD"`"
echo '
'
echo '['
echo 'Top |'
echo 'To Do |'
echo 'Files ]
'
done
echo ''
echo ''
for FILE in $FILELIST; do
TODOLINES=`sed -n \
-e '/\/\*.*\*\//!{/\/\*/,/\*\//{/TODO:/{=;};};}' \
-e '/\/\*.*\*\//{/TODO:/{=;};}' \
< $FILE`
[ -z "$TODOLINES" ] && continue
echo -n ''
echo ''"$FILE"'
'
echo ''
for NUM in $TODOLINES; do
TODO=`sed -n "$NUM"'{s/^.*TODO://;s/\*\/.*$//;p;}' < $FILE`
echo "- [$NUM] `html_safe "$TODO"`
"
done
echo '
'
done
echo ''
# EOF
pv-1.2.0/autoconf/scripts/benchmark.sh 0000755 0000764 0000764 00000002026 10665520246 015553 0 ustar aw aw #!/bin/bash
#
# Benchmark the read/write performance of pv by looking at the number of
# read() and write() calls and the average amount of data transferred each
# time, as suggested by Ville Herva .
#
test_input=`mktemp /tmp/pvbench1XXXXXX`
strace_output=`mktemp /tmp/pvbench2XXXXXX`
trap "rm -f ${test_input} ${strace_output}" 0
pv=${pv:-./pv}
test -x ${pv} || pv=pv
dd if=/dev/zero of=${test_input} bs=1k count=1k >/dev/null 2>&1
echo -e "Buf(k)\tRate(k)\tReads\tRsize\tWrites\tWsize"
for ((buffer=100; buffer<=1000; buffer+=100)); do
for ((rate=0; rate<=1000; rate+=100)); do
rateparm="-L ${rate}k"
test ${rate} -eq 0 && rateparm=""
strace -tt -o ${strace_output} \
${pv} ${rateparm} -B ${buffer}k \
-f < ${test_input} > /dev/null 2>&1
rdata=$(
awk '$2~/^read\(0,/{c++;t+=$NF}END{print c "\t" t/c}' \
${strace_output}
)
wdata=$(
awk '$2~/^write\(1,/{c++;t+=$NF}END{print c "\t" t/c}' \
${strace_output}
)
echo -e "${buffer}\t${rate}\t${rdata}\t${wdata}"
done
done
# EOF
pv-1.2.0/autoconf/scripts/install.sh 0000755 0000764 0000764 00000012721 10566326622 015274 0 ustar aw aw #! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
pv-1.2.0/autoconf/scripts/po2table.sh 0000755 0000764 0000764 00000001743 10566326623 015341 0 ustar aw aw #!/bin/sh
#
# Messy script to convert all of the given .po files to a single C file on
# stdout.
cat <
struct msgtable_s {
char *msgid;
char *msgstr;
};
struct msgtable_s *minigettext__gettable(char *lang)
{
if (lang == 0)
return 0;
EOF
for POFILE; do
LANG=`basename "$POFILE" | sed 's/.po$//'`
echo " if (strncmp(lang, \"$LANG\", 2) == 0) {"
echo " static struct msgtable_s data[] = {";
awk 'BEGIN{i=0;s=0;}
/^msgid[ ]+/ {
if (s) print " }, ";
print " {";
print " " substr($0,7);
i=1;
s=0;
}
/^msgstr[ ]+/ {
print " ,";
i=0;s=1;
print " " substr($0,8);
}
/^[ ]*"/ {
if (i||s) print " " $0;
}
END {if (i||s) print " }\n";}
' < "$POFILE"
echo ' , { 0, 0 } };'
echo " return data;"
echo " }"
done
cat <