| 145 |
compile_regex(int, int, int *, uschar **, const uschar **, const char **, |
compile_regex(int, int, int *, uschar **, const uschar **, const char **, |
| 146 |
BOOL, int, int *, int *, compile_data *); |
BOOL, int, int *, int *, compile_data *); |
| 147 |
|
|
| 148 |
|
/* Structure for building a chain of data that actually lives on the |
| 149 |
|
stack, for holding the values of the subject pointer at the start of each |
| 150 |
|
subpattern, so as to detect when an empty string has been matched by a |
| 151 |
|
subpattern - to break infinite loops. */ |
| 152 |
|
|
| 153 |
|
typedef struct eptrblock { |
| 154 |
|
struct eptrblock *prev; |
| 155 |
|
const uschar *saved_eptr; |
| 156 |
|
} eptrblock; |
| 157 |
|
|
| 158 |
|
/* Flag bits for the match() function */ |
| 159 |
|
|
| 160 |
|
#define match_condassert 0x01 /* Called to check a condition assertion */ |
| 161 |
|
#define match_isgroup 0x02 /* Set if start of bracketed group */ |
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
/************************************************* |
/************************************************* |
| 870 |
if ((cd->ctypes[c] & ctype_space) != 0) continue; |
if ((cd->ctypes[c] & ctype_space) != 0) continue; |
| 871 |
if (c == '#') |
if (c == '#') |
| 872 |
{ |
{ |
| 873 |
while ((c = *(++ptr)) != 0 && c != '\n'); |
/* The space before the ; is to avoid a warning on a silly compiler |
| 874 |
|
on the Macintosh. */ |
| 875 |
|
while ((c = *(++ptr)) != 0 && c != '\n') ; |
| 876 |
continue; |
continue; |
| 877 |
} |
} |
| 878 |
} |
} |
| 1812 |
if ((cd->ctypes[c] & ctype_space) != 0) continue; |
if ((cd->ctypes[c] & ctype_space) != 0) continue; |
| 1813 |
if (c == '#') |
if (c == '#') |
| 1814 |
{ |
{ |
| 1815 |
while ((c = *(++ptr)) != 0 && c != '\n'); |
/* The space before the ; is to avoid a warning on a silly compiler |
| 1816 |
|
on the Macintosh. */ |
| 1817 |
|
while ((c = *(++ptr)) != 0 && c != '\n') ; |
| 1818 |
if (c == 0) break; |
if (c == 0) break; |
| 1819 |
continue; |
continue; |
| 1820 |
} |
} |
| 2332 |
if ((compile_block.ctypes[c] & ctype_space) != 0) continue; |
if ((compile_block.ctypes[c] & ctype_space) != 0) continue; |
| 2333 |
if (c == '#') |
if (c == '#') |
| 2334 |
{ |
{ |
| 2335 |
while ((c = *(++ptr)) != 0 && c != '\n'); |
/* The space before the ; is to avoid a warning on a silly compiler |
| 2336 |
|
on the Macintosh. */ |
| 2337 |
|
while ((c = *(++ptr)) != 0 && c != '\n') ; |
| 2338 |
continue; |
continue; |
| 2339 |
} |
} |
| 2340 |
} |
} |
| 2544 |
else /* An assertion must follow */ |
else /* An assertion must follow */ |
| 2545 |
{ |
{ |
| 2546 |
ptr++; /* Can treat like ':' as far as spacing is concerned */ |
ptr++; /* Can treat like ':' as far as spacing is concerned */ |
| 2547 |
|
if (ptr[2] != '?' || |
| 2548 |
if (ptr[2] != '?' || strchr("=!<", ptr[3]) == NULL) |
(ptr[3] != '=' && ptr[3] != '!' && ptr[3] != '<') ) |
| 2549 |
{ |
{ |
| 2550 |
ptr += 2; /* To get right offset in message */ |
ptr += 2; /* To get right offset in message */ |
| 2551 |
*errorptr = ERR28; |
*errorptr = ERR28; |
| 2758 |
if ((compile_block.ctypes[c] & ctype_space) != 0) continue; |
if ((compile_block.ctypes[c] & ctype_space) != 0) continue; |
| 2759 |
if (c == '#') |
if (c == '#') |
| 2760 |
{ |
{ |
| 2761 |
while ((c = *(++ptr)) != 0 && c != '\n'); |
/* The space before the ; is to avoid a warning on a silly compiler |
| 2762 |
|
on the Macintosh. */ |
| 2763 |
|
while ((c = *(++ptr)) != 0 && c != '\n') ; |
| 2764 |
continue; |
continue; |
| 2765 |
} |
} |
| 2766 |
} |
} |
| 3218 |
offset_top current top pointer |
offset_top current top pointer |
| 3219 |
md pointer to "static" info for the match |
md pointer to "static" info for the match |
| 3220 |
ims current /i, /m, and /s options |
ims current /i, /m, and /s options |
| 3221 |
condassert TRUE if called to check a condition assertion |
eptrb pointer to chain of blocks containing eptr at start of |
| 3222 |
eptrb eptr at start of last bracket |
brackets - for testing for empty matches |
| 3223 |
|
flags can contain |
| 3224 |
|
match_condassert - this is an assertion condition |
| 3225 |
|
match_isgroup - this is the start of a bracketed group |
| 3226 |
|
|
| 3227 |
Returns: TRUE if matched |
Returns: TRUE if matched |
| 3228 |
*/ |
*/ |
| 3229 |
|
|
| 3230 |
static BOOL |
static BOOL |
| 3231 |
match(register const uschar *eptr, register const uschar *ecode, |
match(register const uschar *eptr, register const uschar *ecode, |
| 3232 |
int offset_top, match_data *md, unsigned long int ims, BOOL condassert, |
int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb, |
| 3233 |
const uschar *eptrb) |
int flags) |
| 3234 |
{ |
{ |
| 3235 |
unsigned long int original_ims = ims; /* Save for resetting on ')' */ |
unsigned long int original_ims = ims; /* Save for resetting on ')' */ |
| 3236 |
|
eptrblock newptrb; |
| 3237 |
|
|
| 3238 |
|
/* At the start of a bracketed group, add the current subject pointer to the |
| 3239 |
|
stack of such pointers, to be re-instated at the end of the group when we hit |
| 3240 |
|
the closing ket. When match() is called in other circumstances, we don't add to |
| 3241 |
|
the stack. */ |
| 3242 |
|
|
| 3243 |
|
if ((flags & match_isgroup) != 0) |
| 3244 |
|
{ |
| 3245 |
|
newptrb.prev = eptrb; |
| 3246 |
|
newptrb.saved_eptr = eptr; |
| 3247 |
|
eptrb = &newptrb; |
| 3248 |
|
} |
| 3249 |
|
|
| 3250 |
|
/* Now start processing the operations. */ |
| 3251 |
|
|
| 3252 |
for (;;) |
for (;;) |
| 3253 |
{ |
{ |
| 3293 |
|
|
| 3294 |
do |
do |
| 3295 |
{ |
{ |
| 3296 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr)) return TRUE; |
if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup)) |
| 3297 |
|
return TRUE; |
| 3298 |
ecode += (ecode[1] << 8) + ecode[2]; |
ecode += (ecode[1] << 8) + ecode[2]; |
| 3299 |
} |
} |
| 3300 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 3320 |
DPRINTF(("start bracket 0\n")); |
DPRINTF(("start bracket 0\n")); |
| 3321 |
do |
do |
| 3322 |
{ |
{ |
| 3323 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr)) return TRUE; |
if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup)) |
| 3324 |
|
return TRUE; |
| 3325 |
ecode += (ecode[1] << 8) + ecode[2]; |
ecode += (ecode[1] << 8) + ecode[2]; |
| 3326 |
} |
} |
| 3327 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 3340 |
return match(eptr, |
return match(eptr, |
| 3341 |
ecode + ((offset < offset_top && md->offset_vector[offset] >= 0)? |
ecode + ((offset < offset_top && md->offset_vector[offset] >= 0)? |
| 3342 |
5 : 3 + (ecode[1] << 8) + ecode[2]), |
5 : 3 + (ecode[1] << 8) + ecode[2]), |
| 3343 |
offset_top, md, ims, FALSE, eptr); |
offset_top, md, ims, eptrb, match_isgroup); |
| 3344 |
} |
} |
| 3345 |
|
|
| 3346 |
/* The condition is an assertion. Call match() to evaluate it - setting |
/* The condition is an assertion. Call match() to evaluate it - setting |
| 3348 |
|
|
| 3349 |
else |
else |
| 3350 |
{ |
{ |
| 3351 |
if (match(eptr, ecode+3, offset_top, md, ims, TRUE, NULL)) |
if (match(eptr, ecode+3, offset_top, md, ims, NULL, |
| 3352 |
|
match_condassert | match_isgroup)) |
| 3353 |
{ |
{ |
| 3354 |
ecode += 3 + (ecode[4] << 8) + ecode[5]; |
ecode += 3 + (ecode[4] << 8) + ecode[5]; |
| 3355 |
while (*ecode == OP_ALT) ecode += (ecode[1] << 8) + ecode[2]; |
while (*ecode == OP_ALT) ecode += (ecode[1] << 8) + ecode[2]; |
| 3356 |
} |
} |
| 3357 |
else ecode += (ecode[1] << 8) + ecode[2]; |
else ecode += (ecode[1] << 8) + ecode[2]; |
| 3358 |
return match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr); |
return match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup); |
| 3359 |
} |
} |
| 3360 |
/* Control never reaches here */ |
/* Control never reaches here */ |
| 3361 |
|
|
| 3392 |
case OP_ASSERTBACK: |
case OP_ASSERTBACK: |
| 3393 |
do |
do |
| 3394 |
{ |
{ |
| 3395 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, NULL)) break; |
if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup)) break; |
| 3396 |
ecode += (ecode[1] << 8) + ecode[2]; |
ecode += (ecode[1] << 8) + ecode[2]; |
| 3397 |
} |
} |
| 3398 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 3400 |
|
|
| 3401 |
/* If checking an assertion for a condition, return TRUE. */ |
/* If checking an assertion for a condition, return TRUE. */ |
| 3402 |
|
|
| 3403 |
if (condassert) return TRUE; |
if ((flags & match_condassert) != 0) return TRUE; |
| 3404 |
|
|
| 3405 |
/* Continue from after the assertion, updating the offsets high water |
/* Continue from after the assertion, updating the offsets high water |
| 3406 |
mark, since extracts may have been taken during the assertion. */ |
mark, since extracts may have been taken during the assertion. */ |
| 3416 |
case OP_ASSERTBACK_NOT: |
case OP_ASSERTBACK_NOT: |
| 3417 |
do |
do |
| 3418 |
{ |
{ |
| 3419 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, NULL)) return FALSE; |
if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup)) |
| 3420 |
|
return FALSE; |
| 3421 |
ecode += (ecode[1] << 8) + ecode[2]; |
ecode += (ecode[1] << 8) + ecode[2]; |
| 3422 |
} |
} |
| 3423 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 3424 |
|
|
| 3425 |
if (condassert) return TRUE; |
if ((flags & match_condassert) != 0) return TRUE; |
| 3426 |
|
|
| 3427 |
ecode += 3; |
ecode += 3; |
| 3428 |
continue; |
continue; |
| 3429 |
|
|
| 3469 |
|
|
| 3470 |
for (i = 1; i <= c; i++) |
for (i = 1; i <= c; i++) |
| 3471 |
save[i] = md->offset_vector[md->offset_end - i]; |
save[i] = md->offset_vector[md->offset_end - i]; |
| 3472 |
rc = match(eptr, md->start_pattern, offset_top, md, ims, FALSE, eptrb); |
rc = match(eptr, md->start_pattern, offset_top, md, ims, eptrb, |
| 3473 |
|
match_isgroup); |
| 3474 |
for (i = 1; i <= c; i++) |
for (i = 1; i <= c; i++) |
| 3475 |
md->offset_vector[md->offset_end - i] = save[i]; |
md->offset_vector[md->offset_end - i] = save[i]; |
| 3476 |
if (save != stacksave) (pcre_free)(save); |
if (save != stacksave) (pcre_free)(save); |
| 3496 |
case OP_ONCE: |
case OP_ONCE: |
| 3497 |
{ |
{ |
| 3498 |
const uschar *prev = ecode; |
const uschar *prev = ecode; |
| 3499 |
|
const uschar *saved_eptr = eptr; |
| 3500 |
|
|
| 3501 |
do |
do |
| 3502 |
{ |
{ |
| 3503 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr)) break; |
if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup)) |
| 3504 |
|
break; |
| 3505 |
ecode += (ecode[1] << 8) + ecode[2]; |
ecode += (ecode[1] << 8) + ecode[2]; |
| 3506 |
} |
} |
| 3507 |
while (*ecode == OP_ALT); |
while (*ecode == OP_ALT); |
| 3524 |
5.005. If there is an options reset, it will get obeyed in the normal |
5.005. If there is an options reset, it will get obeyed in the normal |
| 3525 |
course of events. */ |
course of events. */ |
| 3526 |
|
|
| 3527 |
if (*ecode == OP_KET || eptr == eptrb) |
if (*ecode == OP_KET || eptr == saved_eptr) |
| 3528 |
{ |
{ |
| 3529 |
ecode += 3; |
ecode += 3; |
| 3530 |
break; |
break; |
| 3543 |
|
|
| 3544 |
if (*ecode == OP_KETRMIN) |
if (*ecode == OP_KETRMIN) |
| 3545 |
{ |
{ |
| 3546 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr) || |
if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) || |
| 3547 |
match(eptr, prev, offset_top, md, ims, FALSE, eptr)) return TRUE; |
match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup)) |
| 3548 |
|
return TRUE; |
| 3549 |
} |
} |
| 3550 |
else /* OP_KETRMAX */ |
else /* OP_KETRMAX */ |
| 3551 |
{ |
{ |
| 3552 |
if (match(eptr, prev, offset_top, md, ims, FALSE, eptr) || |
if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) || |
| 3553 |
match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr)) return TRUE; |
match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE; |
| 3554 |
} |
} |
| 3555 |
} |
} |
| 3556 |
return FALSE; |
return FALSE; |
| 3571 |
case OP_BRAZERO: |
case OP_BRAZERO: |
| 3572 |
{ |
{ |
| 3573 |
const uschar *next = ecode+1; |
const uschar *next = ecode+1; |
| 3574 |
if (match(eptr, next, offset_top, md, ims, FALSE, eptr)) return TRUE; |
if (match(eptr, next, offset_top, md, ims, eptrb, match_isgroup)) |
| 3575 |
|
return TRUE; |
| 3576 |
do next += (next[1] << 8) + next[2]; while (*next == OP_ALT); |
do next += (next[1] << 8) + next[2]; while (*next == OP_ALT); |
| 3577 |
ecode = next + 3; |
ecode = next + 3; |
| 3578 |
} |
} |
| 3582 |
{ |
{ |
| 3583 |
const uschar *next = ecode+1; |
const uschar *next = ecode+1; |
| 3584 |
do next += (next[1] << 8) + next[2]; while (*next == OP_ALT); |
do next += (next[1] << 8) + next[2]; while (*next == OP_ALT); |
| 3585 |
if (match(eptr, next+3, offset_top, md, ims, FALSE, eptr)) return TRUE; |
if (match(eptr, next+3, offset_top, md, ims, eptrb, match_isgroup)) |
| 3586 |
|
return TRUE; |
| 3587 |
ecode++; |
ecode++; |
| 3588 |
} |
} |
| 3589 |
break; |
break; |
| 3598 |
case OP_KETRMAX: |
case OP_KETRMAX: |
| 3599 |
{ |
{ |
| 3600 |
const uschar *prev = ecode - (ecode[1] << 8) - ecode[2]; |
const uschar *prev = ecode - (ecode[1] << 8) - ecode[2]; |
| 3601 |
|
const uschar *saved_eptr = eptrb->saved_eptr; |
| 3602 |
|
|
| 3603 |
|
eptrb = eptrb->prev; /* Back up the stack of bracket start pointers */ |
| 3604 |
|
|
| 3605 |
if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT || |
if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT || |
| 3606 |
*prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT || |
*prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT || |
| 3620 |
int number = *prev - OP_BRA; |
int number = *prev - OP_BRA; |
| 3621 |
int offset = number << 1; |
int offset = number << 1; |
| 3622 |
|
|
| 3623 |
DPRINTF(("end bracket %d\n", number)); |
#ifdef DEBUG |
| 3624 |
|
printf("end bracket %d", number); |
| 3625 |
|
printf("\n"); |
| 3626 |
|
#endif |
| 3627 |
|
|
| 3628 |
if (number > 0) |
if (number > 0) |
| 3629 |
{ |
{ |
| 3649 |
5.005. If there is an options reset, it will get obeyed in the normal |
5.005. If there is an options reset, it will get obeyed in the normal |
| 3650 |
course of events. */ |
course of events. */ |
| 3651 |
|
|
| 3652 |
if (*ecode == OP_KET || eptr == eptrb) |
if (*ecode == OP_KET || eptr == saved_eptr) |
| 3653 |
{ |
{ |
| 3654 |
ecode += 3; |
ecode += 3; |
| 3655 |
break; |
break; |
| 3660 |
|
|
| 3661 |
if (*ecode == OP_KETRMIN) |
if (*ecode == OP_KETRMIN) |
| 3662 |
{ |
{ |
| 3663 |
if (match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr) || |
if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) || |
| 3664 |
match(eptr, prev, offset_top, md, ims, FALSE, eptr)) return TRUE; |
match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup)) |
| 3665 |
|
return TRUE; |
| 3666 |
} |
} |
| 3667 |
else /* OP_KETRMAX */ |
else /* OP_KETRMAX */ |
| 3668 |
{ |
{ |
| 3669 |
if (match(eptr, prev, offset_top, md, ims, FALSE, eptr) || |
if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) || |
| 3670 |
match(eptr, ecode+3, offset_top, md, ims, FALSE, eptr)) return TRUE; |
match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE; |
| 3671 |
} |
} |
| 3672 |
} |
} |
| 3673 |
return FALSE; |
return FALSE; |
| 3878 |
{ |
{ |
| 3879 |
for (i = min;; i++) |
for (i = min;; i++) |
| 3880 |
{ |
{ |
| 3881 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 3882 |
return TRUE; |
return TRUE; |
| 3883 |
if (i >= max || !match_ref(offset, eptr, length, md, ims)) |
if (i >= max || !match_ref(offset, eptr, length, md, ims)) |
| 3884 |
return FALSE; |
return FALSE; |
| 3899 |
} |
} |
| 3900 |
while (eptr >= pp) |
while (eptr >= pp) |
| 3901 |
{ |
{ |
| 3902 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 3903 |
return TRUE; |
return TRUE; |
| 3904 |
eptr -= length; |
eptr -= length; |
| 3905 |
} |
} |
| 3970 |
{ |
{ |
| 3971 |
for (i = min;; i++) |
for (i = min;; i++) |
| 3972 |
{ |
{ |
| 3973 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 3974 |
return TRUE; |
return TRUE; |
| 3975 |
if (i >= max || eptr >= md->end_subject) return FALSE; |
if (i >= max || eptr >= md->end_subject) return FALSE; |
| 3976 |
c = *eptr++; |
c = *eptr++; |
| 3994 |
} |
} |
| 3995 |
|
|
| 3996 |
while (eptr >= pp) |
while (eptr >= pp) |
| 3997 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 3998 |
return TRUE; |
return TRUE; |
| 3999 |
return FALSE; |
return FALSE; |
| 4000 |
} |
} |
| 4091 |
{ |
{ |
| 4092 |
for (i = min;; i++) |
for (i = min;; i++) |
| 4093 |
{ |
{ |
| 4094 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 4095 |
return TRUE; |
return TRUE; |
| 4096 |
if (i >= max || eptr >= md->end_subject || |
if (i >= max || eptr >= md->end_subject || |
| 4097 |
c != md->lcc[*eptr++]) |
c != md->lcc[*eptr++]) |
| 4108 |
eptr++; |
eptr++; |
| 4109 |
} |
} |
| 4110 |
while (eptr >= pp) |
while (eptr >= pp) |
| 4111 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 4112 |
return TRUE; |
return TRUE; |
| 4113 |
return FALSE; |
return FALSE; |
| 4114 |
} |
} |
| 4125 |
{ |
{ |
| 4126 |
for (i = min;; i++) |
for (i = min;; i++) |
| 4127 |
{ |
{ |
| 4128 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 4129 |
return TRUE; |
return TRUE; |
| 4130 |
if (i >= max || eptr >= md->end_subject || c != *eptr++) return FALSE; |
if (i >= max || eptr >= md->end_subject || c != *eptr++) return FALSE; |
| 4131 |
} |
} |
| 4140 |
eptr++; |
eptr++; |
| 4141 |
} |
} |
| 4142 |
while (eptr >= pp) |
while (eptr >= pp) |
| 4143 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 4144 |
return TRUE; |
return TRUE; |
| 4145 |
return FALSE; |
return FALSE; |
| 4146 |
} |
} |
| 4222 |
{ |
{ |
| 4223 |
for (i = min;; i++) |
for (i = min;; i++) |
| 4224 |
{ |
{ |
| 4225 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 4226 |
return TRUE; |
return TRUE; |
| 4227 |
if (i >= max || eptr >= md->end_subject || |
if (i >= max || eptr >= md->end_subject || |
| 4228 |
c == md->lcc[*eptr++]) |
c == md->lcc[*eptr++]) |
| 4239 |
eptr++; |
eptr++; |
| 4240 |
} |
} |
| 4241 |
while (eptr >= pp) |
while (eptr >= pp) |
| 4242 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 4243 |
return TRUE; |
return TRUE; |
| 4244 |
return FALSE; |
return FALSE; |
| 4245 |
} |
} |
| 4256 |
{ |
{ |
| 4257 |
for (i = min;; i++) |
for (i = min;; i++) |
| 4258 |
{ |
{ |
| 4259 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) |
| 4260 |
return TRUE; |
return TRUE; |
| 4261 |
if (i >= max || eptr >= md->end_subject || c == *eptr++) return FALSE; |
if (i >= max || eptr >= md->end_subject || c == *eptr++) return FALSE; |
| 4262 |
} |
} |
| 4271 |
eptr++; |
eptr++; |
| 4272 |
} |
} |
| 4273 |
while (eptr >= pp) |
while (eptr >= pp) |
| 4274 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 4275 |
return TRUE; |
return TRUE; |
| 4276 |
return FALSE; |
return FALSE; |
| 4277 |
} |
} |
| 4371 |
{ |
{ |
| 4372 |
for (i = min;; i++) |
for (i = min;; i++) |
| 4373 |
{ |
{ |
| 4374 |
if (match(eptr, ecode, offset_top, md, ims, FALSE, eptrb)) return TRUE; |
if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) return TRUE; |
| 4375 |
if (i >= max || eptr >= md->end_subject) return FALSE; |
if (i >= max || eptr >= md->end_subject) return FALSE; |
| 4376 |
|
|
| 4377 |
c = *eptr++; |
c = *eptr++; |
| 4490 |
} |
} |
| 4491 |
|
|
| 4492 |
while (eptr >= pp) |
while (eptr >= pp) |
| 4493 |
if (match(eptr--, ecode, offset_top, md, ims, FALSE, eptrb)) |
if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0)) |
| 4494 |
return TRUE; |
return TRUE; |
| 4495 |
return FALSE; |
return FALSE; |
| 4496 |
} |
} |
| 4776 |
if certain parts of the pattern were not used. */ |
if certain parts of the pattern were not used. */ |
| 4777 |
|
|
| 4778 |
match_block.start_match = start_match; |
match_block.start_match = start_match; |
| 4779 |
if (!match(start_match, re->code, 2, &match_block, ims, FALSE, start_match)) |
if (!match(start_match, re->code, 2, &match_block, ims, NULL, match_isgroup)) |
| 4780 |
continue; |
continue; |
| 4781 |
|
|
| 4782 |
/* Copy the offset information from temporary store if necessary */ |
/* Copy the offset information from temporary store if necessary */ |