1
0
Fork 0

Adding upstream version 0.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 14:24:58 +01:00
parent 5bbf1f19af
commit 2ff19094da
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
7 changed files with 27 additions and 17 deletions

View file

@ -1,3 +1,8 @@
2013-05-06 Antonio Diaz Diaz <antonio@gnu.org>
* Version 0.2 released.
* main.c: Added a missing '#include' for OS/2.
2013-03-21 Antonio Diaz Diaz <ant_diaz@teleline.es> 2013-03-21 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.1 released. * Version 0.1 released.

18
INSTALL
View file

@ -1,7 +1,7 @@
Requirements Requirements
------------ ------------
You will need a C++ compiler. You will need a C++ compiler.
I use gcc 4.7.2 and 3.3.6, but the code should compile with any I use gcc 4.8.0 and 3.3.6, 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,24 +10,24 @@ Procedure
--------- ---------
1. Unpack the archive if you have not done so already: 1. Unpack the archive if you have not done so already:
lzip -cd lzip[version].tar.lz | tar -xf - lzip -cd lzd[version].tar.lz | tar -xf -
or or
gzip -cd lzip[version].tar.gz | tar -xf - gzip -cd lzd[version].tar.gz | tar -xf -
This creates the directory ./lzip[version] containing the source from This creates the directory ./lzd[version] containing the source from
the main archive. the main archive.
2. Change to lzip directory and run configure. 2. Change to lzd directory and run configure.
(Try 'configure --help' for usage instructions). (Try 'configure --help' for usage instructions).
cd lzip[version] cd lzd[version]
./configure ./configure
3. Run make. 3. Run make.
make make
4. Optionally, type 'make check' to run the tests that come with lzip. 4. Optionally, type 'make check' to run the tests that come with lzd.
5. Type 'make install' to install the program and any data files and 5. Type 'make install' to install the program and any data files and
documentation. documentation.
@ -39,7 +39,7 @@ the main archive.
Another way Another way
----------- -----------
You can also compile lzip into a separate directory. To do this, you You can also compile lzd into a separate directory. To do this, you
must use a version of 'make' that supports the 'VPATH' variable, such must use a version of 'make' that supports the 'VPATH' variable, such
as GNU 'make'. 'cd' to the directory where you want the object files as GNU 'make'. 'cd' to the directory where you want the object files
and executables to go and run the 'configure' script. 'configure' and executables to go and run the 'configure' script. 'configure'
@ -54,7 +54,7 @@ After running 'configure', you can run 'make' and 'make install' as
explained above. explained above.
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz. Copyright (C) 2013 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy, This file is free documentation: you have unlimited permission to copy,
distribute and modify it. distribute and modify it.

4
NEWS
View file

@ -1,3 +1,3 @@
Changes in version 0.1: Changes in version 0.2:
Initial release. Added a missing "#include" for OS/2.

5
README
View file

@ -4,8 +4,9 @@ Lzd is a very simplified decompressor for lzip files with an educational
purpose. Studying its source is a good first step to understand how lzip purpose. Studying its source is a good first step to understand how lzip
works. It is not safe to use lzd for any real work. works. It is not safe to use lzd for any real work.
The source of lzd is also used in the lzip manual as a reference The source of lzd is used in the lzip manual as a reference decompressor
decompressor in the description of the lzip file format. in the description of the lzip file format. Reading the lzip manual will
help you understand the source.
Lzd decompresses from standard input to standard output. Lzd will Lzd decompresses from standard input to standard output. Lzd will
correctly decompress the concatenation of two or more compressed files. correctly decompress the concatenation of two or more compressed files.

2
configure vendored
View file

@ -8,7 +8,7 @@
args= args=
no_create= no_create=
pkgname=lzd pkgname=lzd
pkgversion=0.1 pkgversion=0.2
progname=lzd progname=lzd
srctrigger=decoder.cc srctrigger=decoder.cc

View file

@ -9,7 +9,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
/* /*
Return values: 0 for a normal exit, 1 for environmental problems Exit status: 0 for a normal exit, 1 for environmental problems
(file not found, invalid flags, I/O errors, etc), 2 to indicate a (file not found, invalid flags, I/O errors, etc), 2 to indicate a
corrupt or invalid input file. corrupt or invalid input file.
*/ */
@ -22,6 +22,7 @@
#include <stdint.h> #include <stdint.h>
#include <unistd.h> #include <unistd.h>
#if defined(__MSVCRT__) || defined(__OS2__) #if defined(__MSVCRT__) || defined(__OS2__)
#include <fcntl.h>
#include <io.h> #include <io.h>
#endif #endif

View file

@ -27,10 +27,13 @@ fail=0
printf "testing lzd-%s..." "$2" printf "testing lzd-%s..." "$2"
"${LZIP}" < "${in_lz}" | cmp "${in}" - || fail=1 "${LZIP}" < "${in_lz}" > copy || fail=1
cmp "${in}" copy || fail=1
printf . printf .
cat "${in}" "${in}" > in2 || framework_failure
cat "${in_lz}" "${in_lz}" | "${LZIP}" > copy2 || fail=1 cat "${in_lz}" "${in_lz}" | "${LZIP}" > copy2 || fail=1
cat "${in}" "${in}" | cmp copy2 - || fail=1 cmp in2 copy2 || fail=1
printf . printf .
echo echo