summaryrefslogtreecommitdiffstats
path: root/src/cdf.c
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-08-30 22:49:03 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2025-08-30 22:49:03 -0400
commit094184621b0bcc27c2a977ee0dd8bdd9931ec448 (patch)
tree3b6eb1b685339773c488bc012030aba07254fba1 /src/cdf.c
parentbeb3e03072c706554acdfdd38dc7fb920ff2bb41 (diff)
downloadmath-utils-094184621b0bcc27c2a977ee0dd8bdd9931ec448.tar.gz
Code cleanup+documentation
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;