MySQL 5.6.14 Source Code Document
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
MySQL 5.6.14 Source Code Document
replication of field metadata works.
ndbapi_simple.cpp
ndbapi_async.cpp
ndbapi_async1.cpp
ndbapi_retries.cpp
ndbapi_simple_index.cpp
ndbapi_scan.cpp
ndbapi_event.cpp
Adaptive Send Algorithm
MySQL Cluster Concepts
basic.cpp
common.hpp
br_test.cpp
ptr_binding_test.cpp
The Performance Schema main page
Performance schema: instrumentation interface page.
Performance schema: the aggregates page.
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
client
cmake
cmd-line-utils
dbug
extra
include
libevent
libmysql
libmysqld
libservices
mysql-test
mysys
mysys_ssl
packaging
plugin
regex
scripts
sql
sql-common
storage
strings
bchange.c
bmove_upp.c
conf_to_src.c
ctype-big5.c
ctype-bin.c
ctype-cp932.c
ctype-czech.c
ctype-euc_kr.c
ctype-eucjpms.c
ctype-extra.c
ctype-gb2312.c
ctype-gbk.c
ctype-latin1.c
ctype-mb.c
ctype-simple.c
ctype-sjis.c
ctype-tis620.c
ctype-uca.c
ctype-ucs2.c
ctype-ujis.c
ctype-utf8.c
ctype-win1250ch.c
ctype.c
decimal.c
do_ctype.c
dtoa.c
dump_map.c
int2str.c
is_prefix.c
llstr.c
longlong2str.c
my_strchr.c
my_strtoll10.c
my_vsnprintf.c
str2int.c
str_alloc.c
strappend.c
strcend.c
strcont.c
strend.c
strfill.c
strmake.c
strmov.c
strnlen.c
strnmov.c
strxmov.c
strxnmov.c
t_ctype.h
uca-dump.c
uctypedump.c
utr11-dump.c
xml.c
support-files
tests
unittest
vio
zlib
File Members
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
dump_map.c
1
/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15
16
#include <stdio.h>
17
#include <string.h>
18
19
static
void
print_short_array(
unsigned
short
*a,
size_t
width)
20
{
21
int
i
;
22
printf(
"{\n"
);
23
for
(i=0; i<=0xFF; i++)
24
{
25
const
char
*
fmt
= (width==4) ?
"0x%04X"
:
"0x%02X"
;
26
printf(fmt,(
int
)a[i]);
27
printf(
"%s%s"
,i<0xFF?
","
:
""
,(i+1) % 8 ?
""
:
"\n"
);
28
}
29
printf(
"};\n"
);
30
31
}
32
33
34
35
int
main(
void
)
36
{
37
char
str[160];
38
unsigned
short
touni[256];
39
unsigned
short
fromuni[65536];
40
unsigned
short
fromstat[256];
41
int
i
;
42
43
memset(touni, 0,
sizeof
(touni));
44
memset(fromuni, 0,
sizeof
(fromuni));
45
memset(fromstat, 0,
sizeof
(fromstat));
46
47
while
(fgets(str,
sizeof
(str),stdin))
48
{
49
unsigned
int
c,u;
50
51
if
((str[0]==
'#'
) || (2!=sscanf(str,
"%x%x"
,&c,&u)))
52
continue
;
53
if
(c>0xFF || u>0xFFFF)
54
continue
;
55
56
touni[c]= u;
57
fromuni[u]= c;
58
}
59
60
printf(
"unsigned short cs_to_uni[256]="
);
61
print_short_array(touni, 4);
62
63
for
(i=0;i<=0xFF;i++)
64
{
65
fromstat[touni[
i
]>>8]++;
66
}
67
68
for
(i=0;i<=256;i++)
69
{
70
if
(fromstat[i])
71
{
72
printf(
"unsigned char pl%02X[256]="
,i);
73
print_short_array(fromuni+i*256, 2);
74
}
75
}
76
77
printf(
"unsigned short *uni_to_cs[256]={\n"
);
78
for
(i=0;i<=255;i++)
79
{
80
if
(fromstat[i])
81
printf(
"pl%02X"
,i);
82
else
83
printf(
"NULL"
);
84
printf(
"%s%s"
,i<255?
","
:
""
,((i+1) % 8) ?
""
:
"\n"
);
85
}
86
printf(
"};\n"
);
87
88
return
0;
89
}
strings
dump_map.c
Generated on Sat Nov 9 2013 01:28:54 for MySQL 5.6.14 Source Code Document by
1.8.1.2