]> git.sur5r.net Git - tio/blobdiff - src/main.c
Imported Upstream version 1.18
[tio] / src / main.c
index d379f98ca6144c4dd8cac77294b5e670c413594f..02019cc310a19a9a88ab2ef4216626e24655b5ce 100644 (file)
@@ -19,6 +19,7 @@
  * 02110-1301, USA.
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -38,8 +39,11 @@ int main(int argc, char *argv[])
     /* Parse options */
     parse_options(argc, argv);
 
+    /* Configure tty device */
+    tty_configure();
+
     /* Configure output terminal */
-    configure_stdout();
+    stdout_configure();
 
     /* Install log exit handler */
     atexit(&log_exit);
@@ -50,14 +54,14 @@ int main(int argc, char *argv[])
 
     /* Connect to tty device */
     if (option.no_autoconnect)
-        status = connect_tty();
+        status = tty_connect();
     else
     {
         /* Enter connect loop */
         while (true)
         {
-            wait_for_tty_device();
-            status = connect_tty();
+            tty_wait_for_device();
+            status = tty_connect();
         }
     }