From 09960dc5b966fb1a1c20a0af654165e5981a999b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 12 May 2010 10:06:59 +0000 Subject: 27951: Add $ZSH_EVAL_CONTEXT and $zsh_eval_contxt --- Src/Modules/zpty.c | 2 +- Src/Modules/zutil.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'Src/Modules') diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c index f25d442b2..2a81e68cb 100644 --- a/Src/Modules/zpty.c +++ b/Src/Modules/zpty.c @@ -396,7 +396,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) setsparam("TTY", ztrdup(ttystrname)); opts[INTERACTIVE] = 0; - execode(prog, 1, 0); + execode(prog, 1, 0, "zpty"); stopmsg = 2; zexit(lastval, 0); } diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c index 698b7e3bd..76ca92f79 100644 --- a/Src/Modules/zutil.c +++ b/Src/Modules/zutil.c @@ -343,7 +343,7 @@ evalstyle(Stypat p) char **ret, *str; unsetparam("reply"); - execode(p->eval, 1, 0); + execode(p->eval, 1, 0, "style"); if (errflag) { errflag = ef; return NULL; @@ -1253,7 +1253,7 @@ rmatch(RParseResult *sm, char *subj, char *var1, char *var2, int comp) char *action = getdata(ln); if (action) - execstring(action, 1, 0); + execstring(action, 1, 0, "zregexparse-action"); } return 0; } @@ -1278,7 +1278,8 @@ rmatch(RParseResult *sm, char *subj, char *var1, char *var2, int comp) return 3; } if (next->pattern && pattry(next->patprog, subj) && - (!next->guard || (execstring(next->guard, 1, 0), !lastval))) { + (!next->guard || (execstring(next->guard, 1, 0, + "zregesparse-guard"), !lastval))) { LinkNode aln; char **mend; int len; @@ -1299,7 +1300,7 @@ rmatch(RParseResult *sm, char *subj, char *var1, char *var2, int comp) char *action = getdata(aln); if (action) - execstring(action, 1, 0); + execstring(action, 1, 0, "zregexparse-action"); } restorematch(&match2); @@ -1328,7 +1329,7 @@ rmatch(RParseResult *sm, char *subj, char *var1, char *var2, int comp) char *action = getdata(ln); if (action) - execstring(action, 1, 0); + execstring(action, 1, 0, "zregexparse-action"); } return 0; } @@ -1339,7 +1340,7 @@ rmatch(RParseResult *sm, char *subj, char *var1, char *var2, int comp) for (ln = firstnode(nexts); ln; ln = nextnode(ln)) { br = getdata(ln); if (br->state->action) - execstring(br->state->action, 1, 0); + execstring(br->state->action, 1, 0, "zregexparse-action"); } } return empty(nexts) ? 2 : 1; -- cgit 1.4.1