From 074b1218588fa924bd7bb2e11f1a3f7e0dd016e3 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sat, 15 Mar 2008 12:58:20 +0000 Subject: [PATCH] Remove trailing whitespace. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4769 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-recode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fe-common/core/fe-recode.c b/src/fe-common/core/fe-recode.c index 203e69f7..58bd7ad5 100644 --- a/src/fe-common/core/fe-recode.c +++ b/src/fe-common/core/fe-recode.c @@ -180,24 +180,24 @@ static void read_settings(void) if (!is_valid_charset(term_charset)) { g_free(term_charset); #if defined (HAVE_NL_LANGINFO) && defined(CODESET) - term_charset = is_valid_charset(old_term_charset) ? g_strdup(old_term_charset) : - *nl_langinfo(CODESET) != '\0' ? g_strdup(nl_langinfo(CODESET)) : + term_charset = is_valid_charset(old_term_charset) ? g_strdup(old_term_charset) : + *nl_langinfo(CODESET) != '\0' ? g_strdup(nl_langinfo(CODESET)) : "ISO8859-1"; #else term_charset = is_valid_charset(old_term_charset) ? g_strdup(old_term_charset) : "ISO8859-1"; -#endif +#endif settings_set_str("term_charset", term_charset); - /* FIXME: move the check of term_charset into fe-text/term.c - it breaks the proper term_input_type + /* FIXME: move the check of term_charset into fe-text/term.c + it breaks the proper term_input_type setup and reemitting of the signal is kludgy */ if (g_strcasecmp(term_charset, old_term_charset) != 0) signal_emit("setup changed", 0); } - + if (recode_out_default) g_free(recode_out_default); recode_out_default = g_strdup(settings_get_str("recode_out_default_charset")); - if (recode_out_default != NULL && *recode_out_default != '\0' && + if (recode_out_default != NULL && *recode_out_default != '\0' && !is_valid_charset(recode_out_default)) { signal_emit("error command", 2, GINT_TO_POINTER(CMDERR_INVALID_CHARSET), recode_out_default); g_free(recode_out_default);