summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-05 22:48:02 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-22 22:29:12 -0800
commite7694580ad51740e1854a6678fb68c9edce2f37c (patch)
tree9cd4b4b0dfc1b9a2c3038745181efd39115fca7b
parentf557d6258105ac2717093aebfd2fcbcb16730593 (diff)
Print error and usage on invalid arg, instead of ignoring it
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--fstobdf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fstobdf.c b/fstobdf.c
index 5fe4816..255d82e 100644
--- a/fstobdf.c
+++ b/fstobdf.c
@@ -109,6 +109,11 @@ main(int argc, char *argv[])
printf("%s\n", PACKAGE_STRING);
exit(0);
}
+ else {
+ fprintf(stderr, "%s: unrecognized option '%s'\n",
+ argv[0], argv[i]);
+ usage(argv[0], NULL);
+ }
}
if (fontName == NULL)