Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mapfile (Re: More ramblings Re: zsh/termcap and zsh/terminfo modules)
- X-seq: zsh-workers 13944
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: mapfile (Re: More ramblings Re: zsh/termcap and zsh/terminfo modules)
- Date: Wed, 11 Apr 2001 01:05:54 +0100
- In-reply-to: ""Bart Schaefer""'s message of "Tue, 10 Apr 2001 18:08:50 -0000." <1010410180851.ZM18574@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author