misc bb_getopt_ulflags() questions
Tito
farmatito at tiscali.it
Tue Feb 21 00:06:00 UTC 2006
On Monday 20 February 2006 23:53, Mike Frysinger wrote:
> i'm struggling with the "english" in the comments in getopt_ulflags.c ... for
> example, this bit:
> "--" A double dash as the first char in a bb_opt_complementally group
> means make first argv[1] as option always as may be added -, special
> for "ar" and "tar" applets.
>
> does that mean if i use "--" at the beginning of bb_opt_complementally, then
> argv[1] will be parsed as options even if it doesnt start with a - ? the
> idea being we want to support this syntax:
> tar xvf foo.tar
> instead of forcing this syntax:
> tar -xvf foo.tar
Yes...
> next up, what does "complementally" mean ? is that a misspelling and the
> variable should really be called "bb_opt_complementary" ?
This is a Russian to English genetic modified word translation (Vodz told me
when i reviewed the doc in getopt_ulflags.c).
You can think about it as "bb_opt_complementary" but please
don't change it 'cause i like it.... ;-)
> finally, and the reason i'm actually writing this e-mail, is there a way to
> get bb_getopt_ulflags() to stop processing as soon as it encounters a
> non-option ? i want to support this syntax:
> applet [applet options] program_to_exec [program options]
> because forcing the user to add a "--" before program_to_exec is wrong
No, there is not, probably you have to do your own option
parsing....
Ciao,
Tito
> -mike
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list