[texinfo] 01/01: cherrypick upstream svn 7032 to fix case-insensitive info
This is an automated email from the git hooks/post-receive script.
preining pushed a commit to branch master
in repository texinfo.
commit 6904f391f9f007d4cf003394435af5a55dbaf2f8
Author: Norbert Preining <preining@debian.org>
Date: Sat Feb 27 21:22:23 2016 +0900
cherrypick upstream svn 7032 to fix case-insensitive info
---
debian/changelog | 7 +++
debian/patches/series | 1 +
debian/patches/upstream-svn7032-info-match-nocase | 71 +++++++++++++++++++++++
3 files changed, 79 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 3f6a6bc..6707481 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+texinfo (6.1.0.dfsg.1-5) UNRELEASED; urgency=medium
+
+ * cherrypick upstream svn 7032 to fix case-insensitive info
+ lookups (Closes: #815941)
+
+ -- Norbert Preining <preining@debian.org> Sat, 27 Feb 2016 21:22:01 +0900
+
texinfo (6.1.0.dfsg.1-4) unstable; urgency=medium
* cherrypick upstream svn 7031: fix texi2dvi premature exitus
diff --git a/debian/patches/series b/debian/patches/series
index 6e9fe7b..21eb180 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ upstream-svn7021-fix-parsing
upstream-svn7022-fix-ouput
upstream-svn7027-remove-debug-statement
upstream-svn7031-texi2dvi-fix
+upstream-svn7032-info-match-nocase
diff --git a/debian/patches/upstream-svn7032-info-match-nocase b/debian/patches/upstream-svn7032-info-match-nocase
new file mode 100644
index 0000000..974d662
--- /dev/null
+++ b/debian/patches/upstream-svn7032-info-match-nocase
@@ -0,0 +1,71 @@
+cherrypick upstream svn 7032 to fix case-insensitive info lookups (Closes: #815941)
+
+Changelog entry
+ * info/info-utils.c (info_get_menu_entry_by_label): Always check
+ case-insensitively, so that manpages are not preferred to a
+ case-insensitive dir match when invoking. Problem reported by
+ Vincent Lefevre.
+---
+ info/info-utils.c | 37 ++++++++++++-------------------------
+ 1 file changed, 12 insertions(+), 25 deletions(-)
+
+--- texinfo.orig/info/info-utils.c
++++ texinfo/info/info-utils.c
+@@ -215,45 +215,32 @@
+
+ /* Get the entry associated with LABEL in the menu of NODE. Return a
+ pointer to the ENTRY if found, or null. Return value should not
+- be freed by caller. */
++ be freed by caller. If SLOPPY, allow initial matches, like
++ "Buffers" for a LABEL "buffer". */
+ REFERENCE *
+ info_get_menu_entry_by_label (NODE *node, char *label, int sloppy)
+ {
+ register int i;
++ int best_guess = -1;
+ REFERENCE *entry;
+ REFERENCE **references = node->references;
+
+ if (!references)
+ return 0;
+
+- /* First look for an exact match. */
+ for (i = 0; (entry = references[i]); i++)
+ {
+- if (REFERENCE_MENU_ITEM != entry->type) continue;
+- if (strcmp (label, entry->label) == 0)
+- return entry;
++ if (entry->type != REFERENCE_MENU_ITEM)
++ continue;
++ if (mbscasecmp (label, entry->label) == 0)
++ return entry; /* Exact, case-insensitive match. */
++ else if (sloppy && best_guess == -1
++ && (mbsncasecmp (entry->label, label, strlen (label)) == 0))
++ best_guess = i;
+ }
+
+- /* If the item wasn't found, search the list sloppily. Perhaps this
+- user typed "buffer" when they really meant "Buffers". */
+- if (sloppy)
+- {
+- int i;
+- int best_guess = -1;
+-
+- for (i = 0; (entry = references[i]); i++)
+- {
+- if (REFERENCE_MENU_ITEM != entry->type) continue;
+- if (mbscasecmp (label, entry->label) == 0)
+- return entry; /* Exact, case-insensitive match. */
+- else if (best_guess == -1
+- && (mbsncasecmp (entry->label, label, strlen (label)) == 0))
+- best_guess = i;
+- }
+-
+- if (!entry && best_guess != -1)
+- return references[best_guess];
+- }
++ if (sloppy && best_guess != -1)
++ return references[best_guess];
+
+ return 0;
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texinfo.git
Reply to: