summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-09 14:56:52 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-09 14:56:52 +0000
commit5086c9d2039004aefe1bca55f73760f78b0fd698 (patch)
tree7f89dbcf474e79c9bea3281a35eb1ae7b6e922ae
parent66c5aac8dd6212228c1ea29bea4b3fc3430e7032 (diff)
fix for zlib1 import in pascal modules
git-svn-id: http://svn.miranda-ng.org/main/trunk@1844 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_api.pas5
-rw-r--r--plugins/Utils.pas/zwrapper.pas8
-rw-r--r--plugins/Watrack/watrack.dpr2
3 files changed, 8 insertions, 7 deletions
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas
index 92c39c164d..29f340073e 100644
--- a/include/delphi/m_api.pas
+++ b/include/delphi/m_api.pas
@@ -67,7 +67,7 @@ type
// delphi 64 must have these types anyway
int_ptr = integer;
uint_ptr = cardinal;
-
+
{$ENDIF}
long = longint;
plong = ^long;
@@ -157,7 +157,7 @@ const
ME_SYSTEM_MODULEUNLOAD:pAnsiChar = 'Miranda/System/UnloadModule';
{
- Each service mode plugin must implement MS_SERVICEMODE_LAUNCH
+ Each service mode plugin must implement MS_SERVICEMODE_LAUNCH
This service might return one of the following values:
SERVICE_CONTINUE - load Miranda normally, like there's no service plugins at all
SERVICE_ONLYDB - load database and then execute service plugin only
@@ -201,6 +201,7 @@ var
{$include m_protosvc.inc}
{$include m_options.inc}
{$include m_ssl.inc}
+ {$include m_zlib.inc}
{$include m_icq.inc}
{$include m_protoint.inc}
{$include m_protocols.inc}
diff --git a/plugins/Utils.pas/zwrapper.pas b/plugins/Utils.pas/zwrapper.pas
index 7ccffafb14..bc6be65a43 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 zlib;
+uses m_api;
function ZDecompressBuf(const inBuffer: Pointer; inSize: Integer; out outBuffer: Pointer; out outSize: Integer; outEstimate: Integer): Integer;
var
- zstream : TZStreamRec;
+ zstream : z_stream;
delta : Integer;
begin
- FillChar(zstream, SizeOf(TZStreamRec), 0);
+ FillChar(zstream, SizeOf(z_stream), 0);
delta := (inSize + 255) and not 255;
@@ -38,7 +38,7 @@ begin
Inc(outSize, delta);
ReallocMem(outBuffer, outSize);
- zstream.next_out := {$IFDEF FPC}PBytef{$ENDIF}(pByte(outBuffer) + zstream.total_out);
+ zstream.next_out := PChar(pByte(outBuffer) + zstream.total_out);
zstream.avail_out := delta;
Result := inflate(zstream, Z_NO_FLUSH);
if Result < 0 then Exit;
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr
index 2702c4852f..2d22375845 100644
--- a/plugins/Watrack/watrack.dpr
+++ b/plugins/Watrack/watrack.dpr
@@ -137,7 +137,7 @@ begin
UTFToWide(dst^.mfile,si.mfile)
else
si.mfile:=dst^.mfile;
-}
+}
f:=Reset(dst^.mfile);
if dword(f)<>INVALID_HANDLE_VALUE then
GetFileTime(f,nil,nil,@dst^.date);