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];
/* 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 */
*/
#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);
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);
_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); \
* 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);
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;
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;