]> git.lizzy.rs Git - zlib.git/commitdiff
Fix types in contrib/minizip to match result of get_crc_table().
authortakacsd <takacsd@gmail.com>
Fri, 30 Nov 2012 18:43:50 +0000 (19:43 +0100)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 24 Feb 2013 07:32:30 +0000 (23:32 -0800)
contrib/minizip/crypt.h
contrib/minizip/unzip.c
contrib/minizip/zip.c

index a01d08d932852ed4612183cda59d19df97d2ad54..1e9e8200b201ff600aecd9eb7df1ac6989931266 100644 (file)
@@ -32,7 +32,7 @@
 /***********************************************************************
  * Return the next byte in the pseudo-random sequence
  */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
 {
     unsigned temp;  /* POTENTIAL BUG:  temp*(temp^1) may overflow in an
                      * unpredictable manner on 16-bit systems; not a problem
@@ -45,7 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
 /***********************************************************************
  * Update the encryption keys with the next byte of plain text
  */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
+static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
 {
     (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
     (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
@@ -62,7 +62,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int
  * Initialize the encryption keys and the random header according to
  * the given password.
  */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
 {
     *(pkeys+0) = 305419896L;
     *(pkeys+1) = 591751049L;
@@ -91,7 +91,7 @@ static int crypthead(const char* passwd,      /* password string */
                      unsigned char* buf,      /* where to write header */
                      int bufSize,
                      unsigned long* pkeys,
-                     const unsigned long* pcrc_32_tab,
+                     const z_crc_t* pcrc_32_tab,
                      unsigned long crcForCrypting)
 {
     int n;                       /* index in random header */
index 26b2e0f57254d4ef0232b60362dff1038b720888..909350435a51f96ecac2a2f789b616bc3704cea0 100644 (file)
@@ -188,7 +188,7 @@ typedef struct
 
 #    ifndef NOUNCRYPT
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
+    const z_crc_t* pcrc_32_tab;
 #    endif
 } unz64_s;
 
index 147934c75d3f5a8ee3ebabc0d7d8df1a05dd3d4e..ea54853e858a7f02f1600fb82f66d42685f67217 100644 (file)
@@ -157,7 +157,7 @@ typedef struct
     ZPOS64_T totalUncompressedData;
 #ifndef NOCRYPT
     unsigned long keys[3];     /* keys defining the pseudo-random sequence */
-    const unsigned long* pcrc_32_tab;
+    const z_crc_t* pcrc_32_tab;
     int crypt_header_size;
 #endif
 } curfile64_info;