summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--INSTALL2
-rw-r--r--Makefile.in6
-rw-r--r--carg_parser.c30
-rw-r--r--carg_parser.h30
-rwxr-xr-xconfigure2
-rw-r--r--decoder.c2
-rw-r--r--decoder.h2
-rw-r--r--doc/lunzip.12
-rw-r--r--main.c4
10 files changed, 34 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 8083041..b079b92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
-2015-03-26 Antonio Diaz Diaz <antonio@gnu.org>
+2015-05-27 Antonio Diaz Diaz <antonio@gnu.org>
- * Version 1.7-pre1 released.
+ * Version 1.7 released.
* Minor changes.
* Makefile.in: Added new targets 'install*-compress'.
diff --git a/INSTALL b/INSTALL
index 44a72cc..c1a9d9a 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 a94ec86..1ae3c91 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -18,13 +18,13 @@ objs = carg_parser.o decoder.o main.o
all : $(progname)
$(progname) : $(objs)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs)
+ $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(objs)
main.o : main.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -DPROGVERSION=\"$(pkgversion)\" -c -o $@ $<
%.o : %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
$(objs) : Makefile
carg_parser.o : carg_parser.h
diff --git a/carg_parser.c b/carg_parser.c
index a453e36..8d74ea6 100644
--- a/carg_parser.c
+++ b/carg_parser.c
@@ -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 <stdlib.h>
diff --git a/carg_parser.h b/carg_parser.h
index 34b1263..ed4d9c5 100644
--- a/carg_parser.h
+++ b/carg_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 9bf2475..7d1150c 100755
--- a/configure
+++ b/configure
@@ -6,7 +6,7 @@
# to copy, distribute and modify it.
pkgname=lunzip
-pkgversion=1.7-pre1
+pkgversion=1.7
progname=lunzip
srctrigger=doc/${progname}.1
diff --git a/decoder.c b/decoder.c
index 8416adb..8061465 100644
--- a/decoder.c
+++ b/decoder.c
@@ -222,7 +222,7 @@ int LZd_decode_member( struct LZ_decoder * const d,
const int pos_state = LZd_data_position( d ) & pos_state_mask;
if( Rd_decode_bit( rdec, &d->bm_match[state][pos_state] ) == 0 ) /* 1st bit */
{
- const uint8_t prev_byte = LZd_peek1( d );
+ const uint8_t prev_byte = LZd_peek_prev( d );
if( St_is_char( state ) )
{
state -= ( state < 4 ) ? state : 3;
diff --git a/decoder.h b/decoder.h
index 6d40fbc..e8030ab 100644
--- a/decoder.h
+++ b/decoder.h
@@ -259,7 +259,7 @@ void LZd_flush_data( struct LZ_decoder * const d );
int seek_read( const int fd, uint8_t * const buf, const int size,
const int offset );
-static inline uint8_t LZd_peek1( const struct LZ_decoder * const d )
+static inline uint8_t LZd_peek_prev( const struct LZ_decoder * const d )
{
const int i = ( ( d->pos > 0 ) ? d->pos : d->buffer_size ) - 1;
return d->buffer[i];
diff --git a/doc/lunzip.1 b/doc/lunzip.1
index 4178c92..9e37eea 100644
--- a/doc/lunzip.1
+++ b/doc/lunzip.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1.
-.TH LUNZIP "1" "March 2015" "lunzip 1.7-pre1" "User Commands"
+.TH LUNZIP "1" "May 2015" "lunzip 1.7" "User Commands"
.SH NAME
lunzip \- decompressor for lzip files
.SH SYNOPSIS
diff --git a/main.c b/main.c
index 323bc35..59789ad 100644
--- a/main.c
+++ b/main.c
@@ -168,7 +168,7 @@ static unsigned 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, i;
bool bad_multiplier = false;
switch( tail[0] )
@@ -211,7 +211,7 @@ static unsigned long getnum( const char * const ptr,
static int get_dict_size( const char * const arg )
{
char * tail;
- int bits = strtol( arg, &tail, 0 );
+ const int bits = strtol( arg, &tail, 0 );
if( bits >= min_dictionary_bits &&
bits <= max_dictionary_bits && *tail == 0 )
return ( 1 << bits );