diff --git a/tests/rigctl.c b/tests/rigctl.c index 3eae4dbd7..4c297b445 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -87,7 +87,7 @@ void usage(void); * NB: do NOT use -W since it's reserved by POSIX. * TODO: add an option to read from a file */ -#define SHORT_OPTIONS "m:r:p:d:P:D:s:c:t:lC:LuonvhV" +#define SHORT_OPTIONS "+m:r:p:d:P:D:s:c:t:lC:LuonvhV" static struct option long_options[] = { {"model", 1, 0, 'm'}, diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 71ee6e0da..ecbcd2551 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -452,7 +452,7 @@ static int next_word (char *buffer, int argc, char *argv[], int newline) if (!reading_stdin) { if (optind >= argc) return EOF; - else if ('-' == argv[optind][0]) + else if (newline && '-' == argv[optind][0] && 1 == strlen (argv[optind])) { ++optind; reading_stdin = 1; diff --git a/tests/rotctl.c b/tests/rotctl.c index 2d199ee47..e3947f9f1 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -82,7 +82,7 @@ void usage(); * NB: do NOT use -W since it's reserved by POSIX. * TODO: add an option to read from a file */ -#define SHORT_OPTIONS "m:r:s:C:t:LvhVlu" +#define SHORT_OPTIONS "+m:r:s:C:t:LvhVlu" static struct option long_options[] = { {"model", 1, 0, 'm'}, diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index b3ca13262..dec0ea04b 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -354,7 +354,7 @@ static int next_word (char *buffer, int argc, char *argv[], int newline) if (!reading_stdin) { if (optind >= argc) return EOF; - else if ('-' == argv[optind][0]) + else if (newline && '-' == argv[optind][0] && 1 == strlen (argv[optind])) { ++optind; reading_stdin = 1;