Skip to content

Commit

Permalink
zlib 0.94
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Sep 10, 2011
1 parent 6b834a5 commit 23c69f1
Show file tree
Hide file tree
Showing 34 changed files with 800 additions and 431 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@

ChangeLog file for zlib

Changes in 0.94 (13 Aug 95)
- support MSDOS medium model
- fix deflate with flush (could sometimes generate bad output)
- fix deflateReset (zlib header was incorrectly suppressed)
- added support for VMS
- allow a compression level in gzopen()
- gzflush now calls fflush
- For deflate with flush, flush even if no more input is provided.
- rename libgz.a as libz.a
- work around a problem with gcc on Alpha (in INSERT_STRING)
- don't use inline functions (problem with some gcc versions)
- allow renaming of Byte, uInt, etc... with #define.
- avoid warning about (unused) pointer before start of array in deflate.c
- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
- avoid reserved word 'new' in trees.c

Changes in 0.93 (25 June 95)
- temporarily disable inline functions
- make deflate deterministic
Expand Down
115 changes: 115 additions & 0 deletions Make_vms.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
$! make libz under VMS
$! written by Martin P.J. Zinser <[email protected]>
$!
$! Look for the compiler used
$!
$ ccopt = ""
$ if f$trnlnm("HW_MODEL").ge.1024
$ then
$ ccopt = "/prefix=all"+ccopt
$ comp = "__decc__=1"
$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
$ else
$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
$ then
$ comp = "__vaxc__=1"
$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
$ else
$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
$ ccopt = "/decc/prefix=all"+ccopt
$ comp = "__decc__=1"
$ endif
$ endif
$!
$! Build the thing plain or with mms
$!
$ write sys$output "Compiling Zlib sources ..."
$ if f$search("SYS$SYSTEM:MMS.EXE").eqs.""
$ then
$ dele example.obj;*,minigzip.obj;*
$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
adler32.c zutil.h zlib.h zconf.h
$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
compress.c zlib.h zconf.h
$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
crc32.c zutil.h zlib.h zconf.h
$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
deflatec.c deflate.h zutil.h zlib.h zconf.h
$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" -
gsio.c zutil.h zlib.h zconf.h
$ CALL MAKE infblock.OBJ "CC ''CCOPT' infblock" -
infblock.c zutil.h zlib.h zconf.h infblock.h
$ CALL MAKE infcodes.OBJ "CC ''CCOPT' infcodes" -
infcodes.c zutil.h zlib.h zconf.h inftrees.h
$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
inffast.c zutil.h zlib.h zconf.h inffast.h
$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
inflate.c zutil.h zlib.h zconf.h infblock.h
$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
inftrees.c zutil.h zlib.h zconf.h inftrees.h
$ CALL MAKE infutil.OBJ "CC ''CCOPT' infutil" -
infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
trees.c deflate.h zutil.h zlib.h zconf.h
$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
uncompr.c zlib.h zconf.h
$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
zutil.c zutil.h zlib.h zconf.h
$ 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
$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
$ write sys$output "Building minigzip..."
$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
minigzip.c zlib.h zconf.h
$ call make minigzip.exe -
"LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
minigzip.obj libz.olb
$ else
$ mms/macro=('comp')
$ endif
$ write sys$output "Zlib build completed"
$ exit
$!
$!
$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
$ V = 'F$Verify(0)
$! P1 = What we are trying to make
$! P2 = Command to make it
$! P3 - P8 What it depends on
$
$ If F$Search(P1) .Eqs. "" Then Goto Makeit
$ Time = F$CvTime(F$File(P1,"RDT"))
$arg=3
$Loop:
$ Argument = P'arg
$ If Argument .Eqs. "" Then Goto Exit
$ El=0
$Loop2:
$ File = F$Element(El," ",Argument)
$ If File .Eqs. " " Then Goto Endl
$ AFile = ""
$Loop3:
$ OFile = AFile
$ AFile = F$Search(File)
$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
$ Goto Loop3
$NextEL:
$ El = El + 1
$ Goto Loop2
$EndL:
$ arg=arg+1
$ If arg .Le. 8 Then Goto Loop
$ Goto Exit
$
$Makeit:
$ VV=F$VERIFY(0)
$ write sys$output P2
$ 'P2
$ VV='F$Verify(VV)
$Exit:
$ If V Then Set Verify
$ENDSUBROUTINE
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CFLAGS=-O
#use -O3 for gcc to take advantage of inlining
#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
#CFLAGS=-g -DDEBUG
LDFLAGS=-L. -lgz
LDFLAGS=-L. -lz

RANLIB=ranlib

Expand All @@ -24,33 +24,34 @@ test: all
./example
echo hello world | ./minigzip | ./minigzip -d

install: libgz.a
install: libz.a
-@mkdir $(prefix)/include
-@mkdir $(prefix)/lib
cp zlib.h zconf.h $(prefix)/include
chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
cp libgz.a $(prefix)/lib
chmod 644 $(prefix)/lib/libgz.a
cp libz.a $(prefix)/lib
chmod 644 $(prefix)/lib/libz.a

libgz.a: $(OBJS)
libz.a: $(OBJS)
ar rc $@ $(OBJS)
$(RANLIB) $@

example: example.o libgz.a
example: example.o libz.a
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)

minigzip: minigzip.o libgz.a
minigzip: minigzip.o libz.a
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)

clean:
rm -f *.o example minigzip libgz.a foo.gz
rm -f *.o example minigzip libz.a foo.gz

zip:
zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch]
zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
descrip.mms *.[ch]

tgz:
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch]
zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]

# DO NOT DELETE THIS LINE -- make depend depends on it.

Expand Down
9 changes: 6 additions & 3 deletions Makefile.bor
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# To use, do "make -fmakefile.bor"

# WARNING: the small model is supported but only for small values of
# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
# requirements (default 256K for big objects plus a few K), you can add
# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# MAX_WBITS and MAX_MEM_LEVEL. For example:
# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to CFLAGS below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.

# ------------- Turbo C++, Borland C++ -------------
Expand Down Expand Up @@ -83,6 +85,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h

# we must cut the command line to fit in the MS/DOS 128 byte limit:
zlib.lib: $(OBJ1) $(OBJ2)
del zlib.lib
$(LIB) zlib +$(OBJP1)
$(LIB) zlib +$(OBJP2)

Expand Down
8 changes: 4 additions & 4 deletions Makefile.msc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

# To use, do "make makefile.msc"

# WARNING: the small model is supported but only for small values of
# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
# requirements (default 256K for big objects plus a few K), you can add
# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to CFLAGS below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.

# ------------- Microsoft C 5.1 and later -------------
Expand Down Expand Up @@ -80,6 +79,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h

# we must cut the command line to fit in the MS/DOS 128 byte limit:
zlib.lib: $(OBJ1) $(OBJ2)
del zlib.lib
lib zlib $(OBJ1);
lib zlib $(OBJ2);

Expand Down
75 changes: 75 additions & 0 deletions Makefile.qnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Makefile for zlib
# Copyright (C) 1995 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h

# Modified slightly for QNX by Chris Herborth ([email protected])

CC=cc
CFLAGS=-4 -O -Q
#use -O3 for gcc to take advantage of inlining
#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
#CFLAGS=-g -DDEBUG
LDFLAGS=-L. -lz

#RANLIB=ranlib

prefix=/usr/local

OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o

TEST_OBJS = example.o minigzip.o

all: example minigzip

test: all
./example
echo hello world | ./minigzip | ./minigzip -d

install: zlib.lib
-@mkdir $(prefix)/include
-@mkdir $(prefix)/lib
cp zlib.h zconf.h $(prefix)/include
chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
cp zlib.lib $(prefix)/lib
chmod 644 $(prefix)/lib/zlib.lib

zlib.lib: $(OBJS)
cc -A $@ $(OBJS)
# ar rc $@ $(OBJS)
# $(RANLIB) $@

example: example.o zlib.lib
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)

minigzip: minigzip.o zlib.lib
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)

clean:
rm -f *.o example minigzip zlib.lib foo.gz

zip:
zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch]

tgz:
cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch]

# DO NOT DELETE THIS LINE -- make depend depends on it.

adler32.o: zutil.h zlib.h zconf.h
compress.o: zlib.h zconf.h
crc32.o: zutil.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
example.o: zlib.h zconf.h
gzio.o: zutil.h zlib.h zconf.h
infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
inflate.o: zutil.h zlib.h zconf.h infblock.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h
minigzip.o: zlib.h zconf.h
trees.o: deflate.h zutil.h zlib.h zconf.h
uncompr.o: zlib.h zconf.h
zutil.o: zutil.h zlib.h zconf.h
17 changes: 10 additions & 7 deletions Makefile.tc
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
# To use, do "make -fmakefile.tc"

# WARNING: the small model is supported but only for small values of
# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
# requirements (default 256K for big objects plus a few K), you can add
# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# MAX_WBITS and MAX_MEM_LEVEL. For example:
# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to CFLAGS below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.

# ------------- Turbo C 2.0 -------------
MODEL=-ml
CFLAGS=-O2 -Z $(MODEL)
CC=tcc
LD=tcc
CFLAGS=-O2 -G -Z $(MODEL)
CC=tcc -I\tc\include
LD=tcc -L\tc\lib
LIB=tlib
LDFLAGS=$(MODEL)
LDFLAGS=$(MODEL) -f-
O=.obj

# variables
Expand Down Expand Up @@ -82,6 +84,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h

# we must cut the command line to fit in the MS/DOS 128 byte limit:
zlib.lib: $(OBJ1) $(OBJ2)
del zlib.lib
$(LIB) zlib +$(OBJP1)
$(LIB) zlib +$(OBJP2)

Expand Down
Loading

0 comments on commit 23c69f1

Please sign in to comment.