hirokawa Mon, 08 Aug 2011 16:14:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=314546
Log: reduced memory footprint for codepages. Changed paths: U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c U php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c U php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h U php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp936.h U php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_jis.h U php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_uhc.h
Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_hz.c 2011-08-08 16:14:30 UTC (rev 314546) @@ -34,6 +34,7 @@ #include "mbfilter.h" #include "mbfilter_hz.h" +#define UNICODE_TABLE_CP936_DEF #include "unicode_table_cp936.h" static int mbfl_filt_ident_hz(int c, mbfl_identify_filter *filter); Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_sjis.c 2011-08-08 16:14:30 UTC (rev 314546) @@ -34,6 +34,9 @@ #include "mbfilter.h" #include "mbfilter_sjis.h" +#define UNICODE_TABLE_CP932_DEF +#define UNICODE_TABLE_JIS_DEF + #include "unicode_table_cp932_ext.h" #include "unicode_table_jis.h" Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/mbfilter_uhc.c 2011-08-08 16:14:30 UTC (rev 314546) @@ -33,6 +33,7 @@ #include "mbfilter.h" #include "mbfilter_uhc.h" +#define UNICODE_TABLE_UHC_DEF #include "unicode_table_uhc.h" static int mbfl_filt_ident_uhc(int c, mbfl_identify_filter *filter); Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp932_ext.h 2011-08-08 16:14:30 UTC (rev 314546) @@ -25,7 +25,9 @@ #ifndef UNICODE_TABLE_CP932_EXT_H #define UNICODE_TABLE_CP932_EXT_H -static const unsigned short cp932ext1_ucs_table[] = { +#ifdef UNICODE_TABLE_CP932_DEF + +const unsigned short cp932ext1_ucs_table[] = { /* ku 13 */ 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467, 0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F, @@ -40,10 +42,10 @@ 0x2261,0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F, 0x22BF,0x2235,0x2229,0x222A,0x0000,0x0000 }; -static const int cp932ext1_ucs_table_min = (13 - 1)*94; -static const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short)); +const int cp932ext1_ucs_table_min = (13 - 1)*94; +const int cp932ext1_ucs_table_max = (13 - 1)*94 + (sizeof (cp932ext1_ucs_table) / sizeof (unsigned short)); -static const unsigned short cp932ext2_ucs_table[] = { +const unsigned short cp932ext2_ucs_table[] = { /* ku 89 */ 0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631, 0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00, @@ -100,10 +102,10 @@ 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, 0x2178,0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02 }; -static const int cp932ext2_ucs_table_min = (89 - 1)*94; -static const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short)); +const int cp932ext2_ucs_table_min = (89 - 1)*94; +const int cp932ext2_ucs_table_max = (89 - 1)*94 + (sizeof (cp932ext2_ucs_table) / sizeof (unsigned short)); -static const unsigned short cp932ext3_ucs_table[] = { +const unsigned short cp932ext3_ucs_table[] = { /* ku 115 */ 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177, 0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165, @@ -164,7 +166,22 @@ 0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70, 0x9D6B,0xFA2D,0x9E19,0x9ED1 }; -static const int cp932ext3_ucs_table_min = (115 - 1)*94; -static const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short)); +const int cp932ext3_ucs_table_min = (115 - 1)*94; +const int cp932ext3_ucs_table_max = (115 - 1)*94 + (sizeof (cp932ext3_ucs_table) / sizeof (unsigned short)); +#else + +extern const unsigned short cp932ext1_ucs_table[]; +extern const unsigned short cp932ext2_ucs_table[]; +extern const unsigned short cp932ext3_ucs_table[]; + +extern const int cp932ext1_ucs_table_min; +extern const int cp932ext1_ucs_table_max; +extern const int cp932ext2_ucs_table_min; +extern const int cp932ext2_ucs_table_max; +extern const int cp932ext3_ucs_table_min; +extern const int cp932ext3_ucs_table_max; + +#endif + #endif /* UNICODE_TABLE_CP932_EXT_H */ Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp936.h =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp936.h 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_cp936.h 2011-08-08 16:14:30 UTC (rev 314546) @@ -28,8 +28,9 @@ /* * Unicode table */ +#ifdef UNICODE_TABLE_CP936_DEF -static const unsigned short cp936_ucs_table[] = { +const unsigned short cp936_ucs_table[] = { /* 0x8100 */ 0x4e02,0x4e04,0x4e05,0x4e06,0x4e0f,0x4e12,0x4e17,0x4e1f, 0x4e20,0x4e21,0x4e23,0x4e26,0x4e29,0x4e2e,0x4e2f,0x4e31, @@ -3159,11 +3160,11 @@ 0xfa0c,0xfa0d,0xfa0e,0xfa0f,0xfa11,0xfa13,0xfa14,0xfa18, 0xfa1f,0xfa20,0xfa21,0xfa23,0xfa24,0xfa27,0xfa28,0xfa29}; -static const int cp936_ucs_table_size = (sizeof(cp936_ucs_table)/sizeof(unsigned short)); +const int cp936_ucs_table_size = (sizeof(cp936_ucs_table)/sizeof(unsigned short)); /* UCS -> CP936 */ -static const unsigned short ucs_a1_cp936_table[] = { +const unsigned short ucs_a1_cp936_table[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3308,11 +3309,11 @@ 0xa7ea,0xa7eb,0xa7ec,0xa7ed,0xa7ee,0xa7ef,0xa7f0,0xa7f1, 0x0000,0xa7d7}; -static const int ucs_a1_cp936_table_min = 0x0000; -static const int ucs_a1_cp936_table_max = 0x0000 + (sizeof (ucs_a1_cp936_table) / sizeof (unsigned short)); +const int ucs_a1_cp936_table_min = 0x0000; +const int ucs_a1_cp936_table_max = 0x0000 + (sizeof (ucs_a1_cp936_table) / sizeof (unsigned short)); /* 0x2000 */ -static const unsigned short ucs_a2_cp936_table[] = { +const unsigned short ucs_a2_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0xa95c,0x0000,0x0000,0xa843,0xa1aa,0xa844,0xa1ac,0x0000, @@ -3544,10 +3545,10 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_a2_cp936_table_min = 0x2000; -static const int ucs_a2_cp936_table_max = 0x2000 + (sizeof (ucs_a2_cp936_table) / sizeof (unsigned short)); +const int ucs_a2_cp936_table_min = 0x2000; +const int ucs_a2_cp936_table_max = 0x2000 + (sizeof (ucs_a2_cp936_table) / sizeof (unsigned short)); -static const unsigned short ucs_a3_cp936_table[] = { +const unsigned short ucs_a3_cp936_table[] = { /* 0x2f00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3714,11 +3715,11 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_a3_cp936_table_min = 0x2f00; -static const int ucs_a3_cp936_table_max = 0x2f00 + (sizeof (ucs_a3_cp936_table) / sizeof (unsigned short)); +const int ucs_a3_cp936_table_min = 0x2f00; +const int ucs_a3_cp936_table_max = 0x2f00 + (sizeof (ucs_a3_cp936_table) / sizeof (unsigned short)); /* 4d00h CJK Unified Ideographs (+ Extension A) */ -static const unsigned short ucs_i_cp936_table[] = { +const unsigned short ucs_i_cp936_table[] = { /* 0x4d00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -6377,13 +6378,13 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; /* 9fffh */ -static const int ucs_i_cp936_table_min = 0x4d00; -static const int ucs_i_cp936_table_max = 0x4d00 + (sizeof (ucs_i_cp936_table) / sizeof (unsigned short)); +const int ucs_i_cp936_table_min = 0x4d00; +const int ucs_i_cp936_table_max = 0x4d00 + (sizeof (ucs_i_cp936_table) / sizeof (unsigned short)); /* 0xf900 CJK Compatibility Ideographs */ -static const unsigned short ucs_ci_cp936_table[] = { +const unsigned short ucs_ci_cp936_table[] = { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -6423,33 +6424,33 @@ 0xfe47,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xfe48, 0xfe49,0xfe4a,0x0000,0xfe4b,0xfe4c,0x0000,0x0000,0xfe4d, 0xfe4e,0xfe4f,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000}; -static const int ucs_ci_cp936_table_min = 0xf900; -static const int ucs_ci_cp936_table_max = 0xf900 + (sizeof (ucs_ci_cp936_table) / sizeof (unsigned short)); +const int ucs_ci_cp936_table_min = 0xf900; +const int ucs_ci_cp936_table_max = 0xf900 + (sizeof (ucs_ci_cp936_table) / sizeof (unsigned short)); /* FE30h CJK Compatibility Forms */ -static const unsigned short ucs_cf_cp936_table[] = { +const unsigned short ucs_cf_cp936_table[] = { 0xa955,0xa6f2,0x0000,0xa6f4,0xa6f5,0xa6e0,0xa6e1,0xa6f0, 0xa6f1,0xa6e2,0xa6e3,0xa6ee,0xa6ef,0xa6e6,0xa6e7,0xa6e4, 0xa6e5,0xa6e8,0xa6e9,0xa6ea,0xa6eb,0x0000,0x0000,0x0000, 0x0000,0xa968,0xa969,0xa96a,0xa96b,0xa96c,0xa96d,0xa96e}; -static const int ucs_cf_cp936_table_min = 0xfe30; -static const int ucs_cf_cp936_table_max = 0xfe30 + (sizeof (ucs_cf_cp936_table) / sizeof (unsigned short)); +const int ucs_cf_cp936_table_min = 0xfe30; +const int ucs_cf_cp936_table_max = 0xfe30 + (sizeof (ucs_cf_cp936_table) / sizeof (unsigned short)); /* FE50h Small Form Variants */ -static const unsigned short ucs_sfv_cp936_table[] = { +const unsigned short ucs_sfv_cp936_table[] = { 0xa96f,0xa970,0xa971,0x0000,0xa972,0xa973,0xa974,0xa975, 0x0000,0xa976,0xa977,0xa978,0xa979,0xa97a,0xa97b,0xa97c, 0xa97d,0xa97e,0xa980,0xa981,0xa982,0xa983,0xa984,0x0000, 0xa985,0xa986,0xa987,0xa988,0x0000,0x0000,0x0000,0x0000}; -static const int ucs_sfv_cp936_table_min = 0xfe50; -static const int ucs_sfv_cp936_table_max = 0xfe50 + (sizeof (ucs_sfv_cp936_table) / sizeof (unsigned short)); +const int ucs_sfv_cp936_table_min = 0xfe50; +const int ucs_sfv_cp936_table_max = 0xfe50 + (sizeof (ucs_sfv_cp936_table) / sizeof (unsigned short)); /* FF00h Halfwidth and Fullwidth Forms */ -static const unsigned short ucs_hff_cp936_table[] = { +const unsigned short ucs_hff_cp936_table[] = { 0x0000,0xa3a1,0xa3a2,0xa3a3,0xa1e7,0xa3a5,0xa3a6,0xa3a7, 0xa3a8,0xa3a9,0xa3aa,0xa3ab,0xa3ac,0xa3ad,0xa3ae,0xa3af, 0xa3b0,0xa3b1,0xa3b2,0xa3b3,0xa3b4,0xa3b5,0xa3b6,0xa3b7, @@ -6483,7 +6484,39 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_hff_cp936_table_min = 0xff00; -static const int ucs_hff_cp936_table_max = 0xff00 + (sizeof (ucs_hff_cp936_table) / sizeof (unsigned short)); +const int ucs_hff_cp936_table_min = 0xff00; +const int ucs_hff_cp936_table_max = 0xff00 + (sizeof (ucs_hff_cp936_table) / sizeof (unsigned short)); +#else + +extern const unsigned short cp936_ucs_table[]; +extern const unsigned short ucs_a1_cp936_table[]; +extern const unsigned short ucs_a2_cp936_table[]; +extern const unsigned short ucs_a3_cp936_table[]; +extern const unsigned short ucs_i_cp936_table[]; +extern const unsigned short ucs_ci_cp936_table[]; +extern const unsigned short ucs_cf_cp936_table[]; +extern const unsigned short ucs_sfv_cp936_table[]; +extern const unsigned short ucs_hff_cp936_table[]; + +extern const int cp936_ucs_table_size; +extern const int ucs_a1_cp936_table_min; +extern const int ucs_a1_cp936_table_max; +extern const int ucs_a2_cp936_table_min; +extern const int ucs_a2_cp936_table_max; +extern const int ucs_a3_cp936_table_min; +extern const int ucs_a3_cp936_table_max; +extern const int ucs_i_cp936_table_min; +extern const int ucs_i_cp936_table_max; +extern const int ucs_ci_cp936_table_min; +extern const int ucs_ci_cp936_table_max; +extern const int ucs_cf_cp936_table_min; +extern const int ucs_cf_cp936_table_max; +extern const int ucs_sfv_cp936_table_min; +extern const int ucs_sfv_cp936_table_max; +extern const int ucs_hff_cp936_table_min; +extern const int ucs_hff_cp936_table_max; + +#endif + #endif /* UNICODE_TABLE_CP936_H */ Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_jis.h =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_jis.h 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_jis.h 2011-08-08 16:14:30 UTC (rev 314546) @@ -27,10 +27,12 @@ #ifndef UNICODE_TABLE_JIS_H #define UNICODE_TABLE_JIS_H +#ifdef UNICODE_TABLE_JIS_DEF + /* * Unicode table */ -static const unsigned short jisx0208_ucs_table[] = { +const unsigned short jisx0208_ucs_table[] = { /* ku 1 */ 0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B, 0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E, @@ -1197,9 +1199,9 @@ 0x582F,0x69C7,0x9059,0x7464,0x51DC,0x7199 }; -static const int jisx0208_ucs_table_size = (sizeof (jisx0208_ucs_table) / sizeof (unsigned short)); +const int jisx0208_ucs_table_size = (sizeof (jisx0208_ucs_table) / sizeof (unsigned short)); -static const unsigned short jisx0212_ucs_table[] = { +const unsigned short jisx0212_ucs_table[] = { /* ku 1 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2276,9 +2278,9 @@ 0x9FA2,0x9FA3,0x9FA5 }; -static const int jisx0212_ucs_table_size = (sizeof (jisx0212_ucs_table) / sizeof (unsigned short)); +const int jisx0212_ucs_table_size = (sizeof (jisx0212_ucs_table) / sizeof (unsigned short)); -static const unsigned short ucs_a1_jis_table[] = { +const unsigned short ucs_a1_jis_table[] = { /* 0000h */ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, @@ -2429,11 +2431,11 @@ 0x0000,0x2757,0xA7F2,0xA7F3,0xA7F4,0xA7F5,0xA7F6,0xA7F7, 0xA7F8,0xA7F9,0xA7FA,0xA7FB,0xA7FC,0x0000,0xA7FD,0xA7FE }; -static const int ucs_a1_jis_table_min = 0x0000; -static const int ucs_a1_jis_table_max = 0x0000 + (sizeof (ucs_a1_jis_table) / sizeof (unsigned short)); +const int ucs_a1_jis_table_min = 0x0000; +const int ucs_a1_jis_table_max = 0x0000 + (sizeof (ucs_a1_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_a2_jis_table[] = { +const unsigned short ucs_a2_jis_table[] = { /* 2000h */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3012,11 +3014,11 @@ 0x2570,0x2571,0x2572,0x2573,0x2574,0x2575,0x2576,0x0000, 0x0000,0x0000,0x0000,0x2126,0x213C,0x2133,0x2134,0x0000 }; -static const int ucs_a2_jis_table_min = 0x2000; -static const int ucs_a2_jis_table_max = 0x2000 + (sizeof (ucs_a2_jis_table) / sizeof (unsigned short)); +const int ucs_a2_jis_table_min = 0x2000; +const int ucs_a2_jis_table_max = 0x2000 + (sizeof (ucs_a2_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_i_jis_table[] = { +const unsigned short ucs_i_jis_table[] = { /* 4E00h */ 0x306C,0x437A,0xB0A1,0x3C37,0xB0A2,0xB0A3,0x0000,0x4B7C, 0x3E66,0x3B30,0x3E65,0x323C,0xB0A4,0x4954,0x4D3F,0x0000, @@ -5805,11 +5807,11 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static const int ucs_i_jis_table_min = 0x4E00; -static const int ucs_i_jis_table_max = 0x4E00 + (sizeof (ucs_i_jis_table) / sizeof (unsigned short)); +const int ucs_i_jis_table_min = 0x4E00; +const int ucs_i_jis_table_max = 0x4E00 + (sizeof (ucs_i_jis_table) / sizeof (unsigned short)); -static const unsigned short ucs_r_jis_table[] = { +const unsigned short ucs_r_jis_table[] = { /* FF00h */ 0x0000,0x212A,0x0000,0x2174,0x2170,0x2173,0x2175,0x0000, 0x214A,0x214B,0x2176,0x215C,0x2124,0x0000,0x2125,0x213F, @@ -5841,7 +5843,30 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x2131,0x0000,0x216F }; -static const int ucs_r_jis_table_min = 0xFF00; -static const int ucs_r_jis_table_max = 0xFF00 + (sizeof (ucs_r_jis_table) / sizeof (unsigned short)); +int ucs_r_jis_table_min = 0xFF00; +int ucs_r_jis_table_max = 0xFF00 + (sizeof (ucs_r_jis_table) / sizeof (unsigned short)); +#else + +extern const unsigned short jisx0208_ucs_table[]; +extern const unsigned short jisx0212_ucs_table[]; +extern const unsigned short ucs_a1_jis_table[]; +extern const unsigned short ucs_a2_jis_table[]; +extern const unsigned short ucs_i_jis_table[]; +extern const unsigned short ucs_r_jis_table[]; + +extern const int jisx0208_ucs_table_size; +extern const int jisx0212_ucs_table_size; +extern const int ucs_a1_jis_table_min; +extern const int ucs_a1_jis_table_max; +extern const int ucs_a2_jis_table_min; +extern const int ucs_a2_jis_table_max; +extern const int ucs_i_jis_table_min; +extern const int ucs_i_jis_table_max; +extern int ucs_r_jis_table_min; +extern int ucs_r_jis_table_max; + +#endif + + #endif /* UNICODE_TABLE_JIS_H */ Modified: php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_uhc.h =================================================================== --- php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_uhc.h 2011-08-08 16:14:15 UTC (rev 314545) +++ php/php-src/trunk/ext/mbstring/libmbfl/filters/unicode_table_uhc.h 2011-08-08 16:14:30 UTC (rev 314546) @@ -28,8 +28,9 @@ /* * Unicode table */ +#ifdef UNICODE_TABLE_UHC_DEF -static const unsigned short uhc1_ucs_table[] = { +const unsigned short uhc1_ucs_table[] = { 0xac02,0xac03,0xac05,0xac06,0xac0b,0xac0c,0xac0d,0xac0e, 0xac0f,0xac18,0xac1e,0xac1f,0xac21,0xac22,0xac23,0xac25, 0xac26,0xac27,0xac28,0xac29,0xac2a,0xac2b,0xac2e,0xac32, @@ -792,9 +793,9 @@ 0xc89a,0xc89b,0xc89c,0xc89e,0xc8a0,0xc8a2,0xc8a3,0xc8a4 }; -static const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); +const int uhc1_ucs_table_size = (sizeof(uhc1_ucs_table)/sizeof(unsigned short)); -static const unsigned short uhc2_ucs_table[] = { +const unsigned short uhc2_ucs_table[] = { 0xc8a5,0xc8a6,0xc8a7,0xc8a9,0xc8aa,0xc8ab,0xc8ac,0xc8ad, 0xc8ae,0xc8af,0xc8b0,0xc8b1,0xc8b2,0xc8b3,0xc8b4,0xc8b5, 0xc8b6,0xc8b7,0xc8b8,0xc8b9,0xc8ba,0xc8bb,0xc8be,0xc8bf, @@ -1699,9 +1700,9 @@ 0xd3d0,0xd3d8,0xd3e1,0xd3e3,0xd3ec,0xd3ed,0xd3f0,0xd3f4, 0xd3fc,0xd3fd,0xd3ff,0xd401}; -static const int uhc2_ucs_table_size = (sizeof(uhc2_ucs_table)/sizeof(unsigned short)); +const int uhc2_ucs_table_size = (sizeof(uhc2_ucs_table)/sizeof(unsigned short)); -static const unsigned short uhc3_ucs_table[] = { +const unsigned short uhc3_ucs_table[] = { 0xd408,0xd41d,0xd440,0xd444,0xd45c,0xd460,0xd464,0xd46d, 0xd46f,0xd478,0xd479,0xd47c,0xd47f,0xd480,0xd482,0xd488, 0xd489,0xd48b,0xd48d,0xd494,0xd4a9,0xd4cc,0xd4d0,0xd4d4, @@ -2350,10 +2351,10 @@ 0x665e,0x66e6,0x7199,0x71b9,0x71ba,0x72a7,0x79a7,0x7a00, 0x7fb2,0x8a70}; -static const int uhc3_ucs_table_size = (sizeof(uhc3_ucs_table)/sizeof(unsigned short)); +const int uhc3_ucs_table_size = (sizeof(uhc3_ucs_table)/sizeof(unsigned short)); /* UCS -> UHC */ -static const unsigned short ucs_a1_uhc_table[] = { +const unsigned short ucs_a1_uhc_table[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2498,10 +2499,10 @@ 0xacea,0xaceb,0xacec,0xaced,0xacee,0xacef,0xacf0,0xacf1, 0x0000,0xacd7}; -static const int ucs_a1_uhc_table_min = 0x0000; -static const int ucs_a1_uhc_table_max = 0x0000 + (sizeof(ucs_a1_uhc_table)/sizeof(unsigned short)); +const int ucs_a1_uhc_table_min = 0x0000; +const int ucs_a1_uhc_table_max = 0x0000 + (sizeof(ucs_a1_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_a2_uhc_table[] = { +const unsigned short ucs_a2_uhc_table[] = { /* 0x2000 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2714,10 +2715,10 @@ 0xa2bc,0xa2bd,0x0000,0xa2c0,0xa2bb,0xa2be,0x0000,0xa2bf, 0xa2cd,0xa2db,0xa2dc,0x0000,0xa2dd,0xa2da}; -static const int ucs_a2_uhc_table_min = 0x2000; -static const int ucs_a2_uhc_table_max = 0x2000 + (sizeof(ucs_a2_uhc_table)/sizeof(unsigned short)); +const int ucs_a2_uhc_table_min = 0x2000; +const int ucs_a2_uhc_table_max = 0x2000 + (sizeof(ucs_a2_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_a3_uhc_table[] = { +const unsigned short ucs_a3_uhc_table[] = { /* 0x2f00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -2878,10 +2879,10 @@ 0xa7ea,0x0000,0x0000,0xa7eb,0x0000,0x0000,0xa7df,0x0000, 0xa2e4,0x0000,0x0000,0xa7e4,0xa7ee,0xa7e9}; -static const int ucs_a3_uhc_table_min = 0x2f00; -static const int ucs_a3_uhc_table_max = 0x2f00 + (sizeof(ucs_a3_uhc_table)/sizeof(unsigned short)); +const int ucs_a3_uhc_table_min = 0x2f00; +const int ucs_a3_uhc_table_max = 0x2f00 + (sizeof(ucs_a3_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_i_uhc_table[] = { +const unsigned short ucs_i_uhc_table[] = { /* 0x4d00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -5591,10 +5592,10 @@ 0xdbc2,0x0000,0x0000,0x0000,0x0000,0xcafe,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0xcfcf}; -static const int ucs_i_uhc_table_min = 0x4d00; -static const int ucs_i_uhc_table_max = 0x4d00 + (sizeof(ucs_i_uhc_table)/sizeof(unsigned short)); +const int ucs_i_uhc_table_min = 0x4d00; +const int ucs_i_uhc_table_max = 0x4d00 + (sizeof(ucs_i_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_s_uhc_table[] = { +const unsigned short ucs_s_uhc_table[] = { /* 0xab00 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -7070,10 +7071,10 @@ 0xc64f,0xc650,0xc651,0xc652}; -static const int ucs_s_uhc_table_min = 0xab00; -static const int ucs_s_uhc_table_max = 0xab00 + (sizeof(ucs_s_uhc_table)/sizeof(unsigned short)); +const int ucs_s_uhc_table_min = 0xab00; +const int ucs_s_uhc_table_max = 0xab00 + (sizeof(ucs_s_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_r1_uhc_table[] = { +const unsigned short ucs_r1_uhc_table[] = { /* 0xf800 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -7142,10 +7143,10 @@ 0xf4ee,0xf6f4,0xf6f6,0xf7b8,0xf7c8,0xf7d3,0xf8db,0xf8f0, 0xfaa1,0xfaa2,0xfae6,0xfca9}; -static const int ucs_r1_uhc_table_min = 0xf800; -static const int ucs_r1_uhc_table_max = 0xf800 + (sizeof(ucs_r1_uhc_table)/sizeof(unsigned short)); +const int ucs_r1_uhc_table_min = 0xf800; +const int ucs_r1_uhc_table_max = 0xf800 + (sizeof(ucs_r1_uhc_table)/sizeof(unsigned short)); -static const unsigned short ucs_r2_uhc_table[] = { +const unsigned short ucs_r2_uhc_table[] = { /* 0xff00 */ 0x0000,0xa3a1,0xa3a2,0xa3a3,0xa3a4,0xa3a5,0xa3a6,0xa3a7, 0xa3a8,0xa3a9,0xa3aa,0xa3ab,0xa3ac,0xa3ad,0xa3ae,0xa3af, @@ -7177,10 +7178,45 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0xa1cb,0xa1cc,0xa1fe,0xa3fe,0x0000,0xa1cd,0xa3dc}; -static const int ucs_r2_uhc_table_min = 0xff00; -static const int ucs_r2_uhc_table_max = 0xff00 + (sizeof (ucs_r2_uhc_table) / sizeof (unsigned short)); +const int ucs_r2_uhc_table_min = 0xff00; +const int ucs_r2_uhc_table_max = 0xff00 + (sizeof (ucs_r2_uhc_table) / sizeof (unsigned short)); +#else +extern const unsigned short uhc1_ucs_table[]; +extern const unsigned short uhc2_ucs_table[]; +extern const unsigned short uhc3_ucs_table[]; +extern const unsigned short ucs_a1_uhc_table[]; +extern const unsigned short ucs_a2_uhc_table[]; +extern const unsigned short ucs_a3_uhc_table[]; +extern const unsigned short ucs_i_uhc_table[]; +extern const unsigned short ucs_s_uhc_table[]; +extern const unsigned short ucs_r1_uhc_table[]; +extern const unsigned short ucs_r2_uhc_table[]; +extern const int uhc1_ucs_table_size; +extern const int uhc2_ucs_table_size; +extern const int uhc3_ucs_table_size; +extern const int ucs_a1_uhc_table_min; +extern const int ucs_a1_uhc_table_max; +extern const int ucs_a2_uhc_table_min; +extern const int ucs_a2_uhc_table_max; +extern const int ucs_a3_uhc_table_min; +extern const int ucs_a3_uhc_table_max; +extern const int ucs_i_uhc_table_min; +extern const int ucs_i_uhc_table_max; +extern const int ucs_s_uhc_table_min; +extern const int ucs_s_uhc_table_max; +extern const int ucs_r1_uhc_table_min; +extern const int ucs_r1_uhc_table_max; +extern const int ucs_r2_uhc_table_min; +extern const int ucs_r2_uhc_table_max; + + + +#endif + + + #endif /* UNICODE_TABLE_UHC_H */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php