--- pgp/src/zinflate.c 2018/04/24 16:41:13 1.1.1.4 +++ pgp/src/zinflate.c 2018/04/24 16:45:42 1.1.1.6 @@ -133,6 +133,11 @@ #include "exitpgp.h" #define OF __ +#ifdef MACTC5 +#include "Macutil3.h" +void err(int c, char *msg); +#endif + #ifndef WSIZE # define WSIZE 8192 /* window size--must be a power of two, <= 32K, and equal to that of zip. @@ -142,11 +147,10 @@ #endif #ifdef DYN_ALLOC - extern char *window; + extern char *slide; #else - extern char window[]; + extern char slide[]; #endif -#define slide window /* Huffman code lookup table entry--this entry is four bytes for machines that have 16-bit pointers (e.g. PC's in the small or medium model). @@ -966,6 +970,9 @@ int inflate_entry() return r; if (hufts > h) h = hufts; +#ifdef MACTC5 + mac_poll_for_break(); +#endif } while (!e); @@ -987,18 +994,18 @@ int inflate() int status; #ifdef DYN_ALLOC - window = (char*) calloc((unsigned)WSIZE, 2*sizeof(char)); - /* Note that inflate only needs WSIZE bytes, but the window + slide = (char*) calloc((unsigned)WSIZE, 2*sizeof(char)); + /* Note that inflate only needs WSIZE bytes, but the slide * array is shared with deflate, which needs 2*WISZE bytes. */ - if (window==NULL) err(4, ""); + if (slide==NULL) err(4, ""); #endif status = inflate_entry(); #ifdef DYN_ALLOC - free(window); - window = NULL; + free(slide); + slide = NULL; #endif return status;