# HG changeset patch # User Sadrul Habib Chowdhury # Date 1169916021 0 # Node ID acc8a838ad94e4f9fa26af9559fed60a757b252b # Parent c218d8839902e6cca98e390e71dfae58b0b133bc More closely imitate the input handling of irssi. Hopefully this will fix the excessive CPU usage bug Alver keeps getting. diff -r c218d8839902 -r acc8a838ad94 console/libgnt/gntmain.c --- a/console/libgnt/gntmain.c Fri Jan 26 22:58:09 2007 +0000 +++ b/console/libgnt/gntmain.c Sat Jan 27 16:40:21 2007 +0000 @@ -211,9 +211,9 @@ int result; channel = g_io_channel_unix_new(STDIN_FILENO); +#if 0 g_io_channel_set_encoding(channel, NULL, NULL); g_io_channel_set_buffered(channel, FALSE); -#if 0 g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL ); #endif @@ -303,9 +303,9 @@ if (channel) return; - setup_io(); + locale = setlocale(LC_ALL, ""); - locale = setlocale(LC_ALL, ""); + setup_io(); if (locale && (strstr(locale, "UTF") || strstr(locale, "utf"))) ascii_only = FALSE;