diff options
| author | Jim Blandy | 1992-02-04 01:11:11 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-02-04 01:11:11 +0000 |
| commit | 326e0cf80b4606a6100ab61c1581434ea77da3a0 (patch) | |
| tree | 6e69e7b329f485ce0664171ba2d4ca8fd089aee7 /src | |
| parent | 05ba02ebb44c3b456a3cd8729ac4c4d7121f0e79 (diff) | |
| download | emacs-326e0cf80b4606a6100ab61c1581434ea77da3a0.tar.gz emacs-326e0cf80b4606a6100ab61c1581434ea77da3a0.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/scroll.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/scroll.c b/src/scroll.c index 7432a3ea06c..64dfd9aef25 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -237,6 +237,7 @@ do_scrolling (screen, matrix, window_size, unchanged_at_top) | |||
| 237 | register struct matrix_elt *p; | 237 | register struct matrix_elt *p; |
| 238 | register int i, j; | 238 | register int i, j; |
| 239 | register struct screen_glyphs *current_screen; | 239 | register struct screen_glyphs *current_screen; |
| 240 | /* temp_screen->enable[i] means line i has been moved to current_screen. */ | ||
| 240 | register struct screen_glyphs *temp_screen; | 241 | register struct screen_glyphs *temp_screen; |
| 241 | struct queue { int count, pos; } *queue; | 242 | struct queue { int count, pos; } *queue; |
| 242 | int offset = unchanged_at_top; | 243 | int offset = unchanged_at_top; |
| @@ -487,11 +488,11 @@ line_ins_del (screen, ov1, pf1, ovn, pfn, ov, mf) | |||
| 487 | register int insert_overhead = ov1 * 10; | 488 | register int insert_overhead = ov1 * 10; |
| 488 | register int next_insert_cost = ovn * 10; | 489 | register int next_insert_cost = ovn * 10; |
| 489 | 490 | ||
| 490 | for (i = 0; i < screen_height; i++) | 491 | for (i = screen_height-1; i >= 0; i--) |
| 491 | { | 492 | { |
| 492 | mf[screen_height - i] = next_insert_cost / 10; | 493 | mf[i] = next_insert_cost / 10; |
| 493 | next_insert_cost += pfn; | 494 | next_insert_cost += pfn; |
| 494 | ov[screen_height - i] = (insert_overhead + next_insert_cost) / 10; | 495 | ov[i] = (insert_overhead + next_insert_cost) / 10; |
| 495 | insert_overhead += pf1; | 496 | insert_overhead += pf1; |
| 496 | } | 497 | } |
| 497 | } | 498 | } |
| @@ -568,29 +569,29 @@ do_line_insertion_deletion_costs (screen, | |||
| 568 | { | 569 | { |
| 569 | if (SCREEN_INSERT_COST (screen) != 0) | 570 | if (SCREEN_INSERT_COST (screen) != 0) |
| 570 | { | 571 | { |
| 571 | SCREEN_INSERT_COST (screen) | 572 | SCREEN_INSERT_COST (screen) = |
| 572 | = (int *) xrealloc (SCREEN_INSERT_COST (screen), | 573 | (int *) xrealloc (SCREEN_INSERT_COST (screen), |
| 573 | SCREEN_HEIGHT (screen) * sizeof (int)); | 574 | SCREEN_HEIGHT (screen) * sizeof (int)); |
| 574 | SCREEN_DELETEN_COST (screen) | 575 | SCREEN_DELETEN_COST (screen) = |
| 575 | = (int *) xrealloc (SCREEN_DELETEN_COST (screen), | 576 | (int *) xrealloc (SCREEN_DELETEN_COST (screen), |
| 576 | SCREEN_HEIGHT (screen) * sizeof (int)); | 577 | SCREEN_HEIGHT (screen) * sizeof (int)); |
| 577 | SCREEN_INSERTN_COST (screen) | 578 | SCREEN_INSERTN_COST (screen) = |
| 578 | = (int *) xrealloc (SCREEN_INSERTN_COST (screen), | 579 | (int *) xrealloc (SCREEN_INSERTN_COST (screen), |
| 579 | SCREEN_HEIGHT (screen) * sizeof (int)); | 580 | SCREEN_HEIGHT (screen) * sizeof (int)); |
| 580 | SCREEN_DELETE_COST (screen) | 581 | SCREEN_DELETE_COST (screen) = |
| 581 | = (int *) xrealloc (SCREEN_DELETE_COST (screen), | 582 | (int *) xrealloc (SCREEN_DELETE_COST (screen), |
| 582 | SCREEN_HEIGHT (screen) * sizeof (int)); | 583 | SCREEN_HEIGHT (screen) * sizeof (int)); |
| 583 | } | 584 | } |
| 584 | else | 585 | else |
| 585 | { | 586 | { |
| 586 | SCREEN_INSERT_COST (screen) | 587 | SCREEN_INSERT_COST (screen) = |
| 587 | = (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 588 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); |
| 588 | SCREEN_DELETEN_COST (screen) | 589 | SCREEN_DELETEN_COST (screen) = |
| 589 | = (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 590 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); |
| 590 | SCREEN_INSERTN_COST (screen) | 591 | SCREEN_INSERTN_COST (screen) = |
| 591 | = (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 592 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); |
| 592 | SCREEN_DELETE_COST (screen) | 593 | SCREEN_DELETE_COST (screen) = |
| 593 | = (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 594 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); |
| 594 | } | 595 | } |
| 595 | 596 | ||
| 596 | ins_del_costs (screen, | 597 | ins_del_costs (screen, |