-/* $Header: cmd.h,v 3.0 89/10/18 15:09:15 lwall Locked $
+/* $RCSfile: cmd.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 10:28:50 $
*
- * Copyright (c) 1989, Larry Wall
+ * Copyright (c) 1991, Larry Wall
*
- * You may distribute under the terms of the GNU General Public License
- * as specified in the README file that comes with the perl 3.0 kit.
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
*
* $Log: cmd.h,v $
- * Revision 3.0 89/10/18 15:09:15 lwall
- * 3.0 baseline
+ * Revision 4.0.1.1 91/06/07 10:28:50 lwall
+ * patch4: new copyright notice
+ * patch4: length($`), length($&), length($') now optimized to avoid string copy
+ *
+ * Revision 4.0 91/03/20 01:04:34 lwall
+ * 4.0 baseline.
*
*/
#define CF_ONCE 010000 /* we've already pushed the label on the stack */
#define CF_FLIP 020000 /* on a match do flipflop */
#define CF_TERM 040000 /* value of this cmd might be returned */
+#define CF_DBSUB 0100000 /* this is an inserted cmd for debugging */
#define CFT_FALSE 0 /* c_expr is always false */
#define CFT_TRUE 1 /* c_expr is always true */
#define CFT_INDGETS 11 /* c_expr is <$variable> */
#define CFT_NUMOP 12 /* c_expr is a numeric comparison */
#define CFT_CCLASS 13 /* c_expr must start with one of these characters */
+#define CFT_D0 14 /* no special breakpoint at this line */
+#define CFT_D1 15 /* possible special breakpoint at this line */
#ifdef DEBUGGING
#ifndef DOINIT
struct scmd scmd; /* switch command */
} ucmd;
short c_slen; /* len of c_short, if not null */
- short c_flags; /* optimization flags--see above */
- char *c_file; /* file the following line # is from */
+ VOLATILE short c_flags; /* optimization flags--see above */
+ HASH *c_stash; /* package line was compiled in */
+ STAB *c_filestab; /* file the following line # is from */
line_t c_line; /* line # of this command */
char c_type; /* what this command does */
};
#define Nullcmd Null(CMD*)
+#define Nullcsv Null(CSV*)
+
+EXT CMD * VOLATILE main_root INIT(Nullcmd);
+EXT CMD * VOLATILE eval_root INIT(Nullcmd);
-EXT CMD *main_root INIT(Nullcmd);
-EXT CMD *eval_root INIT(Nullcmd);
+EXT CMD compiling;
+EXT CMD * VOLATILE curcmd INIT(&compiling);
+EXT CSV * VOLATILE curcsv INIT(Nullcsv);
+
+struct callsave {
+ SUBR *sub;
+ STAB *stab;
+ CSV *curcsv;
+ CMD *curcmd;
+ ARRAY *savearray;
+ ARRAY *argarray;
+ long depth;
+ int wantarray;
+ char hasargs;
+};
struct compcmd {
CMD *comp_true;
};
void opt_arg();
-void evalstatic();
+ARG* evalstatic();
int cmd_exec();