Mercurial > emacs
changeset 85262:77d6e76160a6
Replace `abs' with `eabs'.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Oct 2007 12:47:51 +0000 |
parents | a8b8f12ca180 |
children | f8835bb7ba30 |
files | src/xfaces.c |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfaces.c Sat Oct 13 12:47:25 2007 +0000 +++ b/src/xfaces.c Sat Oct 13 12:47:51 2007 +0000 @@ -1488,11 +1488,11 @@ gray_p = (/* Any color sufficiently close to black counts as grey. */ (color.red < 5000 && color.green < 5000 && color.blue < 5000) || - ((abs (color.red - color.green) + ((eabs (color.red - color.green) < max (color.red, color.green) / 20) - && (abs (color.green - color.blue) + && (eabs (color.green - color.blue) < max (color.green, color.blue) / 20) - && (abs (color.blue - color.red) + && (eabs (color.blue - color.red) < max (color.blue, color.red) / 20))); else gray_p = 0; @@ -2714,7 +2714,7 @@ int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy; int x_resy = x->numeric[XLFD_RESY]; int y_resy = y->numeric[XLFD_RESY]; - cmp = abs (resy - x_resy) - abs (resy - y_resy); + cmp = eabs (resy - x_resy) - eabs (resy - y_resy); } } @@ -5795,7 +5795,7 @@ /* Try in increments of 1/2 pt. */ delta = steps < 0 ? 5 : -5; - steps = abs (steps); + steps = eabs (steps); face = FACE_FROM_ID (f, face_id); bcopy (face->lface, attrs, sizeof attrs); @@ -5806,7 +5806,7 @@ while (steps && pt + delta > 0 /* Give up if we cannot find a font within 10pt. */ - && abs (last_pt - pt) < 100) + && eabs (last_pt - pt) < 100) { /* Look up a face for a slightly smaller/larger font. */ pt += delta; @@ -6414,17 +6414,17 @@ if (xlfd_idx == XLFD_POINT_SIZE) { - delta1 = abs (values[i] - (font1->numeric[xlfd_idx] + delta1 = eabs (values[i] - (font1->numeric[xlfd_idx] / font1->rescale_ratio)); - delta2 = abs (values[i] - (font2->numeric[xlfd_idx] + delta2 = eabs (values[i] - (font2->numeric[xlfd_idx] / font2->rescale_ratio)); - if (abs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM) + if (eabs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM) continue; } else { - delta1 = abs (values[i] - font1->numeric[xlfd_idx]); - delta2 = abs (values[i] - font2->numeric[xlfd_idx]); + delta1 = eabs (values[i] - font1->numeric[xlfd_idx]); + delta2 = eabs (values[i] - font2->numeric[xlfd_idx]); } if (delta1 > delta2) @@ -6446,8 +6446,8 @@ if (avgwidth) { - int delta1 = abs (avgwidth - font1->numeric[XLFD_AVGWIDTH]); - int delta2 = abs (avgwidth - font2->numeric[XLFD_AVGWIDTH]); + int delta1 = eabs (avgwidth - font1->numeric[XLFD_AVGWIDTH]); + int delta2 = eabs (avgwidth - font2->numeric[XLFD_AVGWIDTH]); if (delta1 > delta2) return 0; else if (delta1 < delta2)