From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24422 invoked from network); 11 Apr 2001 00:04:10 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Apr 2001 00:04:10 -0000 Received: (qmail 21385 invoked by alias); 11 Apr 2001 00:04:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13944 Received: (qmail 21373 invoked from network); 11 Apr 2001 00:04:06 -0000 To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: mapfile (Re: More ramblings Re: zsh/termcap and zsh/terminfo modules) In-reply-to: ""Bart Schaefer""'s message of "Tue, 10 Apr 2001 18:08:50 -0000." <1010410180851.ZM18574@candle.brasslantern.com> Date: Wed, 11 Apr 2001 01:05:54 +0100 From: Peter Stephenson Message-Id: <20010411000554.DA41F139CD@pwstephenson.fsnet.co.uk> Bart wrote: > Hmm, well, could this possibly be a result of scanpmmapfile() relying on > the static buffer from metafy() that is returned by zreaddir() ? > > I'm not sure whether the right thing to do about that is to dupstring() ? That seems to work. I'm now off for Easter. Stay alert! Index: Src/Modules/mapfile.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/mapfile.c,v retrieving revision 1.4 diff -u -r1.4 mapfile.c --- Src/Modules/mapfile.c 2000/06/09 15:37:05 1.4 +++ Src/Modules/mapfile.c 2001/04/11 00:02:41 @@ -318,6 +318,7 @@ * we always read the entire contents of every single file * in the directory into memory. Hence just leave it empty. */ + pm.nam = dupstring(pm.nam); pm.u.str = ""; func((HashNode) &pm, flags); } -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk