aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
authorTom Tromey2013-08-19 21:53:07 -0600
committerTom Tromey2013-08-19 21:53:07 -0600
commit6d75555c5cc3d2a629646cee7629e67530fa7a36 (patch)
tree3852804dd234ad613ea8691332e10b92c027e87d /src/scroll.c
parentcc231cbe45d27a1906d268fb72d3b4105a2e9c65 (diff)
parent8c2f38aaab7a7a2f0605416fc2ee38701e41ab61 (diff)
downloademacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.tar.gz
emacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.zip
merge from trunk
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 037e338c696..b9ed8c04ba8 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -86,7 +86,7 @@ static void do_scrolling (struct frame *,
86 new contents appears. */ 86 new contents appears. */
87 87
88static void 88static void
89calculate_scrolling (FRAME_PTR frame, 89calculate_scrolling (struct frame *frame,
90 /* matrix is of size window_size + 1 on each side. */ 90 /* matrix is of size window_size + 1 on each side. */
91 struct matrix_elt *matrix, 91 struct matrix_elt *matrix,
92 int window_size, int lines_below, 92 int window_size, int lines_below,
@@ -422,7 +422,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
422 is the equivalent of draw_cost for the old line contents */ 422 is the equivalent of draw_cost for the old line contents */
423 423
424static void 424static void
425calculate_direct_scrolling (FRAME_PTR frame, 425calculate_direct_scrolling (struct frame *frame,
426 /* matrix is of size window_size + 1 on each side. */ 426 /* matrix is of size window_size + 1 on each side. */
427 struct matrix_elt *matrix, 427 struct matrix_elt *matrix,
428 int window_size, int lines_below, 428 int window_size, int lines_below,
@@ -652,8 +652,7 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
652 652
653 /* A queue of deletions and insertions to be performed. */ 653 /* A queue of deletions and insertions to be performed. */
654 struct alt_queue { int count, pos, window; }; 654 struct alt_queue { int count, pos, window; };
655 struct alt_queue *queue_start = (struct alt_queue *) 655 struct alt_queue *queue_start = alloca (window_size * sizeof *queue_start);
656 alloca (window_size * sizeof *queue_start);
657 struct alt_queue *queue = queue_start; 656 struct alt_queue *queue = queue_start;
658 657
659 /* True if a terminal window has been set with set_terminal_window. */ 658 /* True if a terminal window has been set with set_terminal_window. */
@@ -793,13 +792,12 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
793 792
794 793
795void 794void
796scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top, 795scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
797 int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, 796 int unchanged_at_bottom, int *draw_cost, int *old_draw_cost,
798 int *old_hash, int *new_hash, int free_at_end) 797 int *old_hash, int *new_hash, int free_at_end)
799{ 798{
800 struct matrix_elt *matrix; 799 struct matrix_elt *matrix
801 matrix = ((struct matrix_elt *) 800 = alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix);
802 alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix));
803 801
804 if (FRAME_SCROLL_REGION_OK (frame)) 802 if (FRAME_SCROLL_REGION_OK (frame))
805 { 803 {
@@ -883,7 +881,7 @@ scrolling_max_lines_saved (int start, int end,
883 overhead and multiply factor values */ 881 overhead and multiply factor values */
884 882
885static void 883static void
886line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, 884line_ins_del (struct frame *frame, int ov1, int pf1, int ovn, int pfn,
887 register int *ov, register int *mf) 885 register int *ov, register int *mf)
888{ 886{
889 register int i; 887 register int i;
@@ -901,7 +899,7 @@ line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn,
901} 899}
902 900
903static void 901static void
904ins_del_costs (FRAME_PTR frame, 902ins_del_costs (struct frame *frame,
905 const char *one_line_string, const char *multi_string, 903 const char *one_line_string, const char *multi_string,
906 const char *setup_string, const char *cleanup_string, 904 const char *setup_string, const char *cleanup_string,
907 int *costvec, int *ncostvec, 905 int *costvec, int *ncostvec,
@@ -957,7 +955,7 @@ ins_del_costs (FRAME_PTR frame,
957 */ 955 */
958 956
959void 957void
960do_line_insertion_deletion_costs (FRAME_PTR frame, 958do_line_insertion_deletion_costs (struct frame *frame,
961 const char *ins_line_string, 959 const char *ins_line_string,
962 const char *multi_ins_string, 960 const char *multi_ins_string,
963 const char *del_line_string, 961 const char *del_line_string,