summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas/zwrapper.pas
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-10 20:15:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-10 20:15:02 +0000
commit66a5a3ee980520f1bb690b78e85b6105d0f80347 (patch)
tree6f84f83e07c1af460812090503ec7404cf92b8cd /plugins/Utils.pas/zwrapper.pas
parentbd7fe0980cf5974c432b789323a3fe2f68a107d3 (diff)
other pascal merge
git-svn-id: http://svn.miranda-ng.org/main/trunk@3966 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils.pas/zwrapper.pas')
-rw-r--r--plugins/Utils.pas/zwrapper.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Utils.pas/zwrapper.pas b/plugins/Utils.pas/zwrapper.pas
index bc6be65a43..7ccffafb14 100644
--- a/plugins/Utils.pas/zwrapper.pas
+++ b/plugins/Utils.pas/zwrapper.pas
@@ -6,14 +6,14 @@ function ZDecompressBuf(const inBuffer: Pointer; inSize: Integer; out outBuffer:
implementation
-uses m_api;
+uses zlib;
function ZDecompressBuf(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer): Integer;
var
- zstream : z_stream;
+ zstream : TZStreamRec;
delta : Integer;
begin
- FillChar(zstream, SizeOf(z_stream), 0);
+ FillChar(zstream, SizeOf(TZStreamRec), 0);
delta := (inSize + 255) and not 255;
@@ -38,7 +38,7 @@ begin
Inc(outSize, delta);
ReallocMem(outBuffer, outSize);
- zstream.next_out := PChar(pByte(outBuffer) + zstream.total_out);
+ zstream.next_out := {$IFDEF FPC}PBytef{$ENDIF}(pByte(outBuffer) + zstream.total_out);
zstream.avail_out := delta;
Result := inflate(zstream, Z_NO_FLUSH);
if Result < 0 then Exit;