| 299 |
|
|
| 300 |
/* REG_STARTEND is a BSD extension, to allow for non-NUL-terminated strings. |
/* REG_STARTEND is a BSD extension, to allow for non-NUL-terminated strings. |
| 301 |
The man page from OS X says "REG_STARTEND affects only the location of the |
The man page from OS X says "REG_STARTEND affects only the location of the |
| 302 |
string, not how it is matched". That is why the "so" value is used to bump the |
string, not how it is matched". That is why the "so" value is used to bump the |
| 303 |
start location rather than being passed as a PCRE "starting offset". */ |
start location rather than being passed as a PCRE "starting offset". */ |
| 304 |
|
|
| 305 |
if ((eflags & REG_STARTEND) != 0) |
if ((eflags & REG_STARTEND) != 0) |
| 306 |
{ |
{ |
| 307 |
so = pmatch[0].rm_so; |
so = pmatch[0].rm_so; |
| 308 |
eo = pmatch[0].rm_eo; |
eo = pmatch[0].rm_eo; |
| 309 |
} |
} |
| 310 |
else |
else |
| 311 |
{ |
{ |
| 312 |
so = 0; |
so = 0; |
| 313 |
eo = strlen(string); |
eo = strlen(string); |