diff options
-rw-r--r-- | sys/lib/libz/adler32.c | 2 | ||||
-rw-r--r-- | sys/lib/libz/crc32.c | 6 | ||||
-rw-r--r-- | sys/lib/libz/infblock.c | 8 | ||||
-rw-r--r-- | sys/lib/libz/infblock.h | 2 | ||||
-rw-r--r-- | sys/lib/libz/infcodes.c | 2 | ||||
-rw-r--r-- | sys/lib/libz/infcodes.h | 2 | ||||
-rw-r--r-- | sys/lib/libz/inffast.c | 2 | ||||
-rw-r--r-- | sys/lib/libz/inffast.h | 2 | ||||
-rw-r--r-- | sys/lib/libz/inflate.c | 2 | ||||
-rw-r--r-- | sys/lib/libz/inftrees.c | 25 | ||||
-rw-r--r-- | sys/lib/libz/inftrees.h | 4 | ||||
-rw-r--r-- | sys/lib/libz/infutil.c | 4 | ||||
-rw-r--r-- | sys/lib/libz/infutil.h | 4 | ||||
-rw-r--r-- | sys/lib/libz/zconf.h | 2 | ||||
-rw-r--r-- | sys/lib/libz/zlib.h | 2 | ||||
-rw-r--r-- | sys/lib/libz/zutil.h | 8 |
16 files changed, 23 insertions, 54 deletions
diff --git a/sys/lib/libz/adler32.c b/sys/lib/libz/adler32.c index 3ed38fd7b09..41da9d2ac27 100644 --- a/sys/lib/libz/adler32.c +++ b/sys/lib/libz/adler32.c @@ -1,9 +1,9 @@ -/* $OpenBSD: adler32.c,v 1.2 1997/11/07 15:57:46 niklas Exp $ */ /* adler32.c -- compute the Adler-32 checksum of a data stream * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $Id: adler32.c,v 1.3 1998/09/08 03:32:04 millert Exp $ */ #include "zlib.h" diff --git a/sys/lib/libz/crc32.c b/sys/lib/libz/crc32.c index fb2be41b985..85c22dff6bd 100644 --- a/sys/lib/libz/crc32.c +++ b/sys/lib/libz/crc32.c @@ -1,15 +1,13 @@ -/* $OpenBSD: crc32.c,v 1.4 1998/05/30 02:20:50 mickey Exp $ */ /* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $Id: crc32.c,v 1.5 1998/09/08 03:32:04 millert Exp $ */ #include "zlib.h" -#ifndef local #define local static -#endif #ifdef DYNAMIC_CRC_TABLE @@ -47,7 +45,7 @@ local void make_crc_table() int n, k; uLong poly; /* polynomial exclusive-or pattern */ /* terms of polynomial defining this crc (except x^32): */ - static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + static Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; /* make exclusive-or pattern from polynomial (0xedb88320L) */ poly = 0L; diff --git a/sys/lib/libz/infblock.c b/sys/lib/libz/infblock.c index dd93f18f754..cc2e6745a78 100644 --- a/sys/lib/libz/infblock.c +++ b/sys/lib/libz/infblock.c @@ -1,5 +1,3 @@ -/* $OpenBSD: infblock.c,v 1.4 1998/05/30 02:20:51 mickey Exp $ */ - /* infblock.c -- interpret and process block types to last block * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -14,7 +12,7 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */ /* Table for deflate from PKZIP's appnote.txt. */ -local const uInt border[] = { /* Order of the bit length code lengths */ +local uInt border[] = { /* Order of the bit length code lengths */ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; /* @@ -112,7 +110,7 @@ uInt w; } -#ifdef DEBUG_ZLIB +#ifdef DEBUG extern uInt inflate_hufts; #endif int inflate_blocks(s, z, r) @@ -311,7 +309,7 @@ int r; bl = 9; /* must be <= 9 for lookahead assumptions */ bd = 6; /* must be <= 9 for lookahead assumptions */ t = s->sub.trees.table; -#ifdef DEBUG_ZLIB +#ifdef DEBUG inflate_hufts = 0; #endif t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), diff --git a/sys/lib/libz/infblock.h b/sys/lib/libz/infblock.h index 0a2c9548044..3ecd50cd3a6 100644 --- a/sys/lib/libz/infblock.h +++ b/sys/lib/libz/infblock.h @@ -1,5 +1,3 @@ -/* $OpenBSD: infblock.h,v 1.2 1997/11/07 15:57:47 niklas Exp $ */ - /* infblock.h -- header to use infblock.c * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/infcodes.c b/sys/lib/libz/infcodes.c index f4e7a888e78..3ae3818a194 100644 --- a/sys/lib/libz/infcodes.c +++ b/sys/lib/libz/infcodes.c @@ -1,5 +1,3 @@ -/* $OpenBSD: infcodes.c,v 1.2 1997/11/07 15:57:48 niklas Exp $ */ - /* infcodes.c -- process literals and length/distance pairs * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/infcodes.h b/sys/lib/libz/infcodes.h index 542cac10d13..c2c38df2c06 100644 --- a/sys/lib/libz/infcodes.h +++ b/sys/lib/libz/infcodes.h @@ -1,5 +1,3 @@ -/* $OpenBSD: infcodes.h,v 1.2 1997/11/07 15:57:48 niklas Exp $ */ - /* infcodes.h -- header to use infcodes.c * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/inffast.c b/sys/lib/libz/inffast.c index d7d7c7225f7..86eee4a2992 100644 --- a/sys/lib/libz/inffast.c +++ b/sys/lib/libz/inffast.c @@ -1,5 +1,3 @@ -/* $OpenBSD: inffast.c,v 1.2 1997/11/07 15:57:49 niklas Exp $ */ - /* inffast.c -- process literals and length/distance pairs fast * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/inffast.h b/sys/lib/libz/inffast.h index 963f6ac4fae..8cc644efb1f 100644 --- a/sys/lib/libz/inffast.h +++ b/sys/lib/libz/inffast.h @@ -1,5 +1,3 @@ -/* $OpenBSD: inffast.h,v 1.2 1997/11/07 15:57:49 niklas Exp $ */ - /* inffast.h -- header to use inffast.c * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/inflate.c b/sys/lib/libz/inflate.c index 3f9420fe682..74cc69c8684 100644 --- a/sys/lib/libz/inflate.c +++ b/sys/lib/libz/inflate.c @@ -1,5 +1,3 @@ -/* $OpenBSD: inflate.c,v 1.2 1997/11/07 15:57:49 niklas Exp $ */ - /* inflate.c -- zlib interface to inflate modules * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h diff --git a/sys/lib/libz/inftrees.c b/sys/lib/libz/inftrees.c index 02ddb678223..90205bd1e57 100644 --- a/sys/lib/libz/inftrees.c +++ b/sys/lib/libz/inftrees.c @@ -1,5 +1,3 @@ -/* $OpenBSD: inftrees.c,v 1.6 1998/05/30 02:20:52 mickey Exp $ */ - /* inftrees.c -- generate Huffman trees for efficient decoding * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -8,8 +6,7 @@ #include "zutil.h" #include "inftrees.h" -const char inflate_copyright[] = "inflate 1.0.4 Copyright 1995-1996 Mark Adler"; - +char inflate_copyright[] = " inflate 1.0.4 Copyright 1995-1996 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,8 +26,8 @@ local int huft_build OF(( uIntf *, /* code lengths in bits */ uInt, /* number of codes */ uInt, /* number of "simple" codes */ - const uIntf *, /* list of base values for non-simple codes */ - const uIntf *, /* list of extra bits for non-simple codes */ + uIntf *, /* list of base values for non-simple codes */ + uIntf *, /* list of extra bits for non-simple codes */ inflate_huft * FAR*,/* result: starting table */ uIntf *, /* maximum lookup bits (returns actual) */ z_streamp )); /* for zalloc function */ @@ -41,18 +38,18 @@ local voidpf falloc OF(( uInt)); /* size of item */ /* Tables for deflate from PKZIP's appnote.txt. */ -local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ +local uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; /* actually lengths - 2; also see note #13 above about 258 */ -local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ +local uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 192, 192}; /* 192==invalid */ -local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ +local uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; -local const uInt cpdext[30] = { /* Extra bits for distance codes */ +local uInt cpdext[30] = { /* Extra bits for distance codes */ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; @@ -94,7 +91,7 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */ #define BMAX 15 /* maximum bit length of any code */ #define N_MAX 288 /* maximum number of codes in any set */ -#ifdef DEBUG_ZLIB +#ifdef DEBUG uInt inflate_hufts; #endif @@ -102,8 +99,8 @@ local int huft_build(b, n, s, d, e, t, m, zs) uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ uInt n; /* number of codes (assumed <= N_MAX) */ uInt s; /* number of simple-valued codes (0..s-1) */ -const uIntf *d; /* list of base values for non-simple codes */ -const uIntf *e; /* list of extra bits for non-simple codes */ +uIntf *d; /* list of base values for non-simple codes */ +uIntf *e; /* list of extra bits for non-simple codes */ inflate_huft * FAR *t; /* result: starting table */ uIntf *m; /* maximum lookup bits, returns actual */ z_streamp zs; /* for zalloc function */ @@ -242,7 +239,7 @@ z_streamp zs; /* for zalloc function */ inflate_trees_free(u[0], zs); return Z_MEM_ERROR; /* not enough memory */ } -#ifdef DEBUG_ZLIB +#ifdef DEBUG inflate_hufts += z + 1; #endif *t = q + 1; /* link to list for huft_free() */ diff --git a/sys/lib/libz/inftrees.h b/sys/lib/libz/inftrees.h index 5d0138eaa19..b06613ddd3f 100644 --- a/sys/lib/libz/inftrees.h +++ b/sys/lib/libz/inftrees.h @@ -1,5 +1,3 @@ -/* $OpenBSD: inftrees.h,v 1.3 1997/11/07 15:57:50 niklas Exp $ */ - /* inftrees.h -- header to use inftrees.c * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -29,7 +27,7 @@ struct inflate_huft_s { } more; }; -#ifdef DEBUG_ZLIB +#ifdef DEBUG extern uInt inflate_hufts; #endif diff --git a/sys/lib/libz/infutil.c b/sys/lib/libz/infutil.c index 48583a0981f..eb21199c350 100644 --- a/sys/lib/libz/infutil.c +++ b/sys/lib/libz/infutil.c @@ -1,5 +1,3 @@ -/* $OpenBSD: infutil.c,v 1.3 1998/05/30 02:20:53 mickey Exp $ */ - /* inflate_util.c -- data and routines common to blocks and codes * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -14,7 +12,7 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */ /* And'ing with mask[n] masks the lower n bits */ -const uInt inflate_mask[17] = { +uInt inflate_mask[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff diff --git a/sys/lib/libz/infutil.h b/sys/lib/libz/infutil.h index 285c85c8950..702cd290c37 100644 --- a/sys/lib/libz/infutil.h +++ b/sys/lib/libz/infutil.h @@ -1,5 +1,3 @@ -/* $OpenBSD: infutil.h,v 1.3 1998/05/30 02:20:54 mickey Exp $ */ - /* infutil.h -- types and macros common to blocks and codes * Copyright (C) 1995-1996 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -88,7 +86,7 @@ struct inflate_blocks_state { #define LOAD {LOADIN LOADOUT} /* masks for lower bits (size given to avoid silly warnings with Visual C++) */ -extern const uInt inflate_mask[17]; +extern uInt inflate_mask[17]; /* copy as much as possible from the sliding window to the output area */ extern int inflate_flush OF(( diff --git a/sys/lib/libz/zconf.h b/sys/lib/libz/zconf.h index e8770223a18..020420cdc4a 100644 --- a/sys/lib/libz/zconf.h +++ b/sys/lib/libz/zconf.h @@ -1,9 +1,9 @@ -/* $OpenBSD: zconf.h,v 1.2 1997/11/07 15:57:52 niklas Exp $ */ /* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-1996 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ +/* $Id: zconf.h,v 1.3 1998/09/08 03:32:04 millert Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H diff --git a/sys/lib/libz/zlib.h b/sys/lib/libz/zlib.h index a7b993e6584..337fe9fe8a3 100644 --- a/sys/lib/libz/zlib.h +++ b/sys/lib/libz/zlib.h @@ -1,5 +1,3 @@ -/* $OpenBSD: zlib.h,v 1.2 1997/11/07 15:57:52 niklas Exp $ */ - /* zlib.h -- interface of the 'zlib' general purpose compression library version 1.0.4, Jul 24th, 1996. diff --git a/sys/lib/libz/zutil.h b/sys/lib/libz/zutil.h index c6e379f2f85..07640b2551f 100644 --- a/sys/lib/libz/zutil.h +++ b/sys/lib/libz/zutil.h @@ -1,4 +1,3 @@ -/* $OpenBSD: zutil.h,v 1.4 1997/11/07 15:57:53 niklas Exp $ */ /* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-1996 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h @@ -9,6 +8,7 @@ subject to change. Applications should only use zlib.h. */ +/* $Id: zutil.h,v 1.5 1998/09/08 03:32:05 millert Exp $ */ #ifndef _Z_UTIL_H #define _Z_UTIL_H @@ -21,14 +21,10 @@ #else extern int errno; #endif -#ifdef _STANDALONE -#include <stand.h> -#else #ifdef STDC # include <string.h> # include <stdlib.h> #endif -#endif #ifndef local # define local static @@ -172,7 +168,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* Diagnostic functions */ -#ifdef DEBUG_ZLIB +#ifdef DEBUG # include <stdio.h> # ifndef verbose # define verbose 0 |