*/
#ifndef DOINIT
-EXT const U8 regkind[];
+EXTCONST U8 regkind[];
#else
-EXT const U8 regkind[] = {
+EXTCONST U8 regkind[] = {
END,
BOL,
BOL,
/* The following have no fixed length. char* since we do strchr on it. */
#ifndef DOINIT
-EXT const char varies[];
+EXTCONST char varies[];
#else
-EXT const char varies[] = {
+EXTCONST char varies[] = {
BRANCH, BACK, STAR, PLUS, CURLY, CURLYX, REF, REFF, REFFL,
WHILEM, CURLYM, CURLYN, BRANCHJ, IFTHEN, SUSPEND, 0
};
/* The following always have a length of 1. char* since we do strchr on it. */
#ifndef DOINIT
-EXT const char simple[];
+EXTCONST char simple[];
#else
-EXT const char simple[] = {
+EXTCONST char simple[] = {
ANY, SANY, ANYOF,
ALNUM, ALNUML, NALNUM, NALNUML,
SPACE, SPACEL, NSPACE, NSPACEL,
#endif
-#define REG_INFTY I16_MAX
+/* I16_MAX is no good for REG_INFTY because sizeof(short) > 2
+ * is perfectly fine. In Cray C90 sizeof(short) == 4,
+ * in Cray T90 sizeof(short) == 8. */
+#define REG_INFTY ((1<<15)-1)
#ifdef REGALIGN
# define ARG_VALUE(arg) (arg)
#define ANYOF_SPACEL 0x02
#define ANYOF_NSPACEL 0x01
+/* Utility macros for bitmap of ANYOF */
+#define ANYOF_BYTE(p,c) (p)[1 + (((c) >> 3) & 31)]
+#define ANYOF_BIT(c) (1 << ((c) & 7))
+#define ANYOF_SET(p,c) (ANYOF_BYTE(p,c) |= ANYOF_BIT(c))
+#define ANYOF_CLEAR(p,c) (ANYOF_BYTE(p,c) &= ~ANYOF_BIT(c))
+#define ANYOF_TEST(p,c) (ANYOF_BYTE(p,c) & ANYOF_BIT(c))
+
#ifdef REGALIGN_STRUCT
#define ANY_SKIP ((33 - 1)/sizeof(regnode) + 1)
#else
};
#endif
-struct reg_data {
- U32 count;
- U8 *what;
- void* data[1];
-};
-
#define REG_SEEN_ZERO_LEN 1
#define REG_SEEN_LOOKBEHIND 2
#define REG_SEEN_GPOS 4
#ifdef DEBUGGING
-extern char *colors[4];
+EXT char *colors[4]; /* not dEXT since we do EXTERN/INTERN.h shuffle */
#endif
-
-void re_croak2 _((const char* pat1,const char* pat2,...)) __attribute__((noreturn));