X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/d52120f2b5b5464091a61a47fe881a6e8f6ec09f..64f2600a56e0201f23dd3496a499fff6ef22c0c0:/src/src/pcre/pcre_study.c diff --git a/src/src/pcre/pcre_study.c b/src/src/pcre/pcre_study.c index ae312f272..8858f7f40 100644 --- a/src/src/pcre/pcre_study.c +++ b/src/src/pcre/pcre_study.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/pcre/pcre_study.c,v 1.4 2007/01/23 15:08:45 ph10 Exp $ */ +/* $Cambridge: exim/src/src/pcre/pcre_study.c,v 1.5 2007/06/26 11:16:54 ph10 Exp $ */ /************************************************* * Perl-Compatible Regular Expressions * @@ -8,7 +8,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2006 University of Cambridge + Copyright (c) 1997-2007 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -396,11 +396,13 @@ do character with a value > 255. */ case OP_NCLASS: +#ifdef SUPPORT_UTF8 if (utf8) { start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */ memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */ } +#endif /* Fall through */ case OP_CLASS: @@ -413,6 +415,7 @@ do value is > 127. In fact, there are only two possible starting bytes for characters in the range 128 - 255. */ +#ifdef SUPPORT_UTF8 if (utf8) { for (c = 0; c < 16; c++) start_bits[c] |= tcode[c]; @@ -430,6 +433,7 @@ do /* In non-UTF-8 mode, the two bit maps are completely compatible. */ else +#endif { for (c = 0; c < 32; c++) start_bits[c] |= tcode[c]; } @@ -489,7 +493,7 @@ Returns: pointer to a pcre_extra block, with study_data filled in and the NULL on error or if no optimization possible */ -PCRE_DATA_SCOPE pcre_extra * +PCRE_EXP_DEFN pcre_extra * pcre_study(const pcre *external_re, int options, const char **errorptr) { uschar start_bits[32];