changeset 1411:9d77c73d4103

[xemacs-hg @ 2003-04-14 04:11:55 by youngs] 2003-04-14 Steve Youngs <youngs@xemacs.org> * glyphs.c: * glyphs.c (nothing_instantiate): * glyphs.c (Fmake_glyph_internal): * glyphs.c (Fglyphp): * glyphs.c (glyph_image_instance): * glyphs.c (glyph_image_instance_maybe): * glyphs.c (glyph_width): Work around a problem compiling with --use-union-type using Intel's ICC compiler. From Martin Buchholz <martin@xemacs.org> See <http://list-archive.xemacs.org/xemacs-patches/200301/msg00132.html>
author youngs
date Mon, 14 Apr 2003 04:11:57 +0000
parents 44de306310b8
children 583b76a7eb90
files src/ChangeLog src/glyphs.c
diffstat 2 files changed, 46 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Apr 14 03:40:27 2003 +0000
+++ b/src/ChangeLog	Mon Apr 14 04:11:57 2003 +0000
@@ -1,3 +1,18 @@
+2003-04-14  Steve Youngs  <youngs@xemacs.org>
+
+	* glyphs.c:
+	* glyphs.c (nothing_instantiate):
+	* glyphs.c (Fmake_glyph_internal):
+	* glyphs.c (Fglyphp):
+	* glyphs.c (glyph_image_instance):
+	* glyphs.c (glyph_image_instance_maybe):
+	* glyphs.c (glyph_width):
+	Work around a problem compiling with --use-union-type using
+	Intel's ICC compiler.
+	From Martin Buchholz <martin@xemacs.org>
+	See
+	<http://list-archive.xemacs.org/xemacs-patches/200301/msg00132.html> 
+
 2003-04-08  Mike Sperber  <mike@xemacs.org>
 
 	* Makefile.in.in ($(BLDSRC)/NEEDTODUMP): Depends on $(RAW_EXE).
--- a/src/glyphs.c	Mon Apr 14 03:40:27 2003 +0000
+++ b/src/glyphs.c	Mon Apr 14 04:11:57 2003 +0000
@@ -2327,8 +2327,18 @@
   Lisp_Object string = find_keyword_in_vector (instantiator, Q_data);
   Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 
+  assert (!NILP (string));
+
   /* Should never get here with a domain other than a window. */
-  assert (!NILP (string) && WINDOWP (DOMAIN_WINDOW (domain)));
+#ifndef NDEBUG
+  /* Work Around for an Intel Compiler 7.0 internal error */
+  /* assert (WINDOWP (DOMAIN_WINDOW (domain))); internal error: 0_5086 */
+  {
+    Lisp_Object w = DOMAIN_WINDOW (domain);
+    assert (WINDOWP (w));
+  }
+#endif
+
   if (dest_mask & IMAGE_TEXT_MASK)
     {
       IMAGE_INSTANCE_TYPE (ii) = IMAGE_TEXT;
@@ -3957,6 +3967,22 @@
   return instance;
 }
 
+inline static int
+image_instance_needs_layout (Lisp_Object instance)
+{
+  Lisp_Image_Instance *ii = XIMAGE_INSTANCE (instance);
+
+  if (IMAGE_INSTANCE_DIRTYP (ii) && IMAGE_INSTANCE_LAYOUT_CHANGED (ii))
+    {
+      return 1;
+    }
+  else
+    {
+      Lisp_Object iif = IMAGE_INSTANCE_FRAME (ii);
+      return FRAMEP (iif) && XFRAME (iif)->size_changed;
+    }
+}
+
 /*****************************************************************************
  glyph_width
 
@@ -3972,7 +3998,7 @@
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
-  if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
+  if (image_instance_needs_layout (instance))
     image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNCHANGED_GEOMETRY,
@@ -4002,7 +4028,7 @@
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
-  if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
+  if (image_instance_needs_layout (instance))
     image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNCHANGED_GEOMETRY,
@@ -4022,7 +4048,7 @@
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
-  if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
+  if (image_instance_needs_layout (instance))
     image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNCHANGED_GEOMETRY,
@@ -4044,7 +4070,7 @@
   if (!IMAGE_INSTANCEP (instance))
     return 0;
 
-  if (XIMAGE_INSTANCE_NEEDS_LAYOUT (instance))
+  if (image_instance_needs_layout (instance))
     image_instance_layout (instance, IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNSPECIFIED_GEOMETRY,
 			   IMAGE_UNCHANGED_GEOMETRY,