changeset 15425:acc8a838ad94

More closely imitate the input handling of irssi. Hopefully this will fix the excessive CPU usage bug Alver keeps getting.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 27 Jan 2007 16:40:21 +0000
parents c218d8839902
children c9497aad9fc4
files console/libgnt/gntmain.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;