From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id TAA27665 for ; Wed, 7 Jun 1995 19:47:17 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA08653 (5.65c/Gatech-10.0-IDA for ); Wed, 7 Jun 1995 05:42:55 -0400 Received: by math (5.x/SMI-SVR4) id AA01689; Wed, 7 Jun 1995 05:40:25 -0400 Resent-Date: Wed, 7 Jun 1995 12:40:00 +0300 (EET DST) Old-Return-Path: From: "Zvi Har'El" Message-Id: <199506070940.MAA08544@leeor.technion.ac.il> Subject: Re: Small bug in zsh 2.6beta9 To: P.Stephenson@swansea.ac.uk Date: Wed, 7 Jun 1995 12:40:00 +0300 (EET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <21569.9506050937@pyro.swan.ac.uk> from "P.Stephenson@swansea.ac.uk" at Jun 5, 95 10:37:34 am Hebrew-Date: 9 Sivan 5755 - dpyz'd oeiq h Reply-To: "Zvi Har'El" X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-8 Content-Transfer-Encoding: 8bit Resent-Message-Id: <"esQ9U1.0.JQ.8GNrl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/81 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter, YOU were right all the time. The two lines of code are identical. Perhaps the idiom of checking if(a) rather then if(a!=0) is not clear to people who are not seasoned C programmers, but personally I prefer your original code. On Mon Jun 5 12:37:34 1995, P.Stephenson@swansea.ac.uk wrote about ``Re: Small bug in zsh 2.6beta9'': > > heiko@pool.informatik.rwth-aachen.de wrote: > > In the file exec.c, line 493, the line > > > > if (ornext ^ ret) { > > > > should read > > > > if (ornext ^ (ret!=0)) { > > You're quite right --- this is my fault again. Here's an actual patch > for that. > > *** Src/exec.c.ret Mon Jun 5 10:16:14 1995 > --- Src/exec.c Mon Jun 5 10:34:30 1995 > *************** > *** 506,512 **** > */ > ornext = (slist->type == ORNEXT); > > ! if (ornext ^ ret) { > /* > * If either (1) it's an or, and the return code > * was zero, or (2) it's an and, and the return > --- 506,512 ---- > */ > ornext = (slist->type == ORNEXT); > > ! if (ornext ^ (ret != 0)) { > /* > * If either (1) it's an or, and the return code > * was zero, or (2) it's an and, and the return > > -- > Peter Stephenson Tel: +44 1792 205678 extn. 4461 > WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324 > Department of Physics, University of Wales, Swansea, > Singleton Park, Swansea, SA2 8PP, U.K. > > > -- Dr. Zvi Har'El Department of Mathematics +972-4-294094(Phone) Technion - Israel Institute of Technology +972-4-324654(FAX) http://gauss.technion.ac.il/~rl Haifa 32000, ISRAEL ``If you can't say somethin' nice, don't say nothin' at all.''--Thumper (1942)