texinfo-commits
[Top][All Lists]
Advanced

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

[5471] delete unused.


From: Gavin D. Smith
Subject: [5471] delete unused.
Date: Tue, 22 Apr 2014 00:23:03 +0000

Revision: 5471
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5471
Author:   gavin
Date:     2014-04-22 00:23:02 +0000 (Tue, 22 Apr 2014)
Log Message:
-----------
delete unused. full paths.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-04-22 00:09:30 UTC (rev 5470)
+++ trunk/ChangeLog     2014-04-22 00:23:02 UTC (rev 5471)
@@ -1,19 +1,27 @@
 2014-04-22  Gavin Smith  <address@hidden>
 
-       * echo-area.c (info_read_completing_internal) New argument
+       * info/info-utils.c, info/info-utils.h (info_menu_of_node)
+       (info_xrefs_of_node, info_menu_items, info_xrefs)
+       (info_references_internal): Functions deleted.
+       * info/info-utils.c (info_parse_label): Function and associated
+       macros deleted.
+
+2014-04-22  Gavin Smith  <address@hidden>
+
+       * info/echo-area.c (info_read_completing_internal) New argument
        exclude_func.  All callers changed.
        (completion_exclude_func): New variable.
        (info_read_completing_in_echo_area_with_exclusions): New function.
        (build_completions): Exclude completions using
        completion_exclude_func.
-       * session.c (exclude_cross_references, exclude_menu_items)
+       * info/session.c (exclude_cross_references, exclude_menu_items)
        (exclude_nothing): New static functions.
        
-       * footnotes.c (make_footnotes_node)
-       * indices.c (info_indices_of_file_buffer, select_visited_node)
+       * info/footnotes.c (make_footnotes_node)
+       * info/indices.c (info_indices_of_file_buffer, select_visited_node)
        (apropos_in_all_indices)
-       * nodemenu.c (select_visited_node)
-       * session.c (forward_move_node_structure)
+       * info/nodemenu.c (select_visited_node)
+       * info/session.c (forward_move_node_structure)
        (backward_move_node_structure)
        (info_handle_pointer, select_menu_digit)
        (info_menu_digit, info_menu_or_ref_item, info_visit_menu) 
@@ -218,43 +226,43 @@
 
 2014-04-14  Gavin Smith  <address@hidden>
 
-       * indices.c (info_indices_of_file_buffer): Don't consider anchors
+       * info/indices.c (info_indices_of_file_buffer): Don't consider anchors
        as index nodes even if they have "Index" in their name.
 
 2014-04-14  Gavin Smith  <address@hidden>
 
-       * nodes.c (info_create_node): New function initializing
+       * info/nodes.c (info_create_node): New function initializing
        created NODE structures.
-       * footnotes.c (make_footnotes_node)
-       * indices.c (create_virtindex_node)
-       * man.c (manpage_node_of_file_buffer)
-       * nodes.c (info_get_node_of_file_buffer)
+       * info/footnotes.c (make_footnotes_node)
+       * info/indices.c (create_virtindex_node)
+       * info/man.c (manpage_node_of_file_buffer)
+       * info/nodes.c (info_get_node_of_file_buffer)
        (info_node_of_file_buffer_tags)
-       * window.c (string_to_node, message_buffer_to_node): Call
+       * info/window.c (string_to_node, message_buffer_to_node): Call
        info_create_node.
 
-       * session.c (kill_node): Copy whole NODE structure at once instead
+       * info/session.c (kill_node): Copy whole NODE structure at once instead
        of field-by-field.
 
 2014-04-13  Gavin Smith  <address@hidden>
 
-       * session.c (forward_move_node_structure)
+       * info/session.c (forward_move_node_structure)
        (backward_move_node_structure): Remove accesses of
        info_parsed_filename and info_parsed_nodename.
 
 2014-04-13  Gavin Smith  <address@hidden>
 
-       * info-utils.c (info_parse_label): Return label with no parsing.
+       * info/info-utils.c (info_parse_label): Return label with no parsing.
        All callers changed.
-       * session.c (info_handle_pointer): Do not assume anything
+       * info/session.c (info_handle_pointer): Do not assume anything
        about the values of info_parsed_filename and info_parsed_nodename.
        Call info_get_node_with_defaults to get target node.  All callers
        changed.
-       * session.c (INFO_LABEL_FOUND): Macro deleted.
+       * info/session.c (INFO_LABEL_FOUND): Macro deleted.
 
 2014-04-13  Gavin Smith  <address@hidden>
 
-       * nodes.c (get_filename_and_nodename): New static function setting
+       * info/nodes.c (get_filename_and_nodename): New static function setting
        defaults for node specifications.
        (info_get_node, info_get_node_with_defaults): New argument 'window'
        for info_get_node.  Function renamed, with wrapper with old arguments.
@@ -262,7 +270,8 @@
        (info_get_node_of_file_buffer): Remove unnecessary check for null
        nodename - done by calling code.
 
-       * session.c (info_select_reference): Call info_get_node_with_defaults.
+       * info/session.c (info_select_reference): Call
+       info_get_node_with_defaults.
        (info_parse_and_select): Do not call info_parse_node.
 
 2014-04-13  Gavin Smith  <address@hidden>

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2014-04-22 00:09:30 UTC (rev 5470)
+++ trunk/info/info-utils.c     2014-04-22 00:23:02 UTC (rev 5471)
@@ -62,10 +62,6 @@
 static void save_nodename (char *nodename);
 static void saven_nodename (char *nodename, int len);
 
-/* How to get a reference (either menu or cross). */
-static REFERENCE **info_references_internal (char *label,
-    SEARCH_BINDING *binding);
-
 /* Parse the filename and nodename out of STRING.  Return length of node
    specification.  If STRING doesn't contain a filename (i.e., it is NOT
    (FILENAME)NODENAME) then set INFO_PARSED_FILENAME to NULL.  The
@@ -185,31 +181,6 @@
   return length;
 }
 
-/* Return the node addressed by LABEL in NODE (usually one of "Prev:",
-   "Next:", "Up:", "File:", or "Node:".  To be freed by caller. */
-char *
-info_parse_label (char *label, NODE *node)
-{
-  register int i;
-  char *nodeline;
-  char *store_in;
-  int length;
-
-  /* Find the label in the first line of this node. */
-  nodeline = node->contents;
-  i = string_in_line (label, nodeline);
-
-  if (i == -1)
-    return 0;
-
-  i++;
-  i += skip_whitespace (nodeline + i);
-  length = skip_node_characters (nodeline + i, PARSE_NODE_DFLT);
-  store_in = xmalloc (length + 1);
-  memmove (store_in, nodeline + i, length);
-  store_in[length] = '\0';
-  return store_in;
-}
 
 /* **************************************************************** */
 /*                                                                  */
@@ -217,167 +188,6 @@
 /*                                                                  */
 /* **************************************************************** */
 
-/* Return a NULL terminated array of REFERENCE * which represents the menu
-   found in NODE.  If there is no menu in NODE, just return a NULL pointer. */
-REFERENCE **
-info_menu_of_node (NODE *node)
-{
-  long position;
-  SEARCH_BINDING tmp_search;
-  REFERENCE **menu = NULL;
-
-  tmp_search.buffer = node->contents;
-  tmp_search.start = 0;
-  tmp_search.end = node->nodelen;
-  tmp_search.flags = S_FoldCase;
-
-  /* Find the start of the menu. */
-  if (search_forward (INFO_MENU_LABEL, &tmp_search, &position)
-      != search_success)
-    return NULL;
-
-  /* We have the start of the menu now.  Glean menu items from the rest
-     of the node. */
-  tmp_search.start = position + strlen (INFO_MENU_LABEL);
-  tmp_search.start += skip_line (tmp_search.buffer + tmp_search.start);
-  tmp_search.start--;
-  menu = info_menu_items (&tmp_search);
-  return menu;
-}
-
-/* Return a NULL terminated array of REFERENCE * which represents the cross
-   refrences found in NODE.  If there are no cross references in NODE, just
-   return a NULL pointer. */
-REFERENCE **
-info_xrefs_of_node (NODE *node)
-{
-  SEARCH_BINDING tmp_search;
-
-#if defined (HANDLE_MAN_PAGES)
-  if (node->flags & N_IsManPage)
-    return xrefs_of_manpage (node);
-#endif
-
-  tmp_search.buffer = node->contents;
-  tmp_search.start = 0;
-  tmp_search.end = node->nodelen;
-  tmp_search.flags = S_FoldCase;
-
-  return info_xrefs (&tmp_search);
-}
-
-/* Glean menu entries from BINDING->buffer + BINDING->start until we
-   have looked at the entire contents of BINDING.  Return an array
-   of REFERENCE * that represents each menu item in this range. */
-REFERENCE **
-info_menu_items (SEARCH_BINDING *binding)
-{
-  return info_references_internal (INFO_MENU_ENTRY_LABEL, binding);
-}
-
-/* Glean cross references from BINDING->buffer + BINDING->start until
-   BINDING->end.  Return an array of REFERENCE * that represents each
-   cross reference in this range. */
-REFERENCE **
-info_xrefs (SEARCH_BINDING *binding)
-{
-  return info_references_internal (INFO_XREF_LABEL, binding);
-}
-
-/* Glean cross references or menu items from BINDING.  Return an array
-   of REFERENCE * that represents the items found. */
-static REFERENCE **
-info_references_internal (char *label, SEARCH_BINDING *binding)
-{
-  SEARCH_BINDING tmp_search;
-  REFERENCE **refs = NULL;
-  size_t refs_index = 0, refs_slots = 0;
-  int searching_for_menu_items = 0;
-  long position;
-
-  tmp_search.buffer = binding->buffer;
-  tmp_search.start = binding->start;
-  tmp_search.end = binding->end;
-  tmp_search.flags = S_FoldCase | S_SkipDest;
-
-  searching_for_menu_items = (mbscasecmp (label, INFO_MENU_ENTRY_LABEL) == 0);
-
-  while (search_forward (label, &tmp_search, &position) == search_success)
-    {
-      int offset, start;
-      char *refdef;
-      REFERENCE *entry;
-
-      tmp_search.start = position;
-      tmp_search.start += skip_whitespace (tmp_search.buffer + 
tmp_search.start);
-      start = tmp_search.start - binding->start;
-      refdef = tmp_search.buffer + tmp_search.start;
-      offset = string_in_line (":", refdef);
-
-      /* When searching for menu items, if no colon, there is no
-         menu item on this line. */
-      if (offset == -1)
-        {
-          if (searching_for_menu_items)
-            continue;
-          else
-            {
-              int temp;
-
-              temp = skip_line (refdef);
-              offset = string_in_line (":", refdef + temp);
-              if (offset == -1)
-                continue;       /* Give up? */
-              else
-                offset += temp;
-            }
-        }
-
-      entry = xmalloc (sizeof (REFERENCE));
-      entry->filename = NULL;
-      entry->nodename = NULL;
-      entry->label = xmalloc (offset);
-      strncpy (entry->label, refdef, offset - 1);
-      entry->label[offset - 1] = '\0';
-      canonicalize_whitespace (entry->label);
-      entry->line_number = 0;
-      
-      refdef += offset;
-      entry->start = start;
-      entry->end = refdef - binding->buffer;
-
-      /* If this reference entry continues with another ':' then the
-         nodename is the same as the label. */
-      if (*refdef == ':')
-        {
-          entry->nodename = xstrdup (entry->label);
-        }
-      else
-        {
-          /* This entry continues with a specific nodename.  Parse the
-             nodename from the specification. */
-
-          refdef += skip_whitespace_and_newlines (refdef);
-
-          if (searching_for_menu_items)
-            info_parse_node (refdef, PARSE_NODE_DFLT);
-          else
-            info_parse_node (refdef, PARSE_NODE_SKIP_NEWLINES);
-
-          if (info_parsed_filename)
-            entry->filename = xstrdup (info_parsed_filename);
-
-          if (info_parsed_nodename)
-            entry->nodename = xstrdup (info_parsed_nodename);
-
-          entry->line_number = info_parsed_line_number;
-        }
-
-      add_pointer_to_array (entry, refs_index, refs, refs_slots, 50);
-    }
-  return refs;
-}
-
 /* Get the entry associated with LABEL in REFERENCES.  Return a pointer
    to the ENTRY if found, or NULL. */
 REFERENCE *

Modified: trunk/info/info-utils.h
===================================================================
--- trunk/info/info-utils.h     2014-04-22 00:09:30 UTC (rev 5470)
+++ trunk/info/info-utils.h     2014-04-22 00:23:02 UTC (rev 5471)
@@ -60,20 +60,6 @@
 */ 
 int info_parse_node (char *string, int flag);
 
-/* Return a NULL terminated array of REFERENCE * which represents the menu
-   found in NODE.  If there is no menu in NODE, just return a NULL pointer. */
-extern REFERENCE **info_menu_of_node (NODE *node);
-
-/* Return a NULL terminated array of REFERENCE * which represents the cross
-   refrences found in NODE.  If there are no cross references in NODE, just
-   return a NULL pointer. */
-extern REFERENCE **info_xrefs_of_node (NODE *node);
-
-/* Glean cross references from BINDING->buffer + BINDING->start until
-   BINDING->end.  Return an array of REFERENCE * that represents each
-   cross reference in this range. */
-extern REFERENCE **info_xrefs (SEARCH_BINDING *binding);
-
 void scan_node_contents (FILE_BUFFER *fb, NODE **node_ptr);
 
 /* Get the entry associated with LABEL in REFERENCES.  Return a pointer to
@@ -81,11 +67,6 @@
 extern REFERENCE *info_get_labeled_reference (char *label,
     REFERENCE **references);
 
-/* Glean menu entries from BINDING->buffer + BINDING->start until we
-   have looked at the entire contents of BINDING.  Return an array
-   of REFERENCE * that represents each menu item in this range. */
-extern REFERENCE **info_menu_items (SEARCH_BINDING *binding);
-
 /* A utility function for concatenating REFERENCE **.  Returns a new
    REFERENCE ** which is the concatenation of REF1 and REF2.  The REF1
    and REF2 arrays are freed, but their contents are not. */
@@ -129,16 +110,6 @@
 /* Return a window displaying the node NODE. */
 extern WINDOW *get_window_of_node (NODE *node);
 
-/* Return the node addressed by LABEL in NODE (usually one of "Prev:",
-   "Next:", "Up:", "File:", or "Node:". */
-extern char *info_parse_label (char *label, NODE *node);
-
-#define info_file_label_of_node(n) info_parse_label (INFO_FILE_LABEL, n)
-#define info_next_label_of_node(n) info_parse_label (INFO_NEXT_LABEL, n)
-#define info_up_label_of_node(n)   info_parse_label (INFO_UP_LABEL, n)
-#define info_prev_label_of_node(n) info_parse_label (INFO_PREV_LABEL, n)
-#define info_altprev_label_of_node(n) info_parse_label (INFO_ALTPREV_LABEL, n)
-
 struct text_buffer
 {
   char *base;




reply via email to

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