Skip to content

Commit 1b57de3

Browse files
committed
Move example.c and minigzip.c to test/.
1 parent 0cbad86 commit 1b57de3

19 files changed

+45
-52
lines changed

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,20 @@ endif()
171171
# Example binaries
172172
#============================================================================
173173

174-
add_executable(example example.c)
174+
add_executable(example test/example.c)
175175
target_link_libraries(example zlib)
176176
add_test(example example)
177177

178-
add_executable(minigzip minigzip.c)
178+
add_executable(minigzip test/minigzip.c)
179179
target_link_libraries(minigzip zlib)
180180

181181
if(HAVE_OFF64_T)
182-
add_executable(example64 example.c)
182+
add_executable(example64 test/example.c)
183183
target_link_libraries(example64 zlib)
184184
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
185185
add_test(example64 example64)
186186

187-
add_executable(minigzip64 minigzip.c)
187+
add_executable(minigzip64 test/minigzip.c)
188188
target_link_libraries(minigzip64 zlib)
189189
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
190190
endif()

FAQ

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
4444

4545
6. Where's the zlib documentation (man pages, etc.)?
4646

47-
It's in zlib.h . Examples of zlib usage are in the files example.c and
48-
minigzip.c, with more in examples/ .
47+
It's in zlib.h . Examples of zlib usage are in the files test/example.c
48+
and test/minigzip.c, with more in examples/ .
4949

5050
7. Why don't you use GNU autoconf or libtool or ...?
5151

INDEX

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Makefile.in template for Unix Makefile
77
README guess what
88
configure configure script for Unix
99
make_vms.com makefile for VMS
10+
test/example.c zlib usages examples for build testing
11+
test/minigzip.c minimal gzip-like functionality for build testing
1012
treebuild.xml XML description of source file dependencies
1113
zconf.h.cmakein zconf.h template for cmake
1214
zconf.h.in zconf.h template for configure
@@ -17,7 +19,7 @@ zlib.pc.in Template for pkg-config descriptor
1719
zlib2ansi perl script to convert source files for C++ compilation
1820

1921
amiga/ makefiles for Amiga SAS C
20-
as400/ makefiles for AS/400
22+
as400/ makefiles for AS/400
2123
doc/ documentation for formats and algorithms
2224
msdos/ makefiles for MSDOS
2325
nintendods/ makefile for Nintendo DS

Makefile.in

+8-8
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ match.lo: match.S
127127
mv _match.o match.lo
128128
rm -f _match.s
129129

130-
example.o: examples/example.c zlib.h zconf.h
131-
$(CC) $(CFLAGS) -I. -c -o $@ examples/example.c
130+
example.o: test/example.c zlib.h zconf.h
131+
$(CC) $(CFLAGS) -I. -c -o $@ test/example.c
132132

133-
minigzip.o: examples/minigzip.c zlib.h zconf.h
134-
$(CC) $(CFLAGS) -I. -c -o $@ examples/minigzip.c
133+
minigzip.o: test/minigzip.c zlib.h zconf.h
134+
$(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c
135135

136-
example64.o: examples/example.c zlib.h zconf.h
137-
$(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/example.c
136+
example64.o: test/example.c zlib.h zconf.h
137+
$(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/example.c
138138

139-
minigzip64.o: examples/minigzip.c zlib.h zconf.h
140-
$(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ examples/minigzip.c
139+
minigzip64.o: test/minigzip.c zlib.h zconf.h
140+
$(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/minigzip.c
141141

142142
.SUFFIXES: .lo
143143

README

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ rfc1952 (gzip format).
88

99
All functions of the compression library are documented in the file zlib.h
1010
(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
11-
of the library is given in the file example.c which also tests that the library
12-
is working correctly. Another example is given in the file minigzip.c. The
13-
compression library itself is composed of all source files except example.c and
14-
minigzip.c.
11+
of the library is given in the file test/example.c which also tests that
12+
the library is working correctly. Another example is given in the file
13+
test/minigzip.c. The compression library itself is composed of all source
14+
files in the root directory.
1515

1616
To compile all files and run the test program, follow the instructions given at
1717
the top of Makefile.in. In short "./configure; make test", and if that goes
18-
well, "make install" should work for most flavors of Unix. For Windows, use one
19-
of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
18+
well, "make install" should work for most flavors of Unix. For Windows, use
19+
one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
2020
make_vms.com.
2121

2222
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant

contrib/delphi/zlibd32.mak

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h
6363

6464
zutil.obj: zutil.c zutil.h zlib.h zconf.h
6565

66-
example.obj: example.c zlib.h zconf.h
66+
example.obj: test/example.c zlib.h zconf.h
6767

68-
minigzip.obj: minigzip.c zlib.h zconf.h
68+
minigzip.obj: test/minigzip.c zlib.h zconf.h
6969

7070

7171
# For the sake of the old Borland make,

contrib/pascal/zlibd32.mak

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h
6363

6464
zutil.obj: zutil.c zutil.h zlib.h zconf.h
6565

66-
example.obj: example.c zlib.h zconf.h
66+
example.obj: test/example.c zlib.h zconf.h
6767

68-
minigzip.obj: minigzip.c zlib.h zconf.h
68+
minigzip.obj: test/minigzip.c zlib.h zconf.h
6969

7070

7171
# For the sake of the old Borland make,

examples/README.examples

-9
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ enough.c
66
- calculates the maximum table space used in inflate tree
77
construction over all possible Huffman codes
88

9-
example.c
10-
usage examples of zlib
11-
- used in zlib build Makefile for testing
12-
139
fitblk.c
1410
compress just enough input to nearly fill a requested output size
1511
- zlib isn't designed to do this, but fitblk does it anyway
@@ -38,11 +34,6 @@ gzlog.h
3834
and deflateSetDictionary()
3935
- illustrates use of a gzip header extra field
4036

41-
minigzip.c
42-
minimal implementation of gzip-like functionality using zlib
43-
- used in zlib build Makefile for testing
44-
- is not meant for and should not be used as a gzip replacement
45-
4637
zlib_how.html
4738
painfully comprehensive description of zpipe.c (see below)
4839
- describes in excruciating detail the use of deflate() and inflate()

make_vms.com

+4-4
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ $ write sys$output "Building Zlib ..."
175175
$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
176176
$ write sys$output "Building example..."
177177
$ CALL MAKE example.OBJ "CC ''CCOPT' example" -
178-
example.c zlib.h zconf.h
178+
test/example.c zlib.h zconf.h
179179
$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
180180
$ if f$search("x11vms:xvmsutils.olb") .nes. ""
181181
$ then
182182
$ write sys$output "Building minigzip..."
183183
$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
184-
minigzip.c zlib.h zconf.h
184+
test/minigzip.c zlib.h zconf.h
185185
$ call make minigzip.exe -
186186
"LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
187187
minigzip.obj libz.olb
@@ -431,15 +431,15 @@ adler32.obj : adler32.c zutil.h zlib.h zconf.h
431431
compress.obj : compress.c zlib.h zconf.h
432432
crc32.obj : crc32.c zutil.h zlib.h zconf.h
433433
deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
434-
example.obj : example.c zlib.h zconf.h
434+
example.obj : test/example.c zlib.h zconf.h
435435
gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
436436
gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
437437
gzread.obj : gzread.c zutil.h zlib.h zconf.h
438438
gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h
439439
inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
440440
inflate.obj : inflate.c zutil.h zlib.h zconf.h
441441
inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
442-
minigzip.obj : minigzip.c zlib.h zconf.h
442+
minigzip.obj : test/minigzip.c zlib.h zconf.h
443443
trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
444444
uncompr.obj : uncompr.c zlib.h zconf.h
445445
zutil.obj : zutil.c zutil.h zlib.h zconf.h

msdos/Makefile.bor

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h
8686

8787
zutil.obj: zutil.c zutil.h zlib.h zconf.h
8888

89-
example.obj: example.c zlib.h zconf.h
89+
example.obj: test/example.c zlib.h zconf.h
9090

91-
minigzip.obj: minigzip.c zlib.h zconf.h
91+
minigzip.obj: test/minigzip.c zlib.h zconf.h
9292

9393

9494
# the command line is cut to fit in the MS-DOS 128 byte limit:

msdos/Makefile.msc

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ uncompr.obj: uncompr.c zlib.h zconf.h
8080

8181
zutil.obj: zutil.c zutil.h zlib.h zconf.h
8282

83-
example.obj: example.c zlib.h zconf.h
83+
example.obj: test/example.c zlib.h zconf.h
8484
$(CC) -c $(CFLAGS) $*.c
8585

86-
minigzip.obj: minigzip.c zlib.h zconf.h
86+
minigzip.obj: test/minigzip.c zlib.h zconf.h
8787
$(CC) -c $(CFLAGS) $*.c
8888

8989

msdos/Makefile.tc

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h
7171

7272
zutil.obj: zutil.c zutil.h zlib.h zconf.h
7373

74-
example.obj: example.c zlib.h zconf.h
74+
example.obj: test/example.c zlib.h zconf.h
7575

76-
minigzip.obj: minigzip.c zlib.h zconf.h
76+
minigzip.obj: test/minigzip.c zlib.h zconf.h
7777

7878

7979
# the command line is cut to fit in the MS-DOS 128 byte limit:

old/visualc6/example.dsp

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/example.c test/example.c

File renamed without changes.
File renamed without changes.

win32/Makefile.bor

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ uncompr.obj: uncompr.c zlib.h zconf.h
7474

7575
zutil.obj: zutil.c zutil.h zlib.h zconf.h
7676

77-
example.obj: example.c zlib.h zconf.h
77+
example.obj: test/example.c zlib.h zconf.h
7878

79-
minigzip.obj: minigzip.c zlib.h zconf.h
79+
minigzip.obj: test/minigzip.c zlib.h zconf.h
8080

8181

8282
# For the sake of the old Borland make,

win32/Makefile.msc

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ inffas32.obj: contrib\masmx86\inffas32.asm
125125

126126
match686.obj: contrib\masmx86\match686.asm
127127

128-
example.obj: example.c zlib.h zconf.h
128+
example.obj: test/example.c zlib.h zconf.h
129129

130-
minigzip.obj: minigzip.c zlib.h zconf.h
130+
minigzip.obj: test/minigzip.c zlib.h zconf.h
131131

132132
zlib1.res: win32/zlib1.rc
133133
$(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc

zlib.3

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH ZLIB 3 "xx Sep 2011"
1+
.TH ZLIB 3 "27 Nov 2011"
22
.SH NAME
33
zlib \- compression/decompression library
44
.SH SYNOPSIS
@@ -36,9 +36,9 @@ All functions of the compression library are documented in the file
3636
.IR zlib.h .
3737
The distribution source includes examples of use of the library
3838
in the files
39-
.I example.c
39+
.I test/example.c
4040
and
41-
.IR minigzip.c,
41+
.IR test/minigzip.c,
4242
as well as other examples in the
4343
.IR examples/
4444
directory.

zlib.3.pdf

24 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)