Refactor code to create a watcher for an fd into a function.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4813 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-04-25 08:42:47 +00:00 committed by exg
commit cad6fb2e19
3 changed files with 14 additions and 5 deletions

View file

@ -70,13 +70,9 @@ static void sig_input(void);
void input_listen_init(int handle)
{
GIOChannel *stdin_channel;
stdin_channel = g_io_channel_unix_new(handle);
readtag = g_input_add_full(stdin_channel,
readtag = g_input_add_poll(handle,
G_PRIORITY_HIGH, G_INPUT_READ,
(GInputFunction) sig_input, NULL);
g_io_channel_unref(stdin_channel);
}
void input_listen_deinit(void)