| 73 |
Returns: the minimum length |
Returns: the minimum length |
| 74 |
-1 if \C was encountered |
-1 if \C was encountered |
| 75 |
-2 internal error (missing capturing bracket) |
-2 internal error (missing capturing bracket) |
| 76 |
|
-3 internal error (opcode not listed) |
| 77 |
*/ |
*/ |
| 78 |
|
|
| 79 |
static int |
static int |
| 161 |
case OP_RREF: |
case OP_RREF: |
| 162 |
case OP_NRREF: |
case OP_NRREF: |
| 163 |
case OP_DEF: |
case OP_DEF: |
|
case OP_OPT: |
|
| 164 |
case OP_CALLOUT: |
case OP_CALLOUT: |
| 165 |
case OP_SOD: |
case OP_SOD: |
| 166 |
case OP_SOM: |
case OP_SOM: |
| 167 |
case OP_EOD: |
case OP_EOD: |
| 168 |
case OP_EODN: |
case OP_EODN: |
| 169 |
case OP_CIRC: |
case OP_CIRC: |
| 170 |
|
case OP_CIRCM: |
| 171 |
case OP_DOLL: |
case OP_DOLL: |
| 172 |
|
case OP_DOLLM: |
| 173 |
case OP_NOT_WORD_BOUNDARY: |
case OP_NOT_WORD_BOUNDARY: |
| 174 |
case OP_WORD_BOUNDARY: |
case OP_WORD_BOUNDARY: |
| 175 |
cc += _pcre_OP_lengths[*cc]; |
cc += _pcre_OP_lengths[*cc]; |
| 188 |
/* Handle literal characters and + repetitions */ |
/* Handle literal characters and + repetitions */ |
| 189 |
|
|
| 190 |
case OP_CHAR: |
case OP_CHAR: |
| 191 |
case OP_CHARNC: |
case OP_CHARI: |
| 192 |
case OP_NOT: |
case OP_NOT: |
| 193 |
|
case OP_NOTI: |
| 194 |
case OP_PLUS: |
case OP_PLUS: |
| 195 |
|
case OP_PLUSI: |
| 196 |
case OP_MINPLUS: |
case OP_MINPLUS: |
| 197 |
|
case OP_MINPLUSI: |
| 198 |
case OP_POSPLUS: |
case OP_POSPLUS: |
| 199 |
|
case OP_POSPLUSI: |
| 200 |
case OP_NOTPLUS: |
case OP_NOTPLUS: |
| 201 |
|
case OP_NOTPLUSI: |
| 202 |
case OP_NOTMINPLUS: |
case OP_NOTMINPLUS: |
| 203 |
|
case OP_NOTMINPLUSI: |
| 204 |
case OP_NOTPOSPLUS: |
case OP_NOTPOSPLUS: |
| 205 |
|
case OP_NOTPOSPLUSI: |
| 206 |
branchlength++; |
branchlength++; |
| 207 |
cc += 2; |
cc += 2; |
| 208 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 221 |
need to skip over a multibyte character in UTF8 mode. */ |
need to skip over a multibyte character in UTF8 mode. */ |
| 222 |
|
|
| 223 |
case OP_EXACT: |
case OP_EXACT: |
| 224 |
|
case OP_EXACTI: |
| 225 |
case OP_NOTEXACT: |
case OP_NOTEXACT: |
| 226 |
|
case OP_NOTEXACTI: |
| 227 |
branchlength += GET2(cc,1); |
branchlength += GET2(cc,1); |
| 228 |
cc += 4; |
cc += 4; |
| 229 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 348 |
that case we must set the minimum length to zero. */ |
that case we must set the minimum length to zero. */ |
| 349 |
|
|
| 350 |
case OP_REF: |
case OP_REF: |
| 351 |
|
case OP_REFI: |
| 352 |
if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) |
if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) |
| 353 |
{ |
{ |
| 354 |
ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1)); |
ce = cs = (uschar *)_pcre_find_bracket(startcode, utf8, GET2(cc, 1)); |
| 403 |
|
|
| 404 |
/* Anything else does not or need not match a character. We can get the |
/* Anything else does not or need not match a character. We can get the |
| 405 |
item's length from the table, but for those that can match zero occurrences |
item's length from the table, but for those that can match zero occurrences |
| 406 |
of a character, we must take special action for UTF-8 characters. */ |
of a character, we must take special action for UTF-8 characters. As it |
| 407 |
|
happens, the "NOT" versions of these opcodes are used at present only for |
| 408 |
|
ASCII characters, so they could be omitted from this list. However, in |
| 409 |
|
future that may change, so we include them here so as not to leave a |
| 410 |
|
gotcha for a future maintainer. */ |
| 411 |
|
|
| 412 |
case OP_UPTO: |
case OP_UPTO: |
| 413 |
|
case OP_UPTOI: |
| 414 |
case OP_NOTUPTO: |
case OP_NOTUPTO: |
| 415 |
|
case OP_NOTUPTOI: |
| 416 |
case OP_MINUPTO: |
case OP_MINUPTO: |
| 417 |
|
case OP_MINUPTOI: |
| 418 |
case OP_NOTMINUPTO: |
case OP_NOTMINUPTO: |
| 419 |
|
case OP_NOTMINUPTOI: |
| 420 |
case OP_POSUPTO: |
case OP_POSUPTO: |
| 421 |
|
case OP_POSUPTOI: |
| 422 |
|
case OP_NOTPOSUPTO: |
| 423 |
|
case OP_NOTPOSUPTOI: |
| 424 |
|
|
| 425 |
case OP_STAR: |
case OP_STAR: |
| 426 |
|
case OP_STARI: |
| 427 |
|
case OP_NOTSTAR: |
| 428 |
|
case OP_NOTSTARI: |
| 429 |
case OP_MINSTAR: |
case OP_MINSTAR: |
| 430 |
|
case OP_MINSTARI: |
| 431 |
case OP_NOTMINSTAR: |
case OP_NOTMINSTAR: |
| 432 |
|
case OP_NOTMINSTARI: |
| 433 |
case OP_POSSTAR: |
case OP_POSSTAR: |
| 434 |
|
case OP_POSSTARI: |
| 435 |
case OP_NOTPOSSTAR: |
case OP_NOTPOSSTAR: |
| 436 |
|
case OP_NOTPOSSTARI: |
| 437 |
|
|
| 438 |
case OP_QUERY: |
case OP_QUERY: |
| 439 |
|
case OP_QUERYI: |
| 440 |
|
case OP_NOTQUERY: |
| 441 |
|
case OP_NOTQUERYI: |
| 442 |
case OP_MINQUERY: |
case OP_MINQUERY: |
| 443 |
|
case OP_MINQUERYI: |
| 444 |
case OP_NOTMINQUERY: |
case OP_NOTMINQUERY: |
| 445 |
|
case OP_NOTMINQUERYI: |
| 446 |
case OP_POSQUERY: |
case OP_POSQUERY: |
| 447 |
|
case OP_POSQUERYI: |
| 448 |
case OP_NOTPOSQUERY: |
case OP_NOTPOSQUERY: |
| 449 |
|
case OP_NOTPOSQUERYI: |
| 450 |
|
|
| 451 |
cc += _pcre_OP_lengths[op]; |
cc += _pcre_OP_lengths[op]; |
| 452 |
#ifdef SUPPORT_UTF8 |
#ifdef SUPPORT_UTF8 |
| 453 |
if (utf8 && cc[-1] >= 0xc0) cc += _pcre_utf8_table4[cc[-1] & 0x3f]; |
if (utf8 && cc[-1] >= 0xc0) cc += _pcre_utf8_table4[cc[-1] & 0x3f]; |
| 459 |
case OP_MARK: |
case OP_MARK: |
| 460 |
case OP_PRUNE_ARG: |
case OP_PRUNE_ARG: |
| 461 |
case OP_SKIP_ARG: |
case OP_SKIP_ARG: |
|
case OP_THEN_ARG: |
|
| 462 |
cc += _pcre_OP_lengths[op] + cc[1]; |
cc += _pcre_OP_lengths[op] + cc[1]; |
| 463 |
break; |
break; |
| 464 |
|
|
| 465 |
/* For the record, these are the opcodes that are matched by "default": |
case OP_THEN_ARG: |
| 466 |
OP_ACCEPT, OP_CLOSE, OP_COMMIT, OP_FAIL, OP_PRUNE, OP_SET_SOM, OP_SKIP, |
cc += _pcre_OP_lengths[op] + cc[1+LINK_SIZE]; |
| 467 |
OP_THEN. */ |
break; |
| 468 |
|
|
| 469 |
|
/* The remaining opcodes are just skipped over. */ |
| 470 |
|
|
| 471 |
default: |
case OP_ACCEPT: |
| 472 |
|
case OP_CLOSE: |
| 473 |
|
case OP_COMMIT: |
| 474 |
|
case OP_FAIL: |
| 475 |
|
case OP_PRUNE: |
| 476 |
|
case OP_SET_SOM: |
| 477 |
|
case OP_SKIP: |
| 478 |
|
case OP_THEN: |
| 479 |
cc += _pcre_OP_lengths[op]; |
cc += _pcre_OP_lengths[op]; |
| 480 |
break; |
break; |
| 481 |
|
|
| 482 |
|
/* This should not occur: we list all opcodes explicitly so that when |
| 483 |
|
new ones get added they are properly considered. */ |
| 484 |
|
|
| 485 |
|
default: |
| 486 |
|
return -3; |
| 487 |
} |
} |
| 488 |
} |
} |
| 489 |
/* Control never gets here */ |
/* Control never gets here */ |
| 558 |
start_bits the starting bitmap |
start_bits the starting bitmap |
| 559 |
cbit type the type of character wanted |
cbit type the type of character wanted |
| 560 |
table_limit 32 for non-UTF-8; 16 for UTF-8 |
table_limit 32 for non-UTF-8; 16 for UTF-8 |
| 561 |
cd the block with char table pointers |
cd the block with char table pointers |
| 562 |
|
|
| 563 |
Returns: nothing |
Returns: nothing |
| 564 |
*/ |
*/ |
| 567 |
set_type_bits(uschar *start_bits, int cbit_type, int table_limit, |
set_type_bits(uschar *start_bits, int cbit_type, int table_limit, |
| 568 |
compile_data *cd) |
compile_data *cd) |
| 569 |
{ |
{ |
| 570 |
register int c; |
register int c; |
| 571 |
for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type]; |
for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type]; |
| 572 |
if (table_limit == 32) return; |
if (table_limit == 32) return; |
| 573 |
for (c = 128; c < 256; c++) |
for (c = 128; c < 256; c++) |
| 576 |
{ |
{ |
| 577 |
uschar buff[8]; |
uschar buff[8]; |
| 578 |
(void)_pcre_ord2utf8(c, buff); |
(void)_pcre_ord2utf8(c, buff); |
| 579 |
SET_BIT(buff[0]); |
SET_BIT(buff[0]); |
| 580 |
} |
} |
| 581 |
} |
} |
| 582 |
} |
} |
| 583 |
|
|
| 584 |
|
|
| 589 |
/* This function sets starting bits for a negative character type such as \D. |
/* This function sets starting bits for a negative character type such as \D. |
| 590 |
In UTF-8 mode, we can only do a direct setting for bytes less than 128, as |
In UTF-8 mode, we can only do a direct setting for bytes less than 128, as |
| 591 |
otherwise there can be confusion with bytes in the middle of UTF-8 characters. |
otherwise there can be confusion with bytes in the middle of UTF-8 characters. |
| 592 |
Unlike in the positive case, where we can set appropriate starting bits for |
Unlike in the positive case, where we can set appropriate starting bits for |
| 593 |
specific high-valued UTF-8 characters, in this case we have to set the bits for |
specific high-valued UTF-8 characters, in this case we have to set the bits for |
| 594 |
all high-valued characters. The lowest is 0xc2, but we overkill by starting at |
all high-valued characters. The lowest is 0xc2, but we overkill by starting at |
| 595 |
0xc0 (192) for simplicity. |
0xc0 (192) for simplicity. |
| 596 |
|
|
| 597 |
Arguments: |
Arguments: |
| 598 |
start_bits the starting bitmap |
start_bits the starting bitmap |
| 599 |
cbit type the type of character wanted |
cbit type the type of character wanted |
| 600 |
table_limit 32 for non-UTF-8; 16 for UTF-8 |
table_limit 32 for non-UTF-8; 16 for UTF-8 |
| 601 |
cd the block with char table pointers |
cd the block with char table pointers |
| 602 |
|
|
| 603 |
Returns: nothing |
Returns: nothing |
| 604 |
*/ |
*/ |
| 607 |
set_nottype_bits(uschar *start_bits, int cbit_type, int table_limit, |
set_nottype_bits(uschar *start_bits, int cbit_type, int table_limit, |
| 608 |
compile_data *cd) |
compile_data *cd) |
| 609 |
{ |
{ |
| 610 |
register int c; |
register int c; |
| 611 |
for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type]; |
for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type]; |
| 612 |
if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff; |
if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff; |
| 613 |
} |
} |
| 629 |
Arguments: |
Arguments: |
| 630 |
code points to an expression |
code points to an expression |
| 631 |
start_bits points to a 32-byte table, initialized to 0 |
start_bits points to a 32-byte table, initialized to 0 |
|
caseless the current state of the caseless flag |
|
| 632 |
utf8 TRUE if in UTF-8 mode |
utf8 TRUE if in UTF-8 mode |
| 633 |
cd the block with char table pointers |
cd the block with char table pointers |
| 634 |
|
|
| 638 |
*/ |
*/ |
| 639 |
|
|
| 640 |
static int |
static int |
| 641 |
set_start_bits(const uschar *code, uschar *start_bits, BOOL caseless, |
set_start_bits(const uschar *code, uschar *start_bits, BOOL utf8, |
| 642 |
BOOL utf8, compile_data *cd) |
compile_data *cd) |
| 643 |
{ |
{ |
| 644 |
register int c; |
register int c; |
| 645 |
int yield = SSB_DONE; |
int yield = SSB_DONE; |
| 688 |
case OP_SCBRA: |
case OP_SCBRA: |
| 689 |
case OP_ONCE: |
case OP_ONCE: |
| 690 |
case OP_ASSERT: |
case OP_ASSERT: |
| 691 |
rc = set_start_bits(tcode, start_bits, caseless, utf8, cd); |
rc = set_start_bits(tcode, start_bits, utf8, cd); |
| 692 |
if (rc == SSB_FAIL) return SSB_FAIL; |
if (rc == SSB_FAIL) return SSB_FAIL; |
| 693 |
if (rc == SSB_DONE) try_next = FALSE; else |
if (rc == SSB_DONE) try_next = FALSE; else |
| 694 |
{ |
{ |
| 729 |
tcode += 1 + LINK_SIZE; |
tcode += 1 + LINK_SIZE; |
| 730 |
break; |
break; |
| 731 |
|
|
|
/* Skip over an option setting, changing the caseless flag */ |
|
|
|
|
|
case OP_OPT: |
|
|
caseless = (tcode[1] & PCRE_CASELESS) != 0; |
|
|
tcode += 2; |
|
|
break; |
|
|
|
|
| 732 |
/* BRAZERO does the bracket, but carries on. */ |
/* BRAZERO does the bracket, but carries on. */ |
| 733 |
|
|
| 734 |
case OP_BRAZERO: |
case OP_BRAZERO: |
| 735 |
case OP_BRAMINZERO: |
case OP_BRAMINZERO: |
| 736 |
if (set_start_bits(++tcode, start_bits, caseless, utf8, cd) == SSB_FAIL) |
if (set_start_bits(++tcode, start_bits, utf8, cd) == SSB_FAIL) |
| 737 |
return SSB_FAIL; |
return SSB_FAIL; |
| 738 |
/* ========================================================================= |
/* ========================================================================= |
| 739 |
See the comment at the head of this function concerning the next line, |
See the comment at the head of this function concerning the next line, |
| 760 |
case OP_QUERY: |
case OP_QUERY: |
| 761 |
case OP_MINQUERY: |
case OP_MINQUERY: |
| 762 |
case OP_POSQUERY: |
case OP_POSQUERY: |
| 763 |
tcode = set_table_bit(start_bits, tcode + 1, caseless, cd, utf8); |
tcode = set_table_bit(start_bits, tcode + 1, FALSE, cd, utf8); |
| 764 |
|
break; |
| 765 |
|
|
| 766 |
|
case OP_STARI: |
| 767 |
|
case OP_MINSTARI: |
| 768 |
|
case OP_POSSTARI: |
| 769 |
|
case OP_QUERYI: |
| 770 |
|
case OP_MINQUERYI: |
| 771 |
|
case OP_POSQUERYI: |
| 772 |
|
tcode = set_table_bit(start_bits, tcode + 1, TRUE, cd, utf8); |
| 773 |
break; |
break; |
| 774 |
|
|
| 775 |
/* Single-char upto sets the bit and tries the next */ |
/* Single-char upto sets the bit and tries the next */ |
| 777 |
case OP_UPTO: |
case OP_UPTO: |
| 778 |
case OP_MINUPTO: |
case OP_MINUPTO: |
| 779 |
case OP_POSUPTO: |
case OP_POSUPTO: |
| 780 |
tcode = set_table_bit(start_bits, tcode + 3, caseless, cd, utf8); |
tcode = set_table_bit(start_bits, tcode + 3, FALSE, cd, utf8); |
| 781 |
|
break; |
| 782 |
|
|
| 783 |
|
case OP_UPTOI: |
| 784 |
|
case OP_MINUPTOI: |
| 785 |
|
case OP_POSUPTOI: |
| 786 |
|
tcode = set_table_bit(start_bits, tcode + 3, TRUE, cd, utf8); |
| 787 |
break; |
break; |
| 788 |
|
|
| 789 |
/* At least one single char sets the bit and stops */ |
/* At least one single char sets the bit and stops */ |
| 790 |
|
|
| 791 |
case OP_EXACT: /* Fall through */ |
case OP_EXACT: |
| 792 |
tcode += 2; |
tcode += 2; |
| 793 |
|
/* Fall through */ |
| 794 |
case OP_CHAR: |
case OP_CHAR: |
|
case OP_CHARNC: |
|
| 795 |
case OP_PLUS: |
case OP_PLUS: |
| 796 |
case OP_MINPLUS: |
case OP_MINPLUS: |
| 797 |
case OP_POSPLUS: |
case OP_POSPLUS: |
| 798 |
(void)set_table_bit(start_bits, tcode + 1, caseless, cd, utf8); |
(void)set_table_bit(start_bits, tcode + 1, FALSE, cd, utf8); |
| 799 |
|
try_next = FALSE; |
| 800 |
|
break; |
| 801 |
|
|
| 802 |
|
case OP_EXACTI: |
| 803 |
|
tcode += 2; |
| 804 |
|
/* Fall through */ |
| 805 |
|
case OP_CHARI: |
| 806 |
|
case OP_PLUSI: |
| 807 |
|
case OP_MINPLUSI: |
| 808 |
|
case OP_POSPLUSI: |
| 809 |
|
(void)set_table_bit(start_bits, tcode + 1, TRUE, cd, utf8); |
| 810 |
try_next = FALSE; |
try_next = FALSE; |
| 811 |
break; |
break; |
| 812 |
|
|
| 821 |
SET_BIT(0x20); |
SET_BIT(0x20); |
| 822 |
if (utf8) |
if (utf8) |
| 823 |
{ |
{ |
| 824 |
SET_BIT(0xC2); /* For U+00A0 */ |
SET_BIT(0xC2); /* For U+00A0 */ |
| 825 |
SET_BIT(0xE1); /* For U+1680, U+180E */ |
SET_BIT(0xE1); /* For U+1680, U+180E */ |
| 826 |
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ |
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ |
| 827 |
SET_BIT(0xE3); /* For U+3000 */ |
SET_BIT(0xE3); /* For U+3000 */ |
| 836 |
SET_BIT(0x0B); |
SET_BIT(0x0B); |
| 837 |
SET_BIT(0x0C); |
SET_BIT(0x0C); |
| 838 |
SET_BIT(0x0D); |
SET_BIT(0x0D); |
| 839 |
if (utf8) |
if (utf8) |
| 840 |
{ |
{ |
| 841 |
SET_BIT(0xC2); /* For U+0085 */ |
SET_BIT(0xC2); /* For U+0085 */ |
| 842 |
SET_BIT(0xE2); /* For U+2028, U+2029 */ |
SET_BIT(0xE2); /* For U+2028, U+2029 */ |
| 843 |
} |
} |
| 844 |
else SET_BIT(0x85); |
else SET_BIT(0x85); |
| 845 |
try_next = FALSE; |
try_next = FALSE; |
| 846 |
break; |
break; |
| 847 |
|
|
| 848 |
/* Single character types set the bits and stop. Note that if PCRE_UCP |
/* Single character types set the bits and stop. Note that if PCRE_UCP |
| 849 |
is set, we do not see these op codes because \d etc are converted to |
is set, we do not see these op codes because \d etc are converted to |
| 850 |
properties. Therefore, these apply in the case when only characters less |
properties. Therefore, these apply in the case when only characters less |
| 851 |
than 256 are recognized to match the types. */ |
than 256 are recognized to match the types. */ |
| 852 |
|
|
| 853 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
| 888 |
set_type_bits(start_bits, cbit_word, table_limit, cd); |
set_type_bits(start_bits, cbit_word, table_limit, cd); |
| 889 |
try_next = FALSE; |
try_next = FALSE; |
| 890 |
break; |
break; |
| 891 |
|
|
| 892 |
/* One or more character type fudges the pointer and restarts, knowing |
/* One or more character type fudges the pointer and restarts, knowing |
| 893 |
it will hit a single character type and stop there. */ |
it will hit a single character type and stop there. */ |
| 894 |
|
|
| 928 |
SET_BIT(0x20); |
SET_BIT(0x20); |
| 929 |
if (utf8) |
if (utf8) |
| 930 |
{ |
{ |
| 931 |
SET_BIT(0xC2); /* For U+00A0 */ |
SET_BIT(0xC2); /* For U+00A0 */ |
| 932 |
SET_BIT(0xE1); /* For U+1680, U+180E */ |
SET_BIT(0xE1); /* For U+1680, U+180E */ |
| 933 |
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ |
SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ |
| 934 |
SET_BIT(0xE3); /* For U+3000 */ |
SET_BIT(0xE3); /* For U+3000 */ |
| 942 |
SET_BIT(0x0B); |
SET_BIT(0x0B); |
| 943 |
SET_BIT(0x0C); |
SET_BIT(0x0C); |
| 944 |
SET_BIT(0x0D); |
SET_BIT(0x0D); |
| 945 |
if (utf8) |
if (utf8) |
| 946 |
{ |
{ |
| 947 |
SET_BIT(0xC2); /* For U+0085 */ |
SET_BIT(0xC2); /* For U+0085 */ |
| 948 |
SET_BIT(0xE2); /* For U+2028, U+2029 */ |
SET_BIT(0xE2); /* For U+2028, U+2029 */ |
| 949 |
} |
} |
| 950 |
else SET_BIT(0x85); |
else SET_BIT(0x85); |
| 951 |
break; |
break; |
| 952 |
|
|
| 963 |
|
|
| 964 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
| 965 |
set_nottype_bits(start_bits, cbit_space, table_limit, cd); |
set_nottype_bits(start_bits, cbit_space, table_limit, cd); |
| 966 |
start_bits[1] |= 0x08; |
start_bits[1] |= 0x08; |
| 967 |
break; |
break; |
| 968 |
|
|
| 969 |
/* The cbit_space table has vertical tab as whitespace; we have to |
/* The cbit_space table has vertical tab as whitespace; we have to |
| 1143 |
/* See if we can find a fixed set of initial characters for the pattern. */ |
/* See if we can find a fixed set of initial characters for the pattern. */ |
| 1144 |
|
|
| 1145 |
memset(start_bits, 0, 32 * sizeof(uschar)); |
memset(start_bits, 0, 32 * sizeof(uschar)); |
| 1146 |
bits_set = set_start_bits(code, start_bits, |
bits_set = set_start_bits(code, start_bits, (re->options & PCRE_UTF8) != 0, |
|
(re->options & PCRE_CASELESS) != 0, (re->options & PCRE_UTF8) != 0, |
|
| 1147 |
&compile_block) == SSB_DONE; |
&compile_block) == SSB_DONE; |
| 1148 |
} |
} |
| 1149 |
|
|
| 1150 |
/* Find the minimum length of subject string. */ |
/* Find the minimum length of subject string. */ |
| 1151 |
|
|
| 1152 |
min = find_minlength(code, code, re->options); |
switch(min = find_minlength(code, code, re->options)) |
| 1153 |
|
{ |
| 1154 |
|
case -2: *errorptr = "internal error: missing capturing bracket"; break; |
| 1155 |
|
case -3: *errorptr = "internal error: opcode not recognized"; break; |
| 1156 |
|
default: break; |
| 1157 |
|
} |
| 1158 |
|
|
| 1159 |
/* Return NULL if no optimization is possible. */ |
/* Return NULL if no optimization is possible. */ |
| 1160 |
|
|