summaryrefslogtreecommitdiffstats
path: root/sys/sys/inflate.h
diff options
context:
space:
mode:
authorcsgr <csgr@FreeBSD.org>1994-10-07 23:18:18 +0000
committercsgr <csgr@FreeBSD.org>1994-10-07 23:18:18 +0000
commitb2767579ff2a641ef763f05e59921a91c276a75e (patch)
treec3677b4540865fc35fe4c1408c54eeb855503837 /sys/sys/inflate.h
parent20af18de708771b6ecca4b27236ff58e3f077395 (diff)
downloadFreeBSD-src-b2767579ff2a641ef763f05e59921a91c276a75e.zip
FreeBSD-src-b2767579ff2a641ef763f05e59921a91c276a75e.tar.gz
Make inflate() reentrant - no more global variables.
(The gzip image activator now needs a good code tidy up.)
Diffstat (limited to 'sys/sys/inflate.h')
-rw-r--r--sys/sys/inflate.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sys/inflate.h b/sys/sys/inflate.h
index 2415cdd..ce79c47 100644
--- a/sys/sys/inflate.h
+++ b/sys/sys/inflate.h
@@ -46,6 +46,12 @@
#include <vm/vm.h>
#include <vm/vm_kern.h>
+/* needed to make inflate() work */
+#define uch u_char
+#define ush u_short
+#define ulg u_long
+
+
#define WSIZE 0x8000
struct gzip {
@@ -68,10 +74,17 @@ struct gzip {
* This structure is used in order to make inflate() reentrant.
*/
struct gz_global {
- int foo;
+ ulg bb; /* bit buffer */
+ unsigned bk; /* bits in bit buffer */
+ unsigned hufts; /* track memory usage */
+ struct huft *fixed_tl; /* must init to NULL !! */
+ struct huft *fixed_td;
+ int fixed_bl;
+ int fixed_bd;
};
int inflate __P((struct gzip *, struct gz_global *));
+int do_aout_hdr __P((struct gzip *));
#define slide (gz->gz_slide)
#define wp (gz->gz_wp)
OpenPOWER on IntegriCloud