patchidutils - Patches: patch #4941, eid /xxx search not working

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4941: eid /xxx search not working

Submitted by:  Bruce Edge <bruce_edge>
Submitted on:  Tue 28 Feb 2006 11:29:40 PM UTC  
 
Category:  None Priority:  5 - Normal
Status:  Need Info Privacy:  Public
Assigned to:  Claudio Fontana <sick_soul> Open/Closed:  Open

Wed 01 Mar 2006 11:07:08 PM UTC, comment #1:

Hello Bruce,
thanks for your report.

Could you give a more detailed example of what you expect,
and what you obtain instead?

It would also help if you try with the latest release (4.0)
available on
http://ftp.gnu.org/gnu/idutils/

or with the current CVS code (see savannah CVS page for instructions).

I've tried some lid -R edit with / and it works for me.
Could you also share the value of your VISUAL and EDITOR environment variables if any?

Thanks

CLaudio

Claudio Fontana <sick_soul>In charge of this item.
Tue 28 Feb 2006 11:29:40 PM UTC, original submission:

Running eid <var>, then using "/xxx" to skip to the first match of xxx in the file list is not working.
There's something wrong with the strcasestr loop. I unrolled it and it works fine now.
This patch is against 3.2.d source pulled down from ubuntu.

-Bruce

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

Bruce Edge <bruce_edge>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
Wed 01 Mar 2006 11:07:08 PM UTC sick_soul StatusNone => Need Info
    Assigned toNone => sick_soul

Back to the top


Powered by Savane 3.3