Miscellanous name tidies.
This commit is contained in:
parent
99a5f1b2a9
commit
06aa11b428
|
@ -7582,7 +7582,7 @@ memset(re->start_bitmap, 0, 32 * sizeof(uint8_t));
|
||||||
re->blocksize = re_blocksize;
|
re->blocksize = re_blocksize;
|
||||||
re->magic_number = MAGIC_NUMBER;
|
re->magic_number = MAGIC_NUMBER;
|
||||||
re->compile_options = options;
|
re->compile_options = options;
|
||||||
re->pattern_options = cd.external_options;
|
re->overall_options = cd.external_options;
|
||||||
re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cd.external_flags;
|
re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cd.external_flags;
|
||||||
re->limit_match = limit_match;
|
re->limit_match = limit_match;
|
||||||
re->limit_recursion = limit_recursion;
|
re->limit_recursion = limit_recursion;
|
||||||
|
@ -7662,7 +7662,7 @@ of the function here. */
|
||||||
ptr = pattern + skipatstart;
|
ptr = pattern + skipatstart;
|
||||||
code = (PCRE2_UCHAR *)codestart;
|
code = (PCRE2_UCHAR *)codestart;
|
||||||
*code = OP_BRA;
|
*code = OP_BRA;
|
||||||
(void)compile_regex(re->pattern_options, &code, &ptr, &errorcode, FALSE, FALSE,
|
(void)compile_regex(re->overall_options, &code, &ptr, &errorcode, FALSE, FALSE,
|
||||||
0, 0, &firstcu, &firstcuflags, &reqcu, &reqcuflags, NULL, &cd, NULL);
|
0, 0, &firstcu, &firstcuflags, &reqcu, &reqcuflags, NULL, &cd, NULL);
|
||||||
|
|
||||||
re->top_bracket = cd.bracount;
|
re->top_bracket = cd.bracount;
|
||||||
|
@ -7796,15 +7796,15 @@ we can determine that the pattern is anchored by virtue of ^ characters or \A
|
||||||
or anything else, such as starting with non-atomic .* when DOTALL is set and
|
or anything else, such as starting with non-atomic .* when DOTALL is set and
|
||||||
there are no occurrences of *PRUNE or *SKIP. */
|
there are no occurrences of *PRUNE or *SKIP. */
|
||||||
|
|
||||||
if ((re->pattern_options & PCRE2_ANCHORED) == 0 &&
|
if ((re->overall_options & PCRE2_ANCHORED) == 0 &&
|
||||||
is_anchored(codestart, 0, &cd, 0))
|
is_anchored(codestart, 0, &cd, 0))
|
||||||
re->pattern_options |= PCRE2_ANCHORED;
|
re->overall_options |= PCRE2_ANCHORED;
|
||||||
|
|
||||||
/* If the pattern is still not anchored and we do not have a first code unit,
|
/* If the pattern is still not anchored and we do not have a first code unit,
|
||||||
see if there is one that is asserted (these are not saved during the compile
|
see if there is one that is asserted (these are not saved during the compile
|
||||||
because they can cause conflicts with actual literals that follow). */
|
because they can cause conflicts with actual literals that follow). */
|
||||||
|
|
||||||
if ((re->pattern_options & PCRE2_ANCHORED) == 0)
|
if ((re->overall_options & PCRE2_ANCHORED) == 0)
|
||||||
{
|
{
|
||||||
if (firstcuflags < 0)
|
if (firstcuflags < 0)
|
||||||
firstcu = find_firstassertedcu(codestart, &firstcuflags, FALSE);
|
firstcu = find_firstassertedcu(codestart, &firstcuflags, FALSE);
|
||||||
|
@ -7849,7 +7849,7 @@ if ((re->pattern_options & PCRE2_ANCHORED) == 0)
|
||||||
pattern, do this only if it follows a variable length item in the pattern. */
|
pattern, do this only if it follows a variable length item in the pattern. */
|
||||||
|
|
||||||
if (reqcuflags >= 0 &&
|
if (reqcuflags >= 0 &&
|
||||||
((re->pattern_options & PCRE2_ANCHORED) == 0 ||
|
((re->overall_options & PCRE2_ANCHORED) == 0 ||
|
||||||
(reqcuflags & REQ_VARY) != 0))
|
(reqcuflags & REQ_VARY) != 0))
|
||||||
{
|
{
|
||||||
re->last_codeunit = reqcu;
|
re->last_codeunit = reqcu;
|
||||||
|
|
|
@ -574,7 +574,7 @@ typedef struct pcre2_real_code {
|
||||||
size_t blocksize; /* Total (bytes) that was malloc-ed */
|
size_t blocksize; /* Total (bytes) that was malloc-ed */
|
||||||
uint32_t magic_number; /* Paranoid and endianness check */
|
uint32_t magic_number; /* Paranoid and endianness check */
|
||||||
uint32_t compile_options; /* Options passed to pcre2_compile() */
|
uint32_t compile_options; /* Options passed to pcre2_compile() */
|
||||||
uint32_t pattern_options; /* Options taken from the pattern */
|
uint32_t overall_options; /* Options after processing the pattern */
|
||||||
uint32_t flags; /* Various state flags */
|
uint32_t flags; /* Various state flags */
|
||||||
uint32_t limit_match; /* Limit set in the pattern */
|
uint32_t limit_match; /* Limit set in the pattern */
|
||||||
uint32_t limit_recursion; /* Limit set in the pattern */
|
uint32_t limit_recursion; /* Limit set in the pattern */
|
||||||
|
|
|
@ -85,7 +85,7 @@ if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0)
|
||||||
switch(what)
|
switch(what)
|
||||||
{
|
{
|
||||||
case PCRE2_INFO_ALLOPTIONS:
|
case PCRE2_INFO_ALLOPTIONS:
|
||||||
*((int *)where) = re->pattern_options;
|
*((int *)where) = re->overall_options;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCRE2_INFO_ARGOPTIONS:
|
case PCRE2_INFO_ARGOPTIONS:
|
||||||
|
|
|
@ -175,7 +175,7 @@ as an indication. */
|
||||||
#if PCRE2_CODE_UNIT_WIDTH == 32
|
#if PCRE2_CODE_UNIT_WIDTH == 32
|
||||||
fprintf(f, "\\X{%x}", c);
|
fprintf(f, "\\X{%x}", c);
|
||||||
return 0;
|
return 0;
|
||||||
#endif /* PCRE2_CODE_UNIT_WIDTH == 16 */
|
#endif /* PCRE2_CODE_UNIT_WIDTH == 32 */
|
||||||
#endif /* SUPPORT_UTF */
|
#endif /* SUPPORT_UTF */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ for (;;)
|
||||||
|
|
||||||
case OP_DNREF: /* Duplicate named pattern back reference */
|
case OP_DNREF: /* Duplicate named pattern back reference */
|
||||||
case OP_DNREFI:
|
case OP_DNREFI:
|
||||||
if ((re->pattern_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
||||||
{
|
{
|
||||||
int count = GET2(cc, 1+IMM2_SIZE);
|
int count = GET2(cc, 1+IMM2_SIZE);
|
||||||
PCRE2_UCHAR *slot =
|
PCRE2_UCHAR *slot =
|
||||||
|
@ -417,7 +417,7 @@ for (;;)
|
||||||
|
|
||||||
case OP_REF: /* Single back reference */
|
case OP_REF: /* Single back reference */
|
||||||
case OP_REFI:
|
case OP_REFI:
|
||||||
if ((re->pattern_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
|
||||||
{
|
{
|
||||||
ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
|
ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
|
||||||
if (cs == NULL) return -2;
|
if (cs == NULL) return -2;
|
||||||
|
@ -711,7 +711,7 @@ set_nottype_bits(pcre2_real_code *re, int cbit_type, unsigned int table_limit)
|
||||||
register uint32_t c;
|
register uint32_t c;
|
||||||
for (c = 0; c < table_limit; c++)
|
for (c = 0; c < table_limit; c++)
|
||||||
re->start_bitmap[c] |= ~(re->tables[c+cbits_offset+cbit_type]);
|
re->start_bitmap[c] |= ~(re->tables[c+cbits_offset+cbit_type]);
|
||||||
#if defined SUPPORT_UTF && defined PCRE2_CODE_UNIT_WIDTH == 8
|
#if defined SUPPORT_UTF && PCRE2_CODE_UNIT_WIDTH == 8
|
||||||
if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff;
|
if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1396,7 +1396,7 @@ PRIV(study)(pcre2_real_code *re)
|
||||||
{
|
{
|
||||||
int min;
|
int min;
|
||||||
PCRE2_UCHAR *code;
|
PCRE2_UCHAR *code;
|
||||||
BOOL utf = (re->pattern_options & PCRE2_UTF) != 0;
|
BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
|
||||||
|
|
||||||
/* Find start of compiled code */
|
/* Find start of compiled code */
|
||||||
|
|
||||||
|
@ -1407,7 +1407,7 @@ code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
|
||||||
unit, or a multiline pattern that matches only at "line start", there is no
|
unit, or a multiline pattern that matches only at "line start", there is no
|
||||||
point in seeking a list of starting code units. */
|
point in seeking a list of starting code units. */
|
||||||
|
|
||||||
if ((re->pattern_options & PCRE2_ANCHORED) == 0 &&
|
if ((re->overall_options & PCRE2_ANCHORED) == 0 &&
|
||||||
(re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0)
|
(re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0)
|
||||||
{
|
{
|
||||||
int rc = set_start_bits(re, code, utf);
|
int rc = set_start_bits(re, code, utf);
|
||||||
|
|
|
@ -2814,7 +2814,7 @@ Returns: PR_OK continue processing next line
|
||||||
static int
|
static int
|
||||||
show_pattern_info(void)
|
show_pattern_info(void)
|
||||||
{
|
{
|
||||||
uint32_t compile_options, pattern_options;
|
uint32_t compile_options, overall_options;
|
||||||
|
|
||||||
if ((pat_patctl.control & (CTL_BINCODE|CTL_FULLBINCODE)) != 0)
|
if ((pat_patctl.control & (CTL_BINCODE|CTL_FULLBINCODE)) != 0)
|
||||||
{
|
{
|
||||||
|
@ -2902,14 +2902,14 @@ if ((pat_patctl.control & CTL_INFO) != 0)
|
||||||
if (match_empty) fprintf(outfile, "May match empty string\n");
|
if (match_empty) fprintf(outfile, "May match empty string\n");
|
||||||
|
|
||||||
pattern_info(PCRE2_INFO_ARGOPTIONS, &compile_options);
|
pattern_info(PCRE2_INFO_ARGOPTIONS, &compile_options);
|
||||||
pattern_info(PCRE2_INFO_ALLOPTIONS, &pattern_options);
|
pattern_info(PCRE2_INFO_ALLOPTIONS, &overall_options);
|
||||||
|
|
||||||
if ((compile_options|pattern_options) == 0)
|
if ((compile_options|overall_options) == 0)
|
||||||
fprintf(outfile, "No options\n");
|
fprintf(outfile, "No options\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
show_compile_options(compile_options, "Compile options:", "\n");
|
show_compile_options(compile_options, "Compile options:", "\n");
|
||||||
show_compile_options(pattern_options, "Overall options:", "\n");
|
show_compile_options(overall_options, "Overall options:", "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jchanged) fprintf(outfile, "Duplicate name status changes\n");
|
if (jchanged) fprintf(outfile, "Duplicate name status changes\n");
|
||||||
|
|
Loading…
Reference in New Issue