bug-grep
[Top][All Lists]
Advanced

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

[patch #4280] grep -oi patch: regexps need not be all in lowercase for -


From: anonymous
Subject: [patch #4280] grep -oi patch: regexps need not be all in lowercase for -oi to work
Date: Sun, 7 Aug 2005 12:19:02 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.50215)

URL:
  <http://savannah.gnu.org/patch/?func=detailitem&item_id=4280>

                 Summary: grep -oi patch: regexps need not be all in lowercase
for -oi to work
                 Project: grep
            Submitted by: None
            Submitted on: Sun 08/07/2005 at 12:19
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?func=detailitem&item_id=4280>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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