Commit f0812d35 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Fix EMACS_INT/int conversion in scroll.c.

parent f5c7fc27
2010-09-24 Lars Magne Ingebrigtsen <larsi@gnus.org> 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.c (move_cache_gap, set_cache_region, pp_cache)
(region_cache_backward, region_cache_forward) (region_cache_backward, region_cache_forward)
(revalidate_region_cache, set_cache_region): FIX EMACS_INT/int (revalidate_region_cache, set_cache_region): FIX EMACS_INT/int
......
...@@ -94,7 +94,7 @@ calculate_scrolling (FRAME_PTR frame, ...@@ -94,7 +94,7 @@ calculate_scrolling (FRAME_PTR frame,
int free_at_end) int free_at_end)
{ {
register int i, j; register int i, j;
int frame_lines = FRAME_LINES (frame); EMACS_INT frame_lines = FRAME_LINES (frame);
register struct matrix_elt *p, *p1; register struct matrix_elt *p, *p1;
register int cost, cost1; register int cost, cost1;
...@@ -115,7 +115,7 @@ calculate_scrolling (FRAME_PTR frame, ...@@ -115,7 +115,7 @@ calculate_scrolling (FRAME_PTR frame,
/* Discourage long scrolls on fast lines. /* Discourage long scrolls on fast lines.
Don't scroll nearly a full frame height unless it saves Don't scroll nearly a full frame height unless it saves
at least 1/4 second. */ 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) if (baud_rate <= 0)
extra_cost = 1; extra_cost = 1;
...@@ -428,7 +428,7 @@ calculate_direct_scrolling (FRAME_PTR frame, ...@@ -428,7 +428,7 @@ calculate_direct_scrolling (FRAME_PTR frame,
int free_at_end) int free_at_end)
{ {
register int i, j; register int i, j;
int frame_lines = FRAME_LINES (frame); EMACS_INT frame_lines = FRAME_LINES (frame);
register struct matrix_elt *p, *p1; register struct matrix_elt *p, *p1;
register int cost, cost1, delta; register int cost, cost1, delta;
...@@ -448,7 +448,7 @@ calculate_direct_scrolling (FRAME_PTR frame, ...@@ -448,7 +448,7 @@ calculate_direct_scrolling (FRAME_PTR frame,
/* Discourage long scrolls on fast lines. /* Discourage long scrolls on fast lines.
Don't scroll nearly a full frame height unless it saves Don't scroll nearly a full frame height unless it saves
at least 1/4 second. */ 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) if (baud_rate <= 0)
extra_cost = 1; extra_cost = 1;
...@@ -886,9 +886,9 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount) ...@@ -886,9 +886,9 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount)
{ {
/* Compute how many lines, at bottom of frame, /* Compute how many lines, at bottom of frame,
will not be involved in actual motion. */ will not be involved in actual motion. */
int limit = to; EMACS_INT limit = to;
int offset; EMACS_INT offset;
int height = FRAME_LINES (frame); EMACS_INT height = FRAME_LINES (frame);
if (amount == 0) if (amount == 0)
return 0; return 0;
...@@ -921,8 +921,8 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount) ...@@ -921,8 +921,8 @@ scroll_cost (FRAME_PTR frame, int from, int to, int amount)
static void static void
line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf) line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf)
{ {
register int i; register EMACS_INT i;
register int frame_lines = FRAME_LINES (frame); register EMACS_INT frame_lines = FRAME_LINES (frame);
register int insert_overhead = ov1 * 10; register int insert_overhead = ov1 * 10;
register int next_insert_cost = ovn * 10; register int next_insert_cost = ovn * 10;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment