X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regcomp.h;h=fef317a2aca5a569ce4806660eb52b53a9f162ac;hb=be425529213e9b149dcb8e489b8c142dbfdda50e;hp=727a4e509b4a4b5ab86a3b5ec3b40fb47433b71a;hpb=3280af22f58e7b37514ed104858e2c2fc55ceeeb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regcomp.h b/regcomp.h index 727a4e5..fef317a 100644 --- a/regcomp.h +++ b/regcomp.h @@ -150,7 +150,7 @@ struct regnode_2 { #define FILL_ADVANCE_NODE_ARG(ptr, op, arg) STMT_START { \ ARG_SET(ptr, arg); FILL_ADVANCE_NODE(ptr, op); (ptr) += 1; } STMT_END -#define MAGIC 0234 +#define REG_MAGIC 0234 #define SIZE_ONLY (PL_regcode == &PL_regdummy) @@ -183,7 +183,7 @@ struct regnode_2 { #define UCHARAT(p) ((int)*(p)&CHARMASK) #endif #else /* lint */ -#define UCHARAT(p) regdummy +#define UCHARAT(p) PL_regdummy #endif /* lint */ #define FAIL(m) croak ("/%.127s/: %s", PL_regprecomp,m) @@ -200,23 +200,26 @@ struct regnode_2 { /* The following have no fixed length. char* since we do strchr on it. */ #ifndef DOINIT -EXTCONST char varies[]; +EXTCONST char PL_varies[]; #else -EXTCONST char varies[] = { +EXTCONST char PL_varies[] = { BRANCH, BACK, STAR, PLUS, CURLY, CURLYX, REF, REFF, REFFL, - WHILEM, CURLYM, CURLYN, BRANCHJ, IFTHEN, SUSPEND, 0 + WHILEM, CURLYM, CURLYN, BRANCHJ, IFTHEN, SUSPEND, CLUMP, 0 }; #endif /* The following always have a length of 1. char* since we do strchr on it. */ +/* (Note that lenght 1 means "one character" under UTF8, not "one octet".) */ #ifndef DOINIT -EXTCONST char simple[]; +EXTCONST char PL_simple[]; #else -EXTCONST char simple[] = { - ANY, SANY, ANYOF, - ALNUM, ALNUML, NALNUM, NALNUML, - SPACE, SPACEL, NSPACE, NSPACEL, - DIGIT, NDIGIT, 0 +EXTCONST char PL_simple[] = { + REG_ANY, ANYUTF8, SANY, SANYUTF8, ANYOF, ANYOFUTF8, + ALNUM, ALNUMUTF8, ALNUML, ALNUMLUTF8, + NALNUM, NALNUMUTF8, NALNUML, NALNUMLUTF8, + SPACE, SPACEUTF8, SPACEL, SPACELUTF8, + NSPACE, NSPACEUTF8, NSPACEL, NSPACELUTF8, + DIGIT, DIGITUTF8, NDIGIT, NDIGITUTF8, 0 }; #endif