aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
authorKim F. Storm2003-05-24 22:09:50 +0000
committerKim F. Storm2003-05-24 22:09:50 +0000
commit9882535b5cf98d099a126c2bc02f956b9e5168c9 (patch)
treead1babe801e15abe2d801b452c3848c15eb4202c /src/scroll.c
parentbe78600073726b2f67cb1f05f60d470ae99d50d5 (diff)
downloademacs-9882535b5cf98d099a126c2bc02f956b9e5168c9.tar.gz
emacs-9882535b5cf98d099a126c2bc02f956b9e5168c9.zip
Make (some) trivial substitutions for renamed and
new macros in dispextern.h, frame.h and window.h.
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/scroll.c b/src/scroll.c
index ccbc85ac8b2..d7535509007 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -96,7 +96,7 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
96 int free_at_end; 96 int free_at_end;
97{ 97{
98 register int i, j; 98 register int i, j;
99 int frame_height = FRAME_HEIGHT (frame); 99 int frame_lines = FRAME_LINES (frame);
100 register struct matrix_elt *p, *p1; 100 register struct matrix_elt *p, *p1;
101 register int cost, cost1; 101 register int cost, cost1;
102 102
@@ -105,18 +105,18 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
105 at the i'th line of the lines we are considering, 105 at the i'th line of the lines we are considering,
106 where I is origin 1 (as it is below). */ 106 where I is origin 1 (as it is below). */
107 int *first_insert_cost 107 int *first_insert_cost
108 = &FRAME_INSERT_COST (frame)[frame_height - 1 - lines_moved]; 108 = &FRAME_INSERT_COST (frame)[frame_lines - 1 - lines_moved];
109 int *first_delete_cost 109 int *first_delete_cost
110 = &FRAME_DELETE_COST (frame)[frame_height - 1 - lines_moved]; 110 = &FRAME_DELETE_COST (frame)[frame_lines - 1 - lines_moved];
111 int *next_insert_cost 111 int *next_insert_cost
112 = &FRAME_INSERTN_COST (frame)[frame_height - 1 - lines_moved]; 112 = &FRAME_INSERTN_COST (frame)[frame_lines - 1 - lines_moved];
113 int *next_delete_cost 113 int *next_delete_cost
114 = &FRAME_DELETEN_COST (frame)[frame_height - 1 - lines_moved]; 114 = &FRAME_DELETEN_COST (frame)[frame_lines - 1 - lines_moved];
115 115
116 /* Discourage long scrolls on fast lines. 116 /* Discourage long scrolls on fast lines.
117 Don't scroll nearly a full frame height unless it saves 117 Don't scroll nearly a full frame height unless it saves
118 at least 1/4 second. */ 118 at least 1/4 second. */
119 int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); 119 int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame));
120 120
121 if (baud_rate <= 0) 121 if (baud_rate <= 0)
122 extra_cost = 1; 122 extra_cost = 1;
@@ -438,27 +438,27 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below,
438 int free_at_end; 438 int free_at_end;
439{ 439{
440 register int i, j; 440 register int i, j;
441 int frame_height = FRAME_HEIGHT (frame); 441 int frame_lines = FRAME_LINES (frame);
442 register struct matrix_elt *p, *p1; 442 register struct matrix_elt *p, *p1;
443 register int cost, cost1, delta; 443 register int cost, cost1, delta;
444 444
445 /* first_insert_cost[-I] is the cost of doing the first insert-line 445 /* first_insert_cost[-I] is the cost of doing the first insert-line
446 at a position I lines above the bottom line in the scroll window. */ 446 at a position I lines above the bottom line in the scroll window. */
447 int *first_insert_cost 447 int *first_insert_cost
448 = &FRAME_INSERT_COST (frame)[frame_height - 1]; 448 = &FRAME_INSERT_COST (frame)[frame_lines - 1];
449 int *first_delete_cost 449 int *first_delete_cost
450 = &FRAME_DELETE_COST (frame)[frame_height - 1]; 450 = &FRAME_DELETE_COST (frame)[frame_lines - 1];
451 int *next_insert_cost 451 int *next_insert_cost
452 = &FRAME_INSERTN_COST (frame)[frame_height - 1]; 452 = &FRAME_INSERTN_COST (frame)[frame_lines - 1];
453 int *next_delete_cost 453 int *next_delete_cost
454 = &FRAME_DELETEN_COST (frame)[frame_height - 1]; 454 = &FRAME_DELETEN_COST (frame)[frame_lines - 1];
455 455
456 int scroll_overhead; 456 int scroll_overhead;
457 457
458 /* Discourage long scrolls on fast lines. 458 /* Discourage long scrolls on fast lines.
459 Don't scroll nearly a full frame height unless it saves 459 Don't scroll nearly a full frame height unless it saves
460 at least 1/4 second. */ 460 at least 1/4 second. */
461 int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); 461 int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame));
462 462
463 if (baud_rate <= 0) 463 if (baud_rate <= 0)
464 extra_cost = 1; 464 extra_cost = 1;
@@ -909,7 +909,7 @@ scroll_cost (frame, from, to, amount)
909 will not be involved in actual motion. */ 909 will not be involved in actual motion. */
910 int limit = to; 910 int limit = to;
911 int offset; 911 int offset;
912 int height = FRAME_HEIGHT (frame); 912 int height = FRAME_LINES (frame);
913 913
914 if (amount == 0) 914 if (amount == 0)
915 return 0; 915 return 0;
@@ -947,11 +947,11 @@ line_ins_del (frame, ov1, pf1, ovn, pfn, ov, mf)
947 register int *ov, *mf; 947 register int *ov, *mf;
948{ 948{
949 register int i; 949 register int i;
950 register int frame_height = FRAME_HEIGHT (frame); 950 register int frame_lines = FRAME_LINES (frame);
951 register int insert_overhead = ov1 * 10; 951 register int insert_overhead = ov1 * 10;
952 register int next_insert_cost = ovn * 10; 952 register int next_insert_cost = ovn * 10;
953 953
954 for (i = frame_height-1; i >= 0; i--) 954 for (i = frame_lines-1; i >= 0; i--)
955 { 955 {
956 mf[i] = next_insert_cost / 10; 956 mf[i] = next_insert_cost / 10;
957 next_insert_cost += pfn; 957 next_insert_cost += pfn;
@@ -1000,12 +1000,12 @@ ins_del_costs (frame,
1000 only) and those that must repeatedly insert one line. 1000 only) and those that must repeatedly insert one line.
1001 1001
1002 The cost to insert N lines at line L is 1002 The cost to insert N lines at line L is
1003 [tt.t_ILov + (frame_height + 1 - L) * tt.t_ILpf] + 1003 [tt.t_ILov + (frame_lines + 1 - L) * tt.t_ILpf] +
1004 N * [tt.t_ILnov + (frame_height + 1 - L) * tt.t_ILnpf] 1004 N * [tt.t_ILnov + (frame_lines + 1 - L) * tt.t_ILnpf]
1005 1005
1006 ILov represents the basic insert line overhead. ILpf is the padding 1006 ILov represents the basic insert line overhead. ILpf is the padding
1007 required to allow the terminal time to move a line: insertion at line 1007 required to allow the terminal time to move a line: insertion at line
1008 L changes (frame_height + 1 - L) lines. 1008 L changes (frame_lines + 1 - L) lines.
1009 1009
1010 The first bracketed expression above is the overhead; the second is 1010 The first bracketed expression above is the overhead; the second is
1011 the multiply factor. Both are dependent only on the position at 1011 the multiply factor. Both are dependent only on the position at
@@ -1035,27 +1035,27 @@ do_line_insertion_deletion_costs (frame,
1035 { 1035 {
1036 FRAME_INSERT_COST (frame) = 1036 FRAME_INSERT_COST (frame) =
1037 (int *) xrealloc (FRAME_INSERT_COST (frame), 1037 (int *) xrealloc (FRAME_INSERT_COST (frame),
1038 FRAME_HEIGHT (frame) * sizeof (int)); 1038 FRAME_LINES (frame) * sizeof (int));
1039 FRAME_DELETEN_COST (frame) = 1039 FRAME_DELETEN_COST (frame) =
1040 (int *) xrealloc (FRAME_DELETEN_COST (frame), 1040 (int *) xrealloc (FRAME_DELETEN_COST (frame),
1041 FRAME_HEIGHT (frame) * sizeof (int)); 1041 FRAME_LINES (frame) * sizeof (int));
1042 FRAME_INSERTN_COST (frame) = 1042 FRAME_INSERTN_COST (frame) =
1043 (int *) xrealloc (FRAME_INSERTN_COST (frame), 1043 (int *) xrealloc (FRAME_INSERTN_COST (frame),
1044 FRAME_HEIGHT (frame) * sizeof (int)); 1044 FRAME_LINES (frame) * sizeof (int));
1045 FRAME_DELETE_COST (frame) = 1045 FRAME_DELETE_COST (frame) =
1046 (int *) xrealloc (FRAME_DELETE_COST (frame), 1046 (int *) xrealloc (FRAME_DELETE_COST (frame),
1047 FRAME_HEIGHT (frame) * sizeof (int)); 1047 FRAME_LINES (frame) * sizeof (int));
1048 } 1048 }
1049 else 1049 else
1050 { 1050 {
1051 FRAME_INSERT_COST (frame) = 1051 FRAME_INSERT_COST (frame) =
1052 (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); 1052 (int *) xmalloc (FRAME_LINES (frame) * sizeof (int));
1053 FRAME_DELETEN_COST (frame) = 1053 FRAME_DELETEN_COST (frame) =
1054 (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); 1054 (int *) xmalloc (FRAME_LINES (frame) * sizeof (int));
1055 FRAME_INSERTN_COST (frame) = 1055 FRAME_INSERTN_COST (frame) =
1056 (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); 1056 (int *) xmalloc (FRAME_LINES (frame) * sizeof (int));
1057 FRAME_DELETE_COST (frame) = 1057 FRAME_DELETE_COST (frame) =
1058 (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); 1058 (int *) xmalloc (FRAME_LINES (frame) * sizeof (int));
1059 } 1059 }
1060 1060
1061 ins_del_costs (frame, 1061 ins_del_costs (frame,