From owner-cvs-all Wed Jun 23 11:16:17 1999 Delivered-To: cvs-all@freebsd.org Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (Postfix) with ESMTP id D8E7214FAF; Wed, 23 Jun 1999 11:16:02 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.9.3/8.9.1) id LAA39564; Wed, 23 Jun 1999 11:19:13 -0700 (PDT) (envelope-from sgk) From: Steve Kargl Message-Id: <199906231819.LAA39564@troutmask.apl.washington.edu> Subject: Re: cvs commit: src/usr.sbin/pkg_install/add main.c src/usr.sbin/pkg_install/create main.c src/usr.sbin/pkg_install/dele In-Reply-To: from Bill Fumerola at "Jun 23, 1999 01:25:39 pm" To: billf@jade.chc-chimes.com (Bill Fumerola) Date: Wed, 23 Jun 1999 11:19:13 -0700 (PDT) Cc: billf@FreeBSD.ORG (Bill Fumerola), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Bill Fumerola wrote: > On Wed, 23 Jun 1999, Steve Kargl wrote: > > > Bill Fumerola wrote: > > > billf 1999/06/23 09:54:39 PDT > > > > > > Modified files: > > > usr.sbin/pkg_install/add main.c > > > usr.sbin/pkg_install/create main.c > > > usr.sbin/pkg_install/delete main.c > > > usr.sbin/pkg_install/info main.c > > > Log: > > > If we are going to have a case for '?' then we should define it in Options. > > > > > > > getopt(3) returns '?' for any character not contained in optarg. > > Thus, "case '?':" is a catch-all, and '?' does not (should not?) > > be defined in Options. > > If you run pkg_add -? it will return a 'bad option, blah blah blah.' > [Note I need to escape ? in tcsh] troutmask:kargl[237] pkg_add -\? pkg_add: illegal option -- ? usage: pkg_add [-vInrfRMS] [-t template] [-p prefix] pkg-name [pkg-name ...] Looks fine to me except the -h option is not included in the usage message. If you don't like the error message, then see the DIAGNOSTICS section of getopt(3) and set opterr appropriately. -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message