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.
|
||||
* Minor changes.
|
||||
|
||||
2015-01-21 Antonio Diaz Diaz <antonio@gnu.org>
|
||||
|
||||
* Version 1.17-rc1 released.
|
||||
* Version 1.17 released.
|
||||
* New block selection algorithm makes merge up to 100 times faster.
|
||||
* repair.cc: Repair time has been reduced by 15%.
|
||||
* Added new option '-y, --debug-delay'.
|
||||
* 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'.
|
||||
* 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>
|
||||
|
||||
|
@ -32,8 +23,9 @@
|
|||
* repair.cc: Repair multi-member files with up to one byte error
|
||||
per member.
|
||||
* merge.cc: Merge multi-member files.
|
||||
* Added chapters 'Repairing files', 'Merging files' and 'Unzcrash'
|
||||
to the manual.
|
||||
* main.cc (show_header): Do not show header version.
|
||||
* lziprecover.texinfo: Added chapters 'Repairing files',
|
||||
'Merging files' and 'Unzcrash'.
|
||||
|
||||
2013-05-31 Antonio Diaz Diaz <antonio@gnu.org>
|
||||
|
||||
|
|
2
INSTALL
2
INSTALL
|
@ -1,7 +1,7 @@
|
|||
Requirements
|
||||
------------
|
||||
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.
|
||||
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)
|
||||
|
||||
$(progname) : $(objs)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(objs)
|
||||
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(objs)
|
||||
|
||||
unzcrash : $(unzobjs)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(unzobjs)
|
||||
$(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(unzobjs)
|
||||
|
||||
main.o : main.cc
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||
|
||||
unzcrash.o : unzcrash.cc
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
|
||||
|
||||
%.o : %.cc
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(objs) : Makefile
|
||||
arg_parser.o : arg_parser.h
|
||||
|
|
|
@ -1,28 +1,20 @@
|
|||
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
||||
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This library is free software. Redistribution and use in source and
|
||||
binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
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,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#include <cstring>
|
||||
|
|
30
arg_parser.h
30
arg_parser.h
|
@ -1,28 +1,20 @@
|
|||
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
|
||||
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
||||
|
||||
This library is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This library is free software. Redistribution and use in source and
|
||||
binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
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,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
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.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/* 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.
|
||||
|
||||
pkgname=lziprecover
|
||||
pkgversion=1.17-rc2
|
||||
pkgversion=1.17
|
||||
progname=lziprecover
|
||||
srctrigger=doc/${pkgname}.texi
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.\" 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
|
||||
lziprecover \- recovers data from damaged lzip files
|
||||
.SH SYNOPSIS
|
||||
|
|
|
@ -12,7 +12,7 @@ File: lziprecover.info, Node: Top, Next: Introduction, Up: (dir)
|
|||
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:
|
||||
|
||||
|
@ -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:
|
||||
(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
|
||||
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
||||
umount /mnt/cdimage
|
||||
(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
|
||||
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
||||
umount /mnt/cdimage
|
||||
|
@ -652,18 +652,18 @@ Concept index
|
|||
|
||||
Tag Table:
|
||||
Node: Top231
|
||||
Node: Introduction1213
|
||||
Node: Invoking lziprecover4309
|
||||
Node: Data safety9742
|
||||
Node: Repairing files11671
|
||||
Node: Merging files13573
|
||||
Node: File names15414
|
||||
Node: File format15878
|
||||
Node: Examples18282
|
||||
Ref: ddrescue-example19528
|
||||
Node: Unzcrash20770
|
||||
Node: Problems23324
|
||||
Node: Concept index23876
|
||||
Node: Introduction1208
|
||||
Node: Invoking lziprecover4304
|
||||
Node: Data safety9737
|
||||
Node: Repairing files11666
|
||||
Node: Merging files13568
|
||||
Node: File names15409
|
||||
Node: File format15873
|
||||
Node: Examples18277
|
||||
Ref: ddrescue-example19523
|
||||
Node: Unzcrash20779
|
||||
Node: Problems23333
|
||||
Node: Concept index23885
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
@finalout
|
||||
@c %**end of header
|
||||
|
||||
@set UPDATED 8 April 2015
|
||||
@set VERSION 1.17-rc2
|
||||
@set UPDATED 28 May 2015
|
||||
@set VERSION 1.17
|
||||
|
||||
@dircategory Data Compression
|
||||
@direntry
|
||||
|
@ -143,7 +143,7 @@ lziprecover [@var{options}] [@var{files}]
|
|||
|
||||
Lziprecover supports the following options:
|
||||
|
||||
@table @samp
|
||||
@table @code
|
||||
@item -h
|
||||
@itemx --help
|
||||
Print an informative help message describing the options and exit.
|
||||
|
@ -577,12 +577,12 @@ error-checked merging of copies
|
|||
for details about ddrescue).
|
||||
|
||||
@example
|
||||
ddrescue -b2048 /dev/cdrom cdimage1 logfile1
|
||||
ddrescue -d -r1 -b2048 /dev/cdrom cdimage1 logfile1
|
||||
mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
|
||||
cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
|
||||
umount /mnt/cdimage
|
||||
(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
|
||||
cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
|
||||
umount /mnt/cdimage
|
||||
|
@ -638,7 +638,7 @@ unzcrash [@var{options}] "lzip -tv" @var{filename}.lz
|
|||
|
||||
Unzcrash supports the following options:
|
||||
|
||||
@table @samp
|
||||
@table @code
|
||||
@item -h
|
||||
@itemx --help
|
||||
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,
|
||||
const bool no_ofile, const bool reg_only = false );
|
||||
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,
|
||||
const bool help = false );
|
||||
void internal_error( const char * const msg );
|
||||
void show_error2( const char * const msg1, const char * const name,
|
||||
const char * const msg2 );
|
||||
void internal_error( const char * const msg );
|
||||
|
||||
// defined in merge.cc
|
||||
void cleanup_and_fail( const std::string & output_filename,
|
||||
|
|
11
main.cc
11
main.cc
|
@ -145,7 +145,7 @@ void show_version()
|
|||
|
||||
} // end namespace
|
||||
|
||||
void show_header( const File_header & header )
|
||||
void show_header( const unsigned dictionary_size )
|
||||
{
|
||||
if( verbosity >= 3 )
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ void show_header( const File_header & header )
|
|||
enum { factor = 1024 };
|
||||
const char * p = "";
|
||||
const char * np = " ";
|
||||
unsigned num = header.dictionary_size();
|
||||
unsigned num = dictionary_size;
|
||||
bool exact = ( num % factor == 0 );
|
||||
|
||||
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() ); }
|
||||
retval = 2; break;
|
||||
}
|
||||
if( header.dictionary_size() < min_dictionary_size ||
|
||||
header.dictionary_size() > max_dictionary_size )
|
||||
const unsigned dictionary_size = header.dictionary_size();
|
||||
if( dictionary_size < min_dictionary_size ||
|
||||
dictionary_size > max_dictionary_size )
|
||||
{ pp( "Invalid dictionary size in member header." ); retval = 2; break; }
|
||||
|
||||
if( verbosity >= 2 || ( verbosity == 1 && first_member ) )
|
||||
{ pp(); show_header( header ); }
|
||||
{ pp(); show_header( dictionary_size ); }
|
||||
|
||||
LZ_decoder decoder( header, rdec, outfd );
|
||||
const int result = decoder.decode_member( pp );
|
||||
|
|
|
@ -58,11 +58,12 @@ int decompress_member( const int infd, const int outfd,
|
|||
header.version() ); }
|
||||
return 2;
|
||||
}
|
||||
if( header.dictionary_size() < min_dictionary_size ||
|
||||
header.dictionary_size() > max_dictionary_size )
|
||||
const unsigned dictionary_size = header.dictionary_size();
|
||||
if( dictionary_size < min_dictionary_size ||
|
||||
dictionary_size > max_dictionary_size )
|
||||
{ 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 );
|
||||
const int result = decoder.decode_member( pp );
|
||||
|
|
|
@ -128,7 +128,7 @@ unsigned long long getnum( const char * const ptr,
|
|||
|
||||
if( !errno && tail[0] )
|
||||
{
|
||||
int factor = ( tail[1] == 'i' ) ? 1024 : 1000;
|
||||
const int factor = ( tail[1] == 'i' ) ? 1024 : 1000;
|
||||
int exponent = 0;
|
||||
bool bad_multiplier = false;
|
||||
switch( tail[0] )
|
||||
|
|
Loading…
Add table
Reference in a new issue