mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
Works again inder linux
This commit is contained in:
parent
f13bdfe511
commit
d9b9560795
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user