aboutsummaryrefslogtreecommitdiffstats
path: root/src/scroll.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-04-16 15:03:58 +0000
committerKaroly Lorentey2004-04-16 15:03:58 +0000
commit385ed61f9d0bffef8a3f037e8cdc85d0de71bf15 (patch)
treef731aec43c0fd28ae4c35f4102d1d2dd21ab735c /src/scroll.c
parent5ffa0039d41813857b4442d435ad4f65123737c5 (diff)
downloademacs-385ed61f9d0bffef8a3f037e8cdc85d0de71bf15.tar.gz
emacs-385ed61f9d0bffef8a3f037e8cdc85d0de71bf15.zip
Eliminated updating_frame.
src/termhooks.h (cursor_to_hook, raw_cursor_to_hook) (clear_to_end_hook, clear_end_of_line_hook, clear_frame_hook) (ins_del_lines_hook, insert_glyphs_hook, write_glyphs_hook) (delete_glyphs_hook, ring_bell_hook, set_terminal_window_hook): Added frame parameter. src/term.c (ring_bell, tty_ring_bell, set_terminal_window) (tty_set_terminal_window, set_scroll_region, cursor_to) (tty_cursor_to, raw_cursor_to, tty_raw_cursor_to, clear_to_end) (tty_clear_to_end, clear_frame, tty_clear_frame, clear_end_of_line) (tty_clear_end_of_line, write_glyphs, tty_write_glyphs, insert_glyphs) (tty_insert_glyphs, delete_glyphs, tty_delete_glyphs, ins_del_lines) (tty_ins_del_lines): Added frame parameter. src/xterm.c (x_delete_glyphs, x_clear_frame, x_ins_del_lines): Added frame parameter. src/scroll.c (do_direct_scrolling, do_scrolling): Added frame parameter. src/term.c (update_begin, update_end): Don't set updating_frame. src/xfns.c (x_set_tool_bar_lines): Ditto. src/term.c (updating_frame): Removed. src/dispextern.h: Updated prototypes. src/dispnew.c (Fredraw_frame, direct_output_for_insert) (direct_output_forward_char, update_frame_1, update_frame_line) (ding, bitch_at_user): Added frame parameter to calls to redisplay. src/xdisp.c (try_window_id): Ditto. src/scroll.c (do_scrolling, do_direct_scrolling, scrolling_1): Ditto. src/fileio.c (auto_save_error): Ditto. src/term.c (tty_ring_bell): Flush the output stream after beeping. src/dispnew.c (ding, bitch_at_user): Don't fflush CURTTY. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-140
Diffstat (limited to 'src/scroll.c')
-rw-r--r--src/scroll.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/scroll.c b/src/scroll.c
index 8f83851a2e0..5991fec004a 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -58,10 +58,12 @@ struct matrix_elt
58 unsigned char writecount; 58 unsigned char writecount;
59 }; 59 };
60 60
61static void do_direct_scrolling P_ ((struct glyph_matrix *, 61static void do_direct_scrolling P_ ((struct frame *,
62 struct glyph_matrix *,
62 struct matrix_elt *, 63 struct matrix_elt *,
63 int, int)); 64 int, int));
64static void do_scrolling P_ ((struct glyph_matrix *, 65static void do_scrolling P_ ((struct frame *,
66 struct glyph_matrix *,
65 struct matrix_elt *, 67 struct matrix_elt *,
66 int, int)); 68 int, int));
67 69
@@ -242,7 +244,8 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
242 of lines. */ 244 of lines. */
243 245
244static void 246static void
245do_scrolling (current_matrix, matrix, window_size, unchanged_at_top) 247do_scrolling (frame, current_matrix, matrix, window_size, unchanged_at_top)
248 struct frame *frame;
246 struct glyph_matrix *current_matrix; 249 struct glyph_matrix *current_matrix;
247 struct matrix_elt *matrix; 250 struct matrix_elt *matrix;
248 int window_size; 251 int window_size;
@@ -309,12 +312,12 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
309 /* Set the terminal window, if not done already. */ 312 /* Set the terminal window, if not done already. */
310 if (! terminal_window_p) 313 if (! terminal_window_p)
311 { 314 {
312 set_terminal_window (window_size + unchanged_at_top); 315 set_terminal_window (frame, window_size + unchanged_at_top);
313 terminal_window_p = 1; 316 terminal_window_p = 1;
314 } 317 }
315 318
316 /* Delete lines on the terminal. */ 319 /* Delete lines on the terminal. */
317 ins_del_lines (j + unchanged_at_top, - p->deletecount); 320 ins_del_lines (frame, j + unchanged_at_top, - p->deletecount);
318 } 321 }
319 else 322 else
320 { 323 {
@@ -339,7 +342,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
339 /* Set the terminal window if not yet done. */ 342 /* Set the terminal window if not yet done. */
340 if (!terminal_window_p) 343 if (!terminal_window_p)
341 { 344 {
342 set_terminal_window (window_size + unchanged_at_top); 345 set_terminal_window (frame, window_size + unchanged_at_top);
343 terminal_window_p = 1; 346 terminal_window_p = 1;
344 } 347 }
345 348
@@ -348,7 +351,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
348 --queue; 351 --queue;
349 352
350 /* Do the deletion on the terminal. */ 353 /* Do the deletion on the terminal. */
351 ins_del_lines (queue->pos, queue->count); 354 ins_del_lines (frame, queue->pos, queue->count);
352 355
353 /* All lines in the range deleted become empty in the glyph 356 /* All lines in the range deleted become empty in the glyph
354 matrix. Assign to them glyph rows that are not retained. 357 matrix. Assign to them glyph rows that are not retained.
@@ -381,7 +384,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
381 CHECK_MATRIX (current_matrix); 384 CHECK_MATRIX (current_matrix);
382 385
383 if (terminal_window_p) 386 if (terminal_window_p)
384 set_terminal_window (0); 387 set_terminal_window (frame, 0);
385} 388}
386 389
387 390
@@ -652,8 +655,9 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below,
652 the cost matrix for this approach is constructed. */ 655 the cost matrix for this approach is constructed. */
653 656
654static void 657static void
655do_direct_scrolling (current_matrix, cost_matrix, window_size, 658do_direct_scrolling (frame, current_matrix, cost_matrix,
656 unchanged_at_top) 659 window_size, unchanged_at_top)
660 struct frame *frame;
657 struct glyph_matrix *current_matrix; 661 struct glyph_matrix *current_matrix;
658 struct matrix_elt *cost_matrix; 662 struct matrix_elt *cost_matrix;
659 int window_size; 663 int window_size;
@@ -744,9 +748,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
744 if (i > j) 748 if (i > j)
745 { 749 {
746 /* Immediately insert lines */ 750 /* Immediately insert lines */
747 set_terminal_window (i + unchanged_at_top); 751 set_terminal_window (frame, i + unchanged_at_top);
748 terminal_window_p = 1; 752 terminal_window_p = 1;
749 ins_del_lines (j - n_to_write + unchanged_at_top, i - j); 753 ins_del_lines (frame, j - n_to_write + unchanged_at_top, i - j);
750 } 754 }
751 else if (i < j) 755 else if (i < j)
752 { 756 {
@@ -776,9 +780,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
776 --queue; 780 --queue;
777 if (queue->count) 781 if (queue->count)
778 { 782 {
779 set_terminal_window (queue->window); 783 set_terminal_window (frame, queue->window);
780 terminal_window_p = 1; 784 terminal_window_p = 1;
781 ins_del_lines (queue->pos, queue->count); 785 ins_del_lines (frame, queue->pos, queue->count);
782 } 786 }
783 else 787 else
784 { 788 {
@@ -801,7 +805,7 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
801 copy_from, retained_p); 805 copy_from, retained_p);
802 806
803 if (terminal_window_p) 807 if (terminal_window_p)
804 set_terminal_window (0); 808 set_terminal_window (frame, 0);
805} 809}
806 810
807 811
@@ -827,7 +831,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
827 unchanged_at_bottom, 831 unchanged_at_bottom,
828 draw_cost, old_draw_cost, 832 draw_cost, old_draw_cost,
829 old_hash, new_hash, free_at_end); 833 old_hash, new_hash, free_at_end);
830 do_direct_scrolling (frame->current_matrix, 834 do_direct_scrolling (frame, frame->current_matrix,
831 matrix, window_size, unchanged_at_top); 835 matrix, window_size, unchanged_at_top);
832 } 836 }
833 else 837 else
@@ -835,7 +839,8 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
835 calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom, 839 calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom,
836 draw_cost, old_hash, new_hash, 840 draw_cost, old_hash, new_hash,
837 free_at_end); 841 free_at_end);
838 do_scrolling (frame->current_matrix, matrix, window_size, 842 do_scrolling (frame,
843 frame->current_matrix, matrix, window_size,
839 unchanged_at_top); 844 unchanged_at_top);
840 } 845 }
841} 846}