eid prompt /<regexp> functionality broken

Bug #52655 reported by Bruce Edge
4
Affects Status Importance Assigned to Milestone
id-utils (Debian)
Fix Released
Unknown
id-utils (Ubuntu)
Fix Released
Low
MOTU

Bug Description

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;
 }

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Forwarded to Debian ... Thanks for reporting this.

Changed in id-utils:
status: Unknown → Unconfirmed
Revision history for this message
Vassilis Pandis (pandisv) wrote :

Is this your own patch or taken from upstream ? If you wrote it, we could forward it upstream as they'll surely be interested in it ...

Changed in id-utils:
assignee: nobody → motu
Revision history for this message
Bruce Edge (bruce-edge) wrote : Re: [Bug 52655] Re: eid prompt /<regexp> functionality broken

It's mine.

Thanks, Bruce

On 9/8/06, Vassilis Pandis <email address hidden> wrote:
>
> Is this your own patch or taken from upstream ? If you wrote it, we
> could forward it upstream as they'll surely be interested in it ...
>
> --
> eid prompt /<regexp> functionality broken
> https://launchpad.net/bugs/52655
>

Changed in id-utils:
status: Unconfirmed → Fix Released
Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Do you still have this issue with the latest stable release of Ubuntu ?

Changed in id-utils:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Bruce Edge (bruce-edge) wrote :

Unfortunatey, yes:

0 %> eid STATUS_OK
STATUS_OK ../../Common/Include/ssp_errno.h
../../SAC/PTSac/soap/PAMAuth.h
../../Apps/SOAP/{authMgr,soapUtil,soapXML}.cpp
../../SAC/PTSac/soap/PAMAuth.cpp
edit? [y1-9^S/nq] /Auth
edit? [y1-9^S/nq] /PAMA
edit? [y1-9^S/nq]

On 7/3/07, Jérôme Guelfucci <email address hidden> wrote:
>
> Do you still have this issue with the latest stable release of Ubuntu ?
>
> ** Changed in: id-utils (Ubuntu)
> Importance: Undecided => Low
> Status: New => Incomplete
>
> --
> eid prompt /<regexp> functionality broken
> https://bugs.launchpad.net/bugs/52655
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

This should be fixed in Gutsy.

Changed in id-utils:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.