help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt] accept option arguments (even in enum)


From: Papp Gyozo (VBuster)
Subject: Re: [help-gengetopt] accept option arguments (even in enum)
Date: Fri, 31 Jul 2009 13:04:47 +0200

Hi,

> > What do you think? gengetopt should enable symbols in enums or should we
> rephrase our idea? Please note that this option is multiple enum, so the
> real strength of this approach that custom mixed filter definitions can be
> described this way:
> > 
> > --filter=+other,-missing
> 
> well I think this would be feasible without any problem!
> My only concern is the literals used for the actual C enum values: + and 
>   - are not valid characters, so these characters should be translated 
> in the C enum...
> 
> something like
> 
> enum { filter_MINUS_UNSPECIFIED, filter_PLUS_OK, ... }
> 
> what do you think?  Or do you have any other suggestion?

It would be ok. My first thought was to simply ignore special characters and 
replace them with an underscore (_) however it would raise the risk of 
ambiguity. MINUS , PLUS (and the others like QUOTE, EXCLAMATION?) would be ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]