add support for a configuration file

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
This commit is contained in:
Liam Beguin 2020-07-16 00:14:18 -04:00
parent 2795ef6c79
commit 2e5c1ff20c
6 changed files with 274 additions and 1 deletions

View file

@ -269,7 +269,9 @@ void parse_options(int argc, char *argv[])
}
/* Assume first non-option is the tty device name */
if (optind < argc)
if (strcmp(option.tty_device, ""))
optind++;
else if (optind < argc)
option.tty_device = argv[optind++];
if (strlen(option.tty_device) == 0)