summaryrefslogtreecommitdiff
path: root/viewres.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-09 18:09:20 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-09 18:09:20 -0800
commit6c0e96db7bc9ac9052154430fe726c96745fa387 (patch)
treed01c7d164bdd477e5729a155f1e36482cd36c932 /viewres.c
parent4b21bf3702bb2548eee4bd44f48e4259c09ad487 (diff)
Print which argument was unknown before giving usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'viewres.c')
-rw-r--r--viewres.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/viewres.c b/viewres.c
index d53e220..56ba828 100644
--- a/viewres.c
+++ b/viewres.c
@@ -895,8 +895,14 @@ main(int argc, char *argv[])
Options, XtNumber(Options),
&argc, argv, (String *) fallback_resources,
(ArgList) NULL, ZERO);
- if (argc != 1)
+ 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();
+ }
initialize_widgetnode_list(&selected_list.elements,
&selected_list.max_elements, 10);