summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo/info
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-05-23 10:50:32 +0000
committerru <ru@FreeBSD.org>2005-05-23 10:50:32 +0000
commit8b2f0a4d7f08415b66667ee1937a24f1b1333e09 (patch)
treeab8801c7bc6a071e5dfe8c658d4b0ea907acf620 /contrib/texinfo/info
parentadfa5ff0fcbcb100e0392141216bc92735980e19 (diff)
downloadFreeBSD-src-8b2f0a4d7f08415b66667ee1937a24f1b1333e09.zip
FreeBSD-src-8b2f0a4d7f08415b66667ee1937a24f1b1333e09.tar.gz
Use stock (FSF) version of this file.
Diffstat (limited to 'contrib/texinfo/info')
-rw-r--r--contrib/texinfo/info/doc.c224
-rw-r--r--contrib/texinfo/info/funs.h224
-rw-r--r--contrib/texinfo/info/infomap.c154
-rw-r--r--contrib/texinfo/info/nodemenu.c38
-rw-r--r--contrib/texinfo/info/session.c649
-rw-r--r--contrib/texinfo/info/signals.c62
-rw-r--r--contrib/texinfo/info/terminal.c67
7 files changed, 674 insertions, 744 deletions
diff --git a/contrib/texinfo/info/doc.c b/contrib/texinfo/info/doc.c
index 4ca2266..324219e 100644
--- a/contrib/texinfo/info/doc.c
+++ b/contrib/texinfo/info/doc.c
@@ -1,7 +1,7 @@
/* doc.c -- Generated structure containing function names and doc strings.
This file was automatically made from various source files with the
- command "./makedoc". DO NOT EDIT THIS FILE, only "./makedoc.c".
+ command `..//info/makedoc'. DO NOT EDIT THIS FILE, only `..//info/makedoc.c'.
Source files groveled to make this file include:
./session.c
@@ -24,123 +24,123 @@
FUNCTION_DOC function_doc_array[] = {
/* Commands found in "./session.c". */
- { info_next_line, "next-line", (FUNCTION_KEYSEQ *)0, "Move down to the next line" },
- { info_prev_line, "prev-line", (FUNCTION_KEYSEQ *)0, "Move up to the previous line" },
- { info_end_of_line, "end-of-line", (FUNCTION_KEYSEQ *)0, "Move to the end of the line" },
- { info_beginning_of_line, "beginning-of-line", (FUNCTION_KEYSEQ *)0, "Move to the start of the line" },
- { info_forward_char, "forward-char", (FUNCTION_KEYSEQ *)0, "Move forward a character" },
- { info_backward_char, "backward-char", (FUNCTION_KEYSEQ *)0, "Move backward a character" },
- { info_forward_word, "forward-word", (FUNCTION_KEYSEQ *)0, "Move forward a word" },
- { info_backward_word, "backward-word", (FUNCTION_KEYSEQ *)0, "Move backward a word" },
- { info_global_next_node, "global-next-node", (FUNCTION_KEYSEQ *)0, "Move forwards or down through node structure" },
- { info_global_prev_node, "global-prev-node", (FUNCTION_KEYSEQ *)0, "Move backwards or up through node structure" },
- { info_scroll_forward, "scroll-forward", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window" },
- { info_scroll_forward_set_window, "scroll-forward-set-window", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window and set default window size" },
- { info_scroll_forward_page_only, "scroll-forward-page-only", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window staying within node" },
- { info_scroll_forward_page_only_set_window, "scroll-forward-page-only-set-window", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window staying within node and set default window size" },
- { info_scroll_backward, "scroll-backward", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window" },
- { info_scroll_backward_set_window, "scroll-backward-set-window", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window and set default window size" },
- { info_scroll_backward_page_only, "scroll-backward-page-only", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window staying within node" },
- { info_scroll_backward_page_only_set_window, "scroll-backward-page-only-set-window", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window staying within node and set default window size" },
- { info_beginning_of_node, "beginning-of-node", (FUNCTION_KEYSEQ *)0, "Move to the start of this node" },
- { info_end_of_node, "end-of-node", (FUNCTION_KEYSEQ *)0, "Move to the end of this node" },
- { info_down_line, "down-line", (FUNCTION_KEYSEQ *)0, "Scroll down by lines" },
- { info_up_line, "up-line", (FUNCTION_KEYSEQ *)0, "Scroll up by lines" },
- { info_scroll_half_screen_down, "scroll-half-screen-down", (FUNCTION_KEYSEQ *)0, "Scroll down by half screen size" },
- { info_scroll_half_screen_up, "scroll-half-screen-up", (FUNCTION_KEYSEQ *)0, "Scroll up by half screen size" },
- { info_next_window, "next-window", (FUNCTION_KEYSEQ *)0, "Select the next window" },
- { info_prev_window, "prev-window", (FUNCTION_KEYSEQ *)0, "Select the previous window" },
- { info_split_window, "split-window", (FUNCTION_KEYSEQ *)0, "Split the current window" },
- { info_delete_window, "delete-window", (FUNCTION_KEYSEQ *)0, "Delete the current window" },
- { info_keep_one_window, "keep-one-window", (FUNCTION_KEYSEQ *)0, "Delete all other windows" },
- { info_scroll_other_window, "scroll-other-window", (FUNCTION_KEYSEQ *)0, "Scroll the other window" },
- { info_scroll_other_window_backward, "scroll-other-window-backward", (FUNCTION_KEYSEQ *)0, "Scroll the other window backward" },
- { info_grow_window, "grow-window", (FUNCTION_KEYSEQ *)0, "Grow (or shrink) this window" },
- { info_tile_windows, "tile-windows", (FUNCTION_KEYSEQ *)0, "Divide the available screen space among the visible windows" },
- { info_toggle_wrap, "toggle-wrap", (FUNCTION_KEYSEQ *)0, "Toggle the state of line wrapping in the current window" },
- { info_next_node, "next-node", (FUNCTION_KEYSEQ *)0, "Select the Next node" },
- { info_prev_node, "prev-node", (FUNCTION_KEYSEQ *)0, "Select the Prev node" },
- { info_up_node, "up-node", (FUNCTION_KEYSEQ *)0, "Select the Up node" },
- { info_last_node, "last-node", (FUNCTION_KEYSEQ *)0, "Select the last node in this file" },
- { info_first_node, "first-node", (FUNCTION_KEYSEQ *)0, "Select the first node in this file" },
- { info_last_menu_item, "last-menu-item", (FUNCTION_KEYSEQ *)0, "Select the last item in this node's menu" },
- { info_menu_digit, "menu-digit", (FUNCTION_KEYSEQ *)0, "Select this menu item" },
- { info_menu_item, "menu-item", (FUNCTION_KEYSEQ *)0, "Read a menu item and select its node" },
- { info_xref_item, "xref-item", (FUNCTION_KEYSEQ *)0, "Read a footnote or cross reference and select its node" },
- { info_find_menu, "find-menu", (FUNCTION_KEYSEQ *)0, "Move to the start of this node's menu" },
- { info_visit_menu, "visit-menu", (FUNCTION_KEYSEQ *)0, "Visit as many menu items at once as possible" },
- { info_goto_node, "goto-node", (FUNCTION_KEYSEQ *)0, "Read a node name and select it" },
- { info_menu_sequence, "menu-sequence", (FUNCTION_KEYSEQ *)0, "Read a list of menus starting from dir and follow them" },
- { info_goto_invocation_node, "goto-invocation-node", (FUNCTION_KEYSEQ *)0, "Find the node describing program invocation" },
- { info_man, "man", (FUNCTION_KEYSEQ *)0, "Read a manpage reference and select it" },
- { info_top_node, "top-node", (FUNCTION_KEYSEQ *)0, "Select the node `Top' in this file" },
- { info_dir_node, "dir-node", (FUNCTION_KEYSEQ *)0, "Select the node `(dir)'" },
- { info_history_node, "history-node", (FUNCTION_KEYSEQ *)0, "Select the most recently selected node" },
- { info_kill_node, "kill-node", (FUNCTION_KEYSEQ *)0, "Kill this node" },
- { info_view_file, "view-file", (FUNCTION_KEYSEQ *)0, "Read the name of a file and select it" },
- { info_print_node, "print-node", (FUNCTION_KEYSEQ *)0, "Pipe the contents of this node through INFO_PRINT_COMMAND" },
- { info_search_case_sensitively, "search-case-sensitively", (FUNCTION_KEYSEQ *)0, "Read a string and search for it case-sensitively" },
- { info_search, "search", (FUNCTION_KEYSEQ *)0, "Read a string and search for it" },
- { info_search_backward, "search-backward", (FUNCTION_KEYSEQ *)0, "Read a string and search backward for it" },
- { info_search_next, "search-next", (FUNCTION_KEYSEQ *)0, "Repeat last search in the same direction" },
- { info_search_previous, "search-previous", (FUNCTION_KEYSEQ *)0, "Repeat last search in the reverse direction" },
- { isearch_forward, "isearch-forward", (FUNCTION_KEYSEQ *)0, "Search interactively for a string as you type it" },
- { isearch_backward, "isearch-backward", (FUNCTION_KEYSEQ *)0, "Search interactively for a string as you type it" },
- { info_move_to_prev_xref, "move-to-prev-xref", (FUNCTION_KEYSEQ *)0, "Move to the previous cross reference" },
- { info_move_to_next_xref, "move-to-next-xref", (FUNCTION_KEYSEQ *)0, "Move to the next cross reference" },
- { info_select_reference_this_line, "select-reference-this-line", (FUNCTION_KEYSEQ *)0, "Select reference or menu item appearing on this line" },
- { info_abort_key, "abort-key", (FUNCTION_KEYSEQ *)0, "Cancel current operation" },
- { info_move_to_window_line, "move-to-window-line", (FUNCTION_KEYSEQ *)0, "Move the cursor to a specific line of the window" },
- { info_redraw_display, "redraw-display", (FUNCTION_KEYSEQ *)0, "Redraw the display" },
- { info_quit, "quit", (FUNCTION_KEYSEQ *)0, "Quit using Info" },
- { info_do_lowercase_version, "do-lowercase-version", (FUNCTION_KEYSEQ *)0, "Run command bound to this key's lowercase variant" },
- { info_add_digit_to_numeric_arg, "add-digit-to-numeric-arg", (FUNCTION_KEYSEQ *)0, "Add this digit to the current numeric argument" },
- { info_universal_argument, "universal-argument", (FUNCTION_KEYSEQ *)0, "Start (or multiply by 4) the current numeric argument" },
- { info_numeric_arg_digit_loop, "numeric-arg-digit-loop", (FUNCTION_KEYSEQ *)0, "Internally used by \\[universal-argument]" },
+ { (VFunction *)info_next_line, "next-line", (FUNCTION_KEYSEQ *)0, "Move down to the next line" },
+ { (VFunction *)info_prev_line, "prev-line", (FUNCTION_KEYSEQ *)0, "Move up to the previous line" },
+ { (VFunction *)info_end_of_line, "end-of-line", (FUNCTION_KEYSEQ *)0, "Move to the end of the line" },
+ { (VFunction *)info_beginning_of_line, "beginning-of-line", (FUNCTION_KEYSEQ *)0, "Move to the start of the line" },
+ { (VFunction *)info_forward_char, "forward-char", (FUNCTION_KEYSEQ *)0, "Move forward a character" },
+ { (VFunction *)info_backward_char, "backward-char", (FUNCTION_KEYSEQ *)0, "Move backward a character" },
+ { (VFunction *)info_forward_word, "forward-word", (FUNCTION_KEYSEQ *)0, "Move forward a word" },
+ { (VFunction *)info_backward_word, "backward-word", (FUNCTION_KEYSEQ *)0, "Move backward a word" },
+ { (VFunction *)info_global_next_node, "global-next-node", (FUNCTION_KEYSEQ *)0, "Move forwards or down through node structure" },
+ { (VFunction *)info_global_prev_node, "global-prev-node", (FUNCTION_KEYSEQ *)0, "Move backwards or up through node structure" },
+ { (VFunction *)info_scroll_forward, "scroll-forward", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window" },
+ { (VFunction *)info_scroll_forward_set_window, "scroll-forward-set-window", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window and set default window size" },
+ { (VFunction *)info_scroll_forward_page_only, "scroll-forward-page-only", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window staying within node" },
+ { (VFunction *)info_scroll_forward_page_only_set_window, "scroll-forward-page-only-set-window", (FUNCTION_KEYSEQ *)0, "Scroll forward in this window staying within node and set default window size" },
+ { (VFunction *)info_scroll_backward, "scroll-backward", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window" },
+ { (VFunction *)info_scroll_backward_set_window, "scroll-backward-set-window", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window and set default window size" },
+ { (VFunction *)info_scroll_backward_page_only, "scroll-backward-page-only", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window staying within node" },
+ { (VFunction *)info_scroll_backward_page_only_set_window, "scroll-backward-page-only-set-window", (FUNCTION_KEYSEQ *)0, "Scroll backward in this window staying within node and set default window size" },
+ { (VFunction *)info_beginning_of_node, "beginning-of-node", (FUNCTION_KEYSEQ *)0, "Move to the start of this node" },
+ { (VFunction *)info_end_of_node, "end-of-node", (FUNCTION_KEYSEQ *)0, "Move to the end of this node" },
+ { (VFunction *)info_down_line, "down-line", (FUNCTION_KEYSEQ *)0, "Scroll down by lines" },
+ { (VFunction *)info_up_line, "up-line", (FUNCTION_KEYSEQ *)0, "Scroll up by lines" },
+ { (VFunction *)info_scroll_half_screen_down, "scroll-half-screen-down", (FUNCTION_KEYSEQ *)0, "Scroll down by half screen size" },
+ { (VFunction *)info_scroll_half_screen_up, "scroll-half-screen-up", (FUNCTION_KEYSEQ *)0, "Scroll up by half screen size" },
+ { (VFunction *)info_next_window, "next-window", (FUNCTION_KEYSEQ *)0, "Select the next window" },
+ { (VFunction *)info_prev_window, "prev-window", (FUNCTION_KEYSEQ *)0, "Select the previous window" },
+ { (VFunction *)info_split_window, "split-window", (FUNCTION_KEYSEQ *)0, "Split the current window" },
+ { (VFunction *)info_delete_window, "delete-window", (FUNCTION_KEYSEQ *)0, "Delete the current window" },
+ { (VFunction *)info_keep_one_window, "keep-one-window", (FUNCTION_KEYSEQ *)0, "Delete all other windows" },
+ { (VFunction *)info_scroll_other_window, "scroll-other-window", (FUNCTION_KEYSEQ *)0, "Scroll the other window" },
+ { (VFunction *)info_scroll_other_window_backward, "scroll-other-window-backward", (FUNCTION_KEYSEQ *)0, "Scroll the other window backward" },
+ { (VFunction *)info_grow_window, "grow-window", (FUNCTION_KEYSEQ *)0, "Grow (or shrink) this window" },
+ { (VFunction *)info_tile_windows, "tile-windows", (FUNCTION_KEYSEQ *)0, "Divide the available screen space among the visible windows" },
+ { (VFunction *)info_toggle_wrap, "toggle-wrap", (FUNCTION_KEYSEQ *)0, "Toggle the state of line wrapping in the current window" },
+ { (VFunction *)info_next_node, "next-node", (FUNCTION_KEYSEQ *)0, "Select the Next node" },
+ { (VFunction *)info_prev_node, "prev-node", (FUNCTION_KEYSEQ *)0, "Select the Prev node" },
+ { (VFunction *)info_up_node, "up-node", (FUNCTION_KEYSEQ *)0, "Select the Up node" },
+ { (VFunction *)info_last_node, "last-node", (FUNCTION_KEYSEQ *)0, "Select the last node in this file" },
+ { (VFunction *)info_first_node, "first-node", (FUNCTION_KEYSEQ *)0, "Select the first node in this file" },
+ { (VFunction *)info_last_menu_item, "last-menu-item", (FUNCTION_KEYSEQ *)0, "Select the last item in this node's menu" },
+ { (VFunction *)info_menu_digit, "menu-digit", (FUNCTION_KEYSEQ *)0, "Select this menu item" },
+ { (VFunction *)info_menu_item, "menu-item", (FUNCTION_KEYSEQ *)0, "Read a menu item and select its node" },
+ { (VFunction *)info_xref_item, "xref-item", (FUNCTION_KEYSEQ *)0, "Read a footnote or cross reference and select its node" },
+ { (VFunction *)info_find_menu, "find-menu", (FUNCTION_KEYSEQ *)0, "Move to the start of this node's menu" },
+ { (VFunction *)info_visit_menu, "visit-menu", (FUNCTION_KEYSEQ *)0, "Visit as many menu items at once as possible" },
+ { (VFunction *)info_goto_node, "goto-node", (FUNCTION_KEYSEQ *)0, "Read a node name and select it" },
+ { (VFunction *)info_menu_sequence, "menu-sequence", (FUNCTION_KEYSEQ *)0, "Read a list of menus starting from dir and follow them" },
+ { (VFunction *)info_goto_invocation_node, "goto-invocation-node", (FUNCTION_KEYSEQ *)0, "Find the node describing program invocation" },
+ { (VFunction *)info_man, "man", (FUNCTION_KEYSEQ *)0, "Read a manpage reference and select it" },
+ { (VFunction *)info_top_node, "top-node", (FUNCTION_KEYSEQ *)0, "Select the node `Top' in this file" },
+ { (VFunction *)info_dir_node, "dir-node", (FUNCTION_KEYSEQ *)0, "Select the node `(dir)'" },
+ { (VFunction *)info_history_node, "history-node", (FUNCTION_KEYSEQ *)0, "Select the most recently selected node" },
+ { (VFunction *)info_kill_node, "kill-node", (FUNCTION_KEYSEQ *)0, "Kill this node" },
+ { (VFunction *)info_view_file, "view-file", (FUNCTION_KEYSEQ *)0, "Read the name of a file and select it" },
+ { (VFunction *)info_print_node, "print-node", (FUNCTION_KEYSEQ *)0, "Pipe the contents of this node through INFO_PRINT_COMMAND" },
+ { (VFunction *)info_search_case_sensitively, "search-case-sensitively", (FUNCTION_KEYSEQ *)0, "Read a string and search for it case-sensitively" },
+ { (VFunction *)info_search, "search", (FUNCTION_KEYSEQ *)0, "Read a string and search for it" },
+ { (VFunction *)info_search_backward, "search-backward", (FUNCTION_KEYSEQ *)0, "Read a string and search backward for it" },
+ { (VFunction *)info_search_next, "search-next", (FUNCTION_KEYSEQ *)0, "Repeat last search in the same direction" },
+ { (VFunction *)info_search_previous, "search-previous", (FUNCTION_KEYSEQ *)0, "Repeat last search in the reverse direction" },
+ { (VFunction *)isearch_forward, "isearch-forward", (FUNCTION_KEYSEQ *)0, "Search interactively for a string as you type it" },
+ { (VFunction *)isearch_backward, "isearch-backward", (FUNCTION_KEYSEQ *)0, "Search interactively for a string as you type it" },
+ { (VFunction *)info_move_to_prev_xref, "move-to-prev-xref", (FUNCTION_KEYSEQ *)0, "Move to the previous cross reference" },
+ { (VFunction *)info_move_to_next_xref, "move-to-next-xref", (FUNCTION_KEYSEQ *)0, "Move to the next cross reference" },
+ { (VFunction *)info_select_reference_this_line, "select-reference-this-line", (FUNCTION_KEYSEQ *)0, "Select reference or menu item appearing on this line" },
+ { (VFunction *)info_abort_key, "abort-key", (FUNCTION_KEYSEQ *)0, "Cancel current operation" },
+ { (VFunction *)info_move_to_window_line, "move-to-window-line", (FUNCTION_KEYSEQ *)0, "Move the cursor to a specific line of the window" },
+ { (VFunction *)info_redraw_display, "redraw-display", (FUNCTION_KEYSEQ *)0, "Redraw the display" },
+ { (VFunction *)info_quit, "quit", (FUNCTION_KEYSEQ *)0, "Quit using Info" },
+ { (VFunction *)info_do_lowercase_version, "do-lowercase-version", (FUNCTION_KEYSEQ *)0, "Run command bound to this key's lowercase variant" },
+ { (VFunction *)info_add_digit_to_numeric_arg, "add-digit-to-numeric-arg", (FUNCTION_KEYSEQ *)0, "Add this digit to the current numeric argument" },
+ { (VFunction *)info_universal_argument, "universal-argument", (FUNCTION_KEYSEQ *)0, "Start (or multiply by 4) the current numeric argument" },
+ { (VFunction *)info_numeric_arg_digit_loop, "numeric-arg-digit-loop", (FUNCTION_KEYSEQ *)0, "Internally used by \\[universal-argument]" },
/* Commands found in "./echo-area.c". */
- { ea_forward, "echo-area-forward", (FUNCTION_KEYSEQ *)0, "Move forward a character" },
- { ea_backward, "echo-area-backward", (FUNCTION_KEYSEQ *)0, "Move backward a character" },
- { ea_beg_of_line, "echo-area-beg-of-line", (FUNCTION_KEYSEQ *)0, "Move to the start of this line" },
- { ea_end_of_line, "echo-area-end-of-line", (FUNCTION_KEYSEQ *)0, "Move to the end of this line" },
- { ea_forward_word, "echo-area-forward-word", (FUNCTION_KEYSEQ *)0, "Move forward a word" },
- { ea_backward_word, "echo-area-backward-word", (FUNCTION_KEYSEQ *)0, "Move backward a word" },
- { ea_delete, "echo-area-delete", (FUNCTION_KEYSEQ *)0, "Delete the character under the cursor" },
- { ea_rubout, "echo-area-rubout", (FUNCTION_KEYSEQ *)0, "Delete the character behind the cursor" },
- { ea_abort, "echo-area-abort", (FUNCTION_KEYSEQ *)0, "Cancel or quit operation" },
- { ea_newline, "echo-area-newline", (FUNCTION_KEYSEQ *)0, "Accept (or force completion of) this line" },
- { ea_quoted_insert, "echo-area-quoted-insert", (FUNCTION_KEYSEQ *)0, "Insert next character verbatim" },
- { ea_insert, "echo-area-insert", (FUNCTION_KEYSEQ *)0, "Insert this character" },
- { ea_tab_insert, "echo-area-tab-insert", (FUNCTION_KEYSEQ *)0, "Insert a TAB character" },
- { ea_transpose_chars, "echo-area-transpose-chars", (FUNCTION_KEYSEQ *)0, "Transpose characters at point" },
- { ea_yank, "echo-area-yank", (FUNCTION_KEYSEQ *)0, "Yank back the contents of the last kill" },
- { ea_yank_pop, "echo-area-yank-pop", (FUNCTION_KEYSEQ *)0, "Yank back a previous kill" },
- { ea_kill_line, "echo-area-kill-line", (FUNCTION_KEYSEQ *)0, "Kill to the end of the line" },
- { ea_backward_kill_line, "echo-area-backward-kill-line", (FUNCTION_KEYSEQ *)0, "Kill to the beginning of the line" },
- { ea_kill_word, "echo-area-kill-word", (FUNCTION_KEYSEQ *)0, "Kill the word following the cursor" },
- { ea_backward_kill_word, "echo-area-backward-kill-word", (FUNCTION_KEYSEQ *)0, "Kill the word preceding the cursor" },
- { ea_possible_completions, "echo-area-possible-completions", (FUNCTION_KEYSEQ *)0, "List possible completions" },
- { ea_complete, "echo-area-complete", (FUNCTION_KEYSEQ *)0, "Insert completion" },
- { ea_scroll_completions_window, "echo-area-scroll-completions-window", (FUNCTION_KEYSEQ *)0, "Scroll the completions window" },
+ { (VFunction *)ea_forward, "echo-area-forward", (FUNCTION_KEYSEQ *)0, "Move forward a character" },
+ { (VFunction *)ea_backward, "echo-area-backward", (FUNCTION_KEYSEQ *)0, "Move backward a character" },
+ { (VFunction *)ea_beg_of_line, "echo-area-beg-of-line", (FUNCTION_KEYSEQ *)0, "Move to the start of this line" },
+ { (VFunction *)ea_end_of_line, "echo-area-end-of-line", (FUNCTION_KEYSEQ *)0, "Move to the end of this line" },
+ { (VFunction *)ea_forward_word, "echo-area-forward-word", (FUNCTION_KEYSEQ *)0, "Move forward a word" },
+ { (VFunction *)ea_backward_word, "echo-area-backward-word", (FUNCTION_KEYSEQ *)0, "Move backward a word" },
+ { (VFunction *)ea_delete, "echo-area-delete", (FUNCTION_KEYSEQ *)0, "Delete the character under the cursor" },
+ { (VFunction *)ea_rubout, "echo-area-rubout", (FUNCTION_KEYSEQ *)0, "Delete the character behind the cursor" },
+ { (VFunction *)ea_abort, "echo-area-abort", (FUNCTION_KEYSEQ *)0, "Cancel or quit operation" },
+ { (VFunction *)ea_newline, "echo-area-newline", (FUNCTION_KEYSEQ *)0, "Accept (or force completion of) this line" },
+ { (VFunction *)ea_quoted_insert, "echo-area-quoted-insert", (FUNCTION_KEYSEQ *)0, "Insert next character verbatim" },
+ { (VFunction *)ea_insert, "echo-area-insert", (FUNCTION_KEYSEQ *)0, "Insert this character" },
+ { (VFunction *)ea_tab_insert, "echo-area-tab-insert", (FUNCTION_KEYSEQ *)0, "Insert a TAB character" },
+ { (VFunction *)ea_transpose_chars, "echo-area-transpose-chars", (FUNCTION_KEYSEQ *)0, "Transpose characters at point" },
+ { (VFunction *)ea_yank, "echo-area-yank", (FUNCTION_KEYSEQ *)0, "Yank back the contents of the last kill" },
+ { (VFunction *)ea_yank_pop, "echo-area-yank-pop", (FUNCTION_KEYSEQ *)0, "Yank back a previous kill" },
+ { (VFunction *)ea_kill_line, "echo-area-kill-line", (FUNCTION_KEYSEQ *)0, "Kill to the end of the line" },
+ { (VFunction *)ea_backward_kill_line, "echo-area-backward-kill-line", (FUNCTION_KEYSEQ *)0, "Kill to the beginning of the line" },
+ { (VFunction *)ea_kill_word, "echo-area-kill-word", (FUNCTION_KEYSEQ *)0, "Kill the word following the cursor" },
+ { (VFunction *)ea_backward_kill_word, "echo-area-backward-kill-word", (FUNCTION_KEYSEQ *)0, "Kill the word preceding the cursor" },
+ { (VFunction *)ea_possible_completions, "echo-area-possible-completions", (FUNCTION_KEYSEQ *)0, "List possible completions" },
+ { (VFunction *)ea_complete, "echo-area-complete", (FUNCTION_KEYSEQ *)0, "Insert completion" },
+ { (VFunction *)ea_scroll_completions_window, "echo-area-scroll-completions-window", (FUNCTION_KEYSEQ *)0, "Scroll the completions window" },
/* Commands found in "./infodoc.c". */
- { info_get_help_window, "get-help-window", (FUNCTION_KEYSEQ *)0, "Display help message" },
- { info_get_info_help_node, "get-info-help-node", (FUNCTION_KEYSEQ *)0, "Visit Info node `(info)Help'" },
- { describe_key, "describe-key", (FUNCTION_KEYSEQ *)0, "Print documentation for KEY" },
- { info_where_is, "where-is", (FUNCTION_KEYSEQ *)0, "Show what to type to execute a given command" },
+ { (VFunction *)info_get_help_window, "get-help-window", (FUNCTION_KEYSEQ *)0, "Display help message" },
+ { (VFunction *)info_get_info_help_node, "get-info-help-node", (FUNCTION_KEYSEQ *)0, "Visit Info node `(info)Help'" },
+ { (VFunction *)describe_key, "describe-key", (FUNCTION_KEYSEQ *)0, "Print documentation for KEY" },
+ { (VFunction *)info_where_is, "where-is", (FUNCTION_KEYSEQ *)0, "Show what to type to execute a given command" },
/* Commands found in "./m-x.c". */
- { describe_command, "describe-command", (FUNCTION_KEYSEQ *)0, "Read the name of an Info command and describe it" },
- { info_execute_command, "execute-command", (FUNCTION_KEYSEQ *)0, "Read a command name in the echo area and execute it" },
- { set_screen_height, "set-screen-height", (FUNCTION_KEYSEQ *)0, "Set the height of the displayed window" },
+ { (VFunction *)describe_command, "describe-command", (FUNCTION_KEYSEQ *)0, "Read the name of an Info command and describe it" },
+ { (VFunction *)info_execute_command, "execute-command", (FUNCTION_KEYSEQ *)0, "Read a command name in the echo area and execute it" },
+ { (VFunction *)set_screen_height, "set-screen-height", (FUNCTION_KEYSEQ *)0, "Set the height of the displayed window" },
/* Commands found in "./indices.c". */
- { info_index_search, "index-search", (FUNCTION_KEYSEQ *)0, "Look up a string in the index for this file" },
- { info_next_index_match, "next-index-match", (FUNCTION_KEYSEQ *)0, "Go to the next matching index item from the last `\\[index-search]' command" },
- { info_index_apropos, "index-apropos", (FUNCTION_KEYSEQ *)0, "Grovel all known info file's indices for a string and build a menu" },
+ { (VFunction *)info_index_search, "index-search", (FUNCTION_KEYSEQ *)0, "Look up a string in the index for this file" },
+ { (VFunction *)info_next_index_match, "next-index-match", (FUNCTION_KEYSEQ *)0, "Go to the next matching index item from the last `\\[index-search]' command" },
+ { (VFunction *)info_index_apropos, "index-apropos", (FUNCTION_KEYSEQ *)0, "Grovel all known info file's indices for a string and build a menu" },
/* Commands found in "./nodemenu.c". */
- { list_visited_nodes, "list-visited-nodes", (FUNCTION_KEYSEQ *)0, "Make a window containing a menu of all of the currently visited nodes" },
- { select_visited_node, "select-visited-node", (FUNCTION_KEYSEQ *)0, "Select a node which has been previously visited in a visible window" },
+ { (VFunction *)list_visited_nodes, "list-visited-nodes", (FUNCTION_KEYSEQ *)0, "Make a window containing a menu of all of the currently visited nodes" },
+ { (VFunction *)select_visited_node, "select-visited-node", (FUNCTION_KEYSEQ *)0, "Select a node which has been previously visited in a visible window" },
/* Commands found in "./footnotes.c". */
- { info_show_footnotes, "show-footnotes", (FUNCTION_KEYSEQ *)0, "Show the footnotes associated with this node in another window" },
+ { (VFunction *)info_show_footnotes, "show-footnotes", (FUNCTION_KEYSEQ *)0, "Show the footnotes associated with this node in another window" },
/* Commands found in "./variables.c". */
- { describe_variable, "describe-variable", (FUNCTION_KEYSEQ *)0, "Explain the use of a variable" },
- { set_variable, "set-variable", (FUNCTION_KEYSEQ *)0, "Set the value of an Info variable" },
+ { (VFunction *)describe_variable, "describe-variable", (FUNCTION_KEYSEQ *)0, "Explain the use of a variable" },
+ { (VFunction *)set_variable, "set-variable", (FUNCTION_KEYSEQ *)0, "Set the value of an Info variable" },
{ (VFunction *)NULL, (char *)NULL, (FUNCTION_KEYSEQ *)NULL, (char *)NULL }
};
diff --git a/contrib/texinfo/info/funs.h b/contrib/texinfo/info/funs.h
index 5e8bc04..f41ef05 100644
--- a/contrib/texinfo/info/funs.h
+++ b/contrib/texinfo/info/funs.h
@@ -1,241 +1,243 @@
/* funs.h -- Generated declarations for Info commands. */
+#include "info.h"
+
/* Functions declared in "./session.c". */
#define A_info_next_line 0
-extern void info_next_line ();
+extern void info_next_line (WINDOW *window, int count, unsigned char key);
#define A_info_prev_line 1
-extern void info_prev_line ();
+extern void info_prev_line (WINDOW *window, int count, unsigned char key);
#define A_info_end_of_line 2
-extern void info_end_of_line ();
+extern void info_end_of_line (WINDOW *window, int count, unsigned char key);
#define A_info_beginning_of_line 3
-extern void info_beginning_of_line ();
+extern void info_beginning_of_line (WINDOW *window, int count, unsigned char key);
#define A_info_forward_char 4
-extern void info_forward_char ();
+extern void info_forward_char (WINDOW *window, int count, unsigned char key);
#define A_info_backward_char 5
-extern void info_backward_char ();
+extern void info_backward_char (WINDOW *window, int count, unsigned char key);
#define A_info_forward_word 6
-extern void info_forward_word ();
+extern void info_forward_word (WINDOW *window, int count, unsigned char key);
#define A_info_backward_word 7
-extern void info_backward_word ();
+extern void info_backward_word (WINDOW *window, int count, unsigned char key);
#define A_info_global_next_node 8
-extern void info_global_next_node ();
+extern void info_global_next_node (WINDOW *window, int count, unsigned char key);
#define A_info_global_prev_node 9
-extern void info_global_prev_node ();
+extern void info_global_prev_node (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_forward 10
-extern void info_scroll_forward ();
+extern void info_scroll_forward (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_forward_set_window 11
-extern void info_scroll_forward_set_window ();
+extern void info_scroll_forward_set_window (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_forward_page_only 12
-extern void info_scroll_forward_page_only ();
+extern void info_scroll_forward_page_only (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_forward_page_only_set_window 13
-extern void info_scroll_forward_page_only_set_window ();
+extern void info_scroll_forward_page_only_set_window (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_backward 14
-extern void info_scroll_backward ();
+extern void info_scroll_backward (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_backward_set_window 15
-extern void info_scroll_backward_set_window ();
+extern void info_scroll_backward_set_window (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_backward_page_only 16
-extern void info_scroll_backward_page_only ();
+extern void info_scroll_backward_page_only (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_backward_page_only_set_window 17
-extern void info_scroll_backward_page_only_set_window ();
+extern void info_scroll_backward_page_only_set_window (WINDOW *window, int count, unsigned char key);
#define A_info_beginning_of_node 18
-extern void info_beginning_of_node ();
+extern void info_beginning_of_node (WINDOW *window, int count, unsigned char key);
#define A_info_end_of_node 19
-extern void info_end_of_node ();
+extern void info_end_of_node (WINDOW *window, int count, unsigned char key);
#define A_info_down_line 20
-extern void info_down_line ();
+extern void info_down_line (WINDOW *window, int count, unsigned char key);
#define A_info_up_line 21
-extern void info_up_line ();
+extern void info_up_line (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_half_screen_down 22
-extern void info_scroll_half_screen_down ();
+extern void info_scroll_half_screen_down (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_half_screen_up 23
-extern void info_scroll_half_screen_up ();
+extern void info_scroll_half_screen_up (WINDOW *window, int count, unsigned char key);
#define A_info_next_window 24
-extern void info_next_window ();
+extern void info_next_window (WINDOW *window, int count, unsigned char key);
#define A_info_prev_window 25
-extern void info_prev_window ();
+extern void info_prev_window (WINDOW *window, int count, unsigned char key);
#define A_info_split_window 26
-extern void info_split_window ();
+extern void info_split_window (WINDOW *window, int count, unsigned char key);
#define A_info_delete_window 27
-extern void info_delete_window ();
+extern void info_delete_window (WINDOW *window, int count, unsigned char key);
#define A_info_keep_one_window 28
-extern void info_keep_one_window ();
+extern void info_keep_one_window (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_other_window 29
-extern void info_scroll_other_window ();
+extern void info_scroll_other_window (WINDOW *window, int count, unsigned char key);
#define A_info_scroll_other_window_backward 30
-extern void info_scroll_other_window_backward ();
+extern void info_scroll_other_window_backward (WINDOW *window, int count, unsigned char key);
#define A_info_grow_window 31
-extern void info_grow_window ();
+extern void info_grow_window (WINDOW *window, int count, unsigned char key);
#define A_info_tile_windows 32
-extern void info_tile_windows ();
+extern void info_tile_windows (WINDOW *window, int count, unsigned char key);
#define A_info_toggle_wrap 33
-extern void info_toggle_wrap ();
+extern void info_toggle_wrap (WINDOW *window, int count, unsigned char key);
#define A_info_next_node 34
-extern void info_next_node ();
+extern void info_next_node (WINDOW *window, int count, unsigned char key);
#define A_info_prev_node 35
-extern void info_prev_node ();
+extern void info_prev_node (WINDOW *window, int count, unsigned char key);
#define A_info_up_node 36
-extern void info_up_node ();
+extern void info_up_node (WINDOW *window, int count, unsigned char key);
#define A_info_last_node 37
-extern void info_last_node ();
+extern void info_last_node (WINDOW *window, int count, unsigned char key);
#define A_info_first_node 38
-extern void info_first_node ();
+extern void info_first_node (WINDOW *window, int count, unsigned char key);
#define A_info_last_menu_item 39
-extern void info_last_menu_item ();
+extern void info_last_menu_item (WINDOW *window, int count, unsigned char key);
#define A_info_menu_digit 40
-extern void info_menu_digit ();
+extern void info_menu_digit (WINDOW *window, int count, unsigned char key);
#define A_info_menu_item 41
-extern void info_menu_item ();
+extern void info_menu_item (WINDOW *window, int count, unsigned char key);
#define A_info_xref_item 42
-extern void info_xref_item ();
+extern void info_xref_item (WINDOW *window, int count, unsigned char key);
#define A_info_find_menu 43
-extern void info_find_menu ();
+extern void info_find_menu (WINDOW *window, int count, unsigned char key);
#define A_info_visit_menu 44
-extern void info_visit_menu ();
+extern void info_visit_menu (WINDOW *window, int count, unsigned char key);
#define A_info_goto_node 45
-extern void info_goto_node ();
+extern void info_goto_node (WINDOW *window, int count, unsigned char key);
#define A_info_menu_sequence 46
-extern void info_menu_sequence ();
+extern void info_menu_sequence (WINDOW *window, int count, unsigned char key);
#define A_info_goto_invocation_node 47
-extern void info_goto_invocation_node ();
+extern void info_goto_invocation_node (WINDOW *window, int count, unsigned char key);
#define A_info_man 48
-extern void info_man ();
+extern void info_man (WINDOW *window, int count, unsigned char key);
#define A_info_top_node 49
-extern void info_top_node ();
+extern void info_top_node (WINDOW *window, int count, unsigned char key);
#define A_info_dir_node 50
-extern void info_dir_node ();
+extern void info_dir_node (WINDOW *window, int count, unsigned char key);
#define A_info_history_node 51
-extern void info_history_node ();
+extern void info_history_node (WINDOW *window, int count, unsigned char key);
#define A_info_kill_node 52
-extern void info_kill_node ();
+extern void info_kill_node (WINDOW *window, int count, unsigned char key);
#define A_info_view_file 53
-extern void info_view_file ();
+extern void info_view_file (WINDOW *window, int count, unsigned char key);
#define A_info_print_node 54
-extern void info_print_node ();
+extern void info_print_node (WINDOW *window, int count, unsigned char key);
#define A_info_search_case_sensitively 55
-extern void info_search_case_sensitively ();
+extern void info_search_case_sensitively (WINDOW *window, int count, unsigned char key);
#define A_info_search 56
-extern void info_search ();
+extern void info_search (WINDOW *window, int count, unsigned char key);
#define A_info_search_backward 57
-extern void info_search_backward ();
+extern void info_search_backward (WINDOW *window, int count, unsigned char key);
#define A_info_search_next 58
-extern void info_search_next ();
+extern void info_search_next (WINDOW *window, int count, unsigned char key);
#define A_info_search_previous 59
-extern void info_search_previous ();
+extern void info_search_previous (WINDOW *window, int count, unsigned char key);
#define A_isearch_forward 60
-extern void isearch_forward ();
+extern void isearch_forward (WINDOW *window, int count, unsigned char key);
#define A_isearch_backward 61
-extern void isearch_backward ();
+extern void isearch_backward (WINDOW *window, int count, unsigned char key);
#define A_info_move_to_prev_xref 62
-extern void info_move_to_prev_xref ();
+extern void info_move_to_prev_xref (WINDOW *window, int count, unsigned char key);
#define A_info_move_to_next_xref 63
-extern void info_move_to_next_xref ();
+extern void info_move_to_next_xref (WINDOW *window, int count, unsigned char key);
#define A_info_select_reference_this_line 64
-extern void info_select_reference_this_line ();
+extern void info_select_reference_this_line (WINDOW *window, int count, unsigned char key);
#define A_info_abort_key 65
-extern void info_abort_key ();
+extern void info_abort_key (WINDOW *window, int count, unsigned char key);
#define A_info_move_to_window_line 66
-extern void info_move_to_window_line ();
+extern void info_move_to_window_line (WINDOW *window, int count, unsigned char key);
#define A_info_redraw_display 67
-extern void info_redraw_display ();
+extern void info_redraw_display (WINDOW *window, int count, unsigned char key);
#define A_info_quit 68
-extern void info_quit ();
+extern void info_quit (WINDOW *window, int count, unsigned char key);
#define A_info_do_lowercase_version 69
-extern void info_do_lowercase_version ();
+extern void info_do_lowercase_version (WINDOW *window, int count, unsigned char key);
#define A_info_add_digit_to_numeric_arg 70
-extern void info_add_digit_to_numeric_arg ();
+extern void info_add_digit_to_numeric_arg (WINDOW *window, int count, unsigned char key);
#define A_info_universal_argument 71
-extern void info_universal_argument ();
+extern void info_universal_argument (WINDOW *window, int count, unsigned char key);
#define A_info_numeric_arg_digit_loop 72
-extern void info_numeric_arg_digit_loop ();
+extern void info_numeric_arg_digit_loop (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./echo-area.c". */
#define A_ea_forward 73
-extern void ea_forward ();
+extern void ea_forward (WINDOW *window, int count, unsigned char key);
#define A_ea_backward 74
-extern void ea_backward ();
+extern void ea_backward (WINDOW *window, int count, unsigned char key);
#define A_ea_beg_of_line 75
-extern void ea_beg_of_line ();
+extern void ea_beg_of_line (WINDOW *window, int count, unsigned char key);
#define A_ea_end_of_line 76
-extern void ea_end_of_line ();
+extern void ea_end_of_line (WINDOW *window, int count, unsigned char key);
#define A_ea_forward_word 77
-extern void ea_forward_word ();
+extern void ea_forward_word (WINDOW *window, int count, unsigned char key);
#define A_ea_backward_word 78
-extern void ea_backward_word ();
+extern void ea_backward_word (WINDOW *window, int count, unsigned char key);
#define A_ea_delete 79
-extern void ea_delete ();
+extern void ea_delete (WINDOW *window, int count, unsigned char key);
#define A_ea_rubout 80
-extern void ea_rubout ();
+extern void ea_rubout (WINDOW *window, int count, unsigned char key);
#define A_ea_abort 81
-extern void ea_abort ();
+extern void ea_abort (WINDOW *window, int count, unsigned char key);
#define A_ea_newline 82
-extern void ea_newline ();
+extern void ea_newline (WINDOW *window, int count, unsigned char key);
#define A_ea_quoted_insert 83
-extern void ea_quoted_insert ();
+extern void ea_quoted_insert (WINDOW *window, int count, unsigned char key);
#define A_ea_insert 84
-extern void ea_insert ();
+extern void ea_insert (WINDOW *window, int count, unsigned char key);
#define A_ea_tab_insert 85
-extern void ea_tab_insert ();
+extern void ea_tab_insert (WINDOW *window, int count, unsigned char key);
#define A_ea_transpose_chars 86
-extern void ea_transpose_chars ();
+extern void ea_transpose_chars (WINDOW *window, int count, unsigned char key);
#define A_ea_yank 87
-extern void ea_yank ();
+extern void ea_yank (WINDOW *window, int count, unsigned char key);
#define A_ea_yank_pop 88
-extern void ea_yank_pop ();
+extern void ea_yank_pop (WINDOW *window, int count, unsigned char key);
#define A_ea_kill_line 89
-extern void ea_kill_line ();
+extern void ea_kill_line (WINDOW *window, int count, unsigned char key);
#define A_ea_backward_kill_line 90
-extern void ea_backward_kill_line ();
+extern void ea_backward_kill_line (WINDOW *window, int count, unsigned char key);
#define A_ea_kill_word 91
-extern void ea_kill_word ();
+extern void ea_kill_word (WINDOW *window, int count, unsigned char key);
#define A_ea_backward_kill_word 92
-extern void ea_backward_kill_word ();
+extern void ea_backward_kill_word (WINDOW *window, int count, unsigned char key);
#define A_ea_possible_completions 93
-extern void ea_possible_completions ();
+extern void ea_possible_completions (WINDOW *window, int count, unsigned char key);
#define A_ea_complete 94
-extern void ea_complete ();
+extern void ea_complete (WINDOW *window, int count, unsigned char key);
#define A_ea_scroll_completions_window 95
-extern void ea_scroll_completions_window ();
+extern void ea_scroll_completions_window (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./infodoc.c". */
#define A_info_get_help_window 96
-extern void info_get_help_window ();
+extern void info_get_help_window (WINDOW *window, int count, unsigned char key);
#define A_info_get_info_help_node 97
-extern void info_get_info_help_node ();
+extern void info_get_info_help_node (WINDOW *window, int count, unsigned char key);
#define A_describe_key 98
-extern void describe_key ();
+extern void describe_key (WINDOW *window, int count, unsigned char key);
#define A_info_where_is 99
-extern void info_where_is ();
+extern void info_where_is (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./m-x.c". */
#define A_describe_command 100
-extern void describe_command ();
+extern void describe_command (WINDOW *window, int count, unsigned char key);
#define A_info_execute_command 101
-extern void info_execute_command ();
+extern void info_execute_command (WINDOW *window, int count, unsigned char key);
#define A_set_screen_height 102
-extern void set_screen_height ();
+extern void set_screen_height (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./indices.c". */
#define A_info_index_search 103
-extern void info_index_search ();
+extern void info_index_search (WINDOW *window, int count, unsigned char key);
#define A_info_next_index_match 104
-extern void info_next_index_match ();
+extern void info_next_index_match (WINDOW *window, int count, unsigned char key);
#define A_info_index_apropos 105
-extern void info_index_apropos ();
+extern void info_index_apropos (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./nodemenu.c". */
#define A_list_visited_nodes 106
-extern void list_visited_nodes ();
+extern void list_visited_nodes (WINDOW *window, int count, unsigned char key);
#define A_select_visited_node 107
-extern void select_visited_node ();
+extern void select_visited_node (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./footnotes.c". */
#define A_info_show_footnotes 108
-extern void info_show_footnotes ();
+extern void info_show_footnotes (WINDOW *window, int count, unsigned char key);
/* Functions declared in "./variables.c". */
#define A_describe_variable 109
-extern void describe_variable ();
+extern void describe_variable (WINDOW *window, int count, unsigned char key);
#define A_set_variable 110
-extern void set_variable ();
+extern void set_variable (WINDOW *window, int count, unsigned char key);
#define A_NCOMMANDS 111
diff --git a/contrib/texinfo/info/infomap.c b/contrib/texinfo/info/infomap.c
index 82fd490..c7dc2f4 100644
--- a/contrib/texinfo/info/infomap.c
+++ b/contrib/texinfo/info/infomap.c
@@ -1,7 +1,7 @@
/* infomap.c -- keymaps for Info.
- $Id: infomap.c,v 1.7 2003/05/13 16:27:04 karl Exp $
+ $Id: infomap.c,v 1.10 2004/07/30 20:43:40 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -30,10 +30,13 @@
#include "variables.h"
#endif /* INFOKEY */
+static int keymap_bind_keyseq (Keymap map, const char *keyseq,
+ KEYMAP_ENTRY *keyentry);
+
/* Return a new keymap which has all the uppercase letters mapped to run
the function info_do_lowercase_version (). */
Keymap
-keymap_make_keymap ()
+keymap_make_keymap (void)
{
int i;
Keymap keymap;
@@ -61,10 +64,7 @@ keymap_make_keymap ()
#if defined(INFOKEY)
static FUNCTION_KEYSEQ *
-find_function_keyseq (map, c, rootmap)
- Keymap map;
- int c;
- Keymap rootmap;
+find_function_keyseq (Keymap map, int c, Keymap rootmap)
{
FUNCTION_KEYSEQ *k;
@@ -78,7 +78,7 @@ find_function_keyseq (map, c, rootmap)
Keymap m = rootmap;
if (k->map != rootmap)
continue;
- for (p = k->keyseq; *p && m[*p].type == ISKMAP; p++)
+ for (p = (unsigned char *) k->keyseq; *p && m[*p].type == ISKMAP; p++)
m = (Keymap)m[*p].function;
if (*p != c || p[1])
continue;
@@ -90,10 +90,8 @@ find_function_keyseq (map, c, rootmap)
}
static void
-add_function_keyseq (function, keyseq, rootmap)
- InfoCommand *function;
- const unsigned char *keyseq;
- Keymap rootmap;
+add_function_keyseq (InfoCommand *function,
+ const char *keyseq, Keymap rootmap)
{
FUNCTION_KEYSEQ *ks;
@@ -109,10 +107,8 @@ add_function_keyseq (function, keyseq, rootmap)
}
static void
-remove_function_keyseq (function, keyseq, rootmap)
- InfoCommand *function;
- const unsigned char *keyseq;
- Keymap rootmap;
+remove_function_keyseq (InfoCommand *function,
+ const char *keyseq, Keymap rootmap)
{
FUNCTION_KEYSEQ *k, *kp;
@@ -135,10 +131,7 @@ remove_function_keyseq (function, keyseq, rootmap)
/* Return a new keymap which is a copy of MAP. */
Keymap
-keymap_copy_keymap (map, rootmap, newroot)
- Keymap map;
- Keymap rootmap;
- Keymap newroot;
+keymap_copy_keymap (Keymap map, Keymap rootmap, Keymap newroot)
{
int i;
Keymap keymap;
@@ -158,14 +151,14 @@ keymap_copy_keymap (map, rootmap, newroot)
case ISFUNC:
keymap[i].function = map[i].function;
#if defined(INFOKEY)
- ks = find_function_keyseq (map, i, rootmap, NULL);
+ ks = find_function_keyseq (map, i, rootmap);
if (ks)
add_function_keyseq(map[i].function, ks->keyseq, newroot);
#endif /* INFOKEY */
break;
case ISKMAP:
- keymap[i].function = (InfoCommand *)keymap_copy_keymap (
- (Keymap)map[i].function, rootmap);
+ keymap[i].function = (InfoCommand *)keymap_copy_keymap
+ ((Keymap)map[i].function, rootmap, NULL);
break;
}
}
@@ -174,9 +167,7 @@ keymap_copy_keymap (map, rootmap, newroot)
/* Free the keymap and its descendants. */
void
-keymap_discard_keymap (map, rootmap)
- Keymap map;
- Keymap rootmap;
+keymap_discard_keymap (Keymap map, Keymap rootmap)
{
int i;
@@ -210,14 +201,12 @@ keymap_discard_keymap (map, rootmap)
}
/* Conditionally bind key sequence. */
-int
-keymap_bind_keyseq (map, keyseq, keyentry)
- Keymap map;
- const unsigned char *keyseq;
- KEYMAP_ENTRY *keyentry;
+static int
+keymap_bind_keyseq (Keymap map,
+ const char *keyseq, KEYMAP_ENTRY *keyentry)
{
Keymap m = map;
- const unsigned char *s = keyseq;
+ const unsigned char *s = (unsigned char *) keyseq;
int c;
if (s == NULL || *s == '\0') return 0;
@@ -715,8 +704,8 @@ initialize_vi_like_keymaps ()
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['j'].function = info_next_line;
+ map['k'].function = info_prev_line;
map['l'].function = info_history_node;
map['m'].function = info_menu_item;
map['n'].function = info_search_next;
@@ -1193,8 +1182,8 @@ static unsigned char default_vi_like_info_keys[] =
'H', NUL, A_info_get_help_window,
'i', NUL, A_info_index_search,
'I', NUL, A_info_goto_invocation_node,
- 'j', NUL, A_info_down_line,
- 'k', NUL, A_info_up_line,
+ 'j', NUL, A_info_next_line,
+ 'k', NUL, A_info_prev_line,
'l', NUL, A_info_history_node,
'm', NUL, A_info_menu_item,
'n', NUL, A_info_search_next,
@@ -1432,8 +1421,7 @@ static unsigned int user_vars_len;
* Return the size of a file, or 0 if the size can't be determined.
*/
static unsigned long
-filesize(f)
- int f;
+filesize(int f)
{
long pos = lseek(f, 0L, SEEK_CUR);
long sz = -1L;
@@ -1449,8 +1437,7 @@ filesize(f)
Integers are stored as two bytes, low order first, in radix INFOKEY_RADIX.
*/
static int
-getint(sp)
- unsigned char **sp;
+getint(unsigned char **sp)
{
int n;
@@ -1465,7 +1452,7 @@ getint(sp)
/* Fetch the contents of the standard infokey file "$HOME/.info". Return
true if ok, false if not. */
static int
-fetch_user_maps()
+fetch_user_maps(void)
{
char *filename = NULL;
char *homedir;
@@ -1495,7 +1482,8 @@ fetch_user_maps()
{
if (filename && errno != ENOENT)
{
- info_error(filesys_error_string(filename, errno));
+ info_error(filesys_error_string(filename, errno),
+ NULL, NULL);
free(filename);
}
return 0;
@@ -1509,11 +1497,11 @@ fetch_user_maps()
/* Bad file (a valid file must have at least 9 chars, and
more than 100 KB is a problem). */
if (len < INFOKEY_NMAGIC + 2)
- info_error(_("Ignoring invalid infokey file `%s' - too small"),
- filename);
+ info_error((char *) _("Ignoring invalid infokey file `%s' - too small"),
+ filename, NULL);
else
- info_error(_("Ignoring invalid infokey file `%s' - too big"),
- filename);
+ info_error((char *) _("Ignoring invalid infokey file `%s' - too big"),
+ filename, NULL);
close(f);
free(filename);
return 0;
@@ -1523,9 +1511,10 @@ fetch_user_maps()
buf = (unsigned char *)xmalloc((int)len);
nread = read(f, buf, (unsigned int) len);
close(f);
- if (nread != len)
+ if ((unsigned int) nread != len)
{
- info_error(_("Error reading infokey file `%s' - short read"), filename);
+ info_error((char *) _("Error reading infokey file `%s' - short read"),
+ filename, NULL);
free(buf);
free(filename);
return 0;
@@ -1543,26 +1532,33 @@ fetch_user_maps()
|| buf[len - 1] != INFOKEY_MAGIC_E3
)
{
- info_error(_("Invalid infokey file `%s' (bad magic numbers) -- run infokey to update it"), filename);
+ info_error((char *) _("Invalid infokey file `%s' (bad magic numbers) -- run infokey to update it"),
+ filename, NULL);
free(filename);
return 0;
}
- if (len < INFOKEY_NMAGIC + strlen(VERSION) + 1 || strcmp(VERSION, buf + 4) != 0)
+ if (len < INFOKEY_NMAGIC + strlen(VERSION) + 1
+ || strcmp(VERSION, (char *) (buf + 4)) != 0)
{
- info_error(_("Your infokey file `%s' is out of date -- run infokey to update it"), filename);
+ info_error
+ ((char *) _("Your infokey file `%s' is out of date -- run infokey to update it"),
+ filename, NULL);
free(filename);
return 0;
}
/* Extract the pieces. */
- for (p = buf + 4 + strlen(VERSION) + 1; p - buf < len - 4; p += n)
+ for (p = buf + 4 + strlen(VERSION) + 1;
+ (unsigned int) (p - buf) < len - 4;
+ p += n)
{
int s = *p++;
n = getint(&p);
- if (n < 0 || n > len - 4 - (p - buf))
+ if (n < 0 || (unsigned int) n > len - 4 - (p - buf))
{
- info_error(_("Invalid infokey file `%s' (bad section length) -- run infokey to update it"), filename);
+ info_error((char *) _("Invalid infokey file `%s' (bad section length) -- run infokey to update it"),
+ filename, NULL);
free(filename);
return 0;
}
@@ -1582,7 +1578,8 @@ fetch_user_maps()
user_vars_len = n;
break;
default:
- info_error(_("Invalid infokey file `%s' (bad section code) -- run infokey to update it"), filename);
+ info_error((char *) _("Invalid infokey file `%s' (bad section code) -- run infokey to update it"),
+ filename, NULL);
free(filename);
return 0;
}
@@ -1597,27 +1594,26 @@ fetch_user_maps()
doesn't define.
*/
static int
-decode_keys(src, slen, dst, dlen)
- unsigned char *src;
- unsigned int slen;
- unsigned char *dst;
- unsigned int dlen;
+decode_keys(unsigned char *src, unsigned int slen,
+ unsigned char *dst, unsigned int dlen)
{
unsigned char *s = src;
unsigned char *d = dst;
-#define To_dst(c) do { if (d - dst < dlen) *d++ = (c); } while (0)
+#define To_dst(c) do { \
+ if ((unsigned int) (d - dst) < dlen) *d++ = (c); \
+} while (0)
- while (s - src < slen)
+ while ((unsigned int) (s - src) < slen)
{
unsigned char c = ISMETA(*s) ? UNMETA(*s) : *s;
if (c == SK_ESCAPE)
{
- unsigned char *t;
+ char *t;
static char lit[] = { SK_ESCAPE, NUL };
- switch (s + 1 - src < slen ? s[1] : '\0')
+ switch ((unsigned int) (s + 1 - src) < slen ? s[1] : '\0')
{
case SK_RIGHT_ARROW: t = term_kr; break;
case SK_LEFT_ARROW: t = term_kl; break;
@@ -1658,20 +1654,17 @@ decode_keys(src, slen, dst, dlen)
/* Convert an infokey file section to keymap bindings. Return false if
the default bindings are to be suppressed. */
static int
-section_to_keymaps(map, table, len)
- Keymap map;
- unsigned char *table;
- unsigned int len;
+section_to_keymaps(Keymap map, unsigned char *table, unsigned int len)
{
int stop;
unsigned char *p;
- unsigned char *seq;
- unsigned int seqlen;
+ unsigned char *seq = NULL;
+ unsigned int seqlen = 0;
enum { getseq, gotseq, getaction } state = getseq;
stop = len > 0 ? table[0] : 0;
- for (p = table + 1; p - table < len; p++)
+ for (p = table + 1; (unsigned int) (p - table) < len; p++)
{
switch (state)
{
@@ -1712,30 +1705,30 @@ section_to_keymaps(map, table, len)
action < A_NCOMMANDS
? &function_doc_array[action]
: NULL;
- keymap_bind_keyseq(map, keyseq, &ke);
+ keymap_bind_keyseq(map,
+ (const char *) keyseq, &ke);
}
}
break;
}
}
if (state != getseq)
- info_error(_("Bad data in infokey file -- some key bindings ignored"));
+ info_error((char *) _("Bad data in infokey file -- some key bindings ignored"),
+ NULL, NULL);
return !stop;
}
/* Convert an infokey file section to variable settings.
*/
static void
-section_to_vars(table, len)
- unsigned char *table;
- unsigned int len;
+section_to_vars(unsigned char *table, unsigned int len)
{
enum { getvar, gotvar, getval, gotval } state = getvar;
unsigned char *var = NULL;
unsigned char *val = NULL;
unsigned char *p;
- for (p = table; p - table < len; p++)
+ for (p = table; (unsigned int) (p - table) < len; p++)
{
switch (state)
{
@@ -1763,18 +1756,19 @@ section_to_vars(table, len)
case gotval:
if (!*p)
{
- set_variable_to_value(var, val);
+ set_variable_to_value((char *) var, (char *) val);
state = getvar;
}
break;
}
}
if (state != getvar)
- info_error(_("Bad data in infokey file -- some var settings ignored"));
+ info_error((char *) _("Bad data in infokey file -- some var settings ignored"),
+ NULL, NULL);
}
void
-initialize_info_keymaps ()
+initialize_info_keymaps (void)
{
int i;
int suppress_info_default_bindings = 0;
diff --git a/contrib/texinfo/info/nodemenu.c b/contrib/texinfo/info/nodemenu.c
index 4de2cfa..1090d08 100644
--- a/contrib/texinfo/info/nodemenu.c
+++ b/contrib/texinfo/info/nodemenu.c
@@ -1,7 +1,8 @@
/* nodemenu.c -- produce a menu of all visited nodes.
- $Id: nodemenu.c,v 1.3 2003/05/13 16:37:54 karl Exp $
+ $Id: nodemenu.c,v 1.5 2004/04/11 17:56:46 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2003, 2004 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
@@ -21,9 +22,11 @@
#include "info.h"
+NODE * get_visited_nodes (Function *filter_func);
+
/* Return a line describing the format of a node information line. */
static const char *
-nodemenu_format_info ()
+nodemenu_format_info (void)
{
return (_("\n\
* Menu:\n\
@@ -42,8 +45,7 @@ nodemenu_format_info ()
* (dir)Top:: 40 589 /usr/gnu/info/dir
*/
static char *
-format_node_info (node)
- NODE *node;
+format_node_info (NODE *node)
{
register int i, len;
char *parent, *containing_file;
@@ -109,10 +111,12 @@ format_node_info (node)
/* Little string comparison routine for qsort (). */
static int
-compare_strings (string1, string2)
- char **string1, **string2;
+compare_strings (const void *entry1, const void *entry2)
{
- return (strcasecmp (*string1, *string2));
+ char **e1 = (char **) entry1;
+ char **e2 = (char **) entry2;
+
+ return (strcasecmp (*e1, *e2));
}
/* The name of the nodemenu node. */
@@ -123,8 +127,7 @@ static char *nodemenu_nodename = "*Node Menu*";
which nodes will appear in the listing. FILTER_FUNC takes an argument
of NODE, and returns non-zero if the node should appear in the listing. */
NODE *
-get_visited_nodes (filter_func)
- Function *filter_func;
+get_visited_nodes (Function *filter_func)
{
register int i, iw_index;
INFO_WINDOW *info_win;
@@ -196,14 +199,16 @@ get_visited_nodes (filter_func)
printf_to_message_buffer
("%s", replace_in_documentation
- (_("Here is the menu of nodes you have recently visited.\n\
-Select one from this menu, or use `\\[history-node]' in another window.\n")));
+ ((char *) _("Here is the menu of nodes you have recently visited.\n\
+Select one from this menu, or use `\\[history-node]' in another window.\n"), 0),
+ NULL, NULL);
- printf_to_message_buffer ("%s\n", nodemenu_format_info ());
+ printf_to_message_buffer ("%s\n", (char *) nodemenu_format_info (),
+ NULL, NULL);
for (i = 0; (lines != (char **)NULL) && (i < lines_index); i++)
{
- printf_to_message_buffer ("%s\n", lines[i]);
+ printf_to_message_buffer ("%s\n", lines[i], NULL, NULL);
free (lines[i]);
}
@@ -308,7 +313,8 @@ DECLARE_INFO_COMMAND (select_visited_node,
free (node);
line =
- info_read_completing_in_echo_area (window, _("Select visited node: "), menu);
+ info_read_completing_in_echo_area (window,
+ (char *) _("Select visited node: "), menu);
window = active_window;
@@ -328,7 +334,7 @@ DECLARE_INFO_COMMAND (select_visited_node,
entry = info_get_labeled_reference (line, menu);
if (!entry)
- info_error (_("The reference disappeared! (%s)."), line);
+ info_error ((char *) _("The reference disappeared! (%s)."), line, NULL);
else
info_select_reference (window, entry);
}
diff --git a/contrib/texinfo/info/session.c b/contrib/texinfo/info/session.c
index cff7d75..7a8996b 100644
--- a/contrib/texinfo/info/session.c
+++ b/contrib/texinfo/info/session.c
@@ -1,7 +1,7 @@
/* session.c -- user windowing interface to Info.
- $Id: session.c,v 1.8 2003/03/22 17:41:16 karl Exp $
+ $Id: session.c,v 1.16 2004/12/14 00:15:36 karl Exp $
- Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -18,9 +18,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
+#include "search.h"
#include <sys/ioctl.h>
#if defined (HAVE_SYS_TIME_H)
@@ -32,14 +33,11 @@
# include "man.h"
#endif
-#ifdef M_XENIX
-/* SCO 3.2v5.0.2 defines but does not correctly declare strncasecmp.
- Since we use it as a symbol, have to get it right. --gildea, 1jul99. */
-extern int strncasecmp (const char *, const char *, size_t);
-#endif
-
-static void info_clear_pending_input (), info_set_pending_input ();
-static void info_handle_pointer ();
+static void info_clear_pending_input (void);
+static void info_set_pending_input (unsigned char key);
+static void info_handle_pointer (char *label, WINDOW *window);
+static void display_info_keyseq (int expecting_future_input);
+char *node_printed_rep (NODE *node);
/* **************************************************************** */
/* */
@@ -66,17 +64,15 @@ static int info_windows_index = 0;
/* Number of slots allocated to `info_windows'. */
static int info_windows_slots = 0;
-void remember_window_and_node (), forget_window_and_nodes ();
-void initialize_info_session (), info_session ();
-void display_startup_message_and_start ();
+void remember_window_and_node (WINDOW *window, NODE *node);
+void forget_window_and_nodes (WINDOW *window);
+void display_startup_message_and_start (void);
/* Begin an info session finding the nodes specified by FILENAME and NODENAMES.
For each loaded node, create a new window. Always split the largest of the
available windows. */
void
-begin_multiple_window_info_session (filename, nodenames)
- char *filename;
- char **nodenames;
+begin_multiple_window_info_session (char *filename, char **nodenames)
{
register int i;
WINDOW *window = (WINDOW *)NULL;
@@ -114,7 +110,7 @@ begin_multiple_window_info_session (filename, nodenames)
if (!largest)
{
display_update_display (windows);
- info_error (msg_cant_find_window);
+ info_error ((char *) msg_cant_find_window, NULL, NULL);
info_session ();
xexit (0);
}
@@ -129,7 +125,7 @@ begin_multiple_window_info_session (filename, nodenames)
else
{
display_update_display (windows);
- info_error (msg_win_too_small);
+ info_error ((char *) msg_win_too_small, NULL, NULL);
info_session ();
xexit (0);
}
@@ -141,11 +137,8 @@ begin_multiple_window_info_session (filename, nodenames)
/* Start an info session with INITIAL_NODE, and an error message in the echo
area made from FORMAT and ARG. */
void
-begin_info_session_with_error (initial_node, format, arg1, arg2)
- NODE *initial_node;
- char *format;
- void *arg1;
- void *arg2;
+begin_info_session_with_error (NODE *initial_node, char *format,
+ void *arg1, void *arg2)
{
initialize_info_session (initial_node, 1);
info_error (format, arg1, arg2);
@@ -154,28 +147,28 @@ begin_info_session_with_error (initial_node, format, arg1, arg2)
/* Start an info session with INITIAL_NODE. */
void
-begin_info_session (initial_node)
- NODE *initial_node;
+begin_info_session (NODE *initial_node)
{
initialize_info_session (initial_node, 1);
display_startup_message_and_start ();
}
void
-display_startup_message_and_start ()
+display_startup_message_and_start (void)
{
char *format;
format = replace_in_documentation
- (_("Welcome to Info version %s. Type \\[get-help-window] for help, \\[menu-item] for menu item."));
+ ((char *) _("Welcome to Info version %s. Type \\[get-help-window] for help, \\[menu-item] for menu item."),
+ 0);
- window_message_in_echo_area (format, VERSION);
+ window_message_in_echo_area (format, VERSION, NULL);
info_session ();
}
/* Run an info session with an already initialized window and node. */
void
-info_session ()
+info_session (void)
{
display_update_display (windows);
info_last_executed_command = NULL;
@@ -192,7 +185,7 @@ info_session ()
/* Here is a window-location dependent event loop. Called from the
functions info_session (), and from read_xxx_in_echo_area (). */
void
-info_read_and_dispatch ()
+info_read_and_dispatch (void)
{
unsigned char key;
int done;
@@ -200,12 +193,12 @@ info_read_and_dispatch ()
while (!done && !quit_info_immediately)
{
- int lk;
+ int lk = 0;
/* If we haven't just gone up or down a line, there is no
goal column for this window. */
- if ((info_last_executed_command != info_next_line) &&
- (info_last_executed_command != info_prev_line))
+ if ((info_last_executed_command != (VFunction *) info_next_line) &&
+ (info_last_executed_command != (VFunction *) info_prev_line))
active_window->goal_column = -1;
if (echo_area_is_active)
@@ -242,30 +235,28 @@ info_read_and_dispatch ()
if (lk == echo_area_last_command_was_kill)
echo_area_last_command_was_kill = 0;
- if (ea_last_executed_command == ea_newline ||
+ if (ea_last_executed_command == (VFunction *) ea_newline ||
info_aborted_echo_area)
{
ea_last_executed_command = (VFunction *)NULL;
done = 1;
}
- if (info_last_executed_command == info_quit)
+ if (info_last_executed_command == (VFunction *) info_quit)
quit_info_immediately = 1;
}
- else if (info_last_executed_command == info_quit)
+ else if (info_last_executed_command == (VFunction *) info_quit)
done = 1;
}
}
/* Found in signals.c */
-extern void initialize_info_signal_handler ();
+extern void initialize_info_signal_handler (void );
/* Initialize the first info session by starting the terminal, window,
and display systems. If CLEAR_SCREEN is 0, don't clear the screen. */
void
-initialize_info_session (node, clear_screen)
- NODE *node;
- int clear_screen;
+initialize_info_session (NODE *node, int clear_screen)
{
char *term_name = getenv ("TERM");
terminal_initialize_terminal (term_name);
@@ -275,7 +266,7 @@ initialize_info_session (node, clear_screen)
if (!term_name)
term_name = "dumb";
- info_error (msg_term_too_dumb, term_name);
+ info_error ((char *) msg_term_too_dumb, term_name, NULL);
xexit (1);
}
@@ -293,7 +284,7 @@ initialize_info_session (node, clear_screen)
/* Tell the window system how to notify us when a window needs to be
asynchronously deleted (e.g., user resizes window very small). */
- window_deletion_notifier = forget_window_and_nodes;
+ window_deletion_notifier = (VFunction *) forget_window_and_nodes;
/* If input has not been redirected yet, make it come from unbuffered
standard input. */
@@ -308,8 +299,7 @@ initialize_info_session (node, clear_screen)
/* Tell Info that input is coming from the file FILENAME. */
void
-info_set_input_from_file (filename)
- char *filename;
+info_set_input_from_file (char *filename)
{
FILE *stream;
@@ -331,8 +321,7 @@ info_set_input_from_file (filename)
/* Return the INFO_WINDOW containing WINDOW, or NULL if there isn't one. */
static INFO_WINDOW *
-get_info_window_of_window (window)
- WINDOW *window;
+get_info_window_of_window (WINDOW *window)
{
register int i;
INFO_WINDOW *info_win = (INFO_WINDOW *)NULL;
@@ -348,8 +337,7 @@ get_info_window_of_window (window)
values if the window and node are the same as the current one being
displayed. */
void
-set_remembered_pagetop_and_point (window)
- WINDOW *window;
+set_remembered_pagetop_and_point (WINDOW *window)
{
INFO_WINDOW *info_win;
@@ -367,9 +355,7 @@ set_remembered_pagetop_and_point (window)
}
void
-remember_window_and_node (window, node)
- WINDOW *window;
- NODE *node;
+remember_window_and_node (WINDOW *window, NODE *node)
{
/* See if we already have this window in our list. */
INFO_WINDOW *info_win = get_info_window_of_window (window);
@@ -428,7 +414,7 @@ remember_window_and_node (window, node)
#define DEBUG_FORGET_WINDOW_AND_NODES
#if defined (DEBUG_FORGET_WINDOW_AND_NODES)
static void
-consistency_check_info_windows ()
+consistency_check_info_windows (void)
{
register int i;
@@ -448,8 +434,7 @@ consistency_check_info_windows ()
/* Remove WINDOW and its associated list of nodes from INFO_WINDOWS. */
void
-forget_window_and_nodes (window)
- WINDOW *window;
+forget_window_and_nodes (WINDOW *window)
{
register int i;
INFO_WINDOW *info_win = (INFO_WINDOW *)NULL;
@@ -496,10 +481,7 @@ forget_window_and_nodes (window)
the footnotes for this window. If REMEMBER is nonzero, first call
set_remembered_pagetop_and_point. */
void
-info_set_node_of_window (remember, window, node)
- int remember;
- WINDOW *window;
- NODE *node;
+info_set_node_of_window (int remember, WINDOW *window, NODE *node)
{
if (remember)
set_remembered_pagetop_and_point (window);
@@ -526,9 +508,7 @@ info_set_node_of_window (remember, window, node)
/* Change the pagetop of WINDOW to DESIRED_TOP, perhaps scrolling the screen
to do so. */
void
-set_window_pagetop (window, desired_top)
- WINDOW *window;
- int desired_top;
+set_window_pagetop (WINDOW *window, int desired_top)
{
int point_line, old_pagetop;
@@ -591,8 +571,7 @@ set_window_pagetop (window, desired_top)
/* Immediately make WINDOW->point visible on the screen, and move the
terminal cursor there. */
static void
-info_show_point (window)
- WINDOW *window;
+info_show_point (WINDOW *window)
{
int old_pagetop;
@@ -615,13 +594,11 @@ info_show_point (window)
/* Move WINDOW->point from OLD line index to NEW line index. */
static void
-move_to_new_line (old, new, window)
- int old, new;
- WINDOW *window;
+move_to_new_line (int old, int new, WINDOW *window)
{
if (old == -1)
{
- info_error (msg_cant_find_point);
+ info_error ((char *) msg_cant_find_point, NULL, NULL);
}
else
{
@@ -869,23 +846,22 @@ int default_scroll_size = -1; /* meaning half screen size */
/* Move to 1st menu item, Next, Up/Next, or error in this window. */
static void
-forward_move_node_structure (window, behaviour)
- WINDOW *window;
- int behaviour;
+forward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
- info_error (msg_at_node_bottom);
+ info_error ((char *) msg_at_node_bottom, NULL, NULL);
break;
case IS_NextOnly:
info_next_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error (msg_no_pointer, _("Next"));
+ info_error ((char *) msg_no_pointer, (char *) _("Next"), NULL);
else
{
- window_message_in_echo_area (_("Following Next node..."));
+ window_message_in_echo_area ((char *) _("Following Next node..."),
+ NULL, NULL);
info_handle_pointer ("Next", window);
}
break;
@@ -902,7 +878,8 @@ forward_move_node_structure (window, behaviour)
if (menu)
{
info_free_references (menu);
- window_message_in_echo_area (_("Selecting first menu item..."));
+ window_message_in_echo_area ((char *) _("Selecting first menu item..."),
+ NULL, NULL);
info_menu_digit (window, 1, '1');
return;
}
@@ -913,7 +890,8 @@ forward_move_node_structure (window, behaviour)
info_next_label_of_node (window->node);
if (INFO_LABEL_FOUND ())
{
- window_message_in_echo_area (_("Selecting Next node..."));
+ window_message_in_echo_area ((char *) _("Selecting Next node..."),
+ NULL, NULL);
info_handle_pointer ("Next", window);
return;
}
@@ -983,8 +961,8 @@ forward_move_node_structure (window, behaviour)
/* This node has a "Next" pointer, and it is not the
same as the first menu item found in this node. */
window_message_in_echo_area
- (_("Moving Up %d time(s), then Next."),
- up_counter);
+ ((char *) _("Moving Up %d time(s), then Next."),
+ (void *) (long) up_counter, NULL);
info_handle_pointer ("Next", window);
return;
@@ -1007,7 +985,8 @@ forward_move_node_structure (window, behaviour)
window->point = info_win->points[old_current];
recalculate_line_starts (window);
window->flags |= W_UpdateWindow;
- info_error (_("No more nodes within this document."));
+ info_error ((char *) _("No more nodes within this document."),
+ NULL, NULL);
}
}
}
@@ -1018,23 +997,22 @@ forward_move_node_structure (window, behaviour)
/* Move Prev, Up or error in WINDOW depending on BEHAVIOUR. */
static void
-backward_move_node_structure (window, behaviour)
- WINDOW *window;
- int behaviour;
+backward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
- info_error (msg_at_node_top);
+ info_error ((char *) msg_at_node_top, NULL, NULL);
break;
case IS_NextOnly:
info_prev_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error (_("No `Prev' for this node."));
+ info_error ((char *) _("No `Prev' for this node."), NULL, NULL);
else
{
- window_message_in_echo_area (_("Moving Prev in this window."));
+ window_message_in_echo_area ((char *) _("Moving Prev in this window."),
+ NULL, NULL);
info_handle_pointer ("Prev", window);
}
break;
@@ -1048,10 +1026,13 @@ backward_move_node_structure (window, behaviour)
info_up_label_of_node (window->node);
if (!info_parsed_nodename && (!info_parsed_filename
|| is_dir_name (info_parsed_filename)))
- info_error (_("No `Prev' or `Up' for this node within this document."));
+ info_error ((char *)
+ _("No `Prev' or `Up' for this node within this document."),
+ NULL, NULL);
else
{
- window_message_in_echo_area (_("Moving Up in this window."));
+ window_message_in_echo_area ((char *) _("Moving Up in this window."),
+ NULL, NULL);
info_handle_pointer ("Up", window);
}
}
@@ -1089,7 +1070,8 @@ backward_move_node_structure (window, behaviour)
/* Move to the previous node. If this node now contains a menu,
and we have not inhibited movement to it, move to the node
corresponding to the last menu item. */
- window_message_in_echo_area (_("Moving Prev in this window."));
+ window_message_in_echo_area ((char *) _("Moving Prev in this window."),
+ NULL, NULL);
info_handle_pointer ("Prev", window);
if (!inhibit_menu_traversing)
@@ -1099,7 +1081,7 @@ backward_move_node_structure (window, behaviour)
{
info_free_references (menu);
window_message_in_echo_area
- (_("Moving to `Prev's last menu item."));
+ ((char *) _("Moving to `Prev's last menu item."), NULL, NULL);
info_menu_digit (window, 1, '0');
}
}
@@ -1140,15 +1122,13 @@ DECLARE_INFO_COMMAND (info_global_prev_node,
}
}
-static void _scroll_forward();
-static void _scroll_backward();
+static void _scroll_forward(WINDOW *window, int count,
+ unsigned char key, int behaviour);
+static void _scroll_backward(WINDOW *window, int count,
+ unsigned char key, int behaviour);
static void
-_scroll_forward(window, count, key, behaviour)
- WINDOW *window;
- int count;
- unsigned char key;
- int behaviour;
+_scroll_forward(WINDOW *window, int count, unsigned char key, int behaviour)
{
if (count < 0)
_scroll_backward (window, -count, key, behaviour);
@@ -1188,11 +1168,7 @@ _scroll_forward(window, count, key, behaviour)
}
static void
-_scroll_backward(window, count, key, behaviour)
- WINDOW *window;
- int count;
- unsigned char key;
- int behaviour;
+_scroll_backward(WINDOW *window, int count, unsigned char key, int behaviour)
{
if (count < 0)
_scroll_forward (window, -count, key, behaviour);
@@ -1406,7 +1382,7 @@ DECLARE_INFO_COMMAND (info_next_window, _("Select the next window"))
/* If no other window, error now. */
if (!windows->next && !echo_area_is_active)
{
- info_error (msg_one_window);
+ info_error ((char *) msg_one_window, NULL, NULL);
return;
}
@@ -1446,7 +1422,7 @@ DECLARE_INFO_COMMAND (info_prev_window, _("Select the previous window"))
if (!windows->next && !echo_area_is_active)
{
- info_error (msg_one_window);
+ info_error ((char *) msg_one_window, NULL, NULL);
return;
}
@@ -1457,7 +1433,7 @@ DECLARE_INFO_COMMAND (info_prev_window, _("Select the previous window"))
if (window == the_echo_area ||
(window == windows && !echo_area_is_active))
{
- register WINDOW *win, *last;
+ register WINDOW *win, *last = NULL;
for (win = windows; win; win = win->next)
last = win;
@@ -1502,7 +1478,7 @@ DECLARE_INFO_COMMAND (info_split_window, _("Split the current window"))
if (!split)
{
- info_error (msg_win_too_small);
+ info_error ((char *) msg_win_too_small, NULL, NULL);
}
else
{
@@ -1570,11 +1546,11 @@ DECLARE_INFO_COMMAND (info_delete_window, _("Delete the current window"))
{
if (!windows->next)
{
- info_error (msg_cant_kill_last);
+ info_error ((char *) msg_cant_kill_last, NULL, NULL);
}
else if (window->flags & W_WindowIsPerm)
{
- info_error (_("Cannot delete a permanent window"));
+ info_error ((char *) _("Cannot delete a permanent window"), NULL, NULL);
}
else
{
@@ -1591,8 +1567,7 @@ DECLARE_INFO_COMMAND (info_delete_window, _("Delete the current window"))
/* Do the physical deletion of WINDOW, and forget this window and
associated nodes. */
void
-info_delete_window_internal (window)
- WINDOW *window;
+info_delete_window_internal (WINDOW *window)
{
if (windows->next && ((window->flags & W_WindowIsPerm) == 0))
{
@@ -1660,7 +1635,7 @@ DECLARE_INFO_COMMAND (info_scroll_other_window, _("Scroll the other window"))
/* If only one window, give up. */
if (!windows->next)
{
- info_error (msg_one_window);
+ info_error ((char *) msg_one_window, NULL, NULL);
return;
}
@@ -1712,8 +1687,7 @@ DECLARE_INFO_COMMAND (info_toggle_wrap,
/* Return (FILENAME)NODENAME for NODE, or just NODENAME if NODE's
filename is not set. */
char *
-node_printed_rep (node)
- NODE *node;
+node_printed_rep (NODE *node)
{
char *rep;
@@ -1734,9 +1708,7 @@ node_printed_rep (node)
/* Using WINDOW for various defaults, select the node referenced by ENTRY
in it. If the node is selected, the window and node are remembered. */
void
-info_select_reference (window, entry)
- WINDOW *window;
- REFERENCE *entry;
+info_select_reference (WINDOW *window, REFERENCE *entry)
{
NODE *node;
char *filename, *nodename, *file_system_error;
@@ -1781,9 +1753,9 @@ info_select_reference (window, entry)
if (!node)
{
if (file_system_error)
- info_error (file_system_error);
+ info_error (file_system_error, NULL, NULL);
else
- info_error (msg_cant_find_node, nodename);
+ info_error ((char *) msg_cant_find_node, nodename, NULL);
}
maybe_free (file_system_error);
@@ -1798,9 +1770,7 @@ info_select_reference (window, entry)
Select the parsed node in WINDOW and remember it, or error if the node
couldn't be found. */
static void
-info_parse_and_select (line, window)
- char *line;
- WINDOW *window;
+info_parse_and_select (char *line, WINDOW *window)
{
REFERENCE entry;
@@ -1818,9 +1788,7 @@ info_parse_and_select (line, window)
WINDOW. The node should have been pointed to by the LABEL pointer of
WINDOW->node. */
static void
-info_handle_pointer (label, window)
- char *label;
- WINDOW *window;
+info_handle_pointer (char *label, WINDOW *window)
{
if (info_parsed_filename || info_parsed_nodename)
{
@@ -1861,9 +1829,9 @@ info_handle_pointer (label, window)
else
{
if (info_recent_file_error)
- info_error (info_recent_file_error);
+ info_error (info_recent_file_error, NULL, NULL);
else
- info_error (msg_cant_file_node, filename, nodename);
+ info_error ((char *) msg_cant_file_node, filename, nodename);
}
free (filename);
@@ -1871,7 +1839,7 @@ info_handle_pointer (label, window)
}
else
{
- info_error (msg_no_pointer, label);
+ info_error ((char *) msg_no_pointer, label, NULL);
}
}
@@ -1927,7 +1895,7 @@ DECLARE_INFO_COMMAND (info_last_node, _("Select the last node in this file"))
}
if (!node)
- info_error (_("This window has no additional nodes"));
+ info_error ((char *) _("This window has no additional nodes"), NULL, NULL);
else
info_set_node_of_window (1, window, node);
}
@@ -1960,7 +1928,7 @@ DECLARE_INFO_COMMAND (info_first_node, _("Select the first node in this file"))
}
if (!node)
- info_error (_("This window has no additional nodes"));
+ info_error ((char *) _("This window has no additional nodes"), NULL, NULL);
else
info_set_node_of_window (1, window, node);
}
@@ -1976,13 +1944,13 @@ DECLARE_INFO_COMMAND (info_last_menu_item,
DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item"))
{
register int i, item;
- register REFERENCE *entry, **menu;
+ register REFERENCE **menu;
menu = info_menu_of_node (window->node);
if (!menu)
{
- info_error (msg_no_menu_node);
+ info_error ((char *) msg_no_menu_node, NULL, NULL);
return;
}
@@ -1994,15 +1962,20 @@ DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item"))
for (i = 0; menu[i + 1]; i++);
else
{
- for (i = 0; (entry = menu[i]); i++)
+ for (i = 0; menu[i]; i++)
if (i == item - 1)
break;
}
if (menu[i])
- info_select_reference (window, menu[i]);
+ {
+ info_select_reference (window, menu[i]);
+ if (menu[i]->line_number > 0)
+ info_next_line (window, menu[i]->line_number - 1, key);
+ }
else
- info_error (_("There aren't %d items in this menu."), item);
+ info_error ((char *) _("There aren't %d items in this menu."),
+ (void *) (long) item, NULL);
info_free_references (menu);
return;
@@ -2026,9 +1999,7 @@ DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item"))
limit of 200 chars (in Emacs 21.2). */
static REFERENCE **
-nearest_xref (xref_list, pos)
- REFERENCE **xref_list;
- long pos;
+nearest_xref (REFERENCE **xref_list, long int pos)
{
int this_xref;
int nearest = -1;
@@ -2081,12 +2052,8 @@ nearest_xref (xref_list, pos)
to build the list of references. ASK_P is non-zero if the user
should be prompted, or zero to select the default item. */
static void
-info_menu_or_ref_item (window, count, key, builder, ask_p)
- WINDOW *window;
- int count;
- unsigned char key;
- REFERENCE **(*builder) ();
- int ask_p;
+info_menu_or_ref_item (WINDOW *window, int count,
+ unsigned char key, REFERENCE **(*builder) (NODE *node), int ask_p)
{
char *line;
REFERENCE *entry;
@@ -2096,9 +2063,9 @@ info_menu_or_ref_item (window, count, key, builder, ask_p)
if (!menu)
{
if (builder == info_menu_of_node)
- info_error (msg_no_menu_node);
+ info_error ((char *) msg_no_menu_node, NULL, NULL);
else
- info_error (msg_no_xref_node);
+ info_error ((char *) msg_no_xref_node, NULL, NULL);
return;
}
@@ -2165,16 +2132,20 @@ info_menu_or_ref_item (window, count, key, builder, ask_p)
else if (window->point < refs[which]->start)
break;
}
- if (closest == -1)
- which--;
- else
- which = closest;
+ if (which > 0)
+ {
+ if (closest == -1)
+ which--;
+ else
+ which = closest;
+ }
}
defentry = (REFERENCE *)xmalloc (sizeof (REFERENCE));
defentry->label = xstrdup (refs[which]->label);
defentry->filename = refs[which]->filename;
defentry->nodename = refs[which]->nodename;
+ defentry->line_number = refs[which]->line_number;
if (defentry->filename)
defentry->filename = xstrdup (defentry->filename);
@@ -2192,24 +2163,27 @@ info_menu_or_ref_item (window, count, key, builder, ask_p)
char *prompt;
/* Build the prompt string. */
- if (defentry)
- prompt = (char *)xmalloc (99 + strlen (defentry->label));
- else
- prompt = (char *)xmalloc (99);
-
if (builder == info_menu_of_node)
{
if (defentry)
- sprintf (prompt, _("Menu item (%s): "), defentry->label);
+ {
+ prompt = xmalloc (strlen (defentry->label)
+ + strlen (_("Menu item (%s): ")));
+ sprintf (prompt, _("Menu item (%s): "), defentry->label);
+ }
else
- sprintf (prompt, _("Menu item: "));
+ prompt = xstrdup (_("Menu item: "));
}
else
{
if (defentry)
- sprintf (prompt, _("Follow xref (%s): "), defentry->label);
+ {
+ prompt = xmalloc (strlen (defentry->label)
+ + strlen (_("Follow xref (%s): ")));
+ sprintf (prompt, _("Follow xref (%s): "), defentry->label);
+ }
else
- sprintf (prompt, _("Follow xref: "));
+ prompt = xstrdup (_("Follow xref: "));
}
line = info_read_completing_in_echo_area (window, prompt, menu);
@@ -2287,11 +2261,12 @@ info_menu_or_ref_item (window, count, key, builder, ask_p)
}
if (!entry && defentry)
- info_error (_("The reference disappeared! (%s)."), line);
+ info_error ((char *) _("The reference disappeared! (%s)."), line, NULL);
else
{
NODE *orig = window->node;
info_select_reference (window, entry);
+
if (builder == info_xrefs_of_node && window->node != orig
&& !(window->node->flags & N_FromAnchor))
{ /* Search for this reference in the node. */
@@ -2312,6 +2287,11 @@ info_menu_or_ref_item (window, count, key, builder, ask_p)
window_adjust_pagetop (window);
}
}
+
+ if (entry->line_number > 0)
+ /* next_line starts at line 1? Anyway, the -1 makes it
+ move to the right line. */
+ info_next_line (window, entry->line_number - 1, key);
}
free (line);
@@ -2359,7 +2339,7 @@ DECLARE_INFO_COMMAND (info_find_menu, _("Move to the start of this node's menu")
position = search (INFO_MENU_LABEL, &binding);
if (position == -1)
- info_error (msg_no_menu_node);
+ info_error ((char *) msg_no_menu_node, NULL, NULL);
else
{
window->point = position;
@@ -2378,7 +2358,7 @@ DECLARE_INFO_COMMAND (info_visit_menu,
menu = info_menu_of_node (window->node);
if (!menu)
- info_error (msg_no_menu_node);
+ info_error ((char *) msg_no_menu_node, NULL, NULL);
for (i = 0; (!info_error_was_printed) && (entry = menu[i]); i++)
{
@@ -2388,7 +2368,7 @@ DECLARE_INFO_COMMAND (info_visit_menu,
window_tile_windows (TILE_INTERNALS);
if (!new)
- info_error (msg_win_too_small);
+ info_error ((char *) msg_win_too_small, NULL, NULL);
else
{
active_window = new;
@@ -2453,11 +2433,12 @@ DECLARE_INFO_COMMAND (info_goto_node, _("Read a node name and select it"))
}
}
}
- line = info_read_maybe_completing (window, _("Goto node: "), items);
+ line = info_read_maybe_completing (window, (char *) _("Goto node: "),
+ items);
info_free_references (items);
}
#else /* !GOTO_COMPLETES */
- line = info_read_in_echo_area (window, _("Goto node: "));
+ line = info_read_in_echo_area (window, (char *) _("Goto node: "));
#endif /* !GOTO_COMPLETES */
/* If the user aborted, quit now. */
@@ -2485,11 +2466,8 @@ DECLARE_INFO_COMMAND (info_goto_node, _("Read a node name and select it"))
will be NULL. */
NODE *
-info_follow_menus (initial_node, menus, errstr, errarg1, errarg2)
- NODE *initial_node;
- char **menus;
- const char **errstr;
- char **errarg1, **errarg2;
+info_follow_menus (NODE *initial_node, char **menus,
+ const char **errstr, char **errarg1, char **errarg2)
{
NODE *node = NULL;
*errstr = *errarg1 = *errarg2 = NULL;
@@ -2544,7 +2522,8 @@ info_follow_menus (initial_node, menus, errstr, errarg1, errarg2)
if (strcasecmp (entry->label, arg) == 0)
break;
else
- if (strncasecmp (entry->label, arg, strlen (arg)) == 0)
+ if ((best_guess == -1)
+ && (strncasecmp (entry->label, arg, strlen (arg)) == 0))
best_guess = i;
}
@@ -2622,8 +2601,7 @@ info_follow_menus (initial_node, menus, errstr, errarg1, errarg2)
Return array terminated with NULL. */
static char **
-split_list_of_nodenames (str)
- char *str;
+split_list_of_nodenames (char *str)
{
unsigned len = 2;
char **nodes = xmalloc (len * sizeof (char *));
@@ -2652,7 +2630,7 @@ split_list_of_nodenames (str)
DECLARE_INFO_COMMAND (info_menu_sequence,
_("Read a list of menus starting from dir and follow them"))
{
- char *line = info_read_in_echo_area (window, _("Follow menus: "));
+ char *line = info_read_in_echo_area (window, (char *) _("Follow menus: "));
/* If the user aborted, quit now. */
if (!line)
@@ -2665,10 +2643,11 @@ DECLARE_INFO_COMMAND (info_menu_sequence,
if (*line)
{
- char *errstr, *errarg1, *errarg2;
+ const char *errstr;
+ char *errarg1, *errarg2;
NODE *dir_node = info_get_node (NULL, NULL);
char **nodes = split_list_of_nodenames (line);
- NODE *node;
+ NODE *node = NULL;
/* If DIR_NODE is NULL, they might be reading a file directly,
like in "info -d . -f ./foo". Try using "Top" instead. */
@@ -2684,16 +2663,15 @@ DECLARE_INFO_COMMAND (info_menu_sequence,
/* If we still cannot find the starting point, give up.
We cannot allow a NULL pointer inside info_follow_menus. */
if (!dir_node)
- info_error (msg_cant_find_node, "Top");
+ info_error ((char *) msg_cant_find_node, "Top", NULL);
else
- node
- = info_follow_menus (dir_node, nodes, &errstr, &errarg1, &errarg2);
+ node = info_follow_menus (dir_node, nodes, &errstr, &errarg1, &errarg2);
free (nodes);
if (!errstr)
info_set_node_of_window (1, window, node);
else
- info_error (errstr, errarg1, errarg2);
+ info_error ((char *) errstr, errarg1, errarg2);
}
free (line);
@@ -2706,10 +2684,7 @@ DECLARE_INFO_COMMAND (info_menu_sequence,
or NULL if there's nothing in this menu seems to fit the bill.
If EXACT is non-zero, allow only exact matches. */
static REFERENCE *
-entry_in_menu (arg, menu, exact)
- char *arg;
- REFERENCE **menu;
- int exact;
+entry_in_menu (char *arg, REFERENCE **menu, int exact)
{
REFERENCE *entry;
@@ -2743,10 +2718,7 @@ entry_in_menu (arg, menu, exact)
invocation info and its command-line options, by looking for menu
items and chains of menu items with characteristic names. */
void
-info_intuit_options_node (window, initial_node, program)
- WINDOW *window;
- NODE *initial_node;
- char *program;
+info_intuit_options_node (WINDOW *window, NODE *initial_node, char *program)
{
/* The list of node names typical for GNU manuals where the program
usage and specifically the command-line arguments are described.
@@ -2781,7 +2753,7 @@ info_intuit_options_node (window, initial_node, program)
in the menu hierarchy... */
for (node = initial_node; node; initial_node = node)
{
- REFERENCE *entry;
+ REFERENCE *entry = NULL;
/* Build and return a list of the menu items in this node. */
menu = info_menu_of_node (initial_node);
@@ -2794,13 +2766,15 @@ info_intuit_options_node (window, initial_node, program)
/* Look for node names typical for usage nodes in this menu. */
for (try_node = invocation_nodes; *try_node; try_node++)
{
- char nodename[200];
+ char *nodename;
+ nodename = xmalloc (strlen (program) + strlen (*try_node));
sprintf (nodename, *try_node, program);
/* The last resort "%s" is dangerous, so we restrict it
to exact matches here. */
entry = entry_in_menu (nodename, menu,
strcmp (*try_node, "%s") == 0);
+ free (nodename);
if (entry)
break;
}
@@ -2828,8 +2802,7 @@ info_intuit_options_node (window, initial_node, program)
/* Given a name of an Info file, find the name of the package it
describes by removing the leading directories and extensions. */
char *
-program_name_from_file_name (file_name)
- char *file_name;
+program_name_from_file_name (char *file_name)
{
int i;
char *program_name = xstrdup (filename_non_directory (file_name));
@@ -2870,7 +2843,7 @@ DECLARE_INFO_COMMAND (info_goto_invocation_node,
free (prompt);
if (!line)
{
- info_abort_key ();
+ info_abort_key (window, 0, 0);
return;
}
if (*line)
@@ -2882,7 +2855,7 @@ DECLARE_INFO_COMMAND (info_goto_invocation_node,
from the Top node. */
top_node = info_get_node (file_name, NULL);
if (!top_node)
- info_error (msg_cant_find_node, "Top");
+ info_error ((char *) msg_cant_find_node, "Top", NULL);
info_intuit_options_node (window, top_node, program_name);
free (line);
@@ -2894,7 +2867,7 @@ DECLARE_INFO_COMMAND (info_man, _("Read a manpage reference and select it"))
{
char *line;
- line = info_read_in_echo_area (window, _("Get Manpage: "));
+ line = info_read_in_echo_area (window, (char *) _("Get Manpage: "));
if (!line)
{
@@ -2939,8 +2912,7 @@ DECLARE_INFO_COMMAND (info_dir_node, _("Select the node `(dir)'"))
/* Read the name of a node to kill. The list of available nodes comes
from the nodes appearing in the current window configuration. */
static char *
-read_nodename_to_kill (window)
- WINDOW *window;
+read_nodename_to_kill (WINDOW *window)
{
int iw;
char *nodename;
@@ -2948,7 +2920,7 @@ read_nodename_to_kill (window)
REFERENCE **menu = NULL;
int menu_index = 0, menu_slots = 0;
char *default_nodename = xstrdup (active_window->node->nodename);
- char *prompt = xmalloc (40 + strlen (default_nodename));
+ char *prompt = xmalloc (strlen (_("Kill node (%s): ")) + strlen (default_nodename));
sprintf (prompt, _("Kill node (%s): "), default_nodename);
@@ -2980,9 +2952,7 @@ read_nodename_to_kill (window)
/* Delete NODENAME from this window, showing the most
recently selected node in this window. */
static void
-kill_node (window, nodename)
- WINDOW *window;
- char *nodename;
+kill_node (WINDOW *window, char *nodename)
{
int iw, i;
INFO_WINDOW *info_win;
@@ -3004,7 +2974,7 @@ kill_node (window, nodename)
if (!info_win)
{
if (*nodename)
- info_error (_("Cannot kill node `%s'"), nodename);
+ info_error ((char *) _("Cannot kill node `%s'"), nodename, NULL);
else
window_clear_echo_area ();
@@ -3014,7 +2984,7 @@ kill_node (window, nodename)
/* If there are no more nodes left anywhere to view, complain and exit. */
if (info_windows_index == 1 && info_windows[0]->nodes_index == 1)
{
- info_error (_("Cannot kill the last node"));
+ info_error ((char *) _("Cannot kill the last node"), NULL, NULL);
return;
}
@@ -3118,7 +3088,7 @@ DECLARE_INFO_COMMAND (info_view_file, _("Read the name of a file and select it")
{
char *line;
- line = info_read_in_echo_area (window, _("Find file: "));
+ line = info_read_in_echo_area (window, (char *) _("Find file: "));
if (!line)
{
info_abort_key (active_window, 1, 0);
@@ -3133,9 +3103,9 @@ DECLARE_INFO_COMMAND (info_view_file, _("Read the name of a file and select it")
if (!node)
{
if (info_recent_file_error)
- info_error (info_recent_file_error);
+ info_error (info_recent_file_error, NULL, NULL);
else
- info_error (_("Cannot find `%s'."), line);
+ info_error ((char *) _("Cannot find `%s'."), line, NULL);
}
else
info_set_node_of_window (1, window, node);
@@ -3154,19 +3124,17 @@ DECLARE_INFO_COMMAND (info_view_file, _("Read the name of a file and select it")
/* **************************************************************** */
#define VERBOSE_NODE_DUMPING
-static void write_node_to_stream ();
-static void dump_node_to_stream ();
-static void initialize_dumping ();
+static void write_node_to_stream (NODE *node, FILE *stream);
+static void dump_node_to_stream (char *filename, char *nodename,
+ FILE *stream, int dump_subnodes);
+static void initialize_dumping (void);
/* Dump the nodes specified by FILENAME and NODENAMES to the file named
in OUTPUT_FILENAME. If DUMP_SUBNODES is non-zero, recursively dump
the nodes which appear in the menu of each node dumped. */
void
-dump_nodes_to_file (filename, nodenames, output_filename, dump_subnodes)
- char *filename;
- char **nodenames;
- char *output_filename;
- int dump_subnodes;
+dump_nodes_to_file (char *filename, char **nodenames,
+ char *output_filename, int dump_subnodes)
{
register int i;
FILE *output_stream;
@@ -3180,7 +3148,8 @@ dump_nodes_to_file (filename, nodenames, output_filename, dump_subnodes)
if (!output_stream)
{
- info_error (_("Could not create output file `%s'."), output_filename);
+ info_error ((char *) _("Could not create output file `%s'."),
+ output_filename, NULL);
return;
}
@@ -3193,7 +3162,7 @@ dump_nodes_to_file (filename, nodenames, output_filename, dump_subnodes)
fclose (output_stream);
#if defined (VERBOSE_NODE_DUMPING)
- info_error (_("Done."));
+ info_error ((char *) _("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
@@ -3203,7 +3172,7 @@ static int dumped_already_index = 0;
static int dumped_already_slots = 0;
static void
-initialize_dumping ()
+initialize_dumping (void)
{
dumped_already_index = 0;
}
@@ -3212,10 +3181,8 @@ initialize_dumping ()
If DUMP_SUBNODES is non-zero, recursively dump the nodes which appear
in the menu of each node dumped. */
static void
-dump_node_to_stream (filename, nodename, stream, dump_subnodes)
- char *filename, *nodename;
- FILE *stream;
- int dump_subnodes;
+dump_node_to_stream (char *filename, char *nodename,
+ FILE *stream, int dump_subnodes)
{
register int i;
NODE *node;
@@ -3225,14 +3192,15 @@ dump_node_to_stream (filename, nodename, stream, dump_subnodes)
if (!node)
{
if (info_recent_file_error)
- info_error (info_recent_file_error);
+ info_error (info_recent_file_error, NULL, NULL);
else
{
if (filename && *nodename != '(')
- info_error (msg_cant_file_node, filename_non_directory (filename),
- nodename);
+ info_error ((char *) msg_cant_file_node,
+ filename_non_directory (filename),
+ nodename);
else
- info_error (msg_cant_find_node, nodename);
+ info_error ((char *) msg_cant_find_node, nodename, NULL);
}
return;
}
@@ -3249,7 +3217,7 @@ dump_node_to_stream (filename, nodename, stream, dump_subnodes)
#if defined (VERBOSE_NODE_DUMPING)
/* Maybe we should print some information about the node being output. */
- info_error (_("Writing node %s..."), node_printed_rep (node));
+ info_error ((char *) _("Writing node %s..."), node_printed_rep (node), NULL);
#endif /* VERBOSE_NODE_DUMPING */
write_node_to_stream (node, stream);
@@ -3284,10 +3252,7 @@ dump_node_to_stream (filename, nodename, stream, dump_subnodes)
/* Dump NODE to FILENAME. If DUMP_SUBNODES is non-zero, recursively dump
the nodes which appear in the menu of each node dumped. */
void
-dump_node_to_file (node, filename, dump_subnodes)
- NODE *node;
- char *filename;
- int dump_subnodes;
+dump_node_to_file (NODE *node, char *filename, int dump_subnodes)
{
FILE *output_stream;
char *nodes_filename;
@@ -3301,7 +3266,8 @@ dump_node_to_file (node, filename, dump_subnodes)
if (!output_stream)
{
- info_error (_("Could not create output file `%s'."), filename);
+ info_error ((char *) _("Could not create output file `%s'."), filename,
+ NULL);
return;
}
@@ -3318,7 +3284,7 @@ dump_node_to_file (node, filename, dump_subnodes)
fclose (output_stream);
#if defined (VERBOSE_NODE_DUMPING)
- info_error (_("Done."));
+ info_error ((char *) _("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
@@ -3334,8 +3300,7 @@ DECLARE_INFO_COMMAND (info_print_node,
/* Print NODE on a printer piping it into INFO_PRINT_COMMAND. */
void
-print_node (node)
- NODE *node;
+print_node (NODE *node)
{
FILE *printer_pipe;
char *print_command = getenv ("INFO_PRINT_COMMAND");
@@ -3363,13 +3328,13 @@ print_node (node)
if (!printer_pipe)
{
- info_error (_("Cannot open pipe to `%s'."), print_command);
+ info_error ((char *) _("Cannot open pipe to `%s'."), print_command, NULL);
return;
}
#if defined (VERBOSE_NODE_DUMPING)
/* Maybe we should print some information about the node being output. */
- info_error (_("Printing node %s..."), node_printed_rep (node));
+ info_error ((char *) _("Printing node %s..."), node_printed_rep (node), NULL);
#endif /* VERBOSE_NODE_DUMPING */
write_node_to_stream (node, printer_pipe);
@@ -3379,14 +3344,12 @@ print_node (node)
fclose (printer_pipe);
#if defined (VERBOSE_NODE_DUMPING)
- info_error (_("Done."));
+ info_error ((char *) _("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
static void
-write_node_to_stream (node, stream)
- NODE *node;
- FILE *stream;
+write_node_to_stream (NODE *node, FILE *stream)
{
fwrite (node->contents, 1, node->nodelen, stream);
}
@@ -3403,11 +3366,11 @@ write_node_to_stream (node, stream)
to gc even those file buffer contents which had to be uncompressed. */
int gc_compressed_files = 0;
-static void info_gc_file_buffers ();
-static void info_search_1 ();
+static void info_gc_file_buffers (void);
+static void info_search_1 (WINDOW *window, int count,
+ unsigned char key, int case_sensitive, int ask_for_string);
static char *search_string = (char *)NULL;
-static int search_string_index = 0;
static int search_string_size = 0;
static int isearch_is_active = 0;
@@ -3416,8 +3379,7 @@ static int last_search_case_sensitive = 0;
/* Return the file buffer which belongs to WINDOW's node. */
FILE_BUFFER *
-file_buffer_of_window (window)
- WINDOW *window;
+file_buffer_of_window (WINDOW *window)
{
/* If this window has no node, then it has no file buffer. */
if (!window->node)
@@ -3439,12 +3401,8 @@ file_buffer_of_window (window)
DIR says which direction to search in. If it is positive, search
forward, else backwards. */
long
-info_search_in_node (string, node, start, window, dir, case_sensitive)
- char *string;
- NODE *node;
- long start;
- WINDOW *window;
- int dir, case_sensitive;
+info_search_in_node (char *string, NODE *node, long int start,
+ WINDOW *window, int dir, int case_sensitive)
{
SEARCH_BINDING binding;
long offset;
@@ -3486,13 +3444,10 @@ info_search_in_node (string, node, start, window, dir, case_sensitive)
search at START. Return the absolute position of the match, or -1, if
no part of the string could be found. */
long
-info_target_search_node (node, string, start)
- NODE *node;
- char *string;
- long start;
+info_target_search_node (NODE *node, char *string, long int start)
{
register int i;
- long offset;
+ long offset = 0;
char *target;
target = xstrdup (string);
@@ -3521,10 +3476,8 @@ info_target_search_node (node, string, start)
If the search fails, return non-zero, else zero. Side-effect window
leaving the node and point where the string was found current. */
static int
-info_search_internal (string, window, dir, case_sensitive)
- char *string;
- WINDOW *window;
- int dir, case_sensitive;
+info_search_internal (char *string, WINDOW *window,
+ int dir, int case_sensitive)
{
register int i;
FILE_BUFFER *file_buffer;
@@ -3561,7 +3514,7 @@ info_search_internal (string, window, dir, case_sensitive)
file's node list. */
if (file_buffer->tags)
{
- register int current_tag, number_of_tags;
+ register int current_tag = 0, number_of_tags;
char *last_subfile;
TAG *tag;
@@ -3611,8 +3564,8 @@ info_search_internal (string, window, dir, case_sensitive)
if (!echo_area_is_active && (last_subfile != tag->filename))
{
window_message_in_echo_area
- (_("Searching subfile %s ..."),
- filename_non_directory (tag->filename));
+ ((char *) _("Searching subfile %s ..."),
+ filename_non_directory (tag->filename), NULL);
last_subfile = tag->filename;
}
@@ -3625,9 +3578,9 @@ info_search_internal (string, window, dir, case_sensitive)
if (!echo_area_is_active)
{
if (info_recent_file_error)
- info_error (info_recent_file_error);
+ info_error (info_recent_file_error, NULL, NULL);
else
- info_error (msg_cant_file_node,
+ info_error ((char *) msg_cant_file_node,
filename_non_directory (file_buffer->filename),
tag->nodename);
}
@@ -3686,12 +3639,8 @@ DECLARE_INFO_COMMAND (info_search_backward,
}
static void
-info_search_1 (window, count, key, case_sensitive, ask_for_string)
- WINDOW *window;
- int count;
- unsigned char key;
- int case_sensitive;
- int ask_for_string;
+info_search_1 (WINDOW *window, int count, unsigned char key,
+ int case_sensitive, int ask_for_string)
{
char *line, *prompt;
int result, old_pagetop;
@@ -3718,7 +3667,12 @@ info_search_1 (window, count, key, case_sensitive, ask_for_string)
if (ask_for_string)
{
- prompt = (char *)xmalloc (50 + strlen (search_string));
+ prompt = (char *)xmalloc (strlen (_("%s%sfor string [%s]: "))
+ + strlen (_("Search backward"))
+ + strlen (_("Search"))
+ + strlen (_(" case-sensitively "))
+ + strlen (_(" "))
+ + strlen (search_string));
sprintf (prompt, _("%s%sfor string [%s]: "),
direction < 0 ? _("Search backward") : _("Search"),
@@ -3730,18 +3684,17 @@ info_search_1 (window, count, key, case_sensitive, ask_for_string)
if (!line)
{
- info_abort_key ();
+ info_abort_key (window, 0, 0);
return;
}
if (*line)
{
- if (strlen (line) + 1 > search_string_size)
+ if (strlen (line) + 1 > (unsigned int) search_string_size)
search_string = (char *) xrealloc
(search_string, (search_string_size += 50 + strlen (line)));
strcpy (search_string, line);
- search_string_index = strlen (line);
free (line);
}
}
@@ -3762,7 +3715,7 @@ info_search_1 (window, count, key, case_sensitive, ask_for_string)
active_window, direction, case_sensitive);
if (result != 0 && !info_error_was_printed)
- info_error (_("Search failed."));
+ info_error ((char *) _("Search failed."), NULL, NULL);
else if (old_pagetop != active_window->pagetop)
{
int new_pagetop;
@@ -3783,7 +3736,7 @@ DECLARE_INFO_COMMAND (info_search_next,
_("Repeat last search in the same direction"))
{
if (!last_search_direction)
- info_error (_("No previous search string"));
+ info_error ((char *) _("No previous search string"), NULL, NULL);
else
info_search_1 (window, last_search_direction * count,
key, last_search_case_sensitive, 0);
@@ -3793,7 +3746,7 @@ DECLARE_INFO_COMMAND (info_search_previous,
_("Repeat last search in the reverse direction"))
{
if (!last_search_direction)
- info_error (_("No previous search string"));
+ info_error ((char *) _("No previous search string"), NULL, NULL);
else
info_search_1 (window, -last_search_direction * count,
key, last_search_case_sensitive, 0);
@@ -3805,7 +3758,8 @@ DECLARE_INFO_COMMAND (info_search_previous,
/* */
/* **************************************************************** */
-static void incremental_search ();
+static void incremental_search (WINDOW *window, int count,
+ unsigned char ignore);
DECLARE_INFO_COMMAND (isearch_forward,
_("Search interactively for a string as you type it"))
@@ -3829,14 +3783,6 @@ static int isearch_string_index = 0;
static int isearch_string_size = 0;
static unsigned char isearch_terminate_search_key = ESC;
-/* Structure defining the current state of an incremental search. */
-typedef struct {
- WINDOW_STATE_DECL; /* The node, pagetop and point. */
- int search_index; /* Offset of the last char in the search string. */
- int direction; /* The direction that this search is heading in. */
- int failing; /* Whether or not this search failed. */
-} SEARCH_STATE;
-
/* Array of search states. */
static SEARCH_STATE **isearch_states = (SEARCH_STATE **)NULL;
static int isearch_states_index = 0;
@@ -3844,9 +3790,7 @@ static int isearch_states_slots = 0;
/* Push the state of this search. */
static void
-push_isearch (window, search_index, direction, failing)
- WINDOW *window;
- int search_index, direction, failing;
+push_isearch (WINDOW *window, int search_index, int direction, int failing)
{
SEARCH_STATE *state;
@@ -3862,9 +3806,7 @@ push_isearch (window, search_index, direction, failing)
/* Pop the state of this search to WINDOW, SEARCH_INDEX, and DIRECTION. */
static void
-pop_isearch (window, search_index, direction, failing)
- WINDOW *window;
- int *search_index, *direction, *failing;
+pop_isearch (WINDOW *window, int *search_index, int *direction, int *failing)
{
SEARCH_STATE *state;
@@ -3884,7 +3826,7 @@ pop_isearch (window, search_index, direction, failing)
/* Free the memory used by isearch_states. */
static void
-free_isearch_states ()
+free_isearch_states (void)
{
register int i;
@@ -3898,15 +3840,12 @@ free_isearch_states ()
/* Display the current search in the echo area. */
static void
-show_isearch_prompt (dir, string, failing_p)
- int dir;
- unsigned char *string;
- int failing_p;
+show_isearch_prompt (int dir, unsigned char *string, int failing_p)
{
register int i;
const char *prefix;
char *prompt, *p_rep;
- int prompt_len, p_rep_index, p_rep_size;
+ unsigned int prompt_len, p_rep_index, p_rep_size;
if (dir < 0)
prefix = _("I-search backward: ");
@@ -3941,17 +3880,14 @@ show_isearch_prompt (dir, string, failing_p)
sprintf (prompt, "%s%s%s", failing_p ? _("Failing ") : "", prefix,
p_rep ? p_rep : "");
- window_message_in_echo_area ("%s", prompt);
+ window_message_in_echo_area ("%s", prompt, NULL);
maybe_free (p_rep);
free (prompt);
display_cursor_at_point (active_window);
}
static void
-incremental_search (window, count, ignore)
- WINDOW *window;
- int count;
- unsigned char ignore;
+incremental_search (WINDOW *window, int count, unsigned char ignore)
{
unsigned char key;
int last_search_result, search_result, dir;
@@ -3974,7 +3910,7 @@ incremental_search (window, count, ignore)
/* Show the search string in the echo area. */
isearch_string[isearch_string_index] = '\0';
- show_isearch_prompt (dir, isearch_string, search_result);
+ show_isearch_prompt (dir, (unsigned char *) isearch_string, search_result);
isearch_is_active = 1;
@@ -4008,7 +3944,8 @@ incremental_search (window, count, ignore)
pop_isearch
(window, &isearch_string_index, &dir, &search_result);
isearch_string[isearch_string_index] = '\0';
- show_isearch_prompt (dir, isearch_string, search_result);
+ show_isearch_prompt (dir, (unsigned char *) isearch_string,
+ search_result);
goto after_search;
}
}
@@ -4046,15 +3983,16 @@ incremental_search (window, count, ignore)
isearch_string[isearch_string_index] = '\0';
goto search_now;
}
- else if (func == isearch_forward || func == isearch_backward)
+ else if (func == (VFunction *) isearch_forward
+ || func == (VFunction *) isearch_backward)
{
/* If this key invokes an incremental search, then this
means that we will either search again in the same
direction, search again in the reverse direction, or
insert the last search string that was accepted through
incremental searching. */
- if ((func == isearch_forward && dir > 0) ||
- (func == isearch_backward && dir < 0))
+ if ((func == (VFunction *) isearch_forward && dir > 0) ||
+ (func == (VFunction *) isearch_backward && dir < 0))
{
/* If the user has typed no characters, then insert the
last successful search into the current search string. */
@@ -4063,8 +4001,8 @@ incremental_search (window, count, ignore)
/* Of course, there must be something to insert. */
if (last_isearch_accepted)
{
- if (strlen (last_isearch_accepted) + 1 >=
- isearch_string_size)
+ if (strlen ((char *) last_isearch_accepted) + 1
+ >= (unsigned int) isearch_string_size)
isearch_string = (char *)
xrealloc (isearch_string,
isearch_string_size += 10 +
@@ -4090,7 +4028,7 @@ incremental_search (window, count, ignore)
dir = -dir;
}
}
- else if (func == info_abort_key)
+ else if (func == (VFunction *) info_abort_key)
{
/* If C-g pressed, and the search is failing, pop the search
stack back to the last unfailed search. */
@@ -4101,7 +4039,8 @@ incremental_search (window, count, ignore)
pop_isearch
(window, &isearch_string_index, &dir, &search_result);
isearch_string[isearch_string_index] = '\0';
- show_isearch_prompt (dir, isearch_string, search_result);
+ show_isearch_prompt (dir, (unsigned char *) isearch_string,
+ search_result);
continue;
}
else
@@ -4117,7 +4056,7 @@ incremental_search (window, count, ignore)
non-null. Exit the search, remembering the search string. If
the key is not the same as the isearch_terminate_search_key,
then push it into pending input. */
- if (isearch_string_index && func != info_abort_key)
+ if (isearch_string_index && func != (VFunction *) info_abort_key)
{
maybe_free (last_isearch_accepted);
last_isearch_accepted = xstrdup (isearch_string);
@@ -4136,7 +4075,7 @@ incremental_search (window, count, ignore)
|| info_any_buffered_input_p ()))
info_set_pending_input (key);
- if (func == info_abort_key)
+ if (func == (VFunction *) info_abort_key)
{
if (isearch_states_index)
window_set_state (window, &orig_state);
@@ -4154,7 +4093,7 @@ incremental_search (window, count, ignore)
/* Search for the contents of isearch_string. */
search_now:
- show_isearch_prompt (dir, isearch_string, search_result);
+ show_isearch_prompt (dir, (unsigned char *) isearch_string, search_result);
/* If the search string includes upper-case letters, make the
search case-sensitive. */
@@ -4196,7 +4135,7 @@ incremental_search (window, count, ignore)
terminal_ring_bell ();
after_search:
- show_isearch_prompt (dir, isearch_string, search_result);
+ show_isearch_prompt (dir, (unsigned char *) isearch_string, search_result);
if (search_result == 0)
{
@@ -4230,7 +4169,7 @@ incremental_search (window, count, ignore)
Garbage collecting a file buffer means to free the file buffers
contents. */
static void
-info_gc_file_buffers ()
+info_gc_file_buffers (void)
{
register int fb_index, iw_index, i;
register FILE_BUFFER *fb;
@@ -4289,11 +4228,7 @@ info_gc_file_buffers ()
/* Move to the next or previous cross reference in this node. */
static void
-info_move_to_xref (window, count, key, dir)
- WINDOW *window;
- int count;
- unsigned char key;
- int dir;
+info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
{
long firstmenu, firstxref;
long nextmenu, nextxref;
@@ -4335,7 +4270,7 @@ info_move_to_xref (window, count, key, dir)
if (firstmenu == -1 && firstxref == -1)
{
- info_error (msg_no_xref_node);
+ info_error ((char *) msg_no_xref_node, NULL, NULL);
return;
}
@@ -4424,10 +4359,11 @@ DECLARE_INFO_COMMAND (info_select_reference_this_line,
_("Select reference or menu item appearing on this line"))
{
char *line;
- NODE *orig;
- line = window->line_starts[window_line_of_point (window)];
- orig = window->node;
+ if (window->line_starts)
+ line = window->line_starts[window_line_of_point (window)];
+ else
+ line = "";
/* If this line contains a menu item, select that one. */
if (strncmp ("* ", line, 2) == 0)
@@ -4450,7 +4386,7 @@ DECLARE_INFO_COMMAND (info_abort_key, _("Cancel current operation"))
do it. */
if (!info_error_rings_bell_p)
terminal_ring_bell ();
- info_error (_("Quit"));
+ info_error ((char *) _("Quit"), NULL, NULL);
info_initialize_numeric_arg ();
info_clear_pending_input ();
@@ -4545,19 +4481,18 @@ DECLARE_INFO_COMMAND (info_do_lowercase_version,
{}
static void
-dispatch_error (keyseq)
- char *keyseq;
+dispatch_error (char *keyseq)
{
char *rep;
rep = pretty_keyseq (keyseq);
if (!echo_area_is_active)
- info_error (_("Unknown command (%s)."), rep);
+ info_error ((char *) _("Unknown command (%s)."), rep, NULL);
else
{
- char *temp = xmalloc (1 + strlen (rep) + strlen (_("\"\" is invalid")));
- sprintf (temp, _("\"%s\" is invalid"), rep);
+ char *temp = xmalloc (1 + strlen (rep) + strlen (_("\"%s\" is invalid")));
+ sprintf (temp, _("`%s' is invalid"), rep);
terminal_ring_bell ();
inform_in_echo_area (temp);
free (temp);
@@ -4572,7 +4507,7 @@ static int info_keyseq_displayed_p = 0;
/* Initialize the length of the current key sequence. */
void
-initialize_keyseq ()
+initialize_keyseq (void)
{
info_keyseq_index = 0;
info_keyseq_displayed_p = 0;
@@ -4580,8 +4515,7 @@ initialize_keyseq ()
/* Add CHARACTER to the current key sequence. */
void
-add_char_to_keyseq (character)
- char character;
+add_char_to_keyseq (char character)
{
if (info_keyseq_index + 2 >= info_keyseq_size)
info_keyseq = (char *)xrealloc (info_keyseq, info_keyseq_size += 10);
@@ -4593,9 +4527,8 @@ add_char_to_keyseq (character)
/* Display the current value of info_keyseq. If argument EXPECTING is
non-zero, input is expected to be read after the key sequence is
displayed, so add an additional prompting character to the sequence. */
-void
-display_info_keyseq (expecting_future_input)
- int expecting_future_input;
+static void
+display_info_keyseq (int expecting_future_input)
{
char *rep;
@@ -4607,7 +4540,7 @@ display_info_keyseq (expecting_future_input)
inform_in_echo_area (rep);
else
{
- window_message_in_echo_area (rep);
+ window_message_in_echo_area (rep, NULL, NULL);
display_cursor_at_point (active_window);
}
info_keyseq_displayed_p = 1;
@@ -4615,7 +4548,7 @@ display_info_keyseq (expecting_future_input)
/* Called by interactive commands to read a keystroke. */
unsigned char
-info_get_another_input_char ()
+info_get_another_input_char (void)
{
int ready = !info_keyseq_displayed_p; /* ready if new and pending key */
@@ -4652,9 +4585,7 @@ info_get_another_input_char ()
/* Do the command associated with KEY in MAP. If the associated command is
really a keymap, then read another key, and dispatch into that map. */
void
-info_dispatch_on_key (key, map)
- unsigned char key;
- Keymap map;
+info_dispatch_on_key (unsigned char key, Keymap map)
{
#if !defined(INFOKEY)
if (Meta_p (key) && (!ISO_Latin_p || map[key].function != ea_insert))
@@ -4684,7 +4615,7 @@ info_dispatch_on_key (key, map)
if (func != (VFunction *)NULL)
{
/* Special case info_do_lowercase_version (). */
- if (func == info_do_lowercase_version)
+ if (func == (VFunction *) info_do_lowercase_version)
{
#if defined(INFOKEY)
unsigned char lowerkey;
@@ -4792,7 +4723,7 @@ DECLARE_INFO_COMMAND (info_universal_argument,
/* Create a default argument. */
void
-info_initialize_numeric_arg ()
+info_initialize_numeric_arg (void)
{
info_numeric_arg = info_numeric_arg_sign = 1;
info_explicit_arg = 0;
@@ -4833,8 +4764,9 @@ DECLARE_INFO_COMMAND (info_numeric_arg_digit_loop,
key = UnMeta (key);
#endif /* !defined(INFOKEY) */
- if (keymap[key].type == ISFUNC &&
- InfoFunction(keymap[key].function) == info_universal_argument)
+ if (keymap[key].type == ISFUNC
+ && InfoFunction(keymap[key].function)
+ == (VFunction *) info_universal_argument)
{
info_numeric_arg *= 4;
key = 0;
@@ -4884,22 +4816,21 @@ static int pending_input_character = 0;
/* How to make there be no pending input. */
static void
-info_clear_pending_input ()
+info_clear_pending_input (void)
{
pending_input_character = 0;
}
/* How to set the pending input character. */
static void
-info_set_pending_input (key)
- unsigned char key;
+info_set_pending_input (unsigned char key)
{
pending_input_character = key;
}
/* How to see if there is any pending input. */
unsigned char
-info_input_pending_p ()
+info_input_pending_p (void)
{
return (pending_input_character);
}
@@ -4912,8 +4843,7 @@ static unsigned char info_input_buffer[MAX_INFO_INPUT_BUFFERING];
/* Add KEY to the buffer of characters to be read. */
static void
-info_push_typeahead (key)
- unsigned char key;
+info_push_typeahead (unsigned char key)
{
/* Flush all pending input in the case of C-g pressed. */
if (key == Control ('g'))
@@ -4924,14 +4854,14 @@ info_push_typeahead (key)
else
{
info_input_buffer[push_index++] = key;
- if (push_index >= sizeof (info_input_buffer))
+ if ((unsigned int) push_index >= sizeof (info_input_buffer))
push_index = 0;
}
}
/* Return the amount of space available in INFO_INPUT_BUFFER for new chars. */
static int
-info_input_buffer_space_available ()
+info_input_buffer_space_available (void)
{
if (pop_index > push_index)
return (pop_index - push_index);
@@ -4943,22 +4873,21 @@ info_input_buffer_space_available ()
Return the key in KEY.
Result is non-zero if there was a key, or 0 if there wasn't. */
static int
-info_get_key_from_typeahead (key)
- unsigned char *key;
+info_get_key_from_typeahead (unsigned char *key)
{
if (push_index == pop_index)
return (0);
*key = info_input_buffer[pop_index++];
- if (pop_index >= sizeof (info_input_buffer))
+ if ((unsigned int) pop_index >= sizeof (info_input_buffer))
pop_index = 0;
return (1);
}
int
-info_any_buffered_input_p ()
+info_any_buffered_input_p (void)
{
info_gather_typeahead ();
return (push_index != pop_index);
@@ -4967,7 +4896,7 @@ info_any_buffered_input_p ()
/* If characters are available to be read, then read them and stuff them into
info_input_buffer. Otherwise, do nothing. */
void
-info_gather_typeahead ()
+info_gather_typeahead (void)
{
register int i = 0;
int tty, space_avail;
@@ -5041,7 +4970,7 @@ info_gather_typeahead ()
/* How to read a single character. */
unsigned char
-info_get_input_char ()
+info_get_input_char (void)
{
unsigned char keystroke;
diff --git a/contrib/texinfo/info/signals.c b/contrib/texinfo/info/signals.c
index 61e5f97..724768b 100644
--- a/contrib/texinfo/info/signals.c
+++ b/contrib/texinfo/info/signals.c
@@ -1,7 +1,7 @@
-/* signals.c -- install and maintain Info signal handlers.
- $Id: signals.c,v 1.4 2003/01/29 19:23:22 karl Exp $
+/* signals.c -- install and maintain signal handlers.
+ $Id: signals.c,v 1.7 2004/04/11 17:56:46 karl Exp $
- Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003 Free Software
+ Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -18,11 +18,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "signals.h"
+void initialize_info_signal_handler (void);
+
/* **************************************************************** */
/* */
/* Pretending That We Have POSIX Signals */
@@ -32,8 +34,7 @@
#if !defined (HAVE_SIGPROCMASK) && defined (HAVE_SIGSETMASK)
/* Perform OPERATION on NEWSET, perhaps leaving information in OLDSET. */
static void
-sigprocmask (operation, newset, oldset)
- int operation, *newset, *oldset;
+sigprocmask (int operation, int *newset, int *oldset)
{
switch (operation)
{
@@ -64,8 +65,7 @@ sigprocmask (operation, newset, oldset)
#if defined (HAVE_SIGACTION) || defined (HAVE_SIGPROCMASK) ||\
defined (HAVE_SIGSETMASK)
static void
-mask_termsig (set)
- sigset_t *set;
+mask_termsig (sigset_t *set)
{
# if defined (SIGTSTP)
sigaddset (set, SIGTSTP);
@@ -75,6 +75,9 @@ mask_termsig (set)
# if defined (SIGWINCH)
sigaddset (set, SIGWINCH);
# endif
+#if defined (SIGQUIT)
+ sigaddset (set, SIGQUIT);
+#endif
#if defined (SIGINT)
sigaddset (set, SIGINT);
#endif
@@ -84,23 +87,19 @@ mask_termsig (set)
}
#endif /* HAVE_SIGACTION || HAVE_SIGPROCMASK || HAVE_SIGSETMASK */
-static RETSIGTYPE info_signal_proc ();
+static RETSIGTYPE info_signal_proc (int sig);
#if defined (HAVE_SIGACTION)
typedef struct sigaction signal_info;
signal_info info_signal_handler;
static void
-set_termsig (sig, old)
- int sig;
- signal_info *old;
+set_termsig (int sig, signal_info *old)
{
sigaction (sig, &info_signal_handler, old);
}
static void
-restore_termsig (sig, saved)
- int sig;
- const signal_info *saved;
+restore_termsig (int sig, const signal_info *saved)
{
sigaction (sig, saved, NULL);
}
@@ -114,15 +113,20 @@ static int term_conf_busy = 0;
static signal_info old_TSTP, old_TTOU, old_TTIN;
static signal_info old_WINCH, old_INT, old_USR1;
+static signal_info old_QUIT;
void
-initialize_info_signal_handler ()
+initialize_info_signal_handler (void)
{
-#if defined (HAVE_SIGACTION)
+#ifdef SA_NOCLDSTOP
+ /* (Based on info from Paul Eggert found in coreutils.) Don't use
+ HAVE_SIGACTION to decide whether to use the sa_handler, sa_flags,
+ sa_mask members, as some systems (Solaris 7+) don't define them. Use
+ SA_NOCLDSTOP instead; it's been part of POSIX.1 since day 1 (in 1988). */
info_signal_handler.sa_handler = info_signal_proc;
info_signal_handler.sa_flags = 0;
mask_termsig (&info_signal_handler.sa_mask);
-#endif /* HAVE_SIGACTION */
+#endif /* SA_NOCLDSTOP */
#if defined (SIGTSTP)
set_termsig (SIGTSTP, &old_TSTP);
@@ -134,6 +138,10 @@ initialize_info_signal_handler ()
set_termsig (SIGWINCH, &old_WINCH);
#endif
+#if defined (SIGQUIT)
+ set_termsig (SIGQUIT, &old_QUIT);
+#endif
+
#if defined (SIGINT)
set_termsig (SIGINT, &old_INT);
#endif
@@ -145,7 +153,7 @@ initialize_info_signal_handler ()
}
static void
-redisplay_after_signal ()
+redisplay_after_signal (void)
{
terminal_clear_screen ();
display_clear_display (the_display);
@@ -156,7 +164,7 @@ redisplay_after_signal ()
}
static void
-reset_info_window_sizes ()
+reset_info_window_sizes (void)
{
terminal_goto_xy (0, 0);
fflush (stdout);
@@ -164,15 +172,14 @@ reset_info_window_sizes ()
terminal_get_screen_size ();
terminal_prep_terminal ();
display_initialize_display (screenwidth, screenheight);
- window_new_screen_size (screenwidth, screenheight, NULL);
+ window_new_screen_size (screenwidth, screenheight);
redisplay_after_signal ();
}
static RETSIGTYPE
-info_signal_proc (sig)
- int sig;
+info_signal_proc (int sig)
{
- signal_info *old_signal_handler;
+ signal_info *old_signal_handler = NULL;
#if !defined (HAVE_SIGACTION)
/* best effort: first increment this counter and later block signals */
@@ -195,6 +202,9 @@ info_signal_proc (sig)
case SIGTTOU:
case SIGTTIN:
#endif
+#if defined (SIGQUIT)
+ case SIGQUIT:
+#endif
#if defined (SIGINT)
case SIGINT:
#endif
@@ -207,6 +217,10 @@ info_signal_proc (sig)
if (sig == SIGTTIN)
old_signal_handler = &old_TTIN;
#endif /* SIGTSTP */
+#if defined (SIGQUIT)
+ if (sig == SIGQUIT)
+ old_signal_handler = &old_QUIT;
+#endif /* SIGQUIT */
#if defined (SIGINT)
if (sig == SIGINT)
old_signal_handler = &old_INT;
diff --git a/contrib/texinfo/info/terminal.c b/contrib/texinfo/info/terminal.c
index ff9913a..9238643 100644
--- a/contrib/texinfo/info/terminal.c
+++ b/contrib/texinfo/info/terminal.c
@@ -1,8 +1,8 @@
/* terminal.c -- how to handle the physical terminal for Info.
- $Id: terminal.c,v 1.1 2002/08/25 23:38:38 karl Exp $
+ $Id: terminal.c,v 1.3 2004/04/11 17:56:46 karl Exp $
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1997, 1998,
- 1999, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2001, 2002, 2004 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
@@ -18,7 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "terminal.h"
@@ -103,9 +103,6 @@ static char *visible_bell;
/* The string to write to turn on the meta key, if this term has one. */
static char *term_mm;
-/* The string to write to turn off the meta key, if this term has one. */
-static char *term_mo;
-
/* The string to turn on inverse mode, if this term has one. */
static char *term_invbeg;
@@ -116,8 +113,7 @@ static char *term_invend;
return its argument, all the code I've looked at (termutils, less)
does so, so fine. */
static int
-output_character_function (c)
- int c;
+output_character_function (int c)
{
putc (c, stdout);
return c;
@@ -132,9 +128,9 @@ output_character_function (c)
/* Tell the terminal that we will be doing cursor addressable motion. */
static void
-terminal_begin_using_terminal ()
+terminal_begin_using_terminal (void)
{
- RETSIGTYPE (*sigsave) ();
+ RETSIGTYPE (*sigsave) (int signum);
if (term_keypad_on)
send_to_terminal (term_keypad_on);
@@ -163,9 +159,9 @@ terminal_begin_using_terminal ()
/* Tell the terminal that we will not be doing any more cursor
addressable motion. */
static void
-terminal_end_using_terminal ()
+terminal_end_using_terminal (void)
{
- RETSIGTYPE (*sigsave) ();
+ RETSIGTYPE (*sigsave) (int signum);
if (term_keypad_off)
send_to_terminal (term_keypad_off);
@@ -230,8 +226,7 @@ char *term_kx = NULL; /* del */
/* Move the cursor to the terminal location of X and Y. */
void
-terminal_goto_xy (x, y)
- int x, y;
+terminal_goto_xy (int x, int y)
{
if (terminal_goto_xy_hook)
(*terminal_goto_xy_hook) (x, y);
@@ -244,8 +239,7 @@ terminal_goto_xy (x, y)
/* Print STRING to the terminal at the current position. */
void
-terminal_put_text (string)
- char *string;
+terminal_put_text (char *string)
{
if (terminal_put_text_hook)
(*terminal_put_text_hook) (string);
@@ -257,9 +251,7 @@ terminal_put_text (string)
/* Print NCHARS from STRING to the terminal at the current position. */
void
-terminal_write_chars (string, nchars)
- char *string;
- int nchars;
+terminal_write_chars (char *string, int nchars)
{
if (terminal_write_chars_hook)
(*terminal_write_chars_hook) (string, nchars);
@@ -272,7 +264,7 @@ terminal_write_chars (string, nchars)
/* Clear from the current position of the cursor to the end of the line. */
void
-terminal_clear_to_eol ()
+terminal_clear_to_eol (void)
{
if (terminal_clear_to_eol_hook)
(*terminal_clear_to_eol_hook) ();
@@ -284,7 +276,7 @@ terminal_clear_to_eol ()
/* Clear the entire terminal screen. */
void
-terminal_clear_screen ()
+terminal_clear_screen (void)
{
if (terminal_clear_screen_hook)
(*terminal_clear_screen_hook) ();
@@ -296,7 +288,7 @@ terminal_clear_screen ()
/* Move the cursor up one line. */
void
-terminal_up_line ()
+terminal_up_line (void)
{
if (terminal_up_line_hook)
(*terminal_up_line_hook) ();
@@ -308,7 +300,7 @@ terminal_up_line ()
/* Move the cursor down one line. */
void
-terminal_down_line ()
+terminal_down_line (void)
{
if (terminal_down_line_hook)
(*terminal_down_line_hook) ();
@@ -320,7 +312,7 @@ terminal_down_line ()
/* Turn on reverse video if possible. */
void
-terminal_begin_inverse ()
+terminal_begin_inverse (void)
{
if (terminal_begin_inverse_hook)
(*terminal_begin_inverse_hook) ();
@@ -332,7 +324,7 @@ terminal_begin_inverse ()
/* Turn off reverse video if possible. */
void
-terminal_end_inverse ()
+terminal_end_inverse (void)
{
if (terminal_end_inverse_hook)
(*terminal_end_inverse_hook) ();
@@ -345,7 +337,7 @@ terminal_end_inverse ()
/* Ring the terminal bell. The bell is run visibly if it both has one and
terminal_use_visible_bell_p is non-zero. */
void
-terminal_ring_bell ()
+terminal_ring_bell (void)
{
if (terminal_ring_bell_hook)
(*terminal_ring_bell_hook) ();
@@ -360,8 +352,7 @@ terminal_ring_bell ()
/* At the line START, delete COUNT lines from the terminal display. */
static void
-terminal_delete_lines (start, count)
- int start, count;
+terminal_delete_lines (int start, int count)
{
int lines;
@@ -384,8 +375,7 @@ terminal_delete_lines (start, count)
/* At the line START, insert COUNT lines in the terminal display. */
static void
-terminal_insert_lines (start, count)
- int start, count;
+terminal_insert_lines (int start, int count)
{
int lines;
@@ -412,8 +402,7 @@ terminal_insert_lines (start, count)
towards the top of the screen, else they are scrolled towards the
bottom of the screen. */
void
-terminal_scroll_terminal (start, end, amount)
- int start, end, amount;
+terminal_scroll_terminal (int start, int end, int amount)
{
if (!terminal_can_scroll)
return;
@@ -449,8 +438,7 @@ terminal_scroll_terminal (start, end, amount)
/* Re-initialize the terminal considering that the TERM/TERMCAP variable
has changed. */
void
-terminal_new_terminal (terminal_name)
- char *terminal_name;
+terminal_new_terminal (char *terminal_name)
{
if (terminal_new_terminal_hook)
(*terminal_new_terminal_hook) (terminal_name);
@@ -462,7 +450,7 @@ terminal_new_terminal (terminal_name)
/* Set the global variables SCREENWIDTH and SCREENHEIGHT. */
void
-terminal_get_screen_size ()
+terminal_get_screen_size (void)
{
if (terminal_get_screen_size_hook)
(*terminal_get_screen_size_hook) ();
@@ -522,8 +510,7 @@ terminal_get_screen_size ()
TERMINAL_HAS_META_P becomes nonzero if this terminal supports a Meta
key. Finally, the terminal screen is cleared. */
void
-terminal_initialize_terminal (terminal_name)
- char *terminal_name;
+terminal_initialize_terminal (char *terminal_name)
{
char *buffer;
@@ -632,12 +619,10 @@ terminal_initialize_terminal (terminal_name)
if (terminal_has_meta_p)
{
term_mm = tgetstr ("mm", &buffer);
- term_mo = tgetstr ("mo", &buffer);
}
else
{
term_mm = NULL;
- term_mo = NULL;
}
/* Attempt to find the arrow keys. */
@@ -704,7 +689,7 @@ struct ltchars original_ltchars;
/* Prepare to start using the terminal to read characters singly. */
void
-terminal_prep_terminal ()
+terminal_prep_terminal (void)
{
int tty;
@@ -844,7 +829,7 @@ terminal_prep_terminal ()
/* Restore the tty settings back to what they were before we started using
this terminal. */
void
-terminal_unprep_terminal ()
+terminal_unprep_terminal (void)
{
int tty;
OpenPOWER on IntegriCloud