texinfo-commits
[Top][All Lists]
Advanced

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

[5446] session.c: proper use of info_parse_label


From: Gavin D. Smith
Subject: [5446] session.c: proper use of info_parse_label
Date: Sun, 13 Apr 2014 18:05:23 +0000

Revision: 5446
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5446
Author:   gavin
Date:     2014-04-13 18:05:19 +0000 (Sun, 13 Apr 2014)
Log Message:
-----------
session.c: proper use of info_parse_label

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-04-13 17:24:03 UTC (rev 5445)
+++ trunk/ChangeLog     2014-04-13 18:05:19 UTC (rev 5446)
@@ -1,5 +1,11 @@
 2014-04-13  Gavin Smith  <address@hidden>
 
+       * 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.
        All callers changed.
        * session.c (info_handle_pointer): Do not assume anything

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2014-04-13 17:24:03 UTC (rev 5445)
+++ trunk/info/session.c        2014-04-13 18:05:19 UTC (rev 5446)
@@ -1254,23 +1254,17 @@
 
                   /* If this node's first menu item is the same as this node's
                      Next pointer, keep backing up. */
-                  if (!info_parsed_filename)
+                  if (spec)
                     {
                       REFERENCE **menu;
-                      char *next_nodename;
 
-                      /* Remember the name of the Next node, since reading
-                         the menu can overwrite the contents of the
-                         info_parsed_xxx strings. */
-                      next_nodename = xstrdup (info_parsed_nodename);
-
                       menu = info_menu_of_node (window->node);
                       if (menu &&
                           (strcmp
-                           (menu[0]->nodename, next_nodename) == 0))
+                           (menu[0]->nodename, spec) == 0))
                         {
                           info_free_references (menu);
-                          free (next_nodename);
+                          free (spec);
                           continue;
                         }
                       else
@@ -1278,7 +1272,7 @@
                           /* Restore the world to where it was before
                              reading the menu contents. */
                           info_free_references (menu);
-                          free (next_nodename);
+                          free (spec);
                         }
                     }
 
@@ -1368,11 +1362,11 @@
              move Up.  Otherwise, we could move Prev, and then to the last
              menu item in the Prev.  This would cause the user to loop
              through a subsection of the info file. */
-          if (!info_parsed_filename && info_parsed_nodename)
+          if (spec)
             {
               char *pnode;
 
-              pnode = xstrdup (info_parsed_nodename);
+              pnode = spec;
               spec = info_up_label_of_node (window->node);
 
               if (spec && strcmp (spec, pnode) == 0)




reply via email to

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