summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:51:54 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 11:51:54 +0000
commit99cf739e47c65174bda9e47a4d399b98522ed1a8 (patch)
treeac9565e82f830226cdeb139a39ce16da82ea059f
parentAdding upstream version 1.17~rc2. (diff)
downloadlziprecover-99cf739e47c65174bda9e47a4d399b98522ed1a8.tar.xz
lziprecover-99cf739e47c65174bda9e47a4d399b98522ed1a8.zip
Adding upstream version 1.17.upstream/1.17
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
-rw-r--r--ChangeLog22
-rw-r--r--INSTALL2
-rw-r--r--Makefile.in10
-rw-r--r--arg_parser.cc30
-rw-r--r--arg_parser.h30
-rwxr-xr-xconfigure2
-rw-r--r--doc/lziprecover.12
-rw-r--r--doc/lziprecover.info30
-rw-r--r--doc/lziprecover.texi12
-rw-r--r--lzip.h4
-rw-r--r--main.cc11
-rw-r--r--range_dec.cc7
-rw-r--r--unzcrash.cc2
13 files changed, 71 insertions, 93 deletions
diff --git a/ChangeLog b/ChangeLog
index 13ca71c..2de5aef 100644
--- a/ChangeLog
+++ b/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>
diff --git a/INSTALL b/INSTALL
index 7ec0887..86d61e3 100644
--- a/INSTALL
+++ b/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.
diff --git a/Makefile.in b/Makefile.in
index d9c2033..81b34a6 100644
--- a/Makefile.in
+++ b/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
diff --git a/arg_parser.cc b/arg_parser.cc
index 55764bd..551264a 100644
--- a/arg_parser.cc
+++ b/arg_parser.cc
@@ -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>
diff --git a/arg_parser.h b/arg_parser.h
index 2e8731c..3dc85d0 100644
--- a/arg_parser.h
+++ b/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
diff --git a/configure b/configure
index 1f4b5d9..34a1d6d 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/doc/lziprecover.1 b/doc/lziprecover.1
index 09e4872..b420b76 100644
--- a/doc/lziprecover.1
+++ b/doc/lziprecover.1
@@ -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
diff --git a/doc/lziprecover.info b/doc/lziprecover.info
index 883ed7e..cb9517a 100644
--- a/doc/lziprecover.info
+++ b/doc/lziprecover.info
@@ -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
diff --git a/doc/lziprecover.texi b/doc/lziprecover.texi
index 2bcaa0a..3f6e0aa 100644
--- a/doc/lziprecover.texi
+++ b/doc/lziprecover.texi
@@ -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.
diff --git a/lzip.h b/lzip.h
index 008125d..3450d7c 100644
--- a/lzip.h
+++ b/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,
diff --git a/main.cc b/main.cc
index a1bf966..9e3774b 100644
--- a/main.cc
+++ b/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 );
diff --git a/range_dec.cc b/range_dec.cc
index 8b4d6e0..062427a 100644
--- a/range_dec.cc
+++ b/range_dec.cc
@@ -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 );
diff --git a/unzcrash.cc b/unzcrash.cc
index fd1c816..49f67aa 100644
--- a/unzcrash.cc
+++ b/unzcrash.cc
@@ -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] )