summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-06-22 13:09:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-06-22 13:09:55 +0000
commitd591334e9d616830fbd24909db2e21ac4b959742 (patch)
tree65b44f10e6995c95605c8a56c3ca0fd9bfe6ad9d /Src/exec.c
parent6a1d913bd6214d7ca7f8cf1a82efef1fa4bae101 (diff)
downloadzsh-d591334e9d616830fbd24909db2e21ac4b959742.tar.gz
zsh-d591334e9d616830fbd24909db2e21ac4b959742.zip
20076, 20084: { ... } always { ... } syntax.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 418e8c67f..04e0e19ad 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -137,10 +137,10 @@ static char *STTYval;
/* Execution functions. */
-static int (*execfuncs[]) _((Estate, int)) = {
+static int (*execfuncs[WC_COUNT-WC_CURSH]) _((Estate, int)) = {
execcursh, exectime, execfuncdef, execfor, execselect,
execwhile, execrepeat, execcase, execif, execcond,
- execarith, execautofn
+ execarith, execautofn, exectry
};
/* structure for command builtin for when it is used with -v or -V */
@@ -325,6 +325,9 @@ execcursh(Estate state, int do_exec)
{
Wordcode end = state->pc + WC_CURSH_SKIP(state->pc[-1]);
+ /* Skip word only used for try/always */
+ state->pc++;
+
if (!list_pipe && thisjob != list_pipe_job && !hasprocs(thisjob))
deletejob(jobtab + thisjob);
cmdpush(CS_CURSH);
@@ -2475,6 +2478,9 @@ execcmd(Estate state, int input, int output, int how, int last1)
subsh_close = -1;
/* If we're forked (and we should be), no need to return */
DPUTS(last1 != 1 && !forked, "BUG: not exiting?");
+ DPUTS(type != WC_SUBSH, "Not sure what we're doing.");
+ /* Skip word only used for try/always blocks */
+ state->pc++;
execlist(state, 0, 1);
}
}