| 48 |
ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20, |
ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20, |
| 49 |
ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR29, ERR29, ERR30, |
ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR29, ERR29, ERR30, |
| 50 |
ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, |
ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, |
| 51 |
ERR41, ERR42, ERR43 }; |
ERR41, ERR42, ERR43, ERR44 }; |
| 52 |
|
|
| 53 |
static int eint[] = { |
static int eint[] = { |
| 54 |
REG_EESCAPE, /* "\\ at end of pattern" */ |
REG_EESCAPE, /* "\\ at end of pattern" */ |
| 93 |
REG_BADPAT, /* "recursive call could loop indefinitely" */ |
REG_BADPAT, /* "recursive call could loop indefinitely" */ |
| 94 |
REG_BADPAT, /* "unrecognized character after (?P" */ |
REG_BADPAT, /* "unrecognized character after (?P" */ |
| 95 |
REG_BADPAT, /* "syntax error after (?P" */ |
REG_BADPAT, /* "syntax error after (?P" */ |
| 96 |
REG_BADPAT /* "two named groups have the same name" */ |
REG_BADPAT, /* "two named groups have the same name" */ |
| 97 |
|
REG_BADPAT /* "invalid UTF-8 string" */ |
| 98 |
}; |
}; |
| 99 |
|
|
| 100 |
/* Table of texts corresponding to POSIX error codes */ |
/* Table of texts corresponding to POSIX error codes */ |
| 218 |
|
|
| 219 |
if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr); |
if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr); |
| 220 |
|
|
| 221 |
preg->re_nsub = pcre_info(preg->re_pcre, NULL, NULL); |
preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL); |
| 222 |
return 0; |
return 0; |
| 223 |
} |
} |
| 224 |
|
|
| 265 |
} |
} |
| 266 |
} |
} |
| 267 |
|
|
| 268 |
rc = pcre_exec(preg->re_pcre, NULL, string, (int)strlen(string), 0, options, |
rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string), |
| 269 |
ovector, nmatch * 3); |
0, options, ovector, nmatch * 3); |
| 270 |
|
|
| 271 |
if (rc == 0) rc = nmatch; /* All captured slots were filled in */ |
if (rc == 0) rc = nmatch; /* All captured slots were filled in */ |
| 272 |
|
|