From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1323 invoked from network); 10 Sep 1999 16:55:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Sep 1999 16:55:04 -0000 Received: (qmail 5754 invoked by alias); 10 Sep 1999 16:54:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7776 Received: (qmail 5747 invoked from network); 10 Sep 1999 16:54:57 -0000 Subject: Re: PATCH: 3.1.6-pws-3: more getopts bugs In-Reply-To: <990910163224.ZM17291@candle.brasslantern.com> from Bart Schaefer at "Sep 10, 1999 4:32:24 pm" To: schaefer@candle.brasslantern.com (Bart Schaefer) Date: Fri, 10 Sep 1999 17:54:51 +0100 (BST) Cc: pws@ifh.de, zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >This also works as expected in 3.0.6. I wonder what bugs Zefram removed? I don't remember exactly; ISTR there being a bunch of fencepost errors, error handling errors, errors handling unusual cases and so on. The code was so messy that it was easier to start from scratch -- most patches to that code were introducing new errors while fixing the old ones. Of course, getopts is a particularly bad design, so the code can't help being messy to some extent. >Restarting on OPTIND=0 must be one of the bugs Zefram fixed, but maybe >he shouldn't have taken out the reset of optcind upon failure return? Probably. I remember having some difficulty working out where optcind should be reset -- it's all very implicit in the POSIX definition. -zefram