diff -c ../glkzip-0.1-orig/Makefile ./Makefile
*** ../glkzip-0.1-orig/Makefile Fri Jun 18 04:24:53 1999
--- ./Makefile  Mon Oct 30 12:13:12 2000
***************
*** 89,95 ****
 CFLAGS = -g $(SYSTEMFLAGS) $(GLKINCLUDE)
 LDFLAGS = -g
 #LIBS = -L$(XLIB) -lX11 $(SYSTEMLIBS)
! LIBS = $(LINKLIBS) $(GLKLIBDIR) $(GLKLIB)

 INC = ztypes.h
 OBJS = zip.o control.o extern.o fileio.o input.o interpre.o math.o memory.o \
--- 89,95 ----
 CFLAGS = -g $(SYSTEMFLAGS) $(GLKINCLUDE)
 LDFLAGS = -g
 #LIBS = -L$(XLIB) -lX11 $(SYSTEMLIBS)
! LIBS = $(GLKLIBDIR) $(GLKLIB) $(LINKLIBS)

 INC = ztypes.h
 OBJS = zip.o control.o extern.o fileio.o input.o interpre.o math.o memory.o \
diff -c ../glkzip-0.1-orig/README ./README
*** ../glkzip-0.1-orig/README   Fri Jun 18 04:25:08 1999
--- ./README    Mon Oct 30 12:27:30 2000
***************
*** 8,10 ****
--- 8,34 ----
 or -DAUTO_END_MODE.  Also, uncomment the definitions for one of the
 given Glk libraries, and replace the definition of GLKDIR with the
 correct directory.
+
+ Patch update: glkzip.patch - D.J. Picton ([email protected])
+ ---------------------------------------------------------------
+
+ This patch updates the following files to incorporate enhancements and
+ bugfixes from XZIP Version 1.8.2.
+
+ text.c: fix a bug affecting the printing of newline characters
+ math.c: fix a bug affecting logical shifts of negative numbers
+ control.c: declare full Z-code 0.1 compliance
+ property.c: add support for 64-byte-long properties as in Z-code 0.1 spec.
+
+ The following file has been updated to reflect changes in the GLK spec:
+
+ glkio.c: call glk_gestalt_ext with the correct number of arguments.
+
+ The following bugfixes have also been made in glkio.c:
+
+ glkio.c: The status window is enlarged as necessary when an attempt is made to
+ write below the bottom line (this happens with some versions of the help
+ menu software e.g. in bear.z5, where the size of the status window is not
+ set large enough).
+
+ Makefile: Minor change to LIBS setting for Solaris compilations.
diff -c ../glkzip-0.1-orig/control.c ./control.c
*** ../glkzip-0.1-orig/control.c        Thu Apr 22 08:22:02 1999
--- ./control.c Mon Oct 23 10:49:17 2000
***************
*** 266,271 ****
--- 266,275 ----
     if (scripton_flag)
         set_word (H_FLAGS, (get_word (H_FLAGS) | SCRIPTING_FLAG));

+     /* Declare strict Z-code 0.1 compliance */
+       set_byte (0x32, 0x01);
+       set_byte (0x33, 0x00);
+
     set_byte (H_INTERPRETER, h_interpreter);
     set_byte (H_INTERPRETER_VERSION, h_interpreter_version);
     set_byte (H_SCREEN_ROWS, screen_rows); /* Screen dimension in characters */
diff -c ../glkzip-0.1-orig/glkio.c ./glkio.c
*** ../glkzip-0.1-orig/glkio.c  Thu Jun 17 04:20:59 1999
--- ./glkio.c   Mon Oct 30 11:14:36 2000
***************
*** 45,50 ****
--- 45,58 ----
     if (ch == '\n')
       return;
   }
+
+   /* added - DJP */
+   if (curr_win == status_win) {
+     if(status_y > mach_status_ht) {
+        mach_status_ht = status_y;
+        reset_status_ht();
+     }
+   }
   glk_put_char(ch);
   if (curr_win == status_win) {
     if (ch == '\n') {
***************
*** 53,59 ****
     }
     else {
       glui32 len;
!       glk_gestalt_ext(gestalt_CharOutput, ch, &len);
       while (len > 0) {
         status_x++;
         if (status_x > screen_cols) {
--- 61,67 ----
     }
     else {
       glui32 len;
!       glk_gestalt_ext(gestalt_CharOutput, ch, &len, 1);
       while (len > 0) {
         status_x++;
         if (status_x > screen_cols) {
Only in .: glkzip.patch
diff -c ../glkzip-0.1-orig/math.c ./math.c
*** ../glkzip-0.1-orig/math.c   Thu Apr 22 08:20:17 1999
--- ./math.c    Mon Oct 23 16:22:11 2000
***************
*** 5,10 ****
--- 5,12 ----
  *
  */

+ /* Updated - from xzip 1.82 */
+
 #include "ztypes.h"

 /*
***************
*** 168,180 ****
 #endif
 {

!     if ((short) b > 0)
         store_operand (a << (short) b);
     else
!         if ((short) a > 0)
             store_operand (a >> abs ((short) b));
         else
!             store_operand (~((~a) >> abs ((short) b)));

 }/* arith_shift */

--- 170,182 ----
 #endif
 {

!     if ((short) b >= 0)
         store_operand (a << (short) b);
     else
!         if ((short) a >= 0)
             store_operand (a >> abs ((short) b));
         else
!             store_operand (~(((~a) & 0xFFFF) >> abs ((short) b)));

 }/* arith_shift */

diff -c ../glkzip-0.1-orig/property.c ./property.c
*** ../glkzip-0.1-orig/property.c       Thu Apr 22 08:20:18 1999
--- ./property.c        Mon Oct 30 11:53:54 2000
***************
*** 65,72 ****

     if (h_type < V4)
         value = (zbyte_t) ((value & property_size_mask) >> 5);
!     else if (value & 0x80)
         value = get_byte (propp) & (zbyte_t) property_size_mask;
     else if (value & 0x40)
         value = 1;
     else
--- 65,75 ----

     if (h_type < V4)
         value = (zbyte_t) ((value & property_size_mask) >> 5);
!     else if (value & 0x80) {
         value = get_byte (propp) & (zbyte_t) property_size_mask;
+         if (value == 0)
+           value = 64;
+     }
     else if (value & 0x40)
         value = 1;
     else
***************
*** 324,334 ****
         /* Property length is in high bits of property id */

         store_operand (((get_byte (propp) & property_size_mask ) >> 5) + 1);
!     else if (get_byte (propp) & 0x80)

         /* Property length is in property id */
!
!         store_operand (get_byte (propp) & property_size_mask);
     else

         /* Word sized property if bit 6 set, else byte sized property */
--- 327,340 ----
         /* Property length is in high bits of property id */

         store_operand (((get_byte (propp) & property_size_mask ) >> 5) + 1);
!     else if (get_byte (propp) & 0x80) {

         /* Property length is in property id */
!         int val = get_byte (propp) & property_size_mask;
!         if (val == 0)
!           val = 64;
!         store_operand (val);
!     }
     else

         /* Word sized property if bit 6 set, else byte sized property */
diff -c ../glkzip-0.1-orig/text.c ./text.c
*** ../glkzip-0.1-orig/text.c   Thu Apr 22 08:22:03 1999
--- ./text.c    Mon Oct 23 16:22:13 2000
***************
*** 5,10 ****
--- 5,12 ----
  *
  */

+ /* Updated - from xzip 1.82 */
+
 #include "ztypes.h"

 static int saved_formatting = ON;
***************
*** 431,437 ****
     }
     else if (c == 13) {

!       write_char ('\r');

     }
     else {
--- 433,440 ----
     }
     else if (c == 13) {

!         /* write_char ('\r'); */
!         new_line ();

     }
     else {
***************
*** 534,539 ****
--- 537,545 ----

         /* No formatting or output redirection, so just output the character */

+         if (c == 13)
+           c = '\n';
+
         script_char (c);

         output_char (c);