perl 4.0 patch 14: patch #11, continued
[p5sagit/p5-mst-13.2.git] / spat.h
diff --git a/spat.h b/spat.h
index 04b30e4..6c1551e 100644 (file)
--- a/spat.h
+++ b/spat.h
@@ -1,31 +1,43 @@
-/* $Header: spat.h,v 1.0.1.1 88/02/02 11:24:37 root Exp $
+/* $RCSfile: spat.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:51:59 $
+ *
+ *    Copyright (c) 1991, 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.
  *
  * $Log:       spat.h,v $
- * Revision 1.0.1.1  88/02/02  11:24:37  root
- * patch13: added flag for stripping leading spaces on split.
+ * Revision 4.0.1.1  91/06/07  11:51:59  lwall
+ * patch4: new copyright notice
+ * patch4: added global modifier for pattern matches
  * 
- * Revision 1.0  87/12/18  13:06:10  root
- * Initial revision
+ * Revision 4.0  91/03/20  01:39:36  lwall
+ * 4.0 baseline.
  * 
  */
 
 struct scanpat {
     SPAT       *spat_next;             /* list of all scanpats */
-    COMPEX     spat_compex;            /* compiled expression */
+    REGEXP     *spat_regexp;           /* compiled expression */
     ARG                *spat_repl;             /* replacement string for subst */
     ARG                *spat_runtime;          /* compile pattern at runtime */
-    STR                *spat_first;            /* for a fast bypass of execute() */
-    bool       spat_flags;
-    char       spat_flen;
+    STR                *spat_short;            /* for a fast bypass of execute() */
+    short      spat_flags;
+    char       spat_slen;
 };
 
 #define SPAT_USED 1                    /* spat has been used once already */
-#define SPAT_USE_ONCE 2                        /* use pattern only once per article */
+#define SPAT_ONCE 2                    /* use pattern only once per reset */
 #define SPAT_SCANFIRST 4               /* initial constant not anchored */
-#define SPAT_SCANALL 8                 /* initial constant is whole pat */
+#define SPAT_ALL 8                     /* initial constant is whole pat */
 #define SPAT_SKIPWHITE 16              /* skip leading whitespace for split */
+#define SPAT_FOLD 32                   /* case insensitivity */
+#define SPAT_CONST 64                  /* subst replacement is constant */
+#define SPAT_KEEP 128                  /* keep 1st runtime pattern forever */
+#define SPAT_GLOBAL 256                        /* pattern had a g modifier */
 
-EXT SPAT *spat_root;           /* list of all spats */
 EXT SPAT *curspat;             /* what to do \ interps from */
+EXT SPAT *lastspat;            /* what to use in place of null pattern */
+
+EXT char *hint INIT(Nullch);   /* hint from cmd_exec to do_match et al */
 
 #define Nullspat Null(SPAT*)