aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-11 00:20:11 -0800
committerPaul Eggert2011-03-11 00:20:11 -0800
commit6ae141d682670b1d21abd86fd530cca016f73985 (patch)
treef0b5527191100f3c934db9ce9beb9e15e0c89302 /src
parent2037898d7ada760ef84df072d05addf826710f65 (diff)
downloademacs-6ae141d682670b1d21abd86fd530cca016f73985.tar.gz
emacs-6ae141d682670b1d21abd86fd530cca016f73985.zip
* image.c: (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
(jpeg_load, gif_load): Rename locals to avoid shadowing.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/image.c36
2 files changed, 20 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7170fcc162a..c99d3626e05 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -6,6 +6,8 @@
6 (x_edge_detection): Remove unnecessary cast that 6 (x_edge_detection): Remove unnecessary cast that
7 gcc -Wbad-function-cast diagnoses. 7 gcc -Wbad-function-cast diagnoses.
8 (gif_load): Fix pointer signedness. 8 (gif_load): Fix pointer signedness.
9 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
10 (jpeg_load, gif_load): Rename locals to avoid shadowing.
9 11
102011-03-11 Paul Eggert <eggert@cs.ucla.edu> 122011-03-11 Paul Eggert <eggert@cs.ucla.edu>
11 13
diff --git a/src/image.c b/src/image.c
index 383e154b265..1f2a4609536 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1557,9 +1557,9 @@ clear_image_cache (struct frame *f, Lisp_Object filter)
1557 1557
1558 FOR_EACH_FRAME (tail, frame) 1558 FOR_EACH_FRAME (tail, frame)
1559 { 1559 {
1560 struct frame *f = XFRAME (frame); 1560 struct frame *fr = XFRAME (frame);
1561 if (FRAME_IMAGE_CACHE (f) == c) 1561 if (FRAME_IMAGE_CACHE (fr) == c)
1562 clear_current_matrices (f); 1562 clear_current_matrices (fr);
1563 } 1563 }
1564 1564
1565 ++windows_or_buffers_changed; 1565 ++windows_or_buffers_changed;
@@ -2651,11 +2651,11 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e
2651 2651
2652 if (LA1 == XBM_TK_NUMBER) 2652 if (LA1 == XBM_TK_NUMBER)
2653 { 2653 {
2654 char *p = strrchr (buffer, '_'); 2654 char *q = strrchr (buffer, '_');
2655 p = p ? p + 1 : buffer; 2655 q = q ? q + 1 : buffer;
2656 if (strcmp (p, "width") == 0) 2656 if (strcmp (q, "width") == 0)
2657 *width = value; 2657 *width = value;
2658 else if (strcmp (p, "height") == 0) 2658 else if (strcmp (q, "height") == 0)
2659 *height = value; 2659 *height = value;
2660 } 2660 }
2661 expect (XBM_TK_NUMBER); 2661 expect (XBM_TK_NUMBER);
@@ -4604,14 +4604,14 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus
4604 4604
4605 for (x = 1; x < img->width - 1; ++x, ++p) 4605 for (x = 1; x < img->width - 1; ++x, ++p)
4606 { 4606 {
4607 int r, g, b, y1, x1; 4607 int r, g, b, yy, xx;
4608 4608
4609 r = g = b = i = 0; 4609 r = g = b = i = 0;
4610 for (y1 = y - 1; y1 < y + 2; ++y1) 4610 for (yy = y - 1; yy < y + 2; ++yy)
4611 for (x1 = x - 1; x1 < x + 2; ++x1, ++i) 4611 for (xx = x - 1; xx < x + 2; ++xx, ++i)
4612 if (matrix[i]) 4612 if (matrix[i])
4613 { 4613 {
4614 XColor *t = COLOR (colors, x1, y1); 4614 XColor *t = COLOR (colors, xx, yy);
4615 r += matrix[i] * t->red; 4615 r += matrix[i] * t->red;
4616 g += matrix[i] * t->green; 4616 g += matrix[i] * t->green;
4617 b += matrix[i] * t->blue; 4617 b += matrix[i] * t->blue;
@@ -6364,10 +6364,10 @@ jpeg_load (struct frame *f, struct image *img)
6364 if (rc == 1) 6364 if (rc == 1)
6365 { 6365 {
6366 /* Called from my_error_exit. Display a JPEG error. */ 6366 /* Called from my_error_exit. Display a JPEG error. */
6367 char buffer[JMSG_LENGTH_MAX]; 6367 char buf[JMSG_LENGTH_MAX];
6368 cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); 6368 cinfo.err->format_message ((j_common_ptr) &cinfo, buf);
6369 image_error ("Error reading JPEG image `%s': %s", img->spec, 6369 image_error ("Error reading JPEG image `%s': %s", img->spec,
6370 build_string (buffer)); 6370 build_string (buf));
6371 } 6371 }
6372 6372
6373 /* Close the input file and destroy the JPEG object. */ 6373 /* Close the input file and destroy the JPEG object. */
@@ -7300,9 +7300,9 @@ gif_load (struct frame *f, struct image *img)
7300 7300
7301 for (x = 0; x < image_width; x++) 7301 for (x = 0; x < image_width; x++)
7302 { 7302 {
7303 int i = raster[(y * image_width) + x]; 7303 int c = raster[(y * image_width) + x];
7304 XPutPixel (ximg, x + img->corners[LEFT_CORNER], 7304 XPutPixel (ximg, x + img->corners[LEFT_CORNER],
7305 row + img->corners[TOP_CORNER], pixel_colors[i]); 7305 row + img->corners[TOP_CORNER], pixel_colors[c]);
7306 } 7306 }
7307 7307
7308 row += interlace_increment[pass]; 7308 row += interlace_increment[pass];
@@ -7313,9 +7313,9 @@ gif_load (struct frame *f, struct image *img)
7313 for (y = 0; y < image_height; ++y) 7313 for (y = 0; y < image_height; ++y)
7314 for (x = 0; x < image_width; ++x) 7314 for (x = 0; x < image_width; ++x)
7315 { 7315 {
7316 int i = raster[y * image_width + x]; 7316 int c = raster[y * image_width + x];
7317 XPutPixel (ximg, x + img->corners[LEFT_CORNER], 7317 XPutPixel (ximg, x + img->corners[LEFT_CORNER],
7318 y + img->corners[TOP_CORNER], pixel_colors[i]); 7318 y + img->corners[TOP_CORNER], pixel_colors[c]);
7319 } 7319 }
7320 } 7320 }
7321 7321