\f
ring_bell ()
{
- if (! FRAME_IS_TERMCAP (selected_frame))
+ if (! FRAME_TERMCAP_P (selected_frame))
{
(*ring_bell_hook) ();
return;
set_terminal_modes ()
{
- if (! FRAME_IS_TERMCAP (selected_frame))
+ if (! FRAME_TERMCAP_P (selected_frame))
{
(*set_terminal_modes_hook) ();
return;
reset_terminal_modes ()
{
- if (! FRAME_IS_TERMCAP (selected_frame))
+ if (! FRAME_TERMCAP_P (selected_frame))
{
(*reset_terminal_modes_hook) ();
return;
FRAME_PTR f;
{
updating_frame = f;
- if (! FRAME_IS_TERMCAP (updating_frame))
+ if (! FRAME_TERMCAP_P (updating_frame))
(*update_begin_hook) (f);
}
update_end (f)
FRAME_PTR f;
{
- if (! FRAME_IS_TERMCAP (updating_frame))
+ if (! FRAME_TERMCAP_P (updating_frame))
{
(*update_end_hook) (f);
updating_frame = 0;
set_terminal_window (size)
int size;
{
- if (! FRAME_IS_TERMCAP (updating_frame))
+ if (! FRAME_TERMCAP_P (updating_frame))
{
(*set_terminal_window_hook) (size);
return;
int highlight;
int vpos;
{
- if (! FRAME_IS_TERMCAP ((updating_frame ? updating_frame : selected_frame)))
+ if (! FRAME_TERMCAP_P ((updating_frame ? updating_frame : selected_frame)))
{
(*reassert_line_highlight_hook) (highlight, vpos);
return;
int new_highlight, vpos, first_unused_hpos;
{
standout_requested = new_highlight;
- if (! FRAME_IS_TERMCAP (updating_frame))
+ if (! FRAME_TERMCAP_P (updating_frame))
{
(*change_line_highlight_hook) (new_highlight, vpos, first_unused_hpos);
return;
cursor_to (row, col)
int row, col;
{
- if (! FRAME_IS_TERMCAP ((updating_frame
+ if (! FRAME_TERMCAP_P ((updating_frame
? updating_frame
: selected_frame))
&& cursor_to_hook)
raw_cursor_to (row, col)
int row, col;
{
- if (! FRAME_IS_TERMCAP ((updating_frame ? updating_frame : selected_frame)))
+ if (! FRAME_TERMCAP_P ((updating_frame ? updating_frame : selected_frame)))
{
(*raw_cursor_to_hook) (row, col);
return;
{
register int i;
- if (clear_to_end_hook && FRAME_IS_TERMCAP (updating_frame))
+ if (clear_to_end_hook && FRAME_TERMCAP_P (updating_frame))
{
(*clear_to_end_hook) ();
return;
clear_frame ()
{
if (clear_frame_hook
- && ! FRAME_IS_TERMCAP ((updating_frame ? updating_frame : selected_frame)))
+ && ! FRAME_TERMCAP_P ((updating_frame ? updating_frame : selected_frame)))
{
(*clear_frame_hook) ();
return;
clear_end_of_line (first_unused_hpos)
int first_unused_hpos;
{
- static GLYPH buf[1] = {SPACEGLYPH};
- if (FRAME_IS_TERMCAP (selected_frame)
+ static GLYPH buf = SPACEGLYPH;
+ if (FRAME_TERMCAP_P (selected_frame)
&& TN_standout_width == 0 && curX == 0 && chars_wasted[curY] != 0)
- write_glyphs (buf, 1);
+ write_glyphs (&buf, 1);
clear_end_of_line_raw (first_unused_hpos);
}
register int i;
if (clear_end_of_line_hook
- && ! FRAME_IS_TERMCAP ((updating_frame
+ && ! FRAME_TERMCAP_P ((updating_frame
? updating_frame
: selected_frame)))
{
register Lisp_Object *tbase = GLYPH_TABLE_BASE;
if (write_glyphs_hook
- && ! FRAME_IS_TERMCAP ((updating_frame ? updating_frame : selected_frame)))
+ && ! FRAME_TERMCAP_P ((updating_frame ? updating_frame : selected_frame)))
{
(*write_glyphs_hook) (string, len);
return;
register int tlen = GLYPH_TABLE_LENGTH;
register Lisp_Object *tbase = GLYPH_TABLE_BASE;
- if (insert_glyphs_hook && ! FRAME_IS_TERMCAP (updating_frame))
+ if (insert_glyphs_hook && ! FRAME_TERMCAP_P (updating_frame))
{
(*insert_glyphs_hook) (start, len);
return;
char *buf;
register int i;
- if (delete_glyphs_hook && ! FRAME_IS_TERMCAP (updating_frame))
+ if (delete_glyphs_hook && ! FRAME_TERMCAP_P (updating_frame))
{
(*delete_glyphs_hook) (n);
return;
register int i = n > 0 ? n : -n;
register char *buf;
- if (ins_del_lines_hook && ! FRAME_IS_TERMCAP (updating_frame))
+ if (ins_del_lines_hook && ! FRAME_TERMCAP_P (updating_frame))
{
(*ins_del_lines_hook) (vpos, n);
return;
}
#ifdef HAVE_X_WINDOWS
-extern int x_frame_planes;
+extern int x_screen_planes;
#endif
calculate_costs (frame)
return;
#ifdef HAVE_X_WINDOWS
- if (FRAME_IS_X (frame))
+ if (FRAME_X_P (frame))
{
do_line_insertion_deletion_costs (frame, 0, ".5*", 0, ".5*",
- 0, 0, x_frame_planes);
+ 0, 0, x_screen_planes);
return;
}
#endif
This function scans the termcap function key sequence entries, and
adds entries to Vfunction_key_map for each function key it finds. */
+struct fkey_table {
+ char *cap, *name;
+};
+
+static struct fkey_table keys[] = {
+ "kl", "left",
+ "kr", "right",
+ "ku", "up",
+ "kd", "down",
+ "K2", "center",
+ "k1", "f1",
+ "k2", "f2",
+ "k3", "f3",
+ "k4", "f4",
+ "k5", "f5",
+ "k6", "f6",
+ "k7", "f7",
+ "k8", "f8",
+ "k9", "f9",
+ "F1", "f11",
+ "F2", "f12",
+ "kh", "home",
+ "kH", "home-down",
+ "ka", "clear-tabs",
+ "kt", "clear-tab",
+ "kT", "set-tab",
+ "kC", "clear",
+ "kL", "deleteline",
+ "kM", "exit-insert",
+ "kE", "clear-eol",
+ "kS", "clear-eos",
+ "kI", "insert",
+ "kA", "insertline",
+ "kN", "next",
+ "kP", "prior",
+ "kF", "scroll-forward",
+ "kR", "scroll-reverse"
+ };
+
void
term_get_fkeys (address)
char **address;
{
extern char *tgetstr ();
- struct fkey_table {
- char *cap, *name;
- };
- static struct fkey_table keys[] = {
- "kl", "left",
- "kr", "right",
- "ku", "up",
- "kd", "down",
- "kh", "home",
- "k1", "f1",
- "k2", "f2",
- "k3", "f3",
- "k4", "f4",
- "k5", "f5",
- "k6", "f6",
- "k7", "f7",
- "k8", "f8",
- "k9", "f9",
- "k0", "f10",
- "kH", "home-down",
- "ka", "clear-tabs",
- "kt", "clear-tab",
- "kT", "set-tab",
- "kC", "clear",
- "kL", "deleteline",
- "kM", "exit-insert",
- "kE", "clear-eol",
- "kS", "clear-eos",
- "kI", "insert",
- "kA", "insertline",
- "kN", "next",
- "kP", "prior",
- "kF", "scroll-forward",
- "kR", "scroll-reverse"
- };
int i;
for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++)
build_string (sequence),
Fmake_vector (make_number (1), intern (keys[i].name)));
}
+
+ /* The uses of the "k0" capability are inconsistent; sometimes it
+ describes F10, whereas othertimes it describes F0 and "k;" describes F10.
+ We will attempt to politely accomodate both systems by testing for
+ "k;", and if it is present, assuming that "k0" denotes F0, otherwise F10.
+ */
+ {
+ char *k_semi = tgetstr ("k;", address);
+ char *k0 = tgetstr ("k0", address);
+ char *k0_name = "f10";
+
+ if (k_semi)
+ {
+ Fdefine_key (Vfunction_key_map,
+ build_string (k_semi),
+ Fmake_vector (make_number (1), intern ("f10")));
+ k0_name = "f0";
+ }
+
+ if (k0)
+ Fdefine_key (Vfunction_key_map,
+ build_string (k0),
+ Fmake_vector (make_number (1), intern (k0_name)));
+ }
}
\f