[Top][All Lists]

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

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

From: Lorenzo Bettini
Subject: Re: [help-gengetopt] accept option arguments (even in enum)
Date: Fri, 31 Jul 2009 09:47:31 +0200
User-agent: Thunderbird (X11/20090608)

Papp Gyozo (VBuster) wrote:
Hi there,

long time was passing by since my last mail. It actually means the current 
version suffices our needs quite very well. Actually it is a good piece of 
work! Congratulation.

thanks a lot!
this kind of emails always makes me happy :-)

Now we have run into a problem. gengetopt denies special characters (ie. 
symbols like '-' or '+') in enum option values and in default values as well 

We would like to have a filter option which filters out/in the specified type 
of records. We thought it was quite natural to do it in the following way:

option "filter" f "include or exclude the given type in case of leading '-' or '+', respectively."
    multiple enum

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:


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?


Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)

reply via email to

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