diff --git a/CMakeLists.txt b/CMakeLists.txt index a64fe0b..e173dd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,20 +171,20 @@ endif() # Example binaries #============================================================================ -add_executable(example example.c) +add_executable(example test/example.c) target_link_libraries(example zlib) add_test(example example) -add_executable(minigzip minigzip.c) +add_executable(minigzip test/minigzip.c) target_link_libraries(minigzip zlib) if(HAVE_OFF64_T) - add_executable(example64 example.c) + add_executable(example64 test/example.c) target_link_libraries(example64 zlib) set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") add_test(example64 example64) - add_executable(minigzip64 minigzip.c) + add_executable(minigzip64 test/minigzip.c) target_link_libraries(minigzip64 zlib) set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") endif() diff --git a/FAQ b/FAQ index 03676dd..99b7cf9 100644 --- a/FAQ +++ b/FAQ @@ -44,8 +44,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html 6. Where's the zlib documentation (man pages, etc.)? - It's in zlib.h . Examples of zlib usage are in the files example.c and - minigzip.c, with more in examples/ . + It's in zlib.h . Examples of zlib usage are in the files test/example.c + and test/minigzip.c, with more in examples/ . 7. Why don't you use GNU autoconf or libtool or ...? diff --git a/INDEX b/INDEX index d05a009..0967554 100644 --- a/INDEX +++ b/INDEX @@ -7,6 +7,8 @@ Makefile.in template for Unix Makefile README guess what configure configure script for Unix make_vms.com makefile for VMS +test/example.c zlib usages examples for build testing +test/minigzip.c minimal gzip-like functionality for build testing treebuild.xml XML description of source file dependencies zconf.h.cmakein zconf.h template for cmake zconf.h.in zconf.h template for configure @@ -17,7 +19,7 @@ zlib.pc.in Template for pkg-config descriptor zlib2ansi perl script to convert source files for C++ compilation amiga/ makefiles for Amiga SAS C -as400/ makefiles for AS/400 +as400/ makefiles for AS/400 doc/ documentation for formats and algorithms msdos/ makefiles for MSDOS nintendods/ makefile for Nintendo DS diff --git a/Makefile.in b/Makefile.in index 01a9016..f349569 100644 --- a/Makefile.in +++ b/Makefile.in @@ -127,17 +127,17 @@ match.lo: match.S mv _match.o match.lo rm -f _match.s -example.o: examples/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ examples/example.c +example.o: test/example.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/example.c -minigzip.o: examples/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -c -o $@ examples/minigzip.c +minigzip.o: test/minigzip.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c -example64.o: examples/example.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/example.c +example64.o: test/example.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/example.c -minigzip64.o: examples/minigzip.c zlib.h zconf.h - $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/minigzip.c +minigzip64.o: test/minigzip.c zlib.h zconf.h + $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/minigzip.c .SUFFIXES: .lo diff --git a/README b/README index 3b517f7..02dc3dc 100644 --- a/README +++ b/README @@ -8,15 +8,15 @@ rfc1952 (gzip format). All functions of the compression library are documented in the file zlib.h (volunteer to write man pages welcome, contact zlib@gzip.org). A usage example -of the library is given in the file example.c which also tests that the library -is working correctly. Another example is given in the file minigzip.c. The -compression library itself is composed of all source files except example.c and -minigzip.c. +of the library is given in the file test/example.c which also tests that +the library is working correctly. Another example is given in the file +test/minigzip.c. The compression library itself is composed of all source +files in the root directory. To compile all files and run the test program, follow the instructions given at the top of Makefile.in. In short "./configure; make test", and if that goes -well, "make install" should work for most flavors of Unix. For Windows, use one -of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +well, "make install" should work for most flavors of Unix. For Windows, use +one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use make_vms.com. Questions about zlib should be sent to , or to Gilles Vollant diff --git a/contrib/delphi/zlibd32.mak b/contrib/delphi/zlibd32.mak index 0d0699a..9bb00b7 100644 --- a/contrib/delphi/zlibd32.mak +++ b/contrib/delphi/zlibd32.mak @@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h # For the sake of the old Borland make, diff --git a/contrib/pascal/zlibd32.mak b/contrib/pascal/zlibd32.mak index 0d0699a..9bb00b7 100644 --- a/contrib/pascal/zlibd32.mak +++ b/contrib/pascal/zlibd32.mak @@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h # For the sake of the old Borland make, diff --git a/examples/README.examples b/examples/README.examples index fddb8df..56a3171 100644 --- a/examples/README.examples +++ b/examples/README.examples @@ -6,10 +6,6 @@ enough.c - calculates the maximum table space used in inflate tree construction over all possible Huffman codes -example.c - usage examples of zlib - - used in zlib build Makefile for testing - fitblk.c compress just enough input to nearly fill a requested output size - zlib isn't designed to do this, but fitblk does it anyway @@ -38,11 +34,6 @@ gzlog.h and deflateSetDictionary() - illustrates use of a gzip header extra field -minigzip.c - minimal implementation of gzip-like functionality using zlib - - used in zlib build Makefile for testing - - is not meant for and should not be used as a gzip replacement - zlib_how.html painfully comprehensive description of zpipe.c (see below) - describes in excruciating detail the use of deflate() and inflate() diff --git a/make_vms.com b/make_vms.com index 6576490..11be527 100644 --- a/make_vms.com +++ b/make_vms.com @@ -175,13 +175,13 @@ $ write sys$output "Building Zlib ..." $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ $ write sys$output "Building example..." $ CALL MAKE example.OBJ "CC ''CCOPT' example" - - example.c zlib.h zconf.h + test/example.c zlib.h zconf.h $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb $ if f$search("x11vms:xvmsutils.olb") .nes. "" $ then $ write sys$output "Building minigzip..." $ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - - minigzip.c zlib.h zconf.h + test/minigzip.c zlib.h zconf.h $ call make minigzip.exe - "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - minigzip.obj libz.olb @@ -431,7 +431,7 @@ adler32.obj : adler32.c zutil.h zlib.h zconf.h compress.obj : compress.c zlib.h zconf.h crc32.obj : crc32.c zutil.h zlib.h zconf.h deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h -example.obj : example.c zlib.h zconf.h +example.obj : test/example.c zlib.h zconf.h gzclose.obj : gzclose.c zutil.h zlib.h zconf.h gzlib.obj : gzlib.c zutil.h zlib.h zconf.h gzread.obj : gzread.c zutil.h zlib.h zconf.h @@ -439,7 +439,7 @@ gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h inflate.obj : inflate.c zutil.h zlib.h zconf.h inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h -minigzip.obj : minigzip.c zlib.h zconf.h +minigzip.obj : test/minigzip.c zlib.h zconf.h trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h uncompr.obj : uncompr.c zlib.h zconf.h zutil.obj : zutil.c zutil.h zlib.h zconf.h diff --git a/msdos/Makefile.bor b/msdos/Makefile.bor index 0c1b99c..3d12a2c 100644 --- a/msdos/Makefile.bor +++ b/msdos/Makefile.bor @@ -86,9 +86,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h # the command line is cut to fit in the MS-DOS 128 byte limit: diff --git a/msdos/Makefile.msc b/msdos/Makefile.msc index cd2816f..ae83786 100644 --- a/msdos/Makefile.msc +++ b/msdos/Makefile.msc @@ -80,10 +80,10 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h $(CC) -c $(CFLAGS) $*.c -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h $(CC) -c $(CFLAGS) $*.c diff --git a/msdos/Makefile.tc b/msdos/Makefile.tc index bcd0d18..5aec82a 100644 --- a/msdos/Makefile.tc +++ b/msdos/Makefile.tc @@ -71,9 +71,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h # the command line is cut to fit in the MS-DOS 128 byte limit: diff --git a/old/visualc6/example.dsp b/old/visualc6/example.dsp index d358052..54f3f30 100644 --- a/old/visualc6/example.dsp +++ b/old/visualc6/example.dsp @@ -259,7 +259,7 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File -SOURCE=..\..\example.c +SOURCE=..\..\test\example.c # End Source File # End Group # Begin Group "Header Files" diff --git a/examples/example.c b/test/example.c similarity index 100% rename from examples/example.c rename to test/example.c diff --git a/examples/minigzip.c b/test/minigzip.c similarity index 100% rename from examples/minigzip.c rename to test/minigzip.c diff --git a/win32/Makefile.bor b/win32/Makefile.bor index 3981d42..d152bbb 100644 --- a/win32/Makefile.bor +++ b/win32/Makefile.bor @@ -74,9 +74,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h zutil.obj: zutil.c zutil.h zlib.h zconf.h -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h # For the sake of the old Borland make, diff --git a/win32/Makefile.msc b/win32/Makefile.msc index 2714b45..53e66ca 100644 --- a/win32/Makefile.msc +++ b/win32/Makefile.msc @@ -125,9 +125,9 @@ inffas32.obj: contrib\masmx86\inffas32.asm match686.obj: contrib\masmx86\match686.asm -example.obj: example.c zlib.h zconf.h +example.obj: test/example.c zlib.h zconf.h -minigzip.obj: minigzip.c zlib.h zconf.h +minigzip.obj: test/minigzip.c zlib.h zconf.h zlib1.res: win32/zlib1.rc $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc diff --git a/zlib.3 b/zlib.3 index 3e4280b..aedf220 100644 --- a/zlib.3 +++ b/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "xx Sep 2011" +.TH ZLIB 3 "27 Nov 2011" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -36,9 +36,9 @@ All functions of the compression library are documented in the file .IR zlib.h . The distribution source includes examples of use of the library in the files -.I example.c +.I test/example.c and -.IR minigzip.c, +.IR test/minigzip.c, as well as other examples in the .IR examples/ directory. diff --git a/zlib.3.pdf b/zlib.3.pdf index 24cf58a..45f40e8 100644 Binary files a/zlib.3.pdf and b/zlib.3.pdf differ