mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
conf_to_src.c:
Updating to conform the current CHARSET_INFO structure. strings/conf_to_src.c: Updating to conform the current structure.
This commit is contained in:
parent
6ec1c061a8
commit
fed8b2082a
1 changed files with 40 additions and 26 deletions
|
@ -179,40 +179,49 @@ void dispcset(FILE *f,CHARSET_INFO *cs)
|
|||
|
||||
if (cs->name)
|
||||
{
|
||||
fprintf(f," \"%s\",\n",cs->csname);
|
||||
fprintf(f," \"%s\",\n",cs->name);
|
||||
fprintf(f," \"\",\n");
|
||||
fprintf(f," ctype_%s,\n",cs->name);
|
||||
fprintf(f," to_lower_%s,\n",cs->name);
|
||||
fprintf(f," to_upper_%s,\n",cs->name);
|
||||
fprintf(f," \"%s\", /* cset name */\n",cs->csname);
|
||||
fprintf(f," \"%s\", /* coll name */\n",cs->name);
|
||||
fprintf(f," \"\", /* comment */\n");
|
||||
fprintf(f," NULL, /* tailoring */\n");
|
||||
fprintf(f," ctype_%s, /* ctype */\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)
|
||||
fprintf(f," sort_order_%s,\n",cs->name);
|
||||
fprintf(f," sort_order_%s, /* sort_order */\n",cs->name);
|
||||
else
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," to_uni_%s,\n",cs->name);
|
||||
fprintf(f," from_uni_%s,\n",cs->name);
|
||||
fprintf(f," NULL, /* sort_order */\n");
|
||||
fprintf(f," NULL, /* contractions */\n");
|
||||
fprintf(f," NULL, /* sort_order_big*/\n");
|
||||
fprintf(f," to_uni_%s, /* to_uni */\n",cs->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL,\n");
|
||||
fprintf(f," NULL, /* cset name */\n");
|
||||
fprintf(f," NULL, /* coll name */\n");
|
||||
fprintf(f," NULL, /* comment */\n");
|
||||
fprintf(f," NULL, /* tailoging */\n");
|
||||
fprintf(f," NULL, /* ctype */\n");
|
||||
fprintf(f," NULL, /* lower */\n");
|
||||
fprintf(f," NULL, /* upper */\n");
|
||||
fprintf(f," NULL, /* sort order */\n");
|
||||
fprintf(f," NULL, /* contractions */\n");
|
||||
fprintf(f," NULL, /* sort_order_big*/\n");
|
||||
fprintf(f," NULL, /* to_uni */\n");
|
||||
}
|
||||
|
||||
fprintf(f," \"\",\n");
|
||||
fprintf(f," \"\",\n");
|
||||
fprintf(f," 0,\n");
|
||||
fprintf(f," 0,\n");
|
||||
fprintf(f," 0,\n");
|
||||
|
||||
fprintf(f," NULL, /* from_uni */\n");
|
||||
fprintf(f," NULL, /* state map */\n");
|
||||
fprintf(f," NULL, /* ident map */\n");
|
||||
fprintf(f," 1, /* strxfrm_multiply*/\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");
|
||||
if (cs->state & MY_CS_BINSORT)
|
||||
fprintf(f," &my_collation_bin_handler,\n");
|
||||
fprintf(f," &my_collation_8bit_bin_handler,\n");
|
||||
else
|
||||
fprintf(f," &my_collation_8bit_simple_ci_handler,\n");
|
||||
fprintf(f,"}\n");
|
||||
|
@ -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++)
|
||||
{
|
||||
if (simple_cs_is_full(cs))
|
||||
|
|
Loading…
Reference in a new issue