Fix command-line tty-device|config parsing

Allow user to add options on both sides of the provided config argument.

For example:

 $ tio -b 9600 am64-evm -e

Before, tio only allowed adding arguments after the config argument.

Implemented as simple as possible by introducing two stage option parsing.
This commit is contained in:
Martin Lund 2022-06-11 22:55:56 +02:00
parent bd5f542959
commit a0d4be068b
5 changed files with 30 additions and 19 deletions

View file

@ -38,6 +38,6 @@ struct config_t
char *map;
};
void config_file_print();
void config_file_parse(const int argc, char *argv[]);
void config_file_print(void);
void config_file_parse(void);
void config_exit(void);