Mercurial > emacs
changeset 110550:d33e6623664c
Fix EMACS_INT/int conversion in scroll.c.
author | Lars Magne Ingebrigtsen <larsi@gnus.org> |
---|---|
date | Fri, 24 Sep 2010 17:20:58 +0200 |
parents | f3ee3c073b92 |
children | f28cc7ff91f9 |
files | src/ChangeLog src/scroll.c |
diffstat | 2 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Sep 24 17:13:43 2010 +0200 +++ b/src/ChangeLog Fri Sep 24 17:20:58 2010 +0200 @@ -1,5 +1,9 @@ 2010-09-24 Lars Magne Ingebrigtsen <larsi@gnus.org> + * scroll.c (calculate_scrolling, line_ins_del) + (calculate_direct_scrolling, scroll_cost): Fix EMACS_INT/int + conversion. + * region-cache.c (move_cache_gap, set_cache_region, pp_cache) (region_cache_backward, region_cache_forward) (revalidate_region_cache, set_cache_region): FIX EMACS_INT/int
--- a/src/scroll.c Fri Sep 24 17:13:43 2010 +0200 +++ b/src/scroll.c Fri Sep 24 17:20:58 2010 +0200 @@ -94,7 +94,7 @@ int free_at_end) { register int i, j; - int frame_lines = FRAME_LINES (frame); + EMACS_INT frame_lines = FRAME_LINES (frame); register struct matrix_elt *p, *p1; register int cost, cost1; @@ -115,7 +115,7 @@ /* Discourage long scrolls on fast lines. Don't scroll nearly a full frame height unless it saves at least 1/4 second. */ - int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame)); + int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame))); if (baud_rate <= 0) extra_cost = 1; @@ -428,7 +428,7 @@ int free_at_end) { register int i, j; - int frame_lines = FRAME_LINES (frame); + EMACS_INT frame_lines = FRAME_LINES (frame); register struct matrix_elt *p, *p1; register int cost, cost1, delta; @@ -448,7 +448,7 @@ /* Discourage long scrolls on fast lines. Don't scroll nearly a full frame height unless it saves at least 1/4 second. */ - int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame)); + int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame))); if (baud_rate <= 0) extra_cost = 1; @@ -886,9 +886,9 @@ { /* Compute how many lines, at bottom of frame, will not be involved in actual motion. */ - int limit = to; - int offset; - int height = FRAME_LINES (frame); + EMACS_INT limit = to; + EMACS_INT offset; + EMACS_INT height = FRAME_LINES (frame); if (amount == 0) return 0; @@ -921,8 +921,8 @@ static void line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) { - register int i; - register int frame_lines = FRAME_LINES (frame); + register EMACS_INT i; + register EMACS_INT frame_lines = FRAME_LINES (frame); register int insert_overhead = ov1 * 10; register int next_insert_cost = ovn * 10;