porting to g_io
fix type mistakes
input_callback functions must return gboolean
replace read() with g_io_channel_read_chars()
one more fd → chan
callback takes (chan, condition, user_data) not (user_data, chan, condition)
pointers…
do NOT call g_source_remove twice, NEVER
cosmetic: editor knows how to wrap lines, and it's better for diff
free the GIOChannel
extra: shutdown the channel before forget it (fd already closed)