patchgrep - Patches: patch #4280, grep -oi patch: regexps need not...

 
 

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

patch #4280: grep -oi patch: regexps need not be all in lowercase for -oi to work

Submitter:  None
Submitted:  Sun 07 Aug 2005 12:19:02 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed

Mon 08 Mar 2010 04:59:55 PM UTC, comment #1: 

Unfortunately it's not so easy. :-)  However, I hope it will be fixed for the next release.

Paolo Bonzini <bonzini>
Sun 07 Aug 2005 12:19:02 PM UTC, original submission:  

It appears that in the current CVS version, -oi works only in the instance where the supplied regular expressions are all in lowercase.  This patch fixes this problem.

In grep.c, precede the line:

(*compile)(keys, keycc);

with:

if (only_matching && match_icase)
{
   char *keys_ptr = keys;
   while (*keys_ptr)
   {
      *keys_ptr = tolower(*keys_ptr);
      keys_ptr++;
   }
}

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-08 bonzini StatusNone Wont Do
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code