aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-11-01 10:38:59 +0000
committerGerd Moellmann2001-11-01 10:38:59 +0000
commitb350c2e5c30600d1361bd8dc61432158e38f002b (patch)
tree3d226c2be0767f392df819d3abfae79c01e150d0 /src
parent864b90c968edab408643f85fd33ebff9fcd7f84e (diff)
downloademacs-b350c2e5c30600d1361bd8dc61432158e38f002b.tar.gz
emacs-b350c2e5c30600d1361bd8dc61432158e38f002b.zip
(four_corners_best): Reindent.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/xfns.c36
2 files changed, 20 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c2e675db815..586db55b6f6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12001-11-01 Gerd Moellmann <gerd@gnu.org> 12001-11-01 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xfns.c (four_corners_best): Reindent.
4
3 * xfaces.c (Finternal_set_lisp_face_attribute_from_resource): 5 * xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
4 Handle :box so that it is possible to specify sexprs. 6 Handle :box so that it is possible to specify sexprs.
5 7
diff --git a/src/xfns.c b/src/xfns.c
index 4b4dcdc75a3..4ae92260cfd 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5778,29 +5778,29 @@ four_corners_best (ximg, width, height)
5778 XImage *ximg; 5778 XImage *ximg;
5779 unsigned long width, height; 5779 unsigned long width, height;
5780{ 5780{
5781 unsigned long corners[4], best; 5781 unsigned long corners[4], best;
5782 int i, best_count; 5782 int i, best_count;
5783 5783
5784 /* Get the colors at the corners of ximg. */ 5784 /* Get the colors at the corners of ximg. */
5785 corners[0] = XGetPixel (ximg, 0, 0); 5785 corners[0] = XGetPixel (ximg, 0, 0);
5786 corners[1] = XGetPixel (ximg, width - 1, 0); 5786 corners[1] = XGetPixel (ximg, width - 1, 0);
5787 corners[2] = XGetPixel (ximg, width - 1, height - 1); 5787 corners[2] = XGetPixel (ximg, width - 1, height - 1);
5788 corners[3] = XGetPixel (ximg, 0, height - 1); 5788 corners[3] = XGetPixel (ximg, 0, height - 1);
5789 5789
5790 /* Choose the most frequently found color as background. */ 5790 /* Choose the most frequently found color as background. */
5791 for (i = best_count = 0; i < 4; ++i) 5791 for (i = best_count = 0; i < 4; ++i)
5792 { 5792 {
5793 int j, n; 5793 int j, n;
5794 5794
5795 for (j = n = 0; j < 4; ++j) 5795 for (j = n = 0; j < 4; ++j)
5796 if (corners[i] == corners[j]) 5796 if (corners[i] == corners[j])
5797 ++n; 5797 ++n;
5798 5798
5799 if (n > best_count) 5799 if (n > best_count)
5800 best = corners[i], best_count = n; 5800 best = corners[i], best_count = n;
5801 } 5801 }
5802 5802
5803 return best; 5803 return best;
5804} 5804}
5805 5805
5806/* Return the `background' field of IMG. If IMG doesn't have one yet, 5806/* Return the `background' field of IMG. If IMG doesn't have one yet,