X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ebb51430cd8e4a9a11c6c5a5ca7c3ff9d7a72a..720e01c312b9a7ee493d649656bcc875eaf5acb6:/src/zlib/inftrees.c?ds=sidebyside diff --git a/src/zlib/inftrees.c b/src/zlib/inftrees.c index 04b2904d88..4388dd1a8b 100644 --- a/src/zlib/inftrees.c +++ b/src/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-1998 Mark Adler + * Copyright (C) 1995-2002 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -11,7 +11,7 @@ #endif const char inflate_copyright[] = - " inflate 1.1.2 Copyright 1995-1998 Mark Adler "; + " inflate 1.1.4 Copyright 1995-2002 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 @@ -24,6 +24,7 @@ struct internal_state {int dummy;}; /* for buggy compilers */ #define exop word.what.Exop #define bits word.what.Bits + local int huft_build OF(( uIntf *, /* code lengths in bits */ uInt, /* number of codes */ @@ -89,7 +90,7 @@ local const uInt cpdext[30] = { /* Extra bits for distance codes */ /* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ #define BMAX 15 /* maximum bit length of any code */ -#if defined(__VISAGECPP__) // Visual game can't handle this antiquated interface +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ local int huft_build(uIntf* b, uInt n, uInt s, const uIntf* d, const uIntf* e, inflate_huft* FAR *t, uIntf* m, inflate_huft* hp, uInt* hn, uIntf* v) #else @@ -104,12 +105,11 @@ uIntf *m; /* maximum lookup bits, returns actual */ inflate_huft *hp; /* space for trees */ uInt *hn; /* hufts used in space */ uIntf *v; /* working area: values in order of bit length */ +#endif /* Given a list of code lengths and a maximum table size, make a set of tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR if the given code set is incomplete (the tables are still built in this - case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of - lengths), or Z_MEM_ERROR if not enough memory. */ -#endif + case), or Z_DATA_ERROR if the input is invalid. */ { uInt a; /* counter for codes of length k */ @@ -235,7 +235,7 @@ uIntf *v; /* working area: values in order of bit length */ /* allocate new table */ if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ - return Z_MEM_ERROR; /* not enough memory */ + return Z_DATA_ERROR; /* overflow of MANY */ u[h] = q = hp + *hn; *hn += z; @@ -294,7 +294,7 @@ uIntf *v; /* working area: values in order of bit length */ return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; } -#if defined(__VISAGECPP__) // Visual game can't handle this antiquated interface +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ int inflate_trees_bits(uIntf* c, uIntf* bb, inflate_huft* FAR *tb, inflate_huft* hp, z_streamp z) #else int inflate_trees_bits(c, bb, tb, hp, z) @@ -324,7 +324,7 @@ z_streamp z; /* for messages */ return r; } -#if defined(__VISAGECPP__) // Visual game can't handle this antiquated interface +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ int inflate_trees_dynamic(uInt nl, uInt nd, uInt* c, uInt* bl, uInt *bd, inflate_huft* FAR *tl, inflate_huft* FAR *td, inflate_huft* hp, z_streamp z) #else @@ -405,7 +405,7 @@ local inflate_huft *fixed_td; #include "inffixed.h" #endif -#if defined(__VISAGECPP__) // Visual game can't handle this antiquated interface +#if defined(__VISAGECPP__) /* Visualage can't handle this antiquated interface */ int inflate_trees_fixed(uIntf* bl, uIntf *bd, inflate_huft* FAR *tl, inflate_huft* FAR *td, z_streamp z) #else