mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Organize options the same sequence they are mentiond in cmdline help.
This commit is contained in:
parent
0bc56c8a8f
commit
776284e251
1 changed files with 6 additions and 6 deletions
|
|
@ -110,8 +110,8 @@ void parse_options(int argc, char *argv[])
|
|||
{"stopbits", required_argument, 0, 's'},
|
||||
{"parity", required_argument, 0, 'p'},
|
||||
{"output-delay", required_argument, 0, 'o'},
|
||||
{"local-echo", no_argument, 0, 'e'},
|
||||
{"no-autoconnect", no_argument, 0, 'n'},
|
||||
{"local-echo", no_argument, 0, 'e'},
|
||||
{"log", required_argument, 0, 'l'},
|
||||
{"map", required_argument, 0, 'm'},
|
||||
{"version", no_argument, 0, 'v'},
|
||||
|
|
@ -123,7 +123,7 @@ void parse_options(int argc, char *argv[])
|
|||
int option_index = 0;
|
||||
|
||||
/* Parse argument using getopt_long */
|
||||
c = getopt_long(argc, argv, "b:d:f:s:p:o:nl:m:vhe", long_options, &option_index);
|
||||
c = getopt_long(argc, argv, "b:d:f:s:p:o:nel:m:vh", long_options, &option_index);
|
||||
|
||||
/* Detect the end of the options */
|
||||
if (c == -1)
|
||||
|
|
@ -149,10 +149,6 @@ void parse_options(int argc, char *argv[])
|
|||
option.databits = string_to_long(optarg);
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
option.local_echo = true;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
option.flow = optarg;
|
||||
break;
|
||||
|
|
@ -173,6 +169,10 @@ void parse_options(int argc, char *argv[])
|
|||
option.no_autoconnect = true;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
option.local_echo = true;
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
option.log = true;
|
||||
option.log_filename = optarg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue