This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Init PL_cop_seqmax to a high value under DEBUGGING
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 1be51b2..c7139cd 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -8,7 +8,6 @@
  *
  */
 
-
 #ifndef H_PERL
 #define H_PERL 1
 
@@ -592,7 +591,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
 #  endif
 #endif
 
-/* HP-UX 10.X CMA (Common Multithreaded Architecure) insists that
+/* HP-UX 10.X CMA (Common Multithreaded Architecture) insists that
    pthread.h must be included before all other header files.
 */
 #if defined(USE_ITHREADS) && defined(PTHREAD_H_FIRST) && defined(I_PTHREAD)
@@ -2227,7 +2226,7 @@ int isnan(double d);
 #  include <limits.h>
 #endif
 /* Included values.h above if necessary; still including limits.h down here,
- * despite doing above, because math.h might have overriden... XXX - Allen */
+ * despite doing above, because math.h might have overridden... XXX - Allen */
 
 /*
  * Try to figure out max and min values for the integral types.  THE CORRECT
@@ -2426,7 +2425,6 @@ typedef struct STRUCT_SV SV;
 typedef struct av AV;
 typedef struct hv HV;
 typedef struct cv CV;
-typedef struct regexp ORANGE;  /* This is the body structure.  */
 typedef struct p5rx REGEXP;
 typedef struct gp GP;
 typedef struct gv GV;
@@ -3178,7 +3176,7 @@ typedef pthread_key_t     perl_key;
     All that is required is that the perl source does not
     use "%-p" or "%-<number>p" or "%<number>p" formats.
     These formats will still work in perl code.
-    See comments in sv.c for futher details.
+    See comments in sv.c for further details.
 
     Robin Barker 2005-07-14
 
@@ -3204,7 +3202,7 @@ typedef pthread_key_t     perl_key;
 #define SVfARG(p) ((void*)(p))
 
 #ifdef PERL_CORE
-/* not used; but needed for backward compatibilty with XS code? - RMB */
+/* not used; but needed for backward compatibility with XS code? - RMB */
 #  undef VDf
 #else
 #  ifndef VDf
@@ -3213,7 +3211,7 @@ typedef pthread_key_t     perl_key;
 #endif
 
 #ifdef PERL_CORE
-/* not used; but needed for backward compatibilty with XS code? - RMB */
+/* not used; but needed for backward compatibility with XS code? - RMB */
 #  undef UVf
 #else
 #  ifndef UVf
@@ -3700,6 +3698,7 @@ Gid_t getegid (void);
 #  define DEBUG_B_TEST_ (PL_debug & DEBUG_B_FLAG)
 #  define DEBUG_Xv_TEST_ (DEBUG_X_TEST_ && DEBUG_v_TEST_)
 #  define DEBUG_Uv_TEST_ (DEBUG_U_TEST_ && DEBUG_v_TEST_)
+#  define DEBUG_Pv_TEST_ (DEBUG_P_TEST_ && DEBUG_v_TEST_)
 
 #ifdef DEBUGGING
 
@@ -3730,6 +3729,7 @@ Gid_t getegid (void);
 #  define DEBUG_B_TEST DEBUG_B_TEST_
 #  define DEBUG_Xv_TEST DEBUG_Xv_TEST_
 #  define DEBUG_Uv_TEST DEBUG_Uv_TEST_
+#  define DEBUG_Pv_TEST DEBUG_Pv_TEST_
 
 #  define PERL_DEB(a)                  a
 #  define PERL_DEBUG(a) if (PL_debug)  a
@@ -3767,6 +3767,7 @@ Gid_t getegid (void);
 #  define DEBUG_D(a) DEBUG__(DEBUG_D_TEST, a)
 #  define DEBUG_Xv(a) DEBUG__(DEBUG_Xv_TEST, a)
 #  define DEBUG_Uv(a) DEBUG__(DEBUG_Uv_TEST, a)
+#  define DEBUG_Pv(a) DEBUG__(DEBUG_Pv_TEST, a)
 
 #  define DEBUG_T(a) DEBUG__(DEBUG_T_TEST, a)
 #  define DEBUG_R(a) DEBUG__(DEBUG_R_TEST, a)
@@ -3806,6 +3807,7 @@ Gid_t getegid (void);
 #  define DEBUG_B_TEST (0)
 #  define DEBUG_Xv_TEST (0)
 #  define DEBUG_Uv_TEST (0)
+#  define DEBUG_Pv_TEST (0)
 
 #  define PERL_DEB(a)
 #  define PERL_DEBUG(a)
@@ -3835,6 +3837,7 @@ Gid_t getegid (void);
 #  define DEBUG_B(a)
 #  define DEBUG_Xv(a)
 #  define DEBUG_Uv(a)
+#  define DEBUG_Pv(a)
 #endif /* DEBUGGING */
 
 
@@ -4906,6 +4909,7 @@ typedef char*   (*re_intuit_start_t) (pTHX_ regexp *prog, SV *sv,
 typedef SV*    (*re_intuit_string_t) (pTHX_ regexp *prog);
 typedef void   (*regfree_t) (pTHX_ struct regexp* r);
 typedef regexp* (*regdupe_t) (pTHX_ const regexp* r, CLONE_PARAMS *param);
+typedef I32     (*re_fold_t)(const char *, char const *, I32);
 
 typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*);
 typedef void (*DESTRUCTORFUNC_t) (pTHX_ void*);
@@ -5622,7 +5626,7 @@ typedef struct am_table_short AMTS;
 #define PERLDBf_NAMEEVAL       0x100   /* Informative names for evals */
 #define PERLDBf_NAMEANON       0x200   /* Informative names for anon subs */
 #define PERLDBf_SAVESRC        0x400   /* Save source lines into @{"_<$filename"} */
-#define PERLDBf_SAVESRC_NOSUBS 0x800   /* Including evals that generate no subrouties */
+#define PERLDBf_SAVESRC_NOSUBS 0x800   /* Including evals that generate no subroutines */
 #define PERLDBf_SAVESRC_INVALID        0x1000  /* Save source that did not compile */
 
 #define PERLDB_SUB     (PL_perldb && (PL_perldb & PERLDBf_SUB))
@@ -6084,36 +6088,6 @@ extern void moncontrol(int);
 
 #define PERL_SIGNALS_UNSAFE_FLAG       0x0001
 
-/* From sigaction(2) (FreeBSD man page):
- * | Signal routines normally execute with the signal that
- * | caused their invocation blocked, but other signals may
- * | yet occur.
- * Emulation of this behavior (from within Perl) is enabled
- * by defining PERL_BLOCK_SIGNALS.
- */
-#define PERL_BLOCK_SIGNALS
-
-#if defined(HAS_SIGPROCMASK) && defined(PERL_BLOCK_SIGNALS)
-#   define PERL_BLOCKSIG_ADD(set,sig) \
-       sigset_t set; sigemptyset(&(set)); sigaddset(&(set), sig)
-#   define PERL_BLOCKSIG_BLOCK(set) \
-       sigprocmask(SIG_BLOCK, &(set), NULL)
-#   define PERL_BLOCKSIG_UNBLOCK(set) \
-       sigprocmask(SIG_UNBLOCK, &(set), NULL)
-#endif /* HAS_SIGPROCMASK && PERL_BLOCK_SIGNALS */
-
-/* How about the old style of sigblock()? */
-
-#ifndef PERL_BLOCKSIG_ADD
-#   define PERL_BLOCKSIG_ADD(set, sig) NOOP
-#endif
-#ifndef PERL_BLOCKSIG_BLOCK
-#   define PERL_BLOCKSIG_BLOCK(set)    NOOP
-#endif
-#ifndef PERL_BLOCKSIG_UNBLOCK
-#   define PERL_BLOCKSIG_UNBLOCK(set)  NOOP
-#endif
-
 /* Use instead of abs() since abs() forces its argument to be an int,
  * but also beware since this evaluates its argument twice, so no x++. */
 #define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
@@ -6154,6 +6128,7 @@ extern void moncontrol(int);
 
 #define PERL_PV_ESCAPE_UNI          0x0100
 #define PERL_PV_ESCAPE_UNI_DETECT   0x0200
+#define PERL_PV_ESCAPE_NONASCII     0x0400
 
 #define PERL_PV_ESCAPE_ALL         0x1000
 #define PERL_PV_ESCAPE_NOBACKSLASH  0x2000
@@ -6164,7 +6139,15 @@ extern void moncontrol(int);
 
 /* used by pv_display in dump.c*/
 #define PERL_PV_PRETTY_DUMP  PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
-#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
+#define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE|PERL_PV_ESCAPE_NONASCII
+
+#ifdef PERL_CORE
+#  define FEATURE_IS_ENABLED(name)                                     \
+       ((0 != (PL_hints & HINT_LOCALIZE_HH))                           \
+           && Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)))
+/* The longest string we pass in.  */
+#  define MAX_FEATURE_LEN (sizeof("unicode_strings")-1)
+#endif
 
 /*