This is the stock GNU texinfo 4.0 file
This commit is contained in:
parent
f5069999f7
commit
980e0006ad
@ -35,21 +35,28 @@ FUNCTION_DOC function_doc_array[] = {
|
||||
{ info_global_next_node, "global-next-node", "Move forwards or down through node structure" },
|
||||
{ info_global_prev_node, "global-prev-node", "Move backwards or up through node structure" },
|
||||
{ info_scroll_forward, "scroll-forward", "Scroll forward in this window" },
|
||||
{ info_scroll_forward_set_window, "scroll-forward-set-window", "Scroll forward in this window and set default window size" },
|
||||
{ info_scroll_backward, "scroll-backward", "Scroll backward in this window" },
|
||||
{ info_scroll_backward_set_window, "scroll-backward-set-window", "Scroll backward in this window and set default window size" },
|
||||
{ info_beginning_of_node, "beginning-of-node", "Move to the start of this node" },
|
||||
{ info_end_of_node, "end-of-node", "Move to the end of this node" },
|
||||
{ info_down_line, "down-line", "Scroll down by lines" },
|
||||
{ info_up_line, "up-line", "Scroll up by lines" },
|
||||
{ info_scroll_half_screen_down, "scroll-half-screen-down", "Scroll down by half screen size" },
|
||||
{ info_scroll_half_screen_up, "scroll-half-screen-up", "Scroll up by half screen size" },
|
||||
{ info_next_window, "next-window", "Select the next window" },
|
||||
{ info_prev_window, "prev-window", "Select the previous window" },
|
||||
{ info_split_window, "split-window", "Split the current window" },
|
||||
{ info_delete_window, "delete-window", "Delete the current window" },
|
||||
{ info_keep_one_window, "keep-one-window", "Delete all other windows" },
|
||||
{ info_scroll_other_window, "scroll-other-window", "Scroll the other window" },
|
||||
{ info_scroll_other_window_backward, "scroll-other-window-backward", "Scroll the other window backward" },
|
||||
{ info_grow_window, "grow-window", "Grow (or shrink) this window" },
|
||||
{ info_tile_windows, "tile-windows", "Divide the available screen space among the visible windows" },
|
||||
{ info_toggle_wrap, "toggle-wrap", "Toggle the state of line wrapping in the current window" },
|
||||
{ info_next_node, "next-node", "Select the `Next' node" },
|
||||
{ info_prev_node, "prev-node", "Select the `Prev' node" },
|
||||
{ info_up_node, "up-node", "Select the `Up' node" },
|
||||
{ info_next_node, "next-node", "Select the Next node" },
|
||||
{ info_prev_node, "prev-node", "Select the Prev node" },
|
||||
{ info_up_node, "up-node", "Select the Up node" },
|
||||
{ info_last_node, "last-node", "Select the last node in this file" },
|
||||
{ info_first_node, "first-node", "Select the first node in this file" },
|
||||
{ info_last_menu_item, "last-menu-item", "Select the last item in this node's menu" },
|
||||
@ -59,6 +66,8 @@ FUNCTION_DOC function_doc_array[] = {
|
||||
{ info_find_menu, "find-menu", "Move to the start of this node's menu" },
|
||||
{ info_visit_menu, "visit-menu", "Visit as many menu items at once as possible" },
|
||||
{ info_goto_node, "goto-node", "Read a node name and select it" },
|
||||
{ info_menu_sequence, "menu-sequence", "Read a list of menus starting from dir and follow them" },
|
||||
{ info_goto_invocation_node, "goto-invocation-node", "Find the node describing program invocation" },
|
||||
{ info_man, "man", "Read a manpage reference and select it" },
|
||||
{ info_top_node, "top-node", "Select the node `Top' in this file" },
|
||||
{ info_dir_node, "dir-node", "Select the node `(dir)'" },
|
||||
@ -66,14 +75,18 @@ FUNCTION_DOC function_doc_array[] = {
|
||||
{ info_kill_node, "kill-node", "Kill this node" },
|
||||
{ info_view_file, "view-file", "Read the name of a file and select it" },
|
||||
{ info_print_node, "print-node", "Pipe the contents of this node through INFO_PRINT_COMMAND" },
|
||||
{ info_search_case_sensitively, "search-case-sensitively", "Read a string and search for it case-sensitively" },
|
||||
{ info_search, "search", "Read a string and search for it" },
|
||||
{ info_search_backward, "search-backward", "Read a string and search backward for it" },
|
||||
{ info_search_next, "search-next", "Repeat last search in the same direction" },
|
||||
{ info_search_previous, "search-previous", "Repeat last search in the reverse direction" },
|
||||
{ isearch_forward, "isearch-forward", "Search interactively for a string as you type it" },
|
||||
{ isearch_backward, "isearch-backward", "Search interactively for a string as you type it" },
|
||||
{ info_move_to_prev_xref, "move-to-prev-xref", "Move to the previous cross reference" },
|
||||
{ info_move_to_next_xref, "move-to-next-xref", "Move to the next cross reference" },
|
||||
{ info_select_reference_this_line, "select-reference-this-line", "Select reference or menu item appearing on this line" },
|
||||
{ info_abort_key, "abort-key", "Cancel current operation" },
|
||||
{ info_move_to_window_line, "move-to-window-line", "Move to the cursor to a specific line of the window" },
|
||||
{ info_move_to_window_line, "move-to-window-line", "Move the cursor to a specific line of the window" },
|
||||
{ info_redraw_display, "redraw-display", "Redraw the display" },
|
||||
{ info_quit, "quit", "Quit using Info" },
|
||||
{ info_do_lowercase_version, "do-lowercase-version", "" },
|
||||
|
@ -12,15 +12,22 @@ extern void info_backward_word ();
|
||||
extern void info_global_next_node ();
|
||||
extern void info_global_prev_node ();
|
||||
extern void info_scroll_forward ();
|
||||
extern void info_scroll_forward_set_window ();
|
||||
extern void info_scroll_backward ();
|
||||
extern void info_scroll_backward_set_window ();
|
||||
extern void info_beginning_of_node ();
|
||||
extern void info_end_of_node ();
|
||||
extern void info_down_line ();
|
||||
extern void info_up_line ();
|
||||
extern void info_scroll_half_screen_down ();
|
||||
extern void info_scroll_half_screen_up ();
|
||||
extern void info_next_window ();
|
||||
extern void info_prev_window ();
|
||||
extern void info_split_window ();
|
||||
extern void info_delete_window ();
|
||||
extern void info_keep_one_window ();
|
||||
extern void info_scroll_other_window ();
|
||||
extern void info_scroll_other_window_backward ();
|
||||
extern void info_grow_window ();
|
||||
extern void info_tile_windows ();
|
||||
extern void info_toggle_wrap ();
|
||||
@ -36,6 +43,8 @@ extern void info_xref_item ();
|
||||
extern void info_find_menu ();
|
||||
extern void info_visit_menu ();
|
||||
extern void info_goto_node ();
|
||||
extern void info_menu_sequence ();
|
||||
extern void info_goto_invocation_node ();
|
||||
extern void info_man ();
|
||||
extern void info_top_node ();
|
||||
extern void info_dir_node ();
|
||||
@ -43,7 +52,11 @@ extern void info_history_node ();
|
||||
extern void info_kill_node ();
|
||||
extern void info_view_file ();
|
||||
extern void info_print_node ();
|
||||
extern void info_search_case_sensitively ();
|
||||
extern void info_search ();
|
||||
extern void info_search_backward ();
|
||||
extern void info_search_next ();
|
||||
extern void info_search_previous ();
|
||||
extern void isearch_forward ();
|
||||
extern void isearch_backward ();
|
||||
extern void info_move_to_prev_xref ();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* infomap.c -- Keymaps for Info.
|
||||
$Id: infomap.c,v 1.7 1997/07/31 20:37:32 karl Exp $
|
||||
$Id: infomap.c,v 1.20 1999/06/25 21:57:40 karl Exp $
|
||||
|
||||
Copyright (C) 1993, 97 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 97, 98, 99 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -67,7 +67,7 @@ keymap_copy_keymap (map)
|
||||
return (keymap);
|
||||
}
|
||||
|
||||
/* Free the keymap and it's descendents. */
|
||||
/* Free the keymap and its descendants. */
|
||||
void
|
||||
keymap_discard_keymap (map)
|
||||
Keymap (map);
|
||||
@ -141,49 +141,54 @@ keymap_bind_keyseq (map, keyseq, keyentry)
|
||||
|
||||
/* Initialize the standard info keymaps. */
|
||||
|
||||
Keymap info_keymap = (Keymap)NULL;
|
||||
Keymap echo_area_keymap = (Keymap)NULL;
|
||||
Keymap info_keymap = NULL;
|
||||
Keymap echo_area_keymap = NULL;
|
||||
|
||||
void
|
||||
initialize_info_keymaps ()
|
||||
static void
|
||||
initialize_emacs_like_keymaps ()
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
Keymap map;
|
||||
|
||||
if (!info_keymap)
|
||||
{
|
||||
info_keymap = keymap_make_keymap ();
|
||||
info_keymap[ESC].type = ISKMAP;
|
||||
info_keymap[ESC].function = (VFunction *)keymap_make_keymap ();
|
||||
info_keymap[Control ('x')].type = ISKMAP;
|
||||
info_keymap[Control ('x')].function = (VFunction *)keymap_make_keymap ();
|
||||
echo_area_keymap = keymap_make_keymap ();
|
||||
echo_area_keymap[ESC].type = ISKMAP;
|
||||
echo_area_keymap[ESC].function = (VFunction *)keymap_make_keymap ();
|
||||
echo_area_keymap[Control ('x')].type = ISKMAP;
|
||||
echo_area_keymap[Control ('x')].function =
|
||||
(VFunction *)keymap_make_keymap ();
|
||||
}
|
||||
|
||||
info_keymap[ESC].type = ISKMAP;
|
||||
info_keymap[ESC].function = (VFunction *)keymap_make_keymap ();
|
||||
info_keymap[Control ('x')].type = ISKMAP;
|
||||
info_keymap[Control ('x')].function = (VFunction *)keymap_make_keymap ();
|
||||
|
||||
/* Bind the echo area insert routines. Let's make all characters
|
||||
insertable by default, regardless of which character set we might
|
||||
be using. */
|
||||
for (i = 0; i < 256; i++)
|
||||
echo_area_keymap[i].function = ea_insert;
|
||||
|
||||
echo_area_keymap[ESC].type = ISKMAP;
|
||||
echo_area_keymap[ESC].function = (VFunction *) keymap_make_keymap ();
|
||||
echo_area_keymap[Control ('x')].type = ISKMAP;
|
||||
echo_area_keymap[Control ('x')].function
|
||||
= (VFunction *) keymap_make_keymap ();
|
||||
|
||||
/* Bind numeric arg functions for both echo area and info window maps. */
|
||||
for (i = '0'; i < '9' + 1; i++)
|
||||
{
|
||||
((Keymap) info_keymap[ESC].function)[i].function =
|
||||
((Keymap) echo_area_keymap[ESC].function)[i].function =
|
||||
info_add_digit_to_numeric_arg;
|
||||
((Keymap) info_keymap[ESC].function)[i].function
|
||||
= ((Keymap) echo_area_keymap[ESC].function)[i].function
|
||||
= info_add_digit_to_numeric_arg;
|
||||
}
|
||||
((Keymap) info_keymap[ESC].function)['-'].function =
|
||||
((Keymap) echo_area_keymap[ESC].function)['-'].function =
|
||||
info_add_digit_to_numeric_arg;
|
||||
|
||||
info_keymap['-'].function = info_add_digit_to_numeric_arg;
|
||||
|
||||
/* Bind the echo area routines. */
|
||||
map = echo_area_keymap;
|
||||
|
||||
/* Bind the echo area insert routines. */
|
||||
for (i = 0; i < 160; i++)
|
||||
if (isprint (i))
|
||||
map[i].function = ea_insert;
|
||||
|
||||
map[Control ('a')].function = ea_beg_of_line;
|
||||
map[Control ('b')].function = ea_backward;
|
||||
map[Control ('d')].function = ea_delete;
|
||||
@ -203,7 +208,12 @@ initialize_info_keymaps ()
|
||||
map[SPC].function = ea_complete;
|
||||
map[TAB].function = ea_complete;
|
||||
map['?'].function = ea_possible_completions;
|
||||
#ifdef __MSDOS__
|
||||
/* PC users will lynch me if I don't give them their usual DEL effect... */
|
||||
map[DEL].function = ea_delete;
|
||||
#else
|
||||
map[DEL].function = ea_rubout;
|
||||
#endif
|
||||
|
||||
/* Bind the echo area ESC keymap. */
|
||||
map = (Keymap)echo_area_keymap[ESC].function;
|
||||
@ -272,6 +282,7 @@ initialize_info_keymaps ()
|
||||
map[Control ('u')].function = info_universal_argument;
|
||||
map[Control ('v')].function = info_scroll_forward;
|
||||
map[','].function = info_next_index_match;
|
||||
map['/'].function = info_search;
|
||||
|
||||
for (i = '1'; i < '9' + 1; i++)
|
||||
map[i].function = info_menu_digit;
|
||||
@ -288,15 +299,19 @@ initialize_info_keymaps ()
|
||||
map['e'].function = info_end_of_node;
|
||||
map['f'].function = info_xref_item;
|
||||
map['g'].function = info_goto_node;
|
||||
map['G'].function = info_menu_sequence;
|
||||
map['h'].function = info_get_info_help_node;
|
||||
map['i'].function = info_index_search;
|
||||
map['I'].function = info_goto_invocation_node;
|
||||
map['l'].function = info_history_node;
|
||||
map['m'].function = info_menu_item;
|
||||
map['n'].function = info_next_node;
|
||||
map['O'].function = info_goto_invocation_node;
|
||||
map['p'].function = info_prev_node;
|
||||
map['q'].function = info_quit;
|
||||
map['r'].function = info_xref_item;
|
||||
map['s'].function = info_search;
|
||||
map['S'].function = info_search_case_sensitively;
|
||||
map['t'].function = info_top_node;
|
||||
map['u'].function = info_up_node;
|
||||
map[DEL].function = info_scroll_backward;
|
||||
@ -316,6 +331,7 @@ initialize_info_keymaps ()
|
||||
#if defined (NAMED_FUNCTIONS)
|
||||
map['x'].function = info_execute_command;
|
||||
#endif /* NAMED_FUNCTIONS */
|
||||
map[DEL].function = info_scroll_other_window_backward;
|
||||
|
||||
/* Bind members in the Control-X map for Info windows. */
|
||||
map = (Keymap)info_keymap[Control ('x')].function;
|
||||
@ -331,6 +347,8 @@ initialize_info_keymaps ()
|
||||
map['^'].function = info_grow_window;
|
||||
map['b'].function = select_visited_node;
|
||||
map['k'].function = info_kill_node;
|
||||
map['n'].function = info_search_next;
|
||||
map['N'].function = info_search_previous;
|
||||
map['o'].function = info_next_window;
|
||||
map['t'].function = info_tile_windows;
|
||||
map['w'].function = info_toggle_wrap;
|
||||
@ -359,6 +377,7 @@ initialize_info_keymaps ()
|
||||
keymap_bind_keyseq (map, "\033OB", &map['f']);
|
||||
keymap_bind_keyseq (map, "\033[B", &map['f']);
|
||||
keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
|
||||
keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
|
||||
|
||||
/* The alternative to this definition of a `main map' key in the
|
||||
`ESC map' section, is something like:
|
||||
@ -366,3 +385,297 @@ initialize_info_keymaps ()
|
||||
*/
|
||||
keymap_bind_keyseq (info_keymap/*sic*/, term_kP, &map['v']); /* pageup */
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_vi_like_keymaps ()
|
||||
{
|
||||
register int i;
|
||||
Keymap map;
|
||||
|
||||
if (!info_keymap)
|
||||
{
|
||||
info_keymap = keymap_make_keymap ();
|
||||
echo_area_keymap = keymap_make_keymap ();
|
||||
}
|
||||
|
||||
info_keymap[ESC].type = ISKMAP;
|
||||
info_keymap[ESC].function = (VFunction *)keymap_make_keymap ();
|
||||
info_keymap[Control ('x')].type = ISKMAP;
|
||||
info_keymap[Control ('x')].function = (VFunction *)keymap_make_keymap ();
|
||||
|
||||
/* Bind the echo area insert routines. */
|
||||
for (i = 0; i < 256; i++)
|
||||
echo_area_keymap[i].function = ea_insert;
|
||||
|
||||
echo_area_keymap[ESC].type = ISKMAP;
|
||||
echo_area_keymap[ESC].function = (VFunction *)keymap_make_keymap ();
|
||||
echo_area_keymap[Control ('x')].type = ISKMAP;
|
||||
echo_area_keymap[Control ('x')].function =
|
||||
(VFunction *)keymap_make_keymap ();
|
||||
|
||||
/* Bind numeric arg functions for both echo area and info window maps. */
|
||||
for (i = '0'; i < '9' + 1; i++)
|
||||
{
|
||||
info_keymap[i].function =
|
||||
((Keymap) echo_area_keymap[ESC].function)[i].function =
|
||||
info_add_digit_to_numeric_arg;
|
||||
}
|
||||
info_keymap['-'].function =
|
||||
((Keymap) echo_area_keymap[ESC].function)['-'].function =
|
||||
info_add_digit_to_numeric_arg;
|
||||
|
||||
/* Bind the echo area routines. */
|
||||
map = echo_area_keymap;
|
||||
|
||||
map[Control ('a')].function = ea_beg_of_line;
|
||||
map[Control ('b')].function = ea_backward;
|
||||
map[Control ('d')].function = ea_delete;
|
||||
map[Control ('e')].function = ea_end_of_line;
|
||||
map[Control ('f')].function = ea_forward;
|
||||
map[Control ('g')].function = ea_abort;
|
||||
map[Control ('h')].function = ea_rubout;
|
||||
map[Control ('k')].function = ea_kill_line;
|
||||
map[Control ('l')].function = info_redraw_display;
|
||||
map[Control ('q')].function = ea_quoted_insert;
|
||||
map[Control ('t')].function = ea_transpose_chars;
|
||||
map[Control ('u')].function = ea_abort;
|
||||
map[Control ('v')].function = ea_quoted_insert;
|
||||
map[Control ('y')].function = ea_yank;
|
||||
|
||||
map[LFD].function = ea_newline;
|
||||
map[RET].function = ea_newline;
|
||||
map[SPC].function = ea_complete;
|
||||
map[TAB].function = ea_complete;
|
||||
map['?'].function = ea_possible_completions;
|
||||
#ifdef __MSDOS__
|
||||
/* PC users will lynch me if I don't give them their usual DEL effect... */
|
||||
map[DEL].function = ea_delete;
|
||||
#else
|
||||
map[DEL].function = ea_rubout;
|
||||
#endif
|
||||
|
||||
/* Bind the echo area ESC keymap. */
|
||||
map = (Keymap)echo_area_keymap[ESC].function;
|
||||
|
||||
map[Control ('g')].function = ea_abort;
|
||||
map[Control ('h')].function = ea_backward_kill_word;
|
||||
map[Control ('v')].function = ea_scroll_completions_window;
|
||||
map['0'].function = ea_beg_of_line;
|
||||
map['$'].function = ea_end_of_line;
|
||||
map['b'].function = ea_backward_word;
|
||||
map['d'].function = ea_kill_word;
|
||||
map['f'].function = ea_forward_word;
|
||||
map['h'].function = ea_forward;
|
||||
map['l'].function = ea_backward;
|
||||
map['w'].function = ea_forward_word;
|
||||
map['x'].function = ea_delete;
|
||||
map['X'].function = ea_kill_word;
|
||||
map['y'].function = ea_yank_pop;
|
||||
map['?'].function = ea_possible_completions;
|
||||
map[TAB].function = ea_tab_insert;
|
||||
map[DEL].function = ea_kill_word;
|
||||
|
||||
/* Bind the echo area Control-x keymap. */
|
||||
map = (Keymap)echo_area_keymap[Control ('x')].function;
|
||||
|
||||
map['o'].function = info_next_window;
|
||||
map[DEL].function = ea_backward_kill_line;
|
||||
|
||||
/* Arrow key bindings for echo area keymaps. It seems that some
|
||||
terminals do not match their termcap entries, so it's best to just
|
||||
define everything with both of the usual prefixes. */
|
||||
map = echo_area_keymap;
|
||||
keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
|
||||
keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
|
||||
keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
|
||||
keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
|
||||
keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
|
||||
keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
|
||||
keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
|
||||
keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
|
||||
keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
|
||||
keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
|
||||
keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
|
||||
keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
|
||||
|
||||
map = (Keymap)echo_area_keymap[ESC].function;
|
||||
keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
|
||||
keymap_bind_keyseq (map, "\033OA", &map['b']);
|
||||
keymap_bind_keyseq (map, "\033[A", &map['b']);
|
||||
keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
|
||||
keymap_bind_keyseq (map, "\033OB", &map['f']);
|
||||
keymap_bind_keyseq (map, "\033[B", &map['f']);
|
||||
|
||||
/* Bind commands for Info window keymaps. */
|
||||
map = info_keymap;
|
||||
map[TAB].function = info_move_to_next_xref;
|
||||
map[LFD].function = info_down_line;
|
||||
map[RET].function = info_down_line;
|
||||
map[SPC].function = info_scroll_forward;
|
||||
map[Control ('a')].function = info_beginning_of_line;
|
||||
map[Control ('b')].function = info_scroll_backward;
|
||||
map[Control ('d')].function = info_scroll_half_screen_down;
|
||||
map[Control ('e')].function = info_down_line;
|
||||
map[Control ('f')].function = info_scroll_forward;
|
||||
map[Control ('g')].function = info_abort_key;
|
||||
map[Control ('k')].function = info_up_line;
|
||||
map[Control ('l')].function = info_redraw_display;
|
||||
map[Control ('n')].function = info_down_line;
|
||||
map[Control ('p')].function = info_up_line;
|
||||
map[Control ('r')].function = info_redraw_display;
|
||||
map[Control ('s')].function = isearch_forward;
|
||||
map[Control ('u')].function = info_scroll_half_screen_up;
|
||||
map[Control ('v')].function = info_scroll_forward;
|
||||
map[Control ('y')].function = info_up_line;
|
||||
map[','].function = info_next_index_match;
|
||||
map['/'].function = info_search;
|
||||
|
||||
for (i = '1'; i < '9' + 1; i++)
|
||||
((Keymap) info_keymap[ESC].function)[i].function = info_menu_digit;
|
||||
((Keymap) info_keymap[ESC].function)['0'].function = info_last_menu_item;
|
||||
|
||||
map['<'].function = info_first_node;
|
||||
map['>'].function = info_last_node;
|
||||
map['?'].function = info_search_backward;
|
||||
map['['].function = info_global_prev_node;
|
||||
map[']'].function = info_global_next_node;
|
||||
map['\''].function = info_history_node;
|
||||
|
||||
map['b'].function = info_scroll_backward;
|
||||
map['d'].function = info_scroll_half_screen_down;
|
||||
map['e'].function = info_down_line;
|
||||
map['E'].function = info_view_file;
|
||||
map['f'].function = info_scroll_forward;
|
||||
map['F'].function = info_scroll_forward;
|
||||
map['g'].function = info_first_node;
|
||||
map['G'].function = info_last_node;
|
||||
map['h'].function = info_get_help_window;
|
||||
map['H'].function = info_get_help_window;
|
||||
map['i'].function = info_index_search;
|
||||
map['I'].function = info_goto_invocation_node;
|
||||
map['j'].function = info_down_line;
|
||||
map['k'].function = info_up_line;
|
||||
map['l'].function = info_history_node;
|
||||
map['m'].function = info_menu_item;
|
||||
map['n'].function = info_search_next;
|
||||
map['N'].function = info_search_previous;
|
||||
map['O'].function = info_goto_invocation_node;
|
||||
map['p'].function = info_prev_node;
|
||||
map['q'].function = info_quit;
|
||||
map['Q'].function = info_quit;
|
||||
map['r'].function = info_redraw_display;
|
||||
map['R'].function = info_redraw_display;
|
||||
map['s'].function = info_search;
|
||||
map['S'].function = info_search_case_sensitively;
|
||||
map['t'].function = info_top_node;
|
||||
map['u'].function = info_scroll_half_screen_up;
|
||||
map['w'].function = info_scroll_backward_set_window;
|
||||
map['y'].function = info_up_line;
|
||||
map['z'].function = info_scroll_forward_set_window;
|
||||
map['Z'].function = NULL; /* unbind, so it works to bind "ZZ" below */
|
||||
map[DEL].function = info_scroll_backward;
|
||||
keymap_bind_keyseq (map, ":q", &map['q']);
|
||||
keymap_bind_keyseq (map, ":Q", &map['q']);
|
||||
keymap_bind_keyseq (map, "ZZ", &map['q']);
|
||||
|
||||
/* Bind members in the ESC map for Info windows. */
|
||||
map = (Keymap)info_keymap[ESC].function;
|
||||
map[Control ('f')].function = info_show_footnotes;
|
||||
map[Control ('g')].function = info_abort_key;
|
||||
map[TAB].function = info_move_to_prev_xref;
|
||||
map[SPC].function = info_scroll_forward;
|
||||
map[Control ('v')].function = info_scroll_other_window;
|
||||
map['<'].function = info_beginning_of_node;
|
||||
map['>'].function = info_end_of_node;
|
||||
map['/'].function = info_search;
|
||||
map['?'].function = info_search_backward;
|
||||
map['b'].function = info_beginning_of_node;
|
||||
map['d'].function = info_dir_node;
|
||||
map['e'].function = info_end_of_node;
|
||||
map['f'].function = info_xref_item;
|
||||
map['g'].function = info_select_reference_this_line;
|
||||
map['h'].function = info_get_info_help_node;
|
||||
map['m'].function = info_menu_item;
|
||||
map['n'].function = info_search;
|
||||
map['N'].function = info_search_backward;
|
||||
map['r'].function = isearch_backward;
|
||||
map['s'].function = isearch_forward;
|
||||
map['t'].function = info_top_node;
|
||||
map['v'].function = info_scroll_backward;
|
||||
#if defined (NAMED_FUNCTIONS)
|
||||
map['x'].function = info_execute_command;
|
||||
#endif /* NAMED_FUNCTIONS */
|
||||
map[DEL].function = info_scroll_other_window_backward;
|
||||
|
||||
/* Bind members in the Control-X map for Info windows. */
|
||||
map = (Keymap)info_keymap[Control ('x')].function;
|
||||
|
||||
map[Control ('b')].function = list_visited_nodes;
|
||||
map[Control ('c')].function = info_quit;
|
||||
map[Control ('f')].function = info_view_file;
|
||||
map[Control ('g')].function = info_abort_key;
|
||||
map[Control ('v')].function = info_view_file;
|
||||
map[LFD].function = info_select_reference_this_line;
|
||||
map[RET].function = info_select_reference_this_line;
|
||||
map['0'].function = info_delete_window;
|
||||
map['1'].function = info_keep_one_window;
|
||||
map['2'].function = info_split_window;
|
||||
map['^'].function = info_grow_window;
|
||||
map['b'].function = select_visited_node;
|
||||
map['g'].function = info_goto_node;
|
||||
map['i'].function = info_index_search;
|
||||
map['I'].function = info_goto_invocation_node;
|
||||
map['k'].function = info_kill_node;
|
||||
map['n'].function = info_next_node;
|
||||
map['o'].function = info_next_window;
|
||||
map['O'].function = info_goto_invocation_node;
|
||||
map['p'].function = info_prev_node;
|
||||
map['r'].function = info_xref_item;
|
||||
map['t'].function = info_tile_windows;
|
||||
map['u'].function = info_up_node;
|
||||
map['w'].function = info_toggle_wrap;
|
||||
map[','].function = info_next_index_match;
|
||||
keymap_bind_keyseq (info_keymap, ":e", &map[Control ('v')]);
|
||||
|
||||
/* Arrow key bindings for Info windows keymap. */
|
||||
map = info_keymap;
|
||||
keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
|
||||
keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
|
||||
keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
|
||||
keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
|
||||
keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
|
||||
keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
|
||||
keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
|
||||
keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
|
||||
keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
|
||||
keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
|
||||
keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
|
||||
keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
|
||||
keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
|
||||
|
||||
map = (Keymap)info_keymap[ESC].function;
|
||||
keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
|
||||
keymap_bind_keyseq (map, "\033OA", &map['b']);
|
||||
keymap_bind_keyseq (map, "\033[A", &map['b']);
|
||||
keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
|
||||
keymap_bind_keyseq (map, "\033OB", &map['f']);
|
||||
keymap_bind_keyseq (map, "\033[B", &map['f']);
|
||||
keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
|
||||
keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
|
||||
|
||||
/* The alternative to this definition of a `main map' key in the
|
||||
`ESC map' section, is something like:
|
||||
keymap_bind_keyseq (map, term_kP, &((KeyMap)map[ESC].function).map['v']);
|
||||
*/
|
||||
keymap_bind_keyseq (info_keymap/*sic*/, term_kP, &map['v']); /* pageup */
|
||||
}
|
||||
|
||||
void
|
||||
initialize_info_keymaps ()
|
||||
{
|
||||
if (vi_keys_p)
|
||||
initialize_vi_like_keymaps ();
|
||||
else
|
||||
initialize_emacs_like_keymaps ();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* nodemenu.c -- Produce a menu of all visited nodes.
|
||||
$Id: nodemenu.c,v 1.7 1997/07/24 21:30:30 karl Exp $
|
||||
/* nodemenu.c -- produce a menu of all visited nodes.
|
||||
$Id: nodemenu.c,v 1.8 1998/06/28 19:54:27 karl Exp $
|
||||
|
||||
Copyright (C) 1993, 97 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 97, 98 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -168,7 +168,9 @@ get_visited_nodes (filter_func)
|
||||
/* Delete duplicates. */
|
||||
for (i = 0, newlen = 1; i < lines_index - 1; i++)
|
||||
{
|
||||
if (strcmp (lines[i], lines[i + 1]) == 0)
|
||||
/* Use FILENAME_CMP here, since the most important piece
|
||||
of info in each line is the file name of the node. */
|
||||
if (FILENAME_CMP (lines[i], lines[i + 1]) == 0)
|
||||
{
|
||||
free (lines[i]);
|
||||
lines[i] = (char *)NULL;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
/* terminal.c -- How to handle the physical terminal for Info.
|
||||
$Id: terminal.c,v 1.9 1998/02/22 00:05:15 karl Exp $
|
||||
$Id: terminal.c,v 1.19 1999/09/20 12:28:54 karl Exp $
|
||||
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 96, 97, 98
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 96, 97, 98, 99
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <sys/ioctl.h> /* TIOCGWINSZ on LynxOS, at least */
|
||||
|
||||
/* The Unix termcap interface code. */
|
||||
#ifdef HAVE_NCURSES_TERMCAP_H
|
||||
@ -76,9 +77,10 @@ VFunction *terminal_scroll_terminal_hook = (VFunction *)NULL;
|
||||
/* **************************************************************** */
|
||||
|
||||
/* A buffer which holds onto the current terminal description, and a pointer
|
||||
used to float within it. */
|
||||
static char *term_buffer = (char *)NULL;
|
||||
static char *term_string_buffer = (char *)NULL;
|
||||
used to float within it. And the name of the terminal. */
|
||||
static char *term_buffer = NULL;
|
||||
static char *term_string_buffer = NULL;
|
||||
static char *term_name;
|
||||
|
||||
/* Some strings to control terminal actions. These are output by tputs (). */
|
||||
static char *term_goto, *term_clreol, *term_cr, *term_clrpag;
|
||||
@ -146,12 +148,13 @@ terminal_begin_using_terminal ()
|
||||
#endif
|
||||
|
||||
send_to_terminal (term_begin_use);
|
||||
/* Without this fflush and sleep, running info in a shelltool or
|
||||
cmdtool (TERM=sun-cmd) with scrollbars loses -- the scrollbars are
|
||||
not restored properly.
|
||||
From: strube@physik3.gwdg.de (Hans Werner Strube). */
|
||||
fflush (stdout);
|
||||
sleep (1);
|
||||
if (STREQ (term_name, "sun-cmd"))
|
||||
/* Without this fflush and sleep, running info in a shelltool or
|
||||
cmdtool (TERM=sun-cmd) with scrollbars loses -- the scrollbars are
|
||||
not restored properly.
|
||||
From: strube@physik3.gwdg.de (Hans Werner Strube). */
|
||||
sleep (1);
|
||||
|
||||
#ifdef SIGWINCH
|
||||
signal (SIGWINCH, sigsave);
|
||||
@ -177,7 +180,9 @@ terminal_end_using_terminal ()
|
||||
|
||||
send_to_terminal (term_end_use);
|
||||
fflush (stdout);
|
||||
sleep (1);
|
||||
if (STREQ (term_name, "sun-cmd"))
|
||||
/* See comments at other sleep. */
|
||||
sleep (1);
|
||||
|
||||
#ifdef SIGWINCH
|
||||
signal (SIGWINCH, sigsave);
|
||||
@ -516,7 +521,7 @@ void
|
||||
terminal_initialize_terminal (terminal_name)
|
||||
char *terminal_name;
|
||||
{
|
||||
char *term, *buffer;
|
||||
char *buffer;
|
||||
|
||||
terminal_is_dumb_p = 0;
|
||||
|
||||
@ -526,37 +531,46 @@ terminal_initialize_terminal (terminal_name)
|
||||
return;
|
||||
}
|
||||
|
||||
term = terminal_name ? terminal_name : getenv ("TERM");
|
||||
term_name = terminal_name ? terminal_name : getenv ("TERM");
|
||||
if (!term_name)
|
||||
term_name = "dumb";
|
||||
|
||||
if (!term_string_buffer)
|
||||
term_string_buffer = (char *)xmalloc (2048);
|
||||
term_string_buffer = xmalloc (2048);
|
||||
|
||||
if (!term_buffer)
|
||||
term_buffer = (char *)xmalloc (2048);
|
||||
term_buffer = xmalloc (2048);
|
||||
|
||||
buffer = term_string_buffer;
|
||||
|
||||
term_clrpag = term_cr = term_clreol = (char *)NULL;
|
||||
term_clrpag = term_cr = term_clreol = NULL;
|
||||
|
||||
if (!term)
|
||||
term = "dumb";
|
||||
|
||||
if (tgetent (term_buffer, term) <= 0)
|
||||
/* HP-UX 11.x returns 0 for OK --jeff.hull@state.co.us. */
|
||||
if (tgetent (term_buffer, term_name) < 0)
|
||||
{
|
||||
terminal_is_dumb_p = 1;
|
||||
screenwidth = 80;
|
||||
screenheight = 24;
|
||||
term_cr = "\r";
|
||||
term_up = term_dn = audible_bell = visible_bell = (char *)NULL;
|
||||
term_ku = term_kd = term_kl = term_kr = (char *)NULL;
|
||||
term_kP = term_kN = (char *)NULL;
|
||||
term_up = term_dn = audible_bell = visible_bell = NULL;
|
||||
term_ku = term_kd = term_kl = term_kr = NULL;
|
||||
term_kP = term_kN = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
BC = tgetstr ("pc", &buffer);
|
||||
PC = BC ? *BC : 0;
|
||||
|
||||
#if defined (TIOCGETP)
|
||||
#if defined (HAVE_TERMIOS_H)
|
||||
{
|
||||
struct termios ti;
|
||||
if (tcgetattr (fileno(stdout), &ti) != -1)
|
||||
ospeed = cfgetospeed (&ti);
|
||||
else
|
||||
ospeed = B9600;
|
||||
}
|
||||
#else
|
||||
# if defined (TIOCGETP)
|
||||
{
|
||||
struct sgttyb sg;
|
||||
|
||||
@ -565,16 +579,17 @@ terminal_initialize_terminal (terminal_name)
|
||||
else
|
||||
ospeed = B9600;
|
||||
}
|
||||
#else
|
||||
# else
|
||||
ospeed = B9600;
|
||||
#endif /* !TIOCGETP */
|
||||
# endif /* !TIOCGETP */
|
||||
#endif
|
||||
|
||||
term_cr = tgetstr ("cr", &buffer);
|
||||
term_clreol = tgetstr ("ce", &buffer);
|
||||
term_clrpag = tgetstr ("cl", &buffer);
|
||||
term_goto = tgetstr ("cm", &buffer);
|
||||
|
||||
/* Find out about this terminals scrolling capability. */
|
||||
/* Find out about this terminal's scrolling capability. */
|
||||
term_AL = tgetstr ("AL", &buffer);
|
||||
term_DL = tgetstr ("DL", &buffer);
|
||||
term_al = tgetstr ("al", &buffer);
|
||||
@ -633,23 +648,7 @@ terminal_initialize_terminal (terminal_name)
|
||||
terminal_is_dumb_p = 1;
|
||||
}
|
||||
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
/* How to Read Characters From the Terminal */
|
||||
/* */
|
||||
/* **************************************************************** */
|
||||
|
||||
#if defined (TIOCGETC)
|
||||
/* A buffer containing the terminal interrupt characters upon entry
|
||||
to Info. */
|
||||
struct tchars original_tchars;
|
||||
#endif
|
||||
|
||||
#if defined (TIOCGLTC)
|
||||
/* A buffer containing the local terminal mode characters upon entry
|
||||
to Info. */
|
||||
struct ltchars original_ltchars;
|
||||
#endif
|
||||
/* How to read characters from the terminal. */
|
||||
|
||||
#if defined (HAVE_TERMIOS_H)
|
||||
struct termios original_termios, ttybuff;
|
||||
@ -662,6 +661,25 @@ struct termio original_termio, ttybuff;
|
||||
int original_tty_flags = 0;
|
||||
int original_lmode;
|
||||
struct sgttyb ttybuff;
|
||||
|
||||
# if defined(TIOCGETC) && defined(M_XENIX)
|
||||
/* SCO 3.2v5.0.2 defines but does not support TIOCGETC. Gak. Maybe
|
||||
better fix would be to use Posix termios in preference. --gildea,
|
||||
1jul99. */
|
||||
# undef TIOCGETC
|
||||
# endif
|
||||
|
||||
# if defined (TIOCGETC)
|
||||
/* A buffer containing the terminal interrupt characters upon entry
|
||||
to Info. */
|
||||
struct tchars original_tchars;
|
||||
# endif
|
||||
|
||||
# if defined (TIOCGLTC)
|
||||
/* A buffer containing the local terminal mode characters upon entry
|
||||
to Info. */
|
||||
struct ltchars original_ltchars;
|
||||
# endif
|
||||
# endif /* !HAVE_TERMIO_H */
|
||||
#endif /* !HAVE_TERMIOS_H */
|
||||
|
||||
@ -835,3 +853,6 @@ terminal_unprep_terminal ()
|
||||
terminal_end_using_terminal ();
|
||||
}
|
||||
|
||||
#ifdef __MSDOS__
|
||||
# include "pcterm.c"
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user