Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 1999 01:19:57 -0600
From:      Warner Losh <imp@harmony.village.org>
To:        hm@hcs.de
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/i4b/isdnd main.c src/usr.sbin/i4b/isdndebug main.c src/usr.sbin/i4b/isdndecode main.c src/usr.s 
Message-ID:  <199906240719.BAA36122@harmony.village.org>
In-Reply-To: Your message of "Thu, 24 Jun 1999 08:48:24 %2B0200." <m10x3JA-0000fPC@hcswork.hcs.de> 
References:  <m10x3JA-0000fPC@hcswork.hcs.de>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <m10x3JA-0000fPC@hcswork.hcs.de> Hellmuth Michaelis writes:
: Including '?' in the getopt options string is intentional, because - last
: time i checked - using "programname -?" produces an output, where getopt
: says that "-?" is an invalid option. This is IMHO false in that "-?" is
: a valid option to display the usage string(s).

I'm not sure I agree with that completely.  '?' is never used in BSD
4.4-lite sources (as far as I recall), but the 4.4-lite files also
compared against EOF rather than -1.  '?' is a special character to
getopt.  Users of getopt have no way of knowing if the user typed '?'
or some other character, since getopt maps unknown characters to '?'.
Since '?' is a special character, I don't have a problem adding it to
the list of characters that are treated specially.  Right now ':' is
treated specially in getopt's error reporting.  This is a deviation
form the documentation, so there is precidence for treating ?
specially.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906240719.BAA36122>