diff options
author | monty@narttu.mysql.fi <> | 2003-08-29 13:44:35 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-08-29 13:44:35 +0300 |
commit | 77a70a0a24ce658a3ee55248cb2e76f84afc1b88 (patch) | |
tree | aeb2314adbd714c7e2b032209bfd7914e3cfda3d /strings | |
parent | 6cad89775b4ed78c02c2fa9f3e49181f63b7fb65 (diff) | |
parent | 5e04e2370f05bc42437f8be476eba9e204888b65 (diff) | |
download | mariadb-git-77a70a0a24ce658a3ee55248cb2e76f84afc1b88.tar.gz |
merge with 4.0.15
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-tis620.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 643ea77c73e..da212d06a3d 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -51,7 +51,7 @@ #ifdef HAVE_CHARSET_tis620 -static uchar* thai2sortable(const uchar *tstr,uint len); +static uchar* thai2sortable(const uchar *tstr,int len); #define BUFFER_MULTIPLY 4 #define buffsize(s) (BUFFER_MULTIPLY * (strlen(s) + 1)) @@ -458,7 +458,7 @@ uchar NEAR sort_order_tis620[]= /* NOTE: isn't it faster to alloc buffer in calling function? */ -static uchar* thai2sortable(const uchar * tstr,uint len) +static uchar* thai2sortable(const uchar * tstr,int len) { /* We use only 3 levels (neglect capitalization). */ @@ -469,16 +469,16 @@ static uchar* thai2sortable(const uchar * tstr,uint len) uint bufSize; uint RightSize; - len= (uint) strnlen((char*) tstr,len); + len= (int) strnlen((char*) tstr,len); bufSize= (uint) buffsize((char*) tstr); RightSize= sizeof(uchar) * (len + 1); - if (!(outBuf= pLeft1= pRight1= + if (!(outBuf= pLeft1= pRight1= (uchar *)malloc(sizeof(uchar) * bufSize + RightSize*2))) return (uchar*) tstr; pLeft2= pRight2= pRight1 + sizeof(uchar) * bufSize; pLeft3= pRight3= pRight2 + RightSize; - while (--len) + while (--len > 0) { int *t_ctype0= t_ctype[p[0]]; if (isldvowel(*p) && isconsnt(p[1])) @@ -584,8 +584,8 @@ int my_strcoll_tis620(const uchar * s1, const uchar * s2) { uchar *tc1, *tc2; int i; - tc1= thai2sortable(s1, (uint) strlen((char*)s1)); - tc2= thai2sortable(s2, (uint) strlen((char*)s2)); + tc1= thai2sortable(s1, (int) strlen((char*)s1)); + tc2= thai2sortable(s2, (int) strlen((char*)s2)); i= strcmp((char*)tc1, (char*)tc2); free(tc1); free(tc2); |