diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-28 17:16:11 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-28 17:16:11 +0000 |
commit | 5e8b286b566d7ec502b80892e5b709025631d58c (patch) | |
tree | c8a6c83ad13e79a9b64718b784fe0126764d98b7 /pcreposix.c | |
parent | a29cc4dc66d82b59de7616c53517c58271e6e0e8 (diff) | |
download | pcre-5e8b286b566d7ec502b80892e5b709025631d58c.tar.gz |
Merging all the changes from the pcre16 branch into the trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@836 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcreposix.c')
-rw-r--r-- | pcreposix.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pcreposix.c b/pcreposix.c index 648254b..6929fc0 100644 --- a/pcreposix.c +++ b/pcreposix.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2010 University of Cambridge + Copyright (c) 1997-2012 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -154,7 +154,10 @@ static const int eint[] = { REG_BADPAT, /* \c must be followed by an ASCII character */ REG_BADPAT, /* \k is not followed by a braced, angle-bracketed, or quoted name */ /* 70 */ - REG_BADPAT, /* internal error: unknown opcode in find_fixedlength() */ + REG_BADPAT, /* internal error: unknown opcode in find_fixedlength() */ + REG_BADPAT, /* \N is not supported in a class */ + REG_BADPAT, /* too many forward references */ + REG_BADPAT, /* disallowed UTF-8/16 code point (>= 0xd800 && <= 0xdfff) */ }; /* Table of texts corresponding to POSIX error codes */ @@ -225,7 +228,7 @@ return length + addlength; PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION regfree(regex_t *preg) { -(pcre_free)(preg->re_pcre); +(PUBL(free))(preg->re_pcre); } @@ -274,7 +277,8 @@ if (preg->re_pcre == NULL) eint[errorcode] : REG_BADPAT; } -preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL); +(void)pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, + &(preg->re_nsub)); return 0; } @@ -400,6 +404,7 @@ switch(rc) case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE; case PCRE_ERROR_BADUTF8: return REG_INVARG; case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG; + case PCRE_ERROR_BADMODE: return REG_INVARG; default: return REG_ASSERT; } } |