/[pcre]/code/trunk/pcre_config.c
ViewVC logotype

Diff of /code/trunk/pcre_config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 835 by ph10, Mon Aug 22 14:57:32 2011 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 6  Line 6 
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
# Line 45  POSSIBILITY OF SUCH DAMAGE. Line 45  POSSIBILITY OF SUCH DAMAGE.
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    
# Line 62  Arguments: Line 65  Arguments:
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
# Line 104  switch (what) Line 128  switch (what)
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:

Legend:
Removed from v.835  
changed lines
  Added in v.836

  ViewVC Help
Powered by ViewVC 1.1.5