diff --git a/src/dialogs/options.c b/src/dialogs/options.c index 08cd052e..292a8865 100644 --- a/src/dialogs/options.c +++ b/src/dialogs/options.c @@ -56,7 +56,7 @@ charset_list(struct terminal *term, void *xxx, void *ses_) if (!mi) return; for (i = 0, items = 0; ; i++) { - char *name = get_cp_name(i); + const char *name = get_cp_name(i); if (!name) break; diff --git a/src/intl/charsets.c b/src/intl/charsets.c index 06bb2c37..d091c934 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -51,7 +51,7 @@ struct table_entry { }; struct codepage_desc { - char *name; + const char *name; char *const *aliases; /* The Unicode mappings of codepage bytes 0x80...0xFF. @@ -1622,7 +1622,7 @@ free_charsets_lookup(void) * localize these with gettext. So it may be best not to use this * function if the name will have to be converted back to an * index. */ -char * +const char * get_cp_name(int cp_index) { if (cp_index < 0) return "none"; diff --git a/src/intl/charsets.h b/src/intl/charsets.h index 1d86c645..0885749b 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -125,7 +125,7 @@ char *convert_string(struct conv_table *convert_table, void *callback_data); int get_cp_index(const char *); -char *get_cp_name(int); +const char *get_cp_name(int); char *get_cp_config_name(int); char *get_cp_mime_name(int); const uint16_t *get_cp_highhalf(const char *);