2 * tio - a simple TTY terminal I/O application
4 * Copyright (c) 2014-2016 Martin Lund
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 #include "tio/options.h"
29 #include "tio/error.h"
30 #include "tio/print.h"
32 int main(int argc, char *argv[])
36 /* Install error exit handler */
40 parse_options(argc, argv);
42 /* Configure tty device */
45 /* Configure output terminal */
48 /* Install log exit handler */
53 log_open(option.log_filename);
55 /* Connect to tty device */
56 if (option.no_autoconnect)
57 status = tty_connect();
60 /* Enter connect loop */
63 tty_wait_for_device();
64 status = tty_connect();