diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2015-05-31 16:20:06 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2015-05-31 16:20:06 (GMT) |
commit | f50357637950d7ee913d02d98cfa78ca49bd0e09 (patch) | |
tree | d53d085f4f5d210127092023f92633ef57a090f6 /compat/zlib/examples/gun.c | |
parent | f9c9b71cd327714fabe221f91e2f9af29fdd9b85 (diff) | |
parent | 32461a99d3dc5741caf2f1c282ca57fe06220b79 (diff) | |
download | tcl-f50357637950d7ee913d02d98cfa78ca49bd0e09.zip tcl-f50357637950d7ee913d02d98cfa78ca49bd0e09.tar.gz tcl-f50357637950d7ee913d02d98cfa78ca49bd0e09.tar.bz2 |
merge trunk
Diffstat (limited to 'compat/zlib/examples/gun.c')
-rw-r--r-- | compat/zlib/examples/gun.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compat/zlib/examples/gun.c b/compat/zlib/examples/gun.c index 72b0882..89e484f 100644 --- a/compat/zlib/examples/gun.c +++ b/compat/zlib/examples/gun.c @@ -1,7 +1,7 @@ /* gun.c -- simple gunzip to give an example of the use of inflateBack() - * Copyright (C) 2003, 2005, 2008, 2010 Mark Adler + * Copyright (C) 2003, 2005, 2008, 2010, 2012 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h - Version 1.6 17 January 2010 Mark Adler */ + Version 1.7 12 August 2012 Mark Adler */ /* Version history: 1.0 16 Feb 2003 First version for testing of inflateBack() @@ -18,6 +18,7 @@ 1.4 8 Dec 2006 LZW decompression speed improvements 1.5 9 Feb 2008 Avoid warning in latest version of gcc 1.6 17 Jan 2010 Avoid signed/unsigned comparison warnings + 1.7 12 Aug 2012 Update for z_const usage in zlib 1.2.8 */ /* @@ -85,7 +86,7 @@ struct ind { /* Load input buffer, assumed to be empty, and return bytes loaded and a pointer to them. read() is called until the buffer is full, or until it returns end-of-file or error. Return 0 on error. */ -local unsigned in(void *in_desc, unsigned char **buf) +local unsigned in(void *in_desc, z_const unsigned char **buf) { int ret; unsigned len; @@ -196,7 +197,7 @@ unsigned char match[65280 + 2]; /* buffer for reversed match or gzip file, read error, or write error (a write error indicated by strm->next_in not equal to Z_NULL), or Z_DATA_ERROR for invalid input. */ -local int lunpipe(unsigned have, unsigned char *next, struct ind *indp, +local int lunpipe(unsigned have, z_const unsigned char *next, struct ind *indp, int outfile, z_stream *strm) { int last; /* last byte read by NEXT(), or -1 if EOF */ @@ -383,7 +384,7 @@ local int gunpipe(z_stream *strm, int infile, int outfile) { int ret, first, last; unsigned have, flags, len; - unsigned char *next = NULL; + z_const unsigned char *next = NULL; struct ind ind, *indp; struct outd outd; |