From: Jilles Tjoelker <jil...@stack.nl>
Date: Sat, 13 Jun 2009 16:17:45 -0500

Evaltree and its variants support three flags:

 - EV_EXIT means to exit when evaluation is complete (for use by the
   "exec" builtin, pipelines, and subshells).
 - EV_TESTED means that this code is the argument to a conditional.
   If some part of it fails and the -e flag is set, it will not cause
   the shell to exit.
 - EV_BACKCMD is an unused vestige from an experiment long past.

There has been no need to advertise the possible flags outside eval.c
so far because the only external callers, main and cmdloop, always
use 0 (no flags).  Expose the flags in eval.h so that can change.

[jn: originally from Jilles as part of FreeBSD SVN r194128; split up
 for clarity.]

Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
---
 src/eval.c |    5 -----
 src/eval.h |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 426c03a..5c26133 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -65,11 +65,6 @@
 #endif
 
 
-/* flags in argument to evaltree */
-#define EV_EXIT 01             /* exit after evaluating tree */
-#define EV_TESTED 02           /* exit status is checked; ignore -e flag */
-#define EV_BACKCMD 04          /* command executing within back quotes */
-
 int evalskip;                  /* set if we are skipping commands */
 STATIC int skipcount;          /* number of levels to skip */
 MKINIT int loopnest;           /* current loop nesting level */
diff --git a/src/eval.h b/src/eval.h
index ac394e8..b1b13f5 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -46,6 +46,11 @@ struct backcmd {             /* result of evalbackcmd */
        struct job *jp;         /* job structure for command */
 };
 
+/* flags in argument to evaltree */
+#define EV_EXIT 01             /* exit after evaluating tree */
+#define EV_TESTED 02           /* exit status is checked; ignore -e flag */
+#define EV_BACKCMD 04          /* command executing within back quotes */
+
 int evalstring(char *, int);
 union node;    /* BLETCH for ansi C */
 void evaltree(union node *, int);
-- 
1.7.5.rc0

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to