summaryrefslogtreecommitdiff
path: root/strings/conf_to_src.c
diff options
context:
space:
mode:
Diffstat (limited to 'strings/conf_to_src.c')
-rw-r--r--strings/conf_to_src.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 9f1ed9b2441..73ade93f6e1 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -23,7 +23,7 @@
#define ROW16_LEN 8
#define MAX_BUF 64*1024
-static CHARSET_INFO all_charsets[256];
+static CHARSET_INFO all_charsets[512];
void
@@ -63,7 +63,9 @@ print_array16(FILE *f, const char *set, const char *name, uint16 *a, int n)
static int get_charset_number(const char *charset_name)
{
CHARSET_INFO *cs;
- for (cs= all_charsets; cs < all_charsets+255; ++cs)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if ( cs->name && !strcmp(cs->name, charset_name))
return cs->number;
@@ -288,7 +290,9 @@ main(int argc, char **argv __attribute__((unused)))
sprintf(filename,"%s/%s",argv[1],"Index.xml");
my_read_charset_file(filename);
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (cs->number && !(cs->state & MY_CS_COMPILED))
{
@@ -313,7 +317,9 @@ main(int argc, char **argv __attribute__((unused)))
fprintf(f,"#include <m_ctype.h>\n\n");
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (simple_cs_is_full(cs))
{
@@ -330,7 +336,9 @@ main(int argc, char **argv __attribute__((unused)))
}
fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n");
- for (cs=all_charsets; cs < all_charsets+256; cs++)
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
{
if (simple_cs_is_full(cs))
{