From 8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:13:27 -0700 Subject: zlib 1.0-pre --- infblock.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'infblock.c') diff --git a/infblock.c b/infblock.c index 4c2ff65..9c6e6a8 100644 --- a/infblock.c +++ b/infblock.c @@ -1,5 +1,5 @@ /* infblock.c -- interpret and process block types to last block - * Copyright (C) 1995-1996 Mark Adler + * Copyright (C) 1995 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -81,7 +81,7 @@ uLongf *c; s->bitb = 0; s->read = s->write = s->window; if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(0L, Z_NULL, 0); + s->check = (*s->checkfn)(0L, Z_NULL, 0); Trace((stderr, "inflate: blocks reset\n")); } @@ -172,7 +172,7 @@ int r; case 3: /* illegal */ DUMPBITS(3) s->mode = BAD; - z->msg = (char*)"invalid block type"; + z->msg = "invalid block type"; r = Z_DATA_ERROR; LEAVE } @@ -182,7 +182,7 @@ int r; if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) { s->mode = BAD; - z->msg = (char*)"invalid stored block lengths"; + z->msg = "invalid stored block lengths"; r = Z_DATA_ERROR; LEAVE } @@ -215,7 +215,7 @@ int r; if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { s->mode = BAD; - z->msg = (char*)"too many length or distance symbols"; + z->msg = "too many length or distance symbols"; r = Z_DATA_ERROR; LEAVE } @@ -285,7 +285,7 @@ int r; (c == 16 && i < 1)) { s->mode = BAD; - z->msg = (char*)"invalid bit length repeat"; + z->msg = "invalid bit length repeat"; r = Z_DATA_ERROR; LEAVE } @@ -383,14 +383,3 @@ uLongf *c; Trace((stderr, "inflate: blocks freed\n")); return Z_OK; } - - -void inflate_set_dictionary(s, z, d, n) -inflate_blocks_statef *s; -z_stream *z; -const Bytef *d; -uInt n; -{ - zmemcpy((charf *)s->window, d, n); - s->read = s->write = s->window + n; -} -- cgit v1.2.3-55-g6feb