Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bzip2/dist Merge changes from dist/bzip2:



details:   https://anonhg.NetBSD.org/src/rev/e9a29003c04a
branches:  trunk
changeset: 779153:e9a29003c04a
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon May 07 00:30:05 2012 +0000

description:
Merge changes from dist/bzip2:
man page converted to mdoc
compiler warning fixes
integer overflow fix
remove files that aren't used on NetBSD

Add adapted bzip2netbsd script.

diffstat:

 external/bsd/bzip2/dist/bzip2.1         |    890 +-
 external/bsd/bzip2/dist/bzip2.c         |     51 +-
 external/bsd/bzip2/dist/bzip2netbsd     |    123 +
 external/bsd/bzip2/dist/bzip2recover.c  |     58 +-
 external/bsd/bzip2/dist/bzlib.c         |      4 +-
 external/bsd/bzip2/dist/bzlib_private.h |      4 +-
 external/bsd/bzip2/dist/decompress.c    |      9 +-
 external/bsd/bzip2/dist/manual.pdf      |    Bin 
 external/bsd/bzip2/dist/manual.ps       |  82900 ------------------------------
 9 files changed, 671 insertions(+), 83368 deletions(-)

diffs (truncated from 84335 to 300 lines):

diff -r 56710f3b87e9 -r e9a29003c04a external/bsd/bzip2/dist/bzip2.1
--- a/external/bsd/bzip2/dist/bzip2.1   Mon May 07 00:21:32 2012 +0000
+++ b/external/bsd/bzip2/dist/bzip2.1   Mon May 07 00:30:05 2012 +0000
@@ -1,456 +1,510 @@
-.\"    $NetBSD: bzip2.1,v 1.1.1.1 2012/05/07 00:21:47 wiz Exp $
+.\"    $NetBSD: bzip2.1,v 1.2 2012/05/07 00:30:05 wiz Exp $
 .\"
-.PU
-.TH bzip2 1
-.SH NAME
-bzip2, bunzip2 \- a block-sorting file compressor, v1.0.4
-.br
-bzcat \- decompresses files to stdout
-.br
-bzip2recover \- recovers data from damaged bzip2 files
-
-.SH SYNOPSIS
-.ll +8
-.B bzip2
-.RB [ " \-cdfkqstvzVL123456789 " ]
-[
-.I "filenames \&..."
-]
-.ll -8
-.br
-.B bunzip2
-.RB [ " \-fkvsVL " ]
-[ 
-.I "filenames \&..."
-]
-.br
-.B bzcat
-.RB [ " \-s " ]
-[ 
-.I "filenames \&..."
-]
-.br
-.B bzip2recover
-.I "filename"
-
-.SH DESCRIPTION
-.I bzip2
+.Dd May 14, 2010
+.Dt BZIP2 1
+.Os
+.Sh NAME
+.Nm bzip2 ,
+.Nm bunzip2 ,
+.Nm bzcat ,
+.Nm bzip2recover
+.Nd block-sorting file compressor
+.Sh SYNOPSIS
+.Nm bzip2
+.Op Fl 123456789cdfkLqstVvz
+.Op Ar filename Ar
+.Pp
+.Nm bunzip2
+.Op Fl fkLVvs
+.Op Ar filename Ar
+.Pp
+.Nm bzcat
+.Op Fl s
+.Op Ar filename Ar
+.Pp
+.Nm bzip2recover
+.Ar filename
+.Sh DESCRIPTION
+.Nm bzip2
 compresses files using the Burrows-Wheeler block sorting
-text compression algorithm, and Huffman coding.  Compression is
-generally considerably better than that achieved by more conventional
-LZ77/LZ78-based compressors, and approaches the performance of the PPM
-family of statistical compressors.
-
-The command-line options are deliberately very similar to 
-those of 
-.I GNU gzip, 
+text compression algorithm, and Huffman coding.
+Compression is generally considerably better than that achieved by
+more conventional LZ77/LZ78-based compressors, and approaches the
+performance of the PPM family of statistical compressors.
+.Pp
+.Nm bzcat
+decompresses files to stdout, and
+.Nm bzip2recover
+recovers data from damaged bzip2 files.
+.Pp
+The command-line options are deliberately very similar to
+those of
+.Xr gzip 1 ,
 but they are not identical.
-
-.I bzip2
-expects a list of file names to accompany the
-command-line flags.  Each file is replaced by a compressed version of
-itself, with the name "original_name.bz2".  
-Each compressed file
-has the same modification date, permissions, and, when possible,
-ownership as the corresponding original, so that these properties can
-be correctly restored at decompression time.  File name handling is
-naive in the sense that there is no mechanism for preserving original
-file names, permissions, ownerships or dates in filesystems which lack
-these concepts, or have serious file name length restrictions, such as
-MS-DOS.
-
-.I bzip2
+.Pp
+.Nm bzip2
+expects a list of file names to accompany the command-line flags.
+Each file is replaced by a compressed version of
+itself, with the name
+.Dq Pa original_name.bz2 .
+Each compressed file has the same modification date, permissions, and,
+when possible, ownership as the corresponding original, so that these
+properties can be correctly restored at decompression time.
+File name handling is naive in the sense that there is no mechanism
+for preserving original file names, permissions, ownerships or dates
+in filesystems which lack these concepts, or have serious file name
+length restrictions, such as
+.Tn MS-DOS .
+.Nm bzip2
 and
-.I bunzip2
-will by default not overwrite existing
-files.  If you want this to happen, specify the \-f flag.
-
+.Nm bunzip2
+will by default not overwrite existing files.
+If you want this to happen, specify the
+.Fl f
+flag.
+.Pp
 If no file names are specified,
-.I bzip2
-compresses from standard
-input to standard output.  In this case,
-.I bzip2
-will decline to
-write compressed output to a terminal, as this would be entirely
-incomprehensible and therefore pointless.
-
-.I bunzip2
+.Nm bzip2
+compresses from standard input to standard output.
+In this case,
+.Nm bzip2
+will decline to write compressed output to a terminal, as this would
+be entirely incomprehensible and therefore pointless.
+.Pp
+.Nm bunzip2
 (or
-.I bzip2 \-d) 
-decompresses all
-specified files.  Files which were not created by 
-.I bzip2
-will be detected and ignored, and a warning issued.  
-.I bzip2
-attempts to guess the filename for the decompressed file 
+.Nm bzip2 Fl d )
+decompresses all specified files.
+Files which were not created by
+.Nm bzip2
+will be detected and ignored, and a warning issued.
+.Nm bzip2
+attempts to guess the filename for the decompressed file
 from that of the compressed file as follows:
-
-       filename.bz2    becomes   filename
-       filename.bz     becomes   filename
-       filename.tbz2   becomes   filename.tar
-       filename.tbz    becomes   filename.tar
-       anyothername    becomes   anyothername.out
-
-If the file does not end in one of the recognised endings, 
-.I .bz2, 
-.I .bz, 
-.I .tbz2
+.Bl -column "filename.tbz2" "becomes" -offset indent
+.It Pa filename.bz2  Ta becomes Ta Pa filename
+.It Pa filename.bz   Ta becomes Ta Pa filename
+.It Pa filename.tbz2 Ta becomes Ta Pa filename.tar
+.It Pa filename.tbz  Ta becomes Ta Pa filename.tar
+.It Pa anyothername  Ta becomes Ta Pa anyothername.out
+.El
+.Pp
+If the file does not end in one of the recognised endings,
+.Pa .bz2 ,
+.Pa .bz ,
+.Pa .tbz2 ,
 or
-.I .tbz, 
-.I bzip2 
-complains that it cannot
-guess the name of the original file, and uses the original name
-with
-.I .out
+.Pa .tbz ,
+.Nm bzip2
+complains that it cannot guess the name of the original file, and uses
+the original name with
+.Pa .out
 appended.
-
-As with compression, supplying no
-filenames causes decompression from 
+.Pp
+As with compression, supplying no filenames causes decompression from
 standard input to standard output.
-
-.I bunzip2 
-will correctly decompress a file which is the
-concatenation of two or more compressed files.  The result is the
-concatenation of the corresponding uncompressed files.  Integrity
-testing (\-t) 
-of concatenated 
-compressed files is also supported.
-
+.Pp
+.Nm bunzip2
+will correctly decompress a file which is the concatenation of two or
+more compressed files.
+The result is the concatenation of the corresponding uncompressed
+files.
+Integrity testing
+.Pq Fl t
+of concatenated compressed files is also supported.
+.Pp
 You can also compress or decompress files to the standard output by
-giving the \-c flag.  Multiple files may be compressed and
-decompressed like this.  The resulting outputs are fed sequentially to
-stdout.  Compression of multiple files 
-in this manner generates a stream
-containing multiple compressed file representations.  Such a stream
-can be decompressed correctly only by
-.I bzip2 
-version 0.9.0 or
-later.  Earlier versions of
-.I bzip2
+giving the
+.Fl c
+flag.
+Multiple files may be compressed and decompressed like this.
+The resulting outputs are fed sequentially to stdout.
+Compression of multiple files in this manner generates a stream
+containing multiple compressed file representations.
+Such a stream can be decompressed correctly only by
+.Nm bzip2
+version 0.9.0 or later.
+Earlier versions of
+.Nm bzip2
 will stop after decompressing
 the first file in the stream.
-
-.I bzcat
+.Pp
+.Nm bzcat
 (or
-.I bzip2 -dc) 
-decompresses all specified files to
-the standard output.
-
-.I bzip2
-will read arguments from the environment variables
-.I BZIP2
-and
-.I BZIP,
-in that order, and will process them
-before any arguments read from the command line.  This gives a 
-convenient way to supply default arguments.
-
-Compression is always performed, even if the compressed 
-file is slightly
-larger than the original.  Files of less than about one hundred bytes
-tend to get larger, since the compression mechanism has a constant
-overhead in the region of 50 bytes.  Random data (including the output
-of most file compressors) is coded at about 8.05 bits per byte, giving
-an expansion of around 0.5%.
-
-As a self-check for your protection, 
-.I 
-bzip2
-uses 32-bit CRCs to
-make sure that the decompressed version of a file is identical to the
-original.  This guards against corruption of the compressed data, and
-against undetected bugs in
-.I bzip2
-(hopefully very unlikely).  The
-chances of data corruption going undetected is microscopic, about one
-chance in four billion for each file processed.  Be aware, though, that
-the check occurs upon decompression, so it can only tell you that
-something is wrong.  It can't help you 
-recover the original uncompressed
-data.  You can use 
-.I bzip2recover
+.Nm bzip2 Fl dc )
+decompresses all specified files to the standard output.
+.Pp
+Compression is always performed, even if the compressed file is
+slightly larger than the original.
+Files of less than about one hundred bytes tend to get larger, since



Home | Main Index | Thread Index | Old Index