summaryrefslogtreecommitdiff
path: root/mysys/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/charset.c')
-rw-r--r--mysys/charset.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index 097c35caa56..2d9500e4b0d 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -688,70 +688,3 @@ static void charset_append(DYNAMIC_STRING *s, const char *name)
dynstr_append(s, " ");
}
}
-
-
-/* Returns a dynamically-allocated string listing the character sets
- requested. The caller is responsible for freeing the memory. */
-
-char *list_charsets(myf want_flags)
-{
- DYNAMIC_STRING s;
- char *p;
-
- (void)init_available_charsets(MYF(0));
- init_dynamic_string(&s, NullS, 256, 1024);
-
- if (want_flags & MY_CS_COMPILED)
- {
- CHARSET_INFO **cs;
- for (cs= all_charsets; cs < all_charsets+255; cs++)
- {
- if (cs[0])
- {
- dynstr_append(&s, cs[0]->name);
- dynstr_append(&s, " ");
- }
- }
- }
-
- if (want_flags & MY_CS_CONFIG)
- {
- CHARSET_INFO **cs;
- char buf[FN_REFLEN];
- MY_STAT status;
-
- for (cs=all_charsets; cs < all_charsets+255; cs++)
- {
- if (!cs[0] || !cs[0]->name || charset_in_string(cs[0]->name, &s))
- continue;
- get_charset_conf_name(cs[0]->name, buf);
- if (!my_stat(buf, &status, MYF(0)))
- continue; /* conf file doesn't exist */
- dynstr_append(&s, cs[0]->name);
- dynstr_append(&s, " ");
- }
- }
-
- if (want_flags & (MY_CS_INDEX|MY_CS_LOADED))
- {
- CHARSET_INFO **cs;
- for (cs= all_charsets; cs < all_charsets + 255; cs++)
- if (cs[0] && cs[0]->name && (cs[0]->state & want_flags) )
- charset_append(&s, cs[0]->name);
- }
-
- if (s.length)
- {
- s.str[s.length - 1]= '\0'; /* chop trailing space */
- p= my_strdup(s.str, MYF(MY_WME));
- }
- else
- {
- p= my_strdup("", MYF(MY_WME));
- }
- dynstr_free(&s);
-
- return p;
-}
-
-