Skip to content

Commit

Permalink
Change handy.h macro names to be C standard conformant
Browse files Browse the repository at this point in the history
C reserves symbols beginning with underscores for its own use.  This
commit moves the underscore so it is trailing, which is legal.  The
symbols changed here are many of the ones in handy.h that have
significant uses outside it.
  • Loading branch information
khwilliamson committed Apr 29, 2021
1 parent bf79b4e commit 7317497
Show file tree
Hide file tree
Showing 13 changed files with 1,062 additions and 1,063 deletions.
2 changes: 1 addition & 1 deletion charclass_invlists.h
Expand Up @@ -419903,6 +419903,6 @@ static const U8 WB_table[23][23] = {
* 28076ceb3f4e2514ea9db243f4b918b9a7c2807b036237e2276b99b2659d9474 lib/unicore/mktables
* 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
* 24120d5e0c9685c442c93bc1dbea9b85ef973bf8e9474baf0e55b160c288226b regen/charset_translations.pl
* 9f74e34278592ddf58fef8c32236b294e94ea5e12627f911f4563e8040a07292 regen/mk_PL_charclass.pl
* 0798d269731752e5cacea42d92f22bd11e197dd1bb6e5cdf7698097a1488768a regen/mk_PL_charclass.pl
* 5eb9e6c825496cc9aa705e3cd33bc6d5a9657dcca16d4c4acc4824ff30b34a26 regen/mk_invlists.pl
* ex: set ro: */
319 changes: 159 additions & 160 deletions handy.h

Large diffs are not rendered by default.

1,536 changes: 768 additions & 768 deletions l1_char_class_tab.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/unicore/uni_keywords.pl
Expand Up @@ -1298,6 +1298,6 @@
# 28076ceb3f4e2514ea9db243f4b918b9a7c2807b036237e2276b99b2659d9474 lib/unicore/mktables
# 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version
# 24120d5e0c9685c442c93bc1dbea9b85ef973bf8e9474baf0e55b160c288226b regen/charset_translations.pl
# 9f74e34278592ddf58fef8c32236b294e94ea5e12627f911f4563e8040a07292 regen/mk_PL_charclass.pl
# 0798d269731752e5cacea42d92f22bd11e197dd1bb6e5cdf7698097a1488768a regen/mk_PL_charclass.pl
# 5eb9e6c825496cc9aa705e3cd33bc6d5a9657dcca16d4c4acc4824ff30b34a26 regen/mk_invlists.pl
# ex: set ro:
2 changes: 1 addition & 1 deletion perl.c
Expand Up @@ -1229,7 +1229,7 @@ perl_destruct(pTHXx)
SvREFCNT_dec(PL_XPosix_ptrs[i]);
PL_XPosix_ptrs[i] = NULL;

if (i != _CC_CASED) { /* A copy of Alpha */
if (i != CC_CASED_) { /* A copy of Alpha */
SvREFCNT_dec(PL_Posix_ptrs[i]);
PL_Posix_ptrs[i] = NULL;
}
Expand Down
6 changes: 3 additions & 3 deletions perl.h
Expand Up @@ -7235,12 +7235,12 @@ C<strtoul>.
#endif

#define grok_bin(s,lp,fp,rp) \
grok_bin_oct_hex(s, lp, fp, rp, 1, _CC_BINDIGIT, 'b')
grok_bin_oct_hex(s, lp, fp, rp, 1, CC_BINDIGIT_, 'b')
#define grok_oct(s,lp,fp,rp) \
(*(fp) |= PERL_SCAN_DISALLOW_PREFIX, \
grok_bin_oct_hex(s, lp, fp, rp, 3, _CC_OCTDIGIT, '\0'))
grok_bin_oct_hex(s, lp, fp, rp, 3, CC_OCTDIGIT_, '\0'))
#define grok_hex(s,lp,fp,rp) \
grok_bin_oct_hex(s, lp, fp, rp, 4, _CC_XDIGIT, 'x')
grok_bin_oct_hex(s, lp, fp, rp, 4, CC_XDIGIT_, 'x')

#ifndef PERL_SCRIPT_MODE
#define PERL_SCRIPT_MODE "r"
Expand Down
110 changes: 55 additions & 55 deletions regcomp.c
Expand Up @@ -5891,14 +5891,14 @@ Perl_re_printf( aTHX_ "LHS=%" UVuf " RHS=%" UVuf "\n",
if (flags & SCF_DO_STCLASS) {
if (flags & SCF_DO_STCLASS_AND) {
ssc_intersection(data->start_class,
PL_XPosix_ptrs[_CC_VERTSPACE], FALSE);
PL_XPosix_ptrs[CC_VERTSPACE_], FALSE);
ssc_clear_locale(data->start_class);
ANYOF_FLAGS(data->start_class)
&= ~SSC_MATCHES_EMPTY_STRING;
}
else if (flags & SCF_DO_STCLASS_OR) {
ssc_union(data->start_class,
PL_XPosix_ptrs[_CC_VERTSPACE],
PL_XPosix_ptrs[CC_VERTSPACE_],
FALSE);
ssc_and(pRExC_state, data->start_class, (regnode_charclass *) and_withp);

Expand Down Expand Up @@ -8451,7 +8451,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count,
* See rt #122761 for more details. -- Yves */
RExC_rx->extflags |= RXf_START_ONLY;
else if (fop == PLUS
&& PL_regkind[nop] == POSIXD && FLAGS(next) == _CC_SPACE
&& PL_regkind[nop] == POSIXD && FLAGS(next) == CC_SPACE_
&& OP(regnext(first)) == END)
RExC_rx->extflags |= RXf_WHITE;
else if ( RExC_rx->extflags & RXf_SPLIT
Expand Down Expand Up @@ -17696,7 +17696,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
TRUE /* checking only */);
}
else if ( strict && ! skip_white
&& ( generic_isCC_(value, _CC_VERTSPACE)
&& ( generic_isCC_(value, CC_VERTSPACE_)
|| is_VERTWS_cp_high(value)))
{
vFAIL("Literal vertical space in [] is illegal except under /x");
Expand Down Expand Up @@ -18196,7 +18196,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,

if (LOC && namedclass < ANYOF_POSIXL_MAX
#ifndef HAS_ISASCII
&& classnum != _CC_ASCII
&& classnum != CC_ASCII_
#endif
) {
SV* scratch_list = NULL;
Expand Down Expand Up @@ -18266,13 +18266,13 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
/* Here, should be \h, \H, \v, or \V. None of /d, /i
* nor /l make a difference in what these match,
* therefore we just add what they match to cp_list. */
if (classnum != _CC_VERTSPACE) {
if (classnum != CC_VERTSPACE_) {
assert( namedclass == ANYOF_HORIZWS
|| namedclass == ANYOF_NHORIZWS);

/* It turns out that \h is just a synonym for
* XPosixBlank */
classnum = _CC_BLANK;
classnum = CC_BLANK_;
}

_invlist_union_maybe_complement_2nd(
Expand All @@ -18285,9 +18285,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
}
}
else if ( AT_LEAST_UNI_SEMANTICS
|| classnum == _CC_ASCII
|| (DEPENDS_SEMANTICS && ( classnum == _CC_DIGIT
|| classnum == _CC_XDIGIT)))
|| classnum == CC_ASCII_
|| (DEPENDS_SEMANTICS && ( classnum == CC_DIGIT_
|| classnum == CC_XDIGIT_)))
{
/* We usually have to worry about /d affecting what POSIX
* classes match, with special code needed because we won't
Expand Down Expand Up @@ -18565,15 +18565,15 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
* are in the same series, which is the same range.
* */
index_start = _invlist_search(
PL_XPosix_ptrs[_CC_DIGIT],
PL_XPosix_ptrs[CC_DIGIT_],
prevvalue);

/* Warn if the range starts and ends with a digit,
* and they are not in the same group of 10. */
if ( index_start >= 0
&& ELEMENT_RANGE_MATCHES_INVLIST(index_start)
&& (index_final =
_invlist_search(PL_XPosix_ptrs[_CC_DIGIT],
_invlist_search(PL_XPosix_ptrs[CC_DIGIT_],
value)) != index_start
&& index_final >= 0
&& ELEMENT_RANGE_MATCHES_INVLIST(index_final))
Expand Down Expand Up @@ -19818,7 +19818,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
}

for (posix_class = 0;
posix_class <= _HIGHEST_REGCOMP_DOT_H_SYNC;
posix_class <= HIGHEST_REGCOMP_DOT_H_SYNC_;
posix_class++)
{
SV** our_code_points = &cp_list;
Expand Down Expand Up @@ -21182,12 +21182,12 @@ Perl_regdump(pTHX_ const regexp *r)
/* Should be synchronized with ANYOF_ #defines in regcomp.h */
#ifdef DEBUGGING

# if _CC_WORDCHAR != 0 || _CC_DIGIT != 1 || _CC_ALPHA != 2 \
|| _CC_LOWER != 3 || _CC_UPPER != 4 || _CC_PUNCT != 5 \
|| _CC_PRINT != 6 || _CC_ALPHANUMERIC != 7 || _CC_GRAPH != 8 \
|| _CC_CASED != 9 || _CC_SPACE != 10 || _CC_BLANK != 11 \
|| _CC_XDIGIT != 12 || _CC_CNTRL != 13 || _CC_ASCII != 14 \
|| _CC_VERTSPACE != 15
# if CC_WORDCHAR_ != 0 || CC_DIGIT_ != 1 || CC_ALPHA_ != 2 \
|| CC_LOWER_ != 3 || CC_UPPER_ != 4 || CC_PUNCT_ != 5 \
|| CC_PRINT_ != 6 || CC_ALPHANUMERIC_ != 7 || CC_GRAPH_ != 8 \
|| CC_CASED_ != 9 || CC_SPACE_ != 10 || CC_BLANK_ != 11 \
|| CC_XDIGIT_ != 12 || CC_CNTRL_ != 13 || CC_ASCII_ != 14 \
|| CC_VERTSPACE_ != 15
# error Need to adjust order of anyofs[]
# endif
static const char * const anyofs[] = {
Expand Down Expand Up @@ -22453,10 +22453,10 @@ S_put_range(pTHX_ SV *sv, UV start, const UV end, const bool allow_literals)
* the remaining portion as usual. */
if (isALPHANUMERIC_A(start)) {
UV mask = (isDIGIT_A(start))
? _CC_DIGIT
? CC_DIGIT_
: isUPPER_A(start)
? _CC_UPPER
: _CC_LOWER;
? CC_UPPER_
: CC_LOWER_;
UV temp_end = start + 1;

/* Find the end of the sub-range that includes just the
Expand Down Expand Up @@ -23143,39 +23143,39 @@ Perl_init_uniprops(pTHX)

/* Set up the inversion list interpreter-level variables */

PL_XPosix_ptrs[_CC_ASCII] = _new_invlist_C_array(uni_prop_ptrs[UNI_ASCII]);
PL_XPosix_ptrs[_CC_ALPHANUMERIC] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXALNUM]);
PL_XPosix_ptrs[_CC_ALPHA] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXALPHA]);
PL_XPosix_ptrs[_CC_BLANK] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXBLANK]);
PL_XPosix_ptrs[_CC_CASED] = _new_invlist_C_array(uni_prop_ptrs[UNI_CASED]);
PL_XPosix_ptrs[_CC_CNTRL] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXCNTRL]);
PL_XPosix_ptrs[_CC_DIGIT] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXDIGIT]);
PL_XPosix_ptrs[_CC_GRAPH] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXGRAPH]);
PL_XPosix_ptrs[_CC_LOWER] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXLOWER]);
PL_XPosix_ptrs[_CC_PRINT] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXPRINT]);
PL_XPosix_ptrs[_CC_PUNCT] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXPUNCT]);
PL_XPosix_ptrs[_CC_SPACE] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXSPACE]);
PL_XPosix_ptrs[_CC_UPPER] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXUPPER]);
PL_XPosix_ptrs[_CC_VERTSPACE] = _new_invlist_C_array(uni_prop_ptrs[UNI_VERTSPACE]);
PL_XPosix_ptrs[_CC_WORDCHAR] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXWORD]);
PL_XPosix_ptrs[_CC_XDIGIT] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXXDIGIT]);

PL_Posix_ptrs[_CC_ASCII] = _new_invlist_C_array(uni_prop_ptrs[UNI_ASCII]);
PL_Posix_ptrs[_CC_ALPHANUMERIC] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXALNUM]);
PL_Posix_ptrs[_CC_ALPHA] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXALPHA]);
PL_Posix_ptrs[_CC_BLANK] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXBLANK]);
PL_Posix_ptrs[_CC_CASED] = PL_Posix_ptrs[_CC_ALPHA];
PL_Posix_ptrs[_CC_CNTRL] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXCNTRL]);
PL_Posix_ptrs[_CC_DIGIT] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXDIGIT]);
PL_Posix_ptrs[_CC_GRAPH] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXGRAPH]);
PL_Posix_ptrs[_CC_LOWER] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXLOWER]);
PL_Posix_ptrs[_CC_PRINT] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXPRINT]);
PL_Posix_ptrs[_CC_PUNCT] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXPUNCT]);
PL_Posix_ptrs[_CC_SPACE] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXSPACE]);
PL_Posix_ptrs[_CC_UPPER] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXUPPER]);
PL_Posix_ptrs[_CC_VERTSPACE] = NULL;
PL_Posix_ptrs[_CC_WORDCHAR] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXWORD]);
PL_Posix_ptrs[_CC_XDIGIT] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXXDIGIT]);
PL_XPosix_ptrs[CC_ASCII_] = _new_invlist_C_array(uni_prop_ptrs[UNI_ASCII]);
PL_XPosix_ptrs[CC_ALPHANUMERIC_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXALNUM]);
PL_XPosix_ptrs[CC_ALPHA_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXALPHA]);
PL_XPosix_ptrs[CC_BLANK_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXBLANK]);
PL_XPosix_ptrs[CC_CASED_] = _new_invlist_C_array(uni_prop_ptrs[UNI_CASED]);
PL_XPosix_ptrs[CC_CNTRL_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXCNTRL]);
PL_XPosix_ptrs[CC_DIGIT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXDIGIT]);
PL_XPosix_ptrs[CC_GRAPH_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXGRAPH]);
PL_XPosix_ptrs[CC_LOWER_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXLOWER]);
PL_XPosix_ptrs[CC_PRINT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXPRINT]);
PL_XPosix_ptrs[CC_PUNCT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXPUNCT]);
PL_XPosix_ptrs[CC_SPACE_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXSPACE]);
PL_XPosix_ptrs[CC_UPPER_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXUPPER]);
PL_XPosix_ptrs[CC_VERTSPACE_] = _new_invlist_C_array(uni_prop_ptrs[UNI_VERTSPACE]);
PL_XPosix_ptrs[CC_WORDCHAR_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXWORD]);
PL_XPosix_ptrs[CC_XDIGIT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_XPOSIXXDIGIT]);

PL_Posix_ptrs[CC_ASCII_] = _new_invlist_C_array(uni_prop_ptrs[UNI_ASCII]);
PL_Posix_ptrs[CC_ALPHANUMERIC_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXALNUM]);
PL_Posix_ptrs[CC_ALPHA_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXALPHA]);
PL_Posix_ptrs[CC_BLANK_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXBLANK]);
PL_Posix_ptrs[CC_CASED_] = PL_Posix_ptrs[CC_ALPHA_];
PL_Posix_ptrs[CC_CNTRL_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXCNTRL]);
PL_Posix_ptrs[CC_DIGIT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXDIGIT]);
PL_Posix_ptrs[CC_GRAPH_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXGRAPH]);
PL_Posix_ptrs[CC_LOWER_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXLOWER]);
PL_Posix_ptrs[CC_PRINT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXPRINT]);
PL_Posix_ptrs[CC_PUNCT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXPUNCT]);
PL_Posix_ptrs[CC_SPACE_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXSPACE]);
PL_Posix_ptrs[CC_UPPER_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXUPPER]);
PL_Posix_ptrs[CC_VERTSPACE_] = NULL;
PL_Posix_ptrs[CC_WORDCHAR_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXWORD]);
PL_Posix_ptrs[CC_XDIGIT_] = _new_invlist_C_array(uni_prop_ptrs[UNI_POSIXXDIGIT]);

PL_GCB_invlist = _new_invlist_C_array(_Perl_GCB_invlist);
PL_SB_invlist = _new_invlist_C_array(_Perl_SB_invlist);
Expand Down
40 changes: 20 additions & 20 deletions regcomp.h
Expand Up @@ -605,48 +605,48 @@ struct regnode_ssc {
/* Should be synchronized with a table in regprop() */
/* 2n should be the normal one, paired with its complement at 2n+1 */

#define ANYOF_ALPHA ((_CC_ALPHA) * 2)
#define ANYOF_ALPHA ((CC_ALPHA_) * 2)
#define ANYOF_NALPHA ((ANYOF_ALPHA) + 1)
#define ANYOF_ALPHANUMERIC ((_CC_ALPHANUMERIC) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */
#define ANYOF_ALPHANUMERIC ((CC_ALPHANUMERIC_) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */
#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1)
#define ANYOF_ASCII ((_CC_ASCII) * 2)
#define ANYOF_ASCII ((CC_ASCII_) * 2)
#define ANYOF_NASCII ((ANYOF_ASCII) + 1)
#define ANYOF_BLANK ((_CC_BLANK) * 2) /* GNU extension: space and tab: non-vertical space */
#define ANYOF_BLANK ((CC_BLANK_) * 2) /* GNU extension: space and tab: non-vertical space */
#define ANYOF_NBLANK ((ANYOF_BLANK) + 1)
#define ANYOF_CASED ((_CC_CASED) * 2) /* Pseudo class for [:lower:] or
#define ANYOF_CASED ((CC_CASED_) * 2) /* Pseudo class for [:lower:] or
[:upper:] under /i */
#define ANYOF_NCASED ((ANYOF_CASED) + 1)
#define ANYOF_CNTRL ((_CC_CNTRL) * 2)
#define ANYOF_CNTRL ((CC_CNTRL_) * 2)
#define ANYOF_NCNTRL ((ANYOF_CNTRL) + 1)
#define ANYOF_DIGIT ((_CC_DIGIT) * 2) /* \d */
#define ANYOF_DIGIT ((CC_DIGIT_) * 2) /* \d */
#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1)
#define ANYOF_GRAPH ((_CC_GRAPH) * 2)
#define ANYOF_GRAPH ((CC_GRAPH_) * 2)
#define ANYOF_NGRAPH ((ANYOF_GRAPH) + 1)
#define ANYOF_LOWER ((_CC_LOWER) * 2)
#define ANYOF_LOWER ((CC_LOWER_) * 2)
#define ANYOF_NLOWER ((ANYOF_LOWER) + 1)
#define ANYOF_PRINT ((_CC_PRINT) * 2)
#define ANYOF_PRINT ((CC_PRINT_) * 2)
#define ANYOF_NPRINT ((ANYOF_PRINT) + 1)
#define ANYOF_PUNCT ((_CC_PUNCT) * 2)
#define ANYOF_PUNCT ((CC_PUNCT_) * 2)
#define ANYOF_NPUNCT ((ANYOF_PUNCT) + 1)
#define ANYOF_SPACE ((_CC_SPACE) * 2) /* \s */
#define ANYOF_SPACE ((CC_SPACE_) * 2) /* \s */
#define ANYOF_NSPACE ((ANYOF_SPACE) + 1)
#define ANYOF_UPPER ((_CC_UPPER) * 2)
#define ANYOF_UPPER ((CC_UPPER_) * 2)
#define ANYOF_NUPPER ((ANYOF_UPPER) + 1)
#define ANYOF_WORDCHAR ((_CC_WORDCHAR) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, ALNUM */
#define ANYOF_WORDCHAR ((CC_WORDCHAR_) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, ALNUM */
#define ANYOF_NWORDCHAR ((ANYOF_WORDCHAR) + 1)
#define ANYOF_XDIGIT ((_CC_XDIGIT) * 2)
#define ANYOF_XDIGIT ((CC_XDIGIT_) * 2)
#define ANYOF_NXDIGIT ((ANYOF_XDIGIT) + 1)

/* pseudo classes below this, not stored in the class bitmap, but used as flags
during compilation of char classes */

#define ANYOF_VERTWS ((_CC_VERTSPACE) * 2)
#define ANYOF_VERTWS ((CC_VERTSPACE_) * 2)
#define ANYOF_NVERTWS ((ANYOF_VERTWS)+1)

/* It is best if this is the last one, as all above it are stored as bits in a
* bitmap, and it isn't part of that bitmap */
#if _CC_VERTSPACE != _HIGHEST_REGCOMP_DOT_H_SYNC
# error Problem with handy.h _HIGHEST_REGCOMP_DOT_H_SYNC #define
#if CC_VERTSPACE_ != HIGHEST_REGCOMP_DOT_H_SYNC_
# error Problem with handy.h HIGHEST_REGCOMP_DOT_H_SYNC_ #define
#endif

#define ANYOF_POSIXL_MAX (ANYOF_VERTWS) /* So upper loop limit is written:
Expand All @@ -656,7 +656,7 @@ struct regnode_ssc {
#define ANYOF_MAX ANYOF_POSIXL_MAX

#if (ANYOF_POSIXL_MAX > 32) /* Must fit in 32-bit word */
# error Problem with handy.h _CC_foo #defines
# error Problem with handy.h CC_foo_ #defines
#endif

#define ANYOF_HORIZWS ((ANYOF_POSIXL_MAX)+2) /* = (ANYOF_NVERTWS + 1) */
Expand Down Expand Up @@ -1176,7 +1176,7 @@ re.pm, especially to the documentation.
#define FIRST_NON_ASCII_DECIMAL_DIGIT 0x660 /* ARABIC_INDIC_DIGIT_ZERO */

typedef enum {
TRADITIONAL_BOUND = _CC_WORDCHAR,
TRADITIONAL_BOUND = CC_WORDCHAR_,
GCB_BOUND,
LB_BOUND,
SB_BOUND,
Expand Down
6 changes: 3 additions & 3 deletions regen/mk_PL_charclass.pl
Expand Up @@ -13,7 +13,7 @@
# an application to see if the code point "i" has a particular property, it
# just does
# 'PL_charclass[i] & BIT'
# The bit names are of the form '_CC_property_suffix', where 'CC' stands for
# The bit names are of the form 'CC_property_suffix_', where 'CC' stands for
# character class, and 'property' is the corresponding property, and 'suffix'
# is one of '_A' to mean the property is true only if the corresponding code
# point is ASCII, and '_L1' means that the range includes any Latin1
Expand Down Expand Up @@ -277,7 +277,7 @@ sub Punct_and_Symbols {
foreach my $cp (@code_points) {
last if $cp > 0xFF;
$bits[$cp] .= '|' if $bits[$cp];
$bits[$cp] .= "(1U<<_CC_$bit_name)";
$bits[$cp] .= "(1U<<CC_${bit_name}_)";
}
}

Expand Down Expand Up @@ -382,7 +382,7 @@ END
if (@utf_to_i8) {
if ($i8 >= 0xF1) {
$out[$index] .=
'|(1U<<_CC_UTF8_START_BYTE_IS_FOR_AT_LEAST_SURROGATE)';
'|(1U<<CC_UTF8_START_BYTE_IS_FOR_AT_LEAST_SURROGATE_)';
}
}

Expand Down

0 comments on commit 7317497

Please sign in to comment.