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
c9cc3cce
Commit
c9cc3cce
authored
Jul 30, 2002
by
bar@bar.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move _print_charset to proper place
parent
92f36444
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
39 deletions
+32
-39
mysys/charset.c
mysys/charset.c
+0
-38
mysys/test_charset.c
mysys/test_charset.c
+32
-1
No files found.
mysys/charset.c
View file @
c9cc3cce
...
@@ -634,41 +634,3 @@ char * list_charsets(myf want_flags)
...
@@ -634,41 +634,3 @@ char * list_charsets(myf want_flags)
return
p
;
return
p
;
}
}
/****************************************************************************
* Code for debugging.
****************************************************************************/
static
void
_print_array
(
uint8
*
data
,
uint
size
)
{
uint
i
;
for
(
i
=
0
;
i
<
size
;
++
i
)
{
if
(
i
==
0
||
i
%
16
==
size
%
16
)
printf
(
" "
);
printf
(
" %02x"
,
data
[
i
]);
if
((
i
+
1
)
%
16
==
size
%
16
)
printf
(
"
\n
"
);
}
}
/* _print_csinfo is called from test_charset.c */
void
_print_csinfo
(
CHARSET_INFO
*
cs
)
{
printf
(
"%s #%d
\n
"
,
cs
->
name
,
cs
->
number
);
printf
(
"ctype:
\n
"
);
_print_array
(
cs
->
ctype
,
257
);
printf
(
"to_lower:
\n
"
);
_print_array
(
cs
->
to_lower
,
256
);
printf
(
"to_upper:
\n
"
);
_print_array
(
cs
->
to_upper
,
256
);
printf
(
"sort_order:
\n
"
);
_print_array
(
cs
->
sort_order
,
256
);
printf
(
"collate: %3s (%d, %p, %p, %p)
\n
"
,
cs
->
strxfrm_multiply
?
"yes"
:
"no"
,
cs
->
strxfrm_multiply
,
cs
->
strnncoll
,
cs
->
strnxfrm
,
cs
->
like_range
);
printf
(
"multi-byte: %3s (%d, %p, %p, %p)
\n
"
,
cs
->
mbmaxlen
?
"yes"
:
"no"
,
cs
->
mbmaxlen
,
cs
->
ismbchar
,
cs
->
ismbhead
,
cs
->
mbcharlen
);
}
mysys/test_charset.c
View file @
c9cc3cce
...
@@ -21,7 +21,38 @@
...
@@ -21,7 +21,38 @@
#include <stdio.h>
#include <stdio.h>
extern
void
_print_csinfo
(
CHARSET_INFO
*
cs
);
static
void
_print_array
(
uint8
*
data
,
uint
size
)
{
uint
i
;
for
(
i
=
0
;
i
<
size
;
++
i
)
{
if
(
i
==
0
||
i
%
16
==
size
%
16
)
printf
(
" "
);
printf
(
" %02x"
,
data
[
i
]);
if
((
i
+
1
)
%
16
==
size
%
16
)
printf
(
"
\n
"
);
}
}
static
void
_print_csinfo
(
CHARSET_INFO
*
cs
)
{
printf
(
"%s #%d
\n
"
,
cs
->
name
,
cs
->
number
);
printf
(
"ctype:
\n
"
);
_print_array
(
cs
->
ctype
,
257
);
printf
(
"to_lower:
\n
"
);
_print_array
(
cs
->
to_lower
,
256
);
printf
(
"to_upper:
\n
"
);
_print_array
(
cs
->
to_upper
,
256
);
printf
(
"sort_order:
\n
"
);
_print_array
(
cs
->
sort_order
,
256
);
printf
(
"collate: %3s (%d, %p, %p, %p)
\n
"
,
cs
->
strxfrm_multiply
?
"yes"
:
"no"
,
cs
->
strxfrm_multiply
,
cs
->
strnncoll
,
cs
->
strnxfrm
,
cs
->
like_range
);
printf
(
"multi-byte: %3s (%d, %p, %p, %p)
\n
"
,
cs
->
mbmaxlen
?
"yes"
:
"no"
,
cs
->
mbmaxlen
,
cs
->
ismbchar
,
cs
->
ismbhead
,
cs
->
mbcharlen
);
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
const
char
*
the_set
=
MYSQL_CHARSET
;
const
char
*
the_set
=
MYSQL_CHARSET
;
...
...
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