comparison src/xdisp.c @ 85261:a8b8f12ca180

Replace `abs' with `eabs'.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 13 Oct 2007 12:47:25 +0000
parents 5039706521c9
children 591c29778a30
comparison
equal deleted inserted replaced
85260:96a92ff6e0de 85261:a8b8f12ca180
12466 decreased, the new window start will be < the old start. 12466 decreased, the new window start will be < the old start.
12467 So, we're looking for the display line start with the 12467 So, we're looking for the display line start with the
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;
12475 pos = it.current.pos; 12475 pos = it.current.pos;
12476 move_it_by_lines (&it, 1, 0); 12476 move_it_by_lines (&it, 1, 0);
20027 if (slice.y + slice.height == img->height) 20027 if (slice.y + slice.height == img->height)
20028 it->descent += face->box_line_width; 20028 it->descent += face->box_line_width;
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);
20038 20038
20039 /* Automatically crop wide image glyphs at right edge so we can 20039 /* Automatically crop wide image glyphs at right edge so we can
22291 best_x = gx; 22291 best_x = gx;
22292 best_row = r; 22292 best_row = r;
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)))
22301 { 22301 {
22302 best_glyph = g; 22302 best_glyph = g;