summaryrefslogtreecommitdiff
path: root/contrib/delphi
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/delphi/zlib.mak36
-rw-r--r--contrib/delphi/zlibdef.pas169
-rw-r--r--contrib/delphi2/d_zlib.bpr224
-rw-r--r--contrib/delphi2/d_zlib.cpp17
-rw-r--r--contrib/delphi2/readme.txt17
-rw-r--r--contrib/delphi2/zlib.bpg26
-rw-r--r--contrib/delphi2/zlib.bpr225
-rw-r--r--contrib/delphi2/zlib.cpp22
-rw-r--r--contrib/delphi2/zlib.pas534
-rw-r--r--contrib/delphi2/zlib32.bpr174
-rw-r--r--contrib/delphi2/zlib32.cpp42
11 files changed, 1486 insertions, 0 deletions
diff --git a/contrib/delphi/zlib.mak b/contrib/delphi/zlib.mak
new file mode 100644
index 0000000..ba557e2
--- /dev/null
+++ b/contrib/delphi/zlib.mak
@@ -0,0 +1,36 @@
1# Makefile for zlib32bd.lib
2# ------------- Borland C++ 4.5 -------------
3
4# The (32-bit) zlib32bd.lib made with this makefile is intended for use
5# in making the (32-bit) DLL, png32bd.dll. It uses the "stdcall" calling
6# convention.
7
8CFLAGS= -ps -O2 -C -K -N- -k- -d -3 -r- -w-par -w-aus -WDE
9CC=f:\bc45\bin\bcc32
10LIBFLAGS= /C
11LIB=f:\bc45\bin\tlib
12ZLIB=zlib32bd.lib
13
14.autodepend
15.c.obj:
16 $(CC) -c $(CFLAGS) $<
17
18OBJ1=adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infblock.obj
19OBJ2=infcodes.obj inflate.obj inftrees.obj infutil.obj inffast.obj
20OBJ3=trees.obj uncompr.obj zutil.obj
21pOBJ1=+adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infblock.obj
22pOBJ2=+infcodes.obj+inflate.obj+inftrees.obj+infutil.obj+inffast.obj
23pOBJ3=+trees.obj+uncompr.obj+zutil.obj
24
25all: $(ZLIB)
26
27$(ZLIB): $(OBJ1) $(OBJ2) $(OBJ3)
28 @if exist $@ del $@
29 $(LIB) @&&|
30$@ $(LIBFLAGS) &
31$(pOBJ1) &
32$(pOBJ2) &
33$(pOBJ3)
34|
35
36# End of makefile for zlib32bd.lib
diff --git a/contrib/delphi/zlibdef.pas b/contrib/delphi/zlibdef.pas
new file mode 100644
index 0000000..4f96b7d
--- /dev/null
+++ b/contrib/delphi/zlibdef.pas
@@ -0,0 +1,169 @@
1unit zlibdef;
2
3interface
4
5uses
6 Windows;
7
8const
9 ZLIB_VERSION = '1.1.3';
10
11type
12 voidpf = Pointer;
13 int = Integer;
14 uInt = Cardinal;
15 pBytef = PChar;
16 uLong = Cardinal;
17
18 alloc_func = function(opaque: voidpf; items, size: uInt): voidpf;
19 stdcall;
20 free_func = procedure(opaque, address: voidpf);
21 stdcall;
22
23 internal_state = Pointer;
24
25 z_streamp = ^z_stream;
26 z_stream = packed record
27 next_in: pBytef; // next input byte
28 avail_in: uInt; // number of bytes available at next_in
29 total_in: uLong; // total nb of input bytes read so far
30
31 next_out: pBytef; // next output byte should be put there
32 avail_out: uInt; // remaining free space at next_out
33 total_out: uLong; // total nb of bytes output so far
34
35 msg: PChar; // last error message, NULL if no error
36 state: internal_state; // not visible by applications
37
38 zalloc: alloc_func; // used to allocate the internal state
39 zfree: free_func; // used to free the internal state
40 opaque: voidpf; // private data object passed to zalloc and zfree
41
42 data_type: int; // best guess about the data type: ascii or binary
43 adler: uLong; // adler32 value of the uncompressed data
44 reserved: uLong; // reserved for future use
45 end;
46
47const
48 Z_NO_FLUSH = 0;
49 Z_SYNC_FLUSH = 2;
50 Z_FULL_FLUSH = 3;
51 Z_FINISH = 4;
52
53 Z_OK = 0;
54 Z_STREAM_END = 1;
55
56 Z_NO_COMPRESSION = 0;
57 Z_BEST_SPEED = 1;
58 Z_BEST_COMPRESSION = 9;
59 Z_DEFAULT_COMPRESSION = -1;
60
61 Z_FILTERED = 1;
62 Z_HUFFMAN_ONLY = 2;
63 Z_DEFAULT_STRATEGY = 0;
64
65 Z_BINARY = 0;
66 Z_ASCII = 1;
67 Z_UNKNOWN = 2;
68
69 Z_DEFLATED = 8;
70
71 MAX_MEM_LEVEL = 9;
72
73function adler32(adler: uLong; const buf: pBytef; len: uInt): uLong;
74 stdcall;
75function crc32(crc: uLong; const buf: pBytef; len: uInt): uLong;
76 stdcall;
77function deflate(strm: z_streamp; flush: int): int;
78 stdcall;
79function deflateCopy(dest, source: z_streamp): int;
80 stdcall;
81function deflateEnd(strm: z_streamp): int;
82 stdcall;
83function deflateInit2_(strm: z_streamp; level, method,
84 windowBits, memLevel, strategy: int;
85 const version: PChar; stream_size: int): int;
86 stdcall;
87function deflateInit_(strm: z_streamp; level: int;
88 const version: PChar; stream_size: int): int;
89 stdcall;
90function deflateParams(strm: z_streamp; level, strategy: int): int;
91 stdcall;
92function deflateReset(strm: z_streamp): int;
93 stdcall;
94function deflateSetDictionary(strm: z_streamp;
95 const dictionary: pBytef;
96 dictLength: uInt): int;
97 stdcall;
98function inflate(strm: z_streamp; flush: int): int;
99 stdcall;
100function inflateEnd(strm: z_streamp): int;
101 stdcall;
102function inflateInit2_(strm: z_streamp; windowBits: int;
103 const version: PChar; stream_size: int): int;
104 stdcall;
105function inflateInit_(strm: z_streamp; const version: PChar;
106 stream_size: int): int;
107 stdcall;
108function inflateReset(strm: z_streamp): int;
109 stdcall;
110function inflateSetDictionary(strm: z_streamp;
111 const dictionary: pBytef;
112 dictLength: uInt): int;
113 stdcall;
114function inflateSync(strm: z_streamp): int;
115 stdcall;
116
117function deflateInit(strm: z_streamp; level: int): int;
118function deflateInit2(strm: z_streamp; level, method, windowBits,
119 memLevel, strategy: int): int;
120function inflateInit(strm: z_streamp): int;
121function inflateInit2(strm: z_streamp; windowBits: int): int;
122
123implementation
124
125function deflateInit(strm: z_streamp; level: int): int;
126begin
127 Result := deflateInit_(strm, level, ZLIB_VERSION, sizeof(z_stream));
128end;
129
130function deflateInit2(strm: z_streamp; level, method, windowBits,
131 memLevel, strategy: int): int;
132begin
133 Result := deflateInit2_(strm, level, method, windowBits, memLevel,
134 strategy, ZLIB_VERSION, sizeof(z_stream));
135end;
136
137function inflateInit(strm: z_streamp): int;
138begin
139 Result := inflateInit_(strm, ZLIB_VERSION, sizeof(z_stream));
140end;
141
142function inflateInit2(strm: z_streamp; windowBits: int): int;
143begin
144 Result := inflateInit2_(strm, windowBits, ZLIB_VERSION,
145 sizeof(z_stream));
146end;
147
148const
149 zlibDLL = 'png32bd.dll';
150
151function adler32; external zlibDLL;
152function crc32; external zlibDLL;
153function deflate; external zlibDLL;
154function deflateCopy; external zlibDLL;
155function deflateEnd; external zlibDLL;
156function deflateInit2_; external zlibDLL;
157function deflateInit_; external zlibDLL;
158function deflateParams; external zlibDLL;
159function deflateReset; external zlibDLL;
160function deflateSetDictionary; external zlibDLL;
161function inflate; external zlibDLL;
162function inflateEnd; external zlibDLL;
163function inflateInit2_; external zlibDLL;
164function inflateInit_; external zlibDLL;
165function inflateReset; external zlibDLL;
166function inflateSetDictionary; external zlibDLL;
167function inflateSync; external zlibDLL;
168
169end.
diff --git a/contrib/delphi2/d_zlib.bpr b/contrib/delphi2/d_zlib.bpr
new file mode 100644
index 0000000..78bb254
--- /dev/null
+++ b/contrib/delphi2/d_zlib.bpr
@@ -0,0 +1,224 @@
1# ---------------------------------------------------------------------------
2!if !$d(BCB)
3BCB = $(MAKEDIR)\..
4!endif
5
6# ---------------------------------------------------------------------------
7# IDE SECTION
8# ---------------------------------------------------------------------------
9# The following section of the project makefile is managed by the BCB IDE.
10# It is recommended to use the IDE to change any of the values in this
11# section.
12# ---------------------------------------------------------------------------
13
14VERSION = BCB.03
15# ---------------------------------------------------------------------------
16PROJECT = d_zlib.lib
17OBJFILES = d_zlib.obj adler32.obj deflate.obj infblock.obj infcodes.obj inffast.obj \
18 inflate.obj inftrees.obj infutil.obj trees.obj
19RESFILES =
20RESDEPEN = $(RESFILES)
21LIBFILES =
22LIBRARIES = VCL35.lib
23SPARELIBS = VCL35.lib
24DEFFILE =
25PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi ibsmp35.bpi bcbsmp35.bpi \
26 dclocx35.bpi QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi DSS35.bpi \
27 NMFAST35.bpi INETDB35.bpi INET35.bpi VCLMID35.bpi
28# ---------------------------------------------------------------------------
29PATHCPP = .;
30PATHASM = .;
31PATHPAS = .;
32PATHRC = .;
33DEBUGLIBPATH = $(BCB)\lib\debug
34RELEASELIBPATH = $(BCB)\lib\release
35# ---------------------------------------------------------------------------
36CFLAG1 = -O2 -Ve -d -k- -vi
37CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl -H=$(BCB)\lib\vcl35.csm
38CFLAG3 = -ff -pr -5
39PFLAGS = -U;$(DEBUGLIBPATH) -I$(BCB)\include;$(BCB)\include\vcl -H -W -$I- -v -JPHN -M
40RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl
41AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn
42LFLAGS =
43IFLAGS = -g -Gn
44# ---------------------------------------------------------------------------
45ALLOBJ = c0w32.obj $(OBJFILES)
46ALLRES = $(RESFILES)
47ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
48# ---------------------------------------------------------------------------
49!!ifdef IDEOPTIONS
50
51[Version Info]
52IncludeVerInfo=0
53AutoIncBuild=0
54MajorVer=1
55MinorVer=0
56Release=0
57Build=0
58Debug=0
59PreRelease=0
60Special=0
61Private=0
62DLL=0
63Locale=1040
64CodePage=1252
65
66[Version Info Keys]
67CompanyName=
68FileDescription=
69FileVersion=1.0.0.0
70InternalName=
71LegalCopyright=
72LegalTrademarks=
73OriginalFilename=
74ProductName=
75ProductVersion=1.0.0.0
76Comments=
77
78[HistoryLists\hlIncludePath]
79Count=2
80Item0=$(BCB)\include
81Item1=$(BCB)\include;$(BCB)\include\vcl
82
83[HistoryLists\hlLibraryPath]
84Count=1
85Item0=$(BCB)\lib\obj;$(BCB)\lib
86
87[HistoryLists\hlDebugSourcePath]
88Count=1
89Item0=$(BCB)\source\vcl
90
91[Debugging]
92DebugSourceDirs=
93
94[Parameters]
95RunParams=
96HostApplication=
97
98!endif
99
100 ---------------------------------------------------------------------------
101# MAKE SECTION
102# ---------------------------------------------------------------------------
103# This section of the project file is not used by the BCB IDE. It is for
104# the benefit of building from the command-line using the MAKE utility.
105# ---------------------------------------------------------------------------
106
107.autodepend
108# ---------------------------------------------------------------------------
109!if !$d(BCC32)
110BCC32 = bcc32
111!endif
112
113!if !$d(DCC32)
114DCC32 = dcc32
115!endif
116
117!if !$d(TASM32)
118TASM32 = tasm32
119!endif
120
121!if !$d(LINKER)
122LINKER = TLib
123!endif
124
125!if !$d(BRCC32)
126BRCC32 = brcc32
127!endif
128# ---------------------------------------------------------------------------
129!if $d(PATHCPP)
130.PATH.CPP = $(PATHCPP)
131.PATH.C = $(PATHCPP)
132!endif
133
134!if $d(PATHPAS)
135.PATH.PAS = $(PATHPAS)
136!endif
137
138!if $d(PATHASM)
139.PATH.ASM = $(PATHASM)
140!endif
141
142!if $d(PATHRC)
143.PATH.RC = $(PATHRC)
144!endif
145# ---------------------------------------------------------------------------
146!ifdef IDEOPTIONS
147
148[Version Info]
149IncludeVerInfo=0
150AutoIncBuild=0
151MajorVer=1
152MinorVer=0
153Release=0
154Build=0
155Debug=0
156PreRelease=0
157Special=0
158Private=0
159DLL=0
160Locale=1040
161CodePage=1252
162
163[Version Info Keys]
164CompanyName=
165FileDescription=
166FileVersion=1.0.0.0
167InternalName=
168LegalCopyright=
169LegalTrademarks=
170OriginalFilename=
171ProductName=
172ProductVersion=1.0.0.0
173Comments=
174
175[HistoryLists\hlIncludePath]
176Count=2
177Item0=$(BCB)\include;$(BCB)\include\vcl
178Item1=$(BCB)\include
179
180[HistoryLists\hlLibraryPath]
181Count=1
182Item0=$(BCB)\lib\obj;$(BCB)\lib
183
184[HistoryLists\hlDebugSourcePath]
185Count=1
186Item0=$(BCB)\source\vcl
187
188[Debugging]
189DebugSourceDirs=
190
191[Parameters]
192RunParams=
193HostApplication=
194
195!endif
196
197$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
198 $(BCB)\BIN\$(LINKER) @&&!
199 $(LFLAGS) $(IFLAGS) +
200 $(ALLOBJ), +
201 $(PROJECT),, +
202 $(ALLLIB), +
203 $(DEFFILE), +
204 $(ALLRES)
205!
206# ---------------------------------------------------------------------------
207.pas.hpp:
208 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
209
210.pas.obj:
211 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
212
213.cpp.obj:
214 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
215
216.c.obj:
217 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
218
219.asm.obj:
220 $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
221
222.rc.res:
223 $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
224# ---------------------------------------------------------------------------
diff --git a/contrib/delphi2/d_zlib.cpp b/contrib/delphi2/d_zlib.cpp
new file mode 100644
index 0000000..f5dea59
--- /dev/null
+++ b/contrib/delphi2/d_zlib.cpp
@@ -0,0 +1,17 @@
1#include <condefs.h>
2#pragma hdrstop
3//---------------------------------------------------------------------------
4USEUNIT("adler32.c");
5USEUNIT("deflate.c");
6USEUNIT("infblock.c");
7USEUNIT("infcodes.c");
8USEUNIT("inffast.c");
9USEUNIT("inflate.c");
10USEUNIT("inftrees.c");
11USEUNIT("infutil.c");
12USEUNIT("trees.c");
13//---------------------------------------------------------------------------
14#define Library
15
16// To add a file to the library use the Project menu 'Add to Project'.
17
diff --git a/contrib/delphi2/readme.txt b/contrib/delphi2/readme.txt
new file mode 100644
index 0000000..cbd3162
--- /dev/null
+++ b/contrib/delphi2/readme.txt
@@ -0,0 +1,17 @@
1These are files used to compile zlib under Borland C++ Builder 3.
2
3zlib.bpg is the main project group that can be loaded in the BCB IDE and
4loads all other *.bpr projects
5
6zlib.bpr is a project used to create a static zlib.lib library with C calling
7convention for functions.
8
9zlib32.bpr creates a zlib32.dll dynamic link library with Windows standard
10calling convention.
11
12d_zlib.bpr creates a set of .obj files with register calling convention.
13These files are used by zlib.pas to create a Delphi unit containing zlib.
14The d_zlib.lib file generated isn't useful and can be deleted.
15
16zlib.cpp, zlib32.cpp and d_zlib.cpp are used by the above projects.
17
diff --git a/contrib/delphi2/zlib.bpg b/contrib/delphi2/zlib.bpg
new file mode 100644
index 0000000..b6c9acd
--- /dev/null
+++ b/contrib/delphi2/zlib.bpg
@@ -0,0 +1,26 @@
1#------------------------------------------------------------------------------
2VERSION = BWS.01
3#------------------------------------------------------------------------------
4!ifndef ROOT
5ROOT = $(MAKEDIR)\..
6!endif
7#------------------------------------------------------------------------------
8MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
9DCC = $(ROOT)\bin\dcc32.exe $**
10BRCC = $(ROOT)\bin\brcc32.exe $**
11#------------------------------------------------------------------------------
12PROJECTS = zlib zlib32 d_zlib
13#------------------------------------------------------------------------------
14default: $(PROJECTS)
15#------------------------------------------------------------------------------
16
17zlib: zlib.bpr
18 $(MAKE)
19
20zlib32: zlib32.bpr
21 $(MAKE)
22
23d_zlib: d_zlib.bpr
24 $(MAKE)
25
26
diff --git a/contrib/delphi2/zlib.bpr b/contrib/delphi2/zlib.bpr
new file mode 100644
index 0000000..cf3945b
--- /dev/null
+++ b/contrib/delphi2/zlib.bpr
@@ -0,0 +1,225 @@
1# ---------------------------------------------------------------------------
2!if !$d(BCB)
3BCB = $(MAKEDIR)\..
4!endif
5
6# ---------------------------------------------------------------------------
7# IDE SECTION
8# ---------------------------------------------------------------------------
9# The following section of the project makefile is managed by the BCB IDE.
10# It is recommended to use the IDE to change any of the values in this
11# section.
12# ---------------------------------------------------------------------------
13
14VERSION = BCB.03
15# ---------------------------------------------------------------------------
16PROJECT = zlib.lib
17OBJFILES = zlib.obj adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infblock.obj \
18 infcodes.obj inffast.obj inflate.obj inftrees.obj infutil.obj trees.obj \
19 uncompr.obj zutil.obj
20RESFILES =
21RESDEPEN = $(RESFILES)
22LIBFILES =
23LIBRARIES = VCL35.lib
24SPARELIBS = VCL35.lib
25DEFFILE =
26PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi ibsmp35.bpi bcbsmp35.bpi \
27 dclocx35.bpi QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi DSS35.bpi \
28 NMFAST35.bpi INETDB35.bpi INET35.bpi VCLMID35.bpi
29# ---------------------------------------------------------------------------
30PATHCPP = .;
31PATHASM = .;
32PATHPAS = .;
33PATHRC = .;
34DEBUGLIBPATH = $(BCB)\lib\debug
35RELEASELIBPATH = $(BCB)\lib\release
36# ---------------------------------------------------------------------------
37CFLAG1 = -O2 -Ve -d -k- -vi
38CFLAG2 = -I$(BCB)\include;$(BCB)\include\vcl -H=$(BCB)\lib\vcl35.csm
39CFLAG3 = -ff -5
40PFLAGS = -U;$(DEBUGLIBPATH) -I$(BCB)\include;$(BCB)\include\vcl -H -W -$I- -v -JPHN -M
41RFLAGS = -i$(BCB)\include;$(BCB)\include\vcl
42AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zn
43LFLAGS =
44IFLAGS = -g -Gn
45# ---------------------------------------------------------------------------
46ALLOBJ = c0w32.obj $(OBJFILES)
47ALLRES = $(RESFILES)
48ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib
49# ---------------------------------------------------------------------------
50!!ifdef IDEOPTIONS
51
52[Version Info]
53IncludeVerInfo=0
54AutoIncBuild=0
55MajorVer=1
56MinorVer=0
57Release=0
58Build=0
59Debug=0
60PreRelease=0
61Special=0
62Private=0
63DLL=0
64Locale=1040
65CodePage=1252
66
67[Version Info Keys]
68CompanyName=
69FileDescription=
70FileVersion=1.0.0.0
71InternalName=
72LegalCopyright=
73LegalTrademarks=
74OriginalFilename=
75ProductName=
76ProductVersion=1.0.0.0
77Comments=
78
79[HistoryLists\hlIncludePath]
80Count=2
81Item0=$(BCB)\include
82Item1=$(BCB)\include;$(BCB)\include\vcl
83
84[HistoryLists\hlLibraryPath]
85Count=1
86Item0=$(BCB)\lib\obj;$(BCB)\lib
87
88[HistoryLists\hlDebugSourcePath]
89Count=1
90Item0=$(BCB)\source\vcl
91
92[Debugging]
93DebugSourceDirs=
94
95[Parameters]
96RunParams=
97HostApplication=
98
99!endif
100
101 ---------------------------------------------------------------------------
102# MAKE SECTION
103# ---------------------------------------------------------------------------
104# This section of the project file is not used by the BCB IDE. It is for
105# the benefit of building from the command-line using the MAKE utility.
106# ---------------------------------------------------------------------------
107
108.autodepend
109# ---------------------------------------------------------------------------
110!if !$d(BCC32)
111BCC32 = bcc32
112!endif
113
114!if !$d(DCC32)
115DCC32 = dcc32
116!endif
117
118!if !$d(TASM32)
119TASM32 = tasm32
120!endif
121
122!if !$d(LINKER)
123LINKER = TLib
124!endif
125
126!if !$d(BRCC32)
127BRCC32 = brcc32
128!endif
129# ---------------------------------------------------------------------------
130!if $d(PATHCPP)
131.PATH.CPP = $(PATHCPP)
132.PATH.C = $(PATHCPP)
133!endif
134
135!if $d(PATHPAS)
136.PATH.PAS = $(PATHPAS)
137!endif
138
139!if $d(PATHASM)
140.PATH.ASM = $(PATHASM)
141!endif
142
143!if $d(PATHRC)
144.PATH.RC = $(PATHRC)
145!endif
146# ---------------------------------------------------------------------------
147!ifdef IDEOPTIONS
148
149[Version Info]
150IncludeVerInfo=0
151AutoIncBuild=0
152MajorVer=1
153MinorVer=0
154Release=0
155Build=0
156Debug=0
157PreRelease=0
158Special=0
159Private=0
160DLL=0
161Locale=1040
162CodePage=1252
163
164[Version Info Keys]
165CompanyName=
166FileDescription=
167FileVersion=1.0.0.0
168InternalName=
169LegalCopyright=
170LegalTrademarks=
171OriginalFilename=
172ProductName=
173ProductVersion=1.0.0.0
174Comments=
175
176[HistoryLists\hlIncludePath]
177Count=2
178Item0=$(BCB)\include;$(BCB)\include\vcl
179Item1=$(BCB)\include
180
181[HistoryLists\hlLibraryPath]
182Count=1
183Item0=$(BCB)\lib\obj;$(BCB)\lib
184
185[HistoryLists\hlDebugSourcePath]
186Count=1
187Item0=$(BCB)\source\vcl
188
189[Debugging]
190DebugSourceDirs=
191
192[Parameters]
193RunParams=
194HostApplication=
195
196!endif
197
198$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
199 $(BCB)\BIN\$(LINKER) @&&!
200 $(LFLAGS) $(IFLAGS) +
201 $(ALLOBJ), +
202 $(PROJECT),, +
203 $(ALLLIB), +
204 $(DEFFILE), +
205 $(ALLRES)
206!
207# ---------------------------------------------------------------------------
208.pas.hpp:
209 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
210
211.pas.obj:
212 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
213
214.cpp.obj:
215 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
216
217.c.obj:
218 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
219
220.asm.obj:
221 $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
222
223.rc.res:
224 $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
225# ---------------------------------------------------------------------------
diff --git a/contrib/delphi2/zlib.cpp b/contrib/delphi2/zlib.cpp
new file mode 100644
index 0000000..bf6953b
--- /dev/null
+++ b/contrib/delphi2/zlib.cpp
@@ -0,0 +1,22 @@
1#include <condefs.h>
2#pragma hdrstop
3//---------------------------------------------------------------------------
4USEUNIT("adler32.c");
5USEUNIT("compress.c");
6USEUNIT("crc32.c");
7USEUNIT("deflate.c");
8USEUNIT("gzio.c");
9USEUNIT("infblock.c");
10USEUNIT("infcodes.c");
11USEUNIT("inffast.c");
12USEUNIT("inflate.c");
13USEUNIT("inftrees.c");
14USEUNIT("infutil.c");
15USEUNIT("trees.c");
16USEUNIT("uncompr.c");
17USEUNIT("zutil.c");
18//---------------------------------------------------------------------------
19#define Library
20
21// To add a file to the library use the Project menu 'Add to Project'.
22
diff --git a/contrib/delphi2/zlib.pas b/contrib/delphi2/zlib.pas
new file mode 100644
index 0000000..10ae4ca
--- /dev/null
+++ b/contrib/delphi2/zlib.pas
@@ -0,0 +1,534 @@
1{*******************************************************}
2{ }
3{ Delphi Supplemental Components }
4{ ZLIB Data Compression Interface Unit }
5{ }
6{ Copyright (c) 1997 Borland International }
7{ }
8{*******************************************************}
9
10{ Modified for zlib 1.1.3 by Davide Moretti <dave@rimini.com }
11
12unit zlib;
13
14interface
15
16uses Sysutils, Classes;
17
18type
19 TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer;
20 TFree = procedure (AppData, Block: Pointer);
21
22 // Internal structure. Ignore.
23 TZStreamRec = packed record
24 next_in: PChar; // next input byte
25 avail_in: Integer; // number of bytes available at next_in
26 total_in: Integer; // total nb of input bytes read so far
27
28 next_out: PChar; // next output byte should be put here
29 avail_out: Integer; // remaining free space at next_out
30 total_out: Integer; // total nb of bytes output so far
31
32 msg: PChar; // last error message, NULL if no error
33 internal: Pointer; // not visible by applications
34
35 zalloc: TAlloc; // used to allocate the internal state
36 zfree: TFree; // used to free the internal state
37 AppData: Pointer; // private data object passed to zalloc and zfree
38
39 data_type: Integer; // best guess about the data type: ascii or binary
40 adler: Integer; // adler32 value of the uncompressed data
41 reserved: Integer; // reserved for future use
42 end;
43
44 // Abstract ancestor class
45 TCustomZlibStream = class(TStream)
46 private
47 FStrm: TStream;
48 FStrmPos: Integer;
49 FOnProgress: TNotifyEvent;
50 FZRec: TZStreamRec;
51 FBuffer: array [Word] of Char;
52 protected
53 procedure Progress(Sender: TObject); dynamic;
54 property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
55 constructor Create(Strm: TStream);
56 end;
57
58{ TCompressionStream compresses data on the fly as data is written to it, and
59 stores the compressed data to another stream.
60
61 TCompressionStream is write-only and strictly sequential. Reading from the
62 stream will raise an exception. Using Seek to move the stream pointer
63 will raise an exception.
64
65 Output data is cached internally, written to the output stream only when
66 the internal output buffer is full. All pending output data is flushed
67 when the stream is destroyed.
68
69 The Position property returns the number of uncompressed bytes of
70 data that have been written to the stream so far.
71
72 CompressionRate returns the on-the-fly percentage by which the original
73 data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100
74 If raw data size = 100 and compressed data size = 25, the CompressionRate
75 is 75%
76
77 The OnProgress event is called each time the output buffer is filled and
78 written to the output stream. This is useful for updating a progress
79 indicator when you are writing a large chunk of data to the compression
80 stream in a single call.}
81
82
83 TCompressionLevel = (clNone, clFastest, clDefault, clMax);
84
85 TCompressionStream = class(TCustomZlibStream)
86 private
87 function GetCompressionRate: Single;
88 public
89 constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream);
90 destructor Destroy; override;
91 function Read(var Buffer; Count: Longint): Longint; override;
92 function Write(const Buffer; Count: Longint): Longint; override;
93 function Seek(Offset: Longint; Origin: Word): Longint; override;
94 property CompressionRate: Single read GetCompressionRate;
95 property OnProgress;
96 end;
97
98{ TDecompressionStream decompresses data on the fly as data is read from it.
99
100 Compressed data comes from a separate source stream. TDecompressionStream
101 is read-only and unidirectional; you can seek forward in the stream, but not
102 backwards. The special case of setting the stream position to zero is
103 allowed. Seeking forward decompresses data until the requested position in
104 the uncompressed data has been reached. Seeking backwards, seeking relative
105 to the end of the stream, requesting the size of the stream, and writing to
106 the stream will raise an exception.
107
108 The Position property returns the number of bytes of uncompressed data that
109 have been read from the stream so far.
110
111 The OnProgress event is called each time the internal input buffer of
112 compressed data is exhausted and the next block is read from the input stream.
113 This is useful for updating a progress indicator when you are reading a
114 large chunk of data from the decompression stream in a single call.}
115
116 TDecompressionStream = class(TCustomZlibStream)
117 public
118 constructor Create(Source: TStream);
119 destructor Destroy; override;
120 function Read(var Buffer; Count: Longint): Longint; override;
121 function Write(const Buffer; Count: Longint): Longint; override;
122 function Seek(Offset: Longint; Origin: Word): Longint; override;
123 property OnProgress;
124 end;
125
126
127
128{ CompressBuf compresses data, buffer to buffer, in one call.
129 In: InBuf = ptr to compressed data
130 InBytes = number of bytes in InBuf
131 Out: OutBuf = ptr to newly allocated buffer containing decompressed data
132 OutBytes = number of bytes in OutBuf }
133procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
134 out OutBuf: Pointer; out OutBytes: Integer);
135
136
137{ DecompressBuf decompresses data, buffer to buffer, in one call.
138 In: InBuf = ptr to compressed data
139 InBytes = number of bytes in InBuf
140 OutEstimate = zero, or est. size of the decompressed data
141 Out: OutBuf = ptr to newly allocated buffer containing decompressed data
142 OutBytes = number of bytes in OutBuf }
143procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
144 OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
145
146const
147 zlib_version = '1.1.3';
148
149type
150 EZlibError = class(Exception);
151 ECompressionError = class(EZlibError);
152 EDecompressionError = class(EZlibError);
153
154function adler32(adler: Integer; buf: PChar; len: Integer): Integer;
155
156implementation
157
158const
159 Z_NO_FLUSH = 0;
160 Z_PARTIAL_FLUSH = 1;
161 Z_SYNC_FLUSH = 2;
162 Z_FULL_FLUSH = 3;
163 Z_FINISH = 4;
164
165 Z_OK = 0;
166 Z_STREAM_END = 1;
167 Z_NEED_DICT = 2;
168 Z_ERRNO = (-1);
169 Z_STREAM_ERROR = (-2);
170 Z_DATA_ERROR = (-3);
171 Z_MEM_ERROR = (-4);
172 Z_BUF_ERROR = (-5);
173 Z_VERSION_ERROR = (-6);
174
175 Z_NO_COMPRESSION = 0;
176 Z_BEST_SPEED = 1;
177 Z_BEST_COMPRESSION = 9;
178 Z_DEFAULT_COMPRESSION = (-1);
179
180 Z_FILTERED = 1;
181 Z_HUFFMAN_ONLY = 2;
182 Z_DEFAULT_STRATEGY = 0;
183
184 Z_BINARY = 0;
185 Z_ASCII = 1;
186 Z_UNKNOWN = 2;
187
188 Z_DEFLATED = 8;
189
190 _z_errmsg: array[0..9] of PChar = (
191 'need dictionary', // Z_NEED_DICT (2)
192 'stream end', // Z_STREAM_END (1)
193 '', // Z_OK (0)
194 'file error', // Z_ERRNO (-1)
195 'stream error', // Z_STREAM_ERROR (-2)
196 'data error', // Z_DATA_ERROR (-3)
197 'insufficient memory', // Z_MEM_ERROR (-4)
198 'buffer error', // Z_BUF_ERROR (-5)
199 'incompatible version', // Z_VERSION_ERROR (-6)
200 ''
201 );
202
203{$L deflate.obj}
204{$L inflate.obj}
205{$L inftrees.obj}
206{$L trees.obj}
207{$L adler32.obj}
208{$L infblock.obj}
209{$L infcodes.obj}
210{$L infutil.obj}
211{$L inffast.obj}
212
213procedure _tr_init; external;
214procedure _tr_tally; external;
215procedure _tr_flush_block; external;
216procedure _tr_align; external;
217procedure _tr_stored_block; external;
218function adler32; external;
219procedure inflate_blocks_new; external;
220procedure inflate_blocks; external;
221procedure inflate_blocks_reset; external;
222procedure inflate_blocks_free; external;
223procedure inflate_set_dictionary; external;
224procedure inflate_trees_bits; external;
225procedure inflate_trees_dynamic; external;
226procedure inflate_trees_fixed; external;
227procedure inflate_codes_new; external;
228procedure inflate_codes; external;
229procedure inflate_codes_free; external;
230procedure _inflate_mask; external;
231procedure inflate_flush; external;
232procedure inflate_fast; external;
233
234procedure _memset(P: Pointer; B: Byte; count: Integer);cdecl;
235begin
236 FillChar(P^, count, B);
237end;
238
239procedure _memcpy(dest, source: Pointer; count: Integer);cdecl;
240begin
241 Move(source^, dest^, count);
242end;
243
244
245
246// deflate compresses data
247function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
248 recsize: Integer): Integer; external;
249function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
250function deflateEnd(var strm: TZStreamRec): Integer; external;
251
252// inflate decompresses data
253function inflateInit_(var strm: TZStreamRec; version: PChar;
254 recsize: Integer): Integer; external;
255function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
256function inflateEnd(var strm: TZStreamRec): Integer; external;
257function inflateReset(var strm: TZStreamRec): Integer; external;
258
259
260function zcalloc(AppData: Pointer; Items, Size: Integer): Pointer;
261begin
262 GetMem(Result, Items*Size);
263end;
264
265procedure zcfree(AppData, Block: Pointer);
266begin
267 FreeMem(Block);
268end;
269
270function zlibCheck(code: Integer): Integer;
271begin
272 Result := code;
273 if code < 0 then
274 raise EZlibError.Create('error'); //!!
275end;
276
277function CCheck(code: Integer): Integer;
278begin
279 Result := code;
280 if code < 0 then
281 raise ECompressionError.Create('error'); //!!
282end;
283
284function DCheck(code: Integer): Integer;
285begin
286 Result := code;
287 if code < 0 then
288 raise EDecompressionError.Create('error'); //!!
289end;
290
291procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
292 out OutBuf: Pointer; out OutBytes: Integer);
293var
294 strm: TZStreamRec;
295 P: Pointer;
296begin
297 FillChar(strm, sizeof(strm), 0);
298 OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
299 GetMem(OutBuf, OutBytes);
300 try
301 strm.next_in := InBuf;
302 strm.avail_in := InBytes;
303 strm.next_out := OutBuf;
304 strm.avail_out := OutBytes;
305 CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm)));
306 try
307 while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
308 begin
309 P := OutBuf;
310 Inc(OutBytes, 256);
311 ReallocMem(OutBuf, OutBytes);
312 strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
313 strm.avail_out := 256;
314 end;
315 finally
316 CCheck(deflateEnd(strm));
317 end;
318 ReallocMem(OutBuf, strm.total_out);
319 OutBytes := strm.total_out;
320 except
321 FreeMem(OutBuf);
322 raise
323 end;
324end;
325
326
327procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
328 OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
329var
330 strm: TZStreamRec;
331 P: Pointer;
332 BufInc: Integer;
333begin
334 FillChar(strm, sizeof(strm), 0);
335 BufInc := (InBytes + 255) and not 255;
336 if OutEstimate = 0 then
337 OutBytes := BufInc
338 else
339 OutBytes := OutEstimate;
340 GetMem(OutBuf, OutBytes);
341 try
342 strm.next_in := InBuf;
343 strm.avail_in := InBytes;
344 strm.next_out := OutBuf;
345 strm.avail_out := OutBytes;
346 DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
347 try
348 while DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END do
349 begin
350 P := OutBuf;
351 Inc(OutBytes, BufInc);
352 ReallocMem(OutBuf, OutBytes);
353 strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
354 strm.avail_out := BufInc;
355 end;
356 finally
357 DCheck(inflateEnd(strm));
358 end;
359 ReallocMem(OutBuf, strm.total_out);
360 OutBytes := strm.total_out;
361 except
362 FreeMem(OutBuf);
363 raise
364 end;
365end;
366
367
368// TCustomZlibStream
369
370constructor TCustomZLibStream.Create(Strm: TStream);
371begin
372 inherited Create;
373 FStrm := Strm;
374 FStrmPos := Strm.Position;
375end;
376
377procedure TCustomZLibStream.Progress(Sender: TObject);
378begin
379 if Assigned(FOnProgress) then FOnProgress(Sender);
380end;
381
382
383// TCompressionStream
384
385constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
386 Dest: TStream);
387const
388 Levels: array [TCompressionLevel] of ShortInt =
389 (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
390begin
391 inherited Create(Dest);
392 FZRec.next_out := FBuffer;
393 FZRec.avail_out := sizeof(FBuffer);
394 CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec)));
395end;
396
397destructor TCompressionStream.Destroy;
398begin
399 FZRec.next_in := nil;
400 FZRec.avail_in := 0;
401 try
402 if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
403 while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
404 and (FZRec.avail_out = 0) do
405 begin
406 FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
407 FZRec.next_out := FBuffer;
408 FZRec.avail_out := sizeof(FBuffer);
409 end;
410 if FZRec.avail_out < sizeof(FBuffer) then
411 FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
412 finally
413 deflateEnd(FZRec);
414 end;
415 inherited Destroy;
416end;
417
418function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
419begin
420 raise ECompressionError.Create('Invalid stream operation');
421end;
422
423function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
424begin
425 FZRec.next_in := @Buffer;
426 FZRec.avail_in := Count;
427 if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
428 while (FZRec.avail_in > 0) do
429 begin
430 CCheck(deflate(FZRec, 0));
431 if FZRec.avail_out = 0 then
432 begin
433 FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
434 FZRec.next_out := FBuffer;
435 FZRec.avail_out := sizeof(FBuffer);
436 FStrmPos := FStrm.Position;
437 Progress(Self);
438 end;
439 end;
440 Result := Count;
441end;
442
443function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
444begin
445 if (Offset = 0) and (Origin = soFromCurrent) then
446 Result := FZRec.total_in
447 else
448 raise ECompressionError.Create('Invalid stream operation');
449end;
450
451function TCompressionStream.GetCompressionRate: Single;
452begin
453 if FZRec.total_in = 0 then
454 Result := 0
455 else
456 Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0;
457end;
458
459
460// TDecompressionStream
461
462constructor TDecompressionStream.Create(Source: TStream);
463begin
464 inherited Create(Source);
465 FZRec.next_in := FBuffer;
466 FZRec.avail_in := 0;
467 DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec)));
468end;
469
470destructor TDecompressionStream.Destroy;
471begin
472 inflateEnd(FZRec);
473 inherited Destroy;
474end;
475
476function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
477begin
478 FZRec.next_out := @Buffer;
479 FZRec.avail_out := Count;
480 if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
481 while (FZRec.avail_out > 0) do
482 begin
483 if FZRec.avail_in = 0 then
484 begin
485 FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer));
486 if FZRec.avail_in = 0 then
487 begin
488 Result := Count - FZRec.avail_out;
489 Exit;
490 end;
491 FZRec.next_in := FBuffer;
492 FStrmPos := FStrm.Position;
493 Progress(Self);
494 end;
495 DCheck(inflate(FZRec, 0));
496 end;
497 Result := Count;
498end;
499
500function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
501begin
502 raise EDecompressionError.Create('Invalid stream operation');
503end;
504
505function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
506var
507 I: Integer;
508 Buf: array [0..4095] of Char;
509begin
510 if (Offset = 0) and (Origin = soFromBeginning) then
511 begin
512 DCheck(inflateReset(FZRec));
513 FZRec.next_in := FBuffer;
514 FZRec.avail_in := 0;
515 FStrm.Position := 0;
516 FStrmPos := 0;
517 end
518 else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
519 ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
520 begin
521 if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
522 if Offset > 0 then
523 begin
524 for I := 1 to Offset div sizeof(Buf) do
525 ReadBuffer(Buf, sizeof(Buf));
526 ReadBuffer(Buf, Offset mod sizeof(Buf));
527 end;
528 end
529 else
530 raise EDecompressionError.Create('Invalid stream operation');
531 Result := FZRec.total_out;
532end;
533
534end.
diff --git a/contrib/delphi2/zlib32.bpr b/contrib/delphi2/zlib32.bpr
new file mode 100644
index 0000000..cabcec4
--- /dev/null
+++ b/contrib/delphi2/zlib32.bpr
@@ -0,0 +1,174 @@
1# ---------------------------------------------------------------------------
2!if !$d(BCB)
3BCB = $(MAKEDIR)\..
4!endif
5
6# ---------------------------------------------------------------------------
7# IDE SECTION
8# ---------------------------------------------------------------------------
9# The following section of the project makefile is managed by the BCB IDE.
10# It is recommended to use the IDE to change any of the values in this
11# section.
12# ---------------------------------------------------------------------------
13
14VERSION = BCB.03
15# ---------------------------------------------------------------------------
16PROJECT = zlib32.dll
17OBJFILES = zlib32.obj adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infblock.obj \
18 infcodes.obj inffast.obj inflate.obj inftrees.obj infutil.obj trees.obj \
19 uncompr.obj zutil.obj
20RESFILES =
21RESDEPEN = $(RESFILES)
22LIBFILES =
23LIBRARIES =
24SPARELIBS =
25DEFFILE =
26PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi ibsmp35.bpi bcbsmp35.bpi \
27 dclocx35.bpi QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi DSS35.bpi \
28 NMFAST35.bpi INETDB35.bpi INET35.bpi VCLMID35.bpi
29# ---------------------------------------------------------------------------
30PATHCPP = .;
31PATHASM = .;
32PATHPAS = .;
33PATHRC = .;
34DEBUGLIBPATH = $(BCB)\lib\debug
35RELEASELIBPATH = $(BCB)\lib\release
36# ---------------------------------------------------------------------------
37CFLAG1 = -WD -O2 -Ve -d -k- -vi -c -tWD
38CFLAG2 = -D_NO_VCL;ZLIB_DLL -I$(BCB)\include
39CFLAG3 = -ff -5
40PFLAGS = -D_NO_VCL;ZLIB_DLL -U$(BCB)\lib;$(RELEASELIBPATH) -I$(BCB)\include -$I- -v \
41 -JPHN -M
42RFLAGS = -D_NO_VCL;ZLIB_DLL -i$(BCB)\include
43AFLAGS = /i$(BCB)\include /d_NO_VCL /dZLIB_DLL /mx /w2 /zn
44LFLAGS = -L$(BCB)\lib;$(RELEASELIBPATH) -aa -Tpd -x -Gi
45IFLAGS = -Gn -g
46# ---------------------------------------------------------------------------
47ALLOBJ = c0d32.obj $(OBJFILES)
48ALLRES = $(RESFILES)
49ALLLIB = $(LIBFILES) import32.lib cw32mt.lib
50# ---------------------------------------------------------------------------
51!ifdef IDEOPTIONS
52
53[Version Info]
54IncludeVerInfo=0
55AutoIncBuild=0
56MajorVer=1
57MinorVer=0
58Release=0
59Build=0
60Debug=0
61PreRelease=0
62Special=0
63Private=0
64DLL=1
65Locale=1040
66CodePage=1252
67
68[Version Info Keys]
69CompanyName=
70FileDescription=DLL (GUI)
71FileVersion=1.0.0.0
72InternalName=
73LegalCopyright=
74LegalTrademarks=
75OriginalFilename=
76ProductName=
77ProductVersion=1.0.0.0
78Comments=
79
80[HistoryLists\hlIncludePath]
81Count=1
82Item0=$(BCB)\include
83
84[HistoryLists\hlLibraryPath]
85Count=1
86Item0=$(BCB)\lib
87
88[HistoryLists\hlConditionals]
89Count=1
90Item0=_NO_VCL;ZLIB_DLL
91
92[Debugging]
93DebugSourceDirs=
94
95[Parameters]
96RunParams=
97HostApplication=
98
99!endif
100
101# ---------------------------------------------------------------------------
102# MAKE SECTION
103# ---------------------------------------------------------------------------
104# This section of the project file is not used by the BCB IDE. It is for
105# the benefit of building from the command-line using the MAKE utility.
106# ---------------------------------------------------------------------------
107
108.autodepend
109# ---------------------------------------------------------------------------
110!if !$d(BCC32)
111BCC32 = bcc32
112!endif
113
114!if !$d(DCC32)
115DCC32 = dcc32
116!endif
117
118!if !$d(TASM32)
119TASM32 = tasm32
120!endif
121
122!if !$d(LINKER)
123LINKER = ilink32
124!endif
125
126!if !$d(BRCC32)
127BRCC32 = brcc32
128!endif
129# ---------------------------------------------------------------------------
130!if $d(PATHCPP)
131.PATH.CPP = $(PATHCPP)
132.PATH.C = $(PATHCPP)
133!endif
134
135!if $d(PATHPAS)
136.PATH.PAS = $(PATHPAS)
137!endif
138
139!if $d(PATHASM)
140.PATH.ASM = $(PATHASM)
141!endif
142
143!if $d(PATHRC)
144.PATH.RC = $(PATHRC)
145!endif
146# ---------------------------------------------------------------------------
147$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE)
148 $(BCB)\BIN\$(LINKER) @&&!
149 $(LFLAGS) $(IFLAGS) +
150 $(ALLOBJ), +
151 $(PROJECT),, +
152 $(ALLLIB), +
153 $(DEFFILE), +
154 $(ALLRES)
155!
156# ---------------------------------------------------------------------------
157.pas.hpp:
158 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
159
160.pas.obj:
161 $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< }
162
163.cpp.obj:
164 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
165
166.c.obj:
167 $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< }
168
169.asm.obj:
170 $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@
171
172.rc.res:
173 $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $<
174# ---------------------------------------------------------------------------
diff --git a/contrib/delphi2/zlib32.cpp b/contrib/delphi2/zlib32.cpp
new file mode 100644
index 0000000..7372f6b
--- /dev/null
+++ b/contrib/delphi2/zlib32.cpp
@@ -0,0 +1,42 @@
1
2#include <windows.h>
3#pragma hdrstop
4#include <condefs.h>
5
6
7//---------------------------------------------------------------------------
8// Important note about DLL memory management in a VCL DLL:
9//
10//
11//
12// If your DLL uses VCL and exports any functions that pass VCL String objects
13// (or structs/classes containing nested Strings) as parameter or function
14// results, you will need to build both your DLL project and any EXE projects
15// that use your DLL with the dynamic RTL (the RTL DLL). This will change your
16// DLL and its calling EXE's to use BORLNDMM.DLL as their memory manager. In
17// these cases, the file BORLNDMM.DLL should be deployed along with your DLL
18// and the RTL DLL (CP3240MT.DLL). To avoid the requiring BORLNDMM.DLL in
19// these situations, pass string information using "char *" or ShortString
20// parameters and then link with the static RTL.
21//
22//---------------------------------------------------------------------------
23USEUNIT("adler32.c");
24USEUNIT("compress.c");
25USEUNIT("crc32.c");
26USEUNIT("deflate.c");
27USEUNIT("gzio.c");
28USEUNIT("infblock.c");
29USEUNIT("infcodes.c");
30USEUNIT("inffast.c");
31USEUNIT("inflate.c");
32USEUNIT("inftrees.c");
33USEUNIT("infutil.c");
34USEUNIT("trees.c");
35USEUNIT("uncompr.c");
36USEUNIT("zutil.c");
37//---------------------------------------------------------------------------
38#pragma argsused
39int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
40{
41 return 1;
42}