diff options
author | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:40:24 +0000 |
---|---|---|
committer | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:40:24 +0000 |
commit | 4af6fcff808e079ca1aa09104d6146baa932af47 (patch) | |
tree | dc14f3624835dd1275c31159a4c365ed439f3df7 /pcreposix.c | |
parent | f08d5b6354f668c0047281d81eda8d0fd2a9e82d (diff) | |
download | pcre-4af6fcff808e079ca1aa09104d6146baa932af47.tar.gz |
Load pcre-4.4 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@71 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcreposix.c')
-rw-r--r-- | pcreposix.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pcreposix.c b/pcreposix.c index 49094f2..6152a15 100644 --- a/pcreposix.c +++ b/pcreposix.c @@ -48,7 +48,7 @@ static const char *estring[] = { ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR29, ERR29, ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, - ERR41, ERR42, ERR43 }; + ERR41, ERR42, ERR43, ERR44 }; static int eint[] = { REG_EESCAPE, /* "\\ at end of pattern" */ @@ -93,7 +93,8 @@ static int eint[] = { REG_BADPAT, /* "recursive call could loop indefinitely" */ REG_BADPAT, /* "unrecognized character after (?P" */ REG_BADPAT, /* "syntax error after (?P" */ - REG_BADPAT /* "two named groups have the same name" */ + REG_BADPAT, /* "two named groups have the same name" */ + REG_BADPAT /* "invalid UTF-8 string" */ }; /* Table of texts corresponding to POSIX error codes */ @@ -217,7 +218,7 @@ preg->re_erroffset = erroffset; if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr); -preg->re_nsub = pcre_info(preg->re_pcre, NULL, NULL); +preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL); return 0; } @@ -264,8 +265,8 @@ if (nmatch > 0) } } -rc = pcre_exec(preg->re_pcre, NULL, string, (int)strlen(string), 0, options, - ovector, nmatch * 3); +rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string), + 0, options, ovector, nmatch * 3); if (rc == 0) rc = nmatch; /* All captured slots were filled in */ |