-/* $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 *
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
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:
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];
/* 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];
}
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];