|
From: | Lorenzo Bettini |
Subject: | Re: [help-gengetopt] Non alphabetic characters as options ? |
Date: | Wed, 28 Nov 2007 09:29:37 +0100 |
User-agent: | Thunderbird 2.0.0.6 (X11/20071022) |
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 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?
-- 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] |