[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5613] invocation inexact index lookup
From: |
Gavin D. Smith |
Subject: |
[5613] invocation inexact index lookup |
Date: |
Thu, 29 May 2014 19:56:36 +0000 |
Revision: 5613
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5613
Author: gavin
Date: 2014-05-29 19:56:34 +0000 (Thu, 29 May 2014)
Log Message:
-----------
invocation inexact index lookup
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/info.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-05-29 01:51:37 UTC (rev 5612)
+++ trunk/ChangeLog 2014-05-29 19:56:34 UTC (rev 5613)
@@ -1,3 +1,8 @@
+2014-05-29 Gavin Smith <address@hidden>
+
+ * info/info.c (add_initial_nodes) <index lookup>: Look for
+ case-ignoring initial substring in indices if no exact match found.
+
2014-05-28 Gavin Smith <address@hidden>
* info/session.c (point_next_line, point_prev_line): Check for
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2014-05-29 01:51:37 UTC (rev 5612)
+++ trunk/info/info.c 2014-05-29 19:56:34 UTC (rev 5613)
@@ -396,6 +396,8 @@
REFERENCE **index;
REFERENCE **index_ptr;
+ REFERENCE *nearest = 0;
+
debug (3, ("looking in indices"));
index = info_indices_of_file_buffer (initial_file);
@@ -403,14 +405,23 @@
{
if (!strcmp (argv[0], (*index_ptr)->label))
{
- argv += argc; argc = 0;
- free (*error); *error = 0;
-
- free (ref_list[0]);
- ref_list[0] = info_copy_reference (*index_ptr);
+ nearest = *index_ptr;
break;
}
+ /* Case-insensitive initial substring. */
+ if (!nearest && !mbsncasecmp (argv[0], (*index_ptr)->label,
+ mbslen (argv[0])))
+ nearest = *index_ptr;
}
+
+ if (nearest)
+ {
+ argv += argc; argc = 0;
+ free (*error); *error = 0;
+
+ free (ref_list[0]);
+ ref_list[0] = info_copy_reference (nearest);
+ }
}
/* If there are arguments remaining, follow menus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5613] invocation inexact index lookup,
Gavin D. Smith <=