[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] calling getopt() centrally
From:       Russ Dill <Russ.Dill () asu ! edu>
Date:       2002-12-19 11:52:03
[Download RAW message or body]

> > I would steer away from using a long long, you could use two longs, one
> > for [a-z] and the other for [A-Z]. 
> 
> Current busybox 'ls' applet have 27 options. 
> We can use only 32 bites flag so far for long time ;)
> 

I'm saying that each bit would represent a letter. So you wouldn't need
functions to test whether a bit is set, just a simple macro

(1 << (letter - 'a')) & opt_lowercase
(1 << (letter - 'A')) & opt_uppercase


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic