]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Type cleanup...
authorMika Lindqvist <postmaster@raasu.org>
Tue, 14 Feb 2017 20:10:02 +0000 (22:10 +0200)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Thu, 16 Feb 2017 10:20:27 +0000 (11:20 +0100)
* uInt -> unsigned int
* ulg -> unsigned long

deflate.c
deflate_p.h
deflate_slow.c
infback.c

index 72da7e84e4bede5eaa7098f1434fbe4522db3a28..8bba94554f3498be0dfc4607fcf93ba4a61d698b 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -163,7 +163,7 @@ static const config configuration_table[10] = {
 static void slide_hash(deflate_state *s) {
     unsigned n;
     Pos *p;
-    uInt wsize = s->w_size;
+    unsigned int wsize = s->w_size;
 
     n = s->hash_size;
     p = &s->head[n];
@@ -1347,7 +1347,7 @@ static block_state deflate_stored(deflate_state *s, int flush) {
             /* maximum stored block length that will fit in avail_out: */
         have = s->strm->avail_out - have;
         left = s->strstart - s->block_start;    /* bytes left in window */
-        if (len > (ulg)left + s->strm->avail_in)
+        if (len > (unsigned long)left + s->strm->avail_in)
             len = left + s->strm->avail_in;     /* limit len to the input */
         if (len > have)
             len = have;                         /* limit len to the output */
index 3550818aa91b191fe0125e1a13798bd03b99b8da..a446544da1729f402eb2007cb787d2f5277a6a4a 100644 (file)
@@ -33,12 +33,12 @@ void flush_pending(z_stream *strm);
  */
 
 #ifdef X86_SSE4_2_CRC_HASH
-extern Pos insert_string_sse(deflate_state *const s, const Pos str, uInt count);
+extern Pos insert_string_sse(deflate_state *const s, const Pos str, unsigned int count);
 #endif
 
-static inline Pos insert_string_c(deflate_state *const s, const Pos str, uInt count) {
+static inline Pos insert_string_c(deflate_state *const s, const Pos str, unsigned int count) {
     Pos ret = 0;
-    uInt idx;
+    unsigned int idx;
 
     for (idx = 0; idx < count; idx++) {
         UPDATE_HASH(s, s->ins_h, str+idx);
@@ -51,7 +51,7 @@ static inline Pos insert_string_c(deflate_state *const s, const Pos str, uInt co
     return ret;
 }
 
-static inline Pos insert_string(deflate_state *const s, const Pos str, uInt count) {
+static inline Pos insert_string(deflate_state *const s, const Pos str, unsigned int count) {
 #ifdef X86_SSE4_2_CRC_HASH
     if (x86_cpu_has_sse42)
         return insert_string_sse(s, str, count);
@@ -67,7 +67,7 @@ static inline Pos insert_string(deflate_state *const s, const Pos str, uInt coun
     _tr_flush_block(s, (s->block_start >= 0L ? \
                    (char *)&s->window[(unsigned)s->block_start] : \
                    NULL), \
-                   (ulg)((long)s->strstart - s->block_start), \
+                   (unsigned long)((long)s->strstart - s->block_start), \
                    (last)); \
     s->block_start = s->strstart; \
     flush_pending(s->strm); \
index f9e81d5ffdf32643c1b94f754548c1f81eae755a..c0be3eaa33c86a9f5952f6b7491beae029cd6f1e 100644 (file)
@@ -79,7 +79,7 @@ block_state deflate_slow(deflate_state *s, int flush) {
          * match is not better, output the previous match:
          */
         if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
+            unsigned int max_insert = s->strstart + s->lookahead - MIN_MATCH;
             /* Do not insert strings in hash table beyond this. */
 
             check_match(s, s->strstart-1, s->prev_match, s->prev_length);
@@ -105,8 +105,8 @@ block_state deflate_slow(deflate_state *s, int flush) {
             s->strstart++;
 #else
             {
-                uInt mov_fwd = s->prev_length - 2;
-                uInt insert_cnt = mov_fwd;
+                unsigned int mov_fwd = s->prev_length - 2;
+                unsigned int insert_cnt = mov_fwd;
                 if (unlikely(insert_cnt > max_insert - s->strstart))
                     insert_cnt = max_insert - s->strstart;
 
index 81f792e5bd0677e15ff02b8f827868793ae7675b..5c545b4233840f88e843d3e21803d3b79c213f60 100644 (file)
--- a/infback.c
+++ b/infback.c
@@ -46,7 +46,7 @@ int ZEXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned char *wind
     Tracev((stderr, "inflate: allocated\n"));
     strm->state = (struct internal_state *)state;
     state->dmax = 32768U;
-    state->wbits = (uInt)windowBits;
+    state->wbits = (unsigned int)windowBits;
     state->wsize = 1U << windowBits;
     state->window = window;
     state->wnext = 0;