Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 1999 19:04:36 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, hm@hcs.de
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, imp@FreeBSD.org
Subject:   Re: getopt -? illegal ? (was: cvs commit: src/usr.sbin/i4b/isdnd main.c ..)
Message-ID:  <199906240904.TAA06671@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> "-?" is an invalid option that can be (ab)used to display the usage
>> message.  It is clearly invalid for the i4b programs because none of the
>> i4b man pages document it :-).  Documenting it in all man pages wouldn't
>> be useful.
>> 
>> getopt actually says that "-?" is an illegal option.
>
>Since the very first days i learned Unix, i was - and i still am - under the
>impression that running a program with -? produces a usage message.

-? normally produces an invalid option, and all invalid options should
produce a usage message.  All cases are normally handled by a
`default: usage();' case in the switch on the value returned by getopt().

Bruce


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?199906240904.TAA06671>