summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eval.c10
-rw-r--r--src/eval.h10
2 files changed, 9 insertions, 11 deletions
diff --git a/src/eval.c b/src/eval.c
index 7f00b21..793d4c9 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -324,8 +324,8 @@ out:
 		dotrap();
 	if (flags & EV_EXIT)
 		exraise(EXEXIT);
-	if ((checkexit & exitstatus) && evalskip != SKIPFILE)
-		evalskip = SKIPEVAL;
+	if ((checkexit & exitstatus))
+		evalskip |= SKIPEVAL;
 }
 
 
@@ -931,8 +931,7 @@ cmddone:
 	commandname = savecmdname;
 	exsig = 0;
 	handler = savehandler;
-	if (evalskip == SKIPEVAL)
-		evalskip = 0;
+	evalskip &= ~SKIPEVAL;
 
 	return i;
 }
@@ -974,8 +973,7 @@ funcdone:
 	shellparam = saveparam;
 	handler = savehandler;
 	INTON;
-	if (evalskip == SKIPFUNC)
-		evalskip = 0;
+	evalskip &= ~SKIPFUNC;
 	return e;
 }
 
diff --git a/src/eval.h b/src/eval.h
index dc523e2..3d0a9a6 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -62,8 +62,8 @@ extern int funcnest;
 extern int evalskip;
 
 /* reasons for skipping commands (see comment on breakcmd routine) */
-#define SKIPBREAK	1
-#define SKIPCONT	2
-#define SKIPFUNC	3
-#define SKIPFILE	4
-#define SKIPEVAL	5
+#define SKIPBREAK	(1 << 0)
+#define SKIPCONT	(1 << 1)
+#define SKIPFUNC	(1 << 2)
+#define SKIPFILE	(1 << 3)
+#define SKIPEVAL	(1 << 4)