diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-03-21 19:23:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-01 21:33:29 +0200 |
commit | bb5552a22995ba1dbc4f9944e72a6b0e15194fcb (patch) | |
tree | 31a94ce99ebdf1a6e32ae30a78001661c70d89d2 /src/3rdparty/pcre/pcre_fullinfo.c | |
parent | 34999402898886a969094a39587909ab6764e568 (diff) | |
download | qtbase-bb5552a22995ba1dbc4f9944e72a6b0e15194fcb.tar.gz |
Upgrade the bundled PCRE to 8.32
Changelog: http://pcre.org/changelog.txt
Amongst other things, the Unicode tables were upgraded to 6.2.0
and case folding support was added, which also fixes a QString
autotest (marked as XFAIL).
Qt still requires 8.30, not 8.32.
Change-Id: I4056c1dc1d949d33443bb8ca280de4c8c363ac74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/pcre/pcre_fullinfo.c')
-rw-r--r-- | src/3rdparty/pcre/pcre_fullinfo.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/src/3rdparty/pcre/pcre_fullinfo.c b/src/3rdparty/pcre/pcre_fullinfo.c index e5e68f3f29..e64da06eb4 100644 --- a/src/3rdparty/pcre/pcre_fullinfo.c +++ b/src/3rdparty/pcre/pcre_fullinfo.c @@ -65,14 +65,18 @@ Arguments: Returns: 0 if data returned, negative on error */ -#ifdef COMPILE_PCRE8 +#if defined COMPILE_PCRE8 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what, void *where) -#else +#elif defined COMPILE_PCRE16 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre16_fullinfo(const pcre16 *argument_re, const pcre16_extra *extra_data, int what, void *where) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre32_fullinfo(const pcre32 *argument_re, const pcre32_extra *extra_data, + int what, void *where) #endif { const REAL_PCRE *re = (const REAL_PCRE *)argument_re; @@ -132,10 +136,21 @@ switch (what) case PCRE_INFO_FIRSTBYTE: *((int *)where) = - ((re->flags & PCRE_FIRSTSET) != 0)? re->first_char : + ((re->flags & PCRE_FIRSTSET) != 0)? (int)re->first_char : ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2; break; + case PCRE_INFO_FIRSTCHARACTER: + *((pcre_uint32 *)where) = + (re->flags & PCRE_FIRSTSET) != 0 ? re->first_char : 0; + break; + + case PCRE_INFO_FIRSTCHARACTERFLAGS: + *((int *)where) = + ((re->flags & PCRE_FIRSTSET) != 0) ? 1 : + ((re->flags & PCRE_STARTLINE) != 0) ? 2 : 0; + break; + /* Make sure we pass back the pointer to the bit vector in the external block, not the internal copy (with flipped integer fields). */ @@ -159,9 +174,19 @@ switch (what) case PCRE_INFO_LASTLITERAL: *((int *)where) = - ((re->flags & PCRE_REQCHSET) != 0)? re->req_char : -1; + ((re->flags & PCRE_REQCHSET) != 0)? (int)re->req_char : -1; break; + case PCRE_INFO_REQUIREDCHAR: + *((pcre_uint32 *)where) = + ((re->flags & PCRE_REQCHSET) != 0) ? re->req_char : 0; + break; + + case PCRE_INFO_REQUIREDCHARFLAGS: + *((int *)where) = + ((re->flags & PCRE_REQCHSET) != 0); + break; + case PCRE_INFO_NAMEENTRYSIZE: *((int *)where) = re->name_entry_size; break; @@ -193,6 +218,10 @@ switch (what) *((int *)where) = (re->flags & PCRE_HASCRORLF) != 0; break; + case PCRE_INFO_MAXLOOKBEHIND: + *((int *)where) = re->max_lookbehind; + break; + default: return PCRE_ERROR_BADOPTION; } |