]> git.lizzy.rs Git - zlib.git/blobdiff - contrib/ada/zlib-thin.ads
zlib 1.2.1.2
[zlib.git] / contrib / ada / zlib-thin.ads
index c227374f64bcccee00e168b957a91d41f4c39188..d4407eb800db3b3aa1629edc0f3815e33e737ce3 100644 (file)
@@ -6,10 +6,11 @@
 --  Open source license information is in the zlib.ads file.  --
 ----------------------------------------------------------------
 
---  $Id: zlib-thin.ads,v 1.8 2003/08/12 13:16:51 vagul Exp $
+--  $Id: zlib-thin.ads,v 1.11 2004/07/23 06:33:11 vagul Exp $
 
 with Interfaces.C.Strings;
-with System.Address_To_Access_Conversions;
+
+with System;
 
 private package ZLib.Thin is
 
@@ -36,18 +37,18 @@ private package ZLib.Thin is
                                                 --  zconf.h:216
    type Int is new Interfaces.C.int;
 
-   type ULong is new Interfaces.C.unsigned;     --  32 bits or more
-                                                --  zconf.h:217
+   type ULong is new Interfaces.C.unsigned_long;     --  32 bits or more
+                                                     --  zconf.h:217
    subtype Chars_Ptr is Interfaces.C.Strings.chars_ptr;
 
    type ULong_Access is access ULong;
    type Int_Access is access Int;
-   subtype Voidp is System.Address;            --  zconf.h:232
 
-   package Bytes is new System.Address_To_Access_Conversions (Byte);
+   subtype Voidp is System.Address;            --  zconf.h:232
 
-   subtype Byte_Access is Bytes.Object_Pointer;
+   subtype Byte_Access is Voidp;
 
+   Nul : constant Voidp := System.Null_Address;
    --  end from zconf
 
    Z_NO_FLUSH : constant := 8#0000#;   --  zlib.h:125
@@ -251,12 +252,6 @@ private package ZLib.Thin is
       stream_size : Int)
       return        Int;
 
-   function Deflate_Init
-     (strm  : in Z_Streamp;
-      level : in Int := Z_DEFAULT_COMPRESSION)
-      return  Int;
-   pragma Inline (Deflate_Init);
-
    function deflateInit2
      (strm        : Z_Streamp;
       level       : Int;
@@ -284,9 +279,6 @@ private package ZLib.Thin is
       stream_size : Int)
       return        Int;
 
-   function Inflate_Init (strm : Z_Streamp) return Int;
-   pragma Inline (Inflate_Init);
-
    function inflateInit2
      (strm        : in Z_Streamp;
       windowBits  : in Int;
@@ -318,32 +310,12 @@ private package ZLib.Thin is
    --  has dropped to zero. The application must initialize zalloc, zfree and
    --  opaque before calling the init function.
 
-   function Need_In (strm : in Z_Stream) return Boolean;
-   --  return true when we do not need to setup Next_In and Avail_In fields.
-   pragma Inline (Need_In);
-
-   function Need_Out (strm : in Z_Stream) return Boolean;
-   --  return true when we do not need to setup Next_Out and Avail_Out field.
-   pragma Inline (Need_Out);
-
-   procedure Set_In
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt);
-   pragma Inline (Set_In);
-
    procedure Set_In
      (Strm   : in out Z_Stream;
       Buffer : in Voidp;
       Size   : in UInt);
    pragma Inline (Set_In);
 
-   procedure Set_Out
-     (Strm   : in out Z_Stream;
-      Buffer : in Byte_Access;
-      Size   : in UInt);
-   pragma Inline (Set_Out);
-
    procedure Set_Out
      (Strm   : in out Z_Stream;
       Buffer : in Voidp;
@@ -388,19 +360,13 @@ private package ZLib.Thin is
 
    function zlibCompileFlags return ULong;
 
-   function deflatePrime
-     (strm     : Z_Streamp;
-      bits     : Int;
-      value    : Int)
-      return     Int;
-
 private
 
    type Z_Stream is record            -- zlib.h:68
-      Next_In   : Byte_Access;        -- next input byte
+      Next_In   : Voidp      := Nul;  -- next input byte
       Avail_In  : UInt       := 0;    -- number of bytes available at next_in
       Total_In  : ULong      := 0;    -- total nb of input bytes read so far
-      Next_Out  : Byte_Access;        -- next output byte should be put there
+      Next_Out  : Voidp      := Nul;  -- next output byte should be put there
       Avail_Out : UInt       := 0;    -- remaining free space at next_out
       Total_Out : ULong      := 0;    -- total nb of bytes output so far
       msg       : Chars_Ptr;          -- last error message, NULL if no error
@@ -460,14 +426,13 @@ private
    pragma Import (C, inflateSyncPoint, "inflateSyncPoint");
    pragma Import (C, get_crc_table, "get_crc_table");
 
-   --  added in zlib 1.2.1:
+   --  since zlib 1.2.0:
 
    pragma Import (C, inflateCopy, "inflateCopy");
    pragma Import (C, compressBound, "compressBound");
    pragma Import (C, deflateBound, "deflateBound");
    pragma Import (C, gzungetc, "gzungetc");
    pragma Import (C, zlibCompileFlags, "zlibCompileFlags");
-   pragma Import (C, deflatePrime, "deflatePrime");
 
    pragma Import (C, inflateBackInit, "inflateBackInit_");