Public bug reported:

Binary package hint: id-utils

$> eid MAX_NUM_DEVICE_EEPROM
MAX_NUM_DEVICE_EEPROM ../dev_common_defines.h ../dev_test_eeprom_impl.c
edit? [y1-9^S/nq] /test
edit? [y1-9^S/nq] /dev
edit? [y1-9^S/nq] q

The above "/test" should have opened vi on dev_test_eeprom_impl.c
The "/dev" should have opened the first file.
The "/" syntax stated that it will edit the first file that matches the 
following regex.
Instead it just re-issues the prompt.
This has been broken a long time in debian and ubuntu.

Here's a patch:

--- src/lid.c.orig      2006-02-28 15:06:27.000000000 -0800
+++ src/lid.c   2006-02-28 15:14:11.000000000 -0800
@@ -1069,11 +1069,18 @@
   char const *s1p;
   char const *s2p;
   char const *s1last;
+  char a, b;

-  for (s1last = &s1[strlen (s1) - strlen (s2)]; s1 <= s1last; s1++)
-    for (s1p = s1, s2p = s2; TOLOWER (*s1p) == TOLOWER (*s2p); s1p++)
-      if (*++s2p == '\0')
-       return (char *) s1;
+  for (s1last = &s1[strlen (s1) - strlen (s2)]; s1 <= s1last; s1++) {
+    s1p = s1;
+    s2p = s2;
+    for (a = TOLOWER(*s1p), b = TOLOWER(*s2p); a == b; s1p++) {
+        a = TOLOWER(*s1p);
+        b = TOLOWER(*s2p);
+       if (*++s2p == '\0')
+                       return (char *) s1;
+       }
+  }
   return 0;
 }

** Affects: id-utils (Ubuntu)
     Importance: Untriaged
     Assignee: MOTU
         Status: Unconfirmed
** Affects: id-utils (Debian)
     Importance: Unknown
         Status: Unconfirmed

-- 
eid prompt /<regexp> functionality broken
https://launchpad.net/bugs/52655

-- 
universe-bugs mailing list
universe-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/universe-bugs

Reply via email to