diff src/image.c @ 90384:c156f6a9e7b5

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-56 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 204-225) - Update from CVS - Sync from erc--emacs--0 - Merge from gnus--rel--5.10 - Improve tq.el. - Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6. * gnus--rel--5.10 (patch 81-85) - Update from CVS - Merge from emacs--devo--0
author Miles Bader <miles@gnu.org>
date Mon, 17 Apr 2006 08:41:12 +0000
parents 65ca8fb66a0d 609c61a0071d
children 72dea2ff0142
line wrap: on
line diff
--- a/src/image.c	Sun Apr 09 01:43:22 2006 +0000
+++ b/src/image.c	Mon Apr 17 08:41:12 2006 +0000
@@ -4379,7 +4379,7 @@
 	  if (color == NULL)
 	    goto failure;
 
-	  while (str = strtok (NULL, " \t"))
+	  while ((str = strtok (NULL, " \t")) != NULL)
 	    {
 	      next_key = xpm_str_to_color_key (str);
 	      if (next_key >= 0)
@@ -4407,17 +4407,21 @@
 	  Lisp_Object specified_color = Fassoc (symbol_color, color_symbols);
 
 	  if (CONSP (specified_color) && STRINGP (XCDR (specified_color)))
-	    if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0)
-	      color_val = Qt;
-	    else if (x_defined_color (f, SDATA (XCDR (specified_color)),
-				      &cdef, 0))
-	      color_val = make_number (cdef.pixel);
+	    {
+	      if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0)
+		color_val = Qt;
+	      else if (x_defined_color (f, SDATA (XCDR (specified_color)),
+					&cdef, 0))
+		color_val = make_number (cdef.pixel);
+	    }
 	}
       if (NILP (color_val) && max_key > 0)
-	if (xstricmp (max_color, "None") == 0)
-	  color_val = Qt;
-	else if (x_defined_color (f, max_color, &cdef, 0))
-	  color_val = make_number (cdef.pixel);
+	{
+	  if (xstricmp (max_color, "None") == 0)
+	    color_val = Qt;
+	  else if (x_defined_color (f, max_color, &cdef, 0))
+	    color_val = make_number (cdef.pixel);
+	}
       if (!NILP (color_val))
 	(*put_color_table) (color_table, beg, chars_per_pixel, color_val);
 
@@ -7846,7 +7850,6 @@
   int width, height;
   XImagePtr ximg;
   TimeValue time;
-  struct gcpro gcpro1;
   int ino;
   CGrafPtr old_port;
   GDHandle old_gdh;