On 12 October 2018 16:08:04 CEST, Brandon Enochs <[email protected]> 
wrote:
>OK, I've addressed all of your comments except for my usage of
>getopt32.
>How do I set it up so that -K can only appear if -k appears?

See libbb/getopt32.c
--8<--

"a?b" A "?" between an option and a group of options means that at least one of 
them is required to occur if the first option occurs in preceding command line 
arguments. For example from "id" applet: // Don't allow -n -r -rn -ug -rug -nug 
-rnug flags = getopt32(argv, "^rnug""\0""r?ug:n?ug:u--g:g--u"); This example 
allowed only: $ id; id -u; id -g; id -ru; id -nu; id -rg; id -ng; id -rnu; id 
-rng
--8<--

Was the memcpy+xstrdup better than the individual stores? Which version of gcc 
did you try?

TIA,
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to