[Toybox] [Patch] - adding '-B' to grep

Ashwini Sharma ak.ashwini1981 at gmail.com
Mon Dec 9 19:50:26 PST 2013


As suggested modified grep to use dlist instead of sys/queue.h

regards,
Ashwini


On Fri, Dec 6, 2013 at 11:12 PM, <ibid.ag at gmail.com> 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.
>
> I suppose this is something you use, rather than a feature you noticed
> was not present?
>
> > 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 say this because sys/queue.h is not part of POSIX, but rather a BSD
> header (consisting entirely of macros).
> And since it's BSD, it has a 3-clause BSD license.
> So musl does not include this header due to a policy that all headers
> should be public domain, and I imagine that Rob would not like to add a
> 3-clause header that duplicates the llist/dlist code (in llist.c).
>
> > Have a glance at the same.
> >
> > Regards,
> > Ashwini
>
> Thanks,
> Isaac Dunham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131210/9ea81d50/attachment-0005.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grep.c.patch
Type: application/octet-stream
Size: 5102 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20131210/9ea81d50/attachment-0006.obj>


More information about the Toybox mailing list