From owner-cvs-all Thu Jun 24 0:28:16 1999 Delivered-To: cvs-all@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 4B81E14CEB; Thu, 24 Jun 1999 00:28:07 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id QAA25275; Thu, 24 Jun 1999 16:58:05 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id QAA00608; Thu, 24 Jun 1999 16:57:51 +0930 (CST) Date: Thu, 24 Jun 1999 16:57:47 +0930 From: Greg Lehey To: Warner Losh Cc: hm@hcs.de, 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: <19990624165747.A427@freebie.lemis.com> References: <199906240719.BAA36122@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199906240719.BAA36122@harmony.village.org>; from Warner Losh on Thu, Jun 24, 1999 at 01:19:57AM -0600 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Thursday, 24 June 1999 at 1:19:57 -0600, Warner Losh wrote: > In message 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. It seems to me that -? is a dangerous flag. Consider: echo rm -? touch ./-f echo rm -? Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message