diff options
| author | Eli Zaretskii | 2007-10-13 12:48:57 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2007-10-13 12:48:57 +0000 |
| commit | 1ea40aa2f3b0809c27c4f095a7f8dde432fcc89d (patch) | |
| tree | 5ff3410aecc837cec234cc3bb8f463a0b00de8eb | |
| parent | 555b10b098c1f9a0450e385d291386caae1dda4f (diff) | |
| download | emacs-1ea40aa2f3b0809c27c4f095a7f8dde432fcc89d.tar.gz emacs-1ea40aa2f3b0809c27c4f095a7f8dde432fcc89d.zip | |
Replace `abs' with `eabs'.
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/dispextern.h | 4 | ||||
| -rw-r--r-- | src/dispnew.c | 2 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/image.c | 6 | ||||
| -rw-r--r-- | src/intervals.c | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 8 | ||||
| -rw-r--r-- | src/macterm.c | 14 | ||||
| -rw-r--r-- | src/w32fns.c | 6 | ||||
| -rw-r--r-- | src/w32term.c | 16 | ||||
| -rw-r--r-- | src/window.c | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 10 | ||||
| -rw-r--r-- | src/xfaces.c | 26 | ||||
| -rw-r--r-- | src/xterm.c | 25 |
14 files changed, 70 insertions, 65 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 16b55e97a6d..e8d187ec1d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-10-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * lisp.h (eabs): Rename from `abs'. All callers changed. | ||
| 4 | |||
| 1 | 2007-10-05 Dmitry Antipov <dmantipov@yandex.ru> | 5 | 2007-10-05 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 6 | ||
| 3 | * buffer.c (add_overlay_mod_hooklist): | 7 | * buffer.c (add_overlay_mod_hooklist): |
diff --git a/src/dispextern.h b/src/dispextern.h index f4ce7f43475..fd4d8ebec9d 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -680,9 +680,9 @@ struct glyph_row | |||
| 680 | short used[LAST_AREA]; | 680 | short used[LAST_AREA]; |
| 681 | 681 | ||
| 682 | /* Window-relative x and y-position of the top-left corner of this | 682 | /* Window-relative x and y-position of the top-left corner of this |
| 683 | row. If y < 0, this means that abs (y) pixels of the row are | 683 | row. If y < 0, this means that eabs (y) pixels of the row are |
| 684 | invisible because it is partially visible at the top of a window. | 684 | invisible because it is partially visible at the top of a window. |
| 685 | If x < 0, this means that abs (x) pixels of the first glyph of | 685 | If x < 0, this means that eabs (x) pixels of the first glyph of |
| 686 | the text area of the row are invisible because the glyph is | 686 | the text area of the row are invisible because the glyph is |
| 687 | partially visible. */ | 687 | partially visible. */ |
| 688 | int x, y; | 688 | int x, y; |
diff --git a/src/dispnew.c b/src/dispnew.c index 7a80a8a618a..1778d5c818b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -1993,7 +1993,7 @@ required_matrix_height (w) | |||
| 1993 | if (FRAME_WINDOW_P (f)) | 1993 | if (FRAME_WINDOW_P (f)) |
| 1994 | { | 1994 | { |
| 1995 | int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); | 1995 | int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); |
| 1996 | int window_pixel_height = window_box_height (w) + abs (w->vscroll); | 1996 | int window_pixel_height = window_box_height (w) + eabs (w->vscroll); |
| 1997 | return (((window_pixel_height + ch_height - 1) | 1997 | return (((window_pixel_height + ch_height - 1) |
| 1998 | / ch_height) * w->nrows_scale_factor | 1998 | / ch_height) * w->nrows_scale_factor |
| 1999 | /* One partially visible line at the top and | 1999 | /* One partially visible line at the top and |
diff --git a/src/editfns.c b/src/editfns.c index dac7eb83af2..98ab2f90081 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1848,7 +1848,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) | |||
| 1848 | tzstring = (char *) SDATA (zone); | 1848 | tzstring = (char *) SDATA (zone); |
| 1849 | else if (INTEGERP (zone)) | 1849 | else if (INTEGERP (zone)) |
| 1850 | { | 1850 | { |
| 1851 | int abszone = abs (XINT (zone)); | 1851 | int abszone = eabs (XINT (zone)); |
| 1852 | sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0), | 1852 | sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0), |
| 1853 | abszone / (60*60), (abszone/60) % 60, abszone % 60); | 1853 | abszone / (60*60), (abszone/60) % 60, abszone % 60); |
| 1854 | tzstring = tzbuf; | 1854 | tzstring = tzbuf; |
diff --git a/src/image.c b/src/image.c index 16826c425fa..33d5e1a9b2d 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1984,8 +1984,8 @@ lookup_image (f, spec) | |||
| 1984 | if (INTEGERP (relief)) | 1984 | if (INTEGERP (relief)) |
| 1985 | { | 1985 | { |
| 1986 | img->relief = XINT (relief); | 1986 | img->relief = XINT (relief); |
| 1987 | img->hmargin += abs (img->relief); | 1987 | img->hmargin += eabs (img->relief); |
| 1988 | img->vmargin += abs (img->relief); | 1988 | img->vmargin += eabs (img->relief); |
| 1989 | } | 1989 | } |
| 1990 | 1990 | ||
| 1991 | if (! img->background_valid) | 1991 | if (! img->background_valid) |
| @@ -5165,7 +5165,7 @@ x_detect_edges (f, img, matrix, color_adjust) | |||
| 5165 | int x, y, i, sum; | 5165 | int x, y, i, sum; |
| 5166 | 5166 | ||
| 5167 | for (i = sum = 0; i < 9; ++i) | 5167 | for (i = sum = 0; i < 9; ++i) |
| 5168 | sum += abs (matrix[i]); | 5168 | sum += eabs (matrix[i]); |
| 5169 | 5169 | ||
| 5170 | #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) | 5170 | #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) |
| 5171 | 5171 | ||
diff --git a/src/intervals.c b/src/intervals.c index a695976b8b7..639abcf3491 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -427,7 +427,7 @@ balance_an_interval (i) | |||
| 427 | /* Since the left child is longer, there must be one. */ | 427 | /* Since the left child is longer, there must be one. */ |
| 428 | new_diff = i->total_length - i->left->total_length | 428 | new_diff = i->total_length - i->left->total_length |
| 429 | + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left); | 429 | + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left); |
| 430 | if (abs (new_diff) >= old_diff) | 430 | if (eabs (new_diff) >= old_diff) |
| 431 | break; | 431 | break; |
| 432 | i = rotate_right (i); | 432 | i = rotate_right (i); |
| 433 | balance_an_interval (i->right); | 433 | balance_an_interval (i->right); |
| @@ -437,7 +437,7 @@ balance_an_interval (i) | |||
| 437 | /* Since the right child is longer, there must be one. */ | 437 | /* Since the right child is longer, there must be one. */ |
| 438 | new_diff = i->total_length - i->right->total_length | 438 | new_diff = i->total_length - i->right->total_length |
| 439 | + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right); | 439 | + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right); |
| 440 | if (abs (new_diff) >= -old_diff) | 440 | if (eabs (new_diff) >= -old_diff) |
| 441 | break; | 441 | break; |
| 442 | i = rotate_left (i); | 442 | i = rotate_left (i); |
| 443 | balance_an_interval (i->left); | 443 | balance_an_interval (i->left); |
diff --git a/src/keyboard.c b/src/keyboard.c index f03a5ef9f73..b2fa38d049c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -5707,8 +5707,8 @@ make_lispy_event (event) | |||
| 5707 | fuzz = double_click_fuzz / 8; | 5707 | fuzz = double_click_fuzz / 8; |
| 5708 | 5708 | ||
| 5709 | is_double = (button == last_mouse_button | 5709 | is_double = (button == last_mouse_button |
| 5710 | && (abs (XINT (event->x) - last_mouse_x) <= fuzz) | 5710 | && (eabs (XINT (event->x) - last_mouse_x) <= fuzz) |
| 5711 | && (abs (XINT (event->y) - last_mouse_y) <= fuzz) | 5711 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) |
| 5712 | && button_down_time != 0 | 5712 | && button_down_time != 0 |
| 5713 | && (EQ (Vdouble_click_time, Qt) | 5713 | && (EQ (Vdouble_click_time, Qt) |
| 5714 | || (INTEGERP (Vdouble_click_time) | 5714 | || (INTEGERP (Vdouble_click_time) |
| @@ -5876,8 +5876,8 @@ make_lispy_event (event) | |||
| 5876 | fuzz = double_click_fuzz / 8; | 5876 | fuzz = double_click_fuzz / 8; |
| 5877 | 5877 | ||
| 5878 | is_double = (last_mouse_button < 0 | 5878 | is_double = (last_mouse_button < 0 |
| 5879 | && (abs (XINT (event->x) - last_mouse_x) <= fuzz) | 5879 | && (eabs (XINT (event->x) - last_mouse_x) <= fuzz) |
| 5880 | && (abs (XINT (event->y) - last_mouse_y) <= fuzz) | 5880 | && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) |
| 5881 | && button_down_time != 0 | 5881 | && button_down_time != 0 |
| 5882 | && (EQ (Vdouble_click_time, Qt) | 5882 | && (EQ (Vdouble_click_time, Qt) |
| 5883 | || (INTEGERP (Vdouble_click_time) | 5883 | || (INTEGERP (Vdouble_click_time) |
diff --git a/src/macterm.c b/src/macterm.c index bfd7dca2c3b..e4b9cca819c 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -2968,7 +2968,7 @@ x_draw_glyph_string_foreground (s) | |||
| 2968 | of S to the right of that box line. */ | 2968 | of S to the right of that box line. */ |
| 2969 | if (s->face->box != FACE_NO_BOX | 2969 | if (s->face->box != FACE_NO_BOX |
| 2970 | && s->first_glyph->left_box_line_p) | 2970 | && s->first_glyph->left_box_line_p) |
| 2971 | x = s->x + abs (s->face->box_line_width); | 2971 | x = s->x + eabs (s->face->box_line_width); |
| 2972 | else | 2972 | else |
| 2973 | x = s->x; | 2973 | x = s->x; |
| 2974 | 2974 | ||
| @@ -3047,7 +3047,7 @@ x_draw_composite_glyph_string_foreground (s) | |||
| 3047 | of S to the right of that box line. */ | 3047 | of S to the right of that box line. */ |
| 3048 | if (s->face->box != FACE_NO_BOX | 3048 | if (s->face->box != FACE_NO_BOX |
| 3049 | && s->first_glyph->left_box_line_p) | 3049 | && s->first_glyph->left_box_line_p) |
| 3050 | x = s->x + abs (s->face->box_line_width); | 3050 | x = s->x + eabs (s->face->box_line_width); |
| 3051 | else | 3051 | else |
| 3052 | x = s->x; | 3052 | x = s->x; |
| 3053 | 3053 | ||
| @@ -3542,7 +3542,7 @@ x_draw_glyph_string_box (s) | |||
| 3542 | ? s->first_glyph | 3542 | ? s->first_glyph |
| 3543 | : s->first_glyph + s->nchars - 1); | 3543 | : s->first_glyph + s->nchars - 1); |
| 3544 | 3544 | ||
| 3545 | width = abs (s->face->box_line_width); | 3545 | width = eabs (s->face->box_line_width); |
| 3546 | raised_p = s->face->box == FACE_RAISED_BOX; | 3546 | raised_p = s->face->box == FACE_RAISED_BOX; |
| 3547 | left_x = s->x; | 3547 | left_x = s->x; |
| 3548 | right_x = (s->row->full_width_p && s->extends_to_end_of_line_p | 3548 | right_x = (s->row->full_width_p && s->extends_to_end_of_line_p |
| @@ -3588,7 +3588,7 @@ x_draw_image_foreground (s) | |||
| 3588 | if (s->face->box != FACE_NO_BOX | 3588 | if (s->face->box != FACE_NO_BOX |
| 3589 | && s->first_glyph->left_box_line_p | 3589 | && s->first_glyph->left_box_line_p |
| 3590 | && s->slice.x == 0) | 3590 | && s->slice.x == 0) |
| 3591 | x += abs (s->face->box_line_width); | 3591 | x += eabs (s->face->box_line_width); |
| 3592 | 3592 | ||
| 3593 | /* If there is a margin around the image, adjust x- and y-position | 3593 | /* If there is a margin around the image, adjust x- and y-position |
| 3594 | by that margin. */ | 3594 | by that margin. */ |
| @@ -3661,7 +3661,7 @@ x_draw_image_relief (s) | |||
| 3661 | if (s->face->box != FACE_NO_BOX | 3661 | if (s->face->box != FACE_NO_BOX |
| 3662 | && s->first_glyph->left_box_line_p | 3662 | && s->first_glyph->left_box_line_p |
| 3663 | && s->slice.x == 0) | 3663 | && s->slice.x == 0) |
| 3664 | x += abs (s->face->box_line_width); | 3664 | x += eabs (s->face->box_line_width); |
| 3665 | 3665 | ||
| 3666 | /* If there is a margin around the image, adjust x- and y-position | 3666 | /* If there is a margin around the image, adjust x- and y-position |
| 3667 | by that margin. */ | 3667 | by that margin. */ |
| @@ -3678,7 +3678,7 @@ x_draw_image_relief (s) | |||
| 3678 | } | 3678 | } |
| 3679 | else | 3679 | else |
| 3680 | { | 3680 | { |
| 3681 | thick = abs (s->img->relief); | 3681 | thick = eabs (s->img->relief); |
| 3682 | raised_p = s->img->relief > 0; | 3682 | raised_p = s->img->relief > 0; |
| 3683 | } | 3683 | } |
| 3684 | 3684 | ||
| @@ -3739,7 +3739,7 @@ x_draw_image_glyph_string (s) | |||
| 3739 | struct glyph_string *s; | 3739 | struct glyph_string *s; |
| 3740 | { | 3740 | { |
| 3741 | int x, y; | 3741 | int x, y; |
| 3742 | int box_line_hwidth = abs (s->face->box_line_width); | 3742 | int box_line_hwidth = eabs (s->face->box_line_width); |
| 3743 | int box_line_vwidth = max (s->face->box_line_width, 0); | 3743 | int box_line_vwidth = max (s->face->box_line_width, 0); |
| 3744 | int height; | 3744 | int height; |
| 3745 | 3745 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index aca888f8b2c..56d894ec5bd 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -5370,9 +5370,9 @@ w32_to_x_font (lplogfont, lpxstr, len, specific_charset) | |||
| 5370 | 5370 | ||
| 5371 | if (lplogfont->lfHeight) | 5371 | if (lplogfont->lfHeight) |
| 5372 | { | 5372 | { |
| 5373 | sprintf (height_pixels, "%u", abs (lplogfont->lfHeight)); | 5373 | sprintf (height_pixels, "%u", eabs (lplogfont->lfHeight)); |
| 5374 | sprintf (height_dpi, "%u", | 5374 | sprintf (height_dpi, "%u", |
| 5375 | abs (lplogfont->lfHeight) * 720 / display_resy); | 5375 | eabs (lplogfont->lfHeight) * 720 / display_resy); |
| 5376 | } | 5376 | } |
| 5377 | else | 5377 | else |
| 5378 | { | 5378 | { |
| @@ -5594,7 +5594,7 @@ x_to_w32_font (lpxstr, lplogfont) | |||
| 5594 | } | 5594 | } |
| 5595 | 5595 | ||
| 5596 | /* This makes TrueType fonts work better. */ | 5596 | /* This makes TrueType fonts work better. */ |
| 5597 | lplogfont->lfHeight = - abs (lplogfont->lfHeight); | 5597 | lplogfont->lfHeight = - eabs (lplogfont->lfHeight); |
| 5598 | 5598 | ||
| 5599 | return (TRUE); | 5599 | return (TRUE); |
| 5600 | } | 5600 | } |
diff --git a/src/w32term.c b/src/w32term.c index f46a54fafb9..6a1d1c20af3 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1588,7 +1588,7 @@ x_draw_glyph_string_foreground (s) | |||
| 1588 | of S to the right of that box line. */ | 1588 | of S to the right of that box line. */ |
| 1589 | if (s->face->box != FACE_NO_BOX | 1589 | if (s->face->box != FACE_NO_BOX |
| 1590 | && s->first_glyph->left_box_line_p) | 1590 | && s->first_glyph->left_box_line_p) |
| 1591 | x = s->x + abs (s->face->box_line_width); | 1591 | x = s->x + eabs (s->face->box_line_width); |
| 1592 | else | 1592 | else |
| 1593 | x = s->x; | 1593 | x = s->x; |
| 1594 | 1594 | ||
| @@ -1660,7 +1660,7 @@ x_draw_composite_glyph_string_foreground (s) | |||
| 1660 | of S to the right of that box line. */ | 1660 | of S to the right of that box line. */ |
| 1661 | if (s->face->box != FACE_NO_BOX | 1661 | if (s->face->box != FACE_NO_BOX |
| 1662 | && s->first_glyph->left_box_line_p) | 1662 | && s->first_glyph->left_box_line_p) |
| 1663 | x = s->x + abs (s->face->box_line_width); | 1663 | x = s->x + eabs (s->face->box_line_width); |
| 1664 | else | 1664 | else |
| 1665 | x = s->x; | 1665 | x = s->x; |
| 1666 | 1666 | ||
| @@ -1990,7 +1990,7 @@ x_draw_glyph_string_box (s) | |||
| 1990 | ? s->first_glyph | 1990 | ? s->first_glyph |
| 1991 | : s->first_glyph + s->nchars - 1); | 1991 | : s->first_glyph + s->nchars - 1); |
| 1992 | 1992 | ||
| 1993 | width = abs (s->face->box_line_width); | 1993 | width = eabs (s->face->box_line_width); |
| 1994 | raised_p = s->face->box == FACE_RAISED_BOX; | 1994 | raised_p = s->face->box == FACE_RAISED_BOX; |
| 1995 | left_x = s->x; | 1995 | left_x = s->x; |
| 1996 | right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p | 1996 | right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p |
| @@ -2036,7 +2036,7 @@ x_draw_image_foreground (s) | |||
| 2036 | if (s->face->box != FACE_NO_BOX | 2036 | if (s->face->box != FACE_NO_BOX |
| 2037 | && s->first_glyph->left_box_line_p | 2037 | && s->first_glyph->left_box_line_p |
| 2038 | && s->slice.x == 0) | 2038 | && s->slice.x == 0) |
| 2039 | x += abs (s->face->box_line_width); | 2039 | x += eabs (s->face->box_line_width); |
| 2040 | 2040 | ||
| 2041 | /* If there is a margin around the image, adjust x- and y-position | 2041 | /* If there is a margin around the image, adjust x- and y-position |
| 2042 | by that margin. */ | 2042 | by that margin. */ |
| @@ -2129,7 +2129,7 @@ x_draw_image_relief (s) | |||
| 2129 | if (s->face->box != FACE_NO_BOX | 2129 | if (s->face->box != FACE_NO_BOX |
| 2130 | && s->first_glyph->left_box_line_p | 2130 | && s->first_glyph->left_box_line_p |
| 2131 | && s->slice.x == 0) | 2131 | && s->slice.x == 0) |
| 2132 | x += abs (s->face->box_line_width); | 2132 | x += eabs (s->face->box_line_width); |
| 2133 | 2133 | ||
| 2134 | /* If there is a margin around the image, adjust x- and y-position | 2134 | /* If there is a margin around the image, adjust x- and y-position |
| 2135 | by that margin. */ | 2135 | by that margin. */ |
| @@ -2146,7 +2146,7 @@ x_draw_image_relief (s) | |||
| 2146 | } | 2146 | } |
| 2147 | else | 2147 | else |
| 2148 | { | 2148 | { |
| 2149 | thick = abs (s->img->relief); | 2149 | thick = eabs (s->img->relief); |
| 2150 | raised_p = s->img->relief > 0; | 2150 | raised_p = s->img->relief > 0; |
| 2151 | } | 2151 | } |
| 2152 | 2152 | ||
| @@ -2183,7 +2183,7 @@ w32_draw_image_foreground_1 (s, pixmap) | |||
| 2183 | if (s->face->box != FACE_NO_BOX | 2183 | if (s->face->box != FACE_NO_BOX |
| 2184 | && s->first_glyph->left_box_line_p | 2184 | && s->first_glyph->left_box_line_p |
| 2185 | && s->slice.x == 0) | 2185 | && s->slice.x == 0) |
| 2186 | x += abs (s->face->box_line_width); | 2186 | x += eabs (s->face->box_line_width); |
| 2187 | 2187 | ||
| 2188 | /* If there is a margin around the image, adjust x- and y-position | 2188 | /* If there is a margin around the image, adjust x- and y-position |
| 2189 | by that margin. */ | 2189 | by that margin. */ |
| @@ -2295,7 +2295,7 @@ x_draw_image_glyph_string (s) | |||
| 2295 | struct glyph_string *s; | 2295 | struct glyph_string *s; |
| 2296 | { | 2296 | { |
| 2297 | int x, y; | 2297 | int x, y; |
| 2298 | int box_line_hwidth = abs (s->face->box_line_width); | 2298 | int box_line_hwidth = eabs (s->face->box_line_width); |
| 2299 | int box_line_vwidth = max (s->face->box_line_width, 0); | 2299 | int box_line_vwidth = max (s->face->box_line_width, 0); |
| 2300 | int height; | 2300 | int height; |
| 2301 | HBITMAP pixmap = 0; | 2301 | HBITMAP pixmap = 0; |
diff --git a/src/window.c b/src/window.c index bd1f55b1648..efdf309121b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -799,7 +799,7 @@ coordinates_in_window (w, x, y) | |||
| 799 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) | 799 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) |
| 800 | || WINDOW_RIGHTMOST_P (w)) | 800 | || WINDOW_RIGHTMOST_P (w)) |
| 801 | { | 801 | { |
| 802 | if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) | 802 | if (!WINDOW_LEFTMOST_P (w) && eabs (*x - x0) < grabbable_width) |
| 803 | { | 803 | { |
| 804 | /* Convert X and Y to window relative coordinates. | 804 | /* Convert X and Y to window relative coordinates. |
| 805 | Vertical border is at the left edge of window. */ | 805 | Vertical border is at the left edge of window. */ |
| @@ -810,7 +810,7 @@ coordinates_in_window (w, x, y) | |||
| 810 | } | 810 | } |
| 811 | else | 811 | else |
| 812 | { | 812 | { |
| 813 | if (abs (*x - x1) < grabbable_width) | 813 | if (eabs (*x - x1) < grabbable_width) |
| 814 | { | 814 | { |
| 815 | /* Convert X and Y to window relative coordinates. | 815 | /* Convert X and Y to window relative coordinates. |
| 816 | Vertical border is at the right edge of window. */ | 816 | Vertical border is at the right edge of window. */ |
| @@ -858,7 +858,7 @@ coordinates_in_window (w, x, y) | |||
| 858 | if (!w->pseudo_window_p | 858 | if (!w->pseudo_window_p |
| 859 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) | 859 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) |
| 860 | && !WINDOW_RIGHTMOST_P (w) | 860 | && !WINDOW_RIGHTMOST_P (w) |
| 861 | && (abs (*x - right_x) < grabbable_width)) | 861 | && (eabs (*x - right_x) < grabbable_width)) |
| 862 | { | 862 | { |
| 863 | /* Convert X and Y to window relative coordinates. | 863 | /* Convert X and Y to window relative coordinates. |
| 864 | Vertical border is at the right edge of window. */ | 864 | Vertical border is at the right edge of window. */ |
| @@ -5497,7 +5497,7 @@ scroll_command (n, direction) | |||
| 5497 | { | 5497 | { |
| 5498 | int count = SPECPDL_INDEX (); | 5498 | int count = SPECPDL_INDEX (); |
| 5499 | 5499 | ||
| 5500 | xassert (abs (direction) == 1); | 5500 | xassert (eabs (direction) == 1); |
| 5501 | 5501 | ||
| 5502 | /* If selected window's buffer isn't current, make it current for | 5502 | /* If selected window's buffer isn't current, make it current for |
| 5503 | the moment. But don't screw up if window_scroll gets an error. */ | 5503 | the moment. But don't screw up if window_scroll gets an error. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index da254bc11bd..7cba8338bb3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12468,7 +12468,7 @@ compute_window_start_on_continuation_line (w) | |||
| 12468 | minimum distance from the old window start. */ | 12468 | minimum distance from the old window start. */ |
| 12469 | pos = it.current.pos; | 12469 | pos = it.current.pos; |
| 12470 | min_distance = INFINITY; | 12470 | min_distance = INFINITY; |
| 12471 | while ((distance = abs (CHARPOS (start_pos) - IT_CHARPOS (it))), | 12471 | while ((distance = eabs (CHARPOS (start_pos) - IT_CHARPOS (it))), |
| 12472 | distance < min_distance) | 12472 | distance < min_distance) |
| 12473 | { | 12473 | { |
| 12474 | min_distance = distance; | 12474 | min_distance = distance; |
| @@ -20029,9 +20029,9 @@ produce_image_glyph (it) | |||
| 20029 | } | 20029 | } |
| 20030 | 20030 | ||
| 20031 | if (it->start_of_box_run_p && slice.x == 0) | 20031 | if (it->start_of_box_run_p && slice.x == 0) |
| 20032 | it->pixel_width += abs (face->box_line_width); | 20032 | it->pixel_width += eabs (face->box_line_width); |
| 20033 | if (it->end_of_box_run_p && slice.x + slice.width == img->width) | 20033 | if (it->end_of_box_run_p && slice.x + slice.width == img->width) |
| 20034 | it->pixel_width += abs (face->box_line_width); | 20034 | it->pixel_width += eabs (face->box_line_width); |
| 20035 | } | 20035 | } |
| 20036 | 20036 | ||
| 20037 | take_vertical_position_into_account (it); | 20037 | take_vertical_position_into_account (it); |
| @@ -22293,8 +22293,8 @@ fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p) | |||
| 22293 | goto found; | 22293 | goto found; |
| 22294 | } | 22294 | } |
| 22295 | else if (best_glyph == NULL | 22295 | else if (best_glyph == NULL |
| 22296 | || ((abs (g->charpos - pos) | 22296 | || ((eabs (g->charpos - pos) |
| 22297 | < abs (best_glyph->charpos - pos)) | 22297 | < eabs (best_glyph->charpos - pos)) |
| 22298 | && (right_p | 22298 | && (right_p |
| 22299 | ? g->charpos < pos | 22299 | ? g->charpos < pos |
| 22300 | : g->charpos > pos))) | 22300 | : g->charpos > pos))) |
diff --git a/src/xfaces.c b/src/xfaces.c index eb45d1eb3ea..5e396d8bf6e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -1488,11 +1488,11 @@ face_color_gray_p (f, color_name) | |||
| 1488 | gray_p = (/* Any color sufficiently close to black counts as grey. */ | 1488 | gray_p = (/* Any color sufficiently close to black counts as grey. */ |
| 1489 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) | 1489 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) |
| 1490 | || | 1490 | || |
| 1491 | ((abs (color.red - color.green) | 1491 | ((eabs (color.red - color.green) |
| 1492 | < max (color.red, color.green) / 20) | 1492 | < max (color.red, color.green) / 20) |
| 1493 | && (abs (color.green - color.blue) | 1493 | && (eabs (color.green - color.blue) |
| 1494 | < max (color.green, color.blue) / 20) | 1494 | < max (color.green, color.blue) / 20) |
| 1495 | && (abs (color.blue - color.red) | 1495 | && (eabs (color.blue - color.red) |
| 1496 | < max (color.blue, color.red) / 20))); | 1496 | < max (color.blue, color.red) / 20))); |
| 1497 | else | 1497 | else |
| 1498 | gray_p = 0; | 1498 | gray_p = 0; |
| @@ -2714,7 +2714,7 @@ cmp_font_names (a, b) | |||
| 2714 | int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy; | 2714 | int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy; |
| 2715 | int x_resy = x->numeric[XLFD_RESY]; | 2715 | int x_resy = x->numeric[XLFD_RESY]; |
| 2716 | int y_resy = y->numeric[XLFD_RESY]; | 2716 | int y_resy = y->numeric[XLFD_RESY]; |
| 2717 | cmp = abs (resy - x_resy) - abs (resy - y_resy); | 2717 | cmp = eabs (resy - x_resy) - eabs (resy - y_resy); |
| 2718 | } | 2718 | } |
| 2719 | } | 2719 | } |
| 2720 | 2720 | ||
| @@ -5795,7 +5795,7 @@ smaller_face (f, face_id, steps) | |||
| 5795 | 5795 | ||
| 5796 | /* Try in increments of 1/2 pt. */ | 5796 | /* Try in increments of 1/2 pt. */ |
| 5797 | delta = steps < 0 ? 5 : -5; | 5797 | delta = steps < 0 ? 5 : -5; |
| 5798 | steps = abs (steps); | 5798 | steps = eabs (steps); |
| 5799 | 5799 | ||
| 5800 | face = FACE_FROM_ID (f, face_id); | 5800 | face = FACE_FROM_ID (f, face_id); |
| 5801 | bcopy (face->lface, attrs, sizeof attrs); | 5801 | bcopy (face->lface, attrs, sizeof attrs); |
| @@ -5806,7 +5806,7 @@ smaller_face (f, face_id, steps) | |||
| 5806 | while (steps | 5806 | while (steps |
| 5807 | && pt + delta > 0 | 5807 | && pt + delta > 0 |
| 5808 | /* Give up if we cannot find a font within 10pt. */ | 5808 | /* Give up if we cannot find a font within 10pt. */ |
| 5809 | && abs (last_pt - pt) < 100) | 5809 | && eabs (last_pt - pt) < 100) |
| 5810 | { | 5810 | { |
| 5811 | /* Look up a face for a slightly smaller/larger font. */ | 5811 | /* Look up a face for a slightly smaller/larger font. */ |
| 5812 | pt += delta; | 5812 | pt += delta; |
| @@ -6414,17 +6414,17 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth) | |||
| 6414 | 6414 | ||
| 6415 | if (xlfd_idx == XLFD_POINT_SIZE) | 6415 | if (xlfd_idx == XLFD_POINT_SIZE) |
| 6416 | { | 6416 | { |
| 6417 | delta1 = abs (values[i] - (font1->numeric[xlfd_idx] | 6417 | delta1 = eabs (values[i] - (font1->numeric[xlfd_idx] |
| 6418 | / font1->rescale_ratio)); | 6418 | / font1->rescale_ratio)); |
| 6419 | delta2 = abs (values[i] - (font2->numeric[xlfd_idx] | 6419 | delta2 = eabs (values[i] - (font2->numeric[xlfd_idx] |
| 6420 | / font2->rescale_ratio)); | 6420 | / font2->rescale_ratio)); |
| 6421 | if (abs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM) | 6421 | if (eabs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM) |
| 6422 | continue; | 6422 | continue; |
| 6423 | } | 6423 | } |
| 6424 | else | 6424 | else |
| 6425 | { | 6425 | { |
| 6426 | delta1 = abs (values[i] - font1->numeric[xlfd_idx]); | 6426 | delta1 = eabs (values[i] - font1->numeric[xlfd_idx]); |
| 6427 | delta2 = abs (values[i] - font2->numeric[xlfd_idx]); | 6427 | delta2 = eabs (values[i] - font2->numeric[xlfd_idx]); |
| 6428 | } | 6428 | } |
| 6429 | 6429 | ||
| 6430 | if (delta1 > delta2) | 6430 | if (delta1 > delta2) |
| @@ -6446,8 +6446,8 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth) | |||
| 6446 | 6446 | ||
| 6447 | if (avgwidth) | 6447 | if (avgwidth) |
| 6448 | { | 6448 | { |
| 6449 | int delta1 = abs (avgwidth - font1->numeric[XLFD_AVGWIDTH]); | 6449 | int delta1 = eabs (avgwidth - font1->numeric[XLFD_AVGWIDTH]); |
| 6450 | int delta2 = abs (avgwidth - font2->numeric[XLFD_AVGWIDTH]); | 6450 | int delta2 = eabs (avgwidth - font2->numeric[XLFD_AVGWIDTH]); |
| 6451 | if (delta1 > delta2) | 6451 | if (delta1 > delta2) |
| 6452 | return 0; | 6452 | return 0; |
| 6453 | else if (delta1 < delta2) | 6453 | else if (delta1 < delta2) |
diff --git a/src/xterm.c b/src/xterm.c index 5a5d4e42d8b..29c840ff799 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1322,7 +1322,7 @@ x_draw_glyph_string_foreground (s) | |||
| 1322 | of S to the right of that box line. */ | 1322 | of S to the right of that box line. */ |
| 1323 | if (s->face->box != FACE_NO_BOX | 1323 | if (s->face->box != FACE_NO_BOX |
| 1324 | && s->first_glyph->left_box_line_p) | 1324 | && s->first_glyph->left_box_line_p) |
| 1325 | x = s->x + abs (s->face->box_line_width); | 1325 | x = s->x + eabs (s->face->box_line_width); |
| 1326 | else | 1326 | else |
| 1327 | x = s->x; | 1327 | x = s->x; |
| 1328 | 1328 | ||
| @@ -1404,7 +1404,7 @@ x_draw_composite_glyph_string_foreground (s) | |||
| 1404 | of S to the right of that box line. */ | 1404 | of S to the right of that box line. */ |
| 1405 | if (s->face->box != FACE_NO_BOX | 1405 | if (s->face->box != FACE_NO_BOX |
| 1406 | && s->first_glyph->left_box_line_p) | 1406 | && s->first_glyph->left_box_line_p) |
| 1407 | x = s->x + abs (s->face->box_line_width); | 1407 | x = s->x + eabs (s->face->box_line_width); |
| 1408 | else | 1408 | else |
| 1409 | x = s->x; | 1409 | x = s->x; |
| 1410 | 1410 | ||
| @@ -2200,7 +2200,7 @@ x_draw_glyph_string_box (s) | |||
| 2200 | ? s->first_glyph | 2200 | ? s->first_glyph |
| 2201 | : s->first_glyph + s->nchars - 1); | 2201 | : s->first_glyph + s->nchars - 1); |
| 2202 | 2202 | ||
| 2203 | width = abs (s->face->box_line_width); | 2203 | width = eabs (s->face->box_line_width); |
| 2204 | raised_p = s->face->box == FACE_RAISED_BOX; | 2204 | raised_p = s->face->box == FACE_RAISED_BOX; |
| 2205 | left_x = s->x; | 2205 | left_x = s->x; |
| 2206 | right_x = (s->row->full_width_p && s->extends_to_end_of_line_p | 2206 | right_x = (s->row->full_width_p && s->extends_to_end_of_line_p |
| @@ -2246,7 +2246,7 @@ x_draw_image_foreground (s) | |||
| 2246 | if (s->face->box != FACE_NO_BOX | 2246 | if (s->face->box != FACE_NO_BOX |
| 2247 | && s->first_glyph->left_box_line_p | 2247 | && s->first_glyph->left_box_line_p |
| 2248 | && s->slice.x == 0) | 2248 | && s->slice.x == 0) |
| 2249 | x += abs (s->face->box_line_width); | 2249 | x += eabs (s->face->box_line_width); |
| 2250 | 2250 | ||
| 2251 | /* If there is a margin around the image, adjust x- and y-position | 2251 | /* If there is a margin around the image, adjust x- and y-position |
| 2252 | by that margin. */ | 2252 | by that margin. */ |
| @@ -2339,7 +2339,7 @@ x_draw_image_relief (s) | |||
| 2339 | if (s->face->box != FACE_NO_BOX | 2339 | if (s->face->box != FACE_NO_BOX |
| 2340 | && s->first_glyph->left_box_line_p | 2340 | && s->first_glyph->left_box_line_p |
| 2341 | && s->slice.x == 0) | 2341 | && s->slice.x == 0) |
| 2342 | x += abs (s->face->box_line_width); | 2342 | x += eabs (s->face->box_line_width); |
| 2343 | 2343 | ||
| 2344 | /* If there is a margin around the image, adjust x- and y-position | 2344 | /* If there is a margin around the image, adjust x- and y-position |
| 2345 | by that margin. */ | 2345 | by that margin. */ |
| @@ -2356,7 +2356,7 @@ x_draw_image_relief (s) | |||
| 2356 | } | 2356 | } |
| 2357 | else | 2357 | else |
| 2358 | { | 2358 | { |
| 2359 | thick = abs (s->img->relief); | 2359 | thick = eabs (s->img->relief); |
| 2360 | raised_p = s->img->relief > 0; | 2360 | raised_p = s->img->relief > 0; |
| 2361 | } | 2361 | } |
| 2362 | 2362 | ||
| @@ -2391,7 +2391,7 @@ x_draw_image_foreground_1 (s, pixmap) | |||
| 2391 | if (s->face->box != FACE_NO_BOX | 2391 | if (s->face->box != FACE_NO_BOX |
| 2392 | && s->first_glyph->left_box_line_p | 2392 | && s->first_glyph->left_box_line_p |
| 2393 | && s->slice.x == 0) | 2393 | && s->slice.x == 0) |
| 2394 | x += abs (s->face->box_line_width); | 2394 | x += eabs (s->face->box_line_width); |
| 2395 | 2395 | ||
| 2396 | /* If there is a margin around the image, adjust x- and y-position | 2396 | /* If there is a margin around the image, adjust x- and y-position |
| 2397 | by that margin. */ | 2397 | by that margin. */ |
| @@ -2491,7 +2491,7 @@ static void | |||
| 2491 | x_draw_image_glyph_string (s) | 2491 | x_draw_image_glyph_string (s) |
| 2492 | struct glyph_string *s; | 2492 | struct glyph_string *s; |
| 2493 | { | 2493 | { |
| 2494 | int box_line_hwidth = abs (s->face->box_line_width); | 2494 | int box_line_hwidth = eabs (s->face->box_line_width); |
| 2495 | int box_line_vwidth = max (s->face->box_line_width, 0); | 2495 | int box_line_vwidth = max (s->face->box_line_width, 0); |
| 2496 | int height; | 2496 | int height; |
| 2497 | Pixmap pixmap = None; | 2497 | Pixmap pixmap = None; |
| @@ -4385,7 +4385,7 @@ xaw_jump_callback (widget, client_data, call_data) | |||
| 4385 | whole = 10000000; | 4385 | whole = 10000000; |
| 4386 | portion = shown < 1 ? top * whole : 0; | 4386 | portion = shown < 1 ? top * whole : 0; |
| 4387 | 4387 | ||
| 4388 | if (shown < 1 && (abs (top + shown - 1) < 1.0/height)) | 4388 | if (shown < 1 && (eabs (top + shown - 1) < 1.0/height)) |
| 4389 | /* Some derivatives of Xaw refuse to shrink the thumb when you reach | 4389 | /* Some derivatives of Xaw refuse to shrink the thumb when you reach |
| 4390 | the bottom, so we force the scrolling whenever we see that we're | 4390 | the bottom, so we force the scrolling whenever we see that we're |
| 4391 | too close to the bottom (in x_set_toolkit_scroll_bar_thumb | 4391 | too close to the bottom (in x_set_toolkit_scroll_bar_thumb |
| @@ -4426,12 +4426,12 @@ xaw_scroll_callback (widget, client_data, call_data) | |||
| 4426 | XtVaGetValues (widget, XtNheight, &height, NULL); | 4426 | XtVaGetValues (widget, XtNheight, &height, NULL); |
| 4427 | UNBLOCK_INPUT; | 4427 | UNBLOCK_INPUT; |
| 4428 | 4428 | ||
| 4429 | if (abs (position) >= height) | 4429 | if (eabs (position) >= height) |
| 4430 | part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle; | 4430 | part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle; |
| 4431 | 4431 | ||
| 4432 | /* If Xaw3d was compiled with ARROW_SCROLLBAR, | 4432 | /* If Xaw3d was compiled with ARROW_SCROLLBAR, |
| 4433 | it maps line-movement to call_data = max(5, height/20). */ | 4433 | it maps line-movement to call_data = max(5, height/20). */ |
| 4434 | else if (xaw3d_arrow_scroll && abs (position) <= max (5, height / 20)) | 4434 | else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20)) |
| 4435 | part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow; | 4435 | part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow; |
| 4436 | else | 4436 | else |
| 4437 | part = scroll_bar_move_ratio; | 4437 | part = scroll_bar_move_ratio; |
| @@ -8747,7 +8747,8 @@ x_sync_with_move (f, left, top, fuzzy) | |||
| 8747 | /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40 | 8747 | /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40 |
| 8748 | pixels. */ | 8748 | pixels. */ |
| 8749 | 8749 | ||
| 8750 | if (abs (current_left - left) <= 10 && abs (current_top - top) <= 40) | 8750 | if (eabs (current_left - left) <= 10 |
| 8751 | && eabs (current_top - top) <= 40) | ||
| 8751 | return; | 8752 | return; |
| 8752 | } | 8753 | } |
| 8753 | else if (current_left == left && current_top == top) | 8754 | else if (current_left == left && current_top == top) |