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
f43f8f9d
Commit
f43f8f9d
authored
Aug 14, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More readable output
parent
12bdcaca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
7 deletions
+36
-7
mysys/charset2html.c
mysys/charset2html.c
+36
-7
No files found.
mysys/charset2html.c
View file @
f43f8f9d
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
typedef
struct
char_info_st
typedef
struct
char_info_st
{
{
int
cod
;
int
srt
;
int
srt
;
int
uni
;
int
uni
;
int
low
;
int
low
;
...
@@ -47,6 +48,8 @@ static int chcmp(const void *vf, const void *vs)
...
@@ -47,6 +48,8 @@ static int chcmp(const void *vf, const void *vs)
static
void
print_cs
(
CHARSET_INFO
*
cs
)
static
void
print_cs
(
CHARSET_INFO
*
cs
)
{
{
uint
i
;
uint
i
;
int
srt
;
int
clr
=
0
;
MY_CH
ch
[
256
];
MY_CH
ch
[
256
];
printf
(
"<HTML>
\n
"
);
printf
(
"<HTML>
\n
"
);
...
@@ -55,8 +58,12 @@ static void print_cs(CHARSET_INFO *cs)
...
@@ -55,8 +58,12 @@ static void print_cs(CHARSET_INFO *cs)
printf
(
"<BODY><PRE>
\n
"
);
printf
(
"<BODY><PRE>
\n
"
);
printf
(
"Charset %s
\n
"
,
cs
->
name
);
printf
(
"Charset %s
\n
"
,
cs
->
name
);
printf
(
"<TABLE>
\n
"
);
printf
(
"<TR><TH>Code<TH>Uni<TH>Sort<TH>Ctype<TH>Ch<TH>Lo<TH>Up</TR>"
);
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
{
{
ch
[
i
].
cod
=
i
;
ch
[
i
].
srt
=
cs
->
sort_order
[
i
];
ch
[
i
].
srt
=
cs
->
sort_order
[
i
];
ch
[
i
].
uni
=
cs
->
tab_to_uni
[
i
];
ch
[
i
].
uni
=
cs
->
tab_to_uni
[
i
];
ch
[
i
].
low
=
cs
->
tab_to_uni
[
cs
->
to_lower
[
i
]];
ch
[
i
].
low
=
cs
->
tab_to_uni
[
cs
->
to_lower
[
i
]];
...
@@ -65,12 +72,34 @@ static void print_cs(CHARSET_INFO *cs)
...
@@ -65,12 +72,34 @@ static void print_cs(CHARSET_INFO *cs)
}
}
qsort
(
ch
,
256
,
sizeof
(
MY_CH
),
&
chcmp
);
qsort
(
ch
,
256
,
sizeof
(
MY_CH
),
&
chcmp
);
srt
=
ch
[
0
].
srt
;
for
(
i
=
1
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
256
;
i
++
)
{
{
printf
(
"%d %d &#%d; &#%d; &#%d;
\n
"
,
ch
[
i
].
srt
,
ch
[
i
].
ctp
,
ch
[
i
].
uni
,
clr
=
(
srt
!=
ch
[
i
].
srt
)
?
!
clr
:
clr
;
ch
[
i
].
low
,
ch
[
i
].
upp
);
printf
(
"<TR bgcolor=#%s>"
,
clr
?
"DDDDDD"
:
"EEEE99"
);
printf
(
"<TD>%02X"
,
ch
[
i
].
cod
);
printf
(
"<TD>%04X"
,
ch
[
i
].
uni
);
printf
(
"<TD>%d"
,
ch
[
i
].
srt
);
printf
(
"<TD>%s%s%s%s%s%s%s%s"
,
ch
[
i
].
ctp
&
_U
?
"U"
:
""
,
ch
[
i
].
ctp
&
_L
?
"L"
:
""
,
ch
[
i
].
ctp
&
_NMR
?
"N"
:
""
,
ch
[
i
].
ctp
&
_SPC
?
"S"
:
""
,
ch
[
i
].
ctp
&
_PNT
?
"P"
:
""
,
ch
[
i
].
ctp
&
_CTR
?
"C"
:
""
,
ch
[
i
].
ctp
&
_B
?
"B"
:
""
,
ch
[
i
].
ctp
&
_X
?
"X"
:
""
);
printf
(
"<TD>&#%d;"
,
ch
[
i
].
uni
);
printf
(
"<TD>&#%d;"
,
ch
[
i
].
low
);
printf
(
"<TD>&#%d;"
,
ch
[
i
].
upp
);
printf
(
"</TR>
\n
"
);
srt
=
ch
[
i
].
srt
;
}
}
printf
(
"</TABLE>
\n
"
);
printf
(
"</PRE></BODY>
\n
"
);
printf
(
"</PRE></BODY>
\n
"
);
printf
(
"</HTML>
\n
"
);
printf
(
"</HTML>
\n
"
);
}
}
...
...
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