[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5560] node names with full stops
From: |
Gavin D. Smith |
Subject: |
[5560] node names with full stops |
Date: |
Mon, 12 May 2014 14:51:50 +0000 |
Revision: 5560
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5560
Author: gavin
Date: 2014-05-12 14:51:49 +0000 (Mon, 12 May 2014)
Log Message:
-----------
node names with full stops
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/info-utils.c
trunk/info/info.c
trunk/info/search.c
trunk/info/session.c
trunk/info/session.h
trunk/info/t/file-node.sh
trunk/info/t/infodir/file-menu.info
Added Paths:
-----------
trunk/info/t/file-node-with-dot.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/ChangeLog 2014-05-12 14:51:49 UTC (rev 5560)
@@ -1,5 +1,18 @@
2014-05-11 Gavin Smith <address@hidden>
+ * info/info-utils.c (info_parse_node): Don't include terminating
+ character in returned length.
+ (scan_reference_target): [preprocess-nodes=On] Hide terminating
+ '.' in a menu entry.
+ * info/search.c: (find_node_in_binding): Don't view '.' as terminating
+ character in nodeline.
+ * info/session.c (dump_node_to_stream): Use PARSE_NODE_VERBATIM
+ as argument to info_get_node.
+ * info/t/file-node-with-dot.sh: New test.
+ * info/t/file-node: Comment updated.
+
+2014-05-11 Gavin Smith <address@hidden>
+
* info/info.c (add_initial_nodes): Discard dir entry from initial
node list if --node was used.
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/Makefile.am 2014-05-12 14:51:49 UTC (rev 5560)
@@ -93,6 +93,7 @@
t/file.sh \
t/file-node.sh \
t/file-nodes.sh \
+ t/file-node-with-dot.sh \
t/file-index.sh \
t/no-file.sh \
t/split.sh \
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/info-utils.c 2014-05-12 14:51:49 UTC (rev 5560)
@@ -144,13 +144,7 @@
/* Parse out nodename. */
nodename_len = read_quoted_string (string, terminator,
&info_parsed_nodename);
- /* If the quoting mechanism was not used, go past the terminating
- character. */
- if (string[nodename_len - 1] != '\177')
- {
- string++;
- length++;
- }
+
string += nodename_len;
length += nodename_len;
@@ -170,7 +164,7 @@
/* Parse ``(line ...)'' part of menus, if any. */
{
- char *rest = string + i;
+ char *rest = string;
/* Advance only if it's not already at end of string. */
if (*rest)
@@ -1197,6 +1191,8 @@
if (found_menu_entry)
{
length = info_parse_node (inptr, PARSE_NODE_DFLT);
+ if (inptr[length] == '.') /* Include a '.' terminating the entry. */
+ length++;
if (in_index)
/* For index nodes, output the destination as well,
@@ -1356,7 +1352,7 @@
char *label = 0;
/* Save offset of "*" starting link. When preprocess_nodes is Off,
- we position the cursor on the * when moving to a link. */
+ we position the cursor on the * when moving between references. */
int start_of_reference;
int colon_offset;
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/info.c 2014-05-12 14:51:49 UTC (rev 5560)
@@ -331,8 +331,7 @@
}
/* If there are arguments remaining, they are the names of menu items
- in sequential info files starting from the first one loaded. Add
- this to the list of nodes specified with --node. */
+ in sequential info files starting from the first one loaded. */
else if (*argv)
{
NODE *initial_node; /* Node to start following menus from. */
Modified: trunk/info/search.c
===================================================================
--- trunk/info/search.c 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/search.c 2014-05-12 14:51:49 UTC (rev 5560)
@@ -628,7 +628,7 @@
tmp_search.start += skip_whitespace (tmp_search.buffer +
tmp_search.start);
nodename_start = tmp_search.buffer + tmp_search.start;
- nodename_len = read_quoted_string (nodename_start, "\n\t,.",
+ nodename_len = read_quoted_string (nodename_start, "\n\t,",
&read_nodename);
if (!read_nodename)
return -1;
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/session.c 2014-05-12 14:51:49 UTC (rev 5560)
@@ -47,7 +47,7 @@
static REFERENCE *select_menu_digit (WINDOW *window, unsigned char key);
-/* Warning! Any change to the order of the commands defined with
+/* Warning! Any change to the order of the commands defined with
DECLARE_INFO_COMMAND in this file results in an incompatible .info
format, and key bindings will be incorrectly assigned until infokey
is rerun. */
@@ -85,7 +85,6 @@
void remember_window_and_node (WINDOW *window, NODE *node);
void forget_window_and_nodes (WINDOW *window);
-void display_startup_message (void);
/* Begin an info session finding the nodes specified by REFERENCES. For
each loaded node, create a new window. Always split the largest of the
@@ -3490,7 +3489,7 @@
register int i;
NODE *node;
- node = info_get_node (filename, nodename, PARSE_NODE_DFLT);
+ node = info_get_node (filename, nodename, PARSE_NODE_VERBATIM);
if (!node)
{
Modified: trunk/info/session.h
===================================================================
--- trunk/info/session.h 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/session.h 2014-05-12 14:51:49 UTC (rev 5560)
@@ -120,6 +120,7 @@
/* Starting an info session. */
extern void begin_multiple_window_info_session (REFERENCE **references,
char *error_msg);
+extern void display_startup_message (void);
extern void info_session (void);
extern void initialize_terminal_and_keymaps (char *init_file);
extern void initialize_info_session (void);
Added: trunk/info/t/file-node-with-dot.sh
===================================================================
--- trunk/info/t/file-node-with-dot.sh (rev 0)
+++ trunk/info/t/file-node-with-dot.sh 2014-05-12 14:51:49 UTC (rev 5560)
@@ -0,0 +1,22 @@
+#!/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/>.
+
+. t/Init-test.inc
+
+# Load a node with a full stop in its name in loaded file using --node.
+
+$GINFO --output - --file file-menu --node Has.dot \
+ | grep 'Node: Has.dot'
Property changes on: trunk/info/t/file-node-with-dot.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/info/t/file-node.sh
===================================================================
--- trunk/info/t/file-node.sh 2014-05-12 13:29:37 UTC (rev 5559)
+++ trunk/info/t/file-node.sh 2014-05-12 14:51:49 UTC (rev 5560)
@@ -16,8 +16,7 @@
. t/Init-test.inc
-# Load a node in loaded file using --node. Note that the file has to specified
-# by --file, and not reached through the dir file.
+# Load a node in loaded file using --node.
$GINFO --output - --file file-menu --node Unreachable \
| grep 'not linked to elsewhere'
Modified: trunk/info/t/infodir/file-menu.info
===================================================================
(Binary files differ)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5560] node names with full stops,
Gavin D. Smith <=