Adding upstream version 1.17.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
27b84c299b
commit
f06ff1621d
13 changed files with 71 additions and 93 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,22 +1,13 @@
|
||||||
2015-04-08 Antonio Diaz Diaz <antonio@gnu.org>
|
2015-05-28 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
* Version 1.17-rc2 released.
|
* Version 1.17 released.
|
||||||
* Minor changes.
|
* New block selection algorithm makes merge up to 100 times faster.
|
||||||
|
|
||||||
2015-01-21 Antonio Diaz Diaz <antonio@gnu.org>
|
|
||||||
|
|
||||||
* Version 1.17-rc1 released.
|
|
||||||
* repair.cc: Repair time has been reduced by 15%.
|
* repair.cc: Repair time has been reduced by 15%.
|
||||||
* Added new option '-y, --debug-delay'.
|
* Added new option '-y, --debug-delay'.
|
||||||
* Added new option '-z, --debug-repair'.
|
* Added new option '-z, --debug-repair'.
|
||||||
|
|
||||||
2014-10-16 Antonio Diaz Diaz <antonio@gnu.org>
|
|
||||||
|
|
||||||
* Version 1.17-pre1 released.
|
|
||||||
* New block selection algorithm makes merge up to 100 times faster.
|
|
||||||
* Makefile.in: Added new targets 'install*-compress'.
|
* Makefile.in: Added new targets 'install*-compress'.
|
||||||
* testsuite/unzcrash.cc: Moved to top directory.
|
* testsuite/unzcrash.cc: Moved to top directory.
|
||||||
* Added chapter 'File names' to the manual.
|
* lziprecover.texi: Added chapter 'File names'.
|
||||||
|
|
||||||
2014-08-29 Antonio Diaz Diaz <antonio@gnu.org>
|
2014-08-29 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
|
@ -32,8 +23,9 @@
|
||||||
* repair.cc: Repair multi-member files with up to one byte error
|
* repair.cc: Repair multi-member files with up to one byte error
|
||||||
per member.
|
per member.
|
||||||
* merge.cc: Merge multi-member files.
|
* merge.cc: Merge multi-member files.
|
||||||
* Added chapters 'Repairing files', 'Merging files' and 'Unzcrash'
|
* main.cc (show_header): Do not show header version.
|
||||||
to the manual.
|
* lziprecover.texinfo: Added chapters 'Repairing files',
|
||||||
|
'Merging files' and 'Unzcrash'.
|
||||||
|
|
||||||
2013-05-31 Antonio Diaz Diaz <antonio@gnu.org>
|
2013-05-31 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
|
|
2
INSTALL
2
INSTALL
|
@ -1,7 +1,7 @@
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
You will need a C++ compiler.
|
You will need a C++ compiler.
|
||||||
I use gcc 4.9.1 and 3.3.6, but the code should compile with any
|
I use gcc 4.9.1 and 4.1.2, but the code should compile with any
|
||||||
standards compliant compiler.
|
standards compliant compiler.
|
||||||
Gcc is available at http://gcc.gnu.org.
|
Gcc is available at http://gcc.gnu.org.
|
||||||
|
|
||||||
|
|
10
Makefile.in
10
Makefile.in
|
@ -20,19 +20,19 @@ unzobjs = arg_parser.o unzcrash.o
|
||||||
all : $(progname)
|
all : $(progname)
|
||||||
|
|
||||||
$(progname) : $(objs)
|
$(progname) : $(objs)
|
||||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(objs)
|
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(objs)
|
||||||
|
|
||||||
unzcrash : $(unzobjs)
|
unzcrash : $(unzobjs)
|
||||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(unzobjs)
|
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(unzobjs)
|
||||||
|
|
||||||
main.o : main.cc
|
main.o : main.cc
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||||
|
|
||||||
unzcrash.o : unzcrash.cc
|
unzcrash.o : unzcrash.cc
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||||
|
|
||||||
%.o : %.cc
|
%.o : %.cc
|
||||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
$(objs) : Makefile
|
$(objs) : Makefile
|
||||||
arg_parser.o : arg_parser.h
|
arg_parser.o : arg_parser.h
|
||||||
|
|
|
@ -1,28 +1,20 @@
|
||||||
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
||||||
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
||||||
|
|
||||||
This library is free software: you can redistribute it and/or modify
|
This library is free software. Redistribution and use in source and
|
||||||
it under the terms of the GNU General Public License as published by
|
binary forms, with or without modification, are permitted provided
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
that the following conditions are met:
|
||||||
(at your option) any later version.
|
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
As a special exception, you may use this file as part of a free
|
|
||||||
software library without restriction. Specifically, if other files
|
|
||||||
instantiate templates or use macros or inline functions from this
|
|
||||||
file, or you compile this file and link it with other files to
|
|
||||||
produce an executable, this file does not by itself cause the
|
|
||||||
resulting executable to be covered by the GNU General Public
|
|
||||||
License. This exception does not however invalidate any other
|
|
||||||
reasons why the executable file might be covered by the GNU General
|
|
||||||
Public License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
30
arg_parser.h
30
arg_parser.h
|
@ -1,28 +1,20 @@
|
||||||
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
||||||
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
||||||
|
|
||||||
This library is free software: you can redistribute it and/or modify
|
This library is free software. Redistribution and use in source and
|
||||||
it under the terms of the GNU General Public License as published by
|
binary forms, with or without modification, are permitted provided
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
that the following conditions are met:
|
||||||
(at your option) any later version.
|
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
As a special exception, you may use this file as part of a free
|
|
||||||
software library without restriction. Specifically, if other files
|
|
||||||
instantiate templates or use macros or inline functions from this
|
|
||||||
file, or you compile this file and link it with other files to
|
|
||||||
produce an executable, this file does not by itself cause the
|
|
||||||
resulting executable to be covered by the GNU General Public
|
|
||||||
License. This exception does not however invalidate any other
|
|
||||||
reasons why the executable file might be covered by the GNU General
|
|
||||||
Public License.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Arg_parser reads the arguments in 'argv' and creates a number of
|
/* Arg_parser reads the arguments in 'argv' and creates a number of
|
||||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -6,7 +6,7 @@
|
||||||
# to copy, distribute and modify it.
|
# to copy, distribute and modify it.
|
||||||
|
|
||||||
pkgname=lziprecover
|
pkgname=lziprecover
|
||||||
pkgversion=1.17-rc2
|
pkgversion=1.17
|
||||||
progname=lziprecover
|
progname=lziprecover
|
||||||
srctrigger=doc/${pkgname}.texi
|
srctrigger=doc/${pkgname}.texi
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1.
|
||||||
.TH LZIPRECOVER "1" "April 2015" "lziprecover 1.17-rc2" "User Commands"
|
.TH LZIPRECOVER "1" "May 2015" "lziprecover 1.17" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lziprecover \- recovers data from damaged lzip files
|
lziprecover \- recovers data from damaged lzip files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -12,7 +12,7 @@ File: lziprecover.info, Node: Top, Next: Introduction, Up: (dir)
|
||||||
Lziprecover Manual
|
Lziprecover Manual
|
||||||
******************
|
******************
|
||||||
|
|
||||||
This manual is for Lziprecover (version 1.17-rc2, 8 April 2015).
|
This manual is for Lziprecover (version 1.17, 28 May 2015).
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
|
@ -509,12 +509,12 @@ Example 7: Recover a compressed backup from two copies on CD-ROM with
|
||||||
error-checked merging of copies (*Note GNU ddrescue manual:
|
error-checked merging of copies (*Note GNU ddrescue manual:
|
||||||
(ddrescue)Top, for details about ddrescue).
|
(ddrescue)Top, for details about ddrescue).
|
||||||
|
|
||||||
ddrescue -b2048 /dev/cdrom cdimage1 logfile1
|
ddrescue -d -r1 -b2048 /dev/cdrom cdimage1 logfile1
|
||||||
mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
|
mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
|
||||||
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
||||||
umount /mnt/cdimage
|
umount /mnt/cdimage
|
||||||
(insert second copy in the CD drive)
|
(insert second copy in the CD drive)
|
||||||
ddrescue -b2048 /dev/cdrom cdimage2 logfile2
|
ddrescue -d -r1 -b2048 /dev/cdrom cdimage2 logfile2
|
||||||
mount -t iso9660 -o loop,ro cdimage2 /mnt/cdimage
|
mount -t iso9660 -o loop,ro cdimage2 /mnt/cdimage
|
||||||
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
||||||
umount /mnt/cdimage
|
umount /mnt/cdimage
|
||||||
|
@ -652,18 +652,18 @@ Concept index
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
Node: Top231
|
Node: Top231
|
||||||
Node: Introduction1213
|
Node: Introduction1208
|
||||||
Node: Invoking lziprecover4309
|
Node: Invoking lziprecover4304
|
||||||
Node: Data safety9742
|
Node: Data safety9737
|
||||||
Node: Repairing files11671
|
Node: Repairing files11666
|
||||||
Node: Merging files13573
|
Node: Merging files13568
|
||||||
Node: File names15414
|
Node: File names15409
|
||||||
Node: File format15878
|
Node: File format15873
|
||||||
Node: Examples18282
|
Node: Examples18277
|
||||||
Ref: ddrescue-example19528
|
Ref: ddrescue-example19523
|
||||||
Node: Unzcrash20770
|
Node: Unzcrash20779
|
||||||
Node: Problems23324
|
Node: Problems23333
|
||||||
Node: Concept index23876
|
Node: Concept index23885
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
@finalout
|
@finalout
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set UPDATED 8 April 2015
|
@set UPDATED 28 May 2015
|
||||||
@set VERSION 1.17-rc2
|
@set VERSION 1.17
|
||||||
|
|
||||||
@dircategory Data Compression
|
@dircategory Data Compression
|
||||||
@direntry
|
@direntry
|
||||||
|
@ -143,7 +143,7 @@ lziprecover [@var{options}] [@var{files}]
|
||||||
|
|
||||||
Lziprecover supports the following options:
|
Lziprecover supports the following options:
|
||||||
|
|
||||||
@table @samp
|
@table @code
|
||||||
@item -h
|
@item -h
|
||||||
@itemx --help
|
@itemx --help
|
||||||
Print an informative help message describing the options and exit.
|
Print an informative help message describing the options and exit.
|
||||||
|
@ -577,12 +577,12 @@ error-checked merging of copies
|
||||||
for details about ddrescue).
|
for details about ddrescue).
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ddrescue -b2048 /dev/cdrom cdimage1 logfile1
|
ddrescue -d -r1 -b2048 /dev/cdrom cdimage1 logfile1
|
||||||
mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
|
mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
|
||||||
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
||||||
umount /mnt/cdimage
|
umount /mnt/cdimage
|
||||||
(insert second copy in the CD drive)
|
(insert second copy in the CD drive)
|
||||||
ddrescue -b2048 /dev/cdrom cdimage2 logfile2
|
ddrescue -d -r1 -b2048 /dev/cdrom cdimage2 logfile2
|
||||||
mount -t iso9660 -o loop,ro cdimage2 /mnt/cdimage
|
mount -t iso9660 -o loop,ro cdimage2 /mnt/cdimage
|
||||||
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
||||||
umount /mnt/cdimage
|
umount /mnt/cdimage
|
||||||
|
@ -638,7 +638,7 @@ unzcrash [@var{options}] "lzip -tv" @var{filename}.lz
|
||||||
|
|
||||||
Unzcrash supports the following options:
|
Unzcrash supports the following options:
|
||||||
|
|
||||||
@table @samp
|
@table @code
|
||||||
@item -h
|
@item -h
|
||||||
@itemx --help
|
@itemx --help
|
||||||
Print an informative help message describing the options and exit.
|
Print an informative help message describing the options and exit.
|
||||||
|
|
4
lzip.h
4
lzip.h
|
@ -290,12 +290,12 @@ int seek_read( const int fd, uint8_t * const buf, const int size,
|
||||||
int open_instream( const char * const name, struct stat * const in_statsp,
|
int open_instream( const char * const name, struct stat * const in_statsp,
|
||||||
const bool no_ofile, const bool reg_only = false );
|
const bool no_ofile, const bool reg_only = false );
|
||||||
int open_outstream_rw( const std::string & output_filename, const bool force );
|
int open_outstream_rw( const std::string & output_filename, const bool force );
|
||||||
void show_header( const File_header & header );
|
void show_header( const unsigned dictionary_size );
|
||||||
void show_error( const char * const msg, const int errcode = 0,
|
void show_error( const char * const msg, const int errcode = 0,
|
||||||
const bool help = false );
|
const bool help = false );
|
||||||
|
void internal_error( const char * const msg );
|
||||||
void show_error2( const char * const msg1, const char * const name,
|
void show_error2( const char * const msg1, const char * const name,
|
||||||
const char * const msg2 );
|
const char * const msg2 );
|
||||||
void internal_error( const char * const msg );
|
|
||||||
|
|
||||||
// defined in merge.cc
|
// defined in merge.cc
|
||||||
void cleanup_and_fail( const std::string & output_filename,
|
void cleanup_and_fail( const std::string & output_filename,
|
||||||
|
|
11
main.cc
11
main.cc
|
@ -145,7 +145,7 @@ void show_version()
|
||||||
|
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
||||||
void show_header( const File_header & header )
|
void show_header( const unsigned dictionary_size )
|
||||||
{
|
{
|
||||||
if( verbosity >= 3 )
|
if( verbosity >= 3 )
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,7 @@ void show_header( const File_header & header )
|
||||||
enum { factor = 1024 };
|
enum { factor = 1024 };
|
||||||
const char * p = "";
|
const char * p = "";
|
||||||
const char * np = " ";
|
const char * np = " ";
|
||||||
unsigned num = header.dictionary_size();
|
unsigned num = dictionary_size;
|
||||||
bool exact = ( num % factor == 0 );
|
bool exact = ( num % factor == 0 );
|
||||||
|
|
||||||
for( int i = 0; i < 8 && ( num > 9999 || ( exact && num >= factor ) ); ++i )
|
for( int i = 0; i < 8 && ( num > 9999 || ( exact && num >= factor ) ); ++i )
|
||||||
|
@ -488,12 +488,13 @@ int decompress( const int infd, const Pretty_print & pp, const bool testing )
|
||||||
header.version() ); }
|
header.version() ); }
|
||||||
retval = 2; break;
|
retval = 2; break;
|
||||||
}
|
}
|
||||||
if( header.dictionary_size() < min_dictionary_size ||
|
const unsigned dictionary_size = header.dictionary_size();
|
||||||
header.dictionary_size() > max_dictionary_size )
|
if( dictionary_size < min_dictionary_size ||
|
||||||
|
dictionary_size > max_dictionary_size )
|
||||||
{ pp( "Invalid dictionary size in member header." ); retval = 2; break; }
|
{ pp( "Invalid dictionary size in member header." ); retval = 2; break; }
|
||||||
|
|
||||||
if( verbosity >= 2 || ( verbosity == 1 && first_member ) )
|
if( verbosity >= 2 || ( verbosity == 1 && first_member ) )
|
||||||
{ pp(); show_header( header ); }
|
{ pp(); show_header( dictionary_size ); }
|
||||||
|
|
||||||
LZ_decoder decoder( header, rdec, outfd );
|
LZ_decoder decoder( header, rdec, outfd );
|
||||||
const int result = decoder.decode_member( pp );
|
const int result = decoder.decode_member( pp );
|
||||||
|
|
|
@ -58,11 +58,12 @@ int decompress_member( const int infd, const int outfd,
|
||||||
header.version() ); }
|
header.version() ); }
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if( header.dictionary_size() < min_dictionary_size ||
|
const unsigned dictionary_size = header.dictionary_size();
|
||||||
header.dictionary_size() > max_dictionary_size )
|
if( dictionary_size < min_dictionary_size ||
|
||||||
|
dictionary_size > max_dictionary_size )
|
||||||
{ pp( "Invalid dictionary size in member header." ); return 2; }
|
{ pp( "Invalid dictionary size in member header." ); return 2; }
|
||||||
|
|
||||||
if( pp.verbosity() >= 2 ) { pp(); show_header( header ); }
|
if( pp.verbosity() >= 2 ) { pp(); show_header( dictionary_size ); }
|
||||||
|
|
||||||
LZ_decoder decoder( header, rdec, outfd, outskip, outend );
|
LZ_decoder decoder( header, rdec, outfd, outskip, outend );
|
||||||
const int result = decoder.decode_member( pp );
|
const int result = decoder.decode_member( pp );
|
||||||
|
|
|
@ -128,7 +128,7 @@ unsigned long long getnum( const char * const ptr,
|
||||||
|
|
||||||
if( !errno && tail[0] )
|
if( !errno && tail[0] )
|
||||||
{
|
{
|
||||||
int factor = ( tail[1] == 'i' ) ? 1024 : 1000;
|
const int factor = ( tail[1] == 'i' ) ? 1024 : 1000;
|
||||||
int exponent = 0;
|
int exponent = 0;
|
||||||
bool bad_multiplier = false;
|
bool bad_multiplier = false;
|
||||||
switch( tail[0] )
|
switch( tail[0] )
|
||||||
|
|
Loading…
Add table
Reference in a new issue