[PATCH 21.4] Misc. cygwin fixes

Dr. Volker Zell Dr.Volker.Zell at oracle.com
Tue Dec 11 14:53:44 EST 2007


diff -urN origsrc/xemacs-21.4.21/src/ChangeLog src/xemacs-21.4.21/src/ChangeLog
--- origsrc/xemacs-21.4.21/src/ChangeLog	2007-10-08 03:21:29.000000000 +0200
+++ src/xemacs-21.4.21/src/ChangeLog	2007-12-04 23:37:14.974385600 +0100
@@ -1,3 +1,11 @@
+2007-11-29  Dr. Volker Zell  <Dr.Volker.Zell at oracle.com>
+
+	* redisplay-msw.c (mswindows_text_width_single_run): #ifndef assertion
+	to fix a crash under Cygwin (Windows variant) when paging in Info buffer.
+
+	* sysdir.h: Revert workaround missing d_ino field from 'struct dirent'
+	for Cygwin as it's back in again.
+
 2007-10-07  Vin Shelton  <acs at xemacs.org>
 
 	* XEmacs 21.4.21 is released
diff -urN origsrc/xemacs-21.4.21/src/redisplay-msw.c src/xemacs-21.4.21/src/redisplay-msw.c
--- origsrc/xemacs-21.4.21/src/redisplay-msw.c	2006-07-04 15:14:14.000000000 +0200
+++ src/xemacs-21.4.21/src/redisplay-msw.c	2007-12-04 23:37:14.984400000 +0100
@@ -191,8 +191,15 @@
   if (!fi->proportional_p || !hdc)
     return (fi->width * run->len);
   else
-    {
+  {
+/* The 21.4.19 version of XEmacs doesn't has the Unicode support necessary to display 
+   anything but ISO 8859-1 on Windows.
+   So commenting out the following assertion doesn't fix the problem but
+   it does prevent a crash when XEmacs tries to display Han characters
+*/ 
+#ifndef __CYGWIN__      
       assert(run->dimension == 1);	/* #### FIXME! */
+#endif      
       mswindows_set_dc_font (hdc, font_inst,
 			     cachel->underline, cachel->strikethru);
       GetTextExtentPoint32 (hdc, run->ptr, run->len, &size);
@@ -560,7 +567,9 @@
 	  }
 	}
 
+#ifndef __CYGWIN__      
       assert (runs[i].dimension == 1);	/* #### FIXME: Broken when Mule? */
+#endif      
       ExtTextOut (hdc, xpos, dl->ypos,
 		  NILP(bg_pmap) ? ETO_CLIPPED | ETO_OPAQUE : ETO_CLIPPED,
 		  &rect, (char *) runs[i].ptr, runs[i].len, NULL); 
diff -urN origsrc/xemacs-21.4.21/src/sysdir.h src/xemacs-21.4.21/src/sysdir.h
--- origsrc/xemacs-21.4.21/src/sysdir.h	2006-01-24 03:54:45.000000000 +0100
+++ src/xemacs-21.4.21/src/sysdir.h	2007-12-04 23:37:15.004428800 +0100
@@ -59,11 +59,7 @@
    Since applying strlen to the name always works, we'll just do that.  */
 #define NAMLEN(p) strlen (p->d_name)
 
-#ifdef __CYGWIN__
-# define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != '\0')
-#else
 # define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
-#endif
 
 /* encapsulation: directory calls */
 

 Ciao
   Volker
 



More information about the XEmacs-Patches mailing list