Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3d41d577
Commit
3d41d577
authored
Aug 21, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crash BUG#1116 fixed
parent
071ec768
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
strings/ctype-tis620.c
strings/ctype-tis620.c
+7
-7
No files found.
strings/ctype-tis620.c
View file @
3d41d577
...
...
@@ -49,7 +49,7 @@
#include "m_ctype.h"
#include "t_ctype.h"
static
uchar
*
thai2sortable
(
const
uchar
*
tstr
,
u
int
len
);
static
uchar
*
thai2sortable
(
const
uchar
*
tstr
,
int
len
);
#define BUFFER_MULTIPLY 4
#define buffsize(s) (BUFFER_MULTIPLY * (strlen(s) + 1))
...
...
@@ -456,7 +456,7 @@ uchar NEAR sort_order_tis620[]=
/*
NOTE: isn't it faster to alloc buffer in calling function?
*/
static
uchar
*
thai2sortable
(
const
uchar
*
tstr
,
u
int
len
)
static
uchar
*
thai2sortable
(
const
uchar
*
tstr
,
int
len
)
{
/* We use only 3 levels (neglect capitalization). */
...
...
@@ -467,7 +467,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
uint
bufSize
;
uint
RightSize
;
len
=
(
u
int
)
strnlen
((
char
*
)
tstr
,
len
);
len
=
(
int
)
strnlen
((
char
*
)
tstr
,
len
);
bufSize
=
(
uint
)
buffsize
((
char
*
)
tstr
);
RightSize
=
sizeof
(
uchar
)
*
(
len
+
1
);
if
(
!
(
outBuf
=
pLeft1
=
pRight1
=
...
...
@@ -476,7 +476,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len)
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
]))
...
...
@@ -567,8 +567,8 @@ int my_strcoll_tis620(const uchar * s1, const uchar * s2)
{
uchar
*
tc1
,
*
tc2
;
int
i
;
tc1
=
thai2sortable
(
s1
,
(
u
int
)
strlen
((
char
*
)
s1
));
tc2
=
thai2sortable
(
s2
,
(
u
int
)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment