[Top][All Lists]

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

[bug-grep] [patch #3797] grep restructure patch

From: Claudio Fontana
Subject: [bug-grep] [patch #3797] grep restructure patch
Date: Mon, 7 Mar 2005 13:41:07 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.10


                 Summary: grep restructure patch
                 Project: grep
            Submitted by: sick_soul
            Submitted on: Mon 03/07/2005 at 13:41
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open



These changes aim at making grep more maintenable for the future, and
avoiding bugs resulting from design problems.

Main focuses of this patch:

- create grep prioritized actions
- move all option handling and data to a separate module
- restructure grep actions and recursion
  and collapse exit points.


- This patch assumes that lib/posix/regex.h and src/search.c
  have already been fixed using "grep-2.5.1-oi.patch"
  available from RedHat


  (why isn't it available in patches section?)

  Otherwise, incorrect (output) results can result from the
  new prline implementation in some cases.

Side effects:

- there are currently small aestetic changes in the patch
  which has been asked to be left out. Will revert.

- there is currently an alternative improvement for prline
  in the patch, which partly overlaps with patch #3770.
  This change has been modified to merge improvements in
  both patches. Inclusion of this change is still under


  After applying this patch, your grep.c will look really 
  much better. It will be sensibly shorter and clearer.
  The recursion will be much more understandable (still
  there can be much more improvement), and options won't
  haunt the reader, because of the nice separation.
  Also the drastic separation between option processing
  phase and grep actions helps readability now, and should
  make future new features easier to implement.

Additional help wanted:

- Please help me understand the code fragment that (after
  patch) results in grep.c:grep_stdin() in the if (1) block.



This item URL is:


  Message sent via/by Savannah

reply via email to

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