9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] fix for bwk awk problem with split
@ 2012-12-10 20:54 Aharon Robbins
  0 siblings, 0 replies; only message in thread
From: Aharon Robbins @ 2012-12-10 20:54 UTC (permalink / raw)
  To: 9fans


This makes it work correctly for me on Linux. Not sure about 9awk.

I have corresponded with BWK about this, including sending him this
proposed patch.

Arnold
----------------
--- run.c.orig	2012-12-10 22:50:40.403115427 +0200
+++ run.c	2012-12-10 22:50:15.450991568 +0200
@@ -1216,6 +1216,7 @@
 	int n, tempstat, arg3type;

 	y = execute(a[0]);	/* source string */
+	y->tval |= DONTFREE;
 	s = getsval(y);
 	arg3type = ptoi(a[3]);
 	if (a[2] == 0)		/* fs string */
@@ -1335,6 +1336,7 @@
 		}
 	}
 	tempfree(ap);
+	y->tval &= ~DONTFREE;
 	tempfree(y);
 	if (a[2] != 0 && arg3type == STRING) {
 		tempfree(x);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-10 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-10 20:54 [9fans] fix for bwk awk problem with split Aharon Robbins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).