From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22176 invoked from network); 24 Jan 1999 17:25:45 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Jan 1999 17:25:45 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA03708; Sun, 24 Jan 1999 12:18:25 -0500 (EST) Resent-Date: Sun, 24 Jan 1999 12:18:25 -0500 (EST) From: "Bart Schaefer" Message-Id: <990124091753.ZM6249@candle.brasslantern.com> Date: Sun, 24 Jan 1999 09:17:53 -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: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: PATCH: 3.0.5: Re: PATCH: 3.1.5-pws-4: compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"T-7_D.0.tv.WNrgs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4960 X-Loop: zsh-workers@math.gatech.edu Precedence: list 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. That sure looks like a bug to me, and 3.0.x has apparently had it too, since as long ago as I've kept a copy in CVS. Here's the patch for that one bug, against 3.0.5. Index: Src/hist.c =================================================================== --- hist.c 1998/07/02 15:56:02 1.8 +++ hist.c 1999/01/24 17:13:23 @@ -304,7 +304,7 @@ c = ingetc(); } *ptr = 0; - if (!*buf) + if (!*buf) { if (c != '%') { if (isset(CSHJUNKIEHISTORY)) ev = curhist - 1; @@ -320,6 +320,7 @@ else ev = defev; evset = 0; + } } else if ((t0 = atoi(buf))) { ev = (t0 < 0) ? curhist + t0 : t0; evset = 1; -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com