|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Non alphabetic characters as options ?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 1 -- John Darrington jmd@... University of Western Australia http://www.csse.uwa.edu.au/~jmd PhD Candidate +61 8 6488 4775 _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: Non alphabetic characters as options ?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 1 Hi 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? -- 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 Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: Non alphabetic characters as options ?I think I solved this issue; I'll provide you with a release candidate
as soon as possible. cheers Lorenzo 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 1 > > Hi 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? > -- 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 Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
|
|
Re: Non alphabetic characters as options ?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 1 > > Hi 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 options I'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 _______________________________________________ Help-gengetopt mailing list Help-gengetopt@... http://lists.gnu.org/mailman/listinfo/help-gengetopt |
| Free embeddable forum powered by Nabble | Forum Help |