[BusyBox] calling getopt() centrally

Russ Dill Russ.Dill at asu.edu
Wed Dec 18 11:55:03 UTC 2002


> My idea:
> All applet use small count options. 'ls' applet have many
> options, but original GNU 'ls' use ~45 options.
> So... We can using 64 bit flags.
> For each applet making macros:
> example mkdir getopt(m:p")
> 
> 
> applets.h:
> 
> const char **applet_opts;	/* opts args */
> long long opts_setted;		/* 64 bits flags */
> 

I would steer away from using a long long, you could use two longs, one
for [a-z] and the other for [A-Z]. Alternatively, you could set 52
globals, opt_[a-z], opt_[A-Z]

-- 
Russ Dill <Russ.Dill at asu.edu>




More information about the busybox mailing list