/[pcre]/code/branches/pcre16/pcre_tables.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_tables.c

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

revision 763 by ph10, Mon Nov 21 10:48:42 2011 UTC revision 764 by zherczeg, Wed Nov 23 17:23:20 2011 UTC
# Line 54  clashes with the library. */ Line 54  clashes with the library. */
54  /* Table of sizes for the fixed-length opcodes. It's defined in a macro so that  /* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
55  the definition is next to the definition of the opcodes in pcre_internal.h. */  the definition is next to the definition of the opcodes in pcre_internal.h. */
56    
57  const pcre_uint8 _pcre_OP_lengths[] = { OP_LENGTHS };  const pcre_uint8 PRIV(OP_lengths)[] = { OP_LENGTHS };
58    
59    
60    
# Line 67  character. */ Line 67  character. */
67    
68  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF8
69    
70  const int _pcre_utf8_table1[] =  const int PRIV(utf8_table1)[] =
71    { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};    { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
72    
73  const int _pcre_utf8_table1_size = sizeof(_pcre_utf8_table1)/sizeof(int);  const int PRIV(utf8_table1_size) = sizeof(PRIV(utf8_table1)) / sizeof(int);
74    
75  /* These are the indicator bits and the mask for the data bits to set in the  /* These are the indicator bits and the mask for the data bits to set in the
76  first byte of a character, indexed by the number of additional bytes. */  first byte of a character, indexed by the number of additional bytes. */
77    
78  const int _pcre_utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};  const int PRIV(utf8_table2)[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
79  const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};  const int PRIV(utf8_table3)[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
80    
81  /* Table of the number of extra bytes, indexed by the first byte masked with  /* Table of the number of extra bytes, indexed by the first byte masked with
82  0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */  0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
83    
84  const pcre_uint8 _pcre_utf8_table4[] = {  const pcre_uint8 PRIV(utf8_table4)[] = {
85    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
86    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
87    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,    2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
# Line 89  const pcre_uint8 _pcre_utf8_table4[] = { Line 89  const pcre_uint8 _pcre_utf8_table4[] = {
89    
90  /* Table to translate from particular type value to the general value. */  /* Table to translate from particular type value to the general value. */
91    
92  const int _pcre_ucp_gentype[] = {  const int PRIV(ucp_gentype)[] = {
93    ucp_C, ucp_C, ucp_C, ucp_C, ucp_C,  /* Cc, Cf, Cn, Co, Cs */    ucp_C, ucp_C, ucp_C, ucp_C, ucp_C,  /* Cc, Cf, Cn, Co, Cs */
94    ucp_L, ucp_L, ucp_L, ucp_L, ucp_L,  /* Ll, Lu, Lm, Lo, Lt */    ucp_L, ucp_L, ucp_L, ucp_L, ucp_L,  /* Ll, Lu, Lm, Lo, Lt */
95    ucp_M, ucp_M, ucp_M,                /* Mc, Me, Mn */    ucp_M, ucp_M, ucp_M,                /* Mc, Me, Mn */
# Line 101  const int _pcre_ucp_gentype[] = { Line 101  const int _pcre_ucp_gentype[] = {
101  };  };
102    
103  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT
104  /* This table reverses _pcre_ucp_gentype. We can save the cost  /* This table reverses PRIV(ucp_gentype). We can save the cost
105  of a memory load. */  of a memory load. */
106    
107  const int _pcre_ucp_typerange[] = {  const int PRIV(ucp_typerange)[] = {
108    ucp_Cc, ucp_Cs,    ucp_Cc, ucp_Cs,
109    ucp_Ll, ucp_Lu,    ucp_Ll, ucp_Lu,
110    ucp_Mc, ucp_Mn,    ucp_Mc, ucp_Mn,
# Line 271  strings to make sure that UTF-8 support Line 271  strings to make sure that UTF-8 support
271  #define STRING_Zp0 STR_Z STR_p "\0"  #define STRING_Zp0 STR_Z STR_p "\0"
272  #define STRING_Zs0 STR_Z STR_s "\0"  #define STRING_Zs0 STR_Z STR_s "\0"
273    
274  const char _pcre_utt_names[] =  const char PRIV(utt_names)[] =
275    STRING_Any0    STRING_Any0
276    STRING_Arabic0    STRING_Arabic0
277    STRING_Armenian0    STRING_Armenian0
# Line 411  const char _pcre_utt_names[] = Line 411  const char _pcre_utt_names[] =
411    STRING_Zp0    STRING_Zp0
412    STRING_Zs0;    STRING_Zs0;
413    
414  const ucp_type_table _pcre_utt[] = {  const ucp_type_table PRIV(utt)[] = {
415    {   0, PT_ANY, 0 },    {   0, PT_ANY, 0 },
416    {   4, PT_SC, ucp_Arabic },    {   4, PT_SC, ucp_Arabic },
417    {  11, PT_SC, ucp_Armenian },    {  11, PT_SC, ucp_Armenian },
# Line 552  const ucp_type_table _pcre_utt[] = { Line 552  const ucp_type_table _pcre_utt[] = {
552    { 961, PT_PC, ucp_Zs }    { 961, PT_PC, ucp_Zs }
553  };  };
554    
555  const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);  const int PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
556    
557  #endif  /* SUPPORT_UTF8 */  #endif  /* SUPPORT_UTF8 */
558    

Legend:
Removed from v.763  
changed lines
  Added in v.764

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12