summaryrefslogtreecommitdiff
path: root/strings/ctype-utf8.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-03-23 14:14:32 +0400
committerunknown <bar@mysql.com>2006-03-23 14:14:32 +0400
commita7b26aa730af97621ad18b7a447ae83802e11a5b (patch)
tree53884b9ab5ed87409c40a2d1bb53db98dfacc7ef /strings/ctype-utf8.c
parentbea8e074fe61867078916a91cf77e2f9606702bd (diff)
parent63fde46222422294b658cbacc35e2ffbc924776d (diff)
downloadmariadb-git-a7b26aa730af97621ad18b7a447ae83802e11a5b.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.0
into mysql.com:/usr/home/bar/mysql-5.1-new mysql-test/r/ctype_ujis.result: Auto merged mysql-test/t/ctype_ujis.test: Auto merged strings/ctype-big5.c: Auto merged strings/ctype-bin.c: Auto merged strings/ctype-cp932.c: Auto merged strings/ctype-euc_kr.c: Auto merged strings/ctype-eucjpms.c: Auto merged strings/ctype-gb2312.c: Auto merged strings/ctype-gbk.c: Auto merged strings/ctype-latin1.c: Auto merged strings/ctype-simple.c: Auto merged strings/ctype-sjis.c: Auto merged strings/ctype-tis620.c: Auto merged strings/ctype-ucs2.c: Auto merged strings/ctype-ujis.c: Auto merged strings/ctype-utf8.c: Auto merged include/m_ctype.h: After merge fix.
Diffstat (limited to 'strings/ctype-utf8.c')
-rw-r--r--strings/ctype-utf8.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 27f3a57883c..0c3c6c7cdc2 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!!! */