X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Ffe-text%2Fterm.c;fp=apps%2Firssi%2Fsrc%2Ffe-text%2Fterm.c;h=38239016378dfdca20cf2020b232584b217d35e0;hb=18d69a0a1fec438e241bb4f431506ed59a34066b;hp=59c3fe4d49406f0025f91f8ee5192946d12ad436;hpb=f7be6adec0248118cddde9b04522c13cd90568cd;p=silc.git diff --git a/apps/irssi/src/fe-text/term.c b/apps/irssi/src/fe-text/term.c index 59c3fe4d..38239016 100644 --- a/apps/irssi/src/fe-text/term.c +++ b/apps/irssi/src/fe-text/term.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "module.h" @@ -26,10 +26,6 @@ #include "term.h" #include "mainwindows.h" -#ifdef HAVE_NL_LANGINFO -# include -#endif - #ifdef HAVE_SYS_IOCTL_H # include #endif @@ -38,7 +34,7 @@ #define MIN_SCREEN_WIDTH 20 -int term_width, term_height, term_detached; +int term_width, term_height; int term_use_colors; int term_type; @@ -116,13 +112,11 @@ static void read_settings(void) int old_colors = term_use_colors; int old_type = term_type; - term_auto_detach(settings_get_bool("term_auto_detach")); - /* set terminal type */ str = settings_get_str("term_charset"); - if (g_strcasecmp(str, "utf-8") == 0) + if (g_ascii_strcasecmp(str, "utf-8") == 0) term_type = TERM_TYPE_UTF8; - else if (g_strcasecmp(str, "big5") == 0) + else if (g_ascii_strcasecmp(str, "big5") == 0) term_type = TERM_TYPE_BIG5; else term_type = TERM_TYPE_8BIT; @@ -145,24 +139,22 @@ static void read_settings(void) void term_common_init(void) { + const char *dummy; #ifdef SIGWINCH struct sigaction act; #endif settings_add_bool("lookandfeel", "colors", TRUE); settings_add_bool("lookandfeel", "term_force_colors", FALSE); - settings_add_bool("lookandfeel", "term_auto_detach", FALSE); settings_add_bool("lookandfeel", "mirc_blink_fix", FALSE); force_colors = FALSE; term_use_colors = term_has_colors() && settings_get_bool("colors"); read_settings(); -#if defined (HAVE_NL_LANGINFO) && defined(CODESET) - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) { + if (g_get_charset(&dummy)) { term_type = TERM_TYPE_UTF8; term_set_input_type(TERM_TYPE_UTF8); } -#endif signal_add("beep", (SIGNAL_FUNC) term_beep); signal_add("setup changed", (SIGNAL_FUNC) read_settings);