perl_run() should call my_exit(0) for normal completion
[p5sagit/p5-mst-13.2.git] / cop.h
diff --git a/cop.h b/cop.h
index 6bdb594..84afd58 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -1,6 +1,6 @@
 /*    cop.h
  *
- *    Copyright (c) 1991-1997, Larry Wall
+ *    Copyright (c) 1991-1999, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -181,17 +181,17 @@ struct block {
        cx->cx_type             = t,                                    \
        cx->blk_oldsp           = sp - PL_stack_base,                   \
        cx->blk_oldcop          = PL_curcop,                            \
-       cx->blk_oldmarksp       = PL_markstack_ptr - PL_markstack,              \
+       cx->blk_oldmarksp       = PL_markstack_ptr - PL_markstack,      \
        cx->blk_oldscopesp      = PL_scopestack_ix,                     \
-       cx->blk_oldretsp        = PL_retstack_ix,                               \
+       cx->blk_oldretsp        = PL_retstack_ix,                       \
        cx->blk_oldpm           = PL_curpm,                             \
        cx->blk_gimme           = gimme;                                \
        DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Entering block %ld, type %s\n",        \
-                   (long)cxstack_ix, PL_block_type[t]); )
+                   (long)cxstack_ix, PL_block_type[CxTYPE(cx)]); )
 
 /* Exit a block (RETURN and LAST). */
 #define POPBLOCK(cx,pm) cx = &cxstack[cxstack_ix--],                   \
-       newsp            = PL_stack_base + cx->blk_oldsp,                       \
+       newsp            = PL_stack_base + cx->blk_oldsp,               \
        PL_curcop        = cx->blk_oldcop,                              \
        PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp,            \
        PL_scopestack_ix = cx->blk_oldscopesp,                          \
@@ -203,7 +203,7 @@ struct block {
 
 /* Continue a block elsewhere (NEXT and REDO). */
 #define TOPBLOCK(cx) cx  = &cxstack[cxstack_ix],                       \
-       PL_stack_sp      = PL_stack_base + cx->blk_oldsp,                       \
+       PL_stack_sp      = PL_stack_base + cx->blk_oldsp,               \
        PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp,            \
        PL_scopestack_ix = cx->blk_oldscopesp,                          \
        PL_retstack_ix   = cx->blk_oldretsp,                            \
@@ -291,13 +291,19 @@ struct context {
 #define G_ARRAY                1
 #define G_VOID         128     /* skip this bit when adding flags below */
 
-/* extra flags for perl_call_* routines */
+/* extra flags for Perl_call_* routines */
 #define G_DISCARD      2       /* Call FREETMPS. */
 #define G_EVAL         4       /* Assume eval {} around subroutine call. */
 #define G_NOARGS       8       /* Don't construct a @_ array. */
 #define G_KEEPERR      16      /* Append errors to $@, don't overwrite it */
 #define G_NODEBUG      32      /* Disable debugging at toplevel.  */
 
+/* flag bits for PL_in_eval */
+#define EVAL_NULL      0       /* not in an eval */
+#define EVAL_INEVAL    1       /* some enclosing scope is an eval */
+#define EVAL_WARNONLY  2       /* used by yywarn() when calling yyerror() */
+#define EVAL_KEEPERR   4       /* set by Perl_call_sv if G_KEEPERR */
+
 /* Support for switching (stack and block) contexts.
  * This ensures magic doesn't invalidate local stack and cx pointers.
  */