diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
commit | 65ca700def99289cc31a7040537f5aa6e12bf485 (patch) | |
tree | 97b3a07299b626c519da0e80c122b5b79b933914 /strings | |
parent | 2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff) | |
parent | 6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff) | |
download | mariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz |
merge.
checkpoint.
does not compile.
Diffstat (limited to 'strings')
32 files changed, 1180 insertions, 892 deletions
diff --git a/strings/CMakeLists.txt b/strings/CMakeLists.txt index 552bf942700..8d35c732333 100644 --- a/strings/CMakeLists.txt +++ b/strings/CMakeLists.txt @@ -22,6 +22,7 @@ SET(STRINGS_SOURCES bchange.c bmove_upp.c ctype-big5.c ctype-bin.c ctype-cp932.c is_prefix.c llstr.c longlong2str.c my_strtoll10.c my_vsnprintf.c str2int.c str_alloc.c strcend.c strend.c strfill.c strmake.c strmov.c strnmov.c strxmov.c strxnmov.c xml.c + strmov_overlapp.c my_strchr.c strcont.c strappend.c) IF(NOT HAVE_STRNLEN) diff --git a/strings/Makefile.am b/strings/Makefile.am index 3a051e38899..0cb0f4dc060 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -30,13 +30,13 @@ pkglib_LIBRARIES = libmystrings.a # Exact one of ASSEMBLER_X if ASSEMBLER_x86 ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s -CSRCS = bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c dtoa.c strmov.c +CSRCS = bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c dtoa.c strmov.c strmov_overlapp.c else #no assembler ASRCS = # These file MUST all be on the same line!! Otherwise automake # generats a very broken makefile -CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c my_strchr.c dtoa.c +CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c my_strchr.c dtoa.c strmov_overlapp.c endif libmystrings_a_SOURCES = $(ASRCS) $(CSRCS) @@ -53,10 +53,10 @@ EXTRA_DIST = ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc strfill.c strcend.c is_prefix.c strstr.c \ strmake.c strnmov.c strmov.c strnlen.c \ t_ctype.h my_strchr.c CMakeLists.txt \ - CHARSET_INFO.txt + CHARSET_INFO.txt strmov_overlapp.c libmystrings_a_LIBADD= -conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c +conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c bcmp.c conf_to_src_LDADD= #force static linking of conf_to_src - essential when linking against #custom installation of libc diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c index 73ade93f6e1..d7321d3a691 100644 --- a/strings/conf_to_src.c +++ b/strings/conf_to_src.c @@ -23,15 +23,14 @@ #define ROW16_LEN 8 #define MAX_BUF 64*1024 -static CHARSET_INFO all_charsets[512]; - +static struct charset_info_st all_charsets[512]; void -print_array(FILE *f, const char *set, const char *name, uchar *a, int n) +print_array(FILE *f, const char *set, const char *name, const uchar *a, int n) { int i; - fprintf(f,"uchar %s_%s[] = {\n", name, set); + fprintf(f,"static const uchar %s_%s[] = {\n", name, set); for (i=0 ;i<n ; i++) { @@ -44,11 +43,11 @@ print_array(FILE *f, const char *set, const char *name, uchar *a, int n) void -print_array16(FILE *f, const char *set, const char *name, uint16 *a, int n) +print_array16(FILE *f, const char *set, const char *name, const uint16 *a, int n) { int i; - fprintf(f,"uint16 %s_%s[] = {\n", name, set); + fprintf(f,"static const uint16 %s_%s[] = {\n", name, set); for (i=0 ;i<n ; i++) { @@ -82,7 +81,7 @@ char *mdup(const char *src, uint len) return dst; } -static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from) +static void simple_cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from) { to->number= from->number ? from->number : to->number; to->state|= from->state; @@ -124,7 +123,7 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs) (cs->sort_order || (cs->state & MY_CS_BINSORT)))); } -static int add_collation(CHARSET_INFO *cs) +static int add_collation(struct charset_info_st *cs) { if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name)))) { @@ -335,7 +334,7 @@ main(int argc, char **argv __attribute__((unused))) } } - fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n"); + fprintf(f,"struct charset_info_st compiled_charsets[] = {\n"); for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 3007d76a5a4..691513ec92c 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -47,7 +47,7 @@ #define big5head(e) ((uchar)(e>>8)) #define big5tail(e) ((uchar)(e&0xff)) -static uchar ctype_big5[257] = +static const uchar ctype_big5[257] = { 0, /* For standard library */ 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, @@ -68,7 +68,7 @@ static uchar ctype_big5[257] = 3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0, }; -static uchar to_lower_big5[]= +static const uchar to_lower_big5[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -104,7 +104,7 @@ static uchar to_lower_big5[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar to_upper_big5[]= +static const uchar to_upper_big5[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -140,7 +140,7 @@ static uchar to_upper_big5[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar sort_order_big5[]= +static const uchar sort_order_big5[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -1008,7 +1008,7 @@ static uint mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c) /* page 0 0xA140-0xC7FC */ -static uint16 tab_big5_uni0[]={ +static const uint16 tab_big5_uni0[]={ 0x3000,0xFF0C,0x3001,0x3002,0xFF0E,0x2022,0xFF1B,0xFF1A, 0xFF1F,0xFF01,0xFE30,0x2026,0x2025,0xFE50,0xFF64,0xFE52, 0x00B7,0xFE54,0xFE55,0xFE56,0xFE57,0xFF5C,0x2013,0xFE31, @@ -2251,7 +2251,7 @@ static uint16 tab_big5_uni0[]={ 0x2479,0x247A,0x247B,0x247C,0x247D}; /* page 1 0xC940-0xF9DC */ -static uint16 tab_big5_uni1[]={ +static const uint16 tab_big5_uni1[]={ 0x4E42,0x4E5C,0x51F5,0x531A,0x5382,0x4E07,0x4E0C,0x4E47, 0x4E8D,0x56D7,0xFA0C,0x5C6E,0x5F73,0x4E0F,0x5187,0x4E0E, 0x4E2E,0x4E93,0x4EC2,0x4EC9,0x4EC8,0x5198,0x52FC,0x536C, @@ -3819,7 +3819,7 @@ static int func_big5_uni_onechar(int code){ /* page 0 0x00A2-0x00F7 */ -static uint16 tab_uni_big50[]={ +static const uint16 tab_uni_big50[]={ 0xA246,0xA247, 0,0xA244, 0,0xA1B1, 0, 0, 0, 0, 0, 0, 0, 0,0xA258,0xA1D3, 0, 0, 0, 0, 0,0xA150, 0, 0, @@ -3833,7 +3833,7 @@ static uint16 tab_uni_big50[]={ 0, 0, 0, 0, 0,0xA1D2}; /* page 1 0x02C7-0x0451 */ -static uint16 tab_uni_big51[]={ +static const uint16 tab_uni_big51[]={ 0xA3BE, 0,0xA3BC,0xA3BD,0xA3BF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0xA3BB, 0, 0, 0, 0, 0, @@ -3886,7 +3886,7 @@ static uint16 tab_uni_big51[]={ 0xC7E8, 0,0xC7CE}; /* page 2 0x2013-0x22BF */ -static uint16 tab_uni_big52[]={ +static const uint16 tab_uni_big52[]={ 0xA156,0xA158, 0, 0, 0,0xA1A5,0xA1A6, 0, 0,0xA1A7,0xA1A8, 0, 0, 0, 0,0xA145, 0, 0,0xA14C,0xA14B, 0, 0, 0, 0, @@ -3975,7 +3975,7 @@ static uint16 tab_uni_big52[]={ 0, 0, 0, 0,0xA1E9}; /* page 3 0x2460-0x2642 */ -static uint16 tab_uni_big53[]={ +static const uint16 tab_uni_big53[]={ 0xC7E9,0xC7EA,0xC7EB,0xC7EC,0xC7ED,0xC7EE,0xC7EF,0xC7F0, 0xC7F1,0xC7F2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0xC7F3,0xC7F4,0xC7F5,0xC7F6, @@ -4039,7 +4039,7 @@ static uint16 tab_uni_big53[]={ 0xA1F0,0xA1F2,0xA1F1}; /* page 4 0x3000-0x3129 */ -static uint16 tab_uni_big54[]={ +static const uint16 tab_uni_big54[]={ 0xA140,0xA142,0xA143,0xA1B2, 0,0xC6A4, 0, 0, 0xA171,0xA172,0xA16D,0xA16E,0xA175,0xA176,0xA179,0xA17A, 0xA169,0xA16A,0xA245, 0,0xA165,0xA166, 0, 0, @@ -4080,11 +4080,11 @@ static uint16 tab_uni_big54[]={ 0xA3B9,0xA3BA}; /* page 5 0x32A3-0x32A3 */ -static uint16 tab_uni_big55[]={ +static const uint16 tab_uni_big55[]={ 0xA1C0}; /* page 6 0x338E-0x33D5 */ -static uint16 tab_uni_big56[]={ +static const uint16 tab_uni_big56[]={ 0xA255,0xA256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0xA250,0xA251, 0xA252, 0, 0,0xA254, 0, 0, 0, 0, @@ -4097,7 +4097,7 @@ static uint16 tab_uni_big56[]={ }; /* page 7 0x4E00-0x9483 */ -static uint16 tab_uni_big57[]={ +static const uint16 tab_uni_big57[]={ 0xA440,0xA442, 0,0xA443, 0, 0, 0,0xC945, 0xA456,0xA454,0xA457,0xA455,0xC946,0xA4A3,0xC94F,0xC94D, 0xA4A2,0xA4A1, 0, 0,0xA542,0xA541,0xA540, 0, @@ -6357,7 +6357,7 @@ static uint16 tab_uni_big57[]={ 0xF9C0,0xF9C1,0xF9BF,0xF9C9}; /* page 8 0x9577-0x9FA4 */ -static uint16 tab_uni_big58[]={ +static const uint16 tab_uni_big58[]={ 0xAAF8, 0, 0,0xD844,0xDC78,0xE8A5,0xF376, 0, 0,0xAAF9, 0,0xADAC,0xB07B, 0, 0,0xD845, 0,0xD846,0xB3AC, 0,0xB67D,0xDC7A,0xDC79,0xB6A3, @@ -6686,11 +6686,11 @@ static uint16 tab_uni_big58[]={ 0,0xEFB6, 0,0xF7CF, 0,0xF9A1}; /* page 9 0xFA0C-0xFA0D */ -static uint16 tab_uni_big59[]={ +static const uint16 tab_uni_big59[]={ 0xC94A,0xDDFC}; /* page 10 0xFE30-0xFFFD */ -static uint16 tab_uni_big510[]={ +static const uint16 tab_uni_big510[]={ 0xA14A,0xA157, 0,0xA159,0xA15B,0xA15F,0xA160,0xA163, 0xA164,0xA167,0xA168,0xA16B,0xA16C,0xA16F,0xA170,0xA173, 0xA174,0xA177,0xA178,0xA17B,0xA17C, 0, 0, 0, @@ -6914,7 +6914,7 @@ static MY_CHARSET_HANDLER my_charset_big5_handler= my_scan_8bit }; -CHARSET_INFO my_charset_big5_chinese_ci= +struct charset_info_st my_charset_big5_chinese_ci= { 1,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ @@ -6947,7 +6947,7 @@ CHARSET_INFO my_charset_big5_chinese_ci= }; -CHARSET_INFO my_charset_big5_bin= +struct charset_info_st my_charset_big5_bin= { 84,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 3b6a977e47c..b67da6f5794 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -22,7 +22,7 @@ #include "m_string.h" #include "m_ctype.h" -static uchar ctype_bin[]= +static const uchar ctype_bin[]= { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, @@ -46,7 +46,7 @@ static uchar ctype_bin[]= /* Dummy array for toupper / tolower / sortorder */ -static uchar bin_char_array[] = +static const uchar bin_char_array[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -68,7 +68,7 @@ static uchar bin_char_array[] = static my_bool -my_coll_init_8bit_bin(CHARSET_INFO *cs, +my_coll_init_8bit_bin(struct charset_info_st *cs, void *(*alloc)(size_t) __attribute__((unused))) { cs->max_sort_char=255; @@ -546,7 +546,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_bin = +struct charset_info_st my_charset_bin = { 63,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */ diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c index df4083c9f8d..7d6874b6ebd 100644 --- a/strings/ctype-cp932.c +++ b/strings/ctype-cp932.c @@ -1,3 +1,4 @@ + /* Copyright (C) 2000 MySQL AB This program is free software; you can redistribute it and/or modify @@ -31,7 +32,7 @@ * .configure. mbmaxlen_cp932=2 */ -static uchar ctype_cp932[257] = +static const uchar ctype_cp932[257] = { 0, /* For standard library */ 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ @@ -68,7 +69,7 @@ static uchar ctype_cp932[257] = 0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000 }; -static uchar to_lower_cp932[]= +static const uchar to_lower_cp932[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -104,7 +105,7 @@ static uchar to_lower_cp932[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar to_upper_cp932[]= +static const uchar to_upper_cp932[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -140,7 +141,7 @@ static uchar to_upper_cp932[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar sort_order_cp932[]= +static const uchar sort_order_cp932[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -197,7 +198,7 @@ static uint mbcharlen_cp932(CHARSET_INFO *cs __attribute__((unused)),uint c) #define cp932code(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) -static MY_UNICASE_INFO c81[256]= +static const MY_UNICASE_INFO c81[256]= { /* 8100-810F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -407,7 +408,7 @@ static MY_UNICASE_INFO c81[256]= }; -static MY_UNICASE_INFO c82[256]= +static const MY_UNICASE_INFO c82[256]= { /* 8200-820F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -615,7 +616,7 @@ static MY_UNICASE_INFO c82[256]= }; -static MY_UNICASE_INFO c83[256]= +static const MY_UNICASE_INFO c83[256]= { /* 8300-830F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -825,7 +826,7 @@ static MY_UNICASE_INFO c83[256]= }; -static MY_UNICASE_INFO c84[256]= +static const MY_UNICASE_INFO c84[256]= { /* 8400-840F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1035,7 +1036,7 @@ static MY_UNICASE_INFO c84[256]= }; -static MY_UNICASE_INFO c87[256]= +static const MY_UNICASE_INFO c87[256]= { /* 8700-870F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1245,7 +1246,7 @@ static MY_UNICASE_INFO c87[256]= }; -static MY_UNICASE_INFO cEE[256]= +static const MY_UNICASE_INFO cEE[256]= { /* EE00-EE0F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1456,7 +1457,7 @@ static MY_UNICASE_INFO cEE[256]= }; -static MY_UNICASE_INFO cFA[256]= +static const MY_UNICASE_INFO cFA[256]= { /* FA00-FA0F */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1666,7 +1667,7 @@ static MY_UNICASE_INFO cFA[256]= }; -static MY_UNICASE_INFO *my_caseinfo_cp932[256]= +static const MY_UNICASE_INFO *my_caseinfo_cp932[256]= { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -1812,7 +1813,7 @@ static size_t my_strnxfrm_cp932(CHARSET_INFO *cs __attribute__((unused)), } -static uint16 cp932_to_unicode[65536]= +static const uint16 cp932_to_unicode[65536]= { 0x0000, 0x0001, 0x0002, 0x0003, /* 0000 */ 0x0004, 0x0005, 0x0006, 0x0007, @@ -18201,7 +18202,7 @@ static uint16 cp932_to_unicode[65536]= }; -static uint16 unicode_to_cp932[65536]= +static const uint16 unicode_to_cp932[65536]= { 0x0000, 0x0001, 0x0002, 0x0003, /* 0000 */ 0x0004, 0x0005, 0x0006, 0x0007, @@ -34822,7 +34823,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_cp932_japanese_ci= +struct charset_info_st my_charset_cp932_japanese_ci= { 95,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ @@ -34854,7 +34855,7 @@ CHARSET_INFO my_charset_cp932_japanese_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_cp932_bin= +struct charset_info_st my_charset_cp932_bin= { 96,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 0095fe7f995..81a5322d706 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -83,7 +83,7 @@ below for what are the "special values" */ -static uchar *CZ_SORT_TABLE[] = { +static const uchar *const CZ_SORT_TABLE[] = { (uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\043\044\045\046\047\050\051\052\053\054\000\000\000\000\000\000\000\003\004\377\007\010\011\012\013\015\016\017\020\022\023\024\025\026\027\031\033\034\035\036\037\040\041\000\000\000\000\000\000\003\004\377\007\010\011\012\013\015\016\017\020\022\023\024\025\026\027\031\033\034\035\036\037\040\041\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\021\000\020\032\000\000\032\032\033\042\000\042\042\000\003\000\021\000\020\032\000\000\032\032\033\042\000\042\042\027\003\003\003\003\020\006\006\006\010\010\010\010\015\015\007\007\023\023\024\024\024\024\000\030\034\034\034\034\040\033\000\027\003\003\003\003\020\006\006\006\010\010\010\010\015\015\007\007\023\023\024\024\024\024\000\030\034\034\034\034\040\033\000", (uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\106\107\110\111\112\113\114\115\116\117\000\000\000\000\000\000\000\003\011\377\016\021\026\027\030\032\035\036\037\043\044\047\054\055\056\061\065\070\075\076\077\100\102\000\000\000\000\000\000\003\011\377\016\021\026\027\030\032\035\036\037\043\044\047\054\055\056\061\065\070\075\076\077\100\102\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000\042\000\041\063\000\000\062\064\066\104\000\103\105\000\010\000\042\000\041\063\000\000\062\064\066\104\000\103\105\057\004\005\007\006\040\014\015\013\022\025\024\023\033\034\017\020\046\045\050\051\053\052\000\060\072\071\074\073\101\067\000\057\004\005\007\006\040\014\015\013\022\025\024\023\033\034\017\020\046\045\050\051\053\052\000\060\072\071\074\073\101\067\000", (uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\212\213\214\215\216\217\220\221\222\223\000\000\000\000\000\000\000\004\020\377\032\040\052\054\056\063\071\073\075\105\107\115\127\131\133\141\151\157\171\173\175\177\203\000\000\000\000\000\000\003\017\377\031\037\051\053\055\062\070\072\074\104\106\114\126\130\132\140\150\156\170\172\174\176\202\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\103\000\101\145\000\000\143\147\153\207\000\205\211\000\015\000\102\000\100\144\000\000\142\146\152\206\000\204\210\135\006\010\014\012\077\026\030\024\042\050\046\044\065\067\034\036\113\111\117\121\125\123\000\137\163\161\167\165\201\155\000\134\005\007\013\011\076\025\027\023\041\047\045\043\064\066\033\035\112\110\116\120\124\122\000\136\162\160\166\164\200\154\000", @@ -99,14 +99,14 @@ static uchar *CZ_SORT_TABLE[] = { struct wordvalue { const char * word; - uchar *outvalue; + const uchar *outvalue; }; -static struct wordvalue doubles[] = { - { "ch", (uchar*) "\014\031\057\057" }, - { "Ch", (uchar*) "\014\031\060\060" }, - { "CH", (uchar*) "\014\031\061\061" }, - { "c", (uchar*) "\005\012\021\021" }, - { "C", (uchar*) "\005\012\022\022" }, +static const struct wordvalue doubles[] = { + { "ch", (const uchar*) "\014\031\057\057" }, + { "Ch", (const uchar*) "\014\031\060\060" }, + { "CH", (const uchar*) "\014\031\061\061" }, + { "c", (const uchar*) "\005\012\021\021" }, + { "C", (const uchar*) "\005\012\022\022" }, }; /* @@ -430,7 +430,7 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), #include <my_global.h> #include "m_string.h" -static uchar ctype_czech[257] = { +static const uchar ctype_czech[257] = { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, @@ -450,7 +450,7 @@ static uchar ctype_czech[257] = { 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16, }; -static uchar to_lower_czech[] = { +static const uchar to_lower_czech[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -469,7 +469,7 @@ static uchar to_lower_czech[] = { 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255, }; -static uchar to_upper_czech[] = { +static const uchar to_upper_czech[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -488,7 +488,7 @@ static uchar to_upper_czech[] = { 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255, }; -static uchar sort_order_czech[] = { +static const uchar sort_order_czech[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -507,7 +507,7 @@ static uchar sort_order_czech[] = { 255, 98, 99,101,102,103,104,255,109,119,118,120,121,126,116,255, }; -static uint16 tab_8859_2_uni[256]={ +static const uint16 tab_8859_2_uni[256]={ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -544,7 +544,7 @@ static uint16 tab_8859_2_uni[256]={ /* 0000-00FD , 254 chars */ -static uchar tab_uni_8859_2_plane00[]={ +static const uchar tab_uni_8859_2_plane00[]={ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -563,7 +563,7 @@ static uchar tab_uni_8859_2_plane00[]={ 0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD}; /* 0102-017E , 125 chars */ -static uchar tab_uni_8859_2_plane01[]={ +static const uchar tab_uni_8859_2_plane01[]={ 0xC3,0xE3,0xA1,0xB1,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0, 0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -574,7 +574,7 @@ static uchar tab_uni_8859_2_plane01[]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xBC,0xAF,0xBF,0xAE,0xBE}; /* 02C7-02DD , 23 chars */ -static uchar tab_uni_8859_2_plane02[]={ +static const uchar tab_uni_8859_2_plane02[]={ 0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD}; @@ -601,7 +601,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler = my_propagate_simple }; -CHARSET_INFO my_charset_latin2_czech_ci = +struct charset_info_st my_charset_latin2_czech_ci = { 2,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */ diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 7329f9ec09a..1e3279a93ad 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -32,7 +32,7 @@ #ifdef HAVE_CHARSET_euckr -static uchar ctype_euc_kr[257] = +static const uchar ctype_euc_kr[257] = { 0, /* For standard library */ 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ @@ -69,7 +69,7 @@ static uchar ctype_euc_kr[257] = 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, }; -static uchar to_lower_euc_kr[]= +static const uchar to_lower_euc_kr[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -105,7 +105,7 @@ static uchar to_lower_euc_kr[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar to_upper_euc_kr[]= +static const uchar to_upper_euc_kr[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -141,7 +141,7 @@ static uchar to_upper_euc_kr[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar sort_order_euc_kr[]= +static const uchar sort_order_euc_kr[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -1484,7 +1484,7 @@ static MY_UNICASE_INFO *my_caseinfo_euckr[256]= /* page 0 0x8141-0xC8FE */ -static uint16 tab_ksc5601_uni0[]={ +static const uint16 tab_ksc5601_uni0[]={ 0xAC02,0xAC03,0xAC05,0xAC06,0xAC0B,0xAC0C,0xAC0D,0xAC0E, 0xAC0F,0xAC18,0xAC1E,0xAC1F,0xAC21,0xAC22,0xAC23,0xAC25, 0xAC26,0xAC27,0xAC28,0xAC29,0xAC2A,0xAC2B,0xAC2E,0xAC32, @@ -3783,7 +3783,7 @@ static uint16 tab_ksc5601_uni0[]={ 0xD78C,0xD790,0xD798,0xD799,0xD79B,0xD79D}; /* page 1 0xCAA1-0xFDFE */ -static uint16 tab_ksc5601_uni1[]={ +static const uint16 tab_ksc5601_uni1[]={ 0x4F3D,0x4F73,0x5047,0x50F9,0x52A0,0x53EF,0x5475,0x54E5, 0x5609,0x5AC1,0x5BB6,0x6687,0x67B6,0x67B7,0x67EF,0x6B4C, 0x73C2,0x75C2,0x7A3C,0x82DB,0x8304,0x8857,0x8888,0x8A36, @@ -5437,7 +5437,7 @@ static int func_ksc5601_uni_onechar(int code){ return(0); } /* page 0 0x00A1-0x0167 */ -static uint16 tab_uni_ksc56010[]={ +static const uint16 tab_uni_ksc56010[]={ 0xA2AE, 0, 0,0xA2B4, 0, 0,0xA1D7,0xA1A7, 0,0xA8A3, 0, 0,0xA1A9,0xA2E7, 0,0xA1C6, 0xA1BE,0xA9F7,0xA9F8,0xA2A5, 0,0xA2D2,0xA1A4,0xA2AC, @@ -5465,7 +5465,7 @@ static uint16 tab_uni_ksc56010[]={ 0, 0, 0, 0, 0,0xA8AE,0xA9AE}; /* page 1 0x02C7-0x0451 */ -static uint16 tab_uni_ksc56011[]={ +static const uint16 tab_uni_ksc56011[]={ 0xA2A7, 0, 0, 0, 0, 0, 0, 0, 0,0xA2B0, 0, 0, 0, 0, 0, 0, 0,0xA2A8,0xA2AB,0xA2AA,0xA2AD, 0,0xA2A9, 0, @@ -5518,7 +5518,7 @@ static uint16 tab_uni_ksc56011[]={ 0xACF1, 0,0xACD7}; /* page 2 0x2015-0x2312 */ -static uint16 tab_uni_ksc56012[]={ +static const uint16 tab_uni_ksc56012[]={ 0xA1AA, 0, 0,0xA1AE,0xA1AF, 0, 0,0xA1B0, 0xA1B1, 0, 0,0xA2D3,0xA2D4, 0, 0, 0, 0xA1A5,0xA1A6, 0, 0, 0, 0, 0, 0, @@ -5617,7 +5617,7 @@ static uint16 tab_uni_ksc56012[]={ 0, 0, 0, 0, 0,0xA1D2}; /* page 3 0x2460-0x266D */ -static uint16 tab_uni_ksc56013[]={ +static const uint16 tab_uni_ksc56013[]={ 0xA8E7,0xA8E8,0xA8E9,0xA8EA,0xA8EB,0xA8EC,0xA8ED,0xA8EE, 0xA8EF,0xA8F0,0xA8F1,0xA8F2,0xA8F3,0xA8F4,0xA8F5, 0, 0, 0, 0, 0,0xA9E7,0xA9E8,0xA9E9,0xA9EA, @@ -5686,7 +5686,7 @@ static uint16 tab_uni_ksc56013[]={ 0xA2CD,0xA2DB,0xA2DC, 0,0xA2DD,0xA2DA}; /* page 4 0x3000-0x327F */ -static uint16 tab_uni_ksc56014[]={ +static const uint16 tab_uni_ksc56014[]={ 0xA1A1,0xA1A2,0xA1A3,0xA1A8, 0, 0, 0, 0, 0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB, 0xA1BC,0xA1BD, 0,0xA1EB,0xA1B2,0xA1B3, 0, 0, @@ -5770,7 +5770,7 @@ static uint16 tab_uni_ksc56014[]={ }; /* page 5 0x3380-0x33DD */ -static uint16 tab_uni_ksc56015[]={ +static const uint16 tab_uni_ksc56015[]={ 0xA7C9,0xA7CA,0xA7CB,0xA7CC,0xA7CD, 0, 0, 0, 0xA7BA,0xA7BB,0xA7DC,0xA7DD,0xA7DE,0xA7B6,0xA7B7,0xA7B8, 0xA7D4,0xA7D5,0xA7D6,0xA7D7,0xA7D8,0xA7A1,0xA7A2,0xA7A3, @@ -5785,7 +5785,7 @@ static uint16 tab_uni_ksc56015[]={ 0xA2E4, 0, 0,0xA7E4,0xA7EE,0xA7E9}; /* page 6 0x4E00-0x947F */ -static uint16 tab_uni_ksc56016[]={ +static const uint16 tab_uni_ksc56016[]={ 0xECE9,0xEFCB, 0,0xF6D2, 0, 0, 0,0xD8B2, 0xEDDB,0xDFB2,0xDFBE,0xF9BB, 0,0xDCF4, 0, 0, 0,0xF5E4, 0, 0,0xF3A6,0xDDE0,0xE1A6, 0, @@ -8045,7 +8045,7 @@ static uint16 tab_uni_ksc56016[]={ }; /* page 7 0x9577-0x9F9C */ -static uint16 tab_uni_ksc56017[]={ +static const uint16 tab_uni_ksc56017[]={ 0xEDFE, 0, 0, 0, 0, 0, 0, 0, 0,0xDAA6, 0, 0,0xE0EC, 0, 0, 0, 0, 0,0xF8CD, 0,0xCBD2, 0, 0, 0, @@ -8373,7 +8373,7 @@ static uint16 tab_uni_ksc56017[]={ 0, 0, 0, 0, 0,0xCFCF}; /* page 8 0xAC00-0xD7A3 */ -static uint16 tab_uni_ksc56018[]={ +static const uint16 tab_uni_ksc56018[]={ 0xB0A1,0xB0A2,0x8141,0x8142,0xB0A3,0x8143,0x8144,0xB0A4, 0xB0A5,0xB0A6,0xB0A7,0x8145,0x8146,0x8147,0x8148,0x8149, 0xB0A8,0xB0A9,0xB0AA,0xB0AB,0xB0AC,0xB0AD,0xB0AE,0xB0AF, @@ -9773,7 +9773,7 @@ static uint16 tab_uni_ksc56018[]={ 0xC64F,0xC650,0xC651,0xC652}; /* page 9 0xF900-0xFA0B */ -static uint16 tab_uni_ksc56019[]={ +static const uint16 tab_uni_ksc56019[]={ 0xCBD0,0xCBD6,0xCBE7,0xCDCF,0xCDE8,0xCEAD,0xCFFB,0xD0A2, 0xD0B8,0xD0D0,0xD0DD,0xD1D4,0xD1D5,0xD1D8,0xD1DB,0xD1DC, 0xD1DD,0xD1DE,0xD1DF,0xD1E0,0xD1E2,0xD1E3,0xD1E4,0xD1E5, @@ -9810,7 +9810,7 @@ static uint16 tab_uni_ksc56019[]={ 0xFAA1,0xFAA2,0xFAE6,0xFCA9}; /* page 10 0xFF01-0xFFE6 */ -static uint16 tab_uni_ksc560110[]={ +static const uint16 tab_uni_ksc560110[]={ 0xA3A1,0xA3A2,0xA3A3,0xA3A4,0xA3A5,0xA3A6,0xA3A7,0xA3A8, 0xA3A9,0xA3AA,0xA3AB,0xA3AC,0xA3AD,0xA3AE,0xA3AF,0xA3B0, 0xA3B1,0xA3B2,0xA3B3,0xA3B4,0xA3B5,0xA3B6,0xA3B7,0xA3B8, @@ -10004,7 +10004,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_euckr_korean_ci= +struct charset_info_st my_charset_euckr_korean_ci= { 19,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ @@ -10037,7 +10037,7 @@ CHARSET_INFO my_charset_euckr_korean_ci= }; -CHARSET_INFO my_charset_euckr_bin= +struct charset_info_st my_charset_euckr_bin= { 85,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c index 6180e0e1a7a..2d5743070cb 100644 --- a/strings/ctype-eucjpms.c +++ b/strings/ctype-eucjpms.c @@ -33,7 +33,7 @@ ctype-ujis.c file. #ifdef HAVE_CHARSET_eucjpms -static uchar ctype_eucjpms[257] = +static const uchar ctype_eucjpms[257] = { 0, /* For standard library */ 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ @@ -70,7 +70,7 @@ static uchar ctype_eucjpms[257] = 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, }; -static uchar to_lower_eucjpms[]= +static const uchar to_lower_eucjpms[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -106,7 +106,7 @@ static uchar to_lower_eucjpms[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar to_upper_eucjpms[]= +static const uchar to_upper_eucjpms[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -142,7 +142,7 @@ static uchar to_upper_eucjpms[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar sort_order_eucjpms[]= +static const uchar sort_order_eucjpms[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -201,10 +201,9 @@ static uint mbcharlen_eucjpms(CHARSET_INFO *cs __attribute__((unused)),uint c) } - /* Case info pages for JIS-X-0208 range */ -static MY_UNICASE_INFO cA2[256]= +static const MY_UNICASE_INFO cA2[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -325,7 +324,7 @@ static MY_UNICASE_INFO cA2[256]= }; -static MY_UNICASE_INFO cA3[256]= +static const MY_UNICASE_INFO cA3[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -446,7 +445,7 @@ static MY_UNICASE_INFO cA3[256]= }; -static MY_UNICASE_INFO cA6[256]= +static const MY_UNICASE_INFO cA6[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -567,7 +566,7 @@ static MY_UNICASE_INFO cA6[256]= }; -static MY_UNICASE_INFO cA7[256]= +static const MY_UNICASE_INFO cA7[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -688,7 +687,7 @@ static MY_UNICASE_INFO cA7[256]= }; -static MY_UNICASE_INFO cAD[256]= +static const MY_UNICASE_INFO cAD[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -811,7 +810,7 @@ static MY_UNICASE_INFO cAD[256]= /* Case info pages for JIS-X-0212 range */ -static MY_UNICASE_INFO c8FA6[256]= +static const MY_UNICASE_INFO c8FA6[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -932,7 +931,7 @@ static MY_UNICASE_INFO c8FA6[256]= }; -static MY_UNICASE_INFO c8FA7[256]= +static const MY_UNICASE_INFO c8FA7[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1053,7 +1052,7 @@ static MY_UNICASE_INFO c8FA7[256]= }; -static MY_UNICASE_INFO c8FA9[256]= +static const MY_UNICASE_INFO c8FA9[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1174,7 +1173,7 @@ static MY_UNICASE_INFO c8FA9[256]= }; -static MY_UNICASE_INFO c8FAA[256]= +static const MY_UNICASE_INFO c8FAA[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1295,7 +1294,7 @@ static MY_UNICASE_INFO c8FAA[256]= }; -static MY_UNICASE_INFO c8FAB[256]= +static const MY_UNICASE_INFO c8FAB[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1416,7 +1415,7 @@ static MY_UNICASE_INFO c8FAB[256]= }; -static MY_UNICASE_INFO c8FF3[256]= +static const MY_UNICASE_INFO c8FF3[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1537,7 +1536,7 @@ static MY_UNICASE_INFO c8FF3[256]= }; -static MY_UNICASE_INFO c8FF4[256]= +static const MY_UNICASE_INFO c8FF4[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -1658,7 +1657,7 @@ static MY_UNICASE_INFO c8FF4[256]= }; -static MY_UNICASE_INFO *my_caseinfo_eucjpms[512]= +static const MY_UNICASE_INFO *my_caseinfo_eucjpms[512]= { /* JIS-X-0208 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0 */ @@ -1730,7 +1729,7 @@ static MY_UNICASE_INFO *my_caseinfo_eucjpms[512]= }; -static uint16 jisx0208_eucjpms_to_unicode[65536]= +static const uint16 jisx0208_eucjpms_to_unicode[65536]= { 0x0000, 0x0001, 0x0002, 0x0003, /* 0000 */ 0x0004, 0x0005, 0x0006, 0x0007, @@ -67548,7 +67547,7 @@ static MY_CHARSET_HANDLER my_charset_handler= -CHARSET_INFO my_charset_eucjpms_japanese_ci= +struct charset_info_st my_charset_eucjpms_japanese_ci= { 97,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ @@ -67581,7 +67580,7 @@ CHARSET_INFO my_charset_eucjpms_japanese_ci= }; -CHARSET_INFO my_charset_eucjpms_bin= +struct charset_info_st my_charset_eucjpms_bin= { 98,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index ba12f3f4267..3e30931f579 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -25,7 +25,7 @@ #include <m_ctype.h> #ifdef HAVE_CHARSET_dec8 -uchar ctype_dec8_swedish_ci[] = { +static const uchar ctype_dec8_swedish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -45,7 +45,7 @@ uchar ctype_dec8_swedish_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_dec8_swedish_ci[] = { +static const uchar to_lower_dec8_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -64,7 +64,7 @@ uchar to_lower_dec8_swedish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_dec8_swedish_ci[] = { +static const uchar to_upper_dec8_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -83,7 +83,7 @@ uchar to_upper_dec8_swedish_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_dec8_swedish_ci[] = { +static const uchar sort_order_dec8_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -102,7 +102,7 @@ uchar sort_order_dec8_swedish_ci[] = { 0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5D,0xF7,0xD8,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF }; -uint16 to_uni_dec8_swedish_ci[] = { +static const uint16 to_uni_dec8_swedish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -140,7 +140,7 @@ uint16 to_uni_dec8_swedish_ci[] = { #endif #ifdef HAVE_CHARSET_cp850 -uchar ctype_cp850_general_ci[] = { +static const uchar ctype_cp850_general_ci[] = { 0x00, 0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30, 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30, @@ -160,7 +160,7 @@ uchar ctype_cp850_general_ci[] = { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 }; -uchar to_lower_cp850_general_ci[] = { +static const uchar to_lower_cp850_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -179,7 +179,7 @@ uchar to_lower_cp850_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp850_general_ci[] = { +static const uchar to_upper_cp850_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -198,7 +198,7 @@ uchar to_upper_cp850_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_cp850_general_ci[] = { +static const uchar sort_order_cp850_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -217,7 +217,7 @@ uchar sort_order_cp850_general_ci[] = { 0xED,0xF1,0xC1,0xFE,0xF6,0xE7,0xBF,0xBC,0xF0,0xE8,0xF7,0xF9,0xF3,0xF2,0xDF,0xE0 }; -uint16 to_uni_cp850_general_ci[] = { +static const uint16 to_uni_cp850_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -255,7 +255,7 @@ uint16 to_uni_cp850_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_german1_ci[] = { +static const uchar ctype_latin1_german1_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -275,7 +275,7 @@ uchar ctype_latin1_german1_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin1_german1_ci[] = { +static const uchar to_lower_latin1_german1_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -294,7 +294,7 @@ uchar to_lower_latin1_german1_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin1_german1_ci[] = { +static const uchar to_upper_latin1_german1_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -313,7 +313,7 @@ uchar to_upper_latin1_german1_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin1_german1_ci[] = { +static const uchar sort_order_latin1_german1_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -332,7 +332,7 @@ uchar sort_order_latin1_german1_ci[] = { 0xD0,0x4E,0x4F,0x4F,0x4F,0x4F,0x4F,0xF7,0x4F,0x55,0x55,0x55,0x55,0x59,0xDE,0xFF }; -uint16 to_uni_latin1_german1_ci[] = { +static const uint16 to_uni_latin1_german1_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -370,7 +370,7 @@ uint16 to_uni_latin1_german1_ci[] = { #endif #ifdef HAVE_CHARSET_hp8 -uchar ctype_hp8_english_ci[] = { +static const uchar ctype_hp8_english_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -390,7 +390,7 @@ uchar ctype_hp8_english_ci[] = { 0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 }; -uchar to_lower_hp8_english_ci[] = { +static const uchar to_lower_hp8_english_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -409,7 +409,7 @@ uchar to_lower_hp8_english_ci[] = { 0xF1,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_hp8_english_ci[] = { +static const uchar to_upper_hp8_english_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -428,7 +428,7 @@ uchar to_upper_hp8_english_ci[] = { 0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_hp8_english_ci[] = { +static const uchar sort_order_hp8_english_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -447,7 +447,7 @@ uchar sort_order_hp8_english_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_hp8_english_ci[] = { +static const uint16 to_uni_hp8_english_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -485,7 +485,7 @@ uint16 to_uni_hp8_english_ci[] = { #endif #ifdef HAVE_CHARSET_koi8r -uchar ctype_koi8r_general_ci[] = { +static const uchar ctype_koi8r_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -505,7 +505,7 @@ uchar ctype_koi8r_general_ci[] = { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 }; -uchar to_lower_koi8r_general_ci[] = { +static const uchar to_lower_koi8r_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -524,7 +524,7 @@ uchar to_lower_koi8r_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar to_upper_koi8r_general_ci[] = { +static const uchar to_upper_koi8r_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -543,7 +543,7 @@ uchar to_upper_koi8r_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_koi8r_general_ci[] = { +static const uchar sort_order_koi8r_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -562,7 +562,7 @@ uchar sort_order_koi8r_general_ci[] = { 0xEF,0xFF,0xF0,0xF1,0xF2,0xF3,0xE6,0xE1,0xFC,0xFB,0xE7,0xF8,0xFD,0xF9,0xF7,0xFA }; -uint16 to_uni_koi8r_general_ci[] = { +static const uint16 to_uni_koi8r_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -600,7 +600,7 @@ uint16 to_uni_koi8r_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_general_ci[] = { +static const uchar ctype_latin2_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -620,7 +620,7 @@ uchar ctype_latin2_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin2_general_ci[] = { +static const uchar to_lower_latin2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -639,7 +639,7 @@ uchar to_lower_latin2_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin2_general_ci[] = { +static const uchar to_upper_latin2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -658,7 +658,7 @@ uchar to_upper_latin2_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin2_general_ci[] = { +static const uchar sort_order_latin2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -677,7 +677,7 @@ uchar sort_order_latin2_general_ci[] = { 0xFF,0x55,0x54,0x57,0x56,0x56,0x56,0xFF,0x5A,0x5F,0x5F,0x5F,0x5F,0x63,0x5E,0xFF }; -uint16 to_uni_latin2_general_ci[] = { +static const uint16 to_uni_latin2_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -715,7 +715,7 @@ uint16 to_uni_latin2_general_ci[] = { #endif #ifdef HAVE_CHARSET_swe7 -uchar ctype_swe7_swedish_ci[] = { +static const uchar ctype_swe7_swedish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -735,7 +735,7 @@ uchar ctype_swe7_swedish_ci[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_swe7_swedish_ci[] = { +static const uchar to_lower_swe7_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -754,7 +754,7 @@ uchar to_lower_swe7_swedish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_swe7_swedish_ci[] = { +static const uchar to_upper_swe7_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -773,7 +773,7 @@ uchar to_upper_swe7_swedish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_swe7_swedish_ci[] = { +static const uchar sort_order_swe7_swedish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -792,7 +792,7 @@ uchar sort_order_swe7_swedish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_swe7_swedish_ci[] = { +static const uint16 to_uni_swe7_swedish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -830,7 +830,7 @@ uint16 to_uni_swe7_swedish_ci[] = { #endif #ifdef HAVE_CHARSET_ascii -uchar ctype_ascii_general_ci[] = { +static const uchar ctype_ascii_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -850,7 +850,7 @@ uchar ctype_ascii_general_ci[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_ascii_general_ci[] = { +static const uchar to_lower_ascii_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -869,7 +869,7 @@ uchar to_lower_ascii_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_ascii_general_ci[] = { +static const uchar to_upper_ascii_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -888,7 +888,7 @@ uchar to_upper_ascii_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_ascii_general_ci[] = { +static const uchar sort_order_ascii_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -907,7 +907,7 @@ uchar sort_order_ascii_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_ascii_general_ci[] = { +static const uint16 to_uni_ascii_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -945,7 +945,7 @@ uint16 to_uni_ascii_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_bulgarian_ci[] = { +static const uchar ctype_cp1251_bulgarian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -965,7 +965,7 @@ uchar ctype_cp1251_bulgarian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_cp1251_bulgarian_ci[] = { +static const uchar to_lower_cp1251_bulgarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -984,7 +984,7 @@ uchar to_lower_cp1251_bulgarian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1251_bulgarian_ci[] = { +static const uchar to_upper_cp1251_bulgarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1003,7 +1003,7 @@ uchar to_upper_cp1251_bulgarian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar sort_order_cp1251_bulgarian_ci[] = { +static const uchar sort_order_cp1251_bulgarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1022,7 +1022,7 @@ uchar sort_order_cp1251_bulgarian_ci[] = { 0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B }; -uint16 to_uni_cp1251_bulgarian_ci[] = { +static const uint16 to_uni_cp1251_bulgarian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1060,7 +1060,7 @@ uint16 to_uni_cp1251_bulgarian_ci[] = { #endif #ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_danish_ci[] = { +static const uchar ctype_latin1_danish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1080,7 +1080,7 @@ uchar ctype_latin1_danish_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin1_danish_ci[] = { +static const uchar to_lower_latin1_danish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1099,7 +1099,7 @@ uchar to_lower_latin1_danish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin1_danish_ci[] = { +static const uchar to_upper_latin1_danish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1118,7 +1118,7 @@ uchar to_upper_latin1_danish_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin1_danish_ci[] = { +static const uchar sort_order_latin1_danish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1137,7 +1137,7 @@ uchar sort_order_latin1_danish_ci[] = { 0x44,0x4E,0x4F,0x4F,0x4F,0x4F,0x5C,0xF7,0x5C,0x55,0x55,0x55,0x59,0x59,0xDE,0xFF }; -uint16 to_uni_latin1_danish_ci[] = { +static const uint16 to_uni_latin1_danish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1175,7 +1175,7 @@ uint16 to_uni_latin1_danish_ci[] = { #endif #ifdef HAVE_CHARSET_hebrew -uchar ctype_hebrew_general_ci[] = { +static const uchar ctype_hebrew_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1195,7 +1195,7 @@ uchar ctype_hebrew_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00 }; -uchar to_lower_hebrew_general_ci[] = { +static const uchar to_lower_hebrew_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1214,7 +1214,7 @@ uchar to_lower_hebrew_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_hebrew_general_ci[] = { +static const uchar to_upper_hebrew_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1233,7 +1233,7 @@ uchar to_upper_hebrew_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_hebrew_general_ci[] = { +static const uchar sort_order_hebrew_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1252,7 +1252,7 @@ uchar sort_order_hebrew_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_hebrew_general_ci[] = { +static const uint16 to_uni_hebrew_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1290,7 +1290,7 @@ uint16 to_uni_hebrew_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_estonian_cs[] = { +static const uchar ctype_latin7_estonian_cs[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1310,7 +1310,7 @@ uchar ctype_latin7_estonian_cs[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin7_estonian_cs[] = { +static const uchar to_lower_latin7_estonian_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1329,7 +1329,7 @@ uchar to_lower_latin7_estonian_cs[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin7_estonian_cs[] = { +static const uchar to_upper_latin7_estonian_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1348,7 +1348,7 @@ uchar to_upper_latin7_estonian_cs[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin7_estonian_cs[] = { +static const uchar sort_order_latin7_estonian_cs[] = { 0x00,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x2E,0x2F,0x30,0x31,0x32,0x0A,0x0B, 0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B, 0x2C,0x33,0x34,0x35,0x36,0x37,0x38,0x27,0x39,0x3A,0x3B,0x5D,0x3C,0x28,0x3D,0x3E, @@ -1367,7 +1367,7 @@ uchar sort_order_latin7_estonian_cs[] = { 0xDC,0xC3,0xC5,0xC9,0xCB,0xF3,0xF7,0x65,0xED,0xBD,0xD9,0xEB,0xF9,0xE2,0xE4,0x53 }; -uint16 to_uni_latin7_estonian_cs[] = { +static const uint16 to_uni_latin7_estonian_cs[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1405,7 +1405,7 @@ uint16 to_uni_latin7_estonian_cs[] = { #endif #ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_hungarian_ci[] = { +static const uchar ctype_latin2_hungarian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1425,7 +1425,7 @@ uchar ctype_latin2_hungarian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin2_hungarian_ci[] = { +static const uchar to_lower_latin2_hungarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1444,7 +1444,7 @@ uchar to_lower_latin2_hungarian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin2_hungarian_ci[] = { +static const uchar to_upper_latin2_hungarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1463,7 +1463,7 @@ uchar to_upper_latin2_hungarian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin2_hungarian_ci[] = { +static const uchar sort_order_latin2_hungarian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1482,7 +1482,7 @@ uchar sort_order_latin2_hungarian_ci[] = { 0xFF,0x62,0x63,0x64,0x66,0x67,0x67,0xFF,0x6D,0x77,0x75,0x78,0x78,0x7E,0x74,0xFF }; -uint16 to_uni_latin2_hungarian_ci[] = { +static const uint16 to_uni_latin2_hungarian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1520,7 +1520,7 @@ uint16 to_uni_latin2_hungarian_ci[] = { #endif #ifdef HAVE_CHARSET_koi8u -uchar ctype_koi8u_general_ci[] = { +static const uchar ctype_koi8u_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1540,7 +1540,7 @@ uchar ctype_koi8u_general_ci[] = { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 }; -uchar to_lower_koi8u_general_ci[] = { +static const uchar to_lower_koi8u_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1559,7 +1559,7 @@ uchar to_lower_koi8u_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar to_upper_koi8u_general_ci[] = { +static const uchar to_upper_koi8u_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1578,7 +1578,7 @@ uchar to_upper_koi8u_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_koi8u_general_ci[] = { +static const uchar sort_order_koi8u_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1597,7 +1597,7 @@ uchar sort_order_koi8u_general_ci[] = { 0x94,0xA4,0x95,0x96,0x97,0x98,0x89,0x82,0xA1,0xA0,0x8A,0x9D,0xA2,0x9E,0x9C,0x9F }; -uint16 to_uni_koi8u_general_ci[] = { +static const uint16 to_uni_koi8u_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1635,7 +1635,7 @@ uint16 to_uni_koi8u_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_ukrainian_ci[] = { +static const uchar ctype_cp1251_ukrainian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1655,7 +1655,7 @@ uchar ctype_cp1251_ukrainian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_cp1251_ukrainian_ci[] = { +static const uchar to_lower_cp1251_ukrainian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1674,7 +1674,7 @@ uchar to_lower_cp1251_ukrainian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1251_ukrainian_ci[] = { +static const uchar to_upper_cp1251_ukrainian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1693,7 +1693,7 @@ uchar to_upper_cp1251_ukrainian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar sort_order_cp1251_ukrainian_ci[] = { +static const uchar sort_order_cp1251_ukrainian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1712,7 +1712,7 @@ uchar sort_order_cp1251_ukrainian_ci[] = { 0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4 }; -uint16 to_uni_cp1251_ukrainian_ci[] = { +static const uint16 to_uni_cp1251_ukrainian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1750,7 +1750,7 @@ uint16 to_uni_cp1251_ukrainian_ci[] = { #endif #ifdef HAVE_CHARSET_greek -uchar ctype_greek_general_ci[] = { +static const uchar ctype_greek_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1770,7 +1770,7 @@ uchar ctype_greek_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 }; -uchar to_lower_greek_general_ci[] = { +static const uchar to_lower_greek_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1789,7 +1789,7 @@ uchar to_lower_greek_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_greek_general_ci[] = { +static const uchar to_upper_greek_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1808,7 +1808,7 @@ uchar to_upper_greek_general_ci[] = { 0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF }; -uchar sort_order_greek_general_ci[] = { +static const uchar sort_order_greek_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1827,7 +1827,7 @@ uchar sort_order_greek_general_ci[] = { 0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xC9,0xD5,0xCF,0xD5,0xD9,0xFF }; -uint16 to_uni_greek_general_ci[] = { +static const uint16 to_uni_greek_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1865,7 +1865,7 @@ uint16 to_uni_greek_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_general_ci[] = { +static const uchar ctype_cp1250_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -1885,7 +1885,7 @@ uchar ctype_cp1250_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_cp1250_general_ci[] = { +static const uchar to_lower_cp1250_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1904,7 +1904,7 @@ uchar to_lower_cp1250_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1250_general_ci[] = { +static const uchar to_upper_cp1250_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1923,7 +1923,7 @@ uchar to_upper_cp1250_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_cp1250_general_ci[] = { +static const uchar sort_order_cp1250_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -1942,7 +1942,7 @@ uchar sort_order_cp1250_general_ci[] = { 0x47,0x53,0x53,0x55,0x55,0x55,0x55,0xF7,0x58,0x5C,0x5C,0x5C,0x5C,0x60,0x5B,0xFF }; -uint16 to_uni_cp1250_general_ci[] = { +static const uint16 to_uni_cp1250_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -1980,7 +1980,7 @@ uint16 to_uni_cp1250_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_croatian_ci[] = { +static const uchar ctype_latin2_croatian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2000,7 +2000,7 @@ uchar ctype_latin2_croatian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin2_croatian_ci[] = { +static const uchar to_lower_latin2_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2019,7 +2019,7 @@ uchar to_lower_latin2_croatian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin2_croatian_ci[] = { +static const uchar to_upper_latin2_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2038,7 +2038,7 @@ uchar to_upper_latin2_croatian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin2_croatian_ci[] = { +static const uchar sort_order_latin2_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2057,7 +2057,7 @@ uchar sort_order_latin2_croatian_ci[] = { 0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xFE,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF }; -uint16 to_uni_latin2_croatian_ci[] = { +static const uint16 to_uni_latin2_croatian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2095,7 +2095,7 @@ uint16 to_uni_latin2_croatian_ci[] = { #endif #ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_lithuanian_ci[] = { +static const uchar ctype_cp1257_lithuanian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2115,7 +2115,7 @@ uchar ctype_cp1257_lithuanian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 }; -uchar to_lower_cp1257_lithuanian_ci[] = { +static const uchar to_lower_cp1257_lithuanian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2134,7 +2134,7 @@ uchar to_lower_cp1257_lithuanian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1257_lithuanian_ci[] = { +static const uchar to_upper_cp1257_lithuanian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2153,7 +2153,7 @@ uchar to_upper_cp1257_lithuanian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_cp1257_lithuanian_ci[] = { +static const uchar sort_order_cp1257_lithuanian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2172,7 +2172,7 @@ uchar sort_order_cp1257_lithuanian_ci[] = { 0x5A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5E,0xFF,0xFF,0x5D,0xFF,0xFF,0xFF,0xFF }; -uint16 to_uni_cp1257_lithuanian_ci[] = { +static const uint16 to_uni_cp1257_lithuanian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2210,7 +2210,7 @@ uint16 to_uni_cp1257_lithuanian_ci[] = { #endif #ifdef HAVE_CHARSET_latin5 -uchar ctype_latin5_turkish_ci[] = { +static const uchar ctype_latin5_turkish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2230,7 +2230,7 @@ uchar ctype_latin5_turkish_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin5_turkish_ci[] = { +static const uchar to_lower_latin5_turkish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2249,7 +2249,7 @@ uchar to_lower_latin5_turkish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin5_turkish_ci[] = { +static const uchar to_upper_latin5_turkish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2268,7 +2268,7 @@ uchar to_upper_latin5_turkish_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF }; -uchar sort_order_latin5_turkish_ci[] = { +static const uchar sort_order_latin5_turkish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2287,7 +2287,7 @@ uchar sort_order_latin5_turkish_ci[] = { 0x49,0x51,0x52,0x52,0x52,0x52,0x53,0xFA,0x52,0x5A,0x5A,0x5A,0x5B,0x4B,0x58,0x5F }; -uint16 to_uni_latin5_turkish_ci[] = { +static const uint16 to_uni_latin5_turkish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2325,7 +2325,7 @@ uint16 to_uni_latin5_turkish_ci[] = { #endif #ifdef HAVE_CHARSET_armscii8 -uchar ctype_armscii8_general_ci[] = { +static const uchar ctype_armscii8_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2345,7 +2345,7 @@ uchar ctype_armscii8_general_ci[] = { 0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10 }; -uchar to_lower_armscii8_general_ci[] = { +static const uchar to_lower_armscii8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2364,7 +2364,7 @@ uchar to_lower_armscii8_general_ci[] = { 0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF }; -uchar to_upper_armscii8_general_ci[] = { +static const uchar to_upper_armscii8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2383,7 +2383,7 @@ uchar to_upper_armscii8_general_ci[] = { 0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF }; -uchar sort_order_armscii8_general_ci[] = { +static const uchar sort_order_armscii8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2402,7 +2402,7 @@ uchar sort_order_armscii8_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_armscii8_general_ci[] = { +static const uint16 to_uni_armscii8_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2440,7 +2440,7 @@ uint16 to_uni_armscii8_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp866 -uchar ctype_cp866_general_ci[] = { +static const uchar ctype_cp866_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2460,7 +2460,7 @@ uchar ctype_cp866_general_ci[] = { 0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 }; -uchar to_lower_cp866_general_ci[] = { +static const uchar to_lower_cp866_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2479,7 +2479,7 @@ uchar to_lower_cp866_general_ci[] = { 0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp866_general_ci[] = { +static const uchar to_upper_cp866_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2498,7 +2498,7 @@ uchar to_upper_cp866_general_ci[] = { 0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_cp866_general_ci[] = { +static const uchar sort_order_cp866_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2517,7 +2517,7 @@ uchar sort_order_cp866_general_ci[] = { 0x81,0x81,0x83,0x83,0x8B,0x8B,0xA3,0xA3,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2 }; -uint16 to_uni_cp866_general_ci[] = { +static const uint16 to_uni_cp866_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2555,7 +2555,7 @@ uint16 to_uni_cp866_general_ci[] = { #endif #ifdef HAVE_CHARSET_keybcs2 -uchar ctype_keybcs2_general_ci[] = { +static const uchar ctype_keybcs2_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2575,7 +2575,7 @@ uchar ctype_keybcs2_general_ci[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 }; -uchar to_lower_keybcs2_general_ci[] = { +static const uchar to_lower_keybcs2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2594,7 +2594,7 @@ uchar to_lower_keybcs2_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_keybcs2_general_ci[] = { +static const uchar to_upper_keybcs2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2613,7 +2613,7 @@ uchar to_upper_keybcs2_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_keybcs2_general_ci[] = { +static const uchar sort_order_keybcs2_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2632,7 +2632,7 @@ uchar sort_order_keybcs2_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_keybcs2_general_ci[] = { +static const uint16 to_uni_keybcs2_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2670,7 +2670,7 @@ uint16 to_uni_keybcs2_general_ci[] = { #endif #ifdef HAVE_CHARSET_macce -uchar ctype_macce_general_ci[] = { +static const uchar ctype_macce_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2690,7 +2690,7 @@ uchar ctype_macce_general_ci[] = { 0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00 }; -uchar to_lower_macce_general_ci[] = { +static const uchar to_lower_macce_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2709,7 +2709,7 @@ uchar to_lower_macce_general_ci[] = { 0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF }; -uchar to_upper_macce_general_ci[] = { +static const uchar to_upper_macce_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2728,7 +2728,7 @@ uchar to_upper_macce_general_ci[] = { 0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF }; -uchar sort_order_macce_general_ci[] = { +static const uchar sort_order_macce_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2747,7 +2747,7 @@ uchar sort_order_macce_general_ci[] = { 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x8B,0x8B,0x5B,0x8D,0x5D,0x8D,0x53,0xFF }; -uint16 to_uni_macce_general_ci[] = { +static const uint16 to_uni_macce_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2785,7 +2785,7 @@ uint16 to_uni_macce_general_ci[] = { #endif #ifdef HAVE_CHARSET_macroman -uchar ctype_macroman_general_ci[] = { +static const uchar ctype_macroman_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2805,7 +2805,7 @@ uchar ctype_macroman_general_ci[] = { 0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_macroman_general_ci[] = { +static const uchar to_lower_macroman_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2824,7 +2824,7 @@ uchar to_lower_macroman_general_ci[] = { 0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_macroman_general_ci[] = { +static const uchar to_upper_macroman_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2843,7 +2843,7 @@ uchar to_upper_macroman_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_macroman_general_ci[] = { +static const uchar sort_order_macroman_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2862,7 +2862,7 @@ uchar sort_order_macroman_general_ci[] = { 0xF0,0x72,0x85,0x85,0x85,0x61,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_macroman_general_ci[] = { +static const uint16 to_uni_macroman_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -2900,7 +2900,7 @@ uint16 to_uni_macroman_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp852 -uchar ctype_cp852_general_ci[] = { +static const uchar ctype_cp852_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -2920,7 +2920,7 @@ uchar ctype_cp852_general_ci[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48 }; -uchar to_lower_cp852_general_ci[] = { +static const uchar to_lower_cp852_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2939,7 +2939,7 @@ uchar to_lower_cp852_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp852_general_ci[] = { +static const uchar to_upper_cp852_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2958,7 +2958,7 @@ uchar to_upper_cp852_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF }; -uchar sort_order_cp852_general_ci[] = { +static const uchar sort_order_cp852_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -2977,7 +2977,7 @@ uchar sort_order_cp852_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0x74,0x69,0x69,0xFE,0xFF }; -uint16 to_uni_cp852_general_ci[] = { +static const uint16 to_uni_cp852_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3015,7 +3015,7 @@ uint16 to_uni_cp852_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_general_ci[] = { +static const uchar ctype_latin7_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3035,7 +3035,7 @@ uchar ctype_latin7_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin7_general_ci[] = { +static const uchar to_lower_latin7_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3054,7 +3054,7 @@ uchar to_lower_latin7_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin7_general_ci[] = { +static const uchar to_upper_latin7_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3073,7 +3073,7 @@ uchar to_upper_latin7_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin7_general_ci[] = { +static const uchar sort_order_latin7_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x30,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2C,0x3C,0x3D, @@ -3092,7 +3092,7 @@ uchar sort_order_latin7_general_ci[] = { 0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x64,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0x52 }; -uint16 to_uni_latin7_general_ci[] = { +static const uint16 to_uni_latin7_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3130,7 +3130,7 @@ uint16 to_uni_latin7_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_general_cs[] = { +static const uchar ctype_latin7_general_cs[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3150,7 +3150,7 @@ uchar ctype_latin7_general_cs[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin7_general_cs[] = { +static const uchar to_lower_latin7_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3169,7 +3169,7 @@ uchar to_lower_latin7_general_cs[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin7_general_cs[] = { +static const uchar to_upper_latin7_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3188,7 +3188,7 @@ uchar to_upper_latin7_general_cs[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin7_general_cs[] = { +static const uchar sort_order_latin7_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x30,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2C,0x3C,0x3D, @@ -3207,7 +3207,7 @@ uchar sort_order_latin7_general_cs[] = { 0xE2,0xC5,0xC7,0xCB,0xCF,0xD1,0xCD,0x64,0xED,0xBD,0xDF,0xEB,0xE9,0xFB,0xFD,0x52 }; -uint16 to_uni_latin7_general_cs[] = { +static const uint16 to_uni_latin7_general_cs[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3245,7 +3245,7 @@ uint16 to_uni_latin7_general_cs[] = { #endif #ifdef HAVE_CHARSET_macce -uchar ctype_macce_bin[] = { +static const uchar ctype_macce_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3265,7 +3265,7 @@ uchar ctype_macce_bin[] = { 0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00 }; -uchar to_lower_macce_bin[] = { +static const uchar to_lower_macce_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3284,7 +3284,7 @@ uchar to_lower_macce_bin[] = { 0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF }; -uchar to_upper_macce_bin[] = { +static const uchar to_upper_macce_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3303,7 +3303,7 @@ uchar to_upper_macce_bin[] = { 0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF }; -uint16 to_uni_macce_bin[] = { +static const uint16 to_uni_macce_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3341,7 +3341,7 @@ uint16 to_uni_macce_bin[] = { #endif #ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_croatian_ci[] = { +static const uchar ctype_cp1250_croatian_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3361,7 +3361,7 @@ uchar ctype_cp1250_croatian_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_cp1250_croatian_ci[] = { +static const uchar to_lower_cp1250_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3380,7 +3380,7 @@ uchar to_lower_cp1250_croatian_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1250_croatian_ci[] = { +static const uchar to_upper_cp1250_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3399,7 +3399,7 @@ uchar to_upper_cp1250_croatian_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_cp1250_croatian_ci[] = { +static const uchar sort_order_cp1250_croatian_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3418,7 +3418,7 @@ uchar sort_order_cp1250_croatian_ci[] = { 0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF }; -uint16 to_uni_cp1250_croatian_ci[] = { +static const uint16 to_uni_cp1250_croatian_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3456,7 +3456,7 @@ uint16 to_uni_cp1250_croatian_ci[] = { #endif #ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_general_ci[] = { +static const uchar ctype_latin1_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3476,7 +3476,7 @@ uchar ctype_latin1_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin1_general_ci[] = { +static const uchar to_lower_latin1_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3495,7 +3495,7 @@ uchar to_lower_latin1_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin1_general_ci[] = { +static const uchar to_upper_latin1_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3514,7 +3514,7 @@ uchar to_upper_latin1_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin1_general_ci[] = { +static const uchar sort_order_latin1_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3533,7 +3533,7 @@ uchar sort_order_latin1_general_ci[] = { 0x59,0x7F,0x83,0x85,0x87,0x89,0x8B,0xBE,0x8D,0x9C,0x9E,0xA0,0xA2,0xAC,0xB1,0xAE }; -uint16 to_uni_latin1_general_ci[] = { +static const uint16 to_uni_latin1_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3571,7 +3571,7 @@ uint16 to_uni_latin1_general_ci[] = { #endif #ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_general_cs[] = { +static const uchar ctype_latin1_general_cs[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3591,7 +3591,7 @@ uchar ctype_latin1_general_cs[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin1_general_cs[] = { +static const uchar to_lower_latin1_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3610,7 +3610,7 @@ uchar to_lower_latin1_general_cs[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin1_general_cs[] = { +static const uchar to_upper_latin1_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3629,7 +3629,7 @@ uchar to_upper_latin1_general_cs[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin1_general_cs[] = { +static const uchar sort_order_latin1_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3648,7 +3648,7 @@ uchar sort_order_latin1_general_cs[] = { 0x5A,0x80,0x84,0x86,0x88,0x8A,0x8C,0xBE,0x8E,0x9D,0x9F,0xA1,0xA3,0xAD,0xB2,0xAE }; -uint16 to_uni_latin1_general_cs[] = { +static const uint16 to_uni_latin1_general_cs[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3686,7 +3686,7 @@ uint16 to_uni_latin1_general_cs[] = { #endif #ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_bin[] = { +static const uchar ctype_cp1251_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3706,7 +3706,7 @@ uchar ctype_cp1251_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_cp1251_bin[] = { +static const uchar to_lower_cp1251_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3725,7 +3725,7 @@ uchar to_lower_cp1251_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1251_bin[] = { +static const uchar to_upper_cp1251_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3744,7 +3744,7 @@ uchar to_upper_cp1251_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uint16 to_uni_cp1251_bin[] = { +static const uint16 to_uni_cp1251_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3782,7 +3782,7 @@ uint16 to_uni_cp1251_bin[] = { #endif #ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_general_ci[] = { +static const uchar ctype_cp1251_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3802,7 +3802,7 @@ uchar ctype_cp1251_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_cp1251_general_ci[] = { +static const uchar to_lower_cp1251_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3821,7 +3821,7 @@ uchar to_lower_cp1251_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1251_general_ci[] = { +static const uchar to_upper_cp1251_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3840,7 +3840,7 @@ uchar to_upper_cp1251_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar sort_order_cp1251_general_ci[] = { +static const uchar sort_order_cp1251_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3859,7 +3859,7 @@ uchar sort_order_cp1251_general_ci[] = { 0xAD,0xAF,0xB1,0xB5,0xB9,0xBB,0xBD,0xBF,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1 }; -uint16 to_uni_cp1251_general_ci[] = { +static const uint16 to_uni_cp1251_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -3897,7 +3897,7 @@ uint16 to_uni_cp1251_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp1251 -uchar ctype_cp1251_general_cs[] = { +static const uchar ctype_cp1251_general_cs[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -3917,7 +3917,7 @@ uchar ctype_cp1251_general_cs[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_cp1251_general_cs[] = { +static const uchar to_lower_cp1251_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3936,7 +3936,7 @@ uchar to_lower_cp1251_general_cs[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1251_general_cs[] = { +static const uchar to_upper_cp1251_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3955,7 +3955,7 @@ uchar to_upper_cp1251_general_cs[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar sort_order_cp1251_general_cs[] = { +static const uchar sort_order_cp1251_general_cs[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -3974,7 +3974,7 @@ uchar sort_order_cp1251_general_cs[] = { 0xAE,0xB0,0xB2,0xB6,0xBA,0xBC,0xBE,0xC0,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,0xD2 }; -uint16 to_uni_cp1251_general_cs[] = { +static const uint16 to_uni_cp1251_general_cs[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4012,7 +4012,7 @@ uint16 to_uni_cp1251_general_cs[] = { #endif #ifdef HAVE_CHARSET_macroman -uchar ctype_macroman_bin[] = { +static const uchar ctype_macroman_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4032,7 +4032,7 @@ uchar ctype_macroman_bin[] = { 0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_macroman_bin[] = { +static const uchar to_lower_macroman_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4051,7 +4051,7 @@ uchar to_lower_macroman_bin[] = { 0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_macroman_bin[] = { +static const uchar to_upper_macroman_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4070,7 +4070,7 @@ uchar to_upper_macroman_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_macroman_bin[] = { +static const uint16 to_uni_macroman_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4108,7 +4108,7 @@ uint16 to_uni_macroman_bin[] = { #endif #ifdef HAVE_CHARSET_cp1256 -uchar ctype_cp1256_general_ci[] = { +static const uchar ctype_cp1256_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4128,7 +4128,7 @@ uchar ctype_cp1256_general_ci[] = { 0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00 }; -uchar to_lower_cp1256_general_ci[] = { +static const uchar to_lower_cp1256_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4147,7 +4147,7 @@ uchar to_lower_cp1256_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1256_general_ci[] = { +static const uchar to_upper_cp1256_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4166,7 +4166,7 @@ uchar to_upper_cp1256_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_cp1256_general_ci[] = { +static const uchar sort_order_cp1256_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4185,7 +4185,7 @@ uchar sort_order_cp1256_general_ci[] = { 0xAE,0xAF,0xB0,0xB1,0x69,0xB2,0xB3,0xFC,0xB4,0x78,0xB5,0x79,0x7A,0xFD,0xFE,0xFF }; -uint16 to_uni_cp1256_general_ci[] = { +static const uint16 to_uni_cp1256_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4223,7 +4223,7 @@ uint16 to_uni_cp1256_general_ci[] = { #endif #ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_bin[] = { +static const uchar ctype_cp1257_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4243,7 +4243,7 @@ uchar ctype_cp1257_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 }; -uchar to_lower_cp1257_bin[] = { +static const uchar to_lower_cp1257_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4262,7 +4262,7 @@ uchar to_lower_cp1257_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1257_bin[] = { +static const uchar to_upper_cp1257_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4281,7 +4281,7 @@ uchar to_upper_cp1257_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uint16 to_uni_cp1257_bin[] = { +static const uint16 to_uni_cp1257_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4319,7 +4319,7 @@ uint16 to_uni_cp1257_bin[] = { #endif #ifdef HAVE_CHARSET_cp1257 -uchar ctype_cp1257_general_ci[] = { +static const uchar ctype_cp1257_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4339,7 +4339,7 @@ uchar ctype_cp1257_general_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 }; -uchar to_lower_cp1257_general_ci[] = { +static const uchar to_lower_cp1257_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4358,7 +4358,7 @@ uchar to_lower_cp1257_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1257_general_ci[] = { +static const uchar to_upper_cp1257_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4377,7 +4377,7 @@ uchar to_upper_cp1257_general_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_cp1257_general_ci[] = { +static const uchar sort_order_cp1257_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4396,7 +4396,7 @@ uchar sort_order_cp1257_general_ci[] = { 0x97,0x7D,0x7D,0x83,0x83,0x83,0x83,0xC3,0xA0,0x75,0x97,0xA0,0xA0,0xB0,0xB0,0xFF }; -uint16 to_uni_cp1257_general_ci[] = { +static const uint16 to_uni_cp1257_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4434,7 +4434,7 @@ uint16 to_uni_cp1257_general_ci[] = { #endif #ifdef HAVE_CHARSET_armscii8 -uchar ctype_armscii8_bin[] = { +static const uchar ctype_armscii8_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4454,7 +4454,7 @@ uchar ctype_armscii8_bin[] = { 0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10 }; -uchar to_lower_armscii8_bin[] = { +static const uchar to_lower_armscii8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4473,7 +4473,7 @@ uchar to_lower_armscii8_bin[] = { 0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF }; -uchar to_upper_armscii8_bin[] = { +static const uchar to_upper_armscii8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4492,7 +4492,7 @@ uchar to_upper_armscii8_bin[] = { 0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF }; -uint16 to_uni_armscii8_bin[] = { +static const uint16 to_uni_armscii8_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4530,7 +4530,7 @@ uint16 to_uni_armscii8_bin[] = { #endif #ifdef HAVE_CHARSET_ascii -uchar ctype_ascii_bin[] = { +static const uchar ctype_ascii_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4550,7 +4550,7 @@ uchar ctype_ascii_bin[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_ascii_bin[] = { +static const uchar to_lower_ascii_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4569,7 +4569,7 @@ uchar to_lower_ascii_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_ascii_bin[] = { +static const uchar to_upper_ascii_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4588,7 +4588,7 @@ uchar to_upper_ascii_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_ascii_bin[] = { +static const uint16 to_uni_ascii_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4626,7 +4626,7 @@ uint16 to_uni_ascii_bin[] = { #endif #ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_bin[] = { +static const uchar ctype_cp1250_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4646,7 +4646,7 @@ uchar ctype_cp1250_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_cp1250_bin[] = { +static const uchar to_lower_cp1250_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4665,7 +4665,7 @@ uchar to_lower_cp1250_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1250_bin[] = { +static const uchar to_upper_cp1250_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4684,7 +4684,7 @@ uchar to_upper_cp1250_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uint16 to_uni_cp1250_bin[] = { +static const uint16 to_uni_cp1250_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4722,7 +4722,7 @@ uint16 to_uni_cp1250_bin[] = { #endif #ifdef HAVE_CHARSET_cp1256 -uchar ctype_cp1256_bin[] = { +static const uchar ctype_cp1256_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4742,7 +4742,7 @@ uchar ctype_cp1256_bin[] = { 0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00 }; -uchar to_lower_cp1256_bin[] = { +static const uchar to_lower_cp1256_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4761,7 +4761,7 @@ uchar to_lower_cp1256_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1256_bin[] = { +static const uchar to_upper_cp1256_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4780,7 +4780,7 @@ uchar to_upper_cp1256_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_cp1256_bin[] = { +static const uint16 to_uni_cp1256_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4818,7 +4818,7 @@ uint16 to_uni_cp1256_bin[] = { #endif #ifdef HAVE_CHARSET_cp866 -uchar ctype_cp866_bin[] = { +static const uchar ctype_cp866_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4838,7 +4838,7 @@ uchar ctype_cp866_bin[] = { 0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 }; -uchar to_lower_cp866_bin[] = { +static const uchar to_lower_cp866_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4857,7 +4857,7 @@ uchar to_lower_cp866_bin[] = { 0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp866_bin[] = { +static const uchar to_upper_cp866_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4876,7 +4876,7 @@ uchar to_upper_cp866_bin[] = { 0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_cp866_bin[] = { +static const uint16 to_uni_cp866_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -4914,7 +4914,7 @@ uint16 to_uni_cp866_bin[] = { #endif #ifdef HAVE_CHARSET_dec8 -uchar ctype_dec8_bin[] = { +static const uchar ctype_dec8_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -4934,7 +4934,7 @@ uchar ctype_dec8_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_dec8_bin[] = { +static const uchar to_lower_dec8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4953,7 +4953,7 @@ uchar to_lower_dec8_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_dec8_bin[] = { +static const uchar to_upper_dec8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -4972,7 +4972,7 @@ uchar to_upper_dec8_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uint16 to_uni_dec8_bin[] = { +static const uint16 to_uni_dec8_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5010,7 +5010,7 @@ uint16 to_uni_dec8_bin[] = { #endif #ifdef HAVE_CHARSET_greek -uchar ctype_greek_bin[] = { +static const uchar ctype_greek_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5030,7 +5030,7 @@ uchar ctype_greek_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00 }; -uchar to_lower_greek_bin[] = { +static const uchar to_lower_greek_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5049,7 +5049,7 @@ uchar to_lower_greek_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_greek_bin[] = { +static const uchar to_upper_greek_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5068,7 +5068,7 @@ uchar to_upper_greek_bin[] = { 0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF }; -uint16 to_uni_greek_bin[] = { +static const uint16 to_uni_greek_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5106,7 +5106,7 @@ uint16 to_uni_greek_bin[] = { #endif #ifdef HAVE_CHARSET_hebrew -uchar ctype_hebrew_bin[] = { +static const uchar ctype_hebrew_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5126,7 +5126,7 @@ uchar ctype_hebrew_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00 }; -uchar to_lower_hebrew_bin[] = { +static const uchar to_lower_hebrew_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5145,7 +5145,7 @@ uchar to_lower_hebrew_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_hebrew_bin[] = { +static const uchar to_upper_hebrew_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5164,7 +5164,7 @@ uchar to_upper_hebrew_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_hebrew_bin[] = { +static const uint16 to_uni_hebrew_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5202,7 +5202,7 @@ uint16 to_uni_hebrew_bin[] = { #endif #ifdef HAVE_CHARSET_hp8 -uchar ctype_hp8_bin[] = { +static const uchar ctype_hp8_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5222,7 +5222,7 @@ uchar ctype_hp8_bin[] = { 0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 }; -uchar to_lower_hp8_bin[] = { +static const uchar to_lower_hp8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5241,7 +5241,7 @@ uchar to_lower_hp8_bin[] = { 0xF1,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_hp8_bin[] = { +static const uchar to_upper_hp8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5260,7 +5260,7 @@ uchar to_upper_hp8_bin[] = { 0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_hp8_bin[] = { +static const uint16 to_uni_hp8_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5298,7 +5298,7 @@ uint16 to_uni_hp8_bin[] = { #endif #ifdef HAVE_CHARSET_keybcs2 -uchar ctype_keybcs2_bin[] = { +static const uchar ctype_keybcs2_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5318,7 +5318,7 @@ uchar ctype_keybcs2_bin[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48 }; -uchar to_lower_keybcs2_bin[] = { +static const uchar to_lower_keybcs2_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5337,7 +5337,7 @@ uchar to_lower_keybcs2_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_keybcs2_bin[] = { +static const uchar to_upper_keybcs2_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5356,7 +5356,7 @@ uchar to_upper_keybcs2_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_keybcs2_bin[] = { +static const uint16 to_uni_keybcs2_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5394,7 +5394,7 @@ uint16 to_uni_keybcs2_bin[] = { #endif #ifdef HAVE_CHARSET_koi8r -uchar ctype_koi8r_bin[] = { +static const uchar ctype_koi8r_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5414,7 +5414,7 @@ uchar ctype_koi8r_bin[] = { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 }; -uchar to_lower_koi8r_bin[] = { +static const uchar to_lower_koi8r_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5433,7 +5433,7 @@ uchar to_lower_koi8r_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar to_upper_koi8r_bin[] = { +static const uchar to_upper_koi8r_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5452,7 +5452,7 @@ uchar to_upper_koi8r_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_koi8r_bin[] = { +static const uint16 to_uni_koi8r_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5490,7 +5490,7 @@ uint16 to_uni_koi8r_bin[] = { #endif #ifdef HAVE_CHARSET_koi8u -uchar ctype_koi8u_bin[] = { +static const uchar ctype_koi8u_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5510,7 +5510,7 @@ uchar ctype_koi8u_bin[] = { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 }; -uchar to_lower_koi8u_bin[] = { +static const uchar to_lower_koi8u_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5529,7 +5529,7 @@ uchar to_lower_koi8u_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF }; -uchar to_upper_koi8u_bin[] = { +static const uchar to_upper_koi8u_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5548,7 +5548,7 @@ uchar to_upper_koi8u_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_koi8u_bin[] = { +static const uint16 to_uni_koi8u_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5586,7 +5586,7 @@ uint16 to_uni_koi8u_bin[] = { #endif #ifdef HAVE_CHARSET_latin2 -uchar ctype_latin2_bin[] = { +static const uchar ctype_latin2_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5606,7 +5606,7 @@ uchar ctype_latin2_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin2_bin[] = { +static const uchar to_lower_latin2_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5625,7 +5625,7 @@ uchar to_lower_latin2_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin2_bin[] = { +static const uchar to_upper_latin2_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5644,7 +5644,7 @@ uchar to_upper_latin2_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uint16 to_uni_latin2_bin[] = { +static const uint16 to_uni_latin2_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5682,7 +5682,7 @@ uint16 to_uni_latin2_bin[] = { #endif #ifdef HAVE_CHARSET_latin5 -uchar ctype_latin5_bin[] = { +static const uchar ctype_latin5_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5702,7 +5702,7 @@ uchar ctype_latin5_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin5_bin[] = { +static const uchar to_lower_latin5_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5721,7 +5721,7 @@ uchar to_lower_latin5_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin5_bin[] = { +static const uchar to_upper_latin5_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5740,7 +5740,7 @@ uchar to_upper_latin5_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF }; -uint16 to_uni_latin5_bin[] = { +static const uint16 to_uni_latin5_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5778,7 +5778,7 @@ uint16 to_uni_latin5_bin[] = { #endif #ifdef HAVE_CHARSET_latin7 -uchar ctype_latin7_bin[] = { +static const uchar ctype_latin7_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5798,7 +5798,7 @@ uchar ctype_latin7_bin[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_latin7_bin[] = { +static const uchar to_lower_latin7_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5817,7 +5817,7 @@ uchar to_lower_latin7_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin7_bin[] = { +static const uchar to_upper_latin7_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5836,7 +5836,7 @@ uchar to_upper_latin7_bin[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uint16 to_uni_latin7_bin[] = { +static const uint16 to_uni_latin7_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5874,7 +5874,7 @@ uint16 to_uni_latin7_bin[] = { #endif #ifdef HAVE_CHARSET_cp850 -uchar ctype_cp850_bin[] = { +static const uchar ctype_cp850_bin[] = { 0x00, 0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30, 0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30, @@ -5894,7 +5894,7 @@ uchar ctype_cp850_bin[] = { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20 }; -uchar to_lower_cp850_bin[] = { +static const uchar to_lower_cp850_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5913,7 +5913,7 @@ uchar to_lower_cp850_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp850_bin[] = { +static const uchar to_upper_cp850_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -5932,7 +5932,7 @@ uchar to_upper_cp850_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_cp850_bin[] = { +static const uint16 to_uni_cp850_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -5970,7 +5970,7 @@ uint16 to_uni_cp850_bin[] = { #endif #ifdef HAVE_CHARSET_cp852 -uchar ctype_cp852_bin[] = { +static const uchar ctype_cp852_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -5990,7 +5990,7 @@ uchar ctype_cp852_bin[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48 }; -uchar to_lower_cp852_bin[] = { +static const uchar to_lower_cp852_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6009,7 +6009,7 @@ uchar to_lower_cp852_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp852_bin[] = { +static const uchar to_upper_cp852_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6028,7 +6028,7 @@ uchar to_upper_cp852_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF }; -uint16 to_uni_cp852_bin[] = { +static const uint16 to_uni_cp852_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6066,7 +6066,7 @@ uint16 to_uni_cp852_bin[] = { #endif #ifdef HAVE_CHARSET_swe7 -uchar ctype_swe7_bin[] = { +static const uchar ctype_swe7_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -6086,7 +6086,7 @@ uchar ctype_swe7_bin[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_swe7_bin[] = { +static const uchar to_lower_swe7_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6105,7 +6105,7 @@ uchar to_lower_swe7_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_swe7_bin[] = { +static const uchar to_upper_swe7_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6124,7 +6124,7 @@ uchar to_upper_swe7_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_swe7_bin[] = { +static const uint16 to_uni_swe7_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6162,7 +6162,7 @@ uint16 to_uni_swe7_bin[] = { #endif #ifdef HAVE_CHARSET_geostd8 -uchar ctype_geostd8_general_ci[] = { +static const uchar ctype_geostd8_general_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -6182,7 +6182,7 @@ uchar ctype_geostd8_general_ci[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_geostd8_general_ci[] = { +static const uchar to_lower_geostd8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6201,7 +6201,7 @@ uchar to_lower_geostd8_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_geostd8_general_ci[] = { +static const uchar to_upper_geostd8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6220,7 +6220,7 @@ uchar to_upper_geostd8_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar sort_order_geostd8_general_ci[] = { +static const uchar sort_order_geostd8_general_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6239,7 +6239,7 @@ uchar sort_order_geostd8_general_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_geostd8_general_ci[] = { +static const uint16 to_uni_geostd8_general_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6277,7 +6277,7 @@ uint16 to_uni_geostd8_general_ci[] = { #endif #ifdef HAVE_CHARSET_geostd8 -uchar ctype_geostd8_bin[] = { +static const uchar ctype_geostd8_bin[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -6297,7 +6297,7 @@ uchar ctype_geostd8_bin[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar to_lower_geostd8_bin[] = { +static const uchar to_lower_geostd8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6316,7 +6316,7 @@ uchar to_lower_geostd8_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_geostd8_bin[] = { +static const uchar to_upper_geostd8_bin[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6335,7 +6335,7 @@ uchar to_upper_geostd8_bin[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uint16 to_uni_geostd8_bin[] = { +static const uint16 to_uni_geostd8_bin[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6373,7 +6373,7 @@ uint16 to_uni_geostd8_bin[] = { #endif #ifdef HAVE_CHARSET_latin1 -uchar ctype_latin1_spanish_ci[] = { +static const uchar ctype_latin1_spanish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -6393,7 +6393,7 @@ uchar ctype_latin1_spanish_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }; -uchar to_lower_latin1_spanish_ci[] = { +static const uchar to_lower_latin1_spanish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6412,7 +6412,7 @@ uchar to_lower_latin1_spanish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_latin1_spanish_ci[] = { +static const uchar to_upper_latin1_spanish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6431,7 +6431,7 @@ uchar to_upper_latin1_spanish_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_latin1_spanish_ci[] = { +static const uchar sort_order_latin1_spanish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6450,7 +6450,7 @@ uchar sort_order_latin1_spanish_ci[] = { 0x57,0x7F,0x81,0x81,0x81,0x81,0x81,0xBE,0x81,0x9A,0x9A,0x9A,0x9A,0xAA,0xB1,0xAA }; -uint16 to_uni_latin1_spanish_ci[] = { +static const uint16 to_uni_latin1_spanish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6488,7 +6488,7 @@ uint16 to_uni_latin1_spanish_ci[] = { #endif #ifdef HAVE_CHARSET_cp1250 -uchar ctype_cp1250_polish_ci[] = { +static const uchar ctype_cp1250_polish_ci[] = { 0x00, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20, 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, @@ -6508,7 +6508,7 @@ uchar ctype_cp1250_polish_ci[] = { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10 }; -uchar to_lower_cp1250_polish_ci[] = { +static const uchar to_lower_cp1250_polish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6527,7 +6527,7 @@ uchar to_lower_cp1250_polish_ci[] = { 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar to_upper_cp1250_polish_ci[] = { +static const uchar to_upper_cp1250_polish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6546,7 +6546,7 @@ uchar to_upper_cp1250_polish_ci[] = { 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF }; -uchar sort_order_cp1250_polish_ci[] = { +static const uchar sort_order_cp1250_polish_ci[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -6565,7 +6565,7 @@ uchar sort_order_cp1250_polish_ci[] = { 0x48,0x58,0x57,0x5A,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF }; -uint16 to_uni_cp1250_polish_ci[] = { +static const uint16 to_uni_cp1250_polish_ci[] = { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -6602,7 +6602,7 @@ uint16 to_uni_cp1250_polish_ci[] = { #endif -CHARSET_INFO compiled_charsets[] = { +struct charset_info_st compiled_charsets[] = { #ifdef HAVE_CHARSET_dec8 { 3,0,0, diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index b1acd643df3..a327b5d0cf4 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -29,7 +29,7 @@ #ifdef HAVE_CHARSET_gb2312 -static uchar ctype_gb2312[257] = +static const uchar ctype_gb2312[257] = { 0, /* For standard library */ 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, @@ -50,7 +50,7 @@ static uchar ctype_gb2312[257] = 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0, }; -static uchar to_lower_gb2312[]= +static const uchar to_lower_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -86,7 +86,7 @@ static uchar to_lower_gb2312[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar to_upper_gb2312[]= +static const uchar to_upper_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -122,7 +122,7 @@ static uchar to_upper_gb2312[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar sort_order_gb2312[]= +static const uchar sort_order_gb2312[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -820,7 +820,7 @@ static MY_UNICASE_INFO *my_caseinfo_gb2312[256]= /* page 0 0x2121-0x2658 */ -static uint16 tab_gb2312_uni0[]={ +static const uint16 tab_gb2312_uni0[]={ 0x3000,0x3001,0x3002,0x30FB,0x02C9,0x02C7,0x00A8,0x3003, 0x3005,0x2015,0xFF5E,0x2016,0x2026,0x2018,0x2019,0x201C, 0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B,0x300C, @@ -991,7 +991,7 @@ static uint16 tab_gb2312_uni0[]={ }; /* page 1 0x2721-0x296F */ -static uint16 tab_gb2312_uni1[]={ +static const uint16 tab_gb2312_uni1[]={ 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416, 0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E, 0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426, @@ -1068,7 +1068,7 @@ static uint16 tab_gb2312_uni1[]={ 0x2545,0x2546,0x2547,0x2548,0x2549,0x254A,0x254B}; /* page 2 0x3021-0x777E */ -static uint16 tab_gb2312_uni2[]={ +static const uint16 tab_gb2312_uni2[]={ 0x554A,0x963F,0x57C3,0x6328,0x54CE,0x5509,0x54C0,0x7691, 0x764C,0x853C,0x77EE,0x827E,0x788D,0x7231,0x9698,0x978D, 0x6C28,0x5B89,0x4FFA,0x6309,0x6697,0x5CB8,0x80FA,0x6848, @@ -3366,7 +3366,7 @@ static int func_gb2312_uni_onechar(int code){ /* page 0 0x00A4-0x01DC */ -static uint16 tab_uni_gb23120[]={ +static const uint16 tab_uni_gb23120[]={ 0x2168, 0, 0,0x216C,0x2127, 0, 0, 0, 0, 0, 0, 0,0x2163,0x2140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3409,7 +3409,7 @@ static uint16 tab_uni_gb23120[]={ 0x2838}; /* page 1 0x02C7-0x0451 */ -static uint16 tab_uni_gb23121[]={ +static const uint16 tab_uni_gb23121[]={ 0x2126, 0,0x2125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3462,7 +3462,7 @@ static uint16 tab_uni_gb23121[]={ 0x2771, 0,0x2757}; /* page 2 0x2015-0x2312 */ -static uint16 tab_uni_gb23122[]={ +static const uint16 tab_uni_gb23122[]={ 0x212A,0x212C, 0,0x212E,0x212F, 0, 0,0x2130, 0x2131, 0, 0, 0, 0, 0, 0, 0, 0,0x212D, 0, 0, 0, 0, 0, 0, @@ -3561,7 +3561,7 @@ static uint16 tab_uni_gb23122[]={ 0, 0, 0, 0, 0,0x2150}; /* page 3 0x2460-0x2642 */ -static uint16 tab_uni_gb23123[]={ +static const uint16 tab_uni_gb23123[]={ 0x2259,0x225A,0x225B,0x225C,0x225D,0x225E,0x225F,0x2260, 0x2261,0x2262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0x2245,0x2246,0x2247,0x2248, @@ -3625,7 +3625,7 @@ static uint16 tab_uni_gb23123[]={ 0x2162, 0,0x2161}; /* page 4 0x3000-0x3129 */ -static uint16 tab_uni_gb23124[]={ +static const uint16 tab_uni_gb23124[]={ 0x2121,0x2122,0x2123,0x2128, 0,0x2129, 0, 0, 0x2134,0x2135,0x2136,0x2137,0x2138,0x2139,0x213A,0x213B, 0x213E,0x213F, 0,0x217E,0x2132,0x2133,0x213C,0x213D, @@ -3666,12 +3666,12 @@ static uint16 tab_uni_gb23124[]={ 0x2868,0x2869}; /* page 5 0x3220-0x3229 */ -static uint16 tab_uni_gb23125[]={ +static const uint16 tab_uni_gb23125[]={ 0x2265,0x2266,0x2267,0x2268,0x2269,0x226A,0x226B,0x226C, 0x226D,0x226E}; /* page 6 0x4E00-0x9B54 */ -static uint16 tab_uni_gb23126[]={ +static const uint16 tab_uni_gb23126[]={ 0x523B,0x3621, 0,0x465F, 0, 0, 0,0x4D72, 0x5549,0x487D,0x494F,0x4F42,0x5822,0x323B,0x536B, 0, 0x5824,0x3373, 0,0x5728,0x4752,0x5827,0x4A40, 0, @@ -6149,7 +6149,7 @@ static uint16 tab_uni_gb23126[]={ 0,0x774E, 0, 0,0x4427}; /* page 7 0x9C7C-0x9CE2 */ -static uint16 tab_uni_gb23127[]={ +static const uint16 tab_uni_gb23127[]={ 0x5363, 0, 0,0x764F, 0,0x4233,0x7650, 0, 0,0x7651,0x7652,0x7653,0x7654, 0, 0,0x7656, 0,0x312B,0x7657, 0,0x7658,0x7659,0x765A, 0, @@ -6165,7 +6165,7 @@ static uint16 tab_uni_gb23127[]={ 0x772C,0x772D,0x415B,0x772E, 0, 0,0x772F}; /* page 8 0x9E1F-0x9FA0 */ -static uint16 tab_uni_gb23128[]={ +static const uint16 tab_uni_gb23128[]={ 0x4471,0x702F,0x3C26,0x7030,0x4379, 0,0x4538,0x513B, 0,0x7031,0x7032,0x7033,0x7034,0x7035,0x513C, 0, 0x516C, 0,0x7037,0x7036,0x5427, 0,0x4D52,0x7038, @@ -6217,7 +6217,7 @@ static uint16 tab_uni_gb23128[]={ 0x396A,0x595F}; /* page 9 0xFF01-0xFFE5 */ -static uint16 tab_uni_gb23129[]={ +static const uint16 tab_uni_gb23129[]={ 0x2321,0x2322,0x2323,0x2167,0x2325,0x2326,0x2327,0x2328, 0x2329,0x232A,0x232B,0x232C,0x232D,0x232E,0x232F,0x2330, 0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338, @@ -6407,7 +6407,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_gb2312_chinese_ci= +struct charset_info_st my_charset_gb2312_chinese_ci= { 24,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ @@ -6439,7 +6439,7 @@ CHARSET_INFO my_charset_gb2312_chinese_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_gb2312_bin= +struct charset_info_st my_charset_gb2312_bin= { 86,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 547c8821229..01241e99624 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -25,7 +25,6 @@ * .configure. mbmaxlen_gbk=2 */ - #include <my_global.h> #include "m_string.h" #include "m_ctype.h" @@ -44,7 +43,7 @@ #define gbkhead(e) ((uchar)(e>>8)) #define gbktail(e) ((uchar)(e&0xff)) -static uchar ctype_gbk[257] = +static const uchar ctype_gbk[257] = { 0, /* For standard library */ 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32, @@ -65,7 +64,7 @@ static uchar ctype_gbk[257] = 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0, }; -static uchar to_lower_gbk[]= +static const uchar to_lower_gbk[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -101,7 +100,7 @@ static uchar to_lower_gbk[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar to_upper_gbk[]= +static const uchar to_upper_gbk[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -137,8 +136,7 @@ static uchar to_upper_gbk[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; - -static MY_UNICASE_INFO cA2[256]= +static const MY_UNICASE_INFO cA2[256]= { {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */ {0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, @@ -993,9 +991,7 @@ static MY_UNICASE_INFO *my_caseinfo_gbk[256]= NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - - -static uchar sort_order_gbk[]= +static const uchar sort_order_gbk[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -1031,7 +1027,7 @@ static uchar sort_order_gbk[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uint16 gbk_order[]= +static const uint16 gbk_order[]= { 8653,14277,17116,11482,11160,2751,14613,3913,13337,9827, 19496,1759,8105,7103,7836,5638,2223,21433,5878,8006, @@ -3560,7 +3556,7 @@ static uint mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) } /* page 0 0x8140-0xFE4F */ -static uint16 tab_gbk_uni0[]={ +static const uint16 tab_gbk_uni0[]={ 0x4E02,0x4E04,0x4E05,0x4E06,0x4E0F,0x4E12,0x4E17,0x4E1F, 0x4E20,0x4E21,0x4E23,0x4E26,0x4E29,0x4E2E,0x4E2F,0x4E31, 0x4E33,0x4E35,0x4E37,0x4E3C,0x4E40,0x4E41,0x4E42,0x4E44, @@ -7574,7 +7570,7 @@ static int func_gbk_uni_onechar(int code){ /* page 0 0x00A4-0x0451 */ -static uint16 tab_uni_gbk0[]={ +static const uint16 tab_uni_gbk0[]={ 0xA1E8, 0, 0,0xA1EC,0xA1A7, 0, 0, 0, 0, 0, 0, 0,0xA1E3,0xA1C0, 0, 0, 0, 0, 0,0xA1A4, 0, 0, 0, 0, @@ -7695,7 +7691,7 @@ static uint16 tab_uni_gbk0[]={ 0xA7EE,0xA7EF,0xA7F0,0xA7F1, 0,0xA7D7}; /* page 1 0x2010-0x2312 */ -static uint16 tab_uni_gbk1[]={ +static const uint16 tab_uni_gbk1[]={ 0xA95C, 0, 0,0xA843,0xA1AA,0xA844,0xA1AC, 0, 0xA1AE,0xA1AF, 0, 0,0xA1B0,0xA1B1, 0, 0, 0, 0, 0, 0, 0,0xA845,0xA1AD, 0, @@ -7795,7 +7791,7 @@ static uint16 tab_uni_gbk1[]={ 0, 0,0xA1D0}; /* page 2 0x2460-0x2642 */ -static uint16 tab_uni_gbk2[]={ +static const uint16 tab_uni_gbk2[]={ 0xA2D9,0xA2DA,0xA2DB,0xA2DC,0xA2DD,0xA2DE,0xA2DF,0xA2E0, 0xA2E1,0xA2E2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0xA2C5,0xA2C6,0xA2C7,0xA2C8, @@ -7859,7 +7855,7 @@ static uint16 tab_uni_gbk2[]={ 0xA1E2, 0,0xA1E1}; /* page 3 0x3000-0x3129 */ -static uint16 tab_uni_gbk3[]={ +static const uint16 tab_uni_gbk3[]={ 0xA1A1,0xA1A2,0xA1A3,0xA1A8, 0,0xA1A9,0xA965,0xA996, 0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB, 0xA1BE,0xA1BF,0xA893,0xA1FE,0xA1B2,0xA1B3,0xA1BC,0xA1BD, @@ -7900,7 +7896,7 @@ static uint16 tab_uni_gbk3[]={ 0xA8E8,0xA8E9}; /* page 4 0x3220-0x32A3 */ -static uint16 tab_uni_gbk4[]={ +static const uint16 tab_uni_gbk4[]={ 0xA2E5,0xA2E6,0xA2E7,0xA2E8,0xA2E9,0xA2EA,0xA2EB,0xA2EC, 0xA2ED,0xA2EE, 0, 0, 0, 0, 0, 0, 0,0xA95A, 0, 0, 0, 0, 0, 0, @@ -7920,7 +7916,7 @@ static uint16 tab_uni_gbk4[]={ 0, 0, 0,0xA949}; /* page 5 0x338E-0x33D5 */ -static uint16 tab_uni_gbk5[]={ +static const uint16 tab_uni_gbk5[]={ 0xA94A,0xA94B, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0xA94C,0xA94D, 0xA94E, 0, 0,0xA94F, 0, 0, 0, 0, @@ -7933,7 +7929,7 @@ static uint16 tab_uni_gbk5[]={ }; /* page 6 0x4E00-0x9FA5 */ -static uint16 tab_uni_gbk6[]={ +static const uint16 tab_uni_gbk6[]={ 0xD2BB,0xB6A1,0x8140,0xC6DF,0x8141,0x8142,0x8143,0xCDF2, 0xD5C9,0xC8FD,0xC9CF,0xCFC2,0xD8A2,0xB2BB,0xD3EB,0x8144, 0xD8A4,0xB3F3,0x8145,0xD7A8,0xC7D2,0xD8A7,0xCAC0,0x8146, @@ -10549,7 +10545,7 @@ static uint16 tab_uni_gbk6[]={ 0xD9DF,0xFD97,0xFD98,0xFD99,0xFD9A,0xFD9B}; /* page 7 0xF92C-0xFA29 */ -static uint16 tab_uni_gbk7[]={ +static const uint16 tab_uni_gbk7[]={ 0xFD9C, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -10584,7 +10580,7 @@ static uint16 tab_uni_gbk7[]={ 0xFE4C, 0, 0,0xFE4D,0xFE4E,0xFE4F}; /* page 8 0xFE30-0xFFE5 */ -static uint16 tab_uni_gbk8[]={ +static const uint16 tab_uni_gbk8[]={ 0xA955,0xA6F2, 0,0xA6F4,0xA6F5,0xA6E0,0xA6E1,0xA6F0, 0xA6F1,0xA6E2,0xA6E3,0xA6EE,0xA6EF,0xA6E6,0xA6E7,0xA6E4, 0xA6E5,0xA6E8,0xA6E9,0xA6EA,0xA6EB, 0, 0, 0, @@ -10801,7 +10797,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_gbk_chinese_ci= +struct charset_info_st my_charset_gbk_chinese_ci= { 28,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ @@ -10833,7 +10829,7 @@ CHARSET_INFO my_charset_gbk_chinese_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_gbk_bin= +struct charset_info_st my_charset_gbk_bin= { 87,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index dbd91c09637..ae2590cddd5 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -17,7 +17,7 @@ #include "m_string.h" #include "m_ctype.h" -static uchar ctype_latin1[] = { +static const uchar ctype_latin1[] = { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, @@ -37,7 +37,7 @@ static uchar ctype_latin1[] = { 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2 }; -static uchar to_lower_latin1[] = { +static const uchar to_lower_latin1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -56,7 +56,7 @@ static uchar to_lower_latin1[] = { 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 }; -static uchar to_upper_latin1[] = { +static const uchar to_upper_latin1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -75,7 +75,7 @@ static uchar to_upper_latin1[] = { 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255 }; -static uchar sort_order_latin1[] = { +static const uchar sort_order_latin1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -116,7 +116,7 @@ static uchar sort_order_latin1[] = { output doesn't reproduce these undefined characters. */ -unsigned short cs_to_uni[256]={ +static unsigned const short cs_to_uni[256]={ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -150,7 +150,7 @@ unsigned short cs_to_uni[256]={ 0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7, 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF }; -uchar pl00[256]={ +static const uchar pl00[256]={ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17, @@ -184,7 +184,7 @@ uchar pl00[256]={ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7, 0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF }; -uchar pl01[256]={ +static const uchar pl01[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -218,7 +218,7 @@ uchar pl01[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar pl02[256]={ +static const uchar pl02[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -252,7 +252,7 @@ uchar pl02[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar pl20[256]={ +static const uchar pl20[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x96,0x97,0x00,0x00,0x00, @@ -286,7 +286,7 @@ uchar pl20[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar pl21[256]={ +static const uchar pl21[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -320,7 +320,7 @@ uchar pl21[256]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -uchar *uni_to_cs[256]={ +static const uchar *const uni_to_cs[256]={ pl00,pl01,pl02,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, @@ -374,7 +374,7 @@ int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)), uchar *str, uchar *end __attribute__((unused))) { - uchar *pl; + const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; @@ -416,7 +416,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_latin1= +struct charset_info_st my_charset_latin1= { 8,0,0, /* number */ MY_CS_COMPILED | MY_CS_PRIMARY, /* state */ @@ -471,7 +471,7 @@ CHARSET_INFO my_charset_latin1= * Ü, ü, Ö, ö, Ä, ä */ -static uchar sort_order_latin1_de[] = { +static const uchar sort_order_latin1_de[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -495,7 +495,7 @@ static uchar sort_order_latin1_de[] = { same as sort_order_latin_de, but maps ALL accented chars to unaccented ones */ -uchar combo1map[]={ +static const uchar combo1map[]={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -514,7 +514,7 @@ uchar combo1map[]={ 68, 78, 79, 79, 79, 79, 79,247,216, 85, 85, 85, 85, 89,222, 89 }; -uchar combo2map[]={ +static const uchar combo2map[]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -715,7 +715,7 @@ static MY_COLLATION_HANDLER my_collation_german2_ci_handler= }; -CHARSET_INFO my_charset_latin1_german2_ci= +struct charset_info_st my_charset_latin1_german2_ci= { 31,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM, /* state */ @@ -748,7 +748,7 @@ CHARSET_INFO my_charset_latin1_german2_ci= }; -CHARSET_INFO my_charset_latin1_bin= +struct charset_info_st my_charset_latin1_bin= { 47,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index b2f2e3cd22e..745594cc6e1 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -23,7 +23,7 @@ size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; - register uchar *map= cs->to_upper; + register const uchar *map= cs->to_upper; char *str_orig= str; while (*str) @@ -44,7 +44,7 @@ size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str) size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; - register uchar *map= cs->to_lower; + register const uchar *map= cs->to_lower; char *str_orig= str; while (*str) @@ -79,7 +79,7 @@ size_t my_caseup_mb(CHARSET_INFO * cs, char *src, size_t srclen, { register uint32 l; register char *srcend= src + srclen; - register uchar *map= cs->to_upper; + register const uchar *map= cs->to_upper; DBUG_ASSERT(cs->caseup_multiply == 1); DBUG_ASSERT(src == dst && srclen == dstlen); @@ -114,7 +114,7 @@ size_t my_casedn_mb(CHARSET_INFO * cs, char *src, size_t srclen, { register uint32 l; register char *srcend= src + srclen; - register uchar *map=cs->to_lower; + register const uchar *map=cs->to_lower; DBUG_ASSERT(cs->casedn_multiply == 1); DBUG_ASSERT(src == dst && srclen == dstlen); @@ -219,7 +219,7 @@ my_caseup_mb_varlen(CHARSET_INFO * cs, char *src, size_t srclen, int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) { register uint32 l; - register uchar *map=cs->to_upper; + register const uchar *map=cs->to_upper; while (*s && *t) { @@ -683,8 +683,7 @@ my_bool my_like_range_mb(CHARSET_INFO *cs, char *min_end= min_str + res_length; char *max_end= max_str + res_length; size_t maxcharlen= res_length / cs->mbmaxlen; - const char *contraction_flags= cs->contractions ? - ((const char*) cs->contractions) + 0x40*0x40 : NULL; + my_bool have_contractions= my_uca_have_contractions(cs); for (; ptr != end && min_str != min_end && maxcharlen ; maxcharlen--) { @@ -752,8 +751,8 @@ fill_max_and_min: 'ab\min\min\min\min' and 'ab\max\max\max\max'. */ - if (contraction_flags && ptr + 1 < end && - contraction_flags[(uchar) *ptr]) + if (have_contractions && ptr + 1 < end && + my_uca_can_be_contraction_head(cs, (uchar) *ptr)) { /* Ptr[0] is a contraction head. */ @@ -775,8 +774,8 @@ fill_max_and_min: is not a contraction, then we put only ptr[0], and continue with ptr[1] on the next loop. */ - if (contraction_flags[(uchar) ptr[1]] && - cs->contractions[(*ptr-0x40)*0x40 + ptr[1] - 0x40]) + if (my_uca_can_be_contraction_tail(cs, (uchar) ptr[1]) && + my_uca_contraction2_weight(cs, (uchar) ptr[0], (uchar) ptr[1])) { /* Contraction found */ if (maxcharlen == 1 || min_str + 1 >= min_end) @@ -912,7 +911,7 @@ my_wildcmp_mb_bin(CHARSET_INFO *cs, Data was produced from EastAsianWidth.txt using utt11-dump utility. */ -static char pg11[256]= +static const char pg11[256]= { 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, 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, @@ -924,7 +923,7 @@ static char pg11[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pg23[256]= +static const char pg23[256]= { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -936,7 +935,7 @@ static char pg23[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pg2E[256]= +static const char pg2E[256]= { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -948,7 +947,7 @@ static char pg2E[256]= 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pg2F[256]= +static const char pg2F[256]= { 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, 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, @@ -960,7 +959,7 @@ static char pg2F[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0 }; -static char pg30[256]= +static const char pg30[256]= { 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, 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,0, @@ -972,7 +971,7 @@ static char pg30[256]= 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 }; -static char pg31[256]= +static const char pg31[256]= { 0,0,0,0,0,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,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -984,7 +983,7 @@ static char pg31[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }; -static char pg32[256]= +static const char pg32[256]= { 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,0, 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, @@ -996,7 +995,7 @@ static char pg32[256]= 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,0 }; -static char pg4D[256]= +static const char pg4D[256]= { 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, 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, @@ -1008,7 +1007,7 @@ static char pg4D[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pg9F[256]= +static const char pg9F[256]= { 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, 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, @@ -1020,7 +1019,7 @@ static char pg9F[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pgA4[256]= +static const char pgA4[256]= { 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, 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, @@ -1032,7 +1031,7 @@ static char pgA4[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pgD7[256]= +static const char pgD7[256]= { 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, 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, @@ -1044,7 +1043,7 @@ static char pgD7[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pgFA[256]= +static const char pgFA[256]= { 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, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -1056,7 +1055,7 @@ static char pgFA[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pgFE[256]= +static const char pgFE[256]= { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -1068,7 +1067,7 @@ static char pgFE[256]= 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static char pgFF[256]= +static const char pgFF[256]= { 0,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,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, @@ -1080,7 +1079,7 @@ static char pgFF[256]= 1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; -static struct {int page; char *p;} utr11_data[256]= +static const struct {int page; const char *p;} utr11_data[256]= { {0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, {0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL}, diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 2e5f78a30bf..25ef54e5c02 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -75,7 +75,7 @@ size_t my_strnxfrm_simple(CHARSET_INFO * cs, uchar *dest, size_t len, const uchar *src, size_t srclen) { - uchar *map= cs->sort_order; + const uchar *map= cs->sort_order; size_t dstlen= len; set_if_smaller(len, srclen); if (dest != src) @@ -101,7 +101,7 @@ int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; - uchar *map= cs->sort_order; + const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) @@ -195,7 +195,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str) { - register uchar *map= cs->to_upper; + register const uchar *map= cs->to_upper; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; @@ -205,7 +205,7 @@ size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str) size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str) { - register uchar *map= cs->to_lower; + register const uchar *map= cs->to_lower; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; @@ -218,7 +218,7 @@ size_t my_caseup_8bit(CHARSET_INFO * cs, char *src, size_t srclen, size_t dstlen __attribute__((unused))) { char *end= src + srclen; - register uchar *map= cs->to_upper; + register const uchar *map= cs->to_upper; DBUG_ASSERT(src == dst && srclen == dstlen); for ( ; src != end ; src++) *src= (char) map[(uchar) *src]; @@ -231,7 +231,7 @@ size_t my_casedn_8bit(CHARSET_INFO * cs, char *src, size_t srclen, size_t dstlen __attribute__((unused))) { char *end= src + srclen; - register uchar *map=cs->to_lower; + register const uchar *map=cs->to_lower; DBUG_ASSERT(src == dst && srclen == dstlen); for ( ; src != end ; src++) *src= (char) map[(uchar) *src]; @@ -240,7 +240,7 @@ size_t my_casedn_8bit(CHARSET_INFO * cs, char *src, size_t srclen, int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t) { - register uchar *map=cs->to_upper; + register const uchar *map=cs->to_upper; while (map[(uchar) *s] == map[(uchar) *t++]) if (!*s++) return 0; return ((int) map[(uchar) s[0]] - (int) map[(uchar) t[-1]]); @@ -303,9 +303,8 @@ void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { - register uchar *sort_order=cs->sort_order; - const uchar *end; - + register const uchar *sort_order=cs->sort_order; + /* Remove end space. We have to do this to be able to compare 'A ' and 'A' as identical @@ -1125,7 +1124,7 @@ skip: typedef struct { int nchars; - MY_UNI_IDX uidx; + struct my_uni_idx_st uidx; } uni_idx; #define PLANE_SIZE 0x100 @@ -1143,10 +1142,12 @@ static int pcmp(const void * f, const void * s) return res; } -static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t)) +static my_bool create_fromuni(struct charset_info_st *cs, + void *(*alloc)(size_t)) { uni_idx idx[PLANE_NUM]; int i,n; + struct my_uni_idx_st *tab_from_uni; /* Check that Unicode map is loaded. @@ -1187,16 +1188,18 @@ static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t)) for (i=0; i < PLANE_NUM; i++) { int ch,numchars; + uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; - if (!(idx[i].uidx.tab=(uchar*) alloc(numchars * sizeof(*idx[i].uidx.tab)))) + if (!(idx[i].uidx.tab= tab= (uchar*) + alloc(numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; - bzero(idx[i].uidx.tab,numchars*sizeof(*idx[i].uidx.tab)); + bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { @@ -1204,25 +1207,27 @@ static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t)) if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; - idx[i].uidx.tab[ofs]= ch; + tab[ofs]= ch; } } } /* Allocate and fill reverse table for each plane */ n=i; - if (!(cs->tab_from_uni= (MY_UNI_IDX*) alloc(sizeof(MY_UNI_IDX)*(n+1)))) + if (!(cs->tab_from_uni= tab_from_uni= (struct my_uni_idx_st*) + alloc(sizeof(MY_UNI_IDX)*(n+1)))) return TRUE; for (i=0; i< n; i++) - cs->tab_from_uni[i]= idx[i].uidx; + tab_from_uni[i]= idx[i].uidx; /* Set end-of-list marker */ - bzero(&cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); + bzero(&tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; } -static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(size_t)) +static my_bool my_cset_init_8bit(struct charset_info_st *cs, + void *(*alloc)(size_t)) { cs->caseup_multiply= 1; cs->casedn_multiply= 1; @@ -1230,7 +1235,7 @@ static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(size_t)) return create_fromuni(cs, alloc); } -static void set_max_sort_char(CHARSET_INFO *cs) +static void set_max_sort_char(struct charset_info_st *cs) { uchar max_char; uint i; @@ -1249,7 +1254,7 @@ static void set_max_sort_char(CHARSET_INFO *cs) } } -static my_bool my_coll_init_simple(CHARSET_INFO *cs, +static my_bool my_coll_init_simple(struct charset_info_st *cs, void *(*alloc)(size_t) __attribute__((unused))) { set_max_sort_char(cs); diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 91adf4ebddf..2b51ae6416f 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -31,7 +31,7 @@ * .configure. mbmaxlen_sjis=2 */ -static uchar ctype_sjis[257] = +static const uchar ctype_sjis[257] = { 0, /* For standard library */ 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ @@ -68,7 +68,7 @@ static uchar ctype_sjis[257] = 0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000 }; -static uchar to_lower_sjis[]= +static const uchar to_lower_sjis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -104,7 +104,7 @@ static uchar to_lower_sjis[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar to_upper_sjis[]= +static const uchar to_upper_sjis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -140,7 +140,7 @@ static uchar to_upper_sjis[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar sort_order_sjis[]= +static const uchar sort_order_sjis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -34192,7 +34192,7 @@ static MY_CHARSET_HANDLER my_charset_handler= }; -CHARSET_INFO my_charset_sjis_japanese_ci= +struct charset_info_st my_charset_sjis_japanese_ci= { 13,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_NONASCII, /* state */ @@ -34224,7 +34224,7 @@ CHARSET_INFO my_charset_sjis_japanese_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_sjis_bin= +struct charset_info_st my_charset_sjis_bin= { 88,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII, /* state */ diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 14b661ab0fc..29ec013849c 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -63,7 +63,7 @@ #define X L_MIDDLE -static int t_ctype[][TOT_LEVELS] = { +static const int t_ctype[][TOT_LEVELS] = { /*0x00*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, /*0x01*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, /*0x02*/ { IGNORE, IGNORE, IGNORE, IGNORE, X }, @@ -416,7 +416,7 @@ static uchar to_upper_tis620[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377', }; -static uchar sort_order_tis620[]= +static const uchar sort_order_tis620[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -476,7 +476,7 @@ static size_t thai2sortable(uchar *tstr, size_t len) if (isthai(c)) { - int *t_ctype0= t_ctype[c]; + const int *t_ctype0= t_ctype[c]; if (isconsnt(c)) l2bias -= 8; @@ -647,7 +647,7 @@ size_t my_strnxfrm_tis620(CHARSET_INFO *cs __attribute__((unused)), } -static unsigned short cs_to_uni[256]={ +static const unsigned short cs_to_uni[256]={ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -681,7 +681,7 @@ static unsigned short cs_to_uni[256]={ 0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57, 0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFD,0xFFFD,0xFFFD,0xFFFD }; -static uchar pl00[256]={ +static const uchar pl00[256]={ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -715,7 +715,7 @@ static uchar pl00[256]={ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static uchar pl0E[256]={ +static const uchar pl0E[256]={ 0x0000,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7, 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF, 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7, @@ -749,7 +749,7 @@ static uchar pl0E[256]={ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -static uchar plFF[256]={ +static const uchar plFF[256]={ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -783,7 +783,7 @@ static uchar plFF[256]={ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x00FF,0x0000,0x0000 }; -static uchar *uni_to_cs[256]={ +static const uchar *const uni_to_cs[256]={ pl00,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,pl0E,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, @@ -838,7 +838,7 @@ int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)), uchar *str, uchar *end __attribute__((unused))) { - uchar *pl; + const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; @@ -897,7 +897,7 @@ static MY_CHARSET_HANDLER my_charset_handler= -CHARSET_INFO my_charset_tis620_thai_ci= +struct charset_info_st my_charset_tis620_thai_ci= { 18,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */ @@ -929,7 +929,7 @@ CHARSET_INFO my_charset_tis620_thai_ci= &my_collation_ci_handler }; -CHARSET_INFO my_charset_tis620_bin= +struct charset_info_st my_charset_tis620_bin= { 89,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index beacf4f02c4..d1f845cc8fe 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -31,11 +31,16 @@ - No combining marks processing is done */ - #include <my_global.h> #include "m_string.h" #include "m_ctype.h" + +#define MY_UCA_CNT_FLAG_SIZE 4096 +#define MY_UCA_CNT_FLAG_MASK 4095 +#define MY_UCA_CNT_HEAD 1 +#define MY_UCA_CNT_TAIL 2 + #ifdef HAVE_UCA_COLLATIONS #define MY_UCA_NPAGES 256 @@ -43,7 +48,7 @@ #define MY_UCA_CMASK 255 #define MY_UCA_PSHIFT 8 -uint16 page000data[]= { /* 0000 (4 weights per char) */ +static const uint16 page000data[]= { /* 0000 (4 weights per char) */ 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, @@ -174,7 +179,7 @@ uint16 page000data[]= { /* 0000 (4 weights per char) */ 0x1094,0x0000,0x0000,0x0000, 0x105E,0x0000,0x0000,0x0000 }; -uint16 page001data[]= { /* 0100 (3 weights per char) */ +static const uint16 page001data[]= { /* 0100 (3 weights per char) */ 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, 0x0E60,0x0000,0x0000, @@ -262,7 +267,7 @@ uint16 page001data[]= { /* 0100 (3 weights per char) */ 0x0E38,0x0000,0x0000, 0x0E38,0x0000,0x0000, 0x0F8D,0x0000,0x0000, 0x0F8D,0x0000,0x0000 }; -uint16 page002data[]= { /* 0200 (3 weights per char) */ +static const uint16 page002data[]= { /* 0200 (3 weights per char) */ 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0E8B,0x0000,0x0000, 0x0EFB,0x0000,0x0000, @@ -350,7 +355,7 @@ uint16 page002data[]= { /* 0200 (3 weights per char) */ 0x0346,0x0000,0x0000, 0x0347,0x0000,0x0000, 0x0348,0x0000,0x0000, 0x0349,0x0000,0x0000 }; -uint16 page003data[]= { /* 0300 (4 weights per char) */ +static const uint16 page003data[]= { /* 0300 (4 weights per char) */ 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000, @@ -481,7 +486,7 @@ uint16 page003data[]= { /* 0300 (4 weights per char) */ 0xFBC0,0x83FE,0x0000,0x0000, 0xFBC0,0x83FF,0x0000,0x0000 }; -uint16 page004data[]= { /* 0400 (3 weights per char) */ +static const uint16 page004data[]= { /* 0400 (3 weights per char) */ 0x1152,0x0000,0x0000, 0x1152,0x0000,0x0000, 0x1145,0x0000,0x0000, 0x114A,0x0000,0x0000, 0x115A,0x0000,0x0000, 0x1173,0x0000,0x0000, 0x1188,0x0000,0x0000, 0x118C,0x0000,0x0000, 0x1194,0x0000,0x0000, @@ -569,7 +574,7 @@ uint16 page004data[]= { /* 0400 (3 weights per char) */ 0xFBC0,0x84FC,0x0000, 0xFBC0,0x84FD,0x0000, 0xFBC0,0x84FE,0x0000, 0xFBC0,0x84FF,0x0000 }; -uint16 page005data[]= { /* 0500 (3 weights per char) */ +static const uint16 page005data[]= { /* 0500 (3 weights per char) */ 0x1144,0x0000,0x0000, 0x1144,0x0000,0x0000, 0x1149,0x0000,0x0000, 0x1149,0x0000,0x0000, 0x116E,0x0000,0x0000, 0x116E,0x0000,0x0000, 0x117B,0x0000,0x0000, 0x117B,0x0000,0x0000, 0x11BD,0x0000,0x0000, @@ -657,7 +662,7 @@ uint16 page005data[]= { /* 0500 (3 weights per char) */ 0xFBC0,0x85FC,0x0000, 0xFBC0,0x85FD,0x0000, 0xFBC0,0x85FE,0x0000, 0xFBC0,0x85FF,0x0000 }; -uint16 page006data[]= { /* 0600 (3 weights per char) */ +static const uint16 page006data[]= { /* 0600 (3 weights per char) */ 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8604,0x0000, 0xFBC0,0x8605,0x0000, 0xFBC0,0x8606,0x0000, 0xFBC0,0x8607,0x0000, 0xFBC0,0x8608,0x0000, @@ -745,7 +750,7 @@ uint16 page006data[]= { /* 0600 (3 weights per char) */ 0x1392,0x0000,0x0000, 0x1347,0x0000,0x0000, 0x13B0,0x0000,0x0000, 0x13BB,0x0000,0x0000 }; -uint16 page007data[]= { /* 0700 (3 weights per char) */ +static const uint16 page007data[]= { /* 0700 (3 weights per char) */ 0x0270,0x0000,0x0000, 0x0260,0x0000,0x0000, 0x0261,0x0000,0x0000, 0x023F,0x0000,0x0000, 0x0240,0x0000,0x0000, 0x0241,0x0000,0x0000, 0x0242,0x0000,0x0000, 0x0243,0x0000,0x0000, 0x0244,0x0000,0x0000, @@ -833,7 +838,7 @@ uint16 page007data[]= { /* 0700 (3 weights per char) */ 0xFBC0,0x87FC,0x0000, 0xFBC0,0x87FD,0x0000, 0xFBC0,0x87FE,0x0000, 0xFBC0,0x87FF,0x0000 }; -uint16 page009data[]= { /* 0900 (3 weights per char) */ +static const uint16 page009data[]= { /* 0900 (3 weights per char) */ 0xFBC0,0x8900,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x155A,0x0000,0x0000, 0x155B,0x0000,0x0000, 0x155C,0x0000,0x0000, 0x155D,0x0000,0x0000, 0x155E,0x0000,0x0000, @@ -921,7 +926,7 @@ uint16 page009data[]= { /* 0900 (3 weights per char) */ 0xFBC0,0x89FC,0x0000, 0xFBC0,0x89FD,0x0000, 0xFBC0,0x89FE,0x0000, 0xFBC0,0x89FF,0x0000 }; -uint16 page00Adata[]= { /* 0A00 (3 weights per char) */ +static const uint16 page00Adata[]= { /* 0A00 (3 weights per char) */ 0xFBC0,0x8A00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8A04,0x0000, 0x15E7,0x0000,0x0000, 0x15E8,0x0000,0x0000, 0x15EC,0x0000,0x0000, 0x15ED,0x0000,0x0000, @@ -1009,7 +1014,7 @@ uint16 page00Adata[]= { /* 0A00 (3 weights per char) */ 0xFBC0,0x8AFC,0x0000, 0xFBC0,0x8AFD,0x0000, 0xFBC0,0x8AFE,0x0000, 0xFBC0,0x8AFF,0x0000 }; -uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */ +static const uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */ 0xFBC0,0x8B00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8B04,0x0000, 0x165D,0x0000,0x0000, 0x165E,0x0000,0x0000, 0x165F,0x0000,0x0000, 0x1660,0x0000,0x0000, @@ -1097,7 +1102,7 @@ uint16 page00Bdata[]= { /* 0B00 (3 weights per char) */ 0xFBC0,0x8BFC,0x0000, 0xFBC0,0x8BFD,0x0000, 0xFBC0,0x8BFE,0x0000, 0xFBC0,0x8BFF,0x0000 }; -uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */ +static const uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */ 0xFBC0,0x8C00,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8C04,0x0000, 0x16CD,0x0000,0x0000, 0x16CE,0x0000,0x0000, 0x16CF,0x0000,0x0000, 0x16D0,0x0000,0x0000, @@ -1185,7 +1190,7 @@ uint16 page00Cdata[]= { /* 0C00 (3 weights per char) */ 0xFBC0,0x8CFC,0x0000, 0xFBC0,0x8CFD,0x0000, 0xFBC0,0x8CFE,0x0000, 0xFBC0,0x8CFF,0x0000 }; -uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */ +static const uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */ 0xFBC0,0x8D00,0x0000, 0xFBC0,0x8D01,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0xFBC0,0x8D04,0x0000, 0x1755,0x0000,0x0000, 0x1756,0x0000,0x0000, 0x1757,0x0000,0x0000, 0x1758,0x0000,0x0000, @@ -1273,7 +1278,7 @@ uint16 page00Ddata[]= { /* 0D00 (3 weights per char) */ 0xFBC0,0x8DFC,0x0000, 0xFBC0,0x8DFD,0x0000, 0xFBC0,0x8DFE,0x0000, 0xFBC0,0x8DFF,0x0000 }; -uint16 page00Edata[]= { /* 0E00 (3 weights per char) */ +static const uint16 page00Edata[]= { /* 0E00 (3 weights per char) */ 0xFBC0,0x8E00,0x0000, 0x17E4,0x0000,0x0000, 0x17E5,0x0000,0x0000, 0x17E6,0x0000,0x0000, 0x17E7,0x0000,0x0000, 0x17E8,0x0000,0x0000, 0x17E9,0x0000,0x0000, 0x17EA,0x0000,0x0000, 0x17EB,0x0000,0x0000, @@ -1361,7 +1366,7 @@ uint16 page00Edata[]= { /* 0E00 (3 weights per char) */ 0xFBC0,0x8EFC,0x0000, 0xFBC0,0x8EFD,0x0000, 0xFBC0,0x8EFE,0x0000, 0xFBC0,0x8EFF,0x0000 }; -uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */ +static const uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */ 0x189A,0x18AD,0x0000, 0x035A,0x0000,0x0000, 0x035B,0x0000,0x0000, 0x035C,0x0000,0x0000, 0x02FE,0x0000,0x0000, 0x02FF,0x0000,0x0000, 0x0300,0x0000,0x0000, 0x0301,0x0000,0x0000, 0x0302,0x0000,0x0000, @@ -1449,7 +1454,7 @@ uint16 page00Fdata[]= { /* 0F00 (3 weights per char) */ 0xFBC0,0x8FFC,0x0000, 0xFBC0,0x8FFD,0x0000, 0xFBC0,0x8FFE,0x0000, 0xFBC0,0x8FFF,0x0000 }; -uint16 page010data[]= { /* 1000 (3 weights per char) */ +static const uint16 page010data[]= { /* 1000 (3 weights per char) */ 0x1931,0x0000,0x0000, 0x1932,0x0000,0x0000, 0x1933,0x0000,0x0000, 0x1934,0x0000,0x0000, 0x1935,0x0000,0x0000, 0x1936,0x0000,0x0000, 0x1937,0x0000,0x0000, 0x1938,0x0000,0x0000, 0x1939,0x0000,0x0000, @@ -1537,7 +1542,7 @@ uint16 page010data[]= { /* 1000 (3 weights per char) */ 0xFBC0,0x90FC,0x0000, 0xFBC0,0x90FD,0x0000, 0xFBC0,0x90FE,0x0000, 0xFBC0,0x90FF,0x0000 }; -uint16 page011data[]= { /* 1100 (3 weights per char) */ +static const uint16 page011data[]= { /* 1100 (3 weights per char) */ 0x1D62,0x0000,0x0000, 0x1D63,0x0000,0x0000, 0x1D64,0x0000,0x0000, 0x1D65,0x0000,0x0000, 0x1D66,0x0000,0x0000, 0x1D67,0x0000,0x0000, 0x1D68,0x0000,0x0000, 0x1D69,0x0000,0x0000, 0x1D6A,0x0000,0x0000, @@ -1625,7 +1630,7 @@ uint16 page011data[]= { /* 1100 (3 weights per char) */ 0xFBC0,0x91FC,0x0000, 0xFBC0,0x91FD,0x0000, 0xFBC0,0x91FE,0x0000, 0xFBC0,0x91FF,0x0000 }; -uint16 page012data[]= { /* 1200 (3 weights per char) */ +static const uint16 page012data[]= { /* 1200 (3 weights per char) */ 0x141C,0x0000,0x0000, 0x141D,0x0000,0x0000, 0x141E,0x0000,0x0000, 0x141F,0x0000,0x0000, 0x1420,0x0000,0x0000, 0x1421,0x0000,0x0000, 0x1422,0x0000,0x0000, 0xFBC0,0x9207,0x0000, 0x1423,0x0000,0x0000, @@ -1713,7 +1718,7 @@ uint16 page012data[]= { /* 1200 (3 weights per char) */ 0x1500,0x0000,0x0000, 0x1501,0x0000,0x0000, 0x1502,0x0000,0x0000, 0x1503,0x0000,0x0000 }; -uint16 page013data[]= { /* 1300 (3 weights per char) */ +static const uint16 page013data[]= { /* 1300 (3 weights per char) */ 0x1504,0x0000,0x0000, 0x1505,0x0000,0x0000, 0x1506,0x0000,0x0000, 0x1507,0x0000,0x0000, 0x1508,0x0000,0x0000, 0x1509,0x0000,0x0000, 0x150A,0x0000,0x0000, 0x150B,0x0000,0x0000, 0x150C,0x0000,0x0000, @@ -1801,7 +1806,7 @@ uint16 page013data[]= { /* 1300 (3 weights per char) */ 0xFBC0,0x93FC,0x0000, 0xFBC0,0x93FD,0x0000, 0xFBC0,0x93FE,0x0000, 0xFBC0,0x93FF,0x0000 }; -uint16 page014data[]= { /* 1400 (3 weights per char) */ +static const uint16 page014data[]= { /* 1400 (3 weights per char) */ 0xFBC0,0x9400,0x0000, 0x1AAE,0x0000,0x0000, 0x1AAF,0x0000,0x0000, 0x1AB0,0x0000,0x0000, 0x1AB1,0x0000,0x0000, 0x1AB2,0x0000,0x0000, 0x1AB3,0x0000,0x0000, 0x1AB4,0x0000,0x0000, 0x1AB5,0x0000,0x0000, @@ -1889,7 +1894,7 @@ uint16 page014data[]= { /* 1400 (3 weights per char) */ 0x1BA9,0x0000,0x0000, 0x1BAA,0x0000,0x0000, 0x1BAB,0x0000,0x0000, 0x1BAC,0x0000,0x0000 }; -uint16 page015data[]= { /* 1500 (2 weights per char) */ +static const uint16 page015data[]= { /* 1500 (2 weights per char) */ 0x1BAD,0x0000, 0x1BAE,0x0000, 0x1BAF,0x0000, 0x1BB0,0x0000, 0x1BB1,0x0000, 0x1BB2,0x0000, 0x1BB3,0x0000, 0x1BB4,0x0000, 0x1BB5,0x0000, 0x1BB6,0x0000, 0x1BB7,0x0000, 0x1BB8,0x0000, @@ -1956,7 +1961,7 @@ uint16 page015data[]= { /* 1500 (2 weights per char) */ 0x1CB1,0x0000, 0x1CB2,0x0000, 0x1CB3,0x0000, 0x1CB4,0x0000 }; -uint16 page016data[]= { /* 1600 (3 weights per char) */ +static const uint16 page016data[]= { /* 1600 (3 weights per char) */ 0x1CB5,0x0000,0x0000, 0x1CB6,0x0000,0x0000, 0x1CB7,0x0000,0x0000, 0x1CB8,0x0000,0x0000, 0x1CB9,0x0000,0x0000, 0x1CBA,0x0000,0x0000, 0x1CBB,0x0000,0x0000, 0x1CBC,0x0000,0x0000, 0x1CBD,0x0000,0x0000, @@ -2044,7 +2049,7 @@ uint16 page016data[]= { /* 1600 (3 weights per char) */ 0xFBC0,0x96FC,0x0000, 0xFBC0,0x96FD,0x0000, 0xFBC0,0x96FE,0x0000, 0xFBC0,0x96FF,0x0000 }; -uint16 page017data[]= { /* 1700 (3 weights per char) */ +static const uint16 page017data[]= { /* 1700 (3 weights per char) */ 0x18E2,0x0000,0x0000, 0x18E3,0x0000,0x0000, 0x18E4,0x0000,0x0000, 0x18E5,0x0000,0x0000, 0x18E6,0x0000,0x0000, 0x18E7,0x0000,0x0000, 0x18E8,0x0000,0x0000, 0x18E9,0x0000,0x0000, 0x18EA,0x0000,0x0000, @@ -2132,7 +2137,7 @@ uint16 page017data[]= { /* 1700 (3 weights per char) */ 0xFBC0,0x97FC,0x0000, 0xFBC0,0x97FD,0x0000, 0xFBC0,0x97FE,0x0000, 0xFBC0,0x97FF,0x0000 }; -uint16 page018data[]= { /* 1800 (3 weights per char) */ +static const uint16 page018data[]= { /* 1800 (3 weights per char) */ 0x02F8,0x0000,0x0000, 0x025E,0x0000,0x0000, 0x0235,0x0000,0x0000, 0x0263,0x0000,0x0000, 0x024A,0x0000,0x0000, 0x024B,0x0000,0x0000, 0x0223,0x0000,0x0000, 0x0224,0x0000,0x0000, 0x0236,0x0000,0x0000, @@ -2220,7 +2225,7 @@ uint16 page018data[]= { /* 1800 (3 weights per char) */ 0xFBC0,0x98FC,0x0000, 0xFBC0,0x98FD,0x0000, 0xFBC0,0x98FE,0x0000, 0xFBC0,0x98FF,0x0000 }; -uint16 page019data[]= { /* 1900 (3 weights per char) */ +static const uint16 page019data[]= { /* 1900 (3 weights per char) */ 0x18B0,0x0000,0x0000, 0x18B1,0x0000,0x0000, 0x18B2,0x0000,0x0000, 0x18B3,0x0000,0x0000, 0x18B4,0x0000,0x0000, 0x18B5,0x0000,0x0000, 0x18B6,0x0000,0x0000, 0x18B7,0x0000,0x0000, 0x18B8,0x0000,0x0000, @@ -2308,7 +2313,7 @@ uint16 page019data[]= { /* 1900 (3 weights per char) */ 0x0397,0x0000,0x0000, 0x0398,0x0000,0x0000, 0x0399,0x0000,0x0000, 0x039A,0x0000,0x0000 }; -uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */ +static const uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */ 0x0E37,0x0000,0x0000, 0x0E3C,0x0000,0x0000, 0x0E3D,0x0000,0x0000, 0x0E57,0x0000,0x0000, 0x0E64,0x0000,0x0000, 0x0E71,0x0000,0x0000, 0x0E8A,0x0000,0x0000, 0x0E8F,0x0000,0x0000, 0x0EA8,0x0000,0x0000, @@ -2396,7 +2401,7 @@ uint16 page01Ddata[]= { /* 1D00 (3 weights per char) */ 0xFBC0,0x9DFC,0x0000, 0xFBC0,0x9DFD,0x0000, 0xFBC0,0x9DFE,0x0000, 0xFBC0,0x9DFF,0x0000 }; -uint16 page01Edata[]= { /* 1E00 (3 weights per char) */ +static const uint16 page01Edata[]= { /* 1E00 (3 weights per char) */ 0x0E33,0x0000,0x0000, 0x0E33,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E4A,0x0000,0x0000, 0x0E60,0x0000,0x0000, @@ -2484,7 +2489,7 @@ uint16 page01Edata[]= { /* 1E00 (3 weights per char) */ 0xFBC0,0x9EFC,0x0000, 0xFBC0,0x9EFD,0x0000, 0xFBC0,0x9EFE,0x0000, 0xFBC0,0x9EFF,0x0000 }; -uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */ +static const uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */ 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, 0x10E8,0x0000,0x0000, @@ -2572,7 +2577,7 @@ uint16 page01Fdata[]= { /* 1F00 (3 weights per char) */ 0x1109,0x0000,0x0000, 0x020D,0x0000,0x0000, 0x0218,0x0000,0x0000, 0xFBC0,0x9FFF,0x0000 }; -uint16 page020data[]= { /* 2000 (5 weights per char) */ +static const uint16 page020data[]= { /* 2000 (5 weights per char) */ 0x0209,0x0000,0x0000,0x0000,0x0000, 0x0209,0x0000,0x0000,0x0000,0x0000, 0x0209,0x0000,0x0000,0x0000,0x0000, @@ -2831,7 +2836,7 @@ uint16 page020data[]= { /* 2000 (5 weights per char) */ 0xFBC0,0xA0FF,0x0000,0x0000,0x0000 }; -uint16 page021data[]= { /* 2100 (5 weights per char) */ +static const uint16 page021data[]= { /* 2100 (5 weights per char) */ 0x0E33,0x02CC,0x0E60,0x0000,0x0000, 0x0E33,0x02CC,0x0FEA,0x0000,0x0000, 0x0E60,0x0000,0x0000,0x0000,0x0000, @@ -3090,7 +3095,7 @@ uint16 page021data[]= { /* 2100 (5 weights per char) */ 0x0417,0x0000,0x0000,0x0000,0x0000 }; -uint16 page022data[]= { /* 2200 (4 weights per char) */ +static const uint16 page022data[]= { /* 2200 (4 weights per char) */ 0x0418,0x0000,0x0000,0x0000, 0x0419,0x0000,0x0000,0x0000, 0x041A,0x0000,0x0000,0x0000, 0x041B,0x0000,0x0000,0x0000, 0x041B,0x0000,0x0000,0x0000, 0x041C,0x0000,0x0000,0x0000, @@ -3221,7 +3226,7 @@ uint16 page022data[]= { /* 2200 (4 weights per char) */ 0x04F9,0x0000,0x0000,0x0000, 0x04FA,0x0000,0x0000,0x0000 }; -uint16 page023data[]= { /* 2300 (3 weights per char) */ +static const uint16 page023data[]= { /* 2300 (3 weights per char) */ 0x04FB,0x0000,0x0000, 0x04FC,0x0000,0x0000, 0x04FD,0x0000,0x0000, 0x04FE,0x0000,0x0000, 0x04FF,0x0000,0x0000, 0x0500,0x0000,0x0000, 0x0501,0x0000,0x0000, 0x0502,0x0000,0x0000, 0x0503,0x0000,0x0000, @@ -3309,7 +3314,7 @@ uint16 page023data[]= { /* 2300 (3 weights per char) */ 0xFBC0,0xA3FC,0x0000, 0xFBC0,0xA3FD,0x0000, 0xFBC0,0xA3FE,0x0000, 0xFBC0,0xA3FF,0x0000 }; -uint16 page024data[]= { /* 2400 (5 weights per char) */ +static const uint16 page024data[]= { /* 2400 (5 weights per char) */ 0x05CA,0x0000,0x0000,0x0000,0x0000, 0x05CB,0x0000,0x0000,0x0000,0x0000, 0x05CC,0x0000,0x0000,0x0000,0x0000, @@ -3568,7 +3573,7 @@ uint16 page024data[]= { /* 2400 (5 weights per char) */ 0x0E29,0x0000,0x0000,0x0000,0x0000 }; -uint16 page025data[]= { /* 2500 (2 weights per char) */ +static const uint16 page025data[]= { /* 2500 (2 weights per char) */ 0x05FC,0x0000, 0x05FD,0x0000, 0x05FE,0x0000, 0x05FF,0x0000, 0x0600,0x0000, 0x0601,0x0000, 0x0602,0x0000, 0x0603,0x0000, 0x0604,0x0000, 0x0605,0x0000, 0x0606,0x0000, 0x0607,0x0000, @@ -3635,7 +3640,7 @@ uint16 page025data[]= { /* 2500 (2 weights per char) */ 0x06F8,0x0000, 0x06F9,0x0000, 0x06FA,0x0000, 0x06FB,0x0000 }; -uint16 page026data[]= { /* 2600 (3 weights per char) */ +static const uint16 page026data[]= { /* 2600 (3 weights per char) */ 0x06FC,0x0000,0x0000, 0x06FD,0x0000,0x0000, 0x06FE,0x0000,0x0000, 0x06FF,0x0000,0x0000, 0x0700,0x0000,0x0000, 0x0701,0x0000,0x0000, 0x0702,0x0000,0x0000, 0x0703,0x0000,0x0000, 0x0704,0x0000,0x0000, @@ -3723,7 +3728,7 @@ uint16 page026data[]= { /* 2600 (3 weights per char) */ 0xFBC0,0xA6FC,0x0000, 0xFBC0,0xA6FD,0x0000, 0xFBC0,0xA6FE,0x0000, 0xFBC0,0xA6FF,0x0000 }; -uint16 page027data[]= { /* 2700 (3 weights per char) */ +static const uint16 page027data[]= { /* 2700 (3 weights per char) */ 0xFBC0,0xA700,0x0000, 0x077C,0x0000,0x0000, 0x077D,0x0000,0x0000, 0x077E,0x0000,0x0000, 0x077F,0x0000,0x0000, 0xFBC0,0xA705,0x0000, 0x0780,0x0000,0x0000, 0x0781,0x0000,0x0000, 0x0782,0x0000,0x0000, @@ -3811,7 +3816,7 @@ uint16 page027data[]= { /* 2700 (3 weights per char) */ 0x0834,0x0000,0x0000, 0x0835,0x0000,0x0000, 0x0836,0x0000,0x0000, 0x0837,0x0000,0x0000 }; -uint16 page028data[]= { /* 2800 (2 weights per char) */ +static const uint16 page028data[]= { /* 2800 (2 weights per char) */ 0x0A29,0x0000, 0x0A2A,0x0000, 0x0A2B,0x0000, 0x0A2C,0x0000, 0x0A2D,0x0000, 0x0A2E,0x0000, 0x0A2F,0x0000, 0x0A30,0x0000, 0x0A31,0x0000, 0x0A32,0x0000, 0x0A33,0x0000, 0x0A34,0x0000, @@ -3878,7 +3883,7 @@ uint16 page028data[]= { /* 2800 (2 weights per char) */ 0x0B25,0x0000, 0x0B26,0x0000, 0x0B27,0x0000, 0x0B28,0x0000 }; -uint16 page029data[]= { /* 2900 (2 weights per char) */ +static const uint16 page029data[]= { /* 2900 (2 weights per char) */ 0x0838,0x0000, 0x0839,0x0000, 0x083A,0x0000, 0x083B,0x0000, 0x083C,0x0000, 0x083D,0x0000, 0x083E,0x0000, 0x083F,0x0000, 0x0840,0x0000, 0x0841,0x0000, 0x0842,0x0000, 0x0843,0x0000, @@ -3945,7 +3950,7 @@ uint16 page029data[]= { /* 2900 (2 weights per char) */ 0x0296,0x0000, 0x0297,0x0000, 0x091E,0x0000, 0x091F,0x0000 }; -uint16 page02Adata[]= { /* 2A00 (5 weights per char) */ +static const uint16 page02Adata[]= { /* 2A00 (5 weights per char) */ 0x0920,0x0000,0x0000,0x0000,0x0000, 0x0921,0x0000,0x0000,0x0000,0x0000, 0x0922,0x0000,0x0000,0x0000,0x0000, @@ -4204,7 +4209,7 @@ uint16 page02Adata[]= { /* 2A00 (5 weights per char) */ 0x0A1A,0x0000,0x0000,0x0000,0x0000 }; -uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */ +static const uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */ 0x0A1B,0x0000,0x0000, 0x0A1C,0x0000,0x0000, 0x0A1D,0x0000,0x0000, 0x0A1E,0x0000,0x0000, 0x0A1F,0x0000,0x0000, 0x0A20,0x0000,0x0000, 0x0A21,0x0000,0x0000, 0x0A22,0x0000,0x0000, 0x0A23,0x0000,0x0000, @@ -4292,7 +4297,7 @@ uint16 page02Bdata[]= { /* 2B00 (3 weights per char) */ 0xFBC0,0xABFC,0x0000, 0xFBC0,0xABFD,0x0000, 0xFBC0,0xABFE,0x0000, 0xFBC0,0xABFF,0x0000 }; -uint16 page02Edata[]= { /* 2E00 (3 weights per char) */ +static const uint16 page02Edata[]= { /* 2E00 (3 weights per char) */ 0xFBC0,0xAE00,0x0000, 0xFBC0,0xAE01,0x0000, 0xFBC0,0xAE02,0x0000, 0xFBC0,0xAE03,0x0000, 0xFBC0,0xAE04,0x0000, 0xFBC0,0xAE05,0x0000, 0xFBC0,0xAE06,0x0000, 0xFBC0,0xAE07,0x0000, 0xFBC0,0xAE08,0x0000, @@ -4380,7 +4385,7 @@ uint16 page02Edata[]= { /* 2E00 (3 weights per char) */ 0xFBC0,0xAEFC,0x0000, 0xFBC0,0xAEFD,0x0000, 0xFBC0,0xAEFE,0x0000, 0xFBC0,0xAEFF,0x0000 }; -uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */ +static const uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */ 0xFB40,0xCE00,0x0000, 0xFB40,0xCE28,0x0000, 0xFB40,0xCE36,0x0000, 0xFB40,0xCE3F,0x0000, 0xFB40,0xCE59,0x0000, 0xFB40,0xCE85,0x0000, 0xFB40,0xCE8C,0x0000, 0xFB40,0xCEA0,0x0000, 0xFB40,0xCEBA,0x0000, @@ -4468,7 +4473,7 @@ uint16 page02Fdata[]= { /* 2F00 (3 weights per char) */ 0xFBC0,0xAFFC,0x0000, 0xFBC0,0xAFFD,0x0000, 0xFBC0,0xAFFE,0x0000, 0xFBC0,0xAFFF,0x0000 }; -uint16 page030data[]= { /* 3000 (3 weights per char) */ +static const uint16 page030data[]= { /* 3000 (3 weights per char) */ 0x0209,0x0000,0x0000, 0x0237,0x0000,0x0000, 0x0266,0x0000,0x0000, 0x02E2,0x0000,0x0000, 0x0DBB,0x0000,0x0000, 0x0E05,0x0000,0x0000, 0x1E5D,0x1E73,0x0000, 0x0E29,0x0000,0x0000, 0x02AE,0x0000,0x0000, @@ -4556,7 +4561,7 @@ uint16 page030data[]= { /* 3000 (3 weights per char) */ 0x0E0B,0x0000,0x0000, 0x0E0C,0x0000,0x0000, 0x0E0C,0x0000,0x0000, 0x1E5B,0x1E65,0x0000 }; -uint16 page031data[]= { /* 3100 (3 weights per char) */ +static const uint16 page031data[]= { /* 3100 (3 weights per char) */ 0xFBC0,0xB100,0x0000, 0xFBC0,0xB101,0x0000, 0xFBC0,0xB102,0x0000, 0xFBC0,0xB103,0x0000, 0xFBC0,0xB104,0x0000, 0x1E82,0x0000,0x0000, 0x1E83,0x0000,0x0000, 0x1E84,0x0000,0x0000, 0x1E85,0x0000,0x0000, @@ -4644,7 +4649,7 @@ uint16 page031data[]= { /* 3100 (3 weights per char) */ 0x1E79,0x0000,0x0000, 0x1E7A,0x0000,0x0000, 0x1E7B,0x0000,0x0000, 0x1E7C,0x0000,0x0000 }; -uint16 page032data[]= { /* 3200 (8 weights per char) */ +static const uint16 page032data[]= { /* 3200 (8 weights per char) */ 0x0288,0x1D62,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0288,0x1D64,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0288,0x1D65,0x0289,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -4903,7 +4908,7 @@ uint16 page032data[]= { /* 3200 (8 weights per char) */ 0xFBC0,0xB2FF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -uint16 page033data[]= { /* 3300 (9 weights per char) */ +static const uint16 page033data[]= { /* 3300 (9 weights per char) */ 0x1E52,0x1E6B,0x0E0B,0x1E65,0x0000,0x0000,0x0000,0x0000,0x0000, 0x1E52,0x1E7A,0x1E6D,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000, 0x1E52,0x1E81,0x1E6E,0x1E52,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -5162,7 +5167,7 @@ uint16 page033data[]= { /* 3300 (9 weights per char) */ 0x0EC1,0x0E33,0x0F2E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */ +static const uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */ 0xFB80,0xCD00,0x0000, 0xFB80,0xCD01,0x0000, 0xFB80,0xCD02,0x0000, 0xFB80,0xCD03,0x0000, 0xFB80,0xCD04,0x0000, 0xFB80,0xCD05,0x0000, 0xFB80,0xCD06,0x0000, 0xFB80,0xCD07,0x0000, 0xFB80,0xCD08,0x0000, @@ -5250,7 +5255,7 @@ uint16 page04Ddata[]= { /* 4D00 (3 weights per char) */ 0x0B73,0x0000,0x0000, 0x0B74,0x0000,0x0000, 0x0B75,0x0000,0x0000, 0x0B76,0x0000,0x0000 }; -uint16 page0A0data[]= { /* A000 (2 weights per char) */ +static const uint16 page0A0data[]= { /* A000 (2 weights per char) */ 0x1EB1,0x0000, 0x1EB2,0x0000, 0x1EB3,0x0000, 0x1EB4,0x0000, 0x1EB5,0x0000, 0x1EB6,0x0000, 0x1EB7,0x0000, 0x1EB8,0x0000, 0x1EB9,0x0000, 0x1EBA,0x0000, 0x1EBB,0x0000, 0x1EBC,0x0000, @@ -5317,7 +5322,7 @@ uint16 page0A0data[]= { /* A000 (2 weights per char) */ 0x1FAD,0x0000, 0x1FAE,0x0000, 0x1FAF,0x0000, 0x1FB0,0x0000 }; -uint16 page0A1data[]= { /* A100 (2 weights per char) */ +static const uint16 page0A1data[]= { /* A100 (2 weights per char) */ 0x1FB1,0x0000, 0x1FB2,0x0000, 0x1FB3,0x0000, 0x1FB4,0x0000, 0x1FB5,0x0000, 0x1FB6,0x0000, 0x1FB7,0x0000, 0x1FB8,0x0000, 0x1FB9,0x0000, 0x1FBA,0x0000, 0x1FBB,0x0000, 0x1FBC,0x0000, @@ -5384,7 +5389,7 @@ uint16 page0A1data[]= { /* A100 (2 weights per char) */ 0x20AD,0x0000, 0x20AE,0x0000, 0x20AF,0x0000, 0x20B0,0x0000 }; -uint16 page0A2data[]= { /* A200 (2 weights per char) */ +static const uint16 page0A2data[]= { /* A200 (2 weights per char) */ 0x20B1,0x0000, 0x20B2,0x0000, 0x20B3,0x0000, 0x20B4,0x0000, 0x20B5,0x0000, 0x20B6,0x0000, 0x20B7,0x0000, 0x20B8,0x0000, 0x20B9,0x0000, 0x20BA,0x0000, 0x20BB,0x0000, 0x20BC,0x0000, @@ -5451,7 +5456,7 @@ uint16 page0A2data[]= { /* A200 (2 weights per char) */ 0x21AD,0x0000, 0x21AE,0x0000, 0x21AF,0x0000, 0x21B0,0x0000 }; -uint16 page0A3data[]= { /* A300 (2 weights per char) */ +static const uint16 page0A3data[]= { /* A300 (2 weights per char) */ 0x21B1,0x0000, 0x21B2,0x0000, 0x21B3,0x0000, 0x21B4,0x0000, 0x21B5,0x0000, 0x21B6,0x0000, 0x21B7,0x0000, 0x21B8,0x0000, 0x21B9,0x0000, 0x21BA,0x0000, 0x21BB,0x0000, 0x21BC,0x0000, @@ -5518,7 +5523,7 @@ uint16 page0A3data[]= { /* A300 (2 weights per char) */ 0x22AD,0x0000, 0x22AE,0x0000, 0x22AF,0x0000, 0x22B0,0x0000 }; -uint16 page0A4data[]= { /* A400 (3 weights per char) */ +static const uint16 page0A4data[]= { /* A400 (3 weights per char) */ 0x22B1,0x0000,0x0000, 0x22B2,0x0000,0x0000, 0x22B3,0x0000,0x0000, 0x22B4,0x0000,0x0000, 0x22B5,0x0000,0x0000, 0x22B6,0x0000,0x0000, 0x22B7,0x0000,0x0000, 0x22B8,0x0000,0x0000, 0x22B9,0x0000,0x0000, @@ -5606,7 +5611,7 @@ uint16 page0A4data[]= { /* A400 (3 weights per char) */ 0xFBC1,0xA4FC,0x0000, 0xFBC1,0xA4FD,0x0000, 0xFBC1,0xA4FE,0x0000, 0xFBC1,0xA4FF,0x0000 }; -uint16 page0F9data[]= { /* F900 (3 weights per char) */ +static const uint16 page0F9data[]= { /* F900 (3 weights per char) */ 0xFB41,0x8C48,0x0000, 0xFB40,0xE6F4,0x0000, 0xFB41,0x8ECA,0x0000, 0xFB41,0x8CC8,0x0000, 0xFB40,0xEED1,0x0000, 0xFB40,0xCE32,0x0000, 0xFB40,0xD3E5,0x0000, 0xFB41,0x9F9C,0x0000, 0xFB41,0x9F9C,0x0000, @@ -5694,7 +5699,7 @@ uint16 page0F9data[]= { /* F900 (3 weights per char) */ 0xFB41,0x8B58,0x0000, 0xFB40,0xCEC0,0x0000, 0xFB41,0x8336,0x0000, 0xFB40,0xD23A,0x0000 }; -uint16 page0FAdata[]= { /* FA00 (3 weights per char) */ +static const uint16 page0FAdata[]= { /* FA00 (3 weights per char) */ 0xFB40,0xD207,0x0000, 0xFB40,0xDEA6,0x0000, 0xFB40,0xE2D3,0x0000, 0xFB40,0xFCD6,0x0000, 0xFB40,0xDB85,0x0000, 0xFB40,0xED1E,0x0000, 0xFB40,0xE6B4,0x0000, 0xFB41,0x8F3B,0x0000, 0xFB41,0x884C,0x0000, @@ -5782,7 +5787,7 @@ uint16 page0FAdata[]= { /* FA00 (3 weights per char) */ 0xFBC1,0xFAFC,0x0000, 0xFBC1,0xFAFD,0x0000, 0xFBC1,0xFAFE,0x0000, 0xFBC1,0xFAFF,0x0000 }; -uint16 page0FBdata[]= { /* FB00 (4 weights per char) */ +static const uint16 page0FBdata[]= { /* FB00 (4 weights per char) */ 0x0EB9,0x0EB9,0x0000,0x0000, 0x0EB9,0x0EFB,0x0000,0x0000, 0x0EB9,0x0F2E,0x0000,0x0000, 0x0EB9,0x0EB9,0x0EFB,0x0000, 0x0EB9,0x0EB9,0x0F2E,0x0000, 0x0FEA,0x1002,0x0000,0x0000, @@ -5913,7 +5918,7 @@ uint16 page0FBdata[]= { /* FB00 (4 weights per char) */ 0x13C9,0x0000,0x0000,0x0000, 0x13C9,0x0000,0x0000,0x0000 }; -uint16 page0FCdata[]= { /* FC00 (3 weights per char) */ +static const uint16 page0FCdata[]= { /* FC00 (3 weights per char) */ 0x134F,0x135E,0x0000, 0x134F,0x1364,0x0000, 0x134F,0x13B0,0x0000, 0x134F,0x13C7,0x0000, 0x134F,0x13C8,0x0000, 0x1352,0x135E,0x0000, 0x1352,0x1364,0x0000, 0x1352,0x1365,0x0000, 0x1352,0x13B0,0x0000, @@ -6001,7 +6006,7 @@ uint16 page0FCdata[]= { /* FC00 (3 weights per char) */ 0x1381,0x13C8,0x0000, 0x1382,0x13C7,0x0000, 0x1382,0x13C8,0x0000, 0x1364,0x13C7,0x0000 }; -uint16 page0FDdata[]= { /* FD00 (9 weights per char) */ +static const uint16 page0FDdata[]= { /* FD00 (9 weights per char) */ 0x1364,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x135E,0x13C7,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x135E,0x13C8,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -6260,7 +6265,7 @@ uint16 page0FDdata[]= { /* FD00 (9 weights per char) */ 0xFBC1,0xFDFF,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000 }; -uint16 page0FEdata[]= { /* FE00 (3 weights per char) */ +static const uint16 page0FEdata[]= { /* FE00 (3 weights per char) */ 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000, @@ -6348,7 +6353,7 @@ uint16 page0FEdata[]= { /* FE00 (3 weights per char) */ 0x13AB,0x1350,0x0000, 0xFBC1,0xFEFD,0x0000, 0xFBC1,0xFEFE,0x0000, 0x0000,0x0000,0x0000 }; -uint16 page0FFdata[]= { /* FF00 (3 weights per char) */ +static const uint16 page0FFdata[]= { /* FF00 (3 weights per char) */ 0xFBC1,0xFF00,0x0000, 0x0251,0x0000,0x0000, 0x027E,0x0000,0x0000, 0x02D2,0x0000,0x0000, 0x0E0F,0x0000,0x0000, 0x02D3,0x0000,0x0000, 0x02CF,0x0000,0x0000, 0x0277,0x0000,0x0000, 0x0288,0x0000,0x0000, @@ -6436,7 +6441,7 @@ uint16 page0FFdata[]= { /* FF00 (3 weights per char) */ 0x0DC5,0x0000,0x0000, 0x0DC6,0x0000,0x0000, 0xFBC1,0xFFFE,0x0000, 0xFBC1,0xFFFF,0x0000 }; -uchar uca_length[256]={ +static const uchar uca_length[256]={ 4,3,3,4,3,3,3,3,0,3,3,3,3,3,3,3, 3,3,3,3,3,2,3,3,3,3,0,0,0,3,3,3, 5,5,4,3,5,2,3,3,2,2,5,3,0,0,3,3, @@ -6454,7 +6459,8 @@ uchar uca_length[256]={ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,3,3,4,3,9,3,3 }; -uint16 *uca_weight[256]={ + +static const uint16 *const uca_weight[256]={ page000data,page001data,page002data,page003data, page004data,page005data,page006data,page007data, NULL ,page009data,page00Adata,page00Bdata, @@ -6741,6 +6747,16 @@ static const char sinhala[]= #endif +static const char croatian[]= + +"&C < \\u010D <<< \\u010C < \\u0107 <<< \\u0106 " +"&D < d\\u017E <<< \\u01C6 <<< D\\u017E <<< \\u01C5 <<< D\\u017D <<< \\u01C4 " +" < \\u0111 <<< \\u0110 " +"&L < lj <<< \\u01C9 <<< Lj <<< \\u01C8 <<< LJ <<< \\u01C7 " +"&N < nj <<< \\u01CC <<< Nj <<< \\u01CB <<< NJ <<< \\u01CA " +"&S < \\u0161 <<< \\u0160 " +"&Z < \\u017E <<< \\u017D"; + /* Unicode Collation Algorithm: Collation element (weight) scanner, @@ -6752,9 +6768,9 @@ typedef struct my_uca_scanner_st const uint16 *wbeg; /* Beginning of the current weight string */ const uchar *sbeg; /* Beginning of the input string */ const uchar *send; /* End of the input string */ - uchar *uca_length; - uint16 **uca_weight; - uint16 *contractions; + const uchar *uca_length; + const uint16 * const *uca_weight; + const MY_CONTRACTIONS *contractions; uint16 implicit[2]; int page; int code; @@ -6772,7 +6788,80 @@ typedef struct my_uca_scanner_handler_st int (*next)(my_uca_scanner *scanner); } my_uca_scanner_handler; -static uint16 nochar[]= {0,0}; +static const uint16 nochar[]= {0,0}; + +/********** Helper functions to handle contraction ************/ + + +/** + Mark a character as a contraction part + + @cs Pointer to CHARSET_INFO data + @wc Unicode code point + @flag flag: "is contraction head", "is contraction tail" +*/ + +static void +my_uca_add_contraction_flag(CHARSET_INFO *cs, my_wc_t wc, int flag) +{ + cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK]|= flag; +} + + +/** + Add a new contraction into contraction list + + @cs Pointer to CHARSET_INFO data + @wc Unicode code points of the characters + @len Number of characters + + @return New contraction + @retval Pointer to a newly added contraction +*/ + +static MY_CONTRACTION * +my_uca_add_contraction(struct charset_info_st *cs, + my_wc_t *wc, int len __attribute__((unused))) +{ + MY_CONTRACTIONS *list= (MY_CONTRACTIONS*) cs->contractions; + MY_CONTRACTION *next= &list->item[list->nitems]; + DBUG_ASSERT(len == 2); /* We currently support only contraction2 */ + next->ch[0]= wc[0]; + next->ch[1]= wc[1]; + list->nitems++; + return next; +} + + +/** + Allocate and initialize memory for contraction list and flags + + @cs Pointer to CHARSET_INFO data + @alloc Memory allocation function (typically points to my_alloc_once) + @n Number of contractions + + @return Error code + @retval 0 - memory allocated successfully + @retval 1 - not enough memory +*/ + +static my_bool +my_uca_alloc_contractions(struct charset_info_st *cs, + void *(*alloc)(size_t), size_t n) +{ + uint size= n * sizeof(MY_CONTRACTION); + MY_CONTRACTIONS *contractions; + + if (!(cs->contractions= contractions= (*alloc)(sizeof(MY_CONTRACTIONS)))) + return 1; + bzero(contractions, sizeof(MY_CONTRACTIONS)); + if (!(contractions->item= (*alloc)(size)) || + !(contractions->flags= (char*) (*alloc)(MY_UCA_CNT_FLAG_SIZE))) + return 1; + bzero(contractions->item, size); + bzero(contractions->flags, MY_UCA_CNT_FLAG_SIZE); + return 0; +} #ifdef HAVE_CHARSET_ucs2 @@ -6794,7 +6883,7 @@ static uint16 nochar[]= {0,0}; */ static void my_uca_scanner_init_ucs2(my_uca_scanner *scanner, - CHARSET_INFO *cs __attribute__((unused)), + CHARSET_INFO *cs, const uchar *str, size_t length) { scanner->wbeg= nochar; @@ -6805,6 +6894,7 @@ static void my_uca_scanner_init_ucs2(my_uca_scanner *scanner, scanner->uca_length= cs->sort_order; scanner->uca_weight= cs->sort_order_big; scanner->contractions= cs->contractions; + scanner->cs= cs; return; } @@ -6881,8 +6971,8 @@ static int my_uca_scanner_next_ucs2(my_uca_scanner *scanner) do { - uint16 **ucaw= scanner->uca_weight; - uchar *ucal= scanner->uca_length; + const uint16 *const *ucaw= scanner->uca_weight; + const uchar *ucal= scanner->uca_length; if (scanner->sbeg > scanner->send) return -1; @@ -6893,18 +6983,23 @@ static int my_uca_scanner_next_ucs2(my_uca_scanner *scanner) if (scanner->contractions && (scanner->sbeg <= scanner->send)) { - int cweight; + my_wc_t wc1= ((scanner->page << 8) | scanner->code); - if (!scanner->page && !scanner->sbeg[0] && - (scanner->sbeg[1] > 0x40) && (scanner->sbeg[1] < 0x80) && - (scanner->code > 0x40) && (scanner->code < 0x80) && - (cweight= scanner->contractions[(scanner->code-0x40)*0x40+scanner->sbeg[1]-0x40])) + if (my_uca_can_be_contraction_head(scanner->cs, wc1)) + { + const uint16 *cweight; + my_wc_t wc2= (((my_wc_t) scanner->sbeg[0]) << 8) | scanner->sbeg[1]; + if (my_uca_can_be_contraction_tail(scanner->cs, wc2) && + (cweight= my_uca_contraction2_weight(scanner->cs, + scanner->code, + scanner->sbeg[1]))) { scanner->implicit[0]= 0; scanner->wbeg= scanner->implicit; scanner->sbeg+=2; - return cweight; + return *cweight; } + } } if (!ucaw[scanner->page]) @@ -6939,7 +7034,7 @@ static my_uca_scanner_handler my_ucs2_uca_scanner_handler= my_uca_scanner_next_ucs2 }; -#endif +#endif /* HAVE_CHARSET_ucs2 */ /* @@ -6973,8 +7068,8 @@ static int my_uca_scanner_next_any(my_uca_scanner *scanner) do { - uint16 **ucaw= scanner->uca_weight; - uchar *ucal= scanner->uca_length; + const uint16 *const *ucaw= scanner->uca_weight; + const uchar *ucal= scanner->uca_length; my_wc_t wc; int mb_len; @@ -6996,23 +7091,22 @@ static int my_uca_scanner_next_any(my_uca_scanner *scanner) scanner->code= wc & 0xFF; } - if (scanner->contractions && !scanner->page && - (scanner->code > 0x40) && (scanner->code < 0x80)) + if (my_uca_have_contractions(scanner->cs) && + my_uca_can_be_contraction_head(scanner->cs, wc)) { - uint page1, code1, cweight; + my_wc_t wc2; + const uint16 *cweight; - if (((mb_len= scanner->cs->cset->mb_wc(scanner->cs, &wc, + if (((mb_len= scanner->cs->cset->mb_wc(scanner->cs, &wc2, scanner->sbeg, scanner->send)) >=0) && - (!(page1= (wc >> 8))) && - ((code1= (wc & 0xFF)) > 0x40) && - (code1 < 0x80) && - (cweight= scanner->contractions[(scanner->code-0x40)*0x40 + code1-0x40])) + my_uca_can_be_contraction_tail(scanner->cs, wc2) && + (cweight= my_uca_contraction2_weight(scanner->cs, wc, wc2))) { scanner->implicit[0]= 0; scanner->wbeg= scanner->implicit; scanner->sbeg+= mb_len; - return cweight; + return *cweight; } } @@ -7049,6 +7143,33 @@ static my_uca_scanner_handler my_any_uca_scanner_handler= my_uca_scanner_next_any }; + + +/** + Helper function: + Find address of weights of the given character. + + @weights UCA weight array + @lengths UCA length array + @ch character Unicode code point + + @return Weight array + @retval pointer to weight array for the given character, + or NULL if this page does not have implicit weights. +*/ + +static inline const uint16 * +my_char_weight_addr(CHARSET_INFO *cs, uint wc) +{ + uint page= (wc >> 8); + uint ofst= wc & 0xFF; + return (cs->sort_order_big[page] ? + cs->sort_order_big[page] + ofst * cs->sort_order[page] : + 0); +} + + + /* Compares two strings according to the collation @@ -7334,12 +7455,12 @@ static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { size_t page1= wc1 >> MY_UCA_PSHIFT; size_t page2= wc2 >> MY_UCA_PSHIFT; - uchar *ucal= cs->sort_order; - uint16 **ucaw= cs->sort_order_big; + const uchar *ucal= cs->sort_order; + const uint16 *const *ucaw= cs->sort_order_big; size_t length1= ucal[page1]; size_t length2= ucal[page2]; - uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1]; - uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2]; + const uint16 *weight1= ucaw[page1] + (wc1 & MY_UCA_CMASK) * ucal[page1]; + const uint16 *weight2= ucaw[page2] + (wc2 & MY_UCA_CMASK) * ucal[page2]; if (!weight1 || !weight2) return wc1 != wc2; @@ -7371,9 +7492,7 @@ int my_wildcmp_uca(CHARSET_INFO *cs, int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; int scan; - int (*mb_wc)(struct charset_info_st *, my_wc_t *, - const uchar *, const uchar *); - mb_wc= cs->cset->mb_wc; + my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; while (wildstr != wildend) { @@ -7727,8 +7846,8 @@ ex: typedef struct my_coll_rule_item_st { - uint base; /* Base character */ - uint curr[2]; /* Current character */ + my_wc_t base; /* Base character */ + my_wc_t curr[2]; /* Current character */ int diff[3]; /* Primary, Secondary and Tertiary difference */ } MY_COLL_RULE; @@ -7879,14 +7998,16 @@ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems, default weights. */ -static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) +static my_bool create_tailoring(struct charset_info_st *cs, + void *(*alloc)(size_t)) { MY_COLL_RULE rule[MY_MAX_COLL_RULE]; + MY_COLL_RULE *r, *rfirst, *rlast; char errstr[128]; uchar *newlengths; uint16 **newweights; const uchar *deflengths= uca_length; - uint16 **defweights= uca_weight; + const uint16 *const *defweights= uca_weight; int rc, i; int ncontractions= 0; @@ -7906,6 +8027,9 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) return 1; } + rfirst= rule; + rlast= rule + rc; + if (!cs->caseinfo) cs->caseinfo= my_unicase_default; @@ -7979,54 +8103,31 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) for (i= 0; i < 256 ; i++) { if (!newweights[i]) - newweights[i]= defweights[i]; + ((const uint16**) newweights)[i]= defweights[i]; } cs->sort_order= newlengths; - cs->sort_order_big= newweights; + cs->sort_order_big= (const uint16**) newweights; cs->contractions= NULL; /* Now process contractions */ if (ncontractions) { - /* - 8K for weights for basic latin letter pairs, - plus 256 bytes for "is contraction part" flags. - */ - uint size= 0x40*0x40*sizeof(uint16) + 256; - char *contraction_flags; - if (!(cs->contractions= (uint16*) (*alloc)(size))) - return 1; - bzero((void*)cs->contractions, size); - contraction_flags= ((char*) cs->contractions) + 0x40*0x40; - for (i=0; i < rc; i++) + if (my_uca_alloc_contractions(cs, alloc, ncontractions)) + return 1; + for (r= rfirst; r < rlast; r++) { - if (rule[i].curr[1]) + uint16 *to; + if (r->curr[1]) /* Contraction */ { - uint pageb= (rule[i].base >> 8) & 0xFF; - uint chb= rule[i].base & 0xFF; - uint16 *offsb= defweights[pageb] + chb*deflengths[pageb]; - uint offsc; - - if (offsb[1] || - rule[i].curr[0] < 0x40 || rule[i].curr[0] > 0x7f || - rule[i].curr[1] < 0x40 || rule[i].curr[1] > 0x7f) - { - /* - TODO: add error reporting; - We support only basic latin letters contractions at this point. - Also, We don't support contractions with weight longer than one. - Otherwise, we'd need much more memory. - */ - return 1; - } - offsc= (rule[i].curr[0]-0x40)*0x40+(rule[i].curr[1]-0x40); - - /* Copy base weight applying primary difference */ - cs->contractions[offsc]= offsb[0] + rule[i].diff[0]; - /* Mark both letters as "is contraction part */ - contraction_flags[rule[i].curr[0]]= 1; - contraction_flags[rule[i].curr[1]]= 1; + /* Mark both letters as "is contraction part" */ + my_uca_add_contraction_flag(cs, r->curr[0], MY_UCA_CNT_HEAD); + my_uca_add_contraction_flag(cs, r->curr[1], MY_UCA_CNT_TAIL); + to= my_uca_add_contraction(cs, r->curr, 2)->weight; + /* Copy weight from the reset character */ + to[0]= my_char_weight_addr(cs, r->base)[0]; + /* Apply primary difference */ + to[0]+= r->diff[0]; } } } @@ -8040,7 +8141,8 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t)) Should work for any character set. */ -static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(size_t)) +static my_bool my_coll_init_uca(struct charset_info_st *cs, + void *(*alloc)(size_t)) { cs->pad_char= ' '; cs->ctype= my_charset_utf8_unicode_ci.ctype; @@ -8135,7 +8237,7 @@ MY_COLLATION_HANDLER my_collation_ucs2_uca_handler = my_propagate_complex }; -CHARSET_INFO my_charset_ucs2_unicode_ci= +struct charset_info_st my_charset_ucs2_unicode_ci= { 128,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8167,7 +8269,7 @@ CHARSET_INFO my_charset_ucs2_unicode_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= +struct charset_info_st my_charset_ucs2_icelandic_uca_ci= { 129,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8199,7 +8301,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_latvian_uca_ci= +struct charset_info_st my_charset_ucs2_latvian_uca_ci= { 130,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8231,7 +8333,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_romanian_uca_ci= +struct charset_info_st my_charset_ucs2_romanian_uca_ci= { 131,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8263,7 +8365,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= +struct charset_info_st my_charset_ucs2_slovenian_uca_ci= { 132,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8295,7 +8397,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_polish_uca_ci= +struct charset_info_st my_charset_ucs2_polish_uca_ci= { 133,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8327,7 +8429,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_estonian_uca_ci= +struct charset_info_st my_charset_ucs2_estonian_uca_ci= { 134,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8359,7 +8461,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_spanish_uca_ci= +struct charset_info_st my_charset_ucs2_spanish_uca_ci= { 135,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8391,7 +8493,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_swedish_uca_ci= +struct charset_info_st my_charset_ucs2_swedish_uca_ci= { 136,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8423,7 +8525,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_turkish_uca_ci= +struct charset_info_st my_charset_ucs2_turkish_uca_ci= { 137,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8455,7 +8557,7 @@ CHARSET_INFO my_charset_ucs2_turkish_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_czech_uca_ci= +struct charset_info_st my_charset_ucs2_czech_uca_ci= { 138,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8488,7 +8590,7 @@ CHARSET_INFO my_charset_ucs2_czech_uca_ci= }; -CHARSET_INFO my_charset_ucs2_danish_uca_ci= +struct charset_info_st my_charset_ucs2_danish_uca_ci= { 139,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8520,7 +8622,7 @@ CHARSET_INFO my_charset_ucs2_danish_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci= +struct charset_info_st my_charset_ucs2_lithuanian_uca_ci= { 140,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8552,7 +8654,7 @@ CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_slovak_uca_ci= +struct charset_info_st my_charset_ucs2_slovak_uca_ci= { 141,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8584,7 +8686,7 @@ CHARSET_INFO my_charset_ucs2_slovak_uca_ci= &my_collation_ucs2_uca_handler }; -CHARSET_INFO my_charset_ucs2_spanish2_uca_ci= +struct charset_info_st my_charset_ucs2_spanish2_uca_ci= { 142,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8617,7 +8719,7 @@ CHARSET_INFO my_charset_ucs2_spanish2_uca_ci= }; -CHARSET_INFO my_charset_ucs2_roman_uca_ci= +struct charset_info_st my_charset_ucs2_roman_uca_ci= { 143,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8650,7 +8752,7 @@ CHARSET_INFO my_charset_ucs2_roman_uca_ci= }; -CHARSET_INFO my_charset_ucs2_persian_uca_ci= +struct charset_info_st my_charset_ucs2_persian_uca_ci= { 144,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8683,7 +8785,7 @@ CHARSET_INFO my_charset_ucs2_persian_uca_ci= }; -CHARSET_INFO my_charset_ucs2_esperanto_uca_ci= +struct charset_info_st my_charset_ucs2_esperanto_uca_ci= { 145,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8716,7 +8818,7 @@ CHARSET_INFO my_charset_ucs2_esperanto_uca_ci= }; -CHARSET_INFO my_charset_ucs2_hungarian_uca_ci= +struct charset_info_st my_charset_ucs2_hungarian_uca_ci= { 146,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8748,8 +8850,7 @@ CHARSET_INFO my_charset_ucs2_hungarian_uca_ci= &my_collation_ucs2_uca_handler }; - -CHARSET_INFO my_charset_ucs2_sinhala_uca_ci= +struct charset_info_st my_charset_ucs2_sinhala_uca_ci= { 147,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, @@ -8781,6 +8882,37 @@ CHARSET_INFO my_charset_ucs2_sinhala_uca_ci= &my_collation_ucs2_uca_handler }; +struct charset_info_st my_charset_ucs2_croatian_uca_ci= +{ + 149,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_croatian_ci", /* name */ + "", /* comment */ + croatian, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + my_unicase_default, /* caseinfo */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 1, /* caseup_multiply */ + 1, /* casedn_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; #endif @@ -8829,7 +8961,7 @@ static uchar ctype_utf8[] = { extern MY_CHARSET_HANDLER my_charset_utf8_handler; -CHARSET_INFO my_charset_utf8_unicode_ci= +struct charset_info_st my_charset_utf8_unicode_ci= { 192,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8862,7 +8994,7 @@ CHARSET_INFO my_charset_utf8_unicode_ci= }; -CHARSET_INFO my_charset_utf8_icelandic_uca_ci= +struct charset_info_st my_charset_utf8_icelandic_uca_ci= { 193,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8894,7 +9026,7 @@ CHARSET_INFO my_charset_utf8_icelandic_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_latvian_uca_ci= +struct charset_info_st my_charset_utf8_latvian_uca_ci= { 194,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8926,7 +9058,7 @@ CHARSET_INFO my_charset_utf8_latvian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_romanian_uca_ci= +struct charset_info_st my_charset_utf8_romanian_uca_ci= { 195,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8958,7 +9090,7 @@ CHARSET_INFO my_charset_utf8_romanian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_slovenian_uca_ci= +struct charset_info_st my_charset_utf8_slovenian_uca_ci= { 196,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -8990,7 +9122,7 @@ CHARSET_INFO my_charset_utf8_slovenian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_polish_uca_ci= +struct charset_info_st my_charset_utf8_polish_uca_ci= { 197,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9022,7 +9154,7 @@ CHARSET_INFO my_charset_utf8_polish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_estonian_uca_ci= +struct charset_info_st my_charset_utf8_estonian_uca_ci= { 198,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9054,7 +9186,7 @@ CHARSET_INFO my_charset_utf8_estonian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_spanish_uca_ci= +struct charset_info_st my_charset_utf8_spanish_uca_ci= { 199,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9086,7 +9218,7 @@ CHARSET_INFO my_charset_utf8_spanish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_swedish_uca_ci= +struct charset_info_st my_charset_utf8_swedish_uca_ci= { 200,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9118,7 +9250,7 @@ CHARSET_INFO my_charset_utf8_swedish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_turkish_uca_ci= +struct charset_info_st my_charset_utf8_turkish_uca_ci= { 201,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9150,7 +9282,7 @@ CHARSET_INFO my_charset_utf8_turkish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_czech_uca_ci= +struct charset_info_st my_charset_utf8_czech_uca_ci= { 202,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9183,7 +9315,7 @@ CHARSET_INFO my_charset_utf8_czech_uca_ci= }; -CHARSET_INFO my_charset_utf8_danish_uca_ci= +struct charset_info_st my_charset_utf8_danish_uca_ci= { 203,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9215,7 +9347,7 @@ CHARSET_INFO my_charset_utf8_danish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_lithuanian_uca_ci= +struct charset_info_st my_charset_utf8_lithuanian_uca_ci= { 204,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9247,7 +9379,7 @@ CHARSET_INFO my_charset_utf8_lithuanian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_slovak_uca_ci= +struct charset_info_st my_charset_utf8_slovak_uca_ci= { 205,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9279,7 +9411,7 @@ CHARSET_INFO my_charset_utf8_slovak_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_spanish2_uca_ci= +struct charset_info_st my_charset_utf8_spanish2_uca_ci= { 206,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9311,7 +9443,7 @@ CHARSET_INFO my_charset_utf8_spanish2_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_roman_uca_ci= +struct charset_info_st my_charset_utf8_roman_uca_ci= { 207,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9343,7 +9475,7 @@ CHARSET_INFO my_charset_utf8_roman_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_persian_uca_ci= +struct charset_info_st my_charset_utf8_persian_uca_ci= { 208,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9375,7 +9507,7 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_esperanto_uca_ci= +struct charset_info_st my_charset_utf8_esperanto_uca_ci= { 209,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9407,7 +9539,7 @@ CHARSET_INFO my_charset_utf8_esperanto_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_hungarian_uca_ci= +struct charset_info_st my_charset_utf8_hungarian_uca_ci= { 210,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -9439,7 +9571,7 @@ CHARSET_INFO my_charset_utf8_hungarian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8_sinhala_uca_ci= +struct charset_info_st my_charset_utf8_sinhala_uca_ci= { 211,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, @@ -9471,6 +9603,38 @@ CHARSET_INFO my_charset_utf8_sinhala_uca_ci= &my_collation_any_uca_handler }; +struct charset_info_st my_charset_utf8_croatian_uca_ci= +{ + 213,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_croatian_ci", /* name */ + "", /* comment */ + croatian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + my_unicase_default, /* caseinfo */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 1, /* caseup_multiply */ + 1, /* casedn_multiply */ + 1, /* mbminlen */ + 3, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + #endif /* HAVE_CHARSET_utf8 */ @@ -9480,7 +9644,7 @@ extern MY_CHARSET_HANDLER my_charset_utf8mb4_handler; #define MY_CS_UTF8MB4_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT) -CHARSET_INFO my_charset_utf8mb4_unicode_ci= +struct charset_info_st my_charset_utf8mb4_unicode_ci= { 224,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9513,7 +9677,7 @@ CHARSET_INFO my_charset_utf8mb4_unicode_ci= }; -CHARSET_INFO my_charset_utf8mb4_icelandic_uca_ci= +struct charset_info_st my_charset_utf8mb4_icelandic_uca_ci= { 225,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9545,7 +9709,7 @@ CHARSET_INFO my_charset_utf8mb4_icelandic_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_latvian_uca_ci= +struct charset_info_st my_charset_utf8mb4_latvian_uca_ci= { 226,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9577,7 +9741,7 @@ CHARSET_INFO my_charset_utf8mb4_latvian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_romanian_uca_ci= +struct charset_info_st my_charset_utf8mb4_romanian_uca_ci= { 227,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9609,7 +9773,7 @@ CHARSET_INFO my_charset_utf8mb4_romanian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_slovenian_uca_ci= +struct charset_info_st my_charset_utf8mb4_slovenian_uca_ci= { 228,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9641,7 +9805,7 @@ CHARSET_INFO my_charset_utf8mb4_slovenian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_polish_uca_ci= +struct charset_info_st my_charset_utf8mb4_polish_uca_ci= { 229,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9673,7 +9837,7 @@ CHARSET_INFO my_charset_utf8mb4_polish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_estonian_uca_ci= +struct charset_info_st my_charset_utf8mb4_estonian_uca_ci= { 230,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9705,7 +9869,7 @@ CHARSET_INFO my_charset_utf8mb4_estonian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_spanish_uca_ci= +struct charset_info_st my_charset_utf8mb4_spanish_uca_ci= { 231,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9737,7 +9901,7 @@ CHARSET_INFO my_charset_utf8mb4_spanish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_swedish_uca_ci= +struct charset_info_st my_charset_utf8mb4_swedish_uca_ci= { 232,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9769,7 +9933,7 @@ CHARSET_INFO my_charset_utf8mb4_swedish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_turkish_uca_ci= +struct charset_info_st my_charset_utf8mb4_turkish_uca_ci= { 233,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9801,7 +9965,7 @@ CHARSET_INFO my_charset_utf8mb4_turkish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_czech_uca_ci= +struct charset_info_st my_charset_utf8mb4_czech_uca_ci= { 234,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9834,7 +9998,7 @@ CHARSET_INFO my_charset_utf8mb4_czech_uca_ci= }; -CHARSET_INFO my_charset_utf8mb4_danish_uca_ci= +struct charset_info_st my_charset_utf8mb4_danish_uca_ci= { 235,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9866,7 +10030,7 @@ CHARSET_INFO my_charset_utf8mb4_danish_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_lithuanian_uca_ci= +struct charset_info_st my_charset_utf8mb4_lithuanian_uca_ci= { 236,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9898,7 +10062,7 @@ CHARSET_INFO my_charset_utf8mb4_lithuanian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_slovak_uca_ci= +struct charset_info_st my_charset_utf8mb4_slovak_uca_ci= { 237,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9930,7 +10094,7 @@ CHARSET_INFO my_charset_utf8mb4_slovak_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_spanish2_uca_ci= +struct charset_info_st my_charset_utf8mb4_spanish2_uca_ci= { 238,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9962,7 +10126,7 @@ CHARSET_INFO my_charset_utf8mb4_spanish2_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_roman_uca_ci= +struct charset_info_st my_charset_utf8mb4_roman_uca_ci= { 239,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -9994,7 +10158,7 @@ CHARSET_INFO my_charset_utf8mb4_roman_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_persian_uca_ci= +struct charset_info_st my_charset_utf8mb4_persian_uca_ci= { 240,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -10026,7 +10190,7 @@ CHARSET_INFO my_charset_utf8mb4_persian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_esperanto_uca_ci= +struct charset_info_st my_charset_utf8mb4_esperanto_uca_ci= { 241,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -10058,7 +10222,7 @@ CHARSET_INFO my_charset_utf8mb4_esperanto_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_hungarian_uca_ci= +struct charset_info_st my_charset_utf8mb4_hungarian_uca_ci= { 242,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -10090,7 +10254,7 @@ CHARSET_INFO my_charset_utf8mb4_hungarian_uca_ci= &my_collation_any_uca_handler }; -CHARSET_INFO my_charset_utf8mb4_sinhala_uca_ci= +struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci= { 243,0,0, /* number */ MY_CS_UTF8MB4_UCA_FLAGS,/* state */ @@ -10146,7 +10310,7 @@ extern MY_CHARSET_HANDLER my_charset_utf32_handler; #define MY_CS_UTF32_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII) -CHARSET_INFO my_charset_utf32_unicode_ci= +struct charset_info_st my_charset_utf32_unicode_ci= { 160,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10179,7 +10343,7 @@ CHARSET_INFO my_charset_utf32_unicode_ci= }; -CHARSET_INFO my_charset_utf32_icelandic_uca_ci= +struct charset_info_st my_charset_utf32_icelandic_uca_ci= { 161,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10211,7 +10375,7 @@ CHARSET_INFO my_charset_utf32_icelandic_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_latvian_uca_ci= +struct charset_info_st my_charset_utf32_latvian_uca_ci= { 162,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10243,7 +10407,7 @@ CHARSET_INFO my_charset_utf32_latvian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_romanian_uca_ci= +struct charset_info_st my_charset_utf32_romanian_uca_ci= { 163,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10275,7 +10439,7 @@ CHARSET_INFO my_charset_utf32_romanian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_slovenian_uca_ci= +struct charset_info_st my_charset_utf32_slovenian_uca_ci= { 164,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10307,7 +10471,7 @@ CHARSET_INFO my_charset_utf32_slovenian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_polish_uca_ci= +struct charset_info_st my_charset_utf32_polish_uca_ci= { 165,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10339,7 +10503,7 @@ CHARSET_INFO my_charset_utf32_polish_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_estonian_uca_ci= +struct charset_info_st my_charset_utf32_estonian_uca_ci= { 166,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10371,7 +10535,7 @@ CHARSET_INFO my_charset_utf32_estonian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_spanish_uca_ci= +struct charset_info_st my_charset_utf32_spanish_uca_ci= { 167,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10403,7 +10567,7 @@ CHARSET_INFO my_charset_utf32_spanish_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_swedish_uca_ci= +struct charset_info_st my_charset_utf32_swedish_uca_ci= { 168,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10435,7 +10599,7 @@ CHARSET_INFO my_charset_utf32_swedish_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_turkish_uca_ci= +struct charset_info_st my_charset_utf32_turkish_uca_ci= { 169,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10467,7 +10631,7 @@ CHARSET_INFO my_charset_utf32_turkish_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_czech_uca_ci= +struct charset_info_st my_charset_utf32_czech_uca_ci= { 170,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10500,7 +10664,7 @@ CHARSET_INFO my_charset_utf32_czech_uca_ci= }; -CHARSET_INFO my_charset_utf32_danish_uca_ci= +struct charset_info_st my_charset_utf32_danish_uca_ci= { 171,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10532,7 +10696,7 @@ CHARSET_INFO my_charset_utf32_danish_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_lithuanian_uca_ci= +struct charset_info_st my_charset_utf32_lithuanian_uca_ci= { 172,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10564,7 +10728,7 @@ CHARSET_INFO my_charset_utf32_lithuanian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_slovak_uca_ci= +struct charset_info_st my_charset_utf32_slovak_uca_ci= { 173,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10596,7 +10760,7 @@ CHARSET_INFO my_charset_utf32_slovak_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_spanish2_uca_ci= +struct charset_info_st my_charset_utf32_spanish2_uca_ci= { 174,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10628,7 +10792,7 @@ CHARSET_INFO my_charset_utf32_spanish2_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_roman_uca_ci= +struct charset_info_st my_charset_utf32_roman_uca_ci= { 175,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10660,7 +10824,7 @@ CHARSET_INFO my_charset_utf32_roman_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_persian_uca_ci= +struct charset_info_st my_charset_utf32_persian_uca_ci= { 176,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10692,7 +10856,7 @@ CHARSET_INFO my_charset_utf32_persian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_esperanto_uca_ci= +struct charset_info_st my_charset_utf32_esperanto_uca_ci= { 177,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10724,7 +10888,7 @@ CHARSET_INFO my_charset_utf32_esperanto_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_hungarian_uca_ci= +struct charset_info_st my_charset_utf32_hungarian_uca_ci= { 178,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10756,7 +10920,7 @@ CHARSET_INFO my_charset_utf32_hungarian_uca_ci= &my_collation_utf32_uca_handler }; -CHARSET_INFO my_charset_utf32_sinhala_uca_ci= +struct charset_info_st my_charset_utf32_sinhala_uca_ci= { 179,0,0, /* number */ MY_CS_UTF32_UCA_FLAGS,/* state */ @@ -10813,7 +10977,7 @@ extern MY_CHARSET_HANDLER my_charset_utf16_handler; #define MY_CS_UTF16_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII) -CHARSET_INFO my_charset_utf16_unicode_ci= +struct charset_info_st my_charset_utf16_unicode_ci= { 101,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -10846,7 +11010,7 @@ CHARSET_INFO my_charset_utf16_unicode_ci= }; -CHARSET_INFO my_charset_utf16_icelandic_uca_ci= +struct charset_info_st my_charset_utf16_icelandic_uca_ci= { 102,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -10878,7 +11042,7 @@ CHARSET_INFO my_charset_utf16_icelandic_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_latvian_uca_ci= +struct charset_info_st my_charset_utf16_latvian_uca_ci= { 103,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -10910,7 +11074,7 @@ CHARSET_INFO my_charset_utf16_latvian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_romanian_uca_ci= +struct charset_info_st my_charset_utf16_romanian_uca_ci= { 104,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -10942,7 +11106,7 @@ CHARSET_INFO my_charset_utf16_romanian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_slovenian_uca_ci= +struct charset_info_st my_charset_utf16_slovenian_uca_ci= { 105,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -10974,7 +11138,7 @@ CHARSET_INFO my_charset_utf16_slovenian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_polish_uca_ci= +struct charset_info_st my_charset_utf16_polish_uca_ci= { 106,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11006,7 +11170,7 @@ CHARSET_INFO my_charset_utf16_polish_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_estonian_uca_ci= +struct charset_info_st my_charset_utf16_estonian_uca_ci= { 107,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11038,7 +11202,7 @@ CHARSET_INFO my_charset_utf16_estonian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_spanish_uca_ci= +struct charset_info_st my_charset_utf16_spanish_uca_ci= { 108,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11070,7 +11234,7 @@ CHARSET_INFO my_charset_utf16_spanish_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_swedish_uca_ci= +struct charset_info_st my_charset_utf16_swedish_uca_ci= { 109,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11102,7 +11266,7 @@ CHARSET_INFO my_charset_utf16_swedish_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_turkish_uca_ci= +struct charset_info_st my_charset_utf16_turkish_uca_ci= { 110,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11134,7 +11298,7 @@ CHARSET_INFO my_charset_utf16_turkish_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_czech_uca_ci= +struct charset_info_st my_charset_utf16_czech_uca_ci= { 111,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11167,7 +11331,7 @@ CHARSET_INFO my_charset_utf16_czech_uca_ci= }; -CHARSET_INFO my_charset_utf16_danish_uca_ci= +struct charset_info_st my_charset_utf16_danish_uca_ci= { 112,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11199,7 +11363,7 @@ CHARSET_INFO my_charset_utf16_danish_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_lithuanian_uca_ci= +struct charset_info_st my_charset_utf16_lithuanian_uca_ci= { 113,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11231,7 +11395,7 @@ CHARSET_INFO my_charset_utf16_lithuanian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_slovak_uca_ci= +struct charset_info_st my_charset_utf16_slovak_uca_ci= { 114,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11263,7 +11427,7 @@ CHARSET_INFO my_charset_utf16_slovak_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_spanish2_uca_ci= +struct charset_info_st my_charset_utf16_spanish2_uca_ci= { 115,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11295,7 +11459,7 @@ CHARSET_INFO my_charset_utf16_spanish2_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_roman_uca_ci= +struct charset_info_st my_charset_utf16_roman_uca_ci= { 116,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11327,7 +11491,7 @@ CHARSET_INFO my_charset_utf16_roman_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_persian_uca_ci= +struct charset_info_st my_charset_utf16_persian_uca_ci= { 117,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11359,7 +11523,7 @@ CHARSET_INFO my_charset_utf16_persian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_esperanto_uca_ci= +struct charset_info_st my_charset_utf16_esperanto_uca_ci= { 118,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11391,7 +11555,7 @@ CHARSET_INFO my_charset_utf16_esperanto_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_hungarian_uca_ci= +struct charset_info_st my_charset_utf16_hungarian_uca_ci= { 119,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11423,7 +11587,7 @@ CHARSET_INFO my_charset_utf16_hungarian_uca_ci= &my_collation_utf16_uca_handler }; -CHARSET_INFO my_charset_utf16_sinhala_uca_ci= +struct charset_info_st my_charset_utf16_sinhala_uca_ci= { 120,0,0, /* number */ MY_CS_UTF16_UCA_FLAGS,/* state */ @@ -11460,3 +11624,78 @@ CHARSET_INFO my_charset_utf16_sinhala_uca_ci= #endif /* HAVE_UCA_COLLATIONS */ + +/** + Check if UCA data has contractions (public version) + + @cs Pointer to CHARSET_INFO data + @retval 0 - no contraction, 1 - have contractions. +*/ + +my_bool +my_uca_have_contractions(CHARSET_INFO *cs) +{ + return cs->contractions != NULL; +} + +/** + Check if a character can be contraction head + + @cs Pointer to CHARSET_INFO data + @wc Code point + + @retval 0 - cannot be contraction head + @retval 1 - can be contraction head +*/ + +my_bool +my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc) +{ + return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_HEAD; +} + + +/** + Check if a character can be contraction tail + + @cs Pointer to CHARSET_INFO data + @wc Code point + + @retval 0 - cannot be contraction tail + @retval 1 - can be contraction tail +*/ + +my_bool +my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc) +{ + return cs->contractions->flags[wc & MY_UCA_CNT_FLAG_MASK] & MY_UCA_CNT_TAIL; +} + + +/** + Find a contraction and return its weight array + + @cs Pointer to CHARSET data + @wc1 First character + @wc2 Second character + + @return Weight array + @retval NULL - no contraction found + @retval ptr - contraction weight array +*/ + +const uint16 * +my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) +{ + const MY_CONTRACTIONS *list= cs->contractions; + const MY_CONTRACTION *c, *last; + for (c= list->item, last= &list->item[list->nitems]; c < last; c++) + { + if (c->ch[0] == wc1 && c->ch[1] == wc2) + { + return c->weight; + } + } + return NULL; +} + diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index ecfac3170d1..66e54914c2f 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1136,7 +1136,7 @@ my_caseup_utf16(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((src < srcend) && @@ -1158,7 +1158,7 @@ my_hash_sort_utf16(CHARSET_INFO *cs, const uchar *s, size_t slen, my_wc_t wc; int res; const uchar *e= s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while (e > s + 1 && e[-1] == ' ' && e[-2] == '\0') e-= 2; @@ -1183,7 +1183,7 @@ my_casedn_utf16(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((src < srcend) && @@ -1208,7 +1208,7 @@ my_strnncoll_utf16(CHARSET_INFO *cs, my_wc_t s_wc,t_wc; const uchar *se= s + slen; const uchar *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; LINT_INIT(s_wc); LINT_INIT(t_wc); @@ -1273,7 +1273,7 @@ my_strnncollsp_utf16(CHARSET_INFO *cs, int res; my_wc_t s_wc, t_wc; const uchar *se= s + slen, *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; LINT_INIT(s_wc); LINT_INIT(t_wc); @@ -1427,7 +1427,7 @@ my_wildcmp_utf16_ci(CHARSET_INFO *cs, const char *wildstr,const char *wildend, int escape, int w_one, int w_many) { - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, uni_plane); } @@ -1865,7 +1865,7 @@ my_caseup_utf32(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((src < srcend) && @@ -1895,7 +1895,7 @@ my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen, my_wc_t wc; int res; const uchar *e= s + slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; /* Skip trailing spaces */ while (e > s + 3 && e[-1] == ' ' && !e[-2] && !e[-3] && !e[-4]) @@ -1921,7 +1921,7 @@ my_casedn_utf32(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) @@ -1944,7 +1944,7 @@ my_strnncoll_utf32(CHARSET_INFO *cs, my_wc_t UNINIT_VAR(s_wc),UNINIT_VAR(t_wc); const uchar *se= s + slen; const uchar *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while (s < se && t < te) { @@ -2008,7 +2008,7 @@ my_strnncollsp_utf32(CHARSET_INFO *cs, int res; my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se= s + slen, *te= t + tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT((slen % 4) == 0); DBUG_ASSERT((tlen % 4) == 0); @@ -2451,7 +2451,7 @@ my_wildcmp_utf32_ci(CHARSET_INFO *cs, const char *wildstr, const char *wildend, int escape, int w_one, int w_many) { - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; return my_wildcmp_unicode(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, uni_plane); } @@ -2825,7 +2825,7 @@ CHARSET_INFO my_charset_utf32_bin= #ifdef HAVE_CHARSET_ucs2 -static uchar ctype_ucs2[] = { +static const uchar ctype_ucs2[] = { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, @@ -2845,7 +2845,7 @@ static uchar ctype_ucs2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static uchar to_lower_ucs2[] = { +static const uchar to_lower_ucs2[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -2864,7 +2864,7 @@ static uchar to_lower_ucs2[] = { 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 }; -static uchar to_upper_ucs2[] = { +static const uchar to_upper_ucs2[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -2913,7 +2913,7 @@ static size_t my_caseup_ucs2(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((src < srcend) && @@ -2935,7 +2935,7 @@ static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen, my_wc_t wc; int res; const uchar *e=s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while (e > s+1 && e[-1] == ' ' && e[-2] == '\0') e-= 2; @@ -2960,7 +2960,7 @@ static size_t my_casedn_ucs2(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int res; char *srcend= src + srclen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src == dst && srclen == dstlen); while ((src < srcend) && @@ -2985,7 +2985,7 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs, my_wc_t UNINIT_VAR(s_wc),UNINIT_VAR(t_wc); const uchar *se=s+slen; const uchar *te=t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while ( s < se && t < te ) { @@ -3049,7 +3049,7 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)), { const uchar *se, *te; size_t minlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; /* extra safety to make sure the lengths are even numbers */ slen&= ~1; @@ -3145,7 +3145,7 @@ int my_wildcmp_ucs2_ci(CHARSET_INFO *cs, const char *wildstr,const char *wildend, int escape, int w_one, int w_many) { - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend, escape,w_one,w_many,uni_plane); } @@ -3260,6 +3260,14 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), } } + +static inline my_wc_t +ucs2_to_wc(const uchar *ptr) +{ + return (((uint) ptr[0]) << 8) + ptr[1]; +} + + /* ** Calculate min_str and max_str that ranges a LIKE string. ** Arguments: @@ -3288,12 +3296,12 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs, char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; - const char *contraction_flags= cs->contractions ? - ((const char*) cs->contractions) + 0x40*0x40 : NULL; + my_bool have_contractions= my_uca_have_contractions(cs); for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0 ; ptr+=2, charlen--) { + my_wc_t wc; if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end) { ptr+=2; /* Skip escape */ @@ -3329,9 +3337,10 @@ fill_max_and_min: return 0; } - if (contraction_flags && ptr + 3 < end && - ptr[0] == '\0' && contraction_flags[(uchar) ptr[1]]) + if (have_contractions && ptr + 3 < end && + my_uca_can_be_contraction_head(cs, (wc= ucs2_to_wc((uchar*) ptr)))) { + my_wc_t wc2; /* Contraction head found */ if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many)) { @@ -3343,8 +3352,8 @@ fill_max_and_min: Check if the second letter can be contraction part, and if two letters really produce a contraction. */ - if (ptr[2] == '\0' && contraction_flags[(uchar) ptr[3]] && - cs->contractions[(ptr[1]-0x40)*0x40 + ptr[3] - 0x40]) + if (my_uca_can_be_contraction_tail(cs, (wc2= ucs2_to_wc((uchar*) ptr + 2))) && + my_uca_contraction2_weight(cs, wc , wc2)) { /* Contraction found */ if (charlen == 1 || min_str + 2 >= min_end) @@ -3439,7 +3448,7 @@ MY_CHARSET_HANDLER my_charset_ucs2_handler= }; -CHARSET_INFO my_charset_ucs2_general_ci= +struct charset_info_st my_charset_ucs2_general_ci= { 35,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -3471,7 +3480,7 @@ CHARSET_INFO my_charset_ucs2_general_ci= &my_collation_ucs2_general_ci_handler }; -CHARSET_INFO my_charset_ucs2_bin= +struct charset_info_st my_charset_ucs2_bin= { 90,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 9f4d032ffe0..7628d5eb82a 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -32,7 +32,7 @@ #ifdef HAVE_CHARSET_ujis -static uchar ctype_ujis[257] = +static const uchar ctype_ujis[257] = { 0, /* For standard library */ 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */ @@ -69,7 +69,7 @@ static uchar ctype_ujis[257] = 0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000, }; -static uchar to_lower_ujis[]= +static const uchar to_lower_ujis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -105,7 +105,7 @@ static uchar to_lower_ujis[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar to_upper_ujis[]= +static const uchar to_upper_ujis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -141,7 +141,7 @@ static uchar to_upper_ujis[]= (uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377' }; -static uchar sort_order_ujis[]= +static const uchar sort_order_ujis[]= { '\000','\001','\002','\003','\004','\005','\006','\007', '\010','\011','\012','\013','\014','\015','\016','\017', @@ -67291,7 +67291,7 @@ static MY_CHARSET_HANDLER my_charset_handler= -CHARSET_INFO my_charset_ujis_japanese_ci= +struct charset_info_st my_charset_ujis_japanese_ci= { 12,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */ @@ -67324,7 +67324,7 @@ CHARSET_INFO my_charset_ujis_japanese_ci= }; -CHARSET_INFO my_charset_ujis_bin= +struct charset_info_st my_charset_ujis_bin= { 91,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT, /* state */ diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 76fff72290b..8cc2ebdeb68 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1504,7 +1504,7 @@ static MY_UNICASE_INFO planeFF[]={ {0xFFFE,0xFFFE,0xFFFE}, {0xFFFF,0xFFFF,0xFFFF} }; -MY_UNICASE_INFO *my_unicase_default[256]={ +MY_UNICASE_INFO *const my_unicase_default[256]={ plane00, plane01, plane02, plane03, plane04, plane05, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -1683,7 +1683,7 @@ static MY_UNICASE_INFO turk00[]= -MY_UNICASE_INFO *my_unicase_turkish[256]= +MY_UNICASE_INFO *const my_unicase_turkish[256]= { turk00, plane01, plane02, plane03, plane04, plane05, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -1745,12 +1745,11 @@ my_tosort_unicode(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) ** 1 if matched with wildcard */ -int -my_wildcmp_unicode(CHARSET_INFO *cs, - const char *str,const char *str_end, - const char *wildstr,const char *wildend, - int escape, int w_one, int w_many, - MY_UNICASE_INFO **weights) +int my_wildcmp_unicode(CHARSET_INFO *cs, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many, + MY_UNICASE_INFO *const *weights) { int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; @@ -1758,7 +1757,7 @@ my_wildcmp_unicode(CHARSET_INFO *cs, int (*mb_wc)(struct charset_info_st *, my_wc_t *, const uchar *, const uchar *); mb_wc= cs->cset->mb_wc; - + while (wildstr != wildend) { while (1) @@ -2018,7 +2017,7 @@ my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *cs, size_t len) expressions. Note, there is no need to mark byte 255 as a letter, it is illegal byte in UTF8. */ -static uchar ctype_utf8[] = { +static const uchar ctype_utf8[] = { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, @@ -2040,7 +2039,7 @@ static uchar ctype_utf8[] = { /* The below are taken from usa7 implementation */ -static uchar to_lower_utf8[] = { +static const uchar to_lower_utf8[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -2059,7 +2058,7 @@ static uchar to_lower_utf8[] = { 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 }; -static uchar to_upper_utf8[] = { +static const uchar to_upper_utf8[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -2319,7 +2318,7 @@ static size_t my_caseup_utf8(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int srcres, dstres; char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); while ((src < srcend) && @@ -2342,7 +2341,7 @@ static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, size_t slen, my_wc_t wc; int res; const uchar *e=s+slen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; /* Remove end space. We have to do this to be able to compare @@ -2369,7 +2368,7 @@ static size_t my_caseup_str_utf8(CHARSET_INFO *cs, char *src) my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && @@ -2393,7 +2392,7 @@ static size_t my_casedn_utf8(CHARSET_INFO *cs, char *src, size_t srclen, my_wc_t wc; int srcres, dstres; char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && @@ -2415,7 +2414,7 @@ static size_t my_casedn_str_utf8(CHARSET_INFO *cs, char *src) my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->casedn_multiply == 1); while (*src && @@ -2455,10 +2454,10 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs, my_bool t_is_prefix) { int s_res,t_res; - my_wc_t UNINIT_VAR(s_wc), t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se=s+slen; const uchar *te=t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while ( s < se && t < te ) { @@ -2525,9 +2524,9 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs, my_bool diff_if_only_endspace_difference) { int s_res, t_res, res; - my_wc_t UNINIT_VAR(s_wc),t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se= s+slen, *te= t+tlen; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; #ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE diff_if_only_endspace_difference= 0; @@ -2615,7 +2614,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs, static int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t) { - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while (s[0] && t[0]) { my_wc_t s_wc,t_wc; @@ -2700,7 +2699,7 @@ int my_wildcmp_utf8(CHARSET_INFO *cs, const char *wildstr,const char *wildend, int escape, int w_one, int w_many) { - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend, escape,w_one,w_many,uni_plane); } @@ -2713,7 +2712,6 @@ size_t my_strnxfrmlen_utf8(CHARSET_INFO *cs __attribute__((unused)), return (len * 2 + 2) / 3; } - static uint my_ismbchar_utf8(CHARSET_INFO *cs,const char *b, const char *e) { my_wc_t wc; @@ -2792,7 +2790,7 @@ MY_CHARSET_HANDLER my_charset_utf8_handler= -CHARSET_INFO my_charset_utf8_general_ci= +struct charset_info_st my_charset_utf8_general_ci= { 33,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE, /* state */ @@ -2825,7 +2823,7 @@ CHARSET_INFO my_charset_utf8_general_ci= }; -CHARSET_INFO my_charset_utf8_bin= +struct charset_info_st my_charset_utf8_bin= { 83,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE, /* state */ @@ -2877,7 +2875,7 @@ static int my_strnncoll_utf8_cs(CHARSET_INFO *cs, const uchar *te=t+tlen; int save_diff = 0; int diff; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; while ( s < se && t < te ) { @@ -2922,7 +2920,7 @@ static int my_strnncollsp_utf8_cs(CHARSET_INFO *cs, const uchar *se= s + slen; const uchar *te= t + tlen; int save_diff= 0; - MY_UNICASE_INFO **uni_plane= cs->caseinfo; + MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; #ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE diff_if_only_endspace_difference= 0; @@ -3008,7 +3006,7 @@ static MY_COLLATION_HANDLER my_collation_cs_handler = my_propagate_simple }; -CHARSET_INFO my_charset_utf8_general_cs= +struct charset_info_st my_charset_utf8_general_cs= { 254,0,0, /* number */ MY_CS_COMPILED|MY_CS_UNICODE, /* state */ @@ -3066,7 +3064,7 @@ All other characters are encoded using five bytes: */ -static uint16 touni[5994]= +static const uint16 touni[5994]= { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, @@ -3822,7 +3820,7 @@ static uint16 touni[5994]= /* 00C0-05FF */ -static uint16 uni_0C00_05FF[1344]= +static const uint16 uni_0C00_05FF[1344]= { 0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E, 0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026, @@ -4066,7 +4064,7 @@ static uint16 uni_1E00_1FFF[512]= /* 2160-217F */ -static uint16 uni_2160_217F[32]= +static const uint16 uni_2160_217F[32]= { 0x0739,0x0789,0x07D9,0x0829,0x0879,0x08C9,0x0919,0x0969, 0x09B9,0x0A09,0x0A59,0x0AA9,0x0AF9,0x0B49,0x0B99,0x0BE9, @@ -4076,7 +4074,7 @@ static uint16 uni_2160_217F[32]= /* 24B0-24EF */ -static uint16 uni_24B0_24EF[64]= +static const uint16 uni_24B0_24EF[64]= { 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0511,0x0512, 0x0513,0x0514,0x0515,0x0516,0x0517,0x0518,0x0519,0x051A, @@ -4090,7 +4088,7 @@ static uint16 uni_24B0_24EF[64]= /* FF20-FF5F */ -static uint16 uni_FF20_FF5F[64]= +static const uint16 uni_FF20_FF5F[64]= { 0x0000,0x0560,0x05B0,0x0600,0x0650,0x06A0,0x06F0,0x0740, 0x0790,0x07E0,0x0830,0x0880,0x08D0,0x0920,0x0970,0x09C0, @@ -4114,7 +4112,7 @@ static uint16 uni_FF20_FF5F[64]= static int hexlo(int x) { - static char hex_lo_digit[256]= + static const char hex_lo_digit[256]= { -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, /* ................ */ @@ -4145,7 +4143,7 @@ static int hexlo(int x) 0..9 digits _ underscore */ -static char filename_safe_char[128]= +static const char filename_safe_char[128]= { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */ @@ -4223,6 +4221,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), { int code; char hex[]= "0123456789abcdef"; + + if (s >= e) + return MY_CS_TOOSMALL; + if (wc < 128 && filename_safe_char[wc]) { *s= (uchar) wc; @@ -4304,7 +4306,7 @@ static MY_CHARSET_HANDLER my_charset_filename_handler= -CHARSET_INFO my_charset_filename= +struct charset_info_st my_charset_filename= { 17,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_HIDDEN|MY_CS_NONASCII, diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index d9d092beb8f..ba61a3bbeea 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -53,7 +53,7 @@ #ifdef HAVE_CHARSET_cp1250 -static uint16 tab_cp1250_uni[256]={ +static const uint16 tab_cp1250_uni[256]={ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, @@ -90,7 +90,7 @@ static uint16 tab_cp1250_uni[256]={ /* 0000-00FD , 254 chars */ -static uchar tab_uni_cp1250_plane00[]={ +static const uchar tab_uni_cp1250_plane00[]={ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F, @@ -109,7 +109,7 @@ static uchar tab_uni_cp1250_plane00[]={ 0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD}; /* 0102-017E , 125 chars */ -static uchar tab_uni_cp1250_plane01[]={ +static const uchar tab_uni_cp1250_plane01[]={ 0xC3,0xE3,0xA5,0xB9,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0, 0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -120,7 +120,7 @@ static uchar tab_uni_cp1250_plane01[]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x9F,0xAF,0xBF,0x8E,0x9E}; /* 2013-20AC , 154 chars */ -static uchar tab_uni_cp1250_plane20[]={ +static const uchar tab_uni_cp1250_plane20[]={ 0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95, 0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -133,12 +133,12 @@ static uchar tab_uni_cp1250_plane20[]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80}; /* 02C7-02DD , 23 chars */ -static uchar tab_uni_cp1250_plane02[]={ +static const uchar tab_uni_cp1250_plane02[]={ 0xA1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD}; /* 2122-2122 , 1 chars */ -static uchar tab_uni_cp1250_plane21[]={ +static const uchar tab_uni_cp1250_plane21[]={ 0x99}; @@ -152,7 +152,7 @@ static MY_UNI_IDX idx_uni_cp1250[]={ }; -static uchar ctype_win1250ch[] = { +static const uchar ctype_win1250ch[] = { 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20, @@ -188,7 +188,7 @@ static uchar ctype_win1250ch[] = { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10 }; -static uchar to_lower_win1250ch[] = { +static const uchar to_lower_win1250ch[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, @@ -223,7 +223,7 @@ static uchar to_lower_win1250ch[] = { 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }; -static uchar to_upper_win1250ch[] = { +static const uchar to_upper_win1250ch[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, @@ -260,7 +260,7 @@ static uchar to_upper_win1250ch[] = { -static uchar sort_order_win1250ch[] = { +static const uchar sort_order_win1250ch[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, @@ -279,7 +279,7 @@ static uchar sort_order_win1250ch[] = { 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 }; -static uchar _sort_order_win1250ch1[] = { +static const uchar _sort_order_win1250ch1[] = { 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, @@ -404,7 +404,7 @@ struct wordvalue { uchar pass1; uchar pass2; }; -static struct wordvalue doubles[] = { +static const struct wordvalue doubles[] = { { (uchar*) "ch", 0xad, 0x03 }, { (uchar*) "c", 0xa6, 0x02 }, { (uchar*) "Ch", 0xad, 0x02 }, @@ -513,7 +513,7 @@ static size_t my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)), #ifdef REAL_MYSQL -static uchar like_range_prefix_min_win1250ch[]= +static const uchar like_range_prefix_min_win1250ch[]= { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, @@ -677,7 +677,7 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler = }; -CHARSET_INFO my_charset_cp1250_czech_ci = +struct charset_info_st my_charset_cp1250_czech_ci = { 34,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */ diff --git a/strings/ctype.c b/strings/ctype.c index 4891e657b6e..873255ad0d8 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -77,7 +77,7 @@ struct my_cs_file_section_st #define _CS_IDENTICAL 22 -static struct my_cs_file_section_st sec[] = +static const struct my_cs_file_section_st sec[] = { {_CS_MISC, "xml"}, {_CS_MISC, "xml/version"}, @@ -113,9 +113,10 @@ static struct my_cs_file_section_st sec[] = {0, NULL} }; -static struct my_cs_file_section_st * cs_file_sec(const char *attr, size_t len) +static const struct my_cs_file_section_st +*cs_file_sec(const char *attr, size_t len) { - struct my_cs_file_section_st *s; + const struct my_cs_file_section_st *s; for (s=sec; s->str; s++) { if (!strncmp(attr,s->str,len)) @@ -139,8 +140,8 @@ typedef struct my_cs_file_info char comment[MY_CS_CSDESCR_SIZE]; char tailoring[MY_CS_TAILORING_SIZE]; size_t tailoring_length; - CHARSET_INFO cs; - int (*add_collation)(CHARSET_INFO *cs); + struct charset_info_st cs; + int (*add_collation)(struct charset_info_st *cs); } MY_CHARSET_LOADER; @@ -183,7 +184,7 @@ static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s= cs_file_sec(attr,len); + const struct my_cs_file_section_st *s= cs_file_sec(attr,len); if ( s && (s->state == _CS_CHARSET)) bzero(&i->cs,sizeof(i->cs)); @@ -198,7 +199,7 @@ static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s= cs_file_sec(attr,len); + const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; int rc; @@ -216,9 +217,9 @@ static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len) static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; - struct my_cs_file_section_st *s; - int state= (int)((s=cs_file_sec(st->attr, strlen(st->attr))) ? s->state : - 0); + const struct my_cs_file_section_st *s; + int state= (int)((s= cs_file_sec(st->attr, strlen(st->attr))) ? s->state : + 0); switch (state) { case _CS_ID: @@ -294,7 +295,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len) my_bool my_parse_charset_xml(const char *buf, size_t len, - int (*add_collation)(CHARSET_INFO *cs)) + int (*add_collation)(struct charset_info_st *cs)) { MY_XML_PARSER p; struct my_cs_file_info i; diff --git a/strings/decimal.c b/strings/decimal.c index 7625ed80ec3..d606bebf152 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -30,7 +30,7 @@ integer that determines the number of significant digits in a particular radix R, where R is either 2 or 10. S is a non-negative integer. Every value of an exact numeric type of scale S is of the - form n*10^{-S}, where n is an integer such that -R^P <= n <= R^P. + form n*10^{-S}, where n is an integer such that �-R^P <= n <= R^P. [...] @@ -138,7 +138,7 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={ 999900000, 999990000, 999999000, 999999900, 999999990 }; -#ifdef HAVE_purify +#ifdef HAVE_valgrind #define sanity(d) DBUG_ASSERT((d)->len > 0) #else #define sanity(d) DBUG_ASSERT((d)->len >0 && ((d)->buf[0] | \ @@ -300,7 +300,7 @@ int decimal_actual_fraction(decimal_t *from) { for (i= DIG_PER_DEC1 - ((frac - 1) % DIG_PER_DEC1); *buf0 % powers10[i++] == 0; - frac--) ; + frac--) {} } return frac; } @@ -340,7 +340,7 @@ int decimal2string(decimal_t *from, char *to, int *to_len, char *s=to; dec1 *buf, *buf0=from->buf, tmp; - DBUG_ASSERT(*to_len >= 2+from->sign); + DBUG_ASSERT(*to_len >= 2+ (int) from->sign); /* removing leading zeroes */ buf0= remove_leading_zeroes(from, &intg); @@ -494,7 +494,7 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result) stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1); i= 1; } - for (; *buf_end % powers10[i++] == 0; stop--) ; + for (; *buf_end % powers10[i++] == 0; stop--) {} *end_result= stop; /* index of position after last decimal digit (from 0) */ } @@ -994,7 +994,7 @@ static int ull2dec(ulonglong from, decimal_t *to) sanity(to); - for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) ; + for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) {} if (unlikely(intg1 > to->len)) { intg1=to->len; @@ -1784,7 +1784,8 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) int intg1=ROUND_UP(from1->intg), intg2=ROUND_UP(from2->intg), frac1=ROUND_UP(from1->frac), frac2=ROUND_UP(from2->frac); int frac0=max(frac1, frac2), error; - dec1 *buf1, *buf2, *buf0, *stop1, *stop2, *start1, *start2, carry=0; + dec1 *buf1, *buf2, *buf0, *stop1, *stop2, *start1, *start2; + my_bool carry=0; /* let carry:=1 if from2 > from1 */ start1=buf1=from1->buf; stop1=buf1+intg1; @@ -1852,7 +1853,7 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) swap_variables(dec1 *,start1, start2); swap_variables(int,intg1,intg2); swap_variables(int,frac1,frac2); - to->sign= 1 - to->sign; + to->sign= !to->sign; } FIX_INTG_FRAC_ERROR(to->len, intg1, frac0, error); diff --git a/strings/int2str.c b/strings/int2str.c index ecc214d58d5..63cda79d23b 100644 --- a/strings/int2str.c +++ b/strings/int2str.c @@ -19,9 +19,9 @@ /* _dig_vec arrays are public because they are used in several outer places. */ -char _dig_vec_upper[] = +const char _dig_vec_upper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; -char _dig_vec_lower[] = +const char _dig_vec_lower[] = "0123456789abcdefghijklmnopqrstuvwxyz"; @@ -56,7 +56,7 @@ int2str(register long int val, register char *dst, register int radix, char buffer[65]; register char *p; long int new_val; - char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower; + const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower; ulong uval= (ulong) val; if (radix < 0) diff --git a/strings/llstr.c b/strings/llstr.c index 643cf36a311..678f8b05f39 100644 --- a/strings/llstr.c +++ b/strings/llstr.c @@ -38,3 +38,4 @@ char *ullstr(longlong value,char *buff) longlong10_to_str(value,buff,10); return buff; } + diff --git a/strings/str_test.c b/strings/str_test.c index 7e304fbd10a..ce23b2c3588 100644 --- a/strings/str_test.c +++ b/strings/str_test.c @@ -50,10 +50,10 @@ int main(void) errors=tests=0; init_strings(); - test_arg("memcmp(from,to,5)",(long) my_test(memcmp(from,to,5)),1L); - test_arg("memcmp(from,from,5)",(long) memcmp(from,from,5),0L); + test_arg("bcmp(from,to,5)",(long) my_test(bcmp(from,to,5)),1L); + test_arg("bcmp(from,from,5)",(long) bcmp(from,from,5),0L); - test_arg("memcmp(from,to,0)",(long) memcmp(from,to,0),0L); + test_arg("bcmp(from,to,0)",(long) bcmp(from,to,0),0L); test_arg("strend(from)",(long) strend(from),(long) from+F_LEN); test_arg("strchr(v1,'M')",(long) strchr(v1,'M'),(long) v1); test_arg("strchr(v1,'y')",(long) strchr(v1,'y'),(long) v1+4); @@ -91,7 +91,7 @@ int main(void) test_strarg("bmove_upp(to+6,from+6,3)",(bmove_upp(to+6,from+6,3),0L),INT_MAX32, 3,T_CHAR,3,F_CHAR,0,0); test_strarg("bmove_upp(to,from,0)",(bmove_upp(to,from,0),0L),INT_MAX32,0,0); - test_strarg("memcpy(to,from,8)",(memcpy(to,from,8),0L),INT_MAX32, + test_strarg("bmove_align(to,from,8)",(bmove_align(to,from,8),0L),INT_MAX32, 8,F_CHAR,0,0); test_strarg("strappend(to,3,' ')",(strappend(to,3,' '),0L),INT_MAX32, 3,T_CHAR,1,0,T_LEN-4,T_CHAR,1,0,0,0); @@ -231,7 +231,7 @@ int compare_buff(const char *message, char * b1, char * b2, int length, { int i,error=0; - if (memcmp(b1,b2,length)) + if (bcmp(b1,b2,length)) { errors++; printf("func: '%s' Buffers differ\nIs: ",message); diff --git a/strings/strmake.c b/strings/strmake.c index 2d5fa5e36aa..56bd3a8f084 100644 --- a/strings/strmake.c +++ b/strings/strmake.c @@ -29,26 +29,38 @@ char *strmake(register char *dst, register const char *src, size_t length) { -#ifdef EXTRA_DEBUG - /* - 'length' is the maximum length of the string; the buffer needs - to be one character larger to accomodate the terminating '\0'. - This is easy to get wrong, so we make sure we write to the - entire length of the buffer to identify incorrect buffer-sizes. - We only initialise the "unused" part of the buffer here, a) for - efficiency, and b) because dst==src is allowed, so initialising - the entire buffer would overwrite the source-string. Also, we - write a character rather than '\0' as this makes spotting these - problems in the results easier. - */ - uint n= 0; - while (n < length && src[n++]); - memset(dst + n, (int) 'Z', length - n + 1); -#endif - while (length--) + { if (! (*dst++ = *src++)) + { +#ifdef EXTRA_DEBUG + /* + 'length' is the maximum length of the string; the buffer needs + to be one character larger to accommodate the terminating + '\0'. This is easy to get wrong, so we make sure we write to + the entire length of the buffer to identify incorrect + buffer-sizes. We only initialism the "unused" part of the + buffer here, a) for efficiency, and b) because dst==src is + allowed, so initializing the entire buffer would overwrite the + source-string. Also, we write a character rather than '\0' as + this makes spotting these problems in the results easier. + + If we are using purify/valgrind, we only set one character at + end to be able to detect also wrong accesses after the end of + dst. + */ + if (length) + { +#ifdef HAVE_valgrind + dst[length-1]= 'Z'; +#else + bfill(dst, length-1, (int) 'Z'); +#endif /* HAVE_valgrind */ + } +#endif /* EXTRA_DEBUG */ return dst-1; + } + } *dst=0; return dst; } diff --git a/strings/strmov.c b/strings/strmov.c index 4d4915d27a0..849c5812401 100644 --- a/strings/strmov.c +++ b/strings/strmov.c @@ -24,10 +24,7 @@ #include <my_global.h> #include "m_string.h" -#ifdef strmov -#undef strmov -#define strmov strmov_overlapp -#endif +#ifndef strmov char *strmov(register char *dst, register const char *src) { @@ -35,3 +32,4 @@ char *strmov(register char *dst, register const char *src) return dst-1; } +#endif /* strmov */ diff --git a/strings/strmov_overlapp.c b/strings/strmov_overlapp.c new file mode 100644 index 00000000000..4cc3e294620 --- /dev/null +++ b/strings/strmov_overlapp.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include <my_global.h> +#include "m_string.h" + +/* A trivial implementation */ +char *strmov_overlapp(char *dst, const char *src) +{ + size_t len= strlen(src); + memmove(dst, src, len+1); + return dst+len; +} + diff --git a/strings/strxmov.c b/strings/strxmov.c index 9dd2c936620..d5d81fd9274 100644 --- a/strings/strxmov.c +++ b/strings/strxmov.c @@ -32,7 +32,6 @@ #include <my_global.h> #include "m_string.h" -#include <stdarg.h> char *strxmov(char *dst,const char *src, ...) { diff --git a/strings/xml.c b/strings/xml.c index f3cfaad54fa..14da69e088a 100644 --- a/strings/xml.c +++ b/strings/xml.c @@ -123,16 +123,16 @@ static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) a->beg=p->cur; a->end=p->cur; - if ((p->end - p->cur > 3) && !memcmp(p->cur,"<!--",4)) + if ((p->end - p->cur > 3) && !bcmp((uchar*) p->cur, (uchar*) "<!--",4)) { - for (; (p->cur < p->end) && memcmp(p->cur, "-->", 3); p->cur++) + for (; (p->cur < p->end) && bcmp((uchar*) p->cur, (uchar*) "-->", 3); p->cur++) {} - if (!memcmp(p->cur, "-->", 3)) + if (!bcmp((uchar*) p->cur, (uchar*) "-->", 3)) p->cur+=3; a->end=p->cur; lex=MY_XML_COMMENT; } - else if (!memcmp(p->cur, "<![CDATA[",9)) + else if (!bcmp((uchar*) p->cur, (uchar*) "<![CDATA[",9)) { p->cur+= 9; for (; p->cur < p->end - 2 ; p->cur++) |