From a76a6add6dab80d57ade7dc709fa2fd8215b10e8 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Wed, 2 Apr 1997 06:29:38 +0000 Subject: save 4k space for i386! --- sys/lib/libz/inftrees.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/lib/libz/inftrees.c b/sys/lib/libz/inftrees.c index 39a9dd400d2..b53c08f1629 100644 --- a/sys/lib/libz/inftrees.c +++ b/sys/lib/libz/inftrees.c @@ -6,7 +6,10 @@ #include "zutil.h" #include "inftrees.h" +#ifndef i386 char inflate_copyright[] = " inflate 1.0.4 Copyright 1995-1996 Mark Adler "; +#endif + /* 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 @@ -372,11 +375,19 @@ z_streamp z; /* for zfree function */ /* build fixed tables only once--keep them here */ local int fixed_built = 0; #define FIXEDH 530 /* number of hufts used by fixed tables */ +#ifndef i386 local inflate_huft fixed_mem[FIXEDH]; local uInt fixed_bl; local uInt fixed_bd; local inflate_huft *fixed_tl; local inflate_huft *fixed_td; +#else +local inflate_huft *fixed_mem = NULL; +local uInt fixed_bl = 0; +local uInt fixed_bd = 0; +local inflate_huft *fixed_tl = NULL; +local inflate_huft *fixed_td = NULL; +#endif local voidpf falloc(q, n, s) @@ -384,6 +395,11 @@ voidpf q; /* opaque pointer */ uInt n; /* number of items */ uInt s; /* size of item */ { +#ifdef i386 + extern void *alloc(u_int); + if (fixed_mem == NULL) + fixed_mem = alloc (FIXEDH * sizeof(*fixed_mem)); +#endif Assert(s == sizeof(inflate_huft) && n <= *(intf *)q, "inflate_trees falloc overflow"); *(intf *)q -= n+s-s; /* s-s to avoid warning */ -- cgit v1.2.3