| 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. |
| 7 |
|
|
| 8 |
Written by Philip Hazel |
Written by Philip Hazel |
| 9 |
Copyright (c) 1997-2011 University of Cambridge |
Copyright (c) 1997-2012 University of Cambridge |
| 10 |
|
|
| 11 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
| 12 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
| 45 |
#include "config.h" |
#include "config.h" |
| 46 |
#endif |
#endif |
| 47 |
|
|
| 48 |
|
/* Keep the original link size. */ |
| 49 |
|
static int real_link_size = LINK_SIZE; |
| 50 |
|
|
| 51 |
#include "pcre_internal.h" |
#include "pcre_internal.h" |
| 52 |
|
|
| 53 |
|
|
| 65 |
Returns: 0 if data returned, negative on error |
Returns: 0 if data returned, negative on error |
| 66 |
*/ |
*/ |
| 67 |
|
|
| 68 |
|
#ifdef COMPILE_PCRE8 |
| 69 |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
| 70 |
pcre_config(int what, void *where) |
pcre_config(int what, void *where) |
| 71 |
|
#else |
| 72 |
|
PCRE_EXP_DEFN int PCRE_CALL_CONVENTION |
| 73 |
|
pcre16_config(int what, void *where) |
| 74 |
|
#endif |
| 75 |
{ |
{ |
| 76 |
switch (what) |
switch (what) |
| 77 |
{ |
{ |
| 78 |
case PCRE_CONFIG_UTF8: |
case PCRE_CONFIG_UTF8: |
| 79 |
#ifdef SUPPORT_UTF8 |
#if defined COMPILE_PCRE16 |
| 80 |
|
return PCRE_ERROR_BADOPTION; |
| 81 |
|
#else |
| 82 |
|
#if defined SUPPORT_UTF |
| 83 |
|
*((int *)where) = 1; |
| 84 |
|
#else |
| 85 |
|
*((int *)where) = 0; |
| 86 |
|
#endif |
| 87 |
|
break; |
| 88 |
|
#endif |
| 89 |
|
|
| 90 |
|
case PCRE_CONFIG_UTF16: |
| 91 |
|
#if defined COMPILE_PCRE8 |
| 92 |
|
return PCRE_ERROR_BADOPTION; |
| 93 |
|
#else |
| 94 |
|
#if defined SUPPORT_UTF |
| 95 |
*((int *)where) = 1; |
*((int *)where) = 1; |
| 96 |
#else |
#else |
| 97 |
*((int *)where) = 0; |
*((int *)where) = 0; |
| 98 |
#endif |
#endif |
| 99 |
break; |
break; |
| 100 |
|
#endif |
| 101 |
|
|
| 102 |
case PCRE_CONFIG_UNICODE_PROPERTIES: |
case PCRE_CONFIG_UNICODE_PROPERTIES: |
| 103 |
#ifdef SUPPORT_UCP |
#ifdef SUPPORT_UCP |
| 128 |
break; |
break; |
| 129 |
|
|
| 130 |
case PCRE_CONFIG_LINK_SIZE: |
case PCRE_CONFIG_LINK_SIZE: |
| 131 |
*((int *)where) = LINK_SIZE; |
*((int *)where) = real_link_size; |
| 132 |
break; |
break; |
| 133 |
|
|
| 134 |
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: |
case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD: |