Browse Source

Works again inder linux

michael 25 years ago
parent
commit
d9b9560795
1 changed files with 6 additions and 2 deletions
  1. 6 2
      fcl/inc/zstream.pp

+ 6 - 2
fcl/inc/zstream.pp

@@ -133,6 +133,8 @@ procedure TCompressionStream.CompressBuf(const InBuf: Pointer; InBytes: Integer;
 var
 var
   strm: TZStream;
   strm: TZStream;
   P: Pointer;
   P: Pointer;
+Type
+  PByte = ^Byte;
 begin
 begin
   FillChar(strm, sizeof(strm), 0);
   FillChar(strm, sizeof(strm), 0);
   strm.zalloc := @zlibAllocMem;
   strm.zalloc := @zlibAllocMem;
@@ -151,7 +153,7 @@ begin
         P := OutBuf;
         P := OutBuf;
         Inc(OutBytes, 256);
         Inc(OutBytes, 256);
         ReallocMem(OutBuf,OutBytes);
         ReallocMem(OutBuf,OutBytes);
-        strm.next_out := PByte(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
+        strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
         strm.avail_out := 256;
         strm.avail_out := 256;
       end;
       end;
     finally
     finally
@@ -172,6 +174,8 @@ var
   strm: TZStream;
   strm: TZStream;
   P: Pointer;
   P: Pointer;
   BufInc: Integer;
   BufInc: Integer;
+Type
+  PByte = ^Byte;
 begin
 begin
   FillChar(strm, sizeof(strm), 0);
   FillChar(strm, sizeof(strm), 0);
   strm.zalloc := @zlibAllocMem;
   strm.zalloc := @zlibAllocMem;
@@ -194,7 +198,7 @@ begin
         P := OutBuf;
         P := OutBuf;
         Inc(OutBytes, BufInc);
         Inc(OutBytes, BufInc);
         ReallocMem(OutBuf, OutBytes);
         ReallocMem(OutBuf, OutBytes);
-        strm.next_out := Pbyte(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
+        strm.next_out := Pchar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
         strm.avail_out := BufInc;
         strm.avail_out := BufInc;
       end;
       end;
     finally
     finally