summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-big5.c6
-rw-r--r--strings/ctype-bin.c10
-rw-r--r--strings/ctype-cp932.c6
-rw-r--r--strings/ctype-czech.c4
-rw-r--r--strings/ctype-euc_kr.c8
-rw-r--r--strings/ctype-eucjpms.c26
-rw-r--r--strings/ctype-gb2312.c8
-rw-r--r--strings/ctype-gbk.c8
-rw-r--r--strings/ctype-latin1.c4
-rw-r--r--strings/ctype-simple.c6
-rw-r--r--strings/ctype-sjis.c8
-rw-r--r--strings/ctype-tis620.c4
-rw-r--r--strings/ctype-ucs2.c4
-rw-r--r--strings/ctype-ujis.c26
-rw-r--r--strings/ctype-utf8.c24
15 files changed, 76 insertions, 76 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index c1efc08e012..3f604abde2e 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6275,7 +6275,7 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
int hi=s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi<0x80)
{
@@ -6284,10 +6284,10 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 557f8f76647..e35aee79fd1 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -246,7 +246,7 @@ static int my_mb_wc_bin(CHARSET_INFO *cs __attribute__((unused)),
const unsigned char *end __attribute__((unused)))
{
if (str >= end)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
*wc=str[0];
return 1;
@@ -295,10 +295,10 @@ void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
#define INC_PTR(cs,A,B) (A)++
-static int my_wildcmp_bin(CHARSET_INFO *cs,
- const char *str,const char *str_end,
- const char *wildstr,const char *wildend,
- int escape, int w_one, int w_many)
+int my_wildcmp_bin(CHARSET_INFO *cs,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many)
{
int result= -1; /* Not found, using wildcards */
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index 38f625916a0..a1c2812c6f6 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -5355,7 +5355,7 @@ my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
int hi=s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi < 0x80)
{
@@ -5370,10 +5370,10 @@ my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_cp932_uni_onechar((hi<<8)+s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index fa3a3bf53fe..d9f95868d6d 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -356,7 +356,7 @@ static int my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
#ifdef REAL_MYSQL
-#define min_sort_char 0
+#define min_sort_char ' '
#define max_sort_char '9'
#define EXAMPLE
@@ -595,7 +595,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
my_strnxfrm_czech,
my_strnxfrmlen_simple,
my_like_range_czech,
- my_wildcmp_8bit,
+ my_wildcmp_bin,
my_strcasecmp_8bit,
my_instr_simple,
my_hash_sort_simple,
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 4ed25f8ee6f..6dc5ccdfe2a 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8601,7 +8601,7 @@ my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_ILUNI;
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
@@ -8617,7 +8617,7 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
int hi=s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi<0x80)
{
@@ -8626,10 +8626,10 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 4fb2bbbd0a7..0f59cc2b305 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -243,7 +243,7 @@ my_mb_wc_jisx0201(CHARSET_INFO *cs __attribute__((unused)),
const uchar *e __attribute__((unused)))
{
wc[0]=tab_jisx0201_uni[*s];
- return (!wc[0] && s[0]) ? MY_CS_ILSEQ : 1;
+ return (!wc[0] && s[0]) ? -1 : 1;
}
@@ -8473,7 +8473,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
int c1,c2,c3;
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
c1=s[0];
@@ -8485,7 +8485,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
c2=s[1];
@@ -8500,7 +8500,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
{
pwc[0]=my_jisx0208_uni_onechar( ((c1-0x80) << 8) + (c2-0x80));
if (!pwc[0])
- return MY_CS_ILSEQ;
+ return -2;
}
else
{
@@ -8520,7 +8520,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
ret = my_mb_wc_jisx0201(cs,pwc,s+1,e);
if (ret!=1)
- return ret;
+ return -2;
return 2;
}
@@ -8531,7 +8531,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
return MY_CS_ILSEQ;
if (s+3>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL3;
c3=s[2];
if (c3 < 0xA1 || c3>=0xFF)
@@ -8540,8 +8540,8 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
if (c2<0xF5)
{
pwc[0]=my_jisx0212_uni_onechar((c2-0x80)*256 + (c3-0x80));
- if (!pwc)
- return MY_CS_ILSEQ;
+ if (!pwc[0])
+ return -3;
}
else
{
@@ -8572,7 +8572,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if ((jp=my_uni_jisx0208_onechar(wc)))
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
jp+=0x8080;
s[0]=jp>>8;
@@ -8584,7 +8584,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (my_wc_mb_jisx0201(c,wc,s,e) == 1)
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
s[1]= s[0];
s[0]= 0x8E;
return 2;
@@ -8594,7 +8594,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if ((jp=my_uni_jisx0212_onechar(wc)))
{
if (s+3>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL3;
jp+=0x8080;
s[0]=0x8F;
@@ -8608,7 +8608,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (wc>=0xE000 && wc<0xE3AC)
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
c1=((unsigned)(wc-0xE000)/94)+0xF5;
s[0]=c1;
@@ -8622,7 +8622,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (wc>=0xE3AC && wc<0xE758)
{
if (s+3>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL3;
s[0]=0x8F;
c1=((unsigned)(wc-0xE3AC)/94)+0xF5;
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index 109a89ef907..8d0bc80e695 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5651,7 +5651,7 @@ my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_ILUNI;
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
@@ -5668,7 +5668,7 @@ my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
hi=(int) s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi<0x80)
{
@@ -5677,10 +5677,10 @@ my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 7d45969d251..7eb332da3bd 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -9902,7 +9902,7 @@ my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_ILUNI;
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
@@ -9916,7 +9916,7 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
int hi;
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
hi=s[0];
@@ -9927,10 +9927,10 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index 3dae13cfadc..95ea87114d6 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -363,10 +363,10 @@ int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)),
const unsigned char *end __attribute__((unused)))
{
if (str >= end)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
*wc=cs_to_uni[*str];
- return (!wc[0] && str[0]) ? MY_CS_ILSEQ : 1;
+ return (!wc[0] && str[0]) ? -1 : 1;
}
static
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 17d828b0ff5..7dd3dfca29a 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -239,10 +239,10 @@ int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc,
const unsigned char *end __attribute__((unused)))
{
if (str >= end)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
*wc=cs->tab_to_uni[*str];
- return (!wc[0] && str[0]) ? MY_CS_ILSEQ : 1;
+ return (!wc[0] && str[0]) ? -1 : 1;
}
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
@@ -1360,7 +1360,7 @@ int my_mb_ctype_8bit(CHARSET_INFO *cs, int *ctype,
if (s >= e)
{
*ctype= 0;
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
}
*ctype= cs->ctype[*s];
return 1;
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index bf70b4a05db..59156e444c1 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4516,7 +4516,7 @@ my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
mb:
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
@@ -4530,7 +4530,7 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
int hi=s[0];
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (hi < 0x80)
{
@@ -4545,10 +4545,10 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!(pwc[0]=func_sjis_uni_onechar((hi<<8)+s[1])))
- return MY_CS_ILSEQ;
+ return -2;
return 2;
}
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 2ae0142d510..98cc41dd26f 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -827,10 +827,10 @@ int my_mb_wc_tis620(CHARSET_INFO *cs __attribute__((unused)),
const unsigned char *end __attribute__((unused)))
{
if (str >= end)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
*wc=cs_to_uni[*str];
- return (!wc[0] && str[0]) ? MY_CS_ILSEQ : 1;
+ return (!wc[0] && str[0]) ? -1 : 1;
}
static
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 9b9e4aedff3..2ab2fdc1657 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -94,7 +94,7 @@ static int my_ucs2_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
if (s+2 > e) /* Need 2 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
*pwc= ((unsigned char)s[0]) * 256 + ((unsigned char)s[1]);
return 2;
@@ -104,7 +104,7 @@ static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index a3e48a704f4..06c4540e464 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -242,7 +242,7 @@ my_mb_wc_jisx0201(CHARSET_INFO *cs __attribute__((unused)),
const uchar *e __attribute__((unused)))
{
wc[0]=tab_jisx0201_uni[*s];
- return (!wc[0] && s[0]) ? MY_CS_ILSEQ : 1;
+ return (!wc[0] && s[0]) ? -1 : 1;
}
@@ -8341,7 +8341,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
int c1,c2,c3;
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
c1=s[0];
@@ -8353,7 +8353,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
}
if (s+2>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
c2=s[1];
@@ -8368,7 +8368,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
{
pwc[0]=my_jisx0208_uni_onechar( ((c1-0x80) << 8) + (c2-0x80));
if (!pwc[0])
- return MY_CS_ILSEQ;
+ return -2;
}
else
{
@@ -8388,7 +8388,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
ret = my_mb_wc_jisx0201(cs,pwc,s+1,e);
if (ret!=1)
- return ret;
+ return -2;
return 2;
}
@@ -8399,7 +8399,7 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
return MY_CS_ILSEQ;
if (s+3>e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL3;
c3=s[2];
if (c3 < 0xA1 || c3>=0xFF)
@@ -8408,8 +8408,8 @@ my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
if (c2<0xF5)
{
pwc[0]=my_jisx0212_uni_onechar((c2-0x80)*256 + (c3-0x80));
- if (!pwc)
- return MY_CS_ILSEQ;
+ if (!pwc[0])
+ return -3;
}
else
{
@@ -8440,7 +8440,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if ((jp=my_uni_jisx0208_onechar(wc)))
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
jp+=0x8080;
s[0]=jp>>8;
@@ -8452,7 +8452,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (my_wc_mb_jisx0201(c,wc,s,e) == 1)
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
s[1]= s[0];
s[0]= 0x8E;
return 2;
@@ -8462,7 +8462,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if ((jp=my_uni_jisx0212_onechar(wc)))
{
if (s+3>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL3;
jp+=0x8080;
s[0]=0x8F;
@@ -8476,7 +8476,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (wc>=0xE000 && wc<0xE3AC)
{
if (s+2>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL2;
c1=((unsigned)(wc-0xE000)/94)+0xF5;
s[0]=c1;
@@ -8490,7 +8490,7 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e)
if (wc>=0xE3AC && wc<0xE758)
{
if (s+3>e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL3;
s[0]=0x8F;
c1=((unsigned)(wc-0xE3AC)/94)+0xF5;
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 27f3a57883c..e3bba3ee1e3 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1949,7 +1949,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
unsigned char c;
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
@@ -1962,7 +1962,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
else if (c < 0xe0)
{
if (s+2 > e) /* We need 2 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL2;
if (!((s[1] ^ 0x80) < 0x40))
return MY_CS_ILSEQ;
@@ -1973,7 +1973,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
else if (c < 0xf0)
{
if (s+3 > e) /* We need 3 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL3;
if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && (c >= 0xe1 || s[1] >= 0xa0)))
return MY_CS_ILSEQ;
@@ -1988,7 +1988,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
else if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32)
{
if (s+4 > e) /* We need 4 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL4;
if (!((s[1] ^ 0x80) < 0x40 &&
(s[2] ^ 0x80) < 0x40 &&
@@ -2006,7 +2006,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
else if (c < 0xfc && sizeof(my_wc_t)*8 >= 32)
{
if (s+5 >e) /* We need 5 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL5;
if (!((s[1] ^ 0x80) < 0x40 &&
(s[2] ^ 0x80) < 0x40 &&
@@ -2025,7 +2025,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
else if (c < 0xfe && sizeof(my_wc_t)*8 >= 32)
{
if ( s+6 >e ) /* We need 6 characters */
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL6;
if (!((s[1] ^ 0x80) < 0x40 &&
(s[2] ^ 0x80) < 0x40 &&
@@ -2076,7 +2076,7 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)) ,
Because of it (r+count > e), not (r+count-1 >e )
*/
if ( r+count > e )
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALLN(count);
switch (count) {
/* Fall through all cases!!! */
@@ -3917,7 +3917,7 @@ my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
{
int byte1, byte2;
if (s >= e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL;
if (*s < 128 && filename_safe_char[*s])
{
@@ -3929,7 +3929,7 @@ my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_ILSEQ;
if (s + 3 > e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL3;
byte1= s[1];
byte2= s[2];
@@ -3946,7 +3946,7 @@ my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)),
}
if (s + 4 > e)
- return MY_CS_TOOFEW(0);
+ return MY_CS_TOOSMALL4;
if ((byte1= hexlo(byte1)) >= 0 &&
(byte2= hexlo(byte2)) >= 0)
@@ -3977,7 +3977,7 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
}
if (s + 3 > e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL3;
*s++= MY_FILENAME_ESCAPE;
if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) ||
@@ -3993,7 +3993,7 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
/* Non letter */
if (s + 5 > e)
- return MY_CS_TOOSMALL;
+ return MY_CS_TOOSMALL5;
*s++= hex[(wc >> 12) & 15];
*s++= hex[(wc >> 8) & 15];