From owner-cvs-all Thu Jun 24 2: 4:53 1999 Delivered-To: cvs-all@freebsd.org Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.26.10.9]) by hub.freebsd.org (Postfix) with ESMTP id 96DE8156A6; Thu, 24 Jun 1999 02:04:37 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id TAA06671; Thu, 24 Jun 1999 19:04:36 +1000 Date: Thu, 24 Jun 1999 19:04:36 +1000 From: Bruce Evans Message-Id: <199906240904.TAA06671@godzilla.zeta.org.au> To: bde@zeta.org.au, hm@hcs.de Subject: Re: getopt -? illegal ? (was: cvs commit: src/usr.sbin/i4b/isdnd main.c ..) Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, imp@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> "-?" 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