summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-05 11:34:44 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-05 11:38:29 -0800
commit2c513f4ab38187dc7268f898e5db87eab3983715 (patch)
tree1d5e366c4cd3b38a78945a72cf13a86b78ee5a93
parent0f9f41f177b4713a6792a2bc87dfbb186b8926bd (diff)
List which options were unrecognized before printing usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xbiff.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xbiff.c b/xbiff.c
index ea96fb2..035c36b 100644
--- a/xbiff.c
+++ b/xbiff.c
@@ -120,6 +120,11 @@ main (int argc, char **argv)
toplevel = XtAppInitialize(&xtcontext, "XBiff", options, XtNumber (options),
&argc, argv, NULL, NULL, 0);
if (argc != 1) {
+ fputs("Unknown argument(s):", stderr);
+ for (int n = 1; n < argc; n++) {
+ fprintf(stderr, " %s", argv[n]);
+ }
+ fputs("\n\n", stderr);
Usage(1);
}