summaryrefslogtreecommitdiffstats
path: root/src/cdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdf.c')
-rw-r--r--src/cdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cdf.c b/src/cdf.c
index 3bf39fe..2b26e27 100644
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -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;