From 14611800d14b9d0a95a1c2110e704ecf3718b2a4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 29 Nov 2016 22:51:32 -0800 Subject: bugfix: awk elides loop despite begin/end clauses. * share/txr/stdlib/awk.tl (awk): The macro must not elide the processing loop if there are :begin-file, :end-file or :end actions. All these actions must be missing, not only the, cond-actions for that elision to be valid. --- share/txr/stdlib/awk.tl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/txr/stdlib/awk.tl b/share/txr/stdlib/awk.tl index 760c92ac..23db2403 100644 --- a/share/txr/stdlib/awk.tl +++ b/share/txr/stdlib/awk.tl @@ -331,7 +331,8 @@ p-actions-xform)))))) ,*awc.begin-actions (unwind-protect - ,(if awc.cond-actions + ,(if (or awc.cond-actions awc.begin-file-actions + awc.end-file-actions awc.end-actions) ^(qref ,aws-sym (loop ,awk-fun ,(if awc.begin-file-actions awk-begf-fun) -- cgit v1.2.3