[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5662] follow menus from command-line for split files properly
From: |
Gavin D. Smith |
Subject: |
[5662] follow menus from command-line for split files properly |
Date: |
Fri, 13 Jun 2014 12:39:08 +0000 |
Revision: 5662
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5662
Author: gavin
Date: 2014-06-13 12:39:07 +0000 (Fri, 13 Jun 2014)
Log Message:
-----------
follow menus from command-line for split files properly
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/info.c
Added Paths:
-----------
trunk/info/t/back-to-top.drib
trunk/info/t/split-file-menu.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-06-13 11:53:48 UTC (rev 5661)
+++ trunk/ChangeLog 2014-06-13 12:39:07 UTC (rev 5662)
@@ -4,6 +4,10 @@
history.
* info/t/last-no-history.sh: New test.
+ * info/info.c (add_initial_nodes): For split files, store the name of
+ the top-level file instead of the subfile.
+ * info/t/split-file-menu.sh: New test.
+
2014-06-12 Gavin Smith <address@hidden>
* info/info.h, info/makedoc.c, info/doc.h, info/infomap.c,
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-06-13 11:53:48 UTC (rev 5661)
+++ trunk/info/Makefile.am 2014-06-13 12:39:07 UTC (rev 5662)
@@ -115,6 +115,7 @@
t/body-start.sh \
t/end-of-line.sh \
t/last-no-history.sh \
+ t/split-file-menu.sh \
t/index.sh \
t/index-apropos.sh \
t/split-index.sh \
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2014-06-13 11:53:48 UTC (rev 5661)
+++ trunk/info/info.c 2014-06-13 12:39:07 UTC (rev 5662)
@@ -380,8 +380,10 @@
argv += argc; argc = 0;
free (ref_list[0]);
- ref_list[0] = info_new_reference (node_via_menus->filename,
+ ref_list[0] = info_new_reference (node_via_menus->parent,
node_via_menus->nodename);
+ if (!ref_list[0]->filename) /* Not a split file. */
+ ref_list[0]->filename = node_via_menus->filename;
free (node_via_menus);
}
@@ -435,6 +437,8 @@
free (ref_list[0]);
ref_list[0] = info_new_reference (node_via_menus->filename,
node_via_menus->nodename);
+ if (!ref_list[0]->filename) /* Not a split file. */
+ ref_list[0]->filename = node_via_menus->filename;
free (node_via_menus);
}
}
Added: trunk/info/t/back-to-top.drib
===================================================================
--- trunk/info/t/back-to-top.drib (rev 0)
+++ trunk/info/t/back-to-top.drib 2014-06-13 12:39:07 UTC (rev 5662)
@@ -0,0 +1 @@
+tDq
\ No newline at end of file
Added: trunk/info/t/split-file-menu.sh
===================================================================
--- trunk/info/t/split-file-menu.sh (rev 0)
+++ trunk/info/t/split-file-menu.sh 2014-06-13 12:39:07 UTC (rev 5662)
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (C) 2014 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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-intera.inc
+
+# Follow a menu entry in a split file to a node in a different subfile from
+# the one containing "Top". Check that we arrived properly and remembered
+# that we are in a split file by going back to "Top" with "t".
+$GINFO -f split 'Second' --restore $t/back-to-top.drib
+
+if ! test -f $GINFO_OUTPUT
+then
+ RETVAL=1
+else
+ grep 'Node: Top' $GINFO_OUTPUT
+ RETVAL=$?
+fi
+
+. $t/Cleanup.inc
Property changes on: trunk/info/t/split-file-menu.sh
___________________________________________________________________
Added: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5662] follow menus from command-line for split files properly,
Gavin D. Smith <=