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

ibid.ag at gmail.com ibid.ag at gmail.com
Fri Dec 6 09:42:13 PST 2013


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

 1386351733.0


More information about the Toybox mailing list