line |
true |
false |
branch |
206
|
0 |
0 |
"unknown error code" : pstring[errcode]; |
210
|
0 |
0 |
addlength = (preg != NULL && (int)preg->re_erroffset != -1)? |
211
|
0 |
0 |
strlen(addmessage) + 6 : 0; |
213
|
0 |
0 |
if (errbuf_size > 0) |
215
|
0 |
0 |
if (addlength > 0 && errbuf_size >= length + addlength) |
|
0 |
0 |
if (addlength > 0 && errbuf_size >= length + addlength) |
266
|
0 |
0 |
if ((cflags & PCRE_REG_ICASE) != 0) options |= PCRE_CASELESS; |
267
|
0 |
0 |
if ((cflags & PCRE_REG_NEWLINE) != 0) options |= PCRE_MULTILINE; |
268
|
0 |
0 |
if ((cflags & PCRE_REG_DOTALL) != 0) options |= PCRE_DOTALL; |
269
|
0 |
0 |
if ((cflags & PCRE_REG_NOSUB) != 0) options |= PCRE_NO_AUTO_CAPTURE; |
270
|
0 |
0 |
if ((cflags & PCRE_REG_UTF8) != 0) options |= PCRE_UTF8; |
271
|
0 |
0 |
if ((cflags & PCRE_REG_UCP) != 0) options |= PCRE_UCP; |
272
|
0 |
0 |
if ((cflags & PCRE_REG_UNGREEDY) != 0) options |= PCRE_UNGREEDY; |
281
|
0 |
0 |
if (preg->re_pcre == NULL) |
284
|
0 |
0 |
eint[errorcode] : PCRE_REG_BADPAT; |
323
|
0 |
0 |
if ((eflags & PCRE_REG_NOTBOL) != 0) options |= PCRE_NOTBOL; |
324
|
0 |
0 |
if ((eflags & PCRE_REG_NOTEOL) != 0) options |= PCRE_NOTEOL; |
325
|
0 |
0 |
if ((eflags & PCRE_REG_NOTEMPTY) != 0) options |= PCRE_NOTEMPTY; |
333
|
0 |
0 |
if (nosub || pmatch == NULL) nmatch = 0; |
|
0 |
0 |
if (nosub || pmatch == NULL) nmatch = 0; |
335
|
0 |
0 |
else if (nmatch > 0) |
337
|
0 |
0 |
if (nmatch <= POSIX_MALLOC_THRESHOLD) |
343
|
0 |
0 |
if (nmatch > INT_MAX/(sizeof(int) * 3)) return PCRE_REG_ESPACE; |
345
|
0 |
0 |
if (ovector == NULL) return PCRE_REG_ESPACE; |
355
|
0 |
0 |
if ((eflags & PCRE_REG_STARTEND) != 0) |
357
|
0 |
0 |
if (pmatch == NULL) return PCRE_REG_INVARG; |
370
|
0 |
0 |
if (rc == 0) rc = (int)nmatch; /* All captured slots were filled in */ |
374
|
0 |
0 |
if (rc >= 0) |
377
|
0 |
0 |
if (!nosub) |
379
|
0 |
0 |
for (i = 0; i < (size_t)rc; i++) |
381
|
0 |
0 |
pmatch[i].rm_so = (ovector[i*2] < 0)? -1 : ovector[i*2] + so; |
382
|
0 |
0 |
pmatch[i].rm_eo = (ovector[i*2+1] < 0)? -1: ovector[i*2+1] + so; |
384
|
0 |
0 |
if (allocated_ovector) free(ovector); |
385
|
0 |
0 |
for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1; |
392
|
0 |
0 |
if (allocated_ovector) free(ovector); |