From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id MAA21244 for ; Sun, 24 Nov 1996 12:32:14 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA25276; Sat, 23 Nov 1996 20:26:45 -0500 (EST) Resent-Date: Sat, 23 Nov 1996 20:26:45 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199611240003.BAA02995@hzoli.ppp.cs.elte.hu> Subject: ((...)) fix To: zsh-workers@math.gatech.edu (Zsh hacking and development) Date: Sun, 24 Nov 1996 01:03:06 +0100 (MET) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"G_Uf2.0.pA6.KHwbo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2462 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu There are two problems with the rewritten ((...)): it dumps core on (()) and it substitutes its body twice. Zoltan *** exec.c 1996/11/17 01:57:26 3.1.0.2 --- exec.c 1996/11/23 23:34:17 3.1.0.3 *************** *** 2356,2370 **** int execarith(Cmd cmd) { ! char *e = (char *) getdata(firstnode(cmd->args)); ! int val; ! singsub(&e); ! if (errflag) ! return 1; ! val = matheval(e); errflag = 0; ! return(!val); } /* perform time ... command */ --- 2356,2368 ---- int execarith(Cmd cmd) { ! char *e; ! long val = 0; ! while ((e = (char *) ugetnode(cmd->args))) ! val = matheval(e); errflag = 0; ! return !val; } /* perform time ... command */