texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Gavin D. Smith
Date: Tue, 21 Dec 2021 13:36:46 -0500 (EST)

branch: master
commit d898c55124160bbfed05e3126590fd1d7d53a0df
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Dec 21 18:36:33 2021 +0000

    * install-info/install-info.c (extract_menu_file_name):
    Remove unused.  Report from Brendan O'Dea <bod@debian.org>.
---
 ChangeLog                   |  7 ++++++-
 install-info/install-info.c | 42 ------------------------------------------
 2 files changed, 6 insertions(+), 43 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6baf098..c0ba835 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2021-12-05  Alfred M. Szmidt  <ams@gnu.org>  (tiny change)
+2021-12-21  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * install-info/install-info.c (extract_menu_file_name):
+       Remove unused.  Report from Brendan O'Dea <bod@debian.org>.
+
+2021-12-21  Alfred M. Szmidt  <ams@gnu.org>  (tiny change)
 
        * doc/texinfo.texi (@code{@@format}): Add example input.
 
diff --git a/install-info/install-info.c b/install-info/install-info.c
index 32868ac..ef61c5a 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -363,48 +363,6 @@ extract_menu_item_name (char *item_text)
   return copy_string (item_text, p - item_text);
 }
 
-/* Given the full text of a menu entry, terminated by null or newline,
-   return just the menu item file (copied).  */
-
-char *
-extract_menu_file_name (char *item_text)
-{
-  char *p = item_text;
-
-  /* If we have text that looks like * ITEM: (FILE)NODE...,
-     extract just FILE.  Otherwise return "(none)".  */
-
-  if (*p == '*')
-    p++;
-  while (*p == ' ')
-    p++;
-
-  /* Skip to and past the colon.  */
-  while (*p && *p != '\n' && *p != ':') p++;
-  if (*p == ':') p++;
-
-  /* Skip past the open-paren.  */
-  while (1)
-    {
-      if (*p == '(')
-        break;
-      else if (*p == ' ' || *p == '\t')
-        p++;
-      else
-        return "(none)";
-    }
-  p++;
-
-  item_text = p;
-
-  /* File name ends just before the close-paren.  */
-  while (*p && *p != '\n' && *p != ')') p++;
-  if (*p != ')')
-    return "(none)";
-
-  return copy_string (item_text, p - item_text);
-}
-
 
 
 /* Return FNAME with any [.info][.gz] suffix removed.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]