2893N/APatch origin: in-house
2893N/APatch status: inffast.c part: submitted back to community without feedback
2893N/APatch status: deflate.c part: Solaris-specific; not suitable for upstream
2893N/A
2893N/A--- zlib-1.2.8/zlib.h 2013-04-28 17:23:49.000000000 -0700
2893N/A+++ zlib-1.2.8/zlib.h 2014-04-18 05:32:31.316290241 -0700
881N/A@@ -37,8 +37,8 @@
881N/A extern "C" {
881N/A #endif
881N/A
2893N/A-#define ZLIB_VERSION "1.2.8"
2893N/A-#define ZLIB_VERNUM 0x1280
2893N/A+#define ZLIB_VERSION "1.2.8-T4mods"
2893N/A+#define ZLIB_VERNUM 0x128f
2893N/A #define ZLIB_VER_MAJOR 1
2893N/A #define ZLIB_VER_MINOR 2
2893N/A #define ZLIB_VER_REVISION 8
2893N/A--- zlib-1.2.8/inffast.c 2013-03-24 22:47:59.000000000 -0700
2893N/A+++ zlib-1.2.8/inffast.c 2014-02-28 01:57:57.075708259 -0800
881N/A@@ -87,7 +87,7 @@
881N/A code const FAR *dcode; /* local strm->distcode */
881N/A unsigned lmask; /* mask for first level of length codes */
881N/A unsigned dmask; /* mask for first level of distance codes */
2893N/A- code here; /* retrieved table entry */
2893N/A+ code *here; /* retrieved table entry */
881N/A unsigned op; /* code bits, operation, extra bits, or */
881N/A /* window position, window bytes to copy */
881N/A unsigned len; /* match length, unused bytes */
881N/A@@ -124,20 +124,20 @@
881N/A hold += (unsigned long)(PUP(in)) << bits;
881N/A bits += 8;
881N/A }
2893N/A- here = lcode[hold & lmask];
2893N/A+ here = (code *)(&(lcode[hold & lmask]));
881N/A dolen:
2893N/A- op = (unsigned)(here.bits);
2893N/A+ op = (unsigned)(here->bits);
881N/A hold >>= op;
881N/A bits -= op;
2893N/A- op = (unsigned)(here.op);
2893N/A+ op = (unsigned)(here->op);
881N/A if (op == 0) { /* literal */
2893N/A- Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
2893N/A+ Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
881N/A "inflate: literal '%c'\n" :
2893N/A- "inflate: literal 0x%02x\n", here.val));
2893N/A- PUP(out) = (unsigned char)(here.val);
2893N/A+ "inflate: literal 0x%02x\n", here->val));
2893N/A+ PUP(out) = (unsigned char)(here->val);
881N/A }
881N/A else if (op & 16) { /* length base */
2893N/A- len = (unsigned)(here.val);
2893N/A+ len = (unsigned)(here->val);
881N/A op &= 15; /* number of extra bits */
881N/A if (op) {
881N/A if (bits < op) {
881N/A@@ -155,14 +155,14 @@
881N/A hold += (unsigned long)(PUP(in)) << bits;
881N/A bits += 8;
881N/A }
2893N/A- here = dcode[hold & dmask];
2893N/A+ here = (code *)(&(dcode[hold & dmask]));
881N/A dodist:
2893N/A- op = (unsigned)(here.bits);
2893N/A+ op = (unsigned)(here->bits);
881N/A hold >>= op;
881N/A bits -= op;
2893N/A- op = (unsigned)(here.op);
2893N/A+ op = (unsigned)(here->op);
881N/A if (op & 16) { /* distance base */
2893N/A- dist = (unsigned)(here.val);
2893N/A+ dist = (unsigned)(here->val);
881N/A op &= 15; /* number of extra bits */
881N/A if (bits < op) {
881N/A hold += (unsigned long)(PUP(in)) << bits;
2893N/A@@ -281,7 +281,7 @@
881N/A }
881N/A }
881N/A else if ((op & 64) == 0) { /* 2nd level distance code */
2893N/A- here = dcode[here.val + (hold & ((1U << op) - 1))];
2893N/A+ here = (code *)(&(dcode[here->val + (hold & ((1U << op) - 1))]));
881N/A goto dodist;
881N/A }
881N/A else {
2893N/A@@ -291,7 +291,7 @@
881N/A }
881N/A }
881N/A else if ((op & 64) == 0) { /* 2nd level length code */
2893N/A- here = lcode[here.val + (hold & ((1U << op) - 1))];
2893N/A+ here = (code *)(&(lcode[here->val + (hold & ((1U << op) - 1))]));
881N/A goto dolen;
881N/A }
881N/A else if (op & 32) { /* end-of-block */
2893N/A--- zlib-1.2.8/deflate.c 2013-04-28 15:57:10.000000000 -0700
2893N/A+++ zlib-1.2.8/deflate.c 2014-02-28 02:32:02.517988885 -0800
2893N/A@@ -60,6 +60,7 @@
2893N/A copyright string in the executable of your product.
2893N/A */
2893N/A
2893N/A+#ifndef LONGEST_MATCH_ONLY
2893N/A /* ===========================================================================
2893N/A * Function prototypes.
2893N/A */
2893N/A@@ -89,13 +90,18 @@
881N/A void match_init OF((void)); /* asm code initialization */
881N/A uInt longest_match OF((deflate_state *s, IPos cur_match));
881N/A #else
881N/A+#ifdef ORIG_LONGEST_MATCH
881N/A local uInt longest_match OF((deflate_state *s, IPos cur_match));
881N/A+#else
881N/A+uInt longest_match OF((deflate_state *s, IPos cur_match));
2893N/A+#endif
2893N/A #endif
2893N/A
2893N/A #ifdef DEBUG
2893N/A local void check_match OF((deflate_state *s, IPos start, IPos match,
2893N/A int length));
2893N/A #endif
2893N/A+#endif /* ! LONGEST_MATCH_ONLY */
2893N/A
2893N/A /* ===========================================================================
2893N/A * Local data
2893N/A@@ -104,6 +110,7 @@
2893N/A #define NIL 0
2893N/A /* Tail of hash chains */
2893N/A
2893N/A+#ifndef LONGEST_MATCH_ONLY
2893N/A #ifndef TOO_FAR
2893N/A # define TOO_FAR 4096
2893N/A #endif
2893N/A@@ -1130,7 +1137,9 @@
881N/A #endif
881N/A #endif
881N/A }
2893N/A+#endif /* ! LONGEST_MATCH_ONLY */
881N/A
881N/A+#if defined(ORIG_LONGEST_MATCH) || defined(ORIG_LONGEST_MATCH_GLOBAL)
881N/A #ifndef FASTEST
881N/A /* ===========================================================================
881N/A * Set match_start to the longest match starting at the given string and
2893N/A@@ -1145,7 +1154,11 @@
881N/A /* For 80x86 and 680x0, an optimized version will be provided in match.asm or
881N/A * match.S. The code will be functionally equivalent.
881N/A */
881N/A+#ifdef ORIG_LONGEST_MATCH_GLOBAL
881N/A+uInt longest_match(s, cur_match)
881N/A+#else
881N/A local uInt longest_match(s, cur_match)
881N/A+#endif
881N/A deflate_state *s;
881N/A IPos cur_match; /* current match */
881N/A {
2893N/A@@ -1288,6 +1301,7 @@
2893N/A return s->lookahead;
881N/A }
881N/A #endif /* ASMV */
881N/A+#endif /* ORIG_LONGEST_MATCHT */
881N/A
2893N/A #else /* FASTEST */
2893N/A
2893N/A@@ -1349,6 +1363,7 @@
2893N/A
2893N/A #endif /* FASTEST */
2893N/A
2893N/A+#ifndef LONGEST_MATCH_ONLY
2893N/A #ifdef DEBUG
2893N/A /* ===========================================================================
2893N/A * Check that the match at match_start is indeed a match.
2893N/A@@ -1965,3 +1980,4 @@
2893N/A FLUSH_BLOCK(s, 0);
2893N/A return block_done;
2893N/A }
2893N/A+#endif /* ! LONGEST_MATCH_ONLY */