Changed the type of gboolean to a distinct cint.
Fixed terminal module so that it doesn't raise an EOS exception when stdout is redirected.