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
1ebab2be
Commit
1ebab2be
authored
Mar 19, 2002
by
bar@gw.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure.in/Makefile.in charset related things are now earier to maintain
Fixes in charset related C++ code
parent
b226bad6
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
102 additions
and
59 deletions
+102
-59
configure.in
configure.in
+5
-26
include/m_ctype.h
include/m_ctype.h
+20
-1
libmysql/Makefile.shared
libmysql/Makefile.shared
+6
-5
sql/item_func.cc
sql/item_func.cc
+5
-5
sql/item_strfunc.cc
sql/item_strfunc.cc
+16
-16
strings/Makefile.am
strings/Makefile.am
+6
-6
strings/ctype-big5.c
strings/ctype-big5.c
+4
-0
strings/ctype-czech.c
strings/ctype-czech.c
+4
-0
strings/ctype-euc_kr.c
strings/ctype-euc_kr.c
+5
-0
strings/ctype-gb2312.c
strings/ctype-gb2312.c
+4
-0
strings/ctype-gbk.c
strings/ctype-gbk.c
+5
-0
strings/ctype-latin1_de.c
strings/ctype-latin1_de.c
+4
-0
strings/ctype-mb.c
strings/ctype-mb.c
+4
-0
strings/ctype-sjis.c
strings/ctype-sjis.c
+5
-0
strings/ctype-tis620.c
strings/ctype-tis620.c
+4
-0
strings/ctype-ujis.c
strings/ctype-ujis.c
+5
-0
No files found.
configure.in
View file @
1ebab2be
...
...
@@ -1869,6 +1869,7 @@ CHARSETS_AVAILABLE="armscii8 big5 cp1251 cp1257
latin1 latin1_de latin2 latin5 sjis swe7 tis620 ujis
usa7 utf8 win1250 win1251ukr"
CHARSETS_DEPRECATED
=
"win1251"
CHARSETS_COMPLEX
=
"big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis"
DEFAULT_CHARSET
=
latin1
AC_DIVERT_POP
...
...
@@ -1889,15 +1890,11 @@ AC_MSG_CHECKING("character sets")
if
test
"
$extra_charsets
"
=
none
;
then
CHARSETS
=
""
elif
test
"
$extra_charsets
"
=
complex
;
then
CHARSETS
=
`
/bin/ls
-1
$srcdir
/strings/ctype-
*
.c |
\
sed
-e
's;^.*/ctype-;;'
-e
's;.c$;;'
`
CHARSETS
=
`
echo
$CHARSETS
`
# get rid of line breaks
CHARSETS
=
"
$CHARSETS_COMPLEX
"
elif
test
"
$extra_charsets
"
=
all
;
then
CHARSETS
=
"
$CHARSETS_AVAILABLE
$CHARSETS_DEPRECATED
"
else
if
test
"
$extra_charsets
"
=
all
;
then
CHARSETS
=
"
$CHARSETS_AVAILABLE
$CHARSETS_DEPRECATED
"
else
CHARSETS
=
`
echo
$extra_charsets
|
sed
-e
's/,/ /g'
`
fi
CHARSETS
=
`
echo
$extra_charsets
|
sed
-e
's/,/ /g'
`
fi
use_mb
=
"no"
...
...
@@ -2018,19 +2015,6 @@ do
esac
done
CHARSET_SRCS
=
""
CHARSETS_NEED_SOURCE
=
""
for
c
in
$CHARSETS
do
cs_file
=
"
$srcdir
/strings/ctype-
$c
.c"
if
test
-f
$cs_file
then
CHARSET_SRCS
=
"
${
CHARSET_SRCS
}
ctype-
$c
.c "
CHARSETS_NEED_SOURCE
=
"
$CHARSETS_NEED_SOURCE
$c
"
fi
done
if
test
"
$use_mb
"
=
"yes"
then
AC_DEFINE
(
USE_MB
)
...
...
@@ -2042,11 +2026,6 @@ AC_DEFINE(USE_STRCOLL)
AC_SUBST
(
default_charset
)
AC_DEFINE_UNQUOTED
(
DEFAULT_CHARSET_NAME,
"
$default_charset
"
)
AC_SUBST
(
CHARSET_SRCS
)
CHARSET_OBJS
=
"
`
echo
"
$CHARSET_SRCS
"
|
sed
-e
's/\.c /.o /g'
`
"
AC_SUBST
(
CHARSET_OBJS
)
AC_SUBST
(
CHARSETS_NEED_SOURCE
)
AC_MSG_RESULT
([
default:
$default_charset
;
compiled
in
:
$CHARSETS
])
...
...
include/m_ctype.h
View file @
1ebab2be
...
...
@@ -90,15 +90,17 @@ extern void my_casedn_8bit(CHARSET_INFO *, char *, uint);
extern
int
my_strcasecmp_8bit
(
CHARSET_INFO
*
cs
,
const
char
*
,
const
char
*
);
extern
int
my_strncasecmp_8bit
(
CHARSET_INFO
*
cs
,
const
char
*
,
const
char
*
,
uint
);
#ifdef USE_MB
/* Functions for multibyte charsets */
extern
void
my_caseup_str_mb
(
CHARSET_INFO
*
,
char
*
);
extern
void
my_casedn_str_mb
(
CHARSET_INFO
*
,
char
*
);
extern
void
my_caseup_mb
(
CHARSET_INFO
*
,
char
*
,
uint
);
extern
void
my_casedn_mb
(
CHARSET_INFO
*
,
char
*
,
uint
);
extern
int
my_strcasecmp_mb
(
CHARSET_INFO
*
cs
,
const
char
*
,
const
char
*
);
extern
int
my_strncasecmp_mb
(
CHARSET_INFO
*
cs
,
const
char
*
,
const
char
*
t
,
uint
);
#endif
#ifdef HAVE_CHARSET_big5
/* declarations for the big5 character set */
extern
uchar
ctype_big5
[],
to_lower_big5
[],
to_upper_big5
[],
sort_order_big5
[];
extern
int
my_strnncoll_big5
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
...
...
@@ -108,7 +110,9 @@ extern my_bool my_like_range_big5(CHARSET_INFO *,const char *, uint, pchar, uint
extern
int
ismbchar_big5
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_big5
(
uint
);
extern
int
mbcharlen_big5
(
uint
);
#endif
#ifdef HAVE_CHARSET_czech
/* declarations for the czech character set */
extern
uchar
ctype_czech
[],
to_lower_czech
[],
to_upper_czech
[],
sort_order_czech
[];
extern
int
my_strnncoll_czech
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
...
...
@@ -116,19 +120,25 @@ extern int my_strnxfrm_czech(CHARSET_INFO *, uchar *, uint, const uchar *, u
extern
my_bool
my_like_range_czech
(
CHARSET_INFO
*
,
const
char
*
,
uint
,
pchar
,
uint
,
char
*
,
char
*
,
uint
*
,
uint
*
);
#endif
#ifdef HAVE_CHARSET_euc_kr
/* declarations for the euc_kr character set */
extern
uchar
ctype_euc_kr
[],
to_lower_euc_kr
[],
to_upper_euc_kr
[],
sort_order_euc_kr
[];
extern
int
ismbchar_euc_kr
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_euc_kr
(
uint
);
extern
int
mbcharlen_euc_kr
(
uint
);
#endif
#ifdef HAVE_CHARSET_gb2312
/* declarations for the gb2312 character set */
extern
uchar
ctype_gb2312
[],
to_lower_gb2312
[],
to_upper_gb2312
[],
sort_order_gb2312
[];
extern
int
ismbchar_gb2312
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_gb2312
(
uint
);
extern
int
mbcharlen_gb2312
(
uint
);
#endif
#ifdef HAVE_CHARSET_gbk
/* declarations for the gbk character set */
extern
uchar
ctype_gbk
[],
to_lower_gbk
[],
to_upper_gbk
[],
sort_order_gbk
[];
extern
int
my_strnncoll_gbk
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
...
...
@@ -138,14 +148,18 @@ extern my_bool my_like_range_gbk(CHARSET_INFO *, const char *, uint, pchar, uint
extern
int
ismbchar_gbk
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_gbk
(
uint
);
extern
int
mbcharlen_gbk
(
uint
);
#endif
#ifdef HAVE_CHARSET_latin1_de
/* declarations for the latin1_de character set */
extern
uchar
ctype_latin1_de
[],
to_lower_latin1_de
[],
to_upper_latin1_de
[],
sort_order_latin1_de
[];
extern
int
my_strnncoll_latin1_de
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
extern
int
my_strnxfrm_latin1_de
(
CHARSET_INFO
*
,
uchar
*
,
uint
,
const
uchar
*
,
uint
);
extern
my_bool
my_like_range_latin1_de
(
CHARSET_INFO
*
,
const
char
*
,
uint
,
pchar
,
uint
,
char
*
,
char
*
,
uint
*
,
uint
*
);
#endif
#ifdef HAVE_CHARSET_sjis
/* declarations for the sjis character set */
extern
uchar
ctype_sjis
[],
to_lower_sjis
[],
to_upper_sjis
[],
sort_order_sjis
[];
extern
int
my_strnncoll_sjis
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
...
...
@@ -155,19 +169,24 @@ extern my_bool my_like_range_sjis(CHARSET_INFO *, const char *, uint, pchar, uin
extern
int
ismbchar_sjis
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_sjis
(
uint
);
extern
int
mbcharlen_sjis
(
uint
);
#endif
#ifdef HAVE_CHARSET_tis620
/* declarations for the tis620 character set */
extern
uchar
ctype_tis620
[],
to_lower_tis620
[],
to_upper_tis620
[],
sort_order_tis620
[];
extern
int
my_strnncoll_tis620
(
CHARSET_INFO
*
,
const
uchar
*
,
uint
,
const
uchar
*
,
uint
);
extern
int
my_strnxfrm_tis620
(
CHARSET_INFO
*
,
uchar
*
,
uint
,
const
uchar
*
,
uint
);
extern
my_bool
my_like_range_tis620
(
CHARSET_INFO
*
,
const
char
*
,
uint
,
pchar
,
uint
,
char
*
,
char
*
,
uint
*
,
uint
*
);
#endif
#ifdef HAVE_CHARSET_ujis
/* declarations for the ujis character set */
extern
uchar
ctype_ujis
[],
to_lower_ujis
[],
to_upper_ujis
[],
sort_order_ujis
[];
extern
int
ismbchar_ujis
(
const
char
*
,
const
char
*
);
extern
my_bool
ismbhead_ujis
(
uint
);
extern
int
mbcharlen_ujis
(
uint
);
#endif
#define _U 01
/* Upper case */
...
...
libmysql/Makefile.shared
View file @
1ebab2be
...
...
@@ -27,9 +27,6 @@ pkglib_LTLIBRARIES = $(target)
noinst_PROGRAMS
=
conf_to_src
# We need .lo, not .o files for everything.
CHARSET_OBJS
=
@CHARSET_OBJS@
LTCHARSET_OBJS
=
${CHARSET_OBJS:.o=.lo}
target_sources
=
libmysql.c net.c password.c manager.c
\
get_password.c errmsg.c
...
...
@@ -41,7 +38,11 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
strcend.lo bcmp.lo
\
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo
\
strtoull.lo strtoll.lo llstr.lo
\
ctype.lo ctype-simple.lo ctype-mb.lo
$(LTCHARSET_OBJS)
ctype.lo ctype-simple.lo ctype-mb.lo
\
ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo
\
ctype-gb2312.lo ctype-gbk.lo ctype-latin1_de.lo
\
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo
mystringsextra
=
strto.c
dbugobjects
=
dbug.lo
# IT IS IN SAFEMALLOC.C sanity.lo
mysysheaders
=
mysys_priv.h my_static.h
...
...
@@ -74,7 +75,7 @@ DEFS = -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
-DSHAREDIR
=
"
\"
$(MYSQLSHAREdir)
\"
"
$(target_defs)
# The automatic dependencies miss this
bmove_upp.lo
:
$(LTCHARSET_OBJS)
#
bmove_upp.lo: $(LTCHARSET_OBJS)
clean-local
:
rm
-f
`
echo
$(mystringsobjects)
|
sed
"s;
\.
lo;.c;g"
`
\
...
...
sql/item_func.cc
View file @
1ebab2be
...
...
@@ -830,7 +830,7 @@ longlong Item_func_locate::val_int()
{
start
=
(
uint
)
args
[
2
]
->
val_int
()
-
1
;
#ifdef USE_MB
if
(
use_mb
(
a
->
str_charset
))
if
(
use_mb
(
a
->
charset
()
))
{
start0
=
start
;
if
(
!
binary_str
)
...
...
@@ -843,7 +843,7 @@ longlong Item_func_locate::val_int()
if
(
!
b
->
length
())
// Found empty string at start
return
(
longlong
)
(
start
+
1
);
#ifdef USE_MB
if
(
use_mb
(
a
->
str_charset
)
&&
!
binary_str
)
if
(
use_mb
(
a
->
charset
()
)
&&
!
binary_str
)
{
const
char
*
ptr
=
a
->
ptr
()
+
start
;
const
char
*
search
=
b
->
ptr
();
...
...
@@ -862,7 +862,7 @@ longlong Item_func_locate::val_int()
return
(
longlong
)
start0
+
1
;
}
skipp:
if
((
l
=
my_ismbchar
(
a
->
str_charset
,
ptr
,
strend
)))
ptr
+=
l
;
if
((
l
=
my_ismbchar
(
a
->
charset
()
,
ptr
,
strend
)))
ptr
+=
l
;
else
++
ptr
;
++
start0
;
}
...
...
@@ -913,10 +913,10 @@ longlong Item_func_ord::val_int()
null_value
=
0
;
if
(
!
res
->
length
())
return
0
;
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
args
[
0
]
->
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
args
[
0
]
->
binary
)
{
register
const
char
*
str
=
res
->
ptr
();
register
uint32
n
=
0
,
l
=
my_ismbchar
(
res
->
str_charset
,
str
,
str
+
res
->
length
());
register
uint32
n
=
0
,
l
=
my_ismbchar
(
res
->
charset
()
,
str
,
str
+
res
->
length
());
if
(
!
l
)
return
(
longlong
)((
uchar
)
*
str
);
while
(
l
--
)
n
=
(
n
<<
8
)
|
(
uint32
)((
uchar
)
*
str
++
);
...
...
sql/item_strfunc.cc
View file @
1ebab2be
...
...
@@ -510,7 +510,7 @@ String *Item_func_reverse::val_str(String *str)
ptr
=
(
char
*
)
res
->
ptr
();
end
=
ptr
+
res
->
length
();
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
String
tmpstr
;
tmpstr
.
copy
(
*
res
);
...
...
@@ -518,7 +518,7 @@ String *Item_func_reverse::val_str(String *str)
register
uint32
l
;
while
(
ptr
<
end
)
{
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
end
)))
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
end
)))
tmp
-=
l
,
memcpy
(
tmp
,
ptr
,
l
),
ptr
+=
l
;
else
*--
tmp
=*
ptr
++
;
...
...
@@ -573,7 +573,7 @@ String *Item_func_replace::val_str(String *str)
goto
null
;
#ifdef USE_MB
binary_str
=
(
args
[
0
]
->
binary
||
args
[
1
]
->
binary
||
!
use_mb
(
res
->
str_charset
));
binary_str
=
(
args
[
0
]
->
binary
||
args
[
1
]
->
binary
||
!
use_mb
(
res
->
charset
()
));
#endif
if
(
res2
->
length
()
==
0
)
...
...
@@ -621,7 +621,7 @@ String *Item_func_replace::val_str(String *str)
goto
redo
;
}
skipp:
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
strend
)))
ptr
+=
l
;
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
strend
)))
ptr
+=
l
;
else
++
ptr
;
}
}
...
...
@@ -679,7 +679,7 @@ String *Item_func_insert::val_str(String *str)
args
[
3
]
->
null_value
)
goto
null
;
/* purecov: inspected */
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
args
[
0
]
->
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
args
[
0
]
->
binary
)
{
start
=
res
->
charpos
(
start
);
length
=
res
->
charpos
(
length
,
start
);
...
...
@@ -751,7 +751,7 @@ String *Item_func_left::val_str(String *str)
if
(
length
<=
0
)
return
&
empty_string
;
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
length
=
res
->
charpos
(
length
);
#endif
if
(
res
->
length
()
>
(
ulong
)
length
)
...
...
@@ -799,7 +799,7 @@ String *Item_func_right::val_str(String *str)
if
(
res
->
length
()
<=
(
uint
)
length
)
return
res
;
/* purecov: inspected */
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
uint
start
=
res
->
numchars
()
-
(
uint
)
length
;
if
(
start
<=
0
)
return
res
;
...
...
@@ -832,7 +832,7 @@ String *Item_func_substr::val_str(String *str)
(
arg_count
==
3
&&
args
[
2
]
->
null_value
))))
return
0
;
/* purecov: inspected */
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
start
=
res
->
charpos
(
start
);
length
=
res
->
charpos
(
length
,
start
);
...
...
@@ -892,7 +892,7 @@ String *Item_func_substr_index::val_str(String *str)
return
&
empty_string
;
// Wrong parameters
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
const
char
*
ptr
=
res
->
ptr
();
const
char
*
strend
=
ptr
+
res
->
length
();
...
...
@@ -917,7 +917,7 @@ String *Item_func_substr_index::val_str(String *str)
continue
;
}
skipp:
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
strend
)))
ptr
+=
l
;
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
strend
)))
ptr
+=
l
;
else
++
ptr
;
}
/* either not found or got total number when count<0 */
if
(
pass
==
0
)
/* count<0 */
...
...
@@ -1046,11 +1046,11 @@ String *Item_func_rtrim::val_str(String *str)
{
char
chr
=
(
*
remove_str
)[
0
];
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
while
(
ptr
<
end
)
{
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
end
)))
ptr
+=
l
,
p
=
ptr
;
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
end
)))
ptr
+=
l
,
p
=
ptr
;
else
++
ptr
;
}
ptr
=
p
;
...
...
@@ -1063,12 +1063,12 @@ String *Item_func_rtrim::val_str(String *str)
{
const
char
*
r_ptr
=
remove_str
->
ptr
();
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
loop:
while
(
ptr
+
remove_length
<
end
)
{
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
end
)))
ptr
+=
l
;
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
end
)))
ptr
+=
l
;
else
++
ptr
;
}
if
(
ptr
+
remove_length
==
end
&&
!
memcmp
(
ptr
,
r_ptr
,
remove_length
))
...
...
@@ -1114,14 +1114,14 @@ String *Item_func_trim::val_str(String *str)
while
(
ptr
+
remove_length
<=
end
&&
!
memcmp
(
ptr
,
r_ptr
,
remove_length
))
ptr
+=
remove_length
;
#ifdef USE_MB
if
(
use_mb
(
res
->
str_charset
)
&&
!
binary
)
if
(
use_mb
(
res
->
charset
()
)
&&
!
binary
)
{
char
*
p
=
ptr
;
register
uint32
l
;
loop:
while
(
ptr
+
remove_length
<
end
)
{
if
((
l
=
my_ismbchar
(
res
->
str_charset
,
ptr
,
end
)))
ptr
+=
l
;
if
((
l
=
my_ismbchar
(
res
->
charset
()
,
ptr
,
end
)))
ptr
+=
l
;
else
++
ptr
;
}
if
(
ptr
+
remove_length
==
end
&&
!
memcmp
(
ptr
,
r_ptr
,
remove_length
))
...
...
strings/Makefile.am
View file @
1ebab2be
...
...
@@ -22,23 +22,23 @@ pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X
if
ASSEMBLER_x86
ASRCS
=
strings-x86.s longlong2str-x86.s
CSRCS
=
bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
ctype.c ctype-simple.c ctype-mb.c strnlen
.c
CSRCS
=
bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis
.c
else
if
ASSEMBLER_sparc
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
ASRCS
=
bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s strxmov-sparc.s
CSRCS
=
strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
ctype.c ctype-simple.c ctype-mb.c strnlen
.c
CSRCS
=
strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis
.c
else
#no assembler
ASRCS
=
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
CSRCS
=
strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
ctype.c ctype-simple.c ctype-mb.c strnlen
.c
CSRCS
=
strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c
strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis
.c
endif
endif
libmystrings_a_SOURCES
=
@CHARSET_SRCS@
$(ASRCS)
$(CSRCS)
libmystrings_a_SOURCES
=
$(ASRCS)
$(CSRCS)
noinst_PROGRAMS
=
conf_to_src
# Default charset definitions
EXTRA_DIST
=
ctype-big5.c ctype-czech.c ctype-euc_kr.c
\
...
...
@@ -61,7 +61,7 @@ OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
sleep.h specific.h version.h pwd.h timers.h uio.h
\
cdefs.h machdep.h signal.h __signal.h util.h
libmystrings_a_LIBADD
=
@CHARSET_OBJS@
libmystrings_a_LIBADD
=
conf_to_src_SOURCES
=
conf_to_src.c
conf_to_src_LDADD
=
#force static linking of conf_to_src - essential when linking against
...
...
@@ -69,7 +69,7 @@ conf_to_src_LDADD=
conf_to_src_LDFLAGS
=
@NOINST_LDFLAGS@
# This is because the dependency tracking misses @FOO@ vars in sources.
strtoull.o
:
@CHARSET_OBJS@
#
strtoull.o: @CHARSET_OBJS@
if
ASSEMBLER
...
...
strings/ctype-big5.c
View file @
1ebab2be
...
...
@@ -31,6 +31,8 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_big5
/* Support for Chinese(BIG5) characters, by jou@nematic.ieo.nctu.edu.tw
modified by Wei He (hewei@mail.ied.ac.cn) */
...
...
@@ -390,3 +392,5 @@ int mbcharlen_big5(uint c)
{
return
(
isbig5head
(
c
)
?
2
:
0
);
}
#endif
strings/ctype-czech.c
View file @
1ebab2be
...
...
@@ -77,6 +77,8 @@
#endif
#ifdef HAVE_CHARSET_czech
/*
These are four tables for four passes of the algorithm. Please see
below for what are the "special values"
...
...
@@ -513,3 +515,5 @@ uchar NEAR sort_order_czech[] = {
};
#endif
#endif
strings/ctype-euc_kr.c
View file @
1ebab2be
...
...
@@ -30,6 +30,9 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_euc_kr
uchar
NEAR
ctype_euc_kr
[
257
]
=
{
0
,
/* For standard library */
...
...
@@ -196,3 +199,5 @@ int mbcharlen_euc_kr(uint c)
{
return
(
iseuc_kr
(
c
)
?
2
:
0
);
}
#endif
strings/ctype-gb2312.c
View file @
1ebab2be
...
...
@@ -28,6 +28,8 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_gb2312
uchar
NEAR
ctype_gb2312
[
257
]
=
{
0
,
/* For standard library */
...
...
@@ -178,3 +180,5 @@ int mbcharlen_gb2312(uint c)
{
return
(
isgb2312head
(
c
)
?
2
:
0
);
}
#endif
strings/ctype-gbk.c
View file @
1ebab2be
...
...
@@ -31,6 +31,9 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_gbk
/* Support for Chinese(GBK) characters, by hewei@mail.ied.ac.cn */
#define isgbkhead(c) (0x81<=(uchar)(c) && (uchar)(c)<=0xfe)
...
...
@@ -2715,3 +2718,5 @@ int mbcharlen_gbk(uint c)
{
return
(
isgbkhead
(
c
)
?
2
:
0
);
}
#endif
strings/ctype-latin1_de.c
View file @
1ebab2be
...
...
@@ -36,6 +36,8 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_latin1_de
uchar
ctype_latin1_de
[]
=
{
0
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
40
,
40
,
40
,
40
,
40
,
32
,
32
,
...
...
@@ -350,3 +352,5 @@ my_bool my_like_range_latin1_de(CHARSET_INFO *cs,
*
min_str
++
=
*
max_str
++
=
' '
;
// Because if key compression
return
0
;
}
#endif
strings/ctype-mb.c
View file @
1ebab2be
...
...
@@ -17,6 +17,9 @@
#include <my_global.h>
#include "m_ctype.h"
#ifdef USE_MB
void
my_caseup_str_mb
(
CHARSET_INFO
*
cs
,
char
*
str
)
{
register
uint32
l
;
...
...
@@ -123,3 +126,4 @@ int my_strncasecmp_mb(CHARSET_INFO * cs,
return
0
;
}
#endif
strings/ctype-sjis.c
View file @
1ebab2be
...
...
@@ -21,6 +21,9 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_sjis
/*
* This comment is parsed by configure to create ctype.c,
* so don't change it unless you know what you are doing.
...
...
@@ -308,3 +311,5 @@ my_bool my_like_range_sjis(CHARSET_INFO *cs,
*
min_str
++
=
*
max_str
++
=
' '
;
/* Because if key compression */
return
0
;
}
#endif
strings/ctype-tis620.c
View file @
1ebab2be
...
...
@@ -49,6 +49,8 @@
#include "m_ctype.h"
#include "t_ctype.h"
#ifdef HAVE_CHARSET_tis620
static
uchar
*
thai2sortable
(
const
uchar
*
tstr
,
uint
len
);
#define BUFFER_MULTIPLY 4
...
...
@@ -682,3 +684,5 @@ void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length)
}
}
}
#endif
strings/ctype-ujis.c
View file @
1ebab2be
...
...
@@ -28,6 +28,9 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_ujis
uchar
NEAR
ctype_ujis
[
257
]
=
{
0
,
/* For standard library */
...
...
@@ -198,3 +201,5 @@ int mbcharlen_ujis(uint c)
{
return
(
isujis
(
c
)
?
2
:
isujis_ss2
(
c
)
?
2
:
isujis_ss3
(
c
)
?
3
:
0
);
}
#endif
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