diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-04-01 15:52:09 +0500 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-04-01 15:52:09 +0500 |
commit | 158b54873a931859c768a01f88270927d3cda682 (patch) | |
tree | e150b071b41bd913be7a617346c394420d40ce95 /strings | |
parent | 75bcfdb14ff403835610743e6e577abf5373c69d (diff) | |
download | mariadb-git-158b54873a931859c768a01f88270927d3cda682.tar.gz |
mbcharlen() is now used instead of ismbhead(). The last one has been removed.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-big5.c | 6 | ||||
-rw-r--r-- | strings/ctype-bin.c | 1 | ||||
-rw-r--r-- | strings/ctype-czech.c | 1 | ||||
-rw-r--r-- | strings/ctype-euc_kr.c | 6 | ||||
-rw-r--r-- | strings/ctype-extra.c | 1 | ||||
-rw-r--r-- | strings/ctype-gb2312.c | 6 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 14 | ||||
-rw-r--r-- | strings/ctype-latin1.c | 2 | ||||
-rw-r--r-- | strings/ctype-mb.c | 2 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 6 | ||||
-rw-r--r-- | strings/ctype-tis620.c | 1 | ||||
-rw-r--r-- | strings/ctype-ujis.c | 6 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 13 | ||||
-rw-r--r-- | strings/ctype-win1250ch.c | 1 |
14 files changed, 5 insertions, 61 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 43d6f1a8e13..7be631bbe05 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -399,11 +399,6 @@ static int ismbchar_big5(CHARSET_INFO *cs __attribute__((unused)), return (isbig5head(*(p)) && (e)-(p)>1 && isbig5tail(*((p)+1))? 2: 0); } -static my_bool ismbhead_big5(CHARSET_INFO *cs __attribute__((unused)), uint c) -{ - return isbig5head(c); -} - static int mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c) { return (isbig5head(c)? 2: 0); @@ -6253,7 +6248,6 @@ CHARSET_INFO my_charset_big5 = my_wildcmp_mb, 2, /* mbmaxlen */ ismbchar_big5, - ismbhead_big5, mbcharlen_big5, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 568165896ca..77152db845c 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -284,7 +284,6 @@ CHARSET_INFO my_charset_bin = my_wildcmp_bin, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 0ff7718b6d8..9da2103fda3 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -627,7 +627,6 @@ CHARSET_INFO my_charset_czech = my_wildcmp_8bit, 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 5b1240e1a92..0766cd40040 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -191,11 +191,6 @@ static int ismbchar_euc_kr(CHARSET_INFO *cs __attribute__((unused)), 0); } -static my_bool ismbhead_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (iseuc_kr(c)); -} - static int mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c) { return (iseuc_kr(c) ? 2 : 0); @@ -8661,7 +8656,6 @@ CHARSET_INFO my_charset_euc_kr = my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_euc_kr, - ismbhead_euc_kr, mbcharlen_euc_kr, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index 60934d5ff55..40d2b7ab1da 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -42,7 +42,6 @@ CHARSET_INFO compiled_charsets[] = { NULL, NULL, NULL, - NULL, NULL, /* mb_wc */ NULL, /* wc_mb */ diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 4d0fdda5c6e..ec495be5e84 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -172,11 +172,6 @@ static int ismbchar_gb2312(CHARSET_INFO *cs __attribute__((unused)), return (isgb2312head(*(p)) && (e)-(p)>1 && isgb2312tail(*((p)+1))? 2: 0); } -static my_bool ismbhead_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return isgb2312head(c); -} - static int mbcharlen_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c) { return (isgb2312head(c)? 2:0); @@ -5711,7 +5706,6 @@ CHARSET_INFO my_charset_gb2312 = my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_gb2312, - ismbhead_gb2312, mbcharlen_gb2312, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index c39ef62b97c..7673f4e6c23 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2619,7 +2619,7 @@ int my_strnncollsp_gbk(CHARSET_INFO * cs, } -int my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)), +static int my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)), uchar * dest, uint len, const uchar * src, uint srclen) { @@ -2661,7 +2661,7 @@ int my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)), #define max_sort_char ((uchar) 255) -extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), +static my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), const char *ptr,uint ptr_length, int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, @@ -2713,18 +2713,13 @@ extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), } -int ismbchar_gbk(CHARSET_INFO *cs __attribute__((unused)), +static int ismbchar_gbk(CHARSET_INFO *cs __attribute__((unused)), const char* p, const char *e) { return (isgbkhead(*(p)) && (e)-(p)>1 && isgbktail(*((p)+1))? 2: 0); } -my_bool ismbhead_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return isgbkhead(c); -} - -int mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) +static int mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c) { return (isgbkhead(c)? 2:0); } @@ -9908,7 +9903,6 @@ CHARSET_INFO my_charset_gbk = my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_gbk, - ismbhead_gbk, mbcharlen_gbk, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index d626d7c4464..8b3e2c5e3a9 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -197,7 +197,6 @@ CHARSET_INFO my_charset_latin1 = my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, @@ -451,7 +450,6 @@ CHARSET_INFO my_charset_latin1_de = my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index 625dbbae751..3d1abe95675 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -107,7 +107,7 @@ int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) if (*s++ != *t++) return 1; } - else if (my_ismbhead(cs, *t)) + else if (my_mbcharlen(cs, *t) > 1) return 1; else if (map[(uchar) *s++] != map[(uchar) *t++]) return 1; diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 5fc0d3f069a..b2b1a40bdcc 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -189,11 +189,6 @@ static int ismbchar_sjis(CHARSET_INFO *cs __attribute__((unused)), return (issjishead((uchar) *p) && (e-p)>1 && issjistail((uchar)p[1]) ? 2: 0); } -static my_bool ismbhead_sjis(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return issjishead((uchar) c); -} - static int mbcharlen_sjis(CHARSET_INFO *cs __attribute__((unused)),uint c) { return (issjishead((uchar) c) ? 2: 0); @@ -4495,7 +4490,6 @@ CHARSET_INFO my_charset_sjis = my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_sjis, - ismbhead_sjis, mbcharlen_sjis, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index d08faa2e6c6..9da7b02ed31 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -718,7 +718,6 @@ CHARSET_INFO my_charset_tis620 = my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 88f0f67ec1b..de73608293c 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -194,11 +194,6 @@ static int ismbchar_ujis(CHARSET_INFO *cs __attribute__((unused)), 0); } -static my_bool ismbhead_ujis(CHARSET_INFO *cs __attribute__((unused)),uint c) -{ - return (isujis(c) || isujis_ss2(c) || isujis_ss3(c)); -} - static int mbcharlen_ujis(CHARSET_INFO *cs __attribute__((unused)),uint c) { return (isujis(c)? 2: isujis_ss2(c)? 2: isujis_ss3(c)? 3: 0); @@ -8452,7 +8447,6 @@ CHARSET_INFO my_charset_ujis = my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ ismbchar_ujis, - ismbhead_ujis, mbcharlen_ujis, my_numchars_mb, my_charpos_mb, diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 0f784fe26c0..69500f6d3d6 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1929,11 +1929,6 @@ static int my_ismbchar_utf8(CHARSET_INFO *cs,const char *b, const char *e) return (res>1) ? res : 0; } -static my_bool my_ismbhead_utf8(CHARSET_INFO *cs __attribute__((unused)) , uint ch) -{ - return ( ch >= 0xc2 ); -} - static int my_mbcharlen_utf8(CHARSET_INFO *cs __attribute__((unused)) , uint c) { if (c < 0x80) @@ -1977,7 +1972,6 @@ CHARSET_INFO my_charset_utf8 = my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ my_ismbchar_utf8, /* ismbchar */ - my_ismbhead_utf8, /* ismbhead */ my_mbcharlen_utf8, /* mbcharlen */ my_numchars_mb, my_charpos_mb, @@ -2325,12 +2319,6 @@ static int my_ismbchar_ucs2(CHARSET_INFO *cs __attribute__((unused)), return 2; } -static my_bool my_ismbhead_ucs2(CHARSET_INFO *cs __attribute__((unused)) , - uint ch __attribute__((unused))) -{ - return 1; -} - static int my_mbcharlen_ucs2(CHARSET_INFO *cs __attribute__((unused)) , uint c __attribute__((unused))) { @@ -3059,7 +3047,6 @@ CHARSET_INFO my_charset_ucs2 = my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ my_ismbchar_ucs2, /* ismbchar */ - my_ismbhead_ucs2, /* ismbhead */ my_mbcharlen_ucs2, /* mbcharlen */ my_numchars_ucs2, my_charpos_ucs2, diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index dea4a096006..9dad5ccac31 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -662,7 +662,6 @@ CHARSET_INFO my_charset_win1250ch = my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ - NULL, /* ismbhead */ NULL, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, |