Hi

Gyozo, you'll be happy to hear that options with values can now be given enum type :-)

here's an initial release

http://rap.dsi.unifi.it/~bettini/gengetopt-2.22b.tar.gz

and, of course, it's also in the CVS

see the documentation for details

actually, the implementation was quite easy, but it relies on enums being treated as int; does any of you know whether this is safe? I don't get warnings in compilation, thus I assumed it is safe to do so.

Notice that the option field has an enum type

Basically, when assigning the argument to such an option, I actually assign it the index of the value found in the array of strings containing the accepted values; this relies on the fact that the first enum value is always 0.

I hope to get some feedback soon
cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt

Reply via email to