diff options
| author | Tom Tromey | 2013-08-19 21:53:07 -0600 |
|---|---|---|
| committer | Tom Tromey | 2013-08-19 21:53:07 -0600 |
| commit | 6d75555c5cc3d2a629646cee7629e67530fa7a36 (patch) | |
| tree | 3852804dd234ad613ea8691332e10b92c027e87d /src/scroll.c | |
| parent | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (diff) | |
| parent | 8c2f38aaab7a7a2f0605416fc2ee38701e41ab61 (diff) | |
| download | emacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.tar.gz emacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.zip | |
merge from trunk
Diffstat (limited to 'src/scroll.c')
| -rw-r--r-- | src/scroll.c | 20 |
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 | ||
| 88 | static void | 88 | static void |
| 89 | calculate_scrolling (FRAME_PTR frame, | 89 | calculate_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 | ||
| 424 | static void | 424 | static void |
| 425 | calculate_direct_scrolling (FRAME_PTR frame, | 425 | calculate_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 | ||
| 795 | void | 794 | void |
| 796 | scrolling_1 (FRAME_PTR frame, int window_size, int unchanged_at_top, | 795 | scrolling_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 | ||
| 885 | static void | 883 | static void |
| 886 | line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, | 884 | line_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 | ||
| 903 | static void | 901 | static void |
| 904 | ins_del_costs (FRAME_PTR frame, | 902 | ins_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 | ||
| 959 | void | 957 | void |
| 960 | do_line_insertion_deletion_costs (FRAME_PTR frame, | 958 | do_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, |