From 4d7fb7469ddf1fb2878cc60d3b726e32e63bebcb Mon Sep 17 00:00:00 2001 From: mycroft Date: Tue, 18 Mar 2003 20:00:47 +0000 Subject: [PATCH] Finish const poisoning. --- sys/lib/libz/infblock.c | 4 ++-- sys/lib/libz/infcodes.c | 14 +++++++------- sys/lib/libz/infcodes.h | 4 ++-- sys/lib/libz/inffast.c | 8 ++++---- sys/lib/libz/inffast.h | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/lib/libz/infblock.c b/sys/lib/libz/infblock.c index 1f152b1a140c..eeb132b6b0cf 100644 --- a/sys/lib/libz/infblock.c +++ b/sys/lib/libz/infblock.c @@ -1,4 +1,4 @@ -/* $NetBSD: infblock.c,v 1.4 2002/03/12 00:42:23 fvdl Exp $ */ +/* $NetBSD: infblock.c,v 1.5 2003/03/18 20:00:47 mycroft Exp $ */ /* infblock.c -- interpret and process block types to last block * Copyright (C) 1995-2002 Mark Adler @@ -157,7 +157,7 @@ int r; s->last ? " (last)" : "")); { uInt bl, bd; - inflate_huft *tl, *td; + const inflate_huft *tl, *td; inflate_trees_fixed(&bl, &bd, &tl, &td, z); s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); diff --git a/sys/lib/libz/infcodes.c b/sys/lib/libz/infcodes.c index bf4f91e058cb..d16f6e4af5e1 100644 --- a/sys/lib/libz/infcodes.c +++ b/sys/lib/libz/infcodes.c @@ -1,4 +1,4 @@ -/* $NetBSD: infcodes.c,v 1.4 2002/03/12 00:42:23 fvdl Exp $ */ +/* $NetBSD: infcodes.c,v 1.5 2003/03/18 20:00:47 mycroft Exp $ */ /* infcodes.c -- process literals and length/distance pairs * Copyright (C) 1995-2002 Mark Adler @@ -39,7 +39,7 @@ struct inflate_codes_state { uInt len; union { struct { - inflate_huft *tree; /* pointer into tree */ + const inflate_huft *tree; /* pointer into tree */ uInt need; /* bits needed */ } code; /* if LEN or DIST, where in tree */ uInt lit; /* if LIT, literal */ @@ -52,16 +52,16 @@ struct inflate_codes_state { /* mode independent information */ Byte lbits; /* ltree bits decoded per branch */ Byte dbits; /* dtree bits decoder per branch */ - inflate_huft *ltree; /* literal/length/eob tree */ - inflate_huft *dtree; /* distance tree */ + const inflate_huft *ltree; /* literal/length/eob tree */ + const inflate_huft *dtree; /* distance tree */ }; inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) uInt bl, bd; -inflate_huft *tl; -inflate_huft *td; /* need separate declaration for Borland C++ */ +const inflate_huft *tl; +const inflate_huft *td; /* need separate declaration for Borland C++ */ z_streamp z; { inflate_codes_statef *c; @@ -86,7 +86,7 @@ z_streamp z; int r; { uInt j; /* temporary storage */ - inflate_huft *t; /* temporary pointer */ + const inflate_huft *t;/* temporary pointer */ uInt e; /* extra bits or operation */ uLong b; /* bit buffer */ uInt k; /* bits in bit buffer */ diff --git a/sys/lib/libz/infcodes.h b/sys/lib/libz/infcodes.h index 6d999f8e603c..4b6b1ac2c6af 100644 --- a/sys/lib/libz/infcodes.h +++ b/sys/lib/libz/infcodes.h @@ -1,4 +1,4 @@ -/* $NetBSD: infcodes.h,v 1.4 2002/03/12 00:42:23 fvdl Exp $ */ +/* $NetBSD: infcodes.h,v 1.5 2003/03/18 20:00:48 mycroft Exp $ */ /* infcodes.h -- header to use infcodes.c * Copyright (C) 1995-2002 Mark Adler @@ -15,7 +15,7 @@ typedef struct inflate_codes_state FAR inflate_codes_statef; extern inflate_codes_statef *inflate_codes_new __P(( uInt, uInt, - inflate_huft *, inflate_huft *, + const inflate_huft *, const inflate_huft *, z_streamp )); extern int inflate_codes __P(( diff --git a/sys/lib/libz/inffast.c b/sys/lib/libz/inffast.c index cd62e711485c..ebebe4bfe799 100644 --- a/sys/lib/libz/inffast.c +++ b/sys/lib/libz/inffast.c @@ -1,4 +1,4 @@ -/* $NetBSD: inffast.c,v 1.4 2002/03/12 00:42:23 fvdl Exp $ */ +/* $NetBSD: inffast.c,v 1.5 2003/03/18 20:00:48 mycroft Exp $ */ /* inffast.c -- process literals and length/distance pairs fast * Copyright (C) 1995-2002 Mark Adler @@ -29,12 +29,12 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */ int inflate_fast(bl, bd, tl, td, s, z) uInt bl, bd; -inflate_huft *tl; -inflate_huft *td; /* need separate declaration for Borland C++ */ +const inflate_huft *tl; +const inflate_huft *td; /* need separate declaration for Borland C++ */ inflate_blocks_statef *s; z_streamp z; { - inflate_huft *t; /* temporary pointer */ + const inflate_huft *t;/* temporary pointer */ uInt e; /* extra bits or operation */ uLong b; /* bit buffer */ uInt k; /* bits in bit buffer */ diff --git a/sys/lib/libz/inffast.h b/sys/lib/libz/inffast.h index 92bf8adcad9b..e46650055e0e 100644 --- a/sys/lib/libz/inffast.h +++ b/sys/lib/libz/inffast.h @@ -1,4 +1,4 @@ -/* $NetBSD: inffast.h,v 1.4 2002/03/12 00:42:24 fvdl Exp $ */ +/* $NetBSD: inffast.h,v 1.5 2003/03/18 20:00:48 mycroft Exp $ */ /* inffast.h -- header to use inffast.c * Copyright (C) 1995-2002 Mark Adler @@ -13,7 +13,7 @@ extern int inflate_fast __P(( uInt, uInt, - inflate_huft *, - inflate_huft *, + const inflate_huft *, + const inflate_huft *, inflate_blocks_statef *, z_streamp ));