From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22404 invoked from network); 24 Jan 1999 18:03:10 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jan 1999 18:03:10 -0000 Received: (qmail 19410 invoked by alias); 24 Jan 1999 18:02:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4961 Received: (qmail 19399 invoked from network); 24 Jan 1999 18:02:28 -0000 Resent-Date: Sun, 24 Jan 1999 13:02:43 -0500 (EST) From: "Bart Schaefer" Message-Id: <990124100204.ZM6399@candle.brasslantern.com> Date: Sun, 24 Jan 1999 10:02:04 -0800 In-Reply-To: <9901201534.AA26168@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "PATCH: 3.1.5-pws-4: compilation warnings" (Jan 20, 4:34pm) References: <9901201534.AA26168@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Peter Stephenson , zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: PATCH: 3.1.5-pws-4: compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"FrJpB.0.YC1.31sgs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4961 X-Loop: zsh-workers@math.gatech.edu Resent-Sender: zsh-workers-request@math.gatech.edu On Jan 20, 4:34pm, Peter Stephenson wrote: } Subject: PATCH: 3.1.5-pws-4: compilation warnings } } One of the dangling `else' branches in hist.c actually appeared to be } a bug, with the logic not agreeing with the indentation. After staring at this for some time to try to figure out the run-time consequences of this bug, I've concluded that it's not a bug after all. The only problem is that one close brace is at the wrong indentation level and that the following "else if" has been improperly "cuddled" up against that brace. Here's the code structure now: if (!*buf) if (c != '%') { ... } else { ... } else if ((t0 = atoi(buf))) { ... } ... Shuffle whitespace around the second close brace: if (!*buf) if (c != '%') { ... } else { ... } else if ((t0 = atoi(buf))) { ... } ... Now it's clear that the code is doing the right thing, even though it was misleadingly structured. The patch to 3.0.5 that I just posted is not necessary after all (though still probably advisable for the sake of readability). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com