diff options
Diffstat (limited to 'src/cdf.c')
| -rw-r--r-- | src/cdf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,7 +18,7 @@ static int parse_options(int argc, char *const *argv) { int arg; bool error = false; - while ((arg = getopt(argc, argv, "frhu")) != -1) { + while ((arg = getopt(argc, argv, "frhu")) != -1 && !error) { switch (arg) { case 'f': ARG_FP_INPUT = true; @@ -34,9 +34,9 @@ static int parse_options(int argc, char *const *argv) { break; case '?': if (isprint(optopt)) { - fprintf(stderr, "Unknown option `-%c`.\n", optopt); + fprintf(stderr, "Error: unknown option `-%c`.\n", optopt); } else { - fprintf(stderr, "Unknown option character `\\x%x`.\n", optopt); + fprintf(stderr, "Error: unknown option character `\\x%x`.\n", optopt); } error = true; break; |