diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 10:06:25 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 10:06:25 +0000 |
commit | cbcc47a0b7c19d9fe1e73a07860a7c10739a9d1c (patch) | |
tree | 5bf33f510fd297a75e361729c74fdfffb72b54e6 | |
parent | Adding upstream version 1.17~pre1. (diff) | |
download | lzip-cbcc47a0b7c19d9fe1e73a07860a7c10739a9d1c.tar.xz lzip-cbcc47a0b7c19d9fe1e73a07860a7c10739a9d1c.zip |
Adding upstream version 1.17~rc1.upstream/1.17_rc1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | arg_parser.cc | 30 | ||||
-rw-r--r-- | arg_parser.h | 30 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | decoder.cc | 2 | ||||
-rw-r--r-- | decoder.h | 2 | ||||
-rw-r--r-- | doc/lzip.1 | 2 | ||||
-rw-r--r-- | doc/lzip.info | 20 | ||||
-rw-r--r-- | doc/lzip.texi | 4 | ||||
-rw-r--r-- | main.cc | 26 |
11 files changed, 58 insertions, 67 deletions
@@ -1,3 +1,8 @@ +2015-04-17 Antonio Diaz Diaz <antonio@gnu.org> + + * Version 1.17-rc1 released. + * main.cc (compress): Fixed spurious warning about uninitialized var. + 2015-03-26 Antonio Diaz Diaz <antonio@gnu.org> * Version 1.17-pre1 released. @@ -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/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 @@ -6,7 +6,7 @@ # to copy, distribute and modify it. pkgname=lzip -pkgversion=1.17-pre1 +pkgversion=1.17-rc1 progname=lzip srctrigger=doc/${pkgname}.texi @@ -213,7 +213,7 @@ int LZ_decoder::decode_member( const Pretty_print & pp ) const int pos_state = data_position() & pos_state_mask; if( rdec.decode_bit( bm_match[state()][pos_state] ) == 0 ) // 1st bit { - const uint8_t prev_byte = peek1(); + const uint8_t prev_byte = peek_prev(); if( state.is_char() ) { state.set_char1(); @@ -223,7 +223,7 @@ class LZ_decoder void flush_data(); bool verify_trailer( const Pretty_print & pp ) const; - uint8_t peek1() const + uint8_t peek_prev() const { const int i = ( ( pos > 0 ) ? pos : buffer_size ) - 1; return buffer[i]; @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH LZIP "1" "March 2015" "lzip 1.17-pre1" "User Commands" +.TH LZIP "1" "April 2015" "lzip 1.17-rc1" "User Commands" .SH NAME lzip \- reduces the size of files .SH SYNOPSIS diff --git a/doc/lzip.info b/doc/lzip.info index dd8858b..53f7c55 100644 --- a/doc/lzip.info +++ b/doc/lzip.info @@ -11,7 +11,7 @@ File: lzip.info, Node: Top, Next: Introduction, Up: (dir) Lzip Manual *********** -This manual is for Lzip (version 1.17-pre1, 26 March 2015). +This manual is for Lzip (version 1.17-rc1, 17 April 2015). * Menu: @@ -1209,15 +1209,15 @@ Concept index Tag Table: Node: Top208 -Node: Introduction1026 -Node: Algorithm6037 -Node: Invoking lzip8794 -Node: File format14384 -Node: Stream format16769 -Node: Examples26201 -Node: Problems28158 -Node: Reference source code28688 -Node: Concept index42025 +Node: Introduction1025 +Node: Algorithm6036 +Node: Invoking lzip8793 +Node: File format14383 +Node: Stream format16768 +Node: Examples26200 +Node: Problems28157 +Node: Reference source code28687 +Node: Concept index42024 End Tag Table diff --git a/doc/lzip.texi b/doc/lzip.texi index 58d6f9a..5046140 100644 --- a/doc/lzip.texi +++ b/doc/lzip.texi @@ -6,8 +6,8 @@ @finalout @c %**end of header -@set UPDATED 26 March 2015 -@set VERSION 1.17-pre1 +@set UPDATED 17 April 2015 +@set VERSION 1.17-rc1 @dircategory Data Compression @direntry @@ -184,7 +184,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] ) @@ -431,12 +431,12 @@ int compress( const unsigned long long member_size, else { File_header header; - if( !header.dictionary_size( encoder_options.dictionary_size ) || - encoder_options.match_len_limit < min_match_len_limit || - encoder_options.match_len_limit > max_match_len ) - internal_error( "invalid argument to encoder." ); - encoder = new LZ_encoder( header.dictionary_size(), - encoder_options.match_len_limit, infd, outfd ); + if( header.dictionary_size( encoder_options.dictionary_size ) && + encoder_options.match_len_limit >= min_match_len_limit && + encoder_options.match_len_limit <= max_match_len ) + encoder = new LZ_encoder( header.dictionary_size(), + encoder_options.match_len_limit, infd, outfd ); + else internal_error( "invalid argument to encoder." ); } unsigned long long in_size = 0, out_size = 0, partial_volume_size = 0; @@ -746,14 +746,15 @@ int main( const int argc, const char * const argv[] ) { const int code = parser.code( argind ); if( !code ) break; /* no more options */ - const char * const arg = parser.argument( argind ).c_str(); + const std::string & arg = parser.argument( argind ); switch( code ) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': zero = ( code == '0' ); encoder_options = option_mapping[code-'0']; break; - case 'b': member_size = getnum( arg, 100000, max_member_size ); break; + case 'b': member_size = getnum( arg.c_str(), 100000, max_member_size ); + break; case 'c': to_stdout = true; break; case 'd': program_mode = m_decompress; break; case 'f': force = true; break; @@ -761,14 +762,15 @@ int main( const int argc, const char * const argv[] ) case 'h': show_help(); return 0; case 'k': keep_input_files = true; break; case 'm': encoder_options.match_len_limit = - getnum( arg, min_match_len_limit, max_match_len ); + getnum( arg.c_str(), min_match_len_limit, max_match_len ); zero = false; break; case 'n': break; case 'o': default_output_filename = arg; break; case 'q': verbosity = -1; break; - case 's': encoder_options.dictionary_size = get_dict_size( arg ); + case 's': encoder_options.dictionary_size = get_dict_size( arg.c_str() ); zero = false; break; - case 'S': volume_size = getnum( arg, 100000, max_volume_size ); break; + case 'S': volume_size = getnum( arg.c_str(), 100000, max_volume_size ); + break; case 't': program_mode = m_test; break; case 'v': if( verbosity < 4 ) ++verbosity; break; case 'V': show_version(); return 0; |