aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2001-10-25 00:53:48 +0000
committerMiles Bader2001-10-25 00:53:48 +0000
commitf2f0a644239bfac134e4e3f05b47dc7fd120e073 (patch)
treedfa086bc2039759d53b4b0a828dff398fe3c1d5f
parentf6608d5cc84488f9a2717b71fa5d6dc0f7c442d5 (diff)
downloademacs-f2f0a644239bfac134e4e3f05b47dc7fd120e073.tar.gz
emacs-f2f0a644239bfac134e4e3f05b47dc7fd120e073.zip
(png_load): Make sure SPECIFIED_BG is a string.
(png_load): BG is a pointer to a structure, not a structure. (gif_format, png_format): Add missing commas.
-rw-r--r--src/xfns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xfns.c b/src/xfns.c
index ebe63d1edd9..9773344c898 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -8615,7 +8615,7 @@ static struct image_keyword png_format[PNG_LAST] =
8615 {":relief", IMAGE_INTEGER_VALUE, 0}, 8615 {":relief", IMAGE_INTEGER_VALUE, 0},
8616 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 8616 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8617 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 8617 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8618 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 8618 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8619 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 8619 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
8620}; 8620};
8621 8621
@@ -8891,11 +8891,11 @@ png_load (f, img)
8891 Lisp_Object specified_bg 8891 Lisp_Object specified_bg
8892 = image_spec_value (img->spec, QCbackground, NULL); 8892 = image_spec_value (img->spec, QCbackground, NULL);
8893 8893
8894 if (! NILP (specified_bg)) 8894 if (STRINGP (specified_bg))
8895 /* The user specified `:background', use that. */ 8895 /* The user specified `:background', use that. */
8896 { 8896 {
8897 XColor color; 8897 XColor color;
8898 if (x_defined_color (f, specified_bg, &color, 0)) 8898 if (x_defined_color (f, XSTRING (specified_bg)->data, &color, 0))
8899 { 8899 {
8900 png_color_16 user_bg; 8900 png_color_16 user_bg;
8901 8901
@@ -9031,7 +9031,7 @@ png_load (f, img)
9031 png_color_16 *bg; 9031 png_color_16 *bg;
9032 if (png_get_bKGD (png_ptr, info_ptr, &bg)) 9032 if (png_get_bKGD (png_ptr, info_ptr, &bg))
9033 { 9033 {
9034 img->background = lookup_rgb_color (f, bg.red, bg.green, bg.blue); 9034 img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue);
9035 img->background_valid = 1; 9035 img->background_valid = 1;
9036 } 9036 }
9037 } 9037 }
@@ -9854,7 +9854,7 @@ static struct image_keyword gif_format[GIF_LAST] =
9854 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 9854 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
9855 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 9855 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
9856 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 9856 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
9857 {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} 9857 {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0},
9858 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 9858 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
9859}; 9859};
9860 9860