[PATCH v2] Improve support for long options to grep

Xabier Oneca -- xOneca xoneca at gmail.com
Wed Jan 26 18:38:05 UTC 2022


Hi Walter,

> There is also unnecessary duplication of source code.
> >
> > Just use a #define and C string concatenation to add the extra
> > long option strings.
>
> Yes, I totally agree you. However I used this approach since a previous
> patch I submitted was rewritten in this way [1] when applying to master.
>
>
Maybe a better approach is to always use getopt32long, as it is converted
to getopt32 if LONG_OPTS is not enabled. Maybe Denys forgot about this.
See libbb.h: https://git.busybox.net/busybox/tree/include/libbb.h#n1351

Cheers,

Xabier Oneca_,,_
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20220126/cbd9143d/attachment.html>


More information about the busybox mailing list