summaryrefslogtreecommitdiff
path: root/strings/conf_to_src.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
committerSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
commit65ca700def99289cc31a7040537f5aa6e12bf485 (patch)
tree97b3a07299b626c519da0e80c122b5b79b933914 /strings/conf_to_src.c
parent2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff)
parent6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff)
downloadmariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz
merge.
checkpoint. does not compile.
Diffstat (limited to 'strings/conf_to_src.c')
-rw-r--r--strings/conf_to_src.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 73ade93f6e1..d7321d3a691 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -23,15 +23,14 @@
#define ROW16_LEN 8
#define MAX_BUF 64*1024
-static CHARSET_INFO all_charsets[512];
-
+static struct charset_info_st all_charsets[512];
void
-print_array(FILE *f, const char *set, const char *name, uchar *a, int n)
+print_array(FILE *f, const char *set, const char *name, const uchar *a, int n)
{
int i;
- fprintf(f,"uchar %s_%s[] = {\n", name, set);
+ fprintf(f,"static const uchar %s_%s[] = {\n", name, set);
for (i=0 ;i<n ; i++)
{
@@ -44,11 +43,11 @@ print_array(FILE *f, const char *set, const char *name, uchar *a, int n)
void
-print_array16(FILE *f, const char *set, const char *name, uint16 *a, int n)
+print_array16(FILE *f, const char *set, const char *name, const uint16 *a, int n)
{
int i;
- fprintf(f,"uint16 %s_%s[] = {\n", name, set);
+ fprintf(f,"static const uint16 %s_%s[] = {\n", name, set);
for (i=0 ;i<n ; i++)
{
@@ -82,7 +81,7 @@ char *mdup(const char *src, uint len)
return dst;
}
-static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
+static void simple_cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
{
to->number= from->number ? from->number : to->number;
to->state|= from->state;
@@ -124,7 +123,7 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
(cs->sort_order || (cs->state & MY_CS_BINSORT))));
}
-static int add_collation(CHARSET_INFO *cs)
+static int add_collation(struct charset_info_st *cs)
{
if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name))))
{
@@ -335,7 +334,7 @@ main(int argc, char **argv __attribute__((unused)))
}
}
- fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n");
+ fprintf(f,"struct charset_info_st compiled_charsets[] = {\n");
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)