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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
035dae3f
Commit
035dae3f
authored
Mar 07, 2002
by
bar@gw.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@work.mysql.com:/home/bk/mysql-4.1
into gw.udmsearch.izhnet.ru:/usr/home/bar/mysql-4.1
parents
2d0ab219
ab90343a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
69 deletions
+136
-69
include/m_ctype.h
include/m_ctype.h
+70
-36
strings/ctype.c
strings/ctype.c
+66
-33
No files found.
include/m_ctype.h
View file @
035dae3f
...
...
@@ -26,6 +26,76 @@
extern
"C"
{
#endif
#define CHARSET_DIR "charsets/"
typedef
struct
charset_info_st
{
uint
number
;
const
char
*
name
;
uchar
*
ctype
;
uchar
*
to_lower
;
uchar
*
to_upper
;
uchar
*
sort_order
;
uint
strxfrm_multiply
;
int
(
*
strcoll
)(
const
uchar
*
,
const
uchar
*
);
int
(
*
strxfrm
)(
uchar
*
,
const
uchar
*
,
int
);
int
(
*
strnncoll
)(
const
uchar
*
,
int
,
const
uchar
*
,
int
);
int
(
*
strnxfrm
)(
uchar
*
,
const
uchar
*
,
int
,
int
);
my_bool
(
*
like_range
)(
const
char
*
,
uint
,
pchar
,
uint
,
char
*
,
char
*
,
uint
*
,
uint
*
);
uint
mbmaxlen
;
int
(
*
ismbchar
)(
const
char
*
,
const
char
*
);
my_bool
(
*
ismbhead
)(
uint
);
int
(
*
mbcharlen
)(
uint
);
/* Functions for case convertion */
void
(
*
caseup_str
)(
struct
charset_info_st
*
,
uchar
*
);
void
(
*
casedn_str
)(
struct
charset_info_st
*
,
uchar
*
);
void
(
*
caseup
)(
struct
charset_info_st
*
,
uchar
*
,
uint
);
void
(
*
casedn
)(
struct
charset_info_st
*
,
uchar
*
,
uint
);
/* Functions for case comparison */
int
(
*
strcasecmp
)(
struct
charset_info_st
*
,
const
uchar
*
,
const
uchar
*
);
int
(
*
strncasecmp
)(
struct
charset_info_st
*
,
const
uchar
*
,
const
uchar
*
,
uint
);
}
CHARSET_INFO
;
/* strings/ctype.c */
extern
CHARSET_INFO
*
default_charset_info
;
extern
CHARSET_INFO
*
find_compiled_charset
(
uint
cs_number
);
extern
CHARSET_INFO
*
find_compiled_charset_by_name
(
const
char
*
name
);
extern
CHARSET_INFO
compiled_charsets
[];
extern
uint
compiled_charset_number
(
const
char
*
name
);
extern
const
char
*
compiled_charset_name
(
uint
charset_number
);
#define MY_CHARSET_UNDEFINED 0
#define MY_CHARSET_CURRENT (default_charset_info->number)
/* declarations for simple charsets */
extern
int
my_strnxfrm_simple
(
CHARSET_INFO
*
,
uchar
*
,
const
uchar
*
,
int
,
int
);
extern
int
my_strnncoll_simple
(
CHARSET_INFO
*
,
const
uchar
*
,
int
,
const
uchar
*
,
int
);
/* Functions for 8bit */
extern
void
my_caseup_str_8bit
(
CHARSET_INFO
*
,
uchar
*
);
extern
void
my_casedn_str_8bit
(
CHARSET_INFO
*
,
uchar
*
);
extern
void
my_caseup_8bit
(
CHARSET_INFO
*
,
uchar
*
,
uint
);
extern
void
my_casedn_8bit
(
CHARSET_INFO
*
,
uchar
*
,
uint
);
extern
int
my_strcasecmp_8bit
(
CHARSET_INFO
*
cs
,
const
uchar
*
,
const
uchar
*
);
extern
int
my_strncasecmp_8bit
(
CHARSET_INFO
*
cs
,
const
uchar
*
,
const
uchar
*
,
uint
);
/* Functions for multibyte charsets */
extern
void
my_caseup_str_mb
(
CHARSET_INFO
*
,
uchar
*
);
extern
void
my_casedn_str_mb
(
CHARSET_INFO
*
,
uchar
*
);
extern
void
my_caseup_mb
(
CHARSET_INFO
*
,
uchar
*
,
uint
);
extern
void
my_casedn_mb
(
CHARSET_INFO
*
,
uchar
*
,
uint
);
extern
int
my_strcasecmp_mb
(
CHARSET_INFO
*
cs
,
const
uchar
*
,
const
uchar
*
);
extern
int
my_strncasecmp_mb
(
CHARSET_INFO
*
cs
,
const
uchar
*
,
const
uchar
*
t
,
uint
);
/* declarations for the big5 character set */
extern
uchar
ctype_big5
[],
to_lower_big5
[],
to_upper_big5
[],
sort_order_big5
[];
extern
int
my_strcoll_big5
(
const
uchar
*
,
const
uchar
*
);
...
...
@@ -108,42 +178,6 @@ extern my_bool ismbhead_ujis(uint);
extern
int
mbcharlen_ujis
(
uint
);
#define CHARSET_DIR "charsets/"
typedef
struct
charset_info_st
{
uint
number
;
const
char
*
name
;
uchar
*
ctype
;
uchar
*
to_lower
;
uchar
*
to_upper
;
uchar
*
sort_order
;
uint
strxfrm_multiply
;
int
(
*
strcoll
)(
const
uchar
*
,
const
uchar
*
);
int
(
*
strxfrm
)(
uchar
*
,
const
uchar
*
,
int
);
int
(
*
strnncoll
)(
const
uchar
*
,
int
,
const
uchar
*
,
int
);
int
(
*
strnxfrm
)(
uchar
*
,
const
uchar
*
,
int
,
int
);
my_bool
(
*
like_range
)(
const
char
*
,
uint
,
pchar
,
uint
,
char
*
,
char
*
,
uint
*
,
uint
*
);
uint
mbmaxlen
;
int
(
*
ismbchar
)(
const
char
*
,
const
char
*
);
my_bool
(
*
ismbhead
)(
uint
);
int
(
*
mbcharlen
)(
uint
);
}
CHARSET_INFO
;
/* strings/ctype.c */
extern
CHARSET_INFO
*
default_charset_info
;
extern
CHARSET_INFO
*
find_compiled_charset
(
uint
cs_number
);
extern
CHARSET_INFO
*
find_compiled_charset_by_name
(
const
char
*
name
);
extern
CHARSET_INFO
compiled_charsets
[];
extern
uint
compiled_charset_number
(
const
char
*
name
);
extern
const
char
*
compiled_charset_name
(
uint
charset_number
);
#define MY_CHARSET_UNDEFINED 0
#define MY_CHARSET_CURRENT (default_charset_info->number)
/* Don't include std ctype.h when this is included */
#define _CTYPE_H
#define _CTYPE_H_
...
...
strings/ctype.c
View file @
035dae3f
...
...
@@ -1975,7 +1975,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -1996,7 +1997,8 @@ CHARSET_INFO compiled_charsets[] = {
2
,
/* mbmaxlen */
ismbchar_big5
,
ismbhead_big5
,
mbcharlen_big5
mbcharlen_big5
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2017,7 +2019,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2038,7 +2041,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2059,7 +2063,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2080,7 +2085,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2101,7 +2107,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2122,7 +2129,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2143,7 +2151,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2164,7 +2173,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2185,7 +2195,8 @@ CHARSET_INFO compiled_charsets[] = {
2
,
/* mbmaxlen */
ismbchar_euc_kr
,
ismbhead_euc_kr
,
mbcharlen_euc_kr
mbcharlen_euc_kr
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2206,7 +2217,8 @@ CHARSET_INFO compiled_charsets[] = {
2
,
/* mbmaxlen */
ismbchar_gb2312
,
ismbhead_gb2312
,
mbcharlen_gb2312
mbcharlen_gb2312
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2227,7 +2239,8 @@ CHARSET_INFO compiled_charsets[] = {
2
,
/* mbmaxlen */
ismbchar_gbk
,
ismbhead_gbk
,
mbcharlen_gbk
mbcharlen_gbk
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2248,7 +2261,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2269,7 +2283,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2290,7 +2305,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2311,7 +2327,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2332,7 +2349,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2353,7 +2371,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2374,7 +2393,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2395,7 +2415,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2416,7 +2437,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2437,7 +2459,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2458,7 +2481,8 @@ CHARSET_INFO compiled_charsets[] = {
2
,
/* mbmaxlen */
ismbchar_sjis
,
ismbhead_sjis
,
mbcharlen_sjis
mbcharlen_sjis
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2479,7 +2503,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2500,7 +2525,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2521,7 +2547,8 @@ CHARSET_INFO compiled_charsets[] = {
3
,
/* mbmaxlen */
ismbchar_ujis
,
ismbhead_ujis
,
mbcharlen_ujis
mbcharlen_ujis
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2542,7 +2569,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2563,7 +2591,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2584,7 +2613,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2605,7 +2635,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2626,7 +2657,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
/* mbmaxlen */
NULL
,
/* ismbchar */
NULL
,
/* ismbhead */
NULL
/* mbcharlen */
NULL
,
/* mbcharlen */
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
},
#endif
...
...
@@ -2646,7 +2678,8 @@ CHARSET_INFO compiled_charsets[] = {
0
,
NULL
,
NULL
,
NULL
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
}
};
...
...
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