From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Marcelo Tosatti <marcelo@hera.kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.21 zlib merge #1 turboc
Date: Sat, 14 Jun 2003 15:47:08 +0200 [thread overview]
Message-ID: <20030614134708.GD15099@wohnheim.fh-wedel.de> (raw)
Hi Marcelo!
This patchset hat already made it into Linus' tree. It merges the
interesting bits from zlib 1.1.4 into the kernel zlib, which is based
on 1.1.3.
Remove Turbo C workaround and fix modulo operation.
Jörn
--
If you're willing to restrict the flexibility of your approach,
you can almost always do something better.
-- John Carmack
--- linux-2.4.20/lib/zlib_inflate/infcodes.c~zlib_merge_turboc 2002-11-29 00:53:15.000000000 +0100
+++ linux-2.4.20/lib/zlib_inflate/infcodes.c 2003-06-10 16:59:38.000000000 +0200
@@ -146,15 +146,9 @@
DUMPBITS(j)
c->mode = COPY;
case COPY: /* o: copying bytes in window, waiting for space */
-#ifndef __TURBOC__ /* Turbo C bug for following expression */
- f = (uInt)(q - s->window) < c->sub.copy.dist ?
- s->end - (c->sub.copy.dist - (q - s->window)) :
- q - c->sub.copy.dist;
-#else
f = q - c->sub.copy.dist;
- if ((uInt)(q - s->window) < c->sub.copy.dist)
- f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
-#endif
+ while (f < s->window) /* modulo window size-"while" instead */
+ f += s->end - s->window; /* of "if" handles invalid distances */
while (c->len)
{
NEEDOUT
next reply other threads:[~2003-06-14 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-14 13:47 Jörn Engel [this message]
2003-06-14 13:48 ` [PATCH] 2.4.21 zlib merge #2 return Jörn Engel
2003-06-14 13:49 ` [PATCH] 2.4.21 zlib merge #3 inffast Jörn Engel
2003-06-14 13:50 ` [PATCH] 2.4.21 zlib merge #4 windowBits Jörn Engel
2003-06-14 13:51 ` [PATCH] 2.4.21 zlib changes #1 memlevel Jörn Engel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030614134708.GD15099@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@hera.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®