Commit 8bd04bf7 authored by bar@mysql.com's avatar bar@mysql.com

conf_to_src.c:

  Updating to conform the current CHARSET_INFO structure.
parent dfe94804
...@@ -179,40 +179,49 @@ void dispcset(FILE *f,CHARSET_INFO *cs) ...@@ -179,40 +179,49 @@ void dispcset(FILE *f,CHARSET_INFO *cs)
if (cs->name) if (cs->name)
{ {
fprintf(f," \"%s\",\n",cs->csname); fprintf(f," \"%s\", /* cset name */\n",cs->csname);
fprintf(f," \"%s\",\n",cs->name); fprintf(f," \"%s\", /* coll name */\n",cs->name);
fprintf(f," \"\",\n"); fprintf(f," \"\", /* comment */\n");
fprintf(f," ctype_%s,\n",cs->name); fprintf(f," NULL, /* tailoring */\n");
fprintf(f," to_lower_%s,\n",cs->name); fprintf(f," ctype_%s, /* ctype */\n",cs->name);
fprintf(f," to_upper_%s,\n",cs->name); fprintf(f," to_lower_%s, /* lower */\n",cs->name);
fprintf(f," to_upper_%s, /* upper */\n",cs->name);
if (cs->sort_order) if (cs->sort_order)
fprintf(f," sort_order_%s,\n",cs->name); fprintf(f," sort_order_%s, /* sort_order */\n",cs->name);
else else
fprintf(f," NULL,\n"); fprintf(f," NULL, /* sort_order */\n");
fprintf(f," to_uni_%s,\n",cs->name); fprintf(f," NULL, /* contractions */\n");
fprintf(f," from_uni_%s,\n",cs->name); fprintf(f," NULL, /* sort_order_big*/\n");
fprintf(f," to_uni_%s, /* to_uni */\n",cs->name);
} }
else else
{ {
fprintf(f," NULL,\n"); fprintf(f," NULL, /* cset name */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* coll name */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* comment */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* tailoging */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* ctype */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* lower */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* upper */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* sort order */\n");
fprintf(f," NULL,\n"); fprintf(f," NULL, /* contractions */\n");
fprintf(f," NULL, /* sort_order_big*/\n");
fprintf(f," NULL, /* to_uni */\n");
} }
fprintf(f," \"\",\n"); fprintf(f," NULL, /* from_uni */\n");
fprintf(f," \"\",\n"); fprintf(f," NULL, /* state map */\n");
fprintf(f," 0,\n"); fprintf(f," NULL, /* ident map */\n");
fprintf(f," 0,\n"); fprintf(f," 1, /* strxfrm_multiply*/\n");
fprintf(f," 0,\n"); fprintf(f," 1, /* mbminlen */\n");
fprintf(f," 1, /* mbmaxlen */\n");
fprintf(f," 0, /* min_sort_char */\n");
fprintf(f," 255, /* max_sort_char */\n");
fprintf(f," 0, /* escape_with_backslash_is_dangerous */\n");
fprintf(f," &my_charset_8bit_handler,\n"); fprintf(f," &my_charset_8bit_handler,\n");
if (cs->state & MY_CS_BINSORT) if (cs->state & MY_CS_BINSORT)
fprintf(f," &my_collation_bin_handler,\n"); fprintf(f," &my_collation_8bit_bin_handler,\n");
else else
fprintf(f," &my_collation_8bit_simple_ci_handler,\n"); fprintf(f," &my_collation_8bit_simple_ci_handler,\n");
fprintf(f,"}\n"); fprintf(f,"}\n");
...@@ -251,6 +260,11 @@ main(int argc, char **argv __attribute__((unused))) ...@@ -251,6 +260,11 @@ main(int argc, char **argv __attribute__((unused)))
} }
} }
fprintf(f,"#include <my_global.h>\n");
fprintf(f,"#include <m_ctype.h>\n\n");
for (cs=all_charsets; cs < all_charsets+256; cs++) for (cs=all_charsets; cs < all_charsets+256; cs++)
{ {
if (simple_cs_is_full(cs)) if (simple_cs_is_full(cs))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment