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 CAA02156 for ; Thu, 17 Aug 1995 02:16:12 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA02889 (5.65c/Gatech-10.0-IDA for ); Wed, 16 Aug 1995 12:04:59 -0400 Received: by math (5.x/SMI-SVR4) id AA16736; Wed, 16 Aug 1995 11:59:13 -0400 Resent-Date: Wed, 16 Aug 1995 09:01:07 -0700 Old-Return-Path: From: schaefer@ncd.com (Barton E. Schaefer) Message-Id: <950816090108.ZM18716@zyrcon.z-code.com> Date: Wed, 16 Aug 1995 09:01:07 -0700 In-Reply-To: Zoltan Hidvegi "Re: hzoli change: $foo:s//r/" (Aug 16, 5:20pm) References: <199508161523.RAA22132@bolyai.cs.elte.hu> Reply-To: schaefer@ncd.com X-Face: czU|*h"p8AX?4.I.yU.^s%TIMx|"-s,*'|#H^|e,QjE&!jL%<]:-.U/;khS%3a2BC5_d#)( mz=$$G0u9P&*N8cA~b[URf;lgKRif@#qEf[ltie#Gg0%6$b`e`k.Cgw:\qJx\\a7c(K7^3;gXW:e1@ J, kaefer@aglaia.snafu.de (Thorsten Meinecke), zsh-workers@math.gatech.edu Subject: Re: hzoli change: $foo:s//r/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-Id: <"FvMNx1.0.M54.GNXCm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/324 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 16, 5:20pm, Zoltan Hidvegi wrote: } Subject: Re: hzoli change: $foo:s//r/ } } > Another very minor problem with Zoltan's substitution code. } > } > If hsubr is non-NULL, and a "bad/no previous substitution" error } > occurs, hsubr is free()d. This may corrupt memory. } } You are right here. But there is an other problem: the code assumes in many } places that extern variables are initialized to zero. This is a safe assumption. It's required that the compiler initialize global variables to zero, at least as far back as K&R and probably farther. -- Bart Schaefer Vice President, Technology, Z-Code Software schaefer@z-code.com Division of NCD Software Corporation http://www.well.com/www/barts