portability touch-up (and ~15k size-savings)
Rob Landley
rob at landley.net
Fri May 26 22:46:43 UTC 2006
On Thursday 25 May 2006 3:40 pm, Rich Felker wrote:
> BTW about getopt_long... it might be worth dropping getopt entirely
> and making a lightweight libbb function for handling options (both
> short and long).
A fresh implementation of bb_getopt_ulflags() that doesn't use getopt at all
would be nice. I'd be especially like it if _this_ one can handle
tar xfjCv tarball.tbz dirname . without think that the tarball name I want is
"jCv" and that I want to put "tarball.tbz", "dirname", and "." in it...
Of course it depends on whether or not it actually saves size...
> The bloated GNU permutation thing is only needed if
> the calling app wants to use the standard getopt loop idiom for
> command line parsing; without that requirement the code could probably
> be much smaller and still duplicate the commandline semantics.
And not screw up the command line. See watch.c line 40, for example...
> Rich
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list