701b5a29032e3615a9152440d143e09ece209a2a
3 {
4 Copyright (C) 1998 by Jacques Nomssi Nzali
5 For conditions of distribution and use, see copyright notice in readme.txt
6 }
8 interface
10 {$I imzconf.inc}
12 { Type declarations }
14 type
15 {Byte = usigned char; 8 bits}
36 { a pointer to integer casting is used to do pointer arithmetic.
37 ptr2int must be an integer type and sizeof(ptr2int) must be less
38 than sizeof(pointer) - Nomssi }
40 type
43 type
46 type
50 { Type declarations - only for deflate }
52 type
65 type
68 type
78 implementation
81 begin
86 var
88 source,
90 begin
94 begin
96 begin
98 exit;
107 begin
112 {$ifdef Delphi16}
113 var
115 {$endif}
116 {$IFDEF FPC}
117 var
119 {$ENDIF}
120 begin
121 (*
122 {$IFDEF DPMI}
123 {h :=} GlobalFreePtr(ptr);
124 {$ELSE}
125 {$IFDEF CALL_DOS}
126 dosFree(ptr);
127 {$ELSE}
128 {$ifdef HugeMem}
129 FreeMemHuge(ptr);
130 {$else}
131 {$ifdef Delphi16}
132 Handle := GlobalHandle(LH(ptr).H); { HiWord(LongInt(ptr)) }
133 GlobalUnLock(Handle);
134 GlobalFree(Handle);
135 {$else}
136 {$IFDEF FPC}
137 Dec(puIntf(ptr));
138 memsize := puIntf(ptr)^;
139 FreeMem(ptr, memsize+SizeOf(uInt));
140 {$ELSE}
141 FreeMem(ptr); { Delphi 2,3,4 }
142 {$ENDIF}
143 {$endif}
144 {$endif}
145 {$ENDIF}
146 {$ENDIF}
147 *)
152 var
155 {$ifdef Delphi16}
157 {$endif}
158 begin
160 (*
161 { $IFDEF DPMI}
162 p := GlobalAllocPtr(gmem_moveable, memsize);
163 { $ELSE}
164 { $IFDEF CALLDOS}
165 p := dosAlloc(memsize);
166 { $ELSE}
167 {$ifdef HugeMem}
168 GetMemHuge(p, memsize);
169 { $else}
170 { $ifdef Delphi16}
171 Handle := GlobalAlloc(HeapAllocFlags, memsize);
172 p := GlobalLock(Handle);
173 { $else}
174 { $IFDEF FPC}
175 GetMem(p, memsize+SizeOf(uInt));
176 puIntf(p)^:= memsize;
177 Inc(puIntf(p));
178 { $ELSE}
179 GetMem(p, memsize); { Delphi: p := AllocMem(memsize); }
180 { $ENDIF}
181 { $endif}
182 { $endif}
183 { $ENDIF}
184 { $ENDIF}
185 *)