comparison src/image.c @ 69958:609c61a0071d

[MAC_OS] (xpm_load_image): Add parentheses around assignment used as truth value. Add explicit braces to avoid ambiguous `else'. [MAC_OS] (gif_load): Remove unused variable `gcpro1'.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 12 Apr 2006 08:05:52 +0000
parents fd6d18b61fa7
children 2c4ba2c48153 c156f6a9e7b5
comparison
equal deleted inserted replaced
69957:0a13b0324d7a 69958:609c61a0071d
4377 { 4377 {
4378 color = strtok (NULL, " \t"); 4378 color = strtok (NULL, " \t");
4379 if (color == NULL) 4379 if (color == NULL)
4380 goto failure; 4380 goto failure;
4381 4381
4382 while (str = strtok (NULL, " \t")) 4382 while ((str = strtok (NULL, " \t")) != NULL)
4383 { 4383 {
4384 next_key = xpm_str_to_color_key (str); 4384 next_key = xpm_str_to_color_key (str);
4385 if (next_key >= 0) 4385 if (next_key >= 0)
4386 break; 4386 break;
4387 color[strlen (color)] = ' '; 4387 color[strlen (color)] = ' ';
4405 if (!NILP (color_symbols) && !NILP (symbol_color)) 4405 if (!NILP (color_symbols) && !NILP (symbol_color))
4406 { 4406 {
4407 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols); 4407 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols);
4408 4408
4409 if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) 4409 if (CONSP (specified_color) && STRINGP (XCDR (specified_color)))
4410 if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0) 4410 {
4411 color_val = Qt; 4411 if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0)
4412 else if (x_defined_color (f, SDATA (XCDR (specified_color)), 4412 color_val = Qt;
4413 &cdef, 0)) 4413 else if (x_defined_color (f, SDATA (XCDR (specified_color)),
4414 color_val = make_number (cdef.pixel); 4414 &cdef, 0))
4415 color_val = make_number (cdef.pixel);
4416 }
4415 } 4417 }
4416 if (NILP (color_val) && max_key > 0) 4418 if (NILP (color_val) && max_key > 0)
4417 if (xstricmp (max_color, "None") == 0) 4419 {
4418 color_val = Qt; 4420 if (xstricmp (max_color, "None") == 0)
4419 else if (x_defined_color (f, max_color, &cdef, 0)) 4421 color_val = Qt;
4420 color_val = make_number (cdef.pixel); 4422 else if (x_defined_color (f, max_color, &cdef, 0))
4423 color_val = make_number (cdef.pixel);
4424 }
4421 if (!NILP (color_val)) 4425 if (!NILP (color_val))
4422 (*put_color_table) (color_table, beg, chars_per_pixel, color_val); 4426 (*put_color_table) (color_table, beg, chars_per_pixel, color_val);
4423 4427
4424 expect (','); 4428 expect (',');
4425 } 4429 }
7844 XColor color; 7848 XColor color;
7845 RGBColor bg_color; 7849 RGBColor bg_color;
7846 int width, height; 7850 int width, height;
7847 XImagePtr ximg; 7851 XImagePtr ximg;
7848 TimeValue time; 7852 TimeValue time;
7849 struct gcpro gcpro1;
7850 int ino; 7853 int ino;
7851 CGrafPtr old_port; 7854 CGrafPtr old_port;
7852 GDHandle old_gdh; 7855 GDHandle old_gdh;
7853 7856
7854 specified_file = image_spec_value (img->spec, QCfile, NULL); 7857 specified_file = image_spec_value (img->spec, QCfile, NULL);