148 |
* Return version string * |
* Return version string * |
149 |
*************************************************/ |
*************************************************/ |
150 |
|
|
151 |
|
#define STRING(a) # a |
152 |
|
#define XSTRING(s) STRING(s) |
153 |
|
|
154 |
const char * |
const char * |
155 |
pcre_version(void) |
pcre_version(void) |
156 |
{ |
{ |
157 |
return PCRE_VERSION; |
return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE); |
158 |
} |
} |
159 |
|
|
160 |
|
|
3091 |
case OP_OPT: |
case OP_OPT: |
3092 |
ims = ecode[1]; |
ims = ecode[1]; |
3093 |
ecode += 2; |
ecode += 2; |
3094 |
DPRINTF(("ims set to %02x\n", ims)); |
DPRINTF(("ims set to %02lx\n", ims)); |
3095 |
break; |
break; |
3096 |
|
|
3097 |
/* Assertion brackets. Check the alternative branches in turn - the |
/* Assertion brackets. Check the alternative branches in turn - the |
3198 |
if (ecode[3] == OP_OPT) |
if (ecode[3] == OP_OPT) |
3199 |
{ |
{ |
3200 |
ims = (ims & ~PCRE_IMS) | ecode[4]; |
ims = (ims & ~PCRE_IMS) | ecode[4]; |
3201 |
DPRINTF(("ims set to %02x at group repeat\n", ims)); |
DPRINTF(("ims set to %02lx at group repeat\n", ims)); |
3202 |
} |
} |
3203 |
|
|
3204 |
if (*ecode == OP_KETRMIN) |
if (*ecode == OP_KETRMIN) |
3292 |
the group. */ |
the group. */ |
3293 |
|
|
3294 |
ims = original_ims; |
ims = original_ims; |
3295 |
DPRINTF(("ims reset to %02x\n", ims)); |
DPRINTF(("ims reset to %02lx\n", ims)); |
3296 |
|
|
3297 |
/* For a non-repeating ket, just continue at this level. This also |
/* For a non-repeating ket, just continue at this level. This also |
3298 |
happens for a repeating ket if no characters were matched in the group. |
happens for a repeating ket if no characters were matched in the group. |
4340 |
|
|
4341 |
else if (startline) |
else if (startline) |
4342 |
{ |
{ |
4343 |
if (start_match > match_block.start_subject) |
if (start_match > match_block.start_subject + start_offset) |
4344 |
{ |
{ |
4345 |
while (start_match < end_subject && start_match[-1] != '\n') |
while (start_match < end_subject && start_match[-1] != '\n') |
4346 |
start_match++; |
start_match++; |