Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 1999 11:19:13 -0700 (PDT)
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        billf@jade.chc-chimes.com (Bill Fumerola)
Cc:        billf@FreeBSD.ORG (Bill Fumerola), cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
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
Message-ID:  <199906231819.LAA39564@troutmask.apl.washington.edu>
In-Reply-To: <Pine.BSF.3.96.990623132509.9256H-100000@jade.chc-chimes.com> from Bill Fumerola at "Jun 23, 1999 01:25:39 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




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