comparison src/mbyte.c @ 297:9a1c2a8186b7

updated for version 7.0078
author vimboss
date Wed, 01 Jun 2005 21:51:55 +0000
parents bf6ee000a80c
children 006e9c8a6a8a
comparison
equal deleted inserted replaced
296:00b73c762d77 297:9a1c2a8186b7
1947 int rangeEnd; 1947 int rangeEnd;
1948 int step; 1948 int step;
1949 int offset; 1949 int offset;
1950 } convertStruct; 1950 } convertStruct;
1951 1951
1952 convertStruct foldCase[] = 1952 static convertStruct foldCase[] =
1953 { 1953 {
1954 {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, 1954 {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32},
1955 {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, 1955 {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1},
1956 {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, 1956 {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121},
1957 {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, 1957 {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1},
2038 * They must be in numeric order, because we use binary search on them. 2038 * They must be in numeric order, because we use binary search on them.
2039 * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range 2039 * An entry such as {0x41,0x5a,1,32} means that UCS-4 characters in the range
2040 * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for 2040 * from 0x41 to 0x5a inclusive, stepping by 1, are switched to lower (for
2041 * example) by adding 32. 2041 * example) by adding 32.
2042 */ 2042 */
2043 convertStruct toLower[] = 2043 static convertStruct toLower[] =
2044 { 2044 {
2045 {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32}, 2045 {0x41,0x5a,1,32}, {0xc0,0xd6,1,32}, {0xd8,0xde,1,32},
2046 {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1}, 2046 {0x100,0x12e,2,1}, {0x130,0x130,-1,-199}, {0x132,0x136,2,1},
2047 {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121}, 2047 {0x139,0x147,2,1}, {0x14a,0x176,2,1}, {0x178,0x178,-1,-121},
2048 {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1}, 2048 {0x179,0x17d,2,1}, {0x181,0x181,-1,210}, {0x182,0x184,2,1},
2073 {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128}, 2073 {0x1fea,0x1feb,1,-112}, {0x1fec,0x1fec,-1,-7}, {0x1ff8,0x1ff9,1,-128},
2074 {0x1ffa,0x1ffb,1,-126}, {0x2126,0x2126,-1,-7517}, {0x212a,0x212a,-1,-8383}, 2074 {0x1ffa,0x1ffb,1,-126}, {0x2126,0x2126,-1,-7517}, {0x212a,0x212a,-1,-8383},
2075 {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40} 2075 {0x212b,0x212b,-1,-8262}, {0xff21,0xff3a,1,32}, {0x10400,0x10427,1,40}
2076 }; 2076 };
2077 2077
2078 convertStruct toUpper[] = 2078 static convertStruct toUpper[] =
2079 { 2079 {
2080 {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32}, 2080 {0x61,0x7a,1,-32}, {0xb5,0xb5,-1,743}, {0xe0,0xf6,1,-32},
2081 {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1}, 2081 {0xf8,0xfe,1,-32}, {0xff,0xff,-1,121}, {0x101,0x12f,2,-1},
2082 {0x131,0x131,-1,-232}, {0x133,0x137,2,-1}, {0x13a,0x148,2,-1}, 2082 {0x131,0x131,-1,-232}, {0x133,0x137,2,-1}, {0x13a,0x148,2,-1},
2083 {0x14b,0x177,2,-1}, {0x17a,0x17e,2,-1}, {0x17f,0x17f,-1,-300}, 2083 {0x14b,0x177,2,-1}, {0x17a,0x17e,2,-1}, {0x17f,0x17f,-1,-300},
3132 */ 3132 */
3133 3133
3134 #ifndef DYNAMIC_ICONV /* just generating prototypes */ 3134 #ifndef DYNAMIC_ICONV /* just generating prototypes */
3135 # define HINSTANCE int 3135 # define HINSTANCE int
3136 #endif 3136 #endif
3137 HINSTANCE hIconvDLL = 0; 3137 static HINSTANCE hIconvDLL = 0;
3138 HINSTANCE hMsvcrtDLL = 0; 3138 static HINSTANCE hMsvcrtDLL = 0;
3139 3139
3140 # ifndef DYNAMIC_ICONV_DLL 3140 # ifndef DYNAMIC_ICONV_DLL
3141 # define DYNAMIC_ICONV_DLL "iconv.dll" 3141 # define DYNAMIC_ICONV_DLL "iconv.dll"
3142 # define DYNAMIC_ICONV_DLL_ALT "libiconv.dll" 3142 # define DYNAMIC_ICONV_DLL_ALT "libiconv.dll"
3143 # endif 3143 # endif