[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5537] check if no references in node
From: |
Gavin D. Smith |
Subject: |
[5537] check if no references in node |
Date: |
Fri, 09 May 2014 00:18:38 +0000 |
Revision: 5537
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5537
Author: gavin
Date: 2014-05-09 00:18:37 +0000 (Fri, 09 May 2014)
Log Message:
-----------
check if no references in node
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-05-08 22:58:31 UTC (rev 5536)
+++ trunk/ChangeLog 2014-05-09 00:18:37 UTC (rev 5537)
@@ -1,5 +1,12 @@
2014-05-08 Gavin Smith <address@hidden>
+ * info/session.c (select_menu_digit): Return null if no menu.
+ (info_menu_digit): Check if references field of node is null.
+ (info_menu_or_ref_item): Abort if no references.
+ (info_menu_item): Print error message if no references.
+
+2014-05-08 Gavin Smith <address@hidden>
+
* info/session.c (initialize_terminal_and_keymaps): Don't quit if
terminal is dumb, because we might not be running interactively.
(initialize_info_session): Quit if terminal is dumb.
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-05-08 22:58:31 UTC (rev 5536)
+++ trunk/info/session.c 2014-05-09 00:18:37 UTC (rev 5537)
@@ -2269,7 +2269,7 @@
if (!menu)
{
info_error ("%s", msg_no_menu_node);
- return;
+ return 0;
}
/* We have the menu. See if there are this many items in it. */
@@ -2305,6 +2305,13 @@
{
int item = key - '0';
REFERENCE *entry;
+
+ if (!window->node->references)
+ {
+ info_error ("%s", msg_no_menu_node);
+ return;
+ }
+
if (entry = select_menu_digit (window, key))
{
info_select_reference (window, entry);
@@ -2362,6 +2369,10 @@
int which, closest = -1;
reference_bool_fn exclude;
+
+ if (!refs)
+ return;
+
if (menu_item && !xref)
{
exclude = &exclude_cross_references;
@@ -2535,6 +2546,12 @@
and select that item. */
DECLARE_INFO_COMMAND (info_menu_item, _("Read a menu item and select its
node"))
{
+ if (!window->node->references)
+ {
+ info_error ("%s", msg_no_menu_node);
+ return;
+ }
+
info_menu_or_ref_item (window, key, 1, 0, 1);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5537] check if no references in node,
Gavin D. Smith <=