[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6177] info empty infopath, other fixes
From: |
Gavin D. Smith |
Subject: |
[6177] info empty infopath, other fixes |
Date: |
Wed, 04 Mar 2015 12:12:19 +0000 |
Revision: 6177
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6177
Author: gavin
Date: 2015-03-04 12:12:18 +0000 (Wed, 04 Mar 2015)
Log Message:
-----------
info empty infopath, other fixes
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/info-utils.c
trunk/info/infopath.c
trunk/info/session.c
Added Paths:
-----------
trunk/info/t/empty-infopath.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-03-03 17:21:23 UTC (rev 6176)
+++ trunk/ChangeLog 2015-03-04 12:12:18 UTC (rev 6177)
@@ -1,3 +1,15 @@
+2015-03-04 Gavin Smith <address@hidden>
+
+ * info/info-utils.c (parse_top_node_line): Check for labels
+ case-insensitively, as was done before.
+ (scan_reference_target): Allow a tab to terminate a node name in
+ a menu entry.
+ * info/infopath.c (infopath_next): Handle case when the search
+ path is empty.
+ * info/session.c (info_select_reference): Default to "Top" in
+ error message if node couldn't be loaded.
+ * into/t/empty-infopath.sh: New test.
+
2015-03-03 Gavin Smith <address@hidden>
* info/t/Init-test.inc: Trap SIGINT.
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2015-03-03 17:21:23 UTC (rev 6176)
+++ trunk/info/Makefile.am 2015-03-04 12:12:18 UTC (rev 6177)
@@ -137,6 +137,7 @@
t/index-completing.sh \
t/split-index.sh \
t/index-long-nodeline.sh \
+ t/empty-infopath.sh \
t/menu-sequence.sh \
t/relative-reference.sh \
t/resize-in-completions.sh \
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2015-03-03 17:21:23 UTC (rev 6176)
+++ trunk/info/info-utils.c 2015-03-04 12:12:18 UTC (rev 6177)
@@ -1123,27 +1123,27 @@
skip_input (skip_whitespace (inptr));
/* Check what field we are looking at */
- if (!strncmp (inptr, INFO_FILE_LABEL, strlen(INFO_FILE_LABEL)))
+ if (!strncasecmp (inptr, INFO_FILE_LABEL, strlen(INFO_FILE_LABEL)))
{
skip_input (strlen(INFO_FILE_LABEL));
store_in = &dummy;
}
- else if (!strncmp (inptr, INFO_NODE_LABEL, strlen(INFO_NODE_LABEL)))
+ else if (!strncasecmp (inptr, INFO_NODE_LABEL, strlen(INFO_NODE_LABEL)))
{
skip_input (strlen(INFO_NODE_LABEL));
store_in = &dummy;
}
- else if (!strncmp (inptr, INFO_PREV_LABEL, strlen(INFO_PREV_LABEL)))
+ else if (!strncasecmp (inptr, INFO_PREV_LABEL, strlen(INFO_PREV_LABEL)))
{
skip_input (strlen(INFO_PREV_LABEL));
store_in = &node->prev;
}
- else if (!strncmp (inptr, INFO_NEXT_LABEL, strlen(INFO_NEXT_LABEL)))
+ else if (!strncasecmp (inptr, INFO_NEXT_LABEL, strlen(INFO_NEXT_LABEL)))
{
skip_input (strlen(INFO_NEXT_LABEL));
store_in = &node->next;
}
- else if (!strncmp (inptr, INFO_UP_LABEL, strlen(INFO_UP_LABEL)))
+ else if (!strncasecmp (inptr, INFO_UP_LABEL, strlen(INFO_UP_LABEL)))
{
skip_input (strlen(INFO_UP_LABEL));
store_in = &node->up;
@@ -1477,12 +1477,13 @@
int line_len;
int length = 0; /* Length of specification */
- length = skip_whitespace (inptr);
+ length = strspn (inptr, " ");
length += read_bracketed_filename (inptr + length, &entry->filename);
length += skip_whitespace (inptr + length);
/* Get the node name. */
- length += read_quoted_string (inptr + length, ",.", 2, &entry->nodename);
+ length += read_quoted_string (inptr + length, ",.\t\n", 2,
+ &entry->nodename);
if (inptr[length] == '.') /* A '.' terminating the entry. */
length++;
Modified: trunk/info/infopath.c
===================================================================
--- trunk/info/infopath.c 2015-03-03 17:21:23 UTC (rev 6176)
+++ trunk/info/infopath.c 2015-03-04 12:12:18 UTC (rev 6177)
@@ -2,7 +2,7 @@
$Id$
Copyright 1993, 1997, 1998, 2000, 2002, 2003, 2004, 2007, 2008, 2009, 2011,
- 2012, 2013, 2014 Free Software Foundation, Inc.
+ 2012, 2013, 2014, 2015 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
@@ -217,7 +217,11 @@
char *
infopath_next (int *idx)
{
- INFO_DIR *entry = infodirs[(*idx)++];
+ INFO_DIR *entry;
+
+ if (!infodirs)
+ return 0;
+ entry = infodirs[(*idx)++];
if (!entry)
return 0;
return entry->name;
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2015-03-03 17:21:23 UTC (rev 6176)
+++ trunk/info/session.c 2015-03-04 12:12:18 UTC (rev 6177)
@@ -2,7 +2,7 @@
$Id$
Copyright 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2007, 2008, 2009, 2011, 2012, 2013, 2014
+ 2004, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -2016,7 +2016,8 @@
free (file_system_error);
}
else
- info_error (msg_cant_find_node, entry->nodename);
+ info_error (msg_cant_find_node,
+ entry->nodename ? entry->nodename : "Top");
return 0;
}
Added: trunk/info/t/empty-infopath.sh
===================================================================
--- trunk/info/t/empty-infopath.sh (rev 0)
+++ trunk/info/t/empty-infopath.sh 2015-03-04 12:12:18 UTC (rev 6177)
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Copyright (C) 2015 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
+. $srcdir/t/Init-inter.inc
+
+# Check that an empty search path doesn't break. There are no search
+# directories here because infopath-no-defaults=On in
+# info/t/Infokey-config.
+export INFOPATH=
+run_ginfo
+printf q >$PTY_TYPE
+. $t/Timeout-test.inc
+
+cleanup
+
Property changes on: trunk/info/t/empty-infopath.sh
___________________________________________________________________
Added: svn:executable
+ *
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6177] info empty infopath, other fixes,
Gavin D. Smith <=