From 152af44f9ec97ba10ff95e9f896cf9c4987f86b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Jan 2003 10:19:14 +0400 Subject: --- strings/conf_to_src.c | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c index 7f85becfe87..69dccbca0a7 100644 --- a/strings/conf_to_src.c +++ b/strings/conf_to_src.c @@ -25,13 +25,10 @@ #include #include -#define CHARSETS_SUBDIR "sql/share/charsets" -#define CTYPE_TABLE_SIZE 257 -#define TO_LOWER_TABLE_SIZE 256 -#define TO_UPPER_TABLE_SIZE 256 -#define SORT_ORDER_TABLE_SIZE 256 -#define MAX_BUF 16*1024 +#define ROW_LEN 16 +#define ROW16_LEN 8 +#define MAX_BUF 16*1024 static CHARSET_INFO all_charsets[256]; @@ -45,12 +42,30 @@ print_array(FILE *f, const char *set, const char *name, uchar *a, int n) for (i=0 ;iname, "ctype", cs->ctype, CTYPE_TABLE_SIZE); - print_array(f, cs->name, "to_lower", cs->to_lower, TO_LOWER_TABLE_SIZE); - print_array(f, cs->name, "to_upper", cs->to_upper, TO_UPPER_TABLE_SIZE); - print_array(f, cs->name, "sort_order", cs->sort_order, SORT_ORDER_TABLE_SIZE); + fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname); + print_array(f, cs->name, "ctype", cs->ctype, MY_CS_CTYPE_TABLE_SIZE); + print_array(f, cs->name, "to_lower", cs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE); + print_array(f, cs->name, "to_upper", cs->to_upper, MY_CS_TO_UPPER_TABLE_SIZE); + print_array(f, cs->name, "sort_order", cs->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE); + print_array16(f, cs->name, "to_uni", cs->tab_to_uni, MY_CS_TO_UNI_TABLE_SIZE); + fprintf(f,"#endif\n"); fprintf(f,"\n"); } } -- cgit v1.2.1