|
From: | Lorenzo Bettini |
Subject: | Re: [help-gengetopt] Non alphabetic characters as options ? |
Date: | Wed, 05 Dec 2007 21:17:08 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.6 (X11/20071009) |
Lorenzo Bettini wrote:
John Darrington wrote:I'm trying to use '?' as a short option character, since I've used -h for other purposes. Unfortunately, this doesn't seem to be allowed. Is there a work around for this? gengetopt:6: syntax error ? gengetopt:6: option "help" ? "Show help information" gengetopt:6: ^ make: *** [cmdline.h] Error 1Hi John It looks like getopt_long uses ? for its own purposes, see the man page: If getopt() does not recognize an option character, it prints an error message to stderr, stores the character in optopt, and returns `?'. The calling program may prevent the error message by setting opterr to 0. so probably, I don't know whether it is possible to do this... any clue anyone?
Hi there sorry for the silence I solved the problem and ? can now be used as character for optionsI've committed the modifications in the CVS or you can find a temporary version here:
http://rap.dsi.unifi.it/~bettini/gengetopt-2.22b.tar.gz look forward to getting feedback :-) 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
[Prev in Thread] | Current Thread | [Next in Thread] |