CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
142 lines
3.3 KiB
Ada
142 lines
3.3 KiB
Ada
----------------------------------------------------------------
|
|
-- ZLib for Ada thick binding. --
|
|
-- --
|
|
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
|
|
-- --
|
|
-- Open source license information is in the zlib.ads file. --
|
|
----------------------------------------------------------------
|
|
|
|
-- $Id: zlib-thin.adb,v 1.8 2003/12/14 18:27:31 vagul Exp $
|
|
|
|
package body ZLib.Thin is
|
|
|
|
ZLIB_VERSION : constant Chars_Ptr := zlibVersion;
|
|
|
|
Z_Stream_Size : constant Int := Z_Stream'Size / System.Storage_Unit;
|
|
|
|
--------------
|
|
-- Avail_In --
|
|
--------------
|
|
|
|
function Avail_In (Strm : in Z_Stream) return UInt is
|
|
begin
|
|
return Strm.Avail_In;
|
|
end Avail_In;
|
|
|
|
---------------
|
|
-- Avail_Out --
|
|
---------------
|
|
|
|
function Avail_Out (Strm : in Z_Stream) return UInt is
|
|
begin
|
|
return Strm.Avail_Out;
|
|
end Avail_Out;
|
|
|
|
------------------
|
|
-- Deflate_Init --
|
|
------------------
|
|
|
|
function Deflate_Init
|
|
(strm : Z_Streamp;
|
|
level : Int;
|
|
method : Int;
|
|
windowBits : Int;
|
|
memLevel : Int;
|
|
strategy : Int)
|
|
return Int is
|
|
begin
|
|
return deflateInit2
|
|
(strm,
|
|
level,
|
|
method,
|
|
windowBits,
|
|
memLevel,
|
|
strategy,
|
|
ZLIB_VERSION,
|
|
Z_Stream_Size);
|
|
end Deflate_Init;
|
|
|
|
------------------
|
|
-- Inflate_Init --
|
|
------------------
|
|
|
|
function Inflate_Init (strm : Z_Streamp; windowBits : Int) return Int is
|
|
begin
|
|
return inflateInit2 (strm, windowBits, ZLIB_VERSION, Z_Stream_Size);
|
|
end Inflate_Init;
|
|
|
|
------------------------
|
|
-- Last_Error_Message --
|
|
------------------------
|
|
|
|
function Last_Error_Message (Strm : in Z_Stream) return String is
|
|
use Interfaces.C.Strings;
|
|
begin
|
|
if Strm.msg = Null_Ptr then
|
|
return "";
|
|
else
|
|
return Value (Strm.msg);
|
|
end if;
|
|
end Last_Error_Message;
|
|
|
|
------------
|
|
-- Set_In --
|
|
------------
|
|
|
|
procedure Set_In
|
|
(Strm : in out Z_Stream;
|
|
Buffer : in Voidp;
|
|
Size : in UInt) is
|
|
begin
|
|
Strm.Next_In := Buffer;
|
|
Strm.Avail_In := Size;
|
|
end Set_In;
|
|
|
|
------------------
|
|
-- Set_Mem_Func --
|
|
------------------
|
|
|
|
procedure Set_Mem_Func
|
|
(Strm : in out Z_Stream;
|
|
Opaque : in Voidp;
|
|
Alloc : in alloc_func;
|
|
Free : in free_func) is
|
|
begin
|
|
Strm.opaque := Opaque;
|
|
Strm.zalloc := Alloc;
|
|
Strm.zfree := Free;
|
|
end Set_Mem_Func;
|
|
|
|
-------------
|
|
-- Set_Out --
|
|
-------------
|
|
|
|
procedure Set_Out
|
|
(Strm : in out Z_Stream;
|
|
Buffer : in Voidp;
|
|
Size : in UInt) is
|
|
begin
|
|
Strm.Next_Out := Buffer;
|
|
Strm.Avail_Out := Size;
|
|
end Set_Out;
|
|
|
|
--------------
|
|
-- Total_In --
|
|
--------------
|
|
|
|
function Total_In (Strm : in Z_Stream) return ULong is
|
|
begin
|
|
return Strm.Total_In;
|
|
end Total_In;
|
|
|
|
---------------
|
|
-- Total_Out --
|
|
---------------
|
|
|
|
function Total_Out (Strm : in Z_Stream) return ULong is
|
|
begin
|
|
return Strm.Total_Out;
|
|
end Total_Out;
|
|
|
|
end ZLib.Thin;
|