diff options
Diffstat (limited to 'strings')
-rw-r--r-- | strings/Makefile.am | 2 | ||||
-rw-r--r-- | strings/ctype-mb.c | 2 | ||||
-rw-r--r-- | strings/ctype-simple.c | 1 | ||||
-rw-r--r-- | strings/ctype-uca.c | 94 | ||||
-rw-r--r-- | strings/ctype-ucs2.c | 20 | ||||
-rw-r--r-- | strings/ctype-ujis.c | 2 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 35 |
7 files changed, 125 insertions, 31 deletions
diff --git a/strings/Makefile.am b/strings/Makefile.am index 0cb0f4dc060..a8732720e10 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -56,7 +56,7 @@ EXTRA_DIST = ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc CHARSET_INFO.txt strmov_overlapp.c libmystrings_a_LIBADD= -conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c bcmp.c +conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c conf_to_src_LDADD= #force static linking of conf_to_src - essential when linking against #custom installation of libc diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index 745594cc6e1..76af3ef2cdf 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -156,7 +156,7 @@ static size_t my_casefold_mb_varlen(CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), - uchar *map, + const uchar *map, size_t is_upper) { char *srcend= src + srclen, *dst0= dst; diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 25ef54e5c02..6c1dcb7481e 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -304,6 +304,7 @@ void my_hash_sort_simple(CHARSET_INFO *cs, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; + const uchar *end; /* Remove end space. We have to do this to be able to compare diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index d1f845cc8fe..fcef2c68967 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -10286,6 +10286,38 @@ struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci= &my_collation_any_uca_handler }; +struct charset_info_st my_charset_utf8mb4_croatian_uca_ci= +{ + 245,0,0, /* number */ + MY_CS_UTF8MB4_UCA_FLAGS,/* state */ + MY_UTF8MB4, /* csname */ + MY_UTF8MB4 "_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 */ + 4, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_utf8mb4_handler, + &my_collation_any_uca_handler +}; + #endif /* HAVE_CHARSET_utf8mb4 */ @@ -10952,6 +10984,37 @@ struct charset_info_st my_charset_utf32_sinhala_uca_ci= &my_collation_utf32_uca_handler }; +struct charset_info_st my_charset_utf32_croatian_uca_ci= +{ + 214,0,0, /* number */ + MY_CS_UTF32_UCA_FLAGS /* state */, + "utf32", /* cs name */ + "utf32_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 */ + 4, /* mbminlen */ + 4, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_utf32_handler, + &my_collation_utf32_uca_handler +}; #endif /* HAVE_CHARSET_utf32 */ @@ -11619,6 +11682,37 @@ struct charset_info_st my_charset_utf16_sinhala_uca_ci= &my_collation_utf16_uca_handler }; +struct charset_info_st my_charset_utf16_croatian_uca_ci= +{ + 215,0,0, /* number */ + MY_CS_UTF16_UCA_FLAGS /* state */, + "utf16", /* cs name */ + "utf16_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 */ + 4, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + ' ', /* pad char */ + 0, /* escape_with_backslash_is_dangerous */ + &my_charset_utf16_handler, + &my_collation_utf16_uca_handler +}; #endif /* HAVE_CHARSET_utf16 */ diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 66e54914c2f..e9c69c628da 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1095,7 +1095,7 @@ my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), static inline void -my_tolower_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tolower_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -1104,7 +1104,7 @@ my_tolower_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) static inline void -my_toupper_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_toupper_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -1113,7 +1113,7 @@ my_toupper_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) static inline void -my_tosort_utf16(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tosort_utf16(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256) @@ -1727,7 +1727,7 @@ MY_CHARSET_HANDLER my_charset_utf16_handler= }; -CHARSET_INFO my_charset_utf16_general_ci= +struct charset_info_st my_charset_utf16_general_ci= { 54,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -1760,7 +1760,7 @@ CHARSET_INFO my_charset_utf16_general_ci= }; -CHARSET_INFO my_charset_utf16_bin= +struct charset_info_st my_charset_utf16_bin= { 55,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, @@ -1824,7 +1824,7 @@ my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)), static inline void -my_tolower_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tolower_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -1833,7 +1833,7 @@ my_tolower_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) static inline void -my_toupper_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_toupper_utf32(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -1842,7 +1842,7 @@ my_toupper_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) static inline void -my_tosort_utf32(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tosort_utf32(MY_UNICASE_INFO *const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256) @@ -2754,7 +2754,7 @@ MY_CHARSET_HANDLER my_charset_utf32_handler= }; -CHARSET_INFO my_charset_utf32_general_ci= +struct charset_info_st my_charset_utf32_general_ci= { 60,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, @@ -2787,7 +2787,7 @@ CHARSET_INFO my_charset_utf32_general_ci= }; -CHARSET_INFO my_charset_utf32_bin= +struct charset_info_st my_charset_utf32_bin= { 61,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 7628d5eb82a..0f6cf990701 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -67172,7 +67172,7 @@ static size_t my_casefold_ujis(CHARSET_INFO *cs, char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), - uchar *map, + const uchar * const map, size_t is_upper) { char *srcend= src + srclen, *dst0= dst; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 8cc2ebdeb68..4b0265693b6 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1721,7 +1721,7 @@ MY_UNICASE_INFO *const my_unicase_turkish[256]= static inline void -my_tosort_unicode(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tosort_unicode(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256) @@ -1754,7 +1754,7 @@ int my_wildcmp_unicode(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 *, + int (*mb_wc)(CHARSET_INFO *, my_wc_t *, const uchar *, const uchar *); mb_wc= cs->cset->mb_wc; @@ -1905,14 +1905,13 @@ my_strnxfrm_unicode(CHARSET_INFO *cs, uchar *dst, size_t dstlen, const uchar *src, size_t srclen) { - my_wc_t wc; + my_wc_t UNINIT_VAR(wc); int res; uchar *de= dst + dstlen; uchar *de_beg= de - 1; const uchar *se = src + srclen; - MY_UNICASE_INFO **uni_plane= (cs->state & MY_CS_BINSORT) ? - NULL : cs->caseinfo; - LINT_INIT(wc); + MY_UNICASE_INFO * const*uni_plane= (cs->state & MY_CS_BINSORT) ? + NULL : cs->caseinfo; DBUG_ASSERT(src); while (dst < de_beg) @@ -4683,7 +4682,7 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), static inline void -my_tolower_utf8mb4(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_tolower_utf8mb4(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -4692,7 +4691,7 @@ my_tolower_utf8mb4(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) static inline void -my_toupper_utf8mb4(MY_UNICASE_INFO **uni_plane, my_wc_t *wc) +my_toupper_utf8mb4(MY_UNICASE_INFO * const* uni_plane, my_wc_t *wc) { int page= *wc >> 8; if (page < 256 && uni_plane[page]) @@ -4707,7 +4706,7 @@ my_caseup_utf8mb4(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) && @@ -4739,7 +4738,7 @@ my_hash_sort_utf8mb4(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 do this to be able to compare @@ -4775,7 +4774,7 @@ my_caseup_str_utf8mb4(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 && @@ -4800,7 +4799,7 @@ my_casedn_utf8mb4(CHARSET_INFO *cs, 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) && @@ -4823,7 +4822,7 @@ my_casedn_str_utf8mb4(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 && @@ -4865,7 +4864,7 @@ my_strnncoll_utf8mb4(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); @@ -4932,7 +4931,7 @@ my_strnncollsp_utf8mb4(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); @@ -5016,7 +5015,7 @@ my_strnncollsp_utf8mb4(CHARSET_INFO *cs, static int my_strcasecmp_utf8mb4(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; @@ -5183,7 +5182,7 @@ MY_CHARSET_HANDLER my_charset_utf8mb4_handler= -CHARSET_INFO my_charset_utf8mb4_general_ci= +struct charset_info_st my_charset_utf8mb4_general_ci= { 45,0,0, /* number */ MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT, /* state */ @@ -5216,7 +5215,7 @@ CHARSET_INFO my_charset_utf8mb4_general_ci= }; -CHARSET_INFO my_charset_utf8mb4_bin= +struct charset_info_st my_charset_utf8mb4_bin= { 46,0,0, /* number */ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT, /* state */ |