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
a887fa9e
Commit
a887fa9e
authored
Jun 22, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/tomash/src/mysql_ab/mysql-5.0
into mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug15811
parents
67fd3c4a
15ac6406
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
strings/ctype-mb.c
strings/ctype-mb.c
+12
-8
No files found.
strings/ctype-mb.c
View file @
a887fa9e
...
...
@@ -24,12 +24,12 @@
void
my_caseup_str_mb
(
CHARSET_INFO
*
cs
,
char
*
str
)
{
register
uint32
l
;
register
char
*
end
=
str
+
strlen
(
str
);
/* BAR TODO: remove strlen() call */
register
uchar
*
map
=
cs
->
to_upper
;
while
(
*
str
)
{
if
((
l
=
my_ismbchar
(
cs
,
str
,
end
)))
/* Pointing after the '\0' is safe here. */
if
((
l
=
my_ismbchar
(
cs
,
str
,
str
+
cs
->
mbmaxlen
)))
str
+=
l
;
else
{
...
...
@@ -42,12 +42,12 @@ void my_caseup_str_mb(CHARSET_INFO * cs, char *str)
void
my_casedn_str_mb
(
CHARSET_INFO
*
cs
,
char
*
str
)
{
register
uint32
l
;
register
char
*
end
=
str
+
strlen
(
str
);
register
uchar
*
map
=
cs
->
to_lower
;
while
(
*
str
)
{
if
((
l
=
my_ismbchar
(
cs
,
str
,
end
)))
/* Pointing after the '\0' is safe here. */
if
((
l
=
my_ismbchar
(
cs
,
str
,
str
+
cs
->
mbmaxlen
)))
str
+=
l
;
else
{
...
...
@@ -101,15 +101,18 @@ uint my_casedn_mb(CHARSET_INFO * cs, char *src, uint srclen,
return
srclen
;
}
/*
my_strcasecmp_mb() returns 0 if strings are equal, non-zero otherwise.
*/
int
my_strcasecmp_mb
(
CHARSET_INFO
*
cs
,
const
char
*
s
,
const
char
*
t
)
{
register
uint32
l
;
register
const
char
*
end
=
s
+
strlen
(
s
);
register
uchar
*
map
=
cs
->
to_upper
;
while
(
s
<
end
)
while
(
*
s
&&
*
t
)
{
if
((
l
=
my_ismbchar
(
cs
,
s
,
end
)))
/* Pointing after the '\0' is safe here. */
if
((
l
=
my_ismbchar
(
cs
,
s
,
s
+
cs
->
mbmaxlen
)))
{
while
(
l
--
)
if
(
*
s
++
!=
*
t
++
)
...
...
@@ -120,7 +123,8 @@ int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t)
else
if
(
map
[(
uchar
)
*
s
++
]
!=
map
[(
uchar
)
*
t
++
])
return
1
;
}
return
*
t
;
/* At least one of '*s' and '*t' is zero here. */
return
(
*
t
!=
*
s
);
}
...
...
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