here is setterm and a gratituos question
Tito
farmatito at tiscali.it
Sun Sep 4 20:38:49 UTC 2005
On Sunday 04 September 2005 21:56, Lord Sidiuz wrote:
snip
> what i have in mind is something like:
>
> while ( (opt = my_get_opt( argc, argv )) != -1 ) {
>
> switch ( opt ){
>
> case 215: //this is total for 'f'+'o'+'r'+'e'+'g'+'r'+'o'+'u'+'n'+'d'
> i++ ;
> loco= i+j ;
> gnsdkgn;
> sfdhfht();
> etc;
>
> case 232: //this is total for 'b'+'a'+'c'+'k'+'g'+'r'+'o'+'u'+'n'+'d'
> i++ ;
> loco= i+j ;
> gnsdkgn;
> sfdhfht();
> etc;
> }
>
> }
>
> i don't like to compare two strings so this does the same job but no
> strings are declared for compare later and i think is more eficient.
>
> but this has some bad things, i think it is not portable, it depends
> on the machine using ascii and two strings can have the same total
>
> what's your opinion??
Hi,
take a look at the comments in:
/busybox/libbb/getopt_ulflags.c
Ciao,
Tito
More information about the busybox
mailing list