Commit 385ed61f authored by Karoly Lorentey's avatar Karoly Lorentey

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
parent 5ffa0039
......@@ -968,10 +968,6 @@ extern int fonts_changed_p;
extern struct glyph space_glyph;
/* Frame being updated by update_window/update_frame. */
extern struct frame *updating_frame;
/* Window being updated by update_window. This is non-null as long as
update_window has not finished, and null otherwise. It's role is
analogous to updating_frame. */
......@@ -2777,8 +2773,8 @@ void clear_glyph_row P_ ((struct glyph_row *));
void prepare_desired_row P_ ((struct glyph_row *));
int line_hash_code P_ ((struct glyph_row *));
void set_window_update_flags P_ ((struct window *, int));
void write_glyphs P_ ((struct glyph *, int));
void insert_glyphs P_ ((struct glyph *, int));
void write_glyphs P_ ((struct frame *, struct glyph *, int));
void insert_glyphs P_ ((struct frame *, struct glyph *, int));
void redraw_frame P_ ((struct frame *));
void redraw_garbaged_frames P_ ((void));
int scroll_cost P_ ((struct frame *, int, int, int));
......@@ -2797,20 +2793,20 @@ extern Lisp_Object Qredisplay_dont_pause;
/* Defined in term.c */
extern void ring_bell P_ ((void));
extern void ring_bell P_ ((struct frame *));
extern void update_begin P_ ((struct frame *));
extern void update_end P_ ((struct frame *));
extern void set_terminal_window P_ ((int));
extern void set_scroll_region P_ ((int, int));
extern void set_terminal_window P_ ((struct frame *, int));
extern void set_scroll_region P_ ((struct frame *, int, int));
extern void turn_off_insert P_ ((struct tty_display_info *));
extern void turn_off_highlight P_ ((struct tty_display_info *));
extern void background_highlight P_ ((struct tty_display_info *));
extern void clear_frame P_ ((void));
extern void clear_end_of_line P_ ((int));
extern void clear_end_of_line_raw P_ ((int));
extern void tty_clear_end_of_line P_ ((int));
extern void delete_glyphs P_ ((int));
extern void ins_del_lines P_ ((int, int));
extern void clear_frame P_ ((struct frame *));
extern void clear_end_of_line P_ ((struct frame *, int));
extern void clear_end_of_line_raw P_ ((struct frame *, int));
extern void tty_clear_end_of_line P_ ((struct frame *, int));
extern void delete_glyphs P_ ((struct frame *, int));
extern void ins_del_lines P_ ((struct frame *, int, int));
extern int string_cost P_ ((char *));
extern int per_line_cost P_ ((char *));
extern void calculate_costs P_ ((struct frame *));
......@@ -2822,7 +2818,7 @@ extern struct display *init_initial_display P_ ((void));
extern struct display *term_init P_ ((char *, char *, int));
extern void delete_tty P_ ((struct display *));
extern void fatal P_ ((/* char *, ... */));
extern void cursor_to P_ ((int, int));
extern void cursor_to P_ ((struct frame *, int, int));
extern int tty_capable_p P_ ((struct tty_display_info *, unsigned, unsigned long, unsigned long));
extern void tty_set_terminal_modes P_ ((struct display *));
extern void tty_reset_terminal_modes P_ ((struct display *));
......
......@@ -3312,7 +3312,7 @@ DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
if (FRAME_MSDOS_P (f))
set_terminal_modes (FRAME_DISPLAY (f));
#endif
clear_frame ();
clear_frame (f);
clear_current_matrices (f);
update_end (f);
if (FRAME_TERMCAP_P (f))
......@@ -3622,9 +3622,9 @@ direct_output_for_insert (g)
else
{
if (glyphs == end - n)
write_glyphs (glyphs, n);
write_glyphs (f, glyphs, n);
else
insert_glyphs (glyphs, n);
insert_glyphs (f, glyphs, n);
}
w->cursor.hpos += n;
......@@ -3647,7 +3647,7 @@ direct_output_for_insert (g)
? XFASTINT (w->left_margin_cols)
: 0));
y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
cursor_to (y, x);
cursor_to (f, y, x);
}
#ifdef HAVE_WINDOW_SYSTEM
......@@ -3747,7 +3747,7 @@ direct_output_forward_char (n)
? XFASTINT (w->left_margin_cols)
: 0));
y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
cursor_to (y, x);
cursor_to (f, y, x);
}
if (FRAME_TERMCAP_P (f))
......@@ -5234,7 +5234,7 @@ update_frame_1 (f, force_p, inhibit_id_p)
}
}
cursor_to (row, col);
cursor_to (f, row, col);
}
else
{
......@@ -5256,7 +5256,7 @@ update_frame_1 (f, force_p, inhibit_id_p)
x += XFASTINT (w->left_margin_cols);
/* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */
cursor_to (y, x);
cursor_to (f, y, x);
}
}
}
......@@ -5472,8 +5472,8 @@ update_frame_line (f, vpos)
/* Write the contents of the desired line. */
if (nlen)
{
cursor_to (vpos, 0);
write_glyphs (nbody, nlen);
cursor_to (f, vpos, 0);
write_glyphs (f, nbody, nlen);
}
/* Don't call clear_end_of_line if we already wrote the whole
......@@ -5481,13 +5481,13 @@ update_frame_line (f, vpos)
case but in the line below. */
if (nlen < FRAME_TOTAL_COLS (f))
{
cursor_to (vpos, nlen);
clear_end_of_line (FRAME_TOTAL_COLS (f));
cursor_to (f, vpos, nlen);
clear_end_of_line (f, FRAME_TOTAL_COLS (f));
}
else
/* Make sure we are in the right row, otherwise cursor movement
with cmgoto might use `ch' in the wrong row. */
cursor_to (vpos, 0);
cursor_to (f, vpos, 0);
make_current (desired_matrix, current_matrix, vpos);
return;
......@@ -5519,8 +5519,8 @@ update_frame_line (f, vpos)
++j;
/* Output this run of non-matching chars. */
cursor_to (vpos, i);
write_glyphs (nbody + i, j - i);
cursor_to (f, vpos, i);
write_glyphs (f, nbody + i, j - i);
i = j - 1;
/* Now find the next non-match. */
......@@ -5530,8 +5530,8 @@ update_frame_line (f, vpos)
/* Clear the rest of the line, or the non-clear part of it. */
if (olen > nlen)
{
cursor_to (vpos, nlen);
clear_end_of_line (olen);
cursor_to (f, vpos, nlen);
clear_end_of_line (f, olen);
}
/* Make current row = desired row. */
......@@ -5553,8 +5553,8 @@ update_frame_line (f, vpos)
if (nlen > nsp)
{
cursor_to (vpos, nsp);
write_glyphs (nbody + nsp, nlen - nsp);
cursor_to (f, vpos, nsp);
write_glyphs (f, nbody + nsp, nlen - nsp);
}
/* Exchange contents between current_frame and new_frame. */
......@@ -5626,8 +5626,8 @@ update_frame_line (f, vpos)
if (osp > nsp)
{
cursor_to (vpos, nsp);
delete_glyphs (osp - nsp);
cursor_to (f, vpos, nsp);
delete_glyphs (f, osp - nsp);
}
else if (nsp > osp)
{
......@@ -5636,12 +5636,12 @@ update_frame_line (f, vpos)
must delete first to avoid losing data in the insert */
if (endmatch && nlen < olen + nsp - osp)
{
cursor_to (vpos, nlen - endmatch + osp - nsp);
delete_glyphs (olen + nsp - osp - nlen);
cursor_to (f, vpos, nlen - endmatch + osp - nsp);
delete_glyphs (f, olen + nsp - osp - nlen);
olen = nlen - (nsp - osp);
}
cursor_to (vpos, osp);
insert_glyphs (0, nsp - osp);
cursor_to (f, vpos, osp);
insert_glyphs (f, 0, nsp - osp);
}
olen += nsp - osp;
......@@ -5662,8 +5662,8 @@ update_frame_line (f, vpos)
unnecessary cursor movement. */
if (nlen - tem > 0)
{
cursor_to (vpos, nsp + begmatch);
write_glyphs (nbody + nsp + begmatch, nlen - tem);
cursor_to (f, vpos, nsp + begmatch);
write_glyphs (f, nbody + nsp + begmatch, nlen - tem);
}
}
else if (nlen > olen)
......@@ -5678,27 +5678,27 @@ update_frame_line (f, vpos)
int out = olen - tem; /* Columns to be overwritten originally. */
int del;
cursor_to (vpos, nsp + begmatch);
cursor_to (f, vpos, nsp + begmatch);
/* Calculate columns we can actually overwrite. */
while (CHAR_GLYPH_PADDING_P (nbody[nsp + begmatch + out]))
out--;
write_glyphs (nbody + nsp + begmatch, out);
write_glyphs (f, nbody + nsp + begmatch, out);
/* If we left columns to be overwritten, we must delete them. */
del = olen - tem - out;
if (del > 0)
delete_glyphs (del);
delete_glyphs (f, del);
/* At last, we insert columns not yet written out. */
insert_glyphs (nbody + nsp + begmatch + out, nlen - olen + del);
insert_glyphs (f, nbody + nsp + begmatch + out, nlen - olen + del);
olen = nlen;
}
else if (olen > nlen)
{
cursor_to (vpos, nsp + begmatch);
write_glyphs (nbody + nsp + begmatch, nlen - tem);
delete_glyphs (olen - nlen);
cursor_to (f, vpos, nsp + begmatch);
write_glyphs (f, nbody + nsp + begmatch, nlen - tem);
delete_glyphs (f, olen - nlen);
olen = nlen;
}
}
......@@ -5707,8 +5707,8 @@ update_frame_line (f, vpos)
/* If any unerased characters remain after the new line, erase them. */
if (olen > nlen)
{
cursor_to (vpos, nlen);
clear_end_of_line (olen);
cursor_to (f, vpos, nlen);
clear_end_of_line (f, olen);
}
/* Exchange contents between current_frame and new_frame. */
......@@ -6275,9 +6275,7 @@ terminate any keyboard macro currently executing. */)
if (noninteractive)
putchar (07);
else
ring_bell ();
if (FRAME_TERMCAP_P (XFRAME (selected_frame)))
fflush (CURTTY ()->output);
ring_bell (XFRAME (selected_frame));
}
else
bitch_at_user ();
......@@ -6293,9 +6291,7 @@ bitch_at_user ()
else if (!INTERACTIVE) /* Stop executing a keyboard macro. */
error ("Keyboard macro terminated by a command ringing the bell");
else
ring_bell ();
if (FRAME_TERMCAP_P (XFRAME (selected_frame)))
fflush (CURTTY ()->output);
ring_bell (XFRAME (selected_frame));
}
......
......@@ -78,6 +78,8 @@ extern int errno;
#include "charset.h"
#include "coding.h"
#include "window.h"
#include "frame.h"
#include "dispextern.h"
#ifdef WINDOWSNT
#define NOMINMAX 1
......@@ -5619,7 +5621,7 @@ auto_save_error (error)
int i, nbytes;
struct gcpro gcpro1;
ring_bell ();
ring_bell (XFRAME (selected_frame));
args[0] = build_string ("Auto-saving %s: %s");
args[1] = current_buffer->name;
......
......@@ -58,10 +58,12 @@ struct matrix_elt
unsigned char writecount;
};
static void do_direct_scrolling P_ ((struct glyph_matrix *,
static void do_direct_scrolling P_ ((struct frame *,
struct glyph_matrix *,
struct matrix_elt *,
int, int));
static void do_scrolling P_ ((struct glyph_matrix *,
static void do_scrolling P_ ((struct frame *,
struct glyph_matrix *,
struct matrix_elt *,
int, int));
......@@ -242,7 +244,8 @@ calculate_scrolling (frame, matrix, window_size, lines_below,
of lines. */
static void
do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
do_scrolling (frame, current_matrix, matrix, window_size, unchanged_at_top)
struct frame *frame;
struct glyph_matrix *current_matrix;
struct matrix_elt *matrix;
int window_size;
......@@ -309,12 +312,12 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
/* Set the terminal window, if not done already. */
if (! terminal_window_p)
{
set_terminal_window (window_size + unchanged_at_top);
set_terminal_window (frame, window_size + unchanged_at_top);
terminal_window_p = 1;
}
/* Delete lines on the terminal. */
ins_del_lines (j + unchanged_at_top, - p->deletecount);
ins_del_lines (frame, j + unchanged_at_top, - p->deletecount);
}
else
{
......@@ -339,7 +342,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
/* Set the terminal window if not yet done. */
if (!terminal_window_p)
{
set_terminal_window (window_size + unchanged_at_top);
set_terminal_window (frame, window_size + unchanged_at_top);
terminal_window_p = 1;
}
......@@ -348,7 +351,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
--queue;
/* Do the deletion on the terminal. */
ins_del_lines (queue->pos, queue->count);
ins_del_lines (frame, queue->pos, queue->count);
/* All lines in the range deleted become empty in the glyph
matrix. Assign to them glyph rows that are not retained.
......@@ -381,7 +384,7 @@ do_scrolling (current_matrix, matrix, window_size, unchanged_at_top)
CHECK_MATRIX (current_matrix);
if (terminal_window_p)
set_terminal_window (0);
set_terminal_window (frame, 0);
}
......@@ -652,8 +655,9 @@ calculate_direct_scrolling (frame, matrix, window_size, lines_below,
the cost matrix for this approach is constructed. */
static void
do_direct_scrolling (current_matrix, cost_matrix, window_size,
unchanged_at_top)
do_direct_scrolling (frame, current_matrix, cost_matrix,
window_size, unchanged_at_top)
struct frame *frame;
struct glyph_matrix *current_matrix;
struct matrix_elt *cost_matrix;
int window_size;
......@@ -744,9 +748,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
if (i > j)
{
/* Immediately insert lines */
set_terminal_window (i + unchanged_at_top);
set_terminal_window (frame, i + unchanged_at_top);
terminal_window_p = 1;
ins_del_lines (j - n_to_write + unchanged_at_top, i - j);
ins_del_lines (frame, j - n_to_write + unchanged_at_top, i - j);
}
else if (i < j)
{
......@@ -776,9 +780,9 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
--queue;
if (queue->count)
{
set_terminal_window (queue->window);
set_terminal_window (frame, queue->window);
terminal_window_p = 1;
ins_del_lines (queue->pos, queue->count);
ins_del_lines (frame, queue->pos, queue->count);
}
else
{
......@@ -801,7 +805,7 @@ do_direct_scrolling (current_matrix, cost_matrix, window_size,
copy_from, retained_p);
if (terminal_window_p)
set_terminal_window (0);
set_terminal_window (frame, 0);
}
......@@ -827,7 +831,7 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
unchanged_at_bottom,
draw_cost, old_draw_cost,
old_hash, new_hash, free_at_end);
do_direct_scrolling (frame->current_matrix,
do_direct_scrolling (frame, frame->current_matrix,
matrix, window_size, unchanged_at_top);
}
else
......@@ -835,7 +839,8 @@ scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom,
draw_cost, old_hash, new_hash,
free_at_end);
do_scrolling (frame->current_matrix, matrix, window_size,
do_scrolling (frame,
frame->current_matrix, matrix, window_size,
unchanged_at_top);
}
}
......
......@@ -171,11 +171,6 @@ int max_frame_cols;
int max_frame_lines;
/* Frame currently being redisplayed; 0 if not currently redisplaying.
(Direct output does not count). */
FRAME_PTR updating_frame;
/* Non-zero if we have dropped our controlling tty and therefore
should not open a frame on stdout. */
static int no_controlling_tty;
......@@ -201,10 +196,8 @@ extern char *tgetstr ();
#endif /* WINDOWSNT */
void
ring_bell ()
ring_bell (struct frame *f)
{
struct frame *f = XFRAME (selected_frame);
if (!NILP (Vring_bell_function))
{
Lisp_Object function;
......@@ -225,20 +218,20 @@ ring_bell ()
Vring_bell_function = function;
}
else if (FRAME_DISPLAY (f)->ring_bell_hook)
(*FRAME_DISPLAY (f)->ring_bell_hook) ();
(*FRAME_DISPLAY (f)->ring_bell_hook) (f);
}
/* Ring the bell on a tty. */
void
tty_ring_bell ()
tty_ring_bell (struct frame *f)
{
struct frame *f = XFRAME (selected_frame);
struct tty_display_info *tty = FRAME_TTY (f);
OUTPUT (tty, (tty->TS_visible_bell && visible_bell
? tty->TS_visible_bell
: tty->TS_bell));
fflush (tty->output);
}
/* Set up termcap modes for Emacs. */
......@@ -282,7 +275,6 @@ void
update_begin (f)
struct frame *f;
{
updating_frame = f;
if (FRAME_DISPLAY (f)->update_begin_hook)
(*FRAME_DISPLAY (f)->update_begin_hook) (f);
}
......@@ -293,7 +285,6 @@ update_end (f)
{
if (FRAME_DISPLAY (f)->update_end_hook)
(*FRAME_DISPLAY (f)->update_end_hook) (f);
updating_frame = NULL;
}
/* Flag the end of a display update on a termcap display. */
......@@ -315,36 +306,32 @@ tty_update_end (struct frame *f)
that is bounded by calls to update_begin and update_end. */
void
set_terminal_window (size)
set_terminal_window (f, size)
struct frame *f;
int size;
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
if (FRAME_DISPLAY (f)->set_terminal_window_hook)
(*FRAME_DISPLAY (f)->set_terminal_window_hook) (size);
(*FRAME_DISPLAY (f)->set_terminal_window_hook) (f, size);
}
/* The implementation of set_terminal_window for termcap frames. */
void
tty_set_terminal_window (int size)
tty_set_terminal_window (struct frame *f, int size)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
tty->specified_window = size ? size : FRAME_LINES (f);
if (FRAME_SCROLL_REGION_OK (f))
set_scroll_region (0, tty->specified_window);
set_scroll_region (f, 0, tty->specified_window);
}
void
set_scroll_region (start, stop)
set_scroll_region (f, start, stop)
struct frame *f;
int start, stop;
{
char *buf;
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
if (tty->TS_set_scroll_region)
......@@ -463,20 +450,17 @@ highlight_if_desired (struct tty_display_info *tty)
frame-relative coordinates. */
void
cursor_to (vpos, hpos)
cursor_to (f, vpos, hpos)
struct frame *f;
int vpos, hpos;
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
if (FRAME_DISPLAY (f)->cursor_to_hook)
(*FRAME_DISPLAY (f)->cursor_to_hook) (vpos, hpos);
(*FRAME_DISPLAY (f)->cursor_to_hook) (f, vpos, hpos);
}
void
tty_cursor_to (int vpos, int hpos)
tty_cursor_to (struct frame *f, int vpos, int hpos)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
/* Detect the case where we are called from reset_sys_modes
......@@ -497,20 +481,17 @@ tty_cursor_to (int vpos, int hpos)
/* Similar but don't take any account of the wasted characters. */
void
raw_cursor_to (row, col)
raw_cursor_to (f, row, col)
struct frame *f;
int row, col;
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
if (FRAME_DISPLAY (f)->raw_cursor_to_hook)
(*FRAME_DISPLAY (f)->raw_cursor_to_hook) (row, col);
(*FRAME_DISPLAY (f)->raw_cursor_to_hook) (f, row, col);
}
void
tty_raw_cursor_to (int row, int col)
tty_raw_cursor_to (struct frame *f, int row, int col)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
if (curY (tty) == row
......@@ -527,21 +508,18 @@ tty_raw_cursor_to (int row, int col)
/* Clear from cursor to end of frame. */
void
clear_to_end ()
clear_to_end (struct frame *f)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
if (FRAME_DISPLAY (f)->clear_to_end_hook)
(*FRAME_DISPLAY (f)->clear_to_end_hook) ();
(*FRAME_DISPLAY (f)->clear_to_end_hook) (f);
}
/* Clear from cursor to end of frame on a termcap device. */
void
tty_clear_to_end (void)
tty_clear_to_end (struct frame *f)
{
register int i;
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
if (tty->TS_clr_to_bottom)
......@@ -553,8 +531,8 @@ tty_clear_to_end (void)
{
for (i = curY (tty); i < FRAME_LINES (f); i++)
{
cursor_to (i, 0);
clear_end_of_line (FRAME_COLS (f));
cursor_to (f, i, 0);
clear_end_of_line (f, FRAME_COLS (f));
}
}
}
......@@ -562,21 +540,17 @@ tty_clear_to_end (void)
/* Clear entire frame */
void
clear_frame ()
clear_frame (struct frame *f)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
if (FRAME_DISPLAY (f)->clear_frame_hook)
(*FRAME_DISPLAY (f)->clear_frame_hook) ();
(*FRAME_DISPLAY (f)->clear_frame_hook) (f);
}
/* Clear an entire termcap frame. */
void
tty_clear_frame ()
tty_clear_frame (struct frame *f)
{
struct frame *f = (updating_frame ? updating_frame : XFRAME (selected_frame));
struct tty_display_info *tty = FRAME_TTY (f);
if (tty->TS_clr_frame)
......@@ -587,8 +561,8 @@ tty_clear_frame ()
}
else
{
cursor_to (0, 0);
clear_to_end ();
cursor_to (f, 0, 0);
clear_to_end (f);
}
}
......@@ -598,13 +572,12 @@ tty_clear_frame ()
Note that the cursor may be moved, on terminals lacking a `ce' string. */
void