texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5822] remove command function declarations from session.h


From: Gavin D. Smith
Subject: [5822] remove command function declarations from session.h
Date: Fri, 12 Sep 2014 13:22:45 +0000

Revision: 5822
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5822
Author:   gavin
Date:     2014-09-12 13:22:43 +0000 (Fri, 12 Sep 2014)
Log Message:
-----------
remove command function declarations from session.h

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/session.c
    trunk/info/session.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-09-12 12:38:47 UTC (rev 5821)
+++ trunk/ChangeLog     2014-09-12 13:22:43 UTC (rev 5822)
@@ -26,6 +26,15 @@
        (info_error_rings_bell_p): Declaration removed.
        * info/info.h, info/session.h (debug): Macro definition moved.
 
+       * info/session.h: Remove unnecessary declarations of functions that
+       are defined with DECLARE_INFO_COMMAND and not used outside of their
+       containing source files.
+       * info/session.c: Add declarations of DECLARE_INFO_COMMAND functions
+       as necessary.  Reorder some functions to be used after they are
+       defined.
+       (forward_move_node_structure): Call info_parse_and_select instead of
+       info_top_node.
+
 2014-09-10  Gavin Smith  <address@hidden>
 
        * info/display.c (display_scroll_region): New function.

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-09-12 12:38:47 UTC (rev 5821)
+++ trunk/info/session.c        2014-09-12 13:22:43 UTC (rev 5822)
@@ -542,6 +542,9 @@
 {
   if (mouse_cb & 0x40)
     {
+      void info_up_line (WINDOW *, int count, int key);
+      void info_down_line (WINDOW *, int count, int key);
+
       switch (mouse_cb & 0x03)
         {
         case 0: /* Mouse button 4 (scroll up). */
@@ -1204,6 +1207,8 @@
     }
 }
 
+void info_prev_line (WINDOW *, int count, int key);
+
 /* Move WINDOW's point down to the next line if possible. */
 DECLARE_INFO_COMMAND (info_next_line, _("Move down to the next line"))
 {
@@ -1334,6 +1339,8 @@
     window->point = old_point;
 }
 
+void info_backward_char (WINDOW *, int count, int key);
+
 /* Move point forward in the node. */
 DECLARE_INFO_COMMAND (info_forward_char, _("Move forward a character"))
 {
@@ -1360,6 +1367,8 @@
     }
 }
 
+void info_backward_word (WINDOW *, int count, int key);
+
 /* Move forward a word in this node. */
 DECLARE_INFO_COMMAND (info_forward_word, _("Move forward a word"))
 {
@@ -1822,6 +1831,8 @@
 /*                                                                  */
 /* **************************************************************** */
 
+void info_prev_window (WINDOW *, int count, int key);
+
 /* Make the next window in the chain be the active window. */
 DECLARE_INFO_COMMAND (info_next_window, _("Select the next window"))
 {
@@ -2129,13 +2140,6 @@
   info_select_reference (window, &entry);
 }
 
-/* Select the last menu item in WINDOW->node. */
-DECLARE_INFO_COMMAND (info_last_menu_item,
-   _("Select the last item in this node's menu"))
-{
-  info_menu_digit (window, 1, '0');
-}
-
 /* Return menu entry indexed by KEY, where '1' is the first menu item, '2' is
    the second, etc., and '0' is the last.  Return value should not be freed. */
 static REFERENCE *
@@ -2210,6 +2214,13 @@
   return;
 }
 
+/* Select the last menu item in WINDOW->node. */
+DECLARE_INFO_COMMAND (info_last_menu_item,
+   _("Select the last item in this node's menu"))
+{
+  info_menu_digit (window, 1, '0');
+}
+
 static int exclude_cross_references (REFERENCE *r)
 {
   return r->type == REFERENCE_XREF;
@@ -2550,6 +2561,8 @@
   return 1;
 }
 
+void info_move_to_next_xref (WINDOW *, int count, int key);
+
 DECLARE_INFO_COMMAND (info_move_to_prev_xref,
                       _("Move to the previous cross reference"))
 {
@@ -3057,7 +3070,7 @@
                       return 1;
                       
                     case SLN_Top:
-                      info_top_node (window, 1, 0);
+                      info_parse_and_select ("Top", window);
                       return 0;
                       
                     default:
@@ -3143,6 +3156,8 @@
   return 0;
 }
 
+void info_global_prev_node (WINDOW *, int count, int key);
+
 /* Move continuously forward through the node structure of this info file. */
 DECLARE_INFO_COMMAND (info_global_next_node,
                       _("Move forwards or down through node structure"))
@@ -5003,43 +5018,8 @@
 int ea_numeric_arg_sign = 1;
 int ea_numeric_arg = 1;
 
-/* Add the current digit to the argument in progress. */
-DECLARE_INFO_COMMAND (info_add_digit_to_numeric_arg,
-                      _("Add this digit to the current numeric argument"))
-{
-  info_numeric_arg_digit_loop (window, 0, key);
-}
+void info_universal_argument (WINDOW *, int count, int key);
 
-/* C-u, universal argument.  Multiply the current argument by 4.
-   Read a key.  If the key has nothing to do with arguments, then
-   dispatch on it.  If the key is the abort character then abort. */
-DECLARE_INFO_COMMAND (info_universal_argument,
-                      _("Start (or multiply by 4) the current numeric 
argument"))
-{
-  if (!echo_area_is_active)
-    info_numeric_arg *= 4;
-  else
-    ea_numeric_arg *= 4;
-
-  info_numeric_arg_digit_loop (window, 0, 0);
-}
-
-/* Create a default argument. */
-void
-info_initialize_numeric_arg (void)
-{
-  if (!echo_area_is_active)
-    {
-      info_numeric_arg = info_numeric_arg_sign = 1;
-      info_explicit_arg = 0;
-    }
-  else
-    {
-      ea_numeric_arg = ea_numeric_arg_sign = 1;
-      ea_explicit_arg = 0;
-    }
-}
-
 DECLARE_INFO_COMMAND (info_numeric_arg_digit_loop,
                       _("Internally used by \\[universal-argument]"))
 {
@@ -5117,3 +5097,41 @@
       key = 0;
     }
 }
+
+/* Add the current digit to the argument in progress. */
+DECLARE_INFO_COMMAND (info_add_digit_to_numeric_arg,
+                      _("Add this digit to the current numeric argument"))
+{
+  info_numeric_arg_digit_loop (window, 0, key);
+}
+
+/* C-u, universal argument.  Multiply the current argument by 4.
+   Read a key.  If the key has nothing to do with arguments, then
+   dispatch on it.  If the key is the abort character then abort. */
+DECLARE_INFO_COMMAND (info_universal_argument,
+                      _("Start (or multiply by 4) the current numeric 
argument"))
+{
+  if (!echo_area_is_active)
+    info_numeric_arg *= 4;
+  else
+    ea_numeric_arg *= 4;
+
+  info_numeric_arg_digit_loop (window, 0, 0);
+}
+
+/* Create a default argument. */
+void
+info_initialize_numeric_arg (void)
+{
+  if (!echo_area_is_active)
+    {
+      info_numeric_arg = info_numeric_arg_sign = 1;
+      info_explicit_arg = 0;
+    }
+  else
+    {
+      ea_numeric_arg = ea_numeric_arg_sign = 1;
+      ea_explicit_arg = 0;
+    }
+}
+

Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h        2014-09-12 12:38:47 UTC (rev 5821)
+++ trunk/info/session.h        2014-09-12 13:22:43 UTC (rev 5822)
@@ -130,114 +130,15 @@
 extern void initialize_terminal_and_keymaps (char *init_file);
 extern REFERENCE *info_intuit_options_node (NODE *initial_node, char *program);
 
-/* Moving the point within a node. */
-extern void info_next_line (WINDOW *window, int count, int key);
-extern void info_prev_line (WINDOW *window, int count, int key);
-extern void info_end_of_line (WINDOW *window, int count, int key);
-extern void info_beginning_of_line (WINDOW *window, int count, int key);
-extern void info_forward_char (WINDOW *window, int count, int key);
-extern void info_backward_char (WINDOW *window, int count, int key);
-extern void info_forward_word (WINDOW *window, int count, int key);
-extern void info_backward_word (WINDOW *window, int count, int key);
-extern void info_beginning_of_node (WINDOW *window, int count, int key);
-extern void info_end_of_node (WINDOW *window, int count, int key);
-extern void info_move_to_prev_xref (WINDOW *window, int count, int key);
-extern void info_move_to_next_xref (WINDOW *window, int count, int key);
+void info_scroll_forward (WINDOW *window, int count, int key);
+void info_abort_key (WINDOW *window, int count, int key);
 
-/* Scrolling text within a window. */
-extern void info_scroll_forward (WINDOW *window, int count, int key);
-extern void info_scroll_backward (WINDOW *window, int count, int key);
-extern void info_redraw_display (WINDOW *window, int count, int key);
-extern void info_toggle_wrap (WINDOW *window, int count, int key);
-extern void info_toggle_regexp (WINDOW *window, int count, int key);
-extern void info_move_to_window_line (WINDOW *window, int count,
-    int key);
-extern void info_up_line (WINDOW *window, int count, int key);
-extern void info_down_line (WINDOW *window, int count, int key);
-extern void info_scroll_half_screen_down (WINDOW *window, int count, int key);
-extern void info_scroll_half_screen_up (WINDOW *window, int count, int key);
-extern void info_scroll_forward_set_window (WINDOW *window, int count, int 
key);
-extern void info_scroll_forward_page_only (WINDOW *window, int count, int key);
-extern void info_scroll_forward_page_only_set_window (WINDOW *window, int 
count,
-    int key);
-extern void info_scroll_backward_set_window (WINDOW *window, int count,
-    int key);
-extern void info_scroll_backward_page_only (WINDOW *window, int count,
-    int key);
-extern void info_scroll_backward_page_only_set_window (WINDOW *window, int 
count,
-    int key);
-extern void info_scroll_other_window_backward (WINDOW *window, int count,
-    int key);
+NODE *info_follow_menus (NODE *initial_node, char **menus,
+                         char **error_msg, int strict);
 
-/* Manipulating multiple windows. */
-extern void info_split_window (WINDOW *window, int count, int key);
-extern void info_delete_window (WINDOW *window, int count, int key);
-extern void info_keep_one_window (WINDOW *window, int count, int key);
-extern void info_grow_window (WINDOW *window, int count, int key);
-extern void info_scroll_other_window (WINDOW *window, int count, int key);
-extern void info_tile_windows (WINDOW *window, int count, int key);
-extern void info_next_window (WINDOW *window, int count, int key);
-extern void info_prev_window (WINDOW *window, int count, int key);
-
-/* Selecting nodes. */
-extern void info_next_node (WINDOW *window, int count, int key);
-extern void info_prev_node (WINDOW *window, int count, int key);
-extern void info_up_node (WINDOW *window, int count, int key);
-extern void info_last_node (WINDOW *window, int count, int key);
-extern void info_first_node (WINDOW *window, int count, int key);
-extern void info_history_node (WINDOW *window, int count, int key);
-extern void info_goto_node (WINDOW *window, int count, int key);
-extern void info_goto_invocation_node (WINDOW *window, int count, int key);
-extern void info_top_node (WINDOW *window, int count, int key);
-extern void info_dir_node (WINDOW *window, int count, int key);
-extern void info_global_next_node (WINDOW *window, int count, int key);
-extern void info_global_prev_node (WINDOW *window, int count, int key);
-extern void info_kill_node (WINDOW *window, int count, int key);
-extern void info_view_file (WINDOW *window, int count, int key);
-extern void info_menu_sequence (WINDOW *window, int count, int key);
-extern NODE *info_follow_menus (NODE *initial_node, char **menus,
-                               char **error_msg, int strict);
-extern void info_man (WINDOW *window, int count, int key);
-extern void list_visited_nodes (WINDOW *window, int count, int key);
-extern void select_visited_node (WINDOW *window, int count, int key);
-
-/* Selecting cross references. */
-extern void info_menu_digit (WINDOW *window, int count, int key);
-extern void info_menu_item (WINDOW *window, int count, int key);
-extern void info_xref_item (WINDOW *window, int count, int key);
-extern void info_find_menu (WINDOW *window, int count, int key);
-extern void info_select_reference_this_line (WINDOW *window, int count,
-    int key);
-extern void info_last_menu_item (WINDOW *window, int count, int key);
-extern void info_visit_menu (WINDOW *window, int count, int key);
-
 /* Adding numeric arguments. */
 extern int info_explicit_arg, info_numeric_arg, info_numeric_arg_sign;
 extern int ea_explicit_arg, ea_numeric_arg, ea_numeric_arg_sign;
-
-extern void info_add_digit_to_numeric_arg (WINDOW *window, int count, int key);
-extern void info_universal_argument (WINDOW *window, int count, int key);
 extern void info_initialize_numeric_arg (void);
-extern void info_numeric_arg_digit_loop (WINDOW *window, int count, int key);
 
-/* Searching commands. */
-extern void info_search (WINDOW *window, int count, int key);
-extern void isearch_forward (WINDOW *window, int count, int key);
-extern void isearch_backward (WINDOW *window, int count, int key);
-extern void info_search_case_sensitively (WINDOW *window, int count, int key);
-extern void info_search_backward (WINDOW *window, int count, int key);
-extern void info_search_next (WINDOW *window, int count, int key);
-extern void info_search_previous (WINDOW *window, int count, int key);
-
-/* Dumping and printing nodes. */
-extern void info_print_node (WINDOW *window, int count, int key);
-
-/* Footnotes.  */
-extern void info_show_footnotes (WINDOW *window, int count, int key);
-
-/* Miscellaneous commands. */
-extern void info_abort_key (WINDOW *window, int count, int key);
-extern void info_quit (WINDOW *window, int count, int key);
-extern void info_do_lowercase_version (WINDOW *window, int count, int key);
-
 #endif /* not SESSION_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]