From fdf2867e5f08809ff3fccc78fb6df13a196e3efc Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Thu, 13 Jun 2013 18:38:33 +0100
Subject: 31444: Basic code for enable/disable -p
---
Src/exec.c | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'Src/exec.c')
diff --git a/Src/exec.c b/Src/exec.c
index 14c2ba003..75805d3f5 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4627,6 +4627,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
}
starttrapscope();
+ startpatternscope();
pptab = pparams;
if (!(flags & PM_UNDEFINED))
@@ -4674,6 +4675,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
offptr++)
opts[*offptr] = 0;
}
+ /* All emulations start with pattern disables clear */
+ clearpatterndisables();
} else
restore_sticky = 0;
@@ -4774,6 +4777,8 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
scriptname = oldscriptname;
oflags = ooflags;
+ endpatternscope(); /* before restoring old LOCALPATTERNS */
+
if (restore_sticky) {
/*
* If we switched to an emulation environment just for
--
cgit 1.4.1