On Mon, 23 Dec 2013 21:07:38 -0600 Rob Landley <[email protected]> wrote:
> On 12/06/13 11:42, [email protected] wrote: > > On Fri, Dec 06, 2013 at 06:44:36PM +0530, Ashwini Sharma wrote: > >> Hi Rob, list, > >> > >> _-B_ option support for printing leading context lines, before the > >> match, is added to grep command. > > There are actually three related options: -A, -B, and -C. After, > Before, and Context (both). If we're going to do one, might as well > do all three. > > > I suppose this is something you use, rather than a feature you > > noticed was not present? > > Almost certainly. > > >> The implementation is based on the queue. Used sys/queue for the > >> purpose. > > > > Please not that way. Would you mind doing it by way of llist/dlist? > > I note that patch does something really similar to this. Maintaining > these kind of line buffers is something we've got code and there > might be some opportunities for code sharing. I'll have to look... This is why I wanted to include sed as one of the various editors I wanted to support in my generic editor code. Less, grep, sed, vi, emacs, etc. all need to deal with line buffers. s/foo/bar/g works in most of the editors, including sed. Lots and lots of common code there. Still on my TODO list to cut it down into easier to digest bits for you, which is like your TODO, it runneth over, several times. -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
signature.asc
Description: PGP signature
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
