version 1.1, 2012/02/21 23:05:51
|
version 1.1.1.3, 2013/07/22 08:25:55
|
Line 6
|
Line 6
|
and semantics are as close as possible to those of the Perl 5 language. |
and semantics are as close as possible to those of the Perl 5 language. |
|
|
Written by Philip Hazel |
Written by Philip Hazel |
Copyright (c) 1997-2011 University of Cambridge | Copyright (c) 1997-2012 University of Cambridge |
|
|
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 45 POSSIBILITY OF SUCH DAMAGE.
|
Line 45 POSSIBILITY OF SUCH DAMAGE.
|
#include "config.h" |
#include "config.h" |
#endif |
#endif |
|
|
|
/* Keep the original link size. */ |
|
static int real_link_size = LINK_SIZE; |
|
|
#include "pcre_internal.h" |
#include "pcre_internal.h" |
|
|
|
|
Line 62 Arguments:
|
Line 65 Arguments:
|
Returns: 0 if data returned, negative on error |
Returns: 0 if data returned, negative on error |
*/ |
*/ |
|
|
|
#if defined COMPILE_PCRE8 |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
pcre_config(int what, void *where) |
pcre_config(int what, void *where) |
|
#elif defined COMPILE_PCRE16 |
|
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
|
pcre16_config(int what, void *where) |
|
#elif defined COMPILE_PCRE32 |
|
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
|
pcre32_config(int what, void *where) |
|
#endif |
{ |
{ |
switch (what) |
switch (what) |
{ |
{ |
case PCRE_CONFIG_UTF8: |
case PCRE_CONFIG_UTF8: |
#ifdef SUPPORT_UTF8 | #if defined COMPILE_PCRE16 || defined COMPILE_PCRE32 |
| *((int *)where) = 0; |
| return PCRE_ERROR_BADOPTION; |
| #else |
| #if defined SUPPORT_UTF |
*((int *)where) = 1; |
*((int *)where) = 1; |
#else |
#else |
*((int *)where) = 0; |
*((int *)where) = 0; |
#endif |
#endif |
break; |
break; |
|
#endif |
|
|
|
case PCRE_CONFIG_UTF16: |
|
#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32 |
|
*((int *)where) = 0; |
|
return PCRE_ERROR_BADOPTION; |
|
#else |
|
#if defined SUPPORT_UTF |
|
*((int *)where) = 1; |
|
#else |
|
*((int *)where) = 0; |
|
#endif |
|
break; |
|
#endif |
|
|
|
case PCRE_CONFIG_UTF32: |
|
#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16 |
|
*((int *)where) = 0; |
|
return PCRE_ERROR_BADOPTION; |
|
#else |
|
#if defined SUPPORT_UTF |
|
*((int *)where) = 1; |
|
#else |
|
*((int *)where) = 0; |
|
#endif |
|
break; |
|
#endif |
|
|
case PCRE_CONFIG_UNICODE_PROPERTIES: |
case PCRE_CONFIG_UNICODE_PROPERTIES: |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
*((int *)where) = 1; |
*((int *)where) = 1; |
Line 91 switch (what)
|
Line 133 switch (what)
|
#endif |
#endif |
break; |
break; |
|
|
|
case PCRE_CONFIG_JITTARGET: |
|
#ifdef SUPPORT_JIT |
|
*((const char **)where) = PRIV(jit_get_target)(); |
|
#else |
|
*((const char **)where) = NULL; |
|
#endif |
|
break; |
|
|
case PCRE_CONFIG_NEWLINE: |
case PCRE_CONFIG_NEWLINE: |
*((int *)where) = NEWLINE; |
*((int *)where) = NEWLINE; |
break; |
break; |
Line 104 switch (what)
|
Line 154 switch (what)
|
break; |
break; |
|
|
case PCRE_CONFIG_LINK_SIZE: |
case PCRE_CONFIG_LINK_SIZE: |
*((int *)where) = LINK_SIZE; | *((int *)where) = real_link_size; |
break; |
break; |
|
|
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: |
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: |